blob_id stringlengths 40 40 | directory_id stringlengths 40 40 | path stringlengths 3 616 | content_id stringlengths 40 40 | detected_licenses listlengths 0 112 | license_type stringclasses 2 values | repo_name stringlengths 5 115 | snapshot_id stringlengths 40 40 | revision_id stringlengths 40 40 | branch_name stringclasses 777 values | visit_date timestamp[us]date 2015-08-06 10:31:46 2023-09-06 10:44:38 | revision_date timestamp[us]date 1970-01-01 02:38:32 2037-05-03 13:00:00 | committer_date timestamp[us]date 1970-01-01 02:38:32 2023-09-06 01:08:06 | github_id int64 4.92k 681M ⌀ | star_events_count int64 0 209k | fork_events_count int64 0 110k | gha_license_id stringclasses 22 values | gha_event_created_at timestamp[us]date 2012-06-04 01:52:49 2023-09-14 21:59:50 ⌀ | gha_created_at timestamp[us]date 2008-05-22 07:58:19 2023-08-21 12:35:19 ⌀ | gha_language stringclasses 149 values | src_encoding stringclasses 26 values | language stringclasses 1 value | is_vendor bool 2 classes | is_generated bool 2 classes | length_bytes int64 3 10.2M | extension stringclasses 188 values | content stringlengths 3 10.2M | authors listlengths 1 1 | author_id stringlengths 1 132 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
b9c2eafabcc422185d25520e77910dd66ca153e6 | 425db5a849281d333e68c26a26678e7c8ce11b66 | /LeetCodeSolutions/LeetCode_1249.py | b201911e1129c8f2db7ad7a3446d8cf269ba10af | [
"MIT"
] | permissive | lih627/python-algorithm-templates | e8092b327a02506086414df41bbfb2af5d6b06dc | a61fd583e33a769b44ab758990625d3381793768 | refs/heads/master | 2021-07-23T17:10:43.814639 | 2021-01-21T17:14:55 | 2021-01-21T17:14:55 | 238,456,498 | 29 | 8 | null | null | null | null | UTF-8 | Python | false | false | 505 | py | class Solution:
def minRemoveToMakeValid(self, s: str) -> str:
stack = []
res = [''] * len(s)
for idx, val in enumerate(s):
if val == '(':
stack.append([idx, '('])
res[idx] = '('
elif val == ')':
if stack:
stack.pop()
res[idx] = ')'
else:
res[idx] = val
for tmp in stack:
res[tmp[0]] = ''
return ''.join(res)
| [
"lih627@outlook.com"
] | lih627@outlook.com |
bcddc785198dd4dfe6ed7c983ffc98e275103776 | 781e2692049e87a4256320c76e82a19be257a05d | /all_data/exercism_data/python/allergies/76c89c05add142a5bedef7b724ee84dd.py | 230885176ab163f21562dbcc0189ce3e469cd325 | [] | no_license | itsolutionscorp/AutoStyle-Clustering | 54bde86fe6dbad35b568b38cfcb14c5ffaab51b0 | be0e2f635a7558f56c61bc0b36c6146b01d1e6e6 | refs/heads/master | 2020-12-11T07:27:19.291038 | 2016-03-16T03:18:00 | 2016-03-16T03:18:42 | 59,454,921 | 4 | 0 | null | 2016-05-23T05:40:56 | 2016-05-23T05:40:56 | null | UTF-8 | Python | false | false | 887 | py | class Allergies():
def __init__(self, id):
list = []
if id > 255:
self.id = id % 256
else:
self.id = id
# Map to binary list, probably
self.allergies_match = [int(x) for x in bin(self.id)[2:]][::-1]
self.allergies_list = [
"eggs", "peanuts", "shellfish", "strawberries",
"tomatoes", "chocolate", "pollen", "cats"
]
# Using function because it's what worked.
self.list = self.list_Gen()
def list_Gen(self):
ret_list = []
for x in xrange(len(self.allergies_match)):
# print(x)
if self.allergies_match[x] == 1:
ret_list.append(self.allergies_list[x])
return ret_list
# list = list()
def is_allergic_to(self, item):
return item in self.list_Gen()
| [
"rrc@berkeley.edu"
] | rrc@berkeley.edu |
5c87d0b227b33ef6578fd3ac68063dd2ed9d815b | d638929e5b699e80c6af8e675b6695e622ddc51b | /alarm/alarm.py | f95c2a463cad2bd9d80da1f1bece6af3aaf009dd | [
"MIT"
] | permissive | hobojoe1848/pybites-alarm | 51636dbd53ef7777953450b9b672dd11cc1384b1 | 40d5ef42846840ef2140f04db2b9b73a259ed12e | refs/heads/main | 2023-08-19T18:14:32.403388 | 2021-10-31T10:07:16 | 2021-10-31T10:07:16 | 423,051,580 | 0 | 0 | MIT | 2021-10-31T04:23:02 | 2021-10-31T04:23:01 | null | UTF-8 | Python | false | false | 1,206 | py | from pathlib import Path
import time
from typing import Optional
from pydub import AudioSegment
from pydub.playback import _play_with_simpleaudio
def countdown_and_play_alarm(
seconds: int,
alarm_file: str,
display_timer: bool = False,
timeout: Optional[int] = None,
) -> None:
"""Countdown N seconds then play an alarm file"""
while seconds:
mins, secs = divmod(seconds, 60)
if display_timer:
print(f"{mins:02}:{secs:02}", end="\r")
time.sleep(1)
seconds -= 1
if display_timer:
print("00:00", end="\r")
play_alarm_file(alarm_file, timeout)
def play_alarm_file(alarm_file: str, timeout: Optional[int] = None) -> None:
"""
Looking at pydub/playback.py simpleaudio has the ability to stop the song
"""
file_type = Path(alarm_file).suffix.lstrip(".")
song = AudioSegment.from_file(alarm_file, file_type)
# I know, should not use "internal" functions, but this was the only way
# to stop the song after a number of seconds
playback = _play_with_simpleaudio(song)
if isinstance(timeout, int):
time.sleep(timeout)
playback.stop()
else:
playback.wait_done()
| [
"bobbelderbos@gmail.com"
] | bobbelderbos@gmail.com |
831e19fb1affdcc0a44354a8d57c591877ad3f8c | 53dfe70337a2923ec7872ab911a0b85cf233a708 | /dtree.py | eb2fccab07ffa58c612f5f6abf255930076a8a8a | [] | no_license | rcaseyatbat/CS155Kaggle | 268334214bb3e635133414cc59673da12007f7be | 5d50125995312dc42732edd730ab94012cbb36ce | refs/heads/master | 2021-01-25T08:59:56.228301 | 2015-02-18T21:35:19 | 2015-02-18T21:35:19 | 30,485,803 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,219 | py | import sys
# I need this because my python installation is weird..
sys.path.append('/usr/local/lib/python2.7/site-packages')
from sklearn import tree
import csv
import numpy as np
import matplotlib.pyplot as plt
# NOTE: Decrease if you want to do some cross validation.
# (just changed to 4000 to train the final model, after selected leaf
# parameter via cross valiation)
NUM_TRAININGS = 4000
fin_name = 'kaggle_train_wc.csv'
fout_name = 'kaggle_test_wc.csv'
with open(fin_name, 'r') as fin:
next(fin)
data = np.array(list(csv.reader(fin))).astype(int)
X_train = data[:NUM_TRAININGS, 1:-1]
Y_train = data[:NUM_TRAININGS, -1]
# these will be empty unless you do some cross validation
X_test = data[NUM_TRAININGS:, 1:-1]
Y_test = data[NUM_TRAININGS:, -1]
# grab the real test data
with open(fout_name, 'r') as fout:
next(fout)
data = np.array(list(csv.reader(fout))).astype(int)
X_testFile = data[:, 1:]
#Y_testFile = data[:, -1] # Note: theres no Y predictions for the real test data :)
# Used for cross validation to select parameters
def get_error(G, Y):
error = 0
for i in range(len(G)):
if G[i] != Y[i]:
error += 1
return 1.0 * error / len(G)
#min_samples_leafs = [i for i in range(1, 25)]
# NOTE: Just decided 12 here from looking at graphs during cross validation.
# Change back to previous line if you want to see the range
min_samples_leafs = [12]
test_errors = []
train_errors = []
for min_samples_leaf in min_samples_leafs:
# initialize the tree model
clf = tree.DecisionTreeClassifier(criterion='gini',
min_samples_leaf=min_samples_leaf)
# train the model
clf = clf.fit(X_train, Y_train)
# make prediction
G_train = clf.predict(X_train)
G_test = clf.predict(X_test)
G_testFile = clf.predict(X_testFile)
print G_testFile
# compute error
# NOTE: Uncomment if doing gross val
#train_error = get_error(G_train, Y_train)
#train_errors.append(train_error)
#test_error = get_error(G_test, Y_test)
#test_errors.append(test_error)
f = open('predictions.csv','w')
f.write('Id,Prediction\n')
for (i, e) in enumerate(G_testFile):
#print i, e
f.write('%d,%d\n' % (i+1, e))
| [
"="
] | = |
190ab7fce3bf18f63578fa2eb65d119e36c79aae | 01d46b81fd351f157f896d99451610e0ebf467e7 | /rjgoptionssite/oldflasky/flasky-09SEP/controllers/download_controller.py | 769a20639ea0565207852b6451761d890f20f5dd | [] | no_license | hfwebbed/Stock-Option-Analytics | d30e389d48f92a327af5d04fbb182245b1e3dcde | 1049f2cd543bced34a9a3c50505b5c8e120ffcea | refs/heads/master | 2023-08-03T04:52:48.975821 | 2022-03-15T19:07:25 | 2022-03-15T19:07:25 | 193,752,461 | 29 | 8 | null | 2023-07-22T09:17:04 | 2019-06-25T17:20:25 | Python | UTF-8 | Python | false | false | 1,200 | py |
from flask import send_file
import shutil
import openpyxl
from openpyxl import load_workbook
import time
class DownloadController:
def __init__(self,parameterService,tickerRateService):
self.parameterService = parameterService
self.tickerRateService = tickerRateService
pass
def dispatch(self, request):
tickers, from_date, till_date = self.parameterService.init_params(1500)
tickers = "goog"
ticker_data = self.tickerRateService.get_rate(tickers, from_date, till_date)
dest_file = 'static/excel/excel_dummy2.xlsm'
shutil.copy('static/excel/excel_dummy1.xlsm', dest_file)
wb = load_workbook(filename=dest_file)
ws = wb["Summary"]
ws["b4"] = tickers
ws["b5"] = from_date
ws["b6"] = till_date
ws["d4"] = ticker_data.iloc[0]['Close']
#ws["d4"] = ticker_data[0]["Close"]
wb.save(dest_file)
print(time.time())
result = send_file(dest_file,
mimetype='text/csv',
attachment_filename='dummy.xlsm',
as_attachment=True)
print(time.time())
return result
| [
"30417960+hfwebbed@users.noreply.github.com"
] | 30417960+hfwebbed@users.noreply.github.com |
a9ca55a19c0e1c55bbe0e7079fa7a63ab9e5208c | 5ba2ea4694d9423bc5435badba93b7b8fedfadd0 | /webapp/data_import/faust_stadtarchiv/DataImportFaustStadtarchivWorker.py | ac7737bf40552d794b0a8ca29ce5d458cca12081 | [] | no_license | Digital-Botschafter-und-mehr/mein-stadtarchiv | bdf480d82b366253afd27c697143ad5d727f652f | a9876230edac695710d4ec17b223e065fa61937c | refs/heads/master | 2023-02-05T18:43:13.159174 | 2021-01-01T09:35:46 | 2021-01-01T09:35:46 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,877 | py | # encoding: utf-8
"""
Copyright (c) 2017, Ernesto Ruge
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
"""
from lxml import etree
from ..DataImportWorker import DataImportWorker
from .FaustStadtarchivCategory import save_category, get_category
from .FaustStadtarchivDocument import save_document
class DataImportFaustStadtarchivWorker(DataImportWorker):
identifier = 'faust-stadtarchiv'
def is_valid(self):
if self.xml is None:
return False
if self.xml.tag != 'Stadtarchiv':
return False
if not len(self.xml):
return False
if self.xml[0].tag != 'Findbuch':
return False
return True
def save_base_data(self):
categories = {}
datasets = self.xml.findall('./Findbuch')
for dataset in datasets:
primary = self.get_field(dataset, './/Bestand')
if not primary:
continue
if primary not in categories.keys():
categories[primary] = []
secondary = self.get_field(dataset, './/Klassifikation')
if not secondary:
continue
if secondary in categories[primary]:
continue
categories[primary].append(secondary)
for primary_raw, secondaries in categories.items():
primary = save_category(self._parent, primary_raw)
for secondary in secondaries:
save_category(primary, secondary)
def save_data(self):
categories = {}
datasets = self.xml.findall('./Findbuch')
for dataset in datasets:
primary_title = self.get_field(dataset, './/Bestand')
if not primary_title:
continue
if primary_title not in categories.keys():
categories[primary_title] = {
'parent': get_category(self._parent, primary_title),
'children': {}
}
secondary = self.get_field(dataset, './/Klassifikation')
if not secondary:
continue
if secondary in categories[primary_title]['children'].keys():
continue
categories[primary_title]['children'][secondary] = get_category(categories[primary_title]['parent'], secondary)
for dataset in datasets:
save_document(categories, dataset)
@property
def data(self):
if not self._data:
self.file.seek(0)
self._data = self.file.read()
self._data = self._data.decode(encoding='ISO-8859-1')
self._data = self._data.replace('<?xml version="1.0" encoding="ISO-8859-1"?>', '')
return self._data
@property
def xml(self):
if self._xml is None:
try:
parser = etree.XMLParser(encoding='ISO-8859-1')
self._xml = etree.fromstring(self.data, parser=parser)
self.nsmap = self._xml.nsmap
if not self.nsmap:
return self._xml
self.nsmap['ns'] = self.nsmap[None]
del self.nsmap[None]
except etree.XMLSyntaxError:
return
except ValueError:
return
return self._xml
def get_field(self, data, path):
result = data.find(path)
if result is None:
return
if not result.text:
return
return result.text
| [
"mail@ernestoruge.de"
] | mail@ernestoruge.de |
77c97608f89f50599a28a23bff835d368f149a12 | a838d4bed14d5df5314000b41f8318c4ebe0974e | /sdk/eventhub/azure-eventhub/azure/eventhub/aio/_eventprocessor/in_memory_checkpoint_store.py | 22ef721c0ee08b96a6f06b1267650094a1962f37 | [
"LicenseRef-scancode-generic-cla",
"MIT",
"LGPL-2.1-or-later"
] | permissive | scbedd/azure-sdk-for-python | ee7cbd6a8725ddd4a6edfde5f40a2a589808daea | cc8bdfceb23e5ae9f78323edc2a4e66e348bb17a | refs/heads/master | 2023-09-01T08:38:56.188954 | 2021-06-17T22:52:28 | 2021-06-17T22:52:28 | 159,568,218 | 2 | 0 | MIT | 2019-08-11T21:16:01 | 2018-11-28T21:34:49 | Python | UTF-8 | Python | false | false | 1,664 | py | # --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# -----------------------------------------------------------------------------------
from typing import Dict, Any, Iterable, Optional, Union
from azure.eventhub._eventprocessor.in_memory_checkpoint_store import InMemoryCheckpointStore as CheckPointStoreImpl
from .checkpoint_store import CheckpointStore
class InMemoryCheckpointStore(CheckpointStore):
def __init__(self):
self._checkpoint_store_impl = CheckPointStoreImpl()
async def list_ownership(
self, fully_qualified_namespace: str, eventhub_name: str, consumer_group: str, **kwargs: Any
) -> Iterable[Dict[str, Any]]:
return self._checkpoint_store_impl.list_ownership(fully_qualified_namespace, eventhub_name, consumer_group)
async def claim_ownership(
self, ownership_list: Iterable[Dict[str, Any]], **kwargs: Any
) -> Iterable[Dict[str, Any]]:
return self._checkpoint_store_impl.claim_ownership(ownership_list)
async def update_checkpoint(
self, checkpoint: Dict[str, Optional[Union[str, int]]], **kwargs: Any
) -> None:
self._checkpoint_store_impl.update_checkpoint(checkpoint)
async def list_checkpoints(
self, fully_qualified_namespace: str, eventhub_name: str, consumer_group: str, **kwargs: Any
) -> Iterable[Dict[str, Any]]:
return self._checkpoint_store_impl.list_checkpoints(fully_qualified_namespace, eventhub_name, consumer_group)
| [
"noreply@github.com"
] | scbedd.noreply@github.com |
c6b1ec9abb66fcae482e064c75ae93ff5eabb333 | 10d5ce0b34806bd82715d544703e1cf1add4a146 | /TrafficGenerator/support/SSL_TLS_Support.py | 5ded90f2d52d6922cbd3fd4ad91ea306ba3c97d8 | [] | no_license | szabgab/ScapyTrafficGenerator3 | 17c05e4ca4c9dda0013b90eac328e2ff5d098c2f | 53c81b0796d436a1ec64b0ea46173d98d4bc1fa7 | refs/heads/main | 2023-03-12T02:24:23.410164 | 2020-12-22T08:11:55 | 2020-12-22T08:11:55 | 323,560,016 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,896 | py | from scapy.all import *
import logging
logging.getLogger("scapy.runtime").setLevel(logging.ERROR)
from Scapy_Control import *
class SSL_TSL_Supprt():
def __init__(self):
self.defaultCipher="RSA_WITH_AES_128_CBC_SHA"
self.sshcipher=65664
def simple_clientHello(self,
**kwargs):
version= kwargs.get('tlsrecord_version') or "TLS_1_0"
if "ssl" in version.lower():
print 'ssl type'
clienthello = SSLv2ClientHello(version=version,
#cipher_suites= ['RSA_WITH_AES_128_CBC_SHA']
)
clientrecord = SSLv2Record(content_type='client_hello')
return SSL(records = [clientrecord/clienthello])
else:
print 'tls type'
#TLSExtension(type="supported_groups", length=0x8)/TLSExtEllipticCurves(length=0x6, elliptic_curves=['secp256r1', 'secp384r1', 'secp521r1'])).show()
tlsclienthello = TLSClientHello()
tlshandshake = TLSHandshake(type= 'client_hello')
tlsrecord = TLSRecord(content_type="handshake",
version= kwargs.get('tlsrecord_version') or "TLS_1_0")
return SSL(records = [tlsrecord/tlshandshake/tlsclienthello] )
def simple_serverHello(self,
**kwargs):
version= kwargs.get('tlsrecord_version') or "TLS_1_0"
if "ssl" in version.lower():
print 'ssl type'
serverhello = SSLv2ClientHello(version=version)
return SSL(records = [SSLv2Record(content_type='server_hello')/SSLv2ClientHello(version=version)/Raw(load=RamdomRawData(400))])
else:
#TLSExtension(type="supported_groups", length=0x8)/TLSExtEllipticCurves(length=0x6, elliptic_curves=['secp256r1', 'secp384r1', 'secp521r1'])).show()
tlsserverhello = TLSServerHello(cipher_suite=self.defaultCipher)
tlshandshake = TLSHandshake(type= 'server_hello')
tlsrecord = TLSRecord(content_type="handshake",
version= kwargs.get('tlsrecord_version') or "TLS_1_0")
return SSL(records = [tlsrecord/tlshandshake/tlsserverhello] )
def simple_server_certificate(self,
publiccertlen=141,
signaturelen=257,
subject=None,
issuer=None,
**kwargs):
version= kwargs.get('tlsrecord_version') or "TLS_1_0"
if not subject:
subject = 'nathan.s.super.awesome.server.1.0.com'
if not issuer:
issuer = 'Nathan Is Super'
#random value pupblic key
randompubliccert=RamdomRawData(publiccertlen)
#random value signature
randomsignature=RamdomRawData(signaturelen)
certificate = TLSCertificate(data=X509Cert(signature=ASN1_BIT_STRING(randomsignature),
pubkey=ASN1_BIT_STRING(randompubliccert),
#issuer=[X509RDN(oid=ASN1_OID('.2.5.4.3'), value=ASN1_PRINTABLE_STRING('DigiCert SHA2 High Assurance Server CA'))],
subject=[X509RDN(oid=ASN1_OID('.2.5.4.3'), value=ASN1_PRINTABLE_STRING(subject))],
issuer=[X509RDN(oid=ASN1_OID('.2.5.4.3'), value=ASN1_PRINTABLE_STRING(issuer))],
#subject=[X509RDN(oid=ASN1_OID('.2.5.4.3'), value=ASN1_PRINTABLE_STRING('nathan.s.super.awesome.server.1.0.com'))],
),
)
certificatelist = TLSCertificateList(certificates=[certificate])
certificatehandshake = TLSHandshake(type='certificate')
record = TLSRecord(version= version,
content_type="handshake")
return SSL(records=[record/certificatehandshake/certificatelist])
def simple_server_hello_done(self,
**kwargs):
version= kwargs.get('tlsrecord_version') or "TLS_1_0"
tlshandshake = TLSHandshake(type= 'server_hello_done')
tlsrecord = TLSRecord(content_type="handshake",
version=version)
return SSL(records = [tlsrecord/tlshandshake] )
def simple_ClientKeyExchange(self,
exchangelen=130,
**kwargs):
version= kwargs.get('tlsrecord_version') or "TLS_1_0"
if "ssl" in version.lower():
print 'ssl record version=', version
return SSL(records = SSLv2Record(content_type="client_master_key")/SSLv2ClientMasterKey(key_argument=RamdomRawData(8)))
else:
record = TLSRecord(content_type="handshake",
version= version)
tlshandshake = TLSHandshake(type= 'client_key_exchange')
return SSL(records = [record/tlshandshake/TLSClientKeyExchange()/Raw(load=RamdomRawData(exchangelen))])
def simple_Client_ChangeCipherSpec(self,
**kwargs):
version= kwargs.get('tlsrecord_version') or "TLS_1_0"
record = TLSRecord(content_type="change_cipher_spec",
version= version)
cipherSpec = TLSChangeCipherSpec()
return SSL(records = [record/cipherSpec])
def simple_Server_ChangeCipherSpec(self,
specmessagelen=21,
**kwargs):
version= kwargs.get('tlsrecord_version') or "TLS_1_0"
record = TLSRecord(content_type="change_cipher_spec",
version= version)
cipherSpec = TLSChangeCipherSpec(message=RamdomRawData(specmessagelen))
return SSL(records = [record/cipherSpec])
def encrypted_data(self,
encryptlen=40):
return SSL(records = [TLSRecord(content_type=0)/TLSCiphertext(data=RamdomRawData(encryptlen))])
def Finished(self,
finisheddatalen=12,
#rawlen=16,
**kwargs):
version= kwargs.get('tlsrecord_version') or "TLS_1_0"
record = TLSRecord(content_type="handshake",
version= version)
return SSL(records = [record/TLSHandshake(type="finished")/TLSFinished(data=RamdomRawData(finisheddatalen))])#/TLSHandshake(type=247)/Raw(load=RamdomRawData(rawlen))])
if __name__=="__main__":
pcap = "/home/nathanhoisington/test.pcap"
SSLSUP = SSL_TSL_Supprt()
packetstart = Ether()/IP(src="1.2.3.4", dst='4.3.2.1',flags="DF")/TCP(sport=12345, dport=443, flags="PA", ack=1111, seq=3222)
packetend = SSLSUP.simple_clientHello()
packet=packetstart/packetend
packet.show2()
#packet = SSLSUP.simple_serverHello()
#packet = SSLSUP.simple_server_certificate()
#packet = SSLSUP.simple_server_hello_done()
#packet = SSLSUP.simple_ClientKeyExchange()
#packet = SSLSUP.simple_Client_ChangeCipherSpec()
#packet = SSLSUP.Finished()
#packet = SSLSUP.simple_Server_ChangeCipherSpec()
#packet = SSLSUP.Finished()
#print ''
#packet.show()
#print ''
#print 'show 2'
#print ''
#packet.show2()
#print ''
wrpcap(pcap,packet)
#print ''
#print 'after writing'
#print ''
#print ''
#rdpcap(pcap)[0].show2()
'''
for scapy
y = rdpcap('testing/ts-test/Tools/TrafficGenerator/Pcaps/tls2.pcap')
clienthello=3[3]
serverhello = y[5]
cert = y[7]
serverhellodone = y[9]
clientkeyExchange = y[11]
clientchangecipherspec = y[13]
clientfinished = y[15]
serverchangecipherspec=y[17]
serverfinished=y[19]
''' | [
"gabor@szabgab.com"
] | gabor@szabgab.com |
d8904f842a18029786a44e9787a3ea3d4e287b8b | c9ad6ad969de505b3c8471c6f46dfd782a0fb498 | /0x11-python-network_1/2-post_email.py | f9456c986de8e9178377c07526c55742ec51eb58 | [] | no_license | enterpreneur369/holbertonschool-higher_level_programming | 002fd5a19b40c8b1db06b34c4344e307f24c17ac | dd7d3f14bf3bacb41e2116d732ced78998a4afcc | refs/heads/master | 2022-06-20T00:57:27.736122 | 2020-05-06T14:26:10 | 2020-05-06T14:26:10 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 538 | py | #!/usr/bin/python3
""" Module 2-post_email
Python script that send a POST request
"""
import urllib.request
import sys
if __name__ == "__main__":
try:
url = sys.argv[1]
email = sys.argv[2]
values = {"email": email}
data = urllib.parse.urlencode(values)
data = data.encode("ascii")
req = urllib.request.Request(url, data)
with urllib.request.urlopen(req) as r:
html = r.read()
print("{}".format(html.decode("UTF-8")))
except IndexError:
pass
| [
"jose.calderon@holbertonschool.com"
] | jose.calderon@holbertonschool.com |
c8ea297268457b9ea391fff1005c0915bf107e5e | 9141823df0c7f40a405c5ed5d3a7ec5596ff5ad6 | /apps/login/urls.py | aacd3592e2a7fd23d16940f74f6dca6eb4d851b7 | [] | no_license | jqchang/dojo_secrets | 9ea70527e396a5205b2e7b19360e99a614e151b1 | e1d84d1cee201cbdde4b065ed50702c9caee7595 | refs/heads/master | 2021-01-21T06:42:41.697539 | 2017-02-23T21:18:44 | 2017-02-23T21:18:44 | 82,870,690 | 0 | 0 | null | 2017-02-23T21:13:19 | 2017-02-23T01:33:26 | Python | UTF-8 | Python | false | false | 397 | py | from django.conf.urls import url, include
from . import views
# from django.contrib import admin
urlpatterns = [
url(r'^$', views.index, name='login_index'),
# url(r'^success$', views.success, name='login_success'),
url(r'^process$', views.process, name='login_process'),
url(r'^login$', views.login, name='login_login'),
url(r'^logout$', views.logout, name='login_logout')
]
| [
"jqchang@gmail.com"
] | jqchang@gmail.com |
c1ebf23dd23f02933f1422f1713e8966feb7c239 | d972579395ced64fea4d40ec946c4aa053ef2c1b | /api/models.py | 9d38f73f74631163abb6bdba76a4baf3babb1b59 | [] | no_license | ziaurjoy/Serializer-and-ajax | 7a0e117e36e87b8889eb270a7c3c78b3f75f670e | 395a7802229badc139f9b4a6d5fbae563e093276 | refs/heads/master | 2022-06-09T09:32:57.054391 | 2020-05-03T15:26:34 | 2020-05-03T15:26:34 | 260,957,479 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 248 | py | from django.db import models
# Create your models here.
class Task(models.Model):
title = models.CharField(max_length=50)
complited = models.BooleanField(default=False,blank=True,null=True)
def __str__(self):
return self.title | [
"ziaurjoy802@gmail.com"
] | ziaurjoy802@gmail.com |
c2304a67a1780051792c3fc974a55cd4a567394d | caf6ae544fce3b332b40a03462c0646a32c913e1 | /merchant/python/test/test_new_invoice.py | d5860b0d8d6e26a30956c2c4527a926aa0978c06 | [
"Apache-2.0"
] | permissive | coinsecure/plugins | 827eb0ce03a6a23b4819a618ee47600161bec1c7 | ad6f08881020c268b530d5242d9deed8d2ec84de | refs/heads/master | 2020-05-30T07:17:56.255709 | 2016-11-27T22:22:23 | 2016-11-27T22:22:23 | 63,496,663 | 3 | 5 | null | null | null | null | UTF-8 | Python | false | false | 1,600 | py | # coding: utf-8
"""
coinMerchant Api Documentation
To generate an API key, please visit <a href='https://pay.coinsecure.in/payment-tools/api' target='_new' class='homeapi'>https://pay.coinsecure.in/payment-tools/api</a>.<br>Guidelines for use can be accessed at <a href='https://pay.coinsecure.in/api/guidelines'>https://pay.coinsecure.in/api/guidelines</a>.
OpenAPI spec version: 1.0B
Generated by: https://github.com/swagger-api/swagger-codegen.git
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
"""
from __future__ import absolute_import
import os
import sys
import unittest
import swagger_client
from swagger_client.rest import ApiException
from swagger_client.models.new_invoice import NewInvoice
class TestNewInvoice(unittest.TestCase):
""" NewInvoice unit test stubs """
def setUp(self):
pass
def tearDown(self):
pass
def testNewInvoice(self):
"""
Test NewInvoice
"""
model = swagger_client.models.new_invoice.NewInvoice()
if __name__ == '__main__':
unittest.main() | [
"vivek0@users.noreply.github.com"
] | vivek0@users.noreply.github.com |
285827778cb5d7d41286c78da3a8c7d7e1a18d6e | 45e376ae66b78b17788b1d3575b334b2cb1d0b1c | /tests/terraform/checks/resource/aws/test_APIGatewayMethodSettingsCacheEnabled.py | 949fe13423e8a9120e84913042e47da6a765b876 | [
"Apache-2.0"
] | permissive | bridgecrewio/checkov | aeb8febed2ed90e61d5755f8f9d80b125362644d | e64cbd27ffb6f09c2c9f081b45b7a821a3aa1a4d | refs/heads/main | 2023-08-31T06:57:21.990147 | 2023-08-30T23:01:47 | 2023-08-30T23:01:47 | 224,386,599 | 5,929 | 1,056 | Apache-2.0 | 2023-09-14T20:10:23 | 2019-11-27T08:55:14 | Python | UTF-8 | Python | false | false | 1,354 | py | import os
import unittest
from checkov.runner_filter import RunnerFilter
from checkov.terraform.checks.resource.aws.APIGatewayMethodSettingsCacheEnabled import check
from checkov.terraform.runner import Runner
class TestAPIGatewayMethodSettingsCacheEnabled(unittest.TestCase):
def test(self):
runner = Runner()
current_dir = os.path.dirname(os.path.realpath(__file__))
test_files_dir = current_dir + "/example_APIGatewayMethodSettingsCacheEnabled"
report = runner.run(root_folder=test_files_dir, runner_filter=RunnerFilter(checks=[check.id]))
summary = report.get_summary()
passing_resources = {
"aws_api_gateway_method_settings.pass",
}
failing_resources = {
"aws_api_gateway_method_settings.fail",
}
passed_check_resources = set([c.resource for c in report.passed_checks])
failed_check_resources = set([c.resource for c in report.failed_checks])
self.assertEqual(summary["passed"], 1)
self.assertEqual(summary["failed"], 1)
self.assertEqual(summary["skipped"], 0)
self.assertEqual(summary["parsing_errors"], 0)
self.assertEqual(passing_resources, passed_check_resources)
self.assertEqual(failing_resources, failed_check_resources)
if __name__ == "__main__":
unittest.main()
| [
"noreply@github.com"
] | bridgecrewio.noreply@github.com |
3039965ef509beb90baae8e5c128e86ed06be81f | ca7f34b5a105984ff3f3f4c794a3a4b95ab35abc | /iterm2_tools/shell_integration.py | 9676d0dae14f99722ef3110e7b84f0bbc5ba446c | [
"MIT"
] | permissive | Carreau/iterm2-tools | d6b0fa016759ace1315e6e708b389eb235a7dda8 | 3d42811b1c411f3a11b5550476fae78efa305164 | refs/heads/master | 2020-04-05T19:22:34.873301 | 2016-06-01T21:30:47 | 2016-06-01T21:30:47 | 60,203,359 | 0 | 0 | null | 2016-07-19T17:23:52 | 2016-06-01T19:02:26 | Python | UTF-8 | Python | false | false | 6,279 | py | """
Shell integration
See https://groups.google.com/d/msg/iterm2-discuss/URKCBtS0228/rs5Ive4PCAAJ
for documentation on the sequences,
https://github.com/gnachman/iterm2-website/tree/master/source/misc for example
implementations, and https://iterm2.com/shell_integration.html for a list of
what this lets you do in iTerm2.
Usage
=====
Say you have a basic REPL like::
input> run-command
command output
where ``input>`` is the prompt, ``run-command`` is the command typed by the user,
and ``command output`` is the output of ``run-command``. The basic REPL (in Python
3), would be::
while True:
before_prompt()
print("input> ", end='')
after_prompt()
command = input()
before_output()
return_val = run_command(command)
after_output(return_val)
(here ``return_val`` should be in the range 0-255).
Note that it is recommended to use the functions (like ``before_prompt()``) or the
context managers (like ``with Prompt()``) rather than the variables (like
``BEFORE_PROMPT``) directly. These print the codes directly to stdout, avoiding
potential issues with character counting.
It may be preferable to use the context managers rather than the functions,
in which case, the REPL would be::
while True:
with Prompt():
print("input> ", end='')
command = input() # raw_input() in Python 2
with Output() as o:
return_val = run_command(command)
o.set_command_status(return_val)
However, in many cases, it is impossible to run functions before and after the
prompt, e.g., when the prompt text is passed to ``(raw_)input()`` directly. In
that case, you should use the codes directly, wrapped with
``readline_invisible()``, like::
while True:
command = input(
readline_invisible(BEFORE_PROMPT) +
"input> " +
readline_invisible(AFTER_PROMPT
) # raw_input() in Python 2
with Output() as o:
return_val = run_command(command)
o.set_command_status(return_val)
Using ``readline_invisible()`` is important as it tells readline to not count the
codes as visible text. Without this, readline's editing and history commands
will truncate text.
Notes about iTerm2:
- iTerm2 assumes that the prompt sequences will be presented in a reasonable
way. Using the context managers should prevent most issues.
- The text that comes after the prompt before the first newline is read as a
command. If there is no command, or the command is just whitespace, the
output is effectively ignored (the same as if two before/after prompt
sequences were performed without any output sequence).
- iTerm2 does not support capturing multiline commands, although the output
won't include any part of the command if ``before_output()`` is used
correctly.
- iTerm2 expects there to be nothing between ``AFTER_OUTPUT`` and
``BEFORE_PROMPT``, except possibly more shell sequences. At the time of this
writing, iTerm2's "Select Output of Last Command" actually selects the text
between ``BEFORE_OUTPUT`` and ``BEFORE_PROMPT``, not ``BEFORE_OUTPUT`` and
``AFTER_OUTPUT`` as one would expect.
- Multiline prompts are supported just fine, although the arrow will always be
presented on the first line. It is not recommended to attempt to change this
by not including part of the prompt between the prompt sequences (see the
previous bullet point).
"""
from __future__ import print_function, division, absolute_import
import sys
from contextlib import contextmanager
# The "FinalTerm" shell sequences
BEFORE_PROMPT = '\033]133;A\a'
AFTER_PROMPT = '\033]133;B\a'
BEFORE_OUTPUT = '\033]133;C\a'
AFTER_OUTPUT = '\033]133;D;{command_status}\a' # command_status is the command status, 0-255
# iTerm2 specific sequences. All optional.
SET_USER_VAR = '\033]1337;SetUserVar={user_var_key}={user_var_value}\a'
# The current shell integration version is 1. We don't use this as an outdated
# shell integration version would only prompt the user to upgrade the
# integration that comes with iTerm2.
SHELL_INTEGRATION_VERSION = '\033]1337;ShellIntegrationVersion={shell_integration_version}\a'
# REMOTE_HOST and CURRENT_DIR are best echoed right after AFTER_OUTPUT.
# remote_host_hostname should be the fully qualified hostname. Integrations
# should allow users to set remote_host_hostname in case DNS is slow.
REMOTE_HOST = '\033]1337;RemoteHost={remote_host_username}@{remote_host_hostname}\a'
CURRENT_DIR = '\033]1337;CurrentDir={current_dir}\a'
def readline_invisible(code):
"""
Wrap ``code`` with the special characters to tell readline that it is
invisible.
"""
return '\001%s\002' % code
def before_prompt():
"""
Shell sequence to be run before the prompt.
"""
sys.stdout.write(BEFORE_PROMPT)
def after_prompt():
"""
Shell sequence to be run after the prompt.
"""
sys.stdout.write(AFTER_PROMPT)
def before_output():
"""
Shell sequence to be run before the command output.
"""
sys.stdout.write(BEFORE_OUTPUT)
def after_output(command_status):
"""
Shell sequence to be run after the command output.
The ``command_status`` should be in the range 0-255.
"""
if command_status not in range(256):
raise ValueError("command_status must be an integer in the range 0-255")
sys.stdout.write(AFTER_OUTPUT.format(command_status=command_status))
@contextmanager
def Prompt():
"""
iTerm2 shell integration prompt context manager
Use like::
with Prompt():
print("Prompt:", end='')
"""
before_prompt()
yield
after_prompt()
class Output(object):
"""
iTerm2 shell integration output context manager
Use like::
with Output() as o:
print("output")
o.set_command_status(status)
The command status should be in the range 0-255. The default status is 0.
"""
def __init__(self):
self.command_status = 0
def set_command_status(self, status):
self.command_status = status
def __enter__(self):
before_output()
return self
def __exit__(self, exc_type, exc_value, traceback):
after_output(self.command_status)
| [
"asmeurer@gmail.com"
] | asmeurer@gmail.com |
a077ee542a3cdeb2e8d4aa5dfae685ee2dd37922 | 180dc578d12fff056fce1ef8bd1ba5c227f82afc | /official/legacy/detection/modeling/architecture/nn_ops.py | c8e2f5b534a79a7dba8ff321417f77b8d8a47cf7 | [
"Apache-2.0"
] | permissive | jianzhnie/models | 6cb96c873d7d251db17afac7144c4dbb84d4f1d6 | d3507b550a3ade40cade60a79eb5b8978b56c7ae | refs/heads/master | 2023-07-12T05:08:23.314636 | 2023-06-27T07:54:20 | 2023-06-27T07:54:20 | 281,858,258 | 2 | 0 | Apache-2.0 | 2022-03-27T12:53:44 | 2020-07-23T05:22:33 | Python | UTF-8 | Python | false | false | 3,853 | py | # Copyright 2023 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""Neural network operations commonly shared by the architectures."""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import functools
import tensorflow as tf
class NormActivation(tf.keras.layers.Layer):
"""Combined Normalization and Activation layers."""
def __init__(self,
momentum=0.997,
epsilon=1e-4,
trainable=True,
init_zero=False,
use_activation=True,
activation='relu',
fused=True,
name=None):
"""A class to construct layers for a batch normalization followed by a ReLU.
Args:
momentum: momentum for the moving average.
epsilon: small float added to variance to avoid dividing by zero.
trainable: `bool`, if True also add variables to the graph collection
GraphKeys.TRAINABLE_VARIABLES. If False, freeze batch normalization
layer.
init_zero: `bool` if True, initializes scale parameter of batch
normalization with 0. If False, initialize it with 1.
use_activation: `bool`, whether to add the optional activation layer after
the batch normalization layer.
activation: 'string', the type of the activation layer. Currently support
`relu` and `swish`.
fused: `bool` fused option in batch normalziation.
name: `str` name for the operation.
"""
super(NormActivation, self).__init__(trainable=trainable)
if init_zero:
gamma_initializer = tf.keras.initializers.Zeros()
else:
gamma_initializer = tf.keras.initializers.Ones()
self._normalization_op = tf.keras.layers.BatchNormalization(
momentum=momentum,
epsilon=epsilon,
center=True,
scale=True,
trainable=trainable,
fused=fused,
gamma_initializer=gamma_initializer,
name=name)
self._use_activation = use_activation
if activation == 'relu':
self._activation_op = tf.nn.relu
elif activation == 'swish':
self._activation_op = tf.nn.swish
else:
raise ValueError('Unsupported activation `{}`.'.format(activation))
def __call__(self, inputs, is_training=None):
"""Builds the normalization layer followed by an optional activation layer.
Args:
inputs: `Tensor` of shape `[batch, channels, ...]`.
is_training: `boolean`, if True if model is in training mode.
Returns:
A normalized `Tensor` with the same `data_format`.
"""
# We will need to keep training=None by default, so that it can be inherit
# from keras.Model.training
if is_training and self.trainable:
is_training = True
inputs = self._normalization_op(inputs, training=is_training)
if self._use_activation:
inputs = self._activation_op(inputs)
return inputs
def norm_activation_builder(momentum=0.997,
epsilon=1e-4,
trainable=True,
activation='relu',
**kwargs):
return functools.partial(
NormActivation,
momentum=momentum,
epsilon=epsilon,
trainable=trainable,
activation=activation,
**kwargs)
| [
"gardener@tensorflow.org"
] | gardener@tensorflow.org |
89c9395c09734718f314c543c5e5285374ce3142 | 7759122052337252217fff9d51ec6d125ef370e0 | /iq/components/wx_filterchoicectrl/filter_ext_funcs.py | 50b4369d690700d6454a622d6f3a0e9e5a447bbc | [] | no_license | XHermitOne/iq_framework | 3325670c74233d99e599921fad4bd41e5d8104f3 | 7550e242746cb2fb1219474463f8db21f8e3e114 | refs/heads/master | 2023-09-03T21:07:58.107750 | 2023-09-01T07:30:13 | 2023-09-01T07:30:13 | 195,210,479 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 8,299 | py | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Additional filter functions.
"""
import datetime
from ...dialog import std_dlg_func
from ...util import dt_func
__version__ = (0, 0, 0, 1)
DEFAULT_DATE_FMT = '%Y.%m.%d'
DEFAULT_BEGIN_DATE_FMT = '%Y.%m.%d 00:00:00'
DEFAULT_END_DATE_FMT = '%Y.%m.%d 23:59:59'
def getArgsSysDate():
"""
Get arguments system date.
:return: Arguments dictionary.
"""
now_date = datetime.datetime.now()
str_now_date = now_date.strftime(DEFAULT_BEGIN_DATE_FMT)
return dict(arg_1=str_now_date)
def getArgsSysMonth():
"""
Get arguments system month.
:return: Arguments dictionary.
"""
now = datetime.datetime.now()
first_day_month = datetime.datetime(now.year, now.month, 1)
date_on_next_month = first_day_month + datetime.timedelta(35)
first_day_next_month = datetime.datetime(date_on_next_month.year, date_on_next_month.month, 1)
last_day_month = first_day_next_month - datetime.timedelta(1)
str_first_day_month = first_day_month.strftime(DEFAULT_DATE_FMT)
str_last_day_month = last_day_month.strftime(DEFAULT_DATE_FMT)
return dict(arg_1=str_first_day_month, arg_2=str_last_day_month)
def getArgsSysYear():
"""
Get arguments system year.
:return: Arguments dictionary.
"""
now = datetime.datetime.now()
first_day_year = datetime.datetime(now.year, 1, 1)
date_on_next_year = first_day_year + datetime.timedelta(370)
first_day_next_year = datetime.datetime(date_on_next_year.year, 1, 1)
last_day_year = first_day_next_year - datetime.timedelta(1)
str_first_day_year = first_day_year.strftime(DEFAULT_DATE_FMT)
str_last_day_year = last_day_year.strftime(DEFAULT_DATE_FMT)
return dict(arg_1=str_first_day_year, arg_2=str_last_day_year)
def getArgsChoiceDate():
"""
Get arguments selected date.
:return: Arguments dictionary.
"""
choice_date = std_dlg_func.getDateDlg()
if choice_date:
str_date = choice_date.strftime(DEFAULT_DATE_FMT)
return dict(arg_1=str_date)
return dict()
def getArgsChoiceMonth():
"""
Get arguments selected month.
:return: Arguments dictionary.
"""
choice_month = std_dlg_func.getMonthDlg()
if choice_month:
str_first_date = choice_month.strftime(DEFAULT_DATE_FMT)
next_month = choice_month+datetime.timedelta(35)
last_date = datetime.datetime(year=next_month.year, month=next_month.month, day=1)
str_last_date = last_date.strftime(DEFAULT_DATE_FMT)
return dict(arg_1=str_first_date, arg_2=str_last_date)
return dict()
def getArgsChoiceYear():
"""
Get arguments selected year.
:return: Arguments dictionary.
"""
choice_year = std_dlg_func.getYearDlg()
if choice_year:
str_first_date = choice_year.strftime(DEFAULT_DATE_FMT)
next_year = choice_year+datetime.timedelta(370)
last_date = datetime.datetime(year=next_year.year, month=1, day=1)
str_last_date = last_date.strftime(DEFAULT_DATE_FMT)
return dict(arg_1=str_first_date, arg_2=str_last_date)
return dict()
def getArgsChoiceDateRange():
"""
Get arguments selected date range.
:return: Arguments dictionary.
"""
choice_range = std_dlg_func.getDateRangeDlg()
if choice_range:
str_first_date = choice_range[0].strftime(DEFAULT_DATE_FMT)
str_last_date = choice_range[1].strftime(DEFAULT_DATE_FMT)
return dict(arg_1=str_first_date, arg_2=str_last_date)
return dict()
def getArgsChoiceMonthRange():
"""
Get arguments selected month range.
:return: Arguments dictionary.
"""
choice_range = std_dlg_func.getMonthRangeDlg()
if choice_range:
str_first_date = choice_range[0].strftime(DEFAULT_DATE_FMT)
next_month = choice_range[1]+datetime.timedelta(35)
last_date = datetime.datetime(year=next_month.year, month=next_month.month, day=1)
str_last_date = last_date.strftime(DEFAULT_DATE_FMT)
return dict(arg_1=str_first_date, arg_2=str_last_date)
return dict()
def getArgsSysDateDatetime():
"""
Get arguments system date as datetime.
:return: Arguments dictionary.
"""
today = datetime.date.today()
tomorrow = today + datetime.timedelta(days=1)
return dict(arg_1=today, arg_2=tomorrow)
def getArgsYesterdayDatetime():
"""
Get arguments yesterday as datetime.
:return: Arguments dictionary.
"""
today = datetime.date.today()
yesterday = today - datetime.timedelta(days=1)
return dict(arg_1=yesterday, arg_2=today)
def getArgsTwoDaysAgoDatetime():
"""
Get arguments two days ago as datetime.
:return: Arguments dictionary.
"""
today = datetime.date.today()
yesterday = today - datetime.timedelta(days=1)
two_days_ago = today - datetime.timedelta(days=2)
return dict(arg_1=two_days_ago, arg_2=yesterday)
def getArgsSysMonthDatetime():
"""
Get arguments system month as datetime.
:return: Arguments dictionary.
"""
now = datetime.datetime.now()
first_day_month = datetime.datetime(now.year, now.month, 1)
date_on_next_month = first_day_month + datetime.timedelta(35)
first_day_next_month = datetime.datetime(date_on_next_month.year, date_on_next_month.month, 1)
last_day_month = first_day_next_month - datetime.timedelta(1)
return dict(arg_1=first_day_month, arg_2=last_day_month)
def getArgsSysYearDatetime():
"""
Get arguments system year as datetime.
:return: Arguments dictionary.
"""
now = datetime.datetime.now()
first_day_year = datetime.datetime(now.year, 1, 1)
date_on_next_year = first_day_year + datetime.timedelta(370)
first_day_next_year = datetime.datetime(date_on_next_year.year, 1, 1)
last_day_year = first_day_next_year - datetime.timedelta(1)
return dict(arg_1=first_day_year, arg_2=last_day_year)
def getArgsOperYearDatetime():
"""
Get arguments operate year as datetime.
:return: Arguments dictionary.
"""
first_day_year = datetime.datetime(dt_func.getOperateYear(), 1, 1)
date_on_next_year = first_day_year + datetime.timedelta(370)
first_day_next_year = datetime.datetime(date_on_next_year.year, 1, 1)
last_day_year = first_day_next_year - datetime.timedelta(1)
return dict(arg_1=first_day_year, arg_2=last_day_year)
def getArgsChoiceDateDatetime():
"""
Get arguments selected date as datetime.
:return: Arguments dictionary.
"""
choice_date = std_dlg_func.getDateDlg()
if choice_date:
next_date = choice_date + datetime.timedelta(days=1)
return dict(arg_1=choice_date, arg_2=next_date)
return dict()
def getArgsChoiceMonthDatetime():
"""
Get arguments selected month as datetime.
:return: Arguments dictionary.
"""
choice_month = std_dlg_func.getMonthDlg()
if choice_month:
next_month = choice_month+datetime.timedelta(35)
last_date = datetime.datetime(year=next_month.year, month=next_month.month, day=1)
return dict(arg_1=choice_month, arg_2=last_date)
return dict()
def getArgsChoiceYearDatetime():
"""
Get arguments selected year as datetime.
:return: Arguments dictionary.
"""
choice_year = std_dlg_func.getYearDlg()
if choice_year:
next_year = choice_year+datetime.timedelta(370)
last_date = datetime.datetime(year=next_year.year, month=1, day=1)
return dict(arg_1=choice_year, arg_2=last_date)
return dict()
def getArgsChoiceDateRangeDatetime():
"""
Get arguments selected date range as datetime.
:return: Arguments dictionary.
"""
choice_range = std_dlg_func.getDateRangeDlg()
if choice_range:
return dict(arg_1=choice_range[0], arg_2=choice_range[1])
return dict()
def getArgsChoiceMonthRangeDatetime():
"""
Get arguments selected month range as datetime.
:return: Arguments dictionary.
"""
choice_range = std_dlg_func.getMonthRangeDlg()
if choice_range:
next_month = choice_range[1]+datetime.timedelta(35)
last_date = datetime.datetime(year=next_month.year, month=next_month.month, day=1)
return dict(arg_1=choice_range[0], arg_2=last_date)
return dict()
| [
"xhermitone@gmail.com"
] | xhermitone@gmail.com |
c29f4258256a0299f7c1ce8d83dab9055e20dd92 | 2b2b5e2a28038b8e2dea5bbec0f833cabfa0c256 | /eland/ml/pytorch/_pytorch_model.py | de1b550656bf9fcbea7b056e77b763c3bdce3cbc | [
"Apache-2.0",
"MIT",
"BSD-3-Clause"
] | permissive | elastic/eland | 09b321d500c31abb04673a17bc9ea32f13d3358e | 95864a9ace67337b863ebeb65ded808cf5ba03b3 | refs/heads/main | 2023-09-01T18:13:38.645147 | 2023-08-31T09:34:36 | 2023-08-31T09:34:36 | 191,316,757 | 524 | 95 | Apache-2.0 | 2023-09-14T19:31:16 | 2019-06-11T07:24:06 | Python | UTF-8 | Python | false | false | 5,662 | py | # Licensed to Elasticsearch B.V. under one or more contributor
# license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright
# ownership. Elasticsearch B.V. licenses this file to you under
# the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
import base64
import json
import math
import os
from typing import (
TYPE_CHECKING,
Any,
Dict,
Iterable,
List,
Mapping,
Optional,
Set,
Tuple,
Union,
)
from tqdm.auto import tqdm # type: ignore
from eland.common import ensure_es_client
from eland.ml.pytorch.nlp_ml_model import NlpTrainedModelConfig
if TYPE_CHECKING:
from elasticsearch import Elasticsearch
from elasticsearch._sync.client.utils import _quote
DEFAULT_CHUNK_SIZE = 4 * 1024 * 1024 # 4MB
DEFAULT_TIMEOUT = "60s"
class PyTorchModel:
"""
A PyTorch model managed by Elasticsearch.
These models must be trained outside of Elasticsearch, conform to the
support tokenization and inference interfaces, and exported as their
TorchScript representations.
"""
def __init__(
self,
es_client: Union[str, List[str], Tuple[str, ...], "Elasticsearch"],
model_id: str,
):
self._client: Elasticsearch = ensure_es_client(es_client)
self.model_id = model_id
def put_config(
self, path: Optional[str] = None, config: Optional[NlpTrainedModelConfig] = None
) -> None:
if path is not None and config is not None:
raise ValueError("Only include path or config. Not both")
if path is not None:
with open(path) as f:
config_map = json.load(f)
elif config is not None:
config_map = config.to_dict()
else:
raise ValueError("Must provide path or config")
self._client.ml.put_trained_model(model_id=self.model_id, **config_map)
def put_vocab(self, path: str) -> None:
with open(path) as f:
vocab = json.load(f)
self._client.perform_request(
method="PUT",
path=f"/_ml/trained_models/{self.model_id}/vocabulary",
headers={"accept": "application/json", "content-type": "application/json"},
body=vocab,
)
def put_model(self, model_path: str, chunk_size: int = DEFAULT_CHUNK_SIZE) -> None:
model_size = os.stat(model_path).st_size
total_parts = math.ceil(model_size / chunk_size)
def model_file_chunk_generator() -> Iterable[str]:
with open(model_path, "rb") as f:
while True:
data = f.read(chunk_size)
if not data:
break
yield base64.b64encode(data).decode()
for i, data in tqdm(
enumerate(model_file_chunk_generator()), unit=" parts", total=total_parts
):
self._client.ml.put_trained_model_definition_part(
model_id=self.model_id,
part=i,
total_definition_length=model_size,
total_parts=total_parts,
definition=data,
)
def import_model(
self,
*,
model_path: str,
config_path: Optional[str],
vocab_path: str,
config: Optional[NlpTrainedModelConfig] = None,
chunk_size: int = DEFAULT_CHUNK_SIZE,
) -> None:
self.put_config(path=config_path, config=config)
self.put_model(model_path, chunk_size)
self.put_vocab(vocab_path)
def infer(
self,
docs: List[Mapping[str, str]],
timeout: str = DEFAULT_TIMEOUT,
) -> Any:
if docs is None:
raise ValueError("Empty value passed for parameter 'docs'")
__body: Dict[str, Any] = {}
__body["docs"] = docs
__path = f"/_ml/trained_models/{_quote(self.model_id)}/_infer"
__query: Dict[str, Any] = {}
__query["timeout"] = timeout
__headers = {"accept": "application/json", "content-type": "application/json"}
return self._client.options(request_timeout=60).perform_request(
"POST", __path, params=__query, headers=__headers, body=__body
)
def start(self, timeout: str = DEFAULT_TIMEOUT) -> None:
self._client.options(request_timeout=60).ml.start_trained_model_deployment(
model_id=self.model_id, timeout=timeout, wait_for="started"
)
def stop(self) -> None:
self._client.ml.stop_trained_model_deployment(model_id=self.model_id)
def delete(self) -> None:
self._client.options(ignore_status=404).ml.delete_trained_model(
model_id=self.model_id
)
@classmethod
def list(
cls, es_client: Union[str, List[str], Tuple[str, ...], "Elasticsearch"]
) -> Set[str]:
client = ensure_es_client(es_client)
resp = client.ml.get_trained_models(model_id="*", allow_no_match=True)
return set(
[
model["model_id"]
for model in resp["trained_model_configs"]
if model["model_type"] == "pytorch"
]
)
| [
"noreply@github.com"
] | elastic.noreply@github.com |
1ba36e754a18fa91d89c43dbe3bf65dfd2bef5d8 | 95b37927e64e2901e664cc958ff01927734081fc | /ethereumetl/mappers/receipt_log_mapper.py | 0712b1469f387b381e854450096902201d0a30c5 | [
"MIT"
] | permissive | farooqarahim/ethereum-etl | 335d5ea74fcd4e62960ee035d31e320445fd8bf2 | ef462ba2c413088931e46638d8b8b1391a469f5d | refs/heads/master | 2020-03-23T22:01:18.156250 | 2018-07-23T16:58:44 | 2018-07-23T16:58:44 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,337 | py | # MIT License
#
# Copyright (c) 2018 Evgeny Medvedev, evge.medvedev@gmail.com
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
from ethereumetl.domain.receipt_log import EthReceiptLog
from ethereumetl.utils import hex_to_dec
class EthReceiptLogMapper(object):
def json_dict_to_receipt_log(self, json_dict):
receipt_log = EthReceiptLog()
receipt_log.log_index = hex_to_dec(json_dict.get('logIndex', None))
receipt_log.transaction_hash = json_dict.get('transactionHash', None)
receipt_log.transaction_index = hex_to_dec(json_dict.get('transactionIndex', None))
receipt_log.block_hash = json_dict.get('blockHash', None)
receipt_log.block_number = hex_to_dec(json_dict.get('blockNumber', None))
receipt_log.address = json_dict.get('address', None)
receipt_log.data = json_dict.get('data', None)
receipt_log.topics = json_dict.get('topics', None)
return receipt_log
def web3_dict_to_receipt_log(self, dict):
receipt_log = EthReceiptLog()
receipt_log.log_index = dict.get('logIndex', None)
transaction_hash = dict.get('transactionHash', None)
if transaction_hash is not None:
transaction_hash = transaction_hash.hex()
receipt_log.transaction_hash = transaction_hash
block_hash = dict.get('blockHash', None)
if block_hash is not None:
block_hash = block_hash.hex()
receipt_log.block_hash = block_hash
receipt_log.block_number = dict.get('blockNumber', None)
receipt_log.address = dict.get('address', None)
receipt_log.data = dict.get('data', None)
if 'topics' in dict:
receipt_log.topics = [topic.hex() for topic in dict['topics']]
return receipt_log
def receipt_log_to_dict(self, receipt_log):
return {
'type': 'log',
'log_index': receipt_log.log_index,
'log_transaction_hash': receipt_log.transaction_hash,
'log_transaction_index': receipt_log.transaction_index,
'log_block_hash': receipt_log.block_hash,
'log_block_number': receipt_log.block_number,
'log_address': receipt_log.address,
'log_data': receipt_log.data,
'log_topics': '|'.join(receipt_log.topics)
}
| [
"medvedev1088@gmail.com"
] | medvedev1088@gmail.com |
3260047056822f3f7f151764bf6c76b00d2c5a54 | 6eb59488a043d78e5758922ee0136103d4fd419f | /tests/test_surround_delete.py | b0e2509fe5fc9e617ade38961f57ba8eba6bf5a1 | [
"MIT"
] | permissive | SublimeSix/plugin-surround | e038e3bf246900f454facc3ad765cc31d1d0732e | eba4fd9af4f4f686f94796a4d6cfe53b94f3e1d2 | refs/heads/master | 2020-03-19T17:30:53.230178 | 2018-07-14T20:36:41 | 2018-07-14T20:38:10 | 136,763,619 | 3 | 0 | MIT | 2018-06-24T20:45:49 | 2018-06-09T22:56:59 | Python | UTF-8 | Python | false | false | 2,025 | py | import os
import unittest
import sublime
from sublime import Region as R
from User.six.tests import ViewTest
from Six.lib.command_state import CommandState
from Six.lib.constants import Mode
from Six.lib.errors import AbortCommandError
from Six.lib.yank_registers import EditOperation
from User.six.surround import find_in_line
from User.six.surround import BRACKETS
class Test__six_surround_delete(ViewTest):
def testCanReplace(self):
self.view.run_command("append", { "characters": "aaa bbb ccc" })
self.view.sel().clear()
self.view.sel().add(R(5))
old = "'"
for new, brackets in BRACKETS.items():
# with self.subTest(bracket=new): # Not supported in Python 3.3
old_a, old_b = BRACKETS[old]
new_a, new_b = brackets
self.view.sel().clear()
self.view.sel().add(R(7))
self.view.run_command("insert", { "characters": old_b })
self.view.sel().clear()
self.view.sel().add(R(4))
self.view.run_command("insert", { "characters": old_a })
self.assertEquals(self.view.substr(4), old_a)
self.assertEquals(self.view.substr(8), old_b)
self.view.run_command("_six_surround_delete", { "old": old })
self.assertEquals(self.view.substr(4), "b")
self.assertEquals(self.view.substr(7), " ")
old = new
def testCanUndoInOneStep(self):
self.view.run_command("append", { "characters": "aaa 'bbb' ccc" })
self.view.sel().clear()
self.view.sel().add(R(5))
self.assertEquals(self.view.substr(4), "'")
self.assertEquals(self.view.substr(8), "'")
self.view.run_command("_six_surround_delete", { "old": "'" })
self.assertEquals(self.view.substr(4), 'b')
self.assertEquals(self.view.substr(7), ' ')
self.view.run_command("undo")
self.assertEquals(self.view.substr(4), "'")
self.assertEquals(self.view.substr(8), "'")
| [
"guillermo.lopez@outlook.com"
] | guillermo.lopez@outlook.com |
db164c4acb91643dac552db8d6754de1e2163630 | 7df7642c30f0cd09db47c42abe2738a00d8c9562 | /hearthstone/stringsfile.py | d72f60096e67c53bc2058e4ea64427e1caec8165 | [
"MIT"
] | permissive | mshirinyan/python-hearthstone | 601887c49385f041acd0c98c23170269b29ff5f5 | 3855e9565d45f0a5677fffe2f88cbe160cc6c7e1 | refs/heads/master | 2021-09-07T12:33:05.479242 | 2018-02-14T12:33:20 | 2018-02-14T16:05:20 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 824 | py | """
Hearthstone Strings file
File format: TSV. Lines starting with `#` are ignored.
Key is always `TAG`
"""
import csv
from pkg_resources import resource_filename
_cache = {}
def load(fp):
reader = csv.DictReader(filter(lambda row: not row.startswith("#"), fp), delimiter="\t")
stripped_rows = [{k: v for k, v in row.items() if v} for row in reader]
return {stripped_row.pop("TAG"): stripped_row for stripped_row in stripped_rows}
def load_globalstrings(locale="enUS"):
path = "Strings/%s/GLOBAL.txt" % (locale)
if path not in _cache:
full_path = resource_filename("hearthstone", path)
with open(full_path, "r") as f:
_cache[path] = load(f)
return _cache[path]
if __name__ == "__main__":
import json
import sys
for path in sys.argv[1:]:
with open(path, "r") as f:
print(json.dumps(load(f)))
| [
"jerome@leclan.ch"
] | jerome@leclan.ch |
319a4bc95aea3b757559574c3ed43e018eac55d3 | 9a216260e3c3ba9c73f3cbad0b16c3bb4cd3b622 | /imGcode/env_imGcode/Lib/site-packages/imageio/plugins/pillowmulti.py | f525922067a53301d339b1da2de00e1644b76bb5 | [
"Apache-2.0"
] | permissive | vidmo91/imgcode | a214348650e349b81cc9c43c4f92e17d9f791875 | 7c8d0b6f01af4d96e70b9afb1bbb1e7b72603c3c | refs/heads/master | 2023-07-19T17:00:44.757756 | 2020-07-27T15:07:44 | 2020-07-27T15:07:44 | 171,950,671 | 16 | 7 | Apache-2.0 | 2023-07-06T21:33:35 | 2019-02-21T21:48:50 | Python | UTF-8 | Python | false | false | 12,571 | py | """
PIL formats for multiple images.
"""
import logging
import numpy as np
from .pillow import PillowFormat, ndarray_to_pil, image_as_uint
logger = logging.getLogger(__name__)
NeuQuant = None # we can implement this when we need it
class TIFFFormat(PillowFormat):
_modes = "i" # arg, why bother; people should use the tiffile version
_description = "TIFF format (Pillow)"
class GIFFormat(PillowFormat):
""" A format for reading and writing static and animated GIF, based
on Pillow.
Images read with this format are always RGBA. Currently,
the alpha channel is ignored when saving RGB images with this
format.
Parameters for reading
----------------------
None
Parameters for saving
---------------------
loop : int
The number of iterations. Default 0 (meaning loop indefinitely).
duration : {float, list}
The duration (in seconds) of each frame. Either specify one value
that is used for all frames, or one value for each frame.
Note that in the GIF format the duration/delay is expressed in
hundredths of a second, which limits the precision of the duration.
fps : float
The number of frames per second. If duration is not given, the
duration for each frame is set to 1/fps. Default 10.
palettesize : int
The number of colors to quantize the image to. Is rounded to
the nearest power of two. Default 256.
subrectangles : bool
If True, will try and optimize the GIF by storing only the
rectangular parts of each frame that change with respect to the
previous. Default False.
"""
_modes = "iI"
_description = "Static and animated gif (Pillow)"
class Reader(PillowFormat.Reader):
def _open(self, playback=None): # compat with FI format
return PillowFormat.Reader._open(self)
class Writer(PillowFormat.Writer):
def _open(
self,
loop=0,
duration=None,
fps=10,
palettesize=256,
quantizer=0,
subrectangles=False,
):
# Check palettesize
palettesize = int(palettesize)
if palettesize < 2 or palettesize > 256:
raise ValueError("GIF quantize param must be 2..256")
if palettesize not in [2, 4, 8, 16, 32, 64, 128, 256]:
palettesize = 2 ** int(np.log2(128) + 0.999)
logger.warning(
"Warning: palettesize (%r) modified to a factor of "
"two between 2-256." % palettesize
)
# Duratrion / fps
if duration is None:
self._duration = 1.0 / float(fps)
elif isinstance(duration, (list, tuple)):
self._duration = [float(d) for d in duration]
else:
self._duration = float(duration)
# loop
loop = float(loop)
if loop <= 0 or loop == float("inf"):
loop = 0
loop = int(loop)
# Subrectangles / dispose
subrectangles = bool(subrectangles)
self._dispose = 1 if subrectangles else 2
# The "0" (median cut) quantizer is by far the best
fp = self.request.get_file()
self._writer = GifWriter(
fp, subrectangles, loop, quantizer, int(palettesize)
)
def _close(self):
self._writer.close()
def _append_data(self, im, meta):
im = image_as_uint(im, bitdepth=8)
if im.ndim == 3 and im.shape[-1] == 1:
im = im[:, :, 0]
duration = self._duration
if isinstance(duration, list):
duration = duration[min(len(duration) - 1, self._writer._count)]
dispose = self._dispose
self._writer.add_image(im, duration, dispose)
return
intToBin = lambda i: i.to_bytes(2, byteorder="little")
class GifWriter:
""" Class that for helping write the animated GIF file. This is based on
code from images2gif.py (part of visvis). The version here is modified
to allow streamed writing.
"""
def __init__(
self,
file,
opt_subrectangle=True,
opt_loop=0,
opt_quantizer=0,
opt_palette_size=256,
):
self.fp = file
self.opt_subrectangle = opt_subrectangle
self.opt_loop = opt_loop
self.opt_quantizer = opt_quantizer
self.opt_palette_size = opt_palette_size
self._previous_image = None # as np array
self._global_palette = None # as bytes
self._count = 0
from PIL.GifImagePlugin import getdata
self.getdata = getdata
def add_image(self, im, duration, dispose):
# Prepare image
im_rect, rect = im, (0, 0)
if self.opt_subrectangle:
im_rect, rect = self.getSubRectangle(im)
im_pil = self.converToPIL(im_rect, self.opt_quantizer, self.opt_palette_size)
# Get pallette - apparently, this is the 3d element of the header
# (but it has not always been). Best we've got. Its not the same
# as im_pil.palette.tobytes().
from PIL.GifImagePlugin import getheader
palette = getheader(im_pil)[0][3]
# Write image
if self._count == 0:
self.write_header(im_pil, palette, self.opt_loop)
self._global_palette = palette
self.write_image(im_pil, palette, rect, duration, dispose)
# assert len(palette) == len(self._global_palette)
# Bookkeeping
self._previous_image = im
self._count += 1
def write_header(self, im, globalPalette, loop):
# Gather info
header = self.getheaderAnim(im)
appext = self.getAppExt(loop)
# Write
self.fp.write(header)
self.fp.write(globalPalette)
self.fp.write(appext)
def close(self):
self.fp.write(";".encode("utf-8")) # end gif
def write_image(self, im, palette, rect, duration, dispose):
fp = self.fp
# Gather local image header and data, using PIL's getdata. That
# function returns a list of bytes objects, but which parts are
# what has changed multiple times, so we put together the first
# parts until we have enough to form the image header.
data = self.getdata(im)
imdes = b""
while data and len(imdes) < 11:
imdes += data.pop(0)
assert len(imdes) == 11
# Make image descriptor suitable for using 256 local color palette
lid = self.getImageDescriptor(im, rect)
graphext = self.getGraphicsControlExt(duration, dispose)
# Write local header
if (palette != self._global_palette) or (dispose != 2):
# Use local color palette
fp.write(graphext)
fp.write(lid) # write suitable image descriptor
fp.write(palette) # write local color table
fp.write(b"\x08") # LZW minimum size code
else:
# Use global color palette
fp.write(graphext)
fp.write(imdes) # write suitable image descriptor
# Write image data
for d in data:
fp.write(d)
def getheaderAnim(self, im):
""" Get animation header. To replace PILs getheader()[0]
"""
bb = b"GIF89a"
bb += intToBin(im.size[0])
bb += intToBin(im.size[1])
bb += b"\x87\x00\x00"
return bb
def getImageDescriptor(self, im, xy=None):
""" Used for the local color table properties per image.
Otherwise global color table applies to all frames irrespective of
whether additional colors comes in play that require a redefined
palette. Still a maximum of 256 color per frame, obviously.
Written by Ant1 on 2010-08-22
Modified by Alex Robinson in Janurari 2011 to implement subrectangles.
"""
# Defaule use full image and place at upper left
if xy is None:
xy = (0, 0)
# Image separator,
bb = b"\x2C"
# Image position and size
bb += intToBin(xy[0]) # Left position
bb += intToBin(xy[1]) # Top position
bb += intToBin(im.size[0]) # image width
bb += intToBin(im.size[1]) # image height
# packed field: local color table flag1, interlace0, sorted table0,
# reserved00, lct size111=7=2^(7 + 1)=256.
bb += b"\x87"
# LZW minimum size code now comes later, begining of [imagedata] blocks
return bb
def getAppExt(self, loop):
""" Application extension. This part specifies the amount of loops.
If loop is 0 or inf, it goes on infinitely.
"""
if loop == 1:
return b""
if loop == 0:
loop = 2 ** 16 - 1
bb = b""
if loop != 0: # omit the extension if we would like a nonlooping gif
bb = b"\x21\xFF\x0B" # application extension
bb += b"NETSCAPE2.0"
bb += b"\x03\x01"
bb += intToBin(loop)
bb += b"\x00" # end
return bb
def getGraphicsControlExt(self, duration=0.1, dispose=2):
""" Graphics Control Extension. A sort of header at the start of
each image. Specifies duration and transparancy.
Dispose
-------
* 0 - No disposal specified.
* 1 - Do not dispose. The graphic is to be left in place.
* 2 - Restore to background color. The area used by the graphic
must be restored to the background color.
* 3 - Restore to previous. The decoder is required to restore the
area overwritten by the graphic with what was there prior to
rendering the graphic.
* 4-7 -To be defined.
"""
bb = b"\x21\xF9\x04"
bb += chr((dispose & 3) << 2).encode("utf-8")
# low bit 1 == transparency,
# 2nd bit 1 == user input , next 3 bits, the low two of which are used,
# are dispose.
bb += intToBin(int(duration * 100 + 0.5)) # in 100th of seconds
bb += b"\x00" # no transparant color
bb += b"\x00" # end
return bb
def getSubRectangle(self, im):
""" Calculate the minimal rectangle that need updating. Returns
a two-element tuple containing the cropped image and an x-y tuple.
Calculating the subrectangles takes extra time, obviously. However,
if the image sizes were reduced, the actual writing of the GIF
goes faster. In some cases applying this method produces a GIF faster.
"""
# Cannot do subrectangle for first image
if self._count == 0:
return im, (0, 0)
prev = self._previous_image
# Get difference, sum over colors
diff = np.abs(im - prev)
if diff.ndim == 3:
diff = diff.sum(2)
# Get begin and end for both dimensions
X = np.argwhere(diff.sum(0))
Y = np.argwhere(diff.sum(1))
# Get rect coordinates
if X.size and Y.size:
x0, x1 = int(X[0]), int(X[-1] + 1)
y0, y1 = int(Y[0]), int(Y[-1] + 1)
else: # No change ... make it minimal
x0, x1 = 0, 2
y0, y1 = 0, 2
return im[y0:y1, x0:x1], (x0, y0)
def converToPIL(self, im, quantizer, palette_size=256):
"""Convert image to Paletted PIL image.
PIL used to not do a very good job at quantization, but I guess
this has improved a lot (at least in Pillow). I don't think we need
neuqant (and we can add it later if we really want).
"""
im_pil = ndarray_to_pil(im, "gif")
if quantizer in ("nq", "neuquant"):
# NeuQuant algorithm
nq_samplefac = 10 # 10 seems good in general
im_pil = im_pil.convert("RGBA") # NQ assumes RGBA
nqInstance = NeuQuant(im_pil, nq_samplefac) # Learn colors
im_pil = nqInstance.quantize(im_pil, colors=palette_size)
elif quantizer in (0, 1, 2):
# Adaptive PIL algorithm
if quantizer == 2:
im_pil = im_pil.convert("RGBA")
else:
im_pil = im_pil.convert("RGB")
im_pil = im_pil.quantize(colors=palette_size, method=quantizer)
else:
raise ValueError("Invalid value for quantizer: %r" % quantizer)
return im_pil
| [
"mateuszwidomski@gmail.com"
] | mateuszwidomski@gmail.com |
7517ade199886b75515bbcbb06d3d8a2b2e6f48c | 5e04d2979dd28a78fdd9e17136d7ce85dc247576 | /B/mar10_fileio.py | 984a7efad6220bac645caa03f841774632616813 | [] | no_license | ptyork/ptyork-au-aist2120-20sp | a821c0fe8b52eafbb15205b2f4bdacdae415ccd9 | 1cb928c59b5efe8cde26185bf781293c599e9823 | refs/heads/master | 2020-12-14T00:28:24.766261 | 2020-08-01T20:42:05 | 2020-08-01T20:42:05 | 234,577,202 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 469 | py | import sys
print(sys.argv)
# exit()
#f = open('kennedy.txt')
#f = open('emails.txt')
if len(sys.argv) != 2:
print('ERROR: give me a file name, dang it!!')
exit()
filename = sys.argv[1] # [0] is always the name of the script...others are arguments
f = open(filename)
lines = f.readlines()
# print(lines)
# exit()
f.close()
linenum = 0
for line in lines:
linenum += 1
line = line.rstrip()
print(f"{linenum:3}: {line}")
#print(line, end='')
| [
"paul@yorkfamily.com"
] | paul@yorkfamily.com |
8bb1eb0ffeb0976e549400d0f3a5e787c1245934 | 2004cfde7f0cb70d10ae045e0bab12afa0d18b35 | /etc/print_ascii_value.py | 8159f82049d0b0a046891decd4d1ca54a6f7ae38 | [] | no_license | erpost/python-beginnings | a51951eb9a3bfd58bfcabd60e5968cbd7d29bc1d | 8ef94a0ac077a463ecafbd085f8b79d78284a42a | refs/heads/master | 2023-02-05T08:29:32.101001 | 2023-01-27T18:29:27 | 2023-01-27T18:29:27 | 120,106,285 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 122 | py | # Using Print 'Ordinal'
print(ord('A'))
print(ord('B'))
print(ord('C'))
print(ord('a'))
print(ord('b'))
print(ord('c'))
| [
"25180070+erpost@users.noreply.github.com"
] | 25180070+erpost@users.noreply.github.com |
4428d1bfb6506986315772492de1c8636cf30025 | a838d4bed14d5df5314000b41f8318c4ebe0974e | /sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_01/operations/__init__.py | b30d1928382064e02bd6a6a8d0e62c67b220a026 | [
"MIT",
"LicenseRef-scancode-generic-cla",
"LGPL-2.1-or-later"
] | permissive | scbedd/azure-sdk-for-python | ee7cbd6a8725ddd4a6edfde5f40a2a589808daea | cc8bdfceb23e5ae9f78323edc2a4e66e348bb17a | refs/heads/master | 2023-09-01T08:38:56.188954 | 2021-06-17T22:52:28 | 2021-06-17T22:52:28 | 159,568,218 | 2 | 0 | MIT | 2019-08-11T21:16:01 | 2018-11-28T21:34:49 | Python | UTF-8 | Python | false | false | 2,517 | py | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
from ._app_service_certificate_orders_operations import AppServiceCertificateOrdersOperations
from ._certificate_orders_diagnostics_operations import CertificateOrdersDiagnosticsOperations
from ._certificate_registration_provider_operations import CertificateRegistrationProviderOperations
from ._domains_operations import DomainsOperations
from ._top_level_domains_operations import TopLevelDomainsOperations
from ._domain_registration_provider_operations import DomainRegistrationProviderOperations
from ._app_service_environments_operations import AppServiceEnvironmentsOperations
from ._app_service_plans_operations import AppServicePlansOperations
from ._certificates_operations import CertificatesOperations
from ._deleted_web_apps_operations import DeletedWebAppsOperations
from ._diagnostics_operations import DiagnosticsOperations
from ._global_model_operations import GlobalOperations
from ._provider_operations import ProviderOperations
from ._recommendations_operations import RecommendationsOperations
from ._resource_health_metadata_operations import ResourceHealthMetadataOperations
from ._web_site_management_client_operations import WebSiteManagementClientOperationsMixin
from ._static_sites_operations import StaticSitesOperations
from ._web_apps_operations import WebAppsOperations
from ._kube_environments_operations import KubeEnvironmentsOperations
__all__ = [
'AppServiceCertificateOrdersOperations',
'CertificateOrdersDiagnosticsOperations',
'CertificateRegistrationProviderOperations',
'DomainsOperations',
'TopLevelDomainsOperations',
'DomainRegistrationProviderOperations',
'AppServiceEnvironmentsOperations',
'AppServicePlansOperations',
'CertificatesOperations',
'DeletedWebAppsOperations',
'DiagnosticsOperations',
'GlobalOperations',
'ProviderOperations',
'RecommendationsOperations',
'ResourceHealthMetadataOperations',
'WebSiteManagementClientOperationsMixin',
'StaticSitesOperations',
'WebAppsOperations',
'KubeEnvironmentsOperations',
]
| [
"noreply@github.com"
] | scbedd.noreply@github.com |
4b89aa25d517a40a3ecfeefcfed52951b89750b7 | 36feed24f91d0c9ab07b81208cbc195bdbac2d63 | /algorithms/047.Permutations_II/Permutations_II.py | dc5ba7b5b30b875d0797b2653075b1cdeda82cf6 | [] | no_license | borisnorm/leetcode-1 | da8ef87219d18c674f74721df1a8159bd856e1d7 | 6200c8704614e918c8bfa5357c648dd1b4f7eb74 | refs/heads/master | 2021-01-15T09:18:58.403345 | 2016-02-26T12:31:41 | 2016-02-26T12:31:41 | 63,475,809 | 1 | 0 | null | 2016-07-16T09:31:10 | 2016-07-16T09:31:07 | null | UTF-8 | Python | false | false | 739 | py | # Time: O(n!)
# Space: O(n)
class Solution:
# @param num, a list of integer
# @return a list of lists of integers
def permuteUnique(self, nums):
solutions = [[]]
for num in nums:
next = []
for solution in solutions:
for i in xrange(len(solution) + 1):
candidate = solution[:i] + [num] + solution[i:]
if candidate not in next:
next.append(candidate)
solutions = next
return solutions
if __name__ == "__main__":
print Solution().permuteUnique([1, 1, 2])
print Solution().permuteUnique([1, -1, 1, 2, -1, 2, 2, -1])
| [
"1012351692@qq.com"
] | 1012351692@qq.com |
4a9657ba76659ff9b7d54328426931dd9ba6a668 | 80c8d4e84f2ea188a375ff920a4adbd9edaed3a1 | /scikit-learn/getstart.py | a1ec7488efb339202a33afeaac8479175ed84d74 | [
"MIT"
] | permissive | Birkid/penter | 3a4b67801d366db15ca887c31f545c8cda2b0766 | 0200f40c9d01a84c758ddcb6a9c84871d6f628c0 | refs/heads/master | 2023-08-22T14:05:43.106499 | 2021-10-20T07:10:10 | 2021-10-20T07:10:10 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,818 | py | from sklearn import datasets #从sklearn包中加载数据集模块
from sklearn import svm
import pickle
#iris = datasets.load_iris() #加载鸢尾花数据集
from sklearn.model_selection import GridSearchCV,learning_curve
from sklearn.tree import DecisionTreeClassifier
digits = datasets.load_digits() #加载数字图像数据集 ,原始的样例是一张(8 x 8)的图片 digits.images[0]
"""
对于digits数据集,digits.data可以访问得到用来对数字进行分类的特征:
digits.target 就是数字数据集各样例对应的真实数字值。也就是我们的程序要学习的。
"""
# 算法,模型选择
clf = svm.SVC(gamma=0.001, C=100.)
#训练
clf.fit(digits.data[:-1], digits.target[:-1])
# partial_fit
# 这个方法的一般用在如果训练集数据量非常大,一次不能全部载入内存的时候。这时我们可以把训练集分成若干等分,重复调用partial_fit来一步步的学习训练集,非常方便。
#预测,我们可以让这个训练器预测没有作为训练数据使用的最后一张图像是什么数字。
print(clf.predict(digits.data[-1:]))
print(digits.target[-1])
# 模型持久化
s = pickle.dumps(clf)
clf2 = pickle.loads(s)
print(clf2.predict(digits.data[-1:]))
# https://joblib.readthedocs.io/en/latest/persistence.html
# from joblib import dump, load
# dump(clf, 'filename.joblib')
# clf3 = load('filename.joblib')
# print(clf3.predict(digits.data[-1:]))
# 练习
iris = datasets.load_iris()
clf_iris = svm.SVC()
clf_iris.fit(iris.data[:-1], iris.target[:-1])
print(clf_iris.predict(iris.data[-1:]))
print(iris.target[-1])
# 参数调优1:学习曲线(缺点:不能舍弃参数)
train_sizes, train_scores, test_scores = learning_curve(clf, iris.data,iris.target, cv=10, n_jobs=1, train_sizes=[0.1,0.325,0.55,0.775,1])
"""
1、estimator:用于预测的模型
2、X:预测的特征数据
3、y:预测结果
4、train_sizes:训练样本相对的或绝对的数字,这些量的样本将会生成learning curve,当其为[0.1, 0.325, 0.55, 0.775, 1. ]时代表使用10%训练集训练,32.5%训练集训练,55%训练集训练,77.5%训练集训练100%训练集训练时的分数。
5、cv:交叉验证生成器或可迭代的次数
6、scoring:调用的方法 https://scikit-learn.org/stable/modules/model_evaluation.html#scoring-parameter
# 学习曲线模块
from sklearn.model_selection import learning_curve
# 导入digits数据集
from sklearn.datasets import load_digits
# 支持向量机
from sklearn.svm import SVC
import matplotlib.pyplot as plt
import numpy as np
digits = load_digits()
X = digits.data
y = digits.target
# neg_mean_squared_error代表求均值平方差
train_sizes, train_loss, test_loss = learning_curve(
SVC(gamma=0.01), X, y, cv=10, scoring='neg_mean_squared_error',
train_sizes=np.linspace(.1, 1.0, 5))
# loss值为负数,需要取反
train_loss_mean = -np.mean(train_loss, axis=1)
test_loss_mean = -np.mean(test_loss, axis=1)
# 设置样式与label
plt.plot(train_sizes, train_loss_mean, 'o-', color="r",
label="Training")
plt.plot(train_sizes, test_loss_mean, 'o-', color="g",
label="Cross-validation")
plt.xlabel("Training examples")
plt.ylabel("Loss")
# 显示图例
plt.legend(loc="best")
plt.show()
"""
# 参数调优2:网格搜索(缺点:不能舍弃参数)
# parameters = {'splitter':('best','random')
# ,'criterion':("gini","entropy")
# ,"max_depth":[*range(1,10)]
# ,'min_samples_leaf':[*range(1,50,5)]
# ,'min_impurity_decrease':[*np.linspace(0,0.5,20)]
# }
#
# clf = DecisionTreeClassifier(random_state=25)
# GS = GridSearchCV(clf, parameters, cv=10)
# GS.fit(Xtrain,Ytrain)
#
# GS.best_params_
#
# GS.best_score_
# 交叉验证
# from sklearn.datasets import load_boston
# from sklearn.model_selection import cross_val_score
# from sklearn.tree import DecisionTreeRegressor
# boston = load_boston()
# regressor = DecisionTreeRegressor(random_state=0)
# cross_val_score(regressor, boston.data, boston.target, cv=10,
# scoring = "neg_mean_squared_error")
"""
Transform(): Method using these calculated parameters apply the transformation to a particular dataset.
解释:在Fit的基础上,进行标准化,降维,归一化等操作(看具体用的是哪个工具,如PCA,StandardScaler等)。
Fit_transform(): joins the fit() and transform() method for transformation of dataset.
解释:fit_transform是fit和transform的组合,既包括了训练又包含了转换。
transform()和fit_transform()二者的功能都是对数据进行某种统一处理(比如标准化~N(0,1),将数据缩放(映射)到某个固定区间,归一化,正则化等)
fit_transform(trainData)对部分数据先拟合fit,找到该part的整体指标,如均值、方差、最大值最小值等等(根据具体转换的目的),然后对该trainData进行转换transform,从而实现数据的标准化、归一化等等。
根据对之前部分trainData进行fit的整体指标,对剩余的数据(testData)使用同样的均值、方差、最大最小值等指标进行转换transform(testData),从而保证train、test处理方式相同。所以,一般都是这么用:
from sklearn.preprocessing import StandardScaler
sc = StandardScaler()
sc.fit_tranform(X_train)
sc.tranform(X_test)
1. 必须先用fit_transform(trainData),之后再transform(testData)
2. 如果直接transform(testData),程序会报错
3. 如果fit_transfrom(trainData)后,使用fit_transform(testData)而不transform(testData),虽然也能归一化,但是两个结果不是在同一个“标准”下的,具有明显差异。(一定要避免这种情况)
"""
# 数据预处理 https://zhuanlan.zhihu.com/p/38160930
| [
"350840291@qq.com"
] | 350840291@qq.com |
0c16543c22bf0a5523d861f24fc2de0d4fb253c8 | f038216be109882668ccd89b71efe0127d845bfb | /LeetCode/min_stack.py | 9dca4b9380e50d1dbf1198cffd736275f183daad | [] | no_license | kunalt4/ProblemSolvingDSandAlgo | 84b29a7eb2f73ea3b0450ed4b0707bc2d031c00d | 6a796dd1a778049418d47bc3b94b82c7a2680d26 | refs/heads/master | 2021-08-16T23:05:39.452968 | 2020-09-16T00:02:06 | 2020-09-16T00:02:06 | 221,677,287 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 729 | py | class MinStack:
def __init__(self):
"""
initialize your data structure here.
"""
self.queue = []
def push(self, x: int) -> None:
curMin = self.getMin()
if curMin == None or x < curMin:
curMin = x
self.queue.append((x,curMin))
def pop(self) -> None:
self.queue.pop()
def top(self) -> int:
if self.queue:
return self.queue[-1][0]
def getMin(self) -> int:
if self.queue:
return self.queue[-1][1]
return None
# Your MinStack object will be instantiated and called as such:
# obj = MinStack()
# obj.push(x)
# obj.pop()
# param_3 = obj.top()
# param_4 = obj.getMin()
| [
"noreply@github.com"
] | kunalt4.noreply@github.com |
ce6243ebd2da16359d4d0e2c1cf4296bce11b1eb | c049d678830eb37879589a866b39f8e72186a742 | /upcfcardsearch/c313.py | 99e6cce0e9eef77b67d3c2b5f3dec098d7f84f7a | [
"MIT"
] | permissive | ProfessorSean/Kasutamaiza | 682bec415397ba90e30ab1c31caa6b2e76f1df68 | 7a69a69258f67bbb88bebbac6da4e6e1434947e6 | refs/heads/main | 2023-07-28T06:54:44.797222 | 2021-09-08T22:22:44 | 2021-09-08T22:22:44 | 357,771,466 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,347 | py | import discord
from discord.ext import commands
from discord.utils import get
class c313(commands.Cog, name="c313"):
def __init__(self, bot: commands.Bot):
self.bot = bot
@commands.command(name='Sakeira_Angel_of_Radiance', aliases=['c313'])
async def example_embed(self, ctx):
embed = discord.Embed(title='Sakeira, Angel of Radiance')
embed.set_thumbnail(url='https://www.duelingbook.com/images/custom-pics/2300000/2361296.jpg')
embed.add_field(name='Status (Archetype)', value='Casual:3/Tournament:3', inline=True)
embed.add_field(name='Type (Attribute)', value='Fairy/Xyz/Effect (LIGHT)', inline=False)
embed.add_field(name='Rank (ATK/DEF)', value='0 (50/50)', inline=False)
embed.add_field(name='Monster Effect', value='3 monsters Special Summoned from the Extra Deck with the same Level/Rank/Link Rating\n(This card\'s original Rank is always treated as 1.)\nAt the start of the Damage Step, if this card battles a monster: Destroy that monster. Once per turn (Quick Effect): You can detach 1 material from this card, then target 1 face-up monster on the field; it gains 3000 ATK/DEF, but its effects are negated.', inline=False)
embed.set_footer(text='Set Code: ANCF')
await ctx.send(embed=embed)
def setup(bot: commands.Bot):
bot.add_cog(c313(bot)) | [
"professorsean3@gmail.com"
] | professorsean3@gmail.com |
97ee36d34266878ce39e0966a92bc7b4a28296ef | 6ea94d75b6e48952c1df2bda719a886f638ed479 | /build/catkin_generated/order_packages.py | 739b395ae277adbe22aa0c27c87e69448faf3ecb | [] | no_license | lievech/ork_ws | 634e26355503c69b76df7fca41402ea43c228f49 | e828846b962974a038be08a5ce39601b692d4045 | refs/heads/master | 2020-08-02T20:19:43.109158 | 2019-09-28T11:56:56 | 2019-09-28T11:56:56 | 211,493,180 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 487 | py | # generated from catkin/cmake/template/order_packages.context.py.in
source_root_dir = "/home/lhn/ork_ws/src"
whitelisted_packages = "".split(';') if "" != "" else []
blacklisted_packages = "".split(';') if "" != "" else []
underlay_workspaces = "/home/lhn/catkin_ws/devel;/home/lhn/dev/catkin_ws/install;/home/lhn/dev/catkin_ws/devel;/opt/ros/kinetic".split(';') if "/home/lhn/catkin_ws/devel;/home/lhn/dev/catkin_ws/install;/home/lhn/dev/catkin_ws/devel;/opt/ros/kinetic" != "" else []
| [
"2328187416@qq.com"
] | 2328187416@qq.com |
6be89daa6031f02d723df31d1d37085327e40bca | 7aec3f10b07403b542e1c14a30a6e00bb479c3fe | /Codewars/7 kyu/The highest profit wins!.py | 5e228294dea1a2500dbb9f73de763563d9840210 | [] | no_license | VictorMinsky/Algorithmic-Tasks | a5871749b377767176ba82308a6a0962e1b3e400 | 03a35b0541fe413eca68f7b5521eaa35d0e611eb | refs/heads/master | 2020-08-02T23:18:06.876712 | 2020-01-16T19:08:49 | 2020-01-16T19:08:49 | 211,541,179 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 777 | py | """
Story
Ben has a very simple idea to make some profit: he buys something and sells it again. Of course, this wouldn't give him any profit at all if he was simply to buy and sell it at the same price. Instead, he's going to buy it for the lowest possible price and sell it at the highest.
Task
Write a function that returns both the minimum and maximum number of the given list/array.
Examples
min_max([1,2,3,4,5]) == [1,5]
min_max([2334454,5]) == [5, 2334454]
min_max([1]) == [1, 1]
Remarks
All arrays or lists will always have at least one element, so you don't need to check the length. Also, your function will always get an array or a list, you don't have to check for null, undefined or similar.
"""
def min_max(lst):
return [min(lst), max(lst)]
| [
"panasyuk.vityu@gmail.com"
] | panasyuk.vityu@gmail.com |
d34712b924f654bbb796cbbac888511c65eded0f | 572ce2b8a9c687f302ea4953dd9bd978470d0c4b | /sqldocker/catalog/migrations/0001_initial.py | 5af04b2cede3bcf06af327b114a5f6c6cfa07f56 | [] | no_license | fainaszar/pythonPrograms | 5f539c8b80deb5d57e6aa984b0325389cf3b6f51 | 03f6c8b540981332e6f940308c7407a5038faac9 | refs/heads/master | 2021-09-07T18:10:43.603405 | 2018-02-27T05:27:37 | 2018-02-27T05:27:37 | 106,532,756 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,915 | py | # -*- coding: utf-8 -*-
# Generated by Django 1.11.7 on 2017-11-14 08:56
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
import uuid
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Author',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('first_name', models.CharField(max_length=100)),
('last_name', models.CharField(max_length=100)),
('date_of_birth', models.DateField(blank=True, null=True)),
('date_of_death', models.DateField(blank=True, null=True, verbose_name='Died')),
],
),
migrations.CreateModel(
name='Book',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('title', models.CharField(max_length=200)),
('summary', models.TextField(help_text='Enter a breif descripiton of the book', max_length=10000)),
('isbn', models.CharField(help_text='13 character <a href="https://www.isbn-international.org/content/what-isbn">ISBN number</a>', max_length=13, verbose_name='ISBN')),
('author', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='catalog.Author')),
],
),
migrations.CreateModel(
name='BookInstance',
fields=[
('id', models.UUIDField(default=uuid.uuid4, help_text='Unique ID for this paticular book accross whole library', primary_key=True, serialize=False)),
('imprint', models.CharField(max_length=200)),
('due_back', models.DateField(blank=True, null=True)),
('status', models.CharField(blank=True, choices=[('m', 'Maintenance'), ('o', 'On loan'), ('a', 'Available'), ('r', 'Reserved')], default='m', help_text='Book Availability', max_length=1)),
('book', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='catalog.Book')),
],
options={
'ordering': ['due_back'],
},
),
migrations.CreateModel(
name='Genre',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(help_text='Enter a book genre(eg Science Fiction, French Poetry etc)', max_length=200)),
],
),
migrations.AddField(
model_name='book',
name='genre',
field=models.ManyToManyField(help_text='Select a genre for this book', to='catalog.Genre'),
),
]
| [
"fainaszar@gmail.com"
] | fainaszar@gmail.com |
c3233b39c80491ea57b8c6b094790aa03eab60d6 | 539a4acbe915c354f1b9139d1ab39de1ba746ec6 | /toolsPrivate/apps.py | 9f04450446eb326ad557876e8807fb93afa07edf | [] | no_license | wildmanwang/proSrvTool | 7a6af1ec2a25aa14f666c6bd75e4181a5fefe43b | 97d3c64c3a855133827bffbadf3a870613428b6a | refs/heads/master | 2022-06-21T01:13:50.530231 | 2020-05-11T00:33:04 | 2020-05-11T00:33:04 | 258,078,792 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 99 | py | from django.apps import AppConfig
class ToolsprivateConfig(AppConfig):
name = 'toolsPrivate'
| [
"cliff.w@qq.com"
] | cliff.w@qq.com |
b66f6fc5300779c6da72a45041d8f78a306152a0 | f0d713996eb095bcdc701f3fab0a8110b8541cbb | /2nx4JCytABfczdYGt_16.py | 65994004d9fdac0a92d175f39874b8cfce3ba52e | [] | no_license | daniel-reich/turbo-robot | feda6c0523bb83ab8954b6d06302bfec5b16ebdf | a7a25c63097674c0a81675eed7e6b763785f1c41 | refs/heads/main | 2023-03-26T01:55:14.210264 | 2021-03-23T16:08:01 | 2021-03-23T16:08:01 | 350,773,815 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,207 | py | """
In this challenge, you must build a function that inflects an infinitive
regular Italian verb of the first conjugation form to the present tense,
including the personal subjective pronoun.
All first conjugation Italian verbs share the same suffix: **ARE**. The first
thing to do is separate the verb root from the suffix.
* Root of "programmare" ( _to code_ ) = "programm".
* Root of "giocare" ( _to play_ ) = "gioc".
For each subjective pronoun the root is combined with a new suffix: see table
below (pronouns are numbered for coding ease, in real grammar they are grouped
in singular and plural, both from first to third):
#| Pronoun| Suffix
---|---|---
1| Io ( _I_ )| o
2| Tu ( _You_ )| i
3| Egli ( _He_ )| a
4| Noi ( _We_ )| iamo
5| Voi ( _You_ )| ate
6| Essi ( _They_ )| ano
* Present tense of verb "parlare" ( _to speak_ ) for third pronoun:
* Pronoun ("Egli") + Root ("parl") + Suffix ("a") = "Egli parla".
* Present tense of verb "lavorare" ( _to work_ ) for fourth pronoun:
* Pronoun ("Noi") + Root ("lavor") + Suffix ("iamo") = "Noi lavoriamo".
There are two exceptions for present tense inflection:
* If root ends with " **c** " or " **g** " the second and fourth pronoun suffixes add a " **h** " at the start:
* "Attaccare" ( _to attack_ ) = "Tu attacchi" (instead of _"Tu attacci"_ )
* "Legare" ( _to tie_ ) = "Noi leghiamo" (instead of _"Noi legiamo"_ )
* If root ends with " **i** " the second and fourth pronoun suffixes lose the starting " **i** " (so that second pronoun suffix disappears):
* "Inviare" ( _to send_ ) = "Noi inviamo" (instead of _"Noi inviiamo"_ )
* "Tagliare" ( _to cut_ ) = "Tu tagli" (instead of _"Tu taglii"_ )
* "Mangiare" ( _to eat_ ) = "Noi mangiamo" (instead of _"Noi mangiiamo"_ )
* "Cacciare" ( _to hunt_ ) = "Tu cacci" (instead of _"Tu caccii"_ )
Given a string `verb` being the infinitive form of the first conjugation
Italian regular verb, and an integer `pronoun` being the subjective personal
pronoun, implement a function that returns the inflected form as a string.
### Examples
conjugate("programmare", 5) ➞ "Voi programmate"
conjugate("iniziare", 2) ➞ "Tu inizi"
conjugate("mancare", 4) ➞ "Noi manchiamo"
### Notes
* In the returned string, pronouns must be capitalized and verbs must be in lowercase, separated by a space between them.
* Curious fact: first conjugation (verbs ending in "are") is also called "the living conjugation", because every new verb that enters the Italian dictionary is assigned to this category as a new regular verb; it often happens for verbs "borrowed" from English and for informatical neologisms: _chattare_ , _twittare_ , _postare_ , _spammare_... will _edabittare_ be the next?
"""
def conjugate(verb, pronoun):
d = {1:['Io', 'o'],
2:['Tu', 'i'],
3:['Egli', 'a'],
4:['Noi', 'iamo'],
5:['Voi', 'ate'],
6:['Essi', 'ano']}
root = verb[:-3]
pro, suff = d[pronoun]
if root[-1] in ('c', 'g') and pronoun in (2, 4):
root = root + 'h'
if root[-1] == 'i' and pronoun in (2, 4):
suff = suff[1:]
return pro + ' ' + root + suff
| [
"daniel.reich@danielreichs-MacBook-Pro.local"
] | daniel.reich@danielreichs-MacBook-Pro.local |
b9c29aff989b8cc73cf841b5c389bf6883295914 | f4335e8e7d3010506f570167bbba18156d3a4674 | /stubs/django/conf/locale/ko/formats.pyi | 581d846279c7333b7f12804a4726ab9dc0515996 | [] | no_license | rtpg/typehangar | 133686ea45ad6187b768290aeebda9cbcae25586 | 790d057497c4791a38f9e3e009b07935b4a12f45 | refs/heads/master | 2021-01-19T04:49:17.940793 | 2017-01-16T13:54:14 | 2017-01-16T13:54:14 | 69,260,488 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 634 | pyi | # Stubs for django.conf.locale.ko.formats (Python 3.5)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
from typing import Any
DATE_FORMAT = ... # type: str
TIME_FORMAT = ... # type: str
DATETIME_FORMAT = ... # type: str
YEAR_MONTH_FORMAT = ... # type: str
MONTH_DAY_FORMAT = ... # type: str
SHORT_DATE_FORMAT = ... # type: str
SHORT_DATETIME_FORMAT = ... # type: str
DATE_INPUT_FORMATS = ... # type: Any
TIME_INPUT_FORMATS = ... # type: Any
DATETIME_INPUT_FORMATS = ... # type: Any
DECIMAL_SEPARATOR = ... # type: str
THOUSAND_SEPARATOR = ... # type: str
NUMBER_GROUPING = ... # type: int
| [
"raphael@rtpg.co"
] | raphael@rtpg.co |
b2cf969038c12fc06c64cc60d9d81294d425db03 | c68d238ac786a42c4dd47d4ab5820709aa4dcdb3 | /ExFin/users/migrations/0002_auto_20180326_0034.py | e344fcc2077b49f263dd413e0ee55312c480dc74 | [] | no_license | tenebranum/ExFin | b78d2a9651d5b9e8fb0fae3adccc48f7897221d2 | 7ac7b7a0be00537a6a600721009f4a28eb90c3ab | refs/heads/master | 2022-12-14T21:17:02.334600 | 2022-09-21T10:33:27 | 2022-09-21T10:33:27 | 139,338,729 | 0 | 0 | null | 2022-12-08T00:59:15 | 2018-07-01T15:07:52 | Python | UTF-8 | Python | false | false | 456 | py | # Generated by Django 2.0.2 on 2018-03-25 21:34
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('users', '0001_initial'),
]
operations = [
migrations.AlterModelOptions(
name='profile',
options={'verbose_name': 'Дополнительная информация', 'verbose_name_plural': 'Дополнительная информация'},
),
]
| [
"vetal969696@gmail.com"
] | vetal969696@gmail.com |
1861d39623e7386994c000de1bf394dddee1eeed | 2745f49a3205c0ae14346cb1d4115f0e50a9b52e | /app/users/adapters.py | c7ce2735de6da811ca245051e27d1667cb0100d1 | [] | no_license | caleffa/lomanegra-cursos-ministerio | 0430777f7f23e422c0a3aa48ad41c71b20c18bec | c92cf6d70c2cf9c2a7cfd39e88f852e222d21528 | refs/heads/master | 2023-07-03T06:04:40.293469 | 2021-08-09T23:55:14 | 2021-08-09T23:55:14 | 394,474,306 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,851 | py | from typing import Any
from allauth.account.adapter import DefaultAccountAdapter, get_current_site
from allauth.socialaccount.adapter import DefaultSocialAccountAdapter
from django.conf import settings
from django.http import HttpRequest
from django.shortcuts import resolve_url
from encuestas.models import Encuesta
class AccountAdapter(DefaultAccountAdapter):
def is_open_for_signup(self, request: HttpRequest):
return getattr(settings, "ACCOUNT_ALLOW_REGISTRATION", True)
def send_confirmation_mail(self, request, emailconfirmation, signup):
# Es una copia del original pero agrego el request al contexto del template
current_site = get_current_site(request)
activate_url = self.get_email_confirmation_url(
request,
emailconfirmation)
ctx = {
"user": emailconfirmation.email_address.user,
"activate_url": activate_url,
"current_site": current_site,
"key": emailconfirmation.key,
"request": request,
}
if signup:
email_template = 'account/email/email_confirmation_signup'
else:
email_template = 'account/email/email_confirmation'
self.send_mail(email_template,
emailconfirmation.email_address.email,
ctx)
def get_login_redirect_url(self, request):
encuestas_pendientes = Encuesta.objects.snoozed(request.user)
if encuestas_pendientes:
return resolve_url('encuestas:encuesta', encuesta=encuestas_pendientes.first().pk)
return super().get_login_redirect_url(request)
class SocialAccountAdapter(DefaultSocialAccountAdapter):
def is_open_for_signup(self, request: HttpRequest, sociallogin: Any):
return getattr(settings, "ACCOUNT_ALLOW_REGISTRATION", True)
| [
"lcaleffa@americavirtualsa.com"
] | lcaleffa@americavirtualsa.com |
bdd2d5e5b6e0af6e8bdedaddca15e291e15aa69b | e1dd6d9dccb822d472b7f4f9e8446dd9202eb5a1 | /sdk/test/test_scheduling_v1beta1_api.py | df9ee2f3b9b235097a92ca1fddfda040c1a0286e | [] | no_license | swiftdiaries/argo_client | 8af73e8df6a28f9ea5f938b5894ab8b7825e4cc2 | b93758a22d890cb33cbd81934042cfc3c12169c7 | refs/heads/master | 2020-05-17T12:11:57.556216 | 2019-07-24T23:23:33 | 2019-07-24T23:23:33 | 183,701,327 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,251 | py | # coding: utf-8
"""
Argo API Client
Generated python client for the Argo Workflows # noqa: E501
OpenAPI spec version: v1.14.0
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
import unittest
import argo.sdk
from api.scheduling_v1beta1_api import SchedulingV1beta1Api # noqa: E501
from argo.sdk.rest import ApiException
class TestSchedulingV1beta1Api(unittest.TestCase):
"""SchedulingV1beta1Api unit test stubs"""
def setUp(self):
self.api = api.scheduling_v1beta1_api.SchedulingV1beta1Api() # noqa: E501
def tearDown(self):
pass
def test_create_scheduling_v1beta1_priority_class(self):
"""Test case for create_scheduling_v1beta1_priority_class
"""
pass
def test_delete_scheduling_v1beta1_collection_priority_class(self):
"""Test case for delete_scheduling_v1beta1_collection_priority_class
"""
pass
def test_delete_scheduling_v1beta1_priority_class(self):
"""Test case for delete_scheduling_v1beta1_priority_class
"""
pass
def test_get_scheduling_v1beta1_api_resources(self):
"""Test case for get_scheduling_v1beta1_api_resources
"""
pass
def test_list_scheduling_v1beta1_priority_class(self):
"""Test case for list_scheduling_v1beta1_priority_class
"""
pass
def test_patch_scheduling_v1beta1_priority_class(self):
"""Test case for patch_scheduling_v1beta1_priority_class
"""
pass
def test_read_scheduling_v1beta1_priority_class(self):
"""Test case for read_scheduling_v1beta1_priority_class
"""
pass
def test_replace_scheduling_v1beta1_priority_class(self):
"""Test case for replace_scheduling_v1beta1_priority_class
"""
pass
def test_watch_scheduling_v1beta1_priority_class(self):
"""Test case for watch_scheduling_v1beta1_priority_class
"""
pass
def test_watch_scheduling_v1beta1_priority_class_list(self):
"""Test case for watch_scheduling_v1beta1_priority_class_list
"""
pass
if __name__ == '__main__':
unittest.main()
| [
"adhita94@gmail.com"
] | adhita94@gmail.com |
96c58983dafffd2d7bc3624ce48be044ac52e6a6 | ad715f9713dc5c6c570a5ac51a18b11932edf548 | /tensorflow/python/tpu/tests/tpu_embedding_v1_correctness_test.py | 13ee105e7e4e03c11d03d4c2a342e7a7cc7ace0b | [
"LicenseRef-scancode-generic-cla",
"Apache-2.0",
"BSD-2-Clause"
] | permissive | rockzhuang/tensorflow | f1f31bc8edfa402b748c500efb97473c001bac95 | cb40c060b36c6a75edfefbc4e5fc7ee720273e13 | refs/heads/master | 2022-11-08T20:41:36.735747 | 2022-10-21T01:45:52 | 2022-10-21T01:45:52 | 161,580,587 | 27 | 11 | Apache-2.0 | 2019-01-23T11:00:44 | 2018-12-13T03:47:28 | C++ | UTF-8 | Python | false | false | 13,791 | py | # Copyright 2022 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ==============================================================================
"""Tests for TPU Embeddings mid level API on TPU."""
import itertools
from absl.testing import parameterized
import numpy as np
from tensorflow.python.compat import v2_compat
from tensorflow.python.distribute import distribute_lib
from tensorflow.python.eager import backprop
from tensorflow.python.eager import def_function
from tensorflow.python.keras import optimizer_v2
from tensorflow.python.platform import test
from tensorflow.python.tpu import tpu_embedding_v1
from tensorflow.python.tpu import tpu_embedding_v2_utils
from tensorflow.python.tpu.tests import tpu_embedding_base_test
_SLOT_NAME_MAPPING = {
# Slot names in Keras optimizer v2 are different compared to the slot names
# in our API.
optimizer_v2.adagrad.Adagrad: {
'accumulators': 'accumulator'
},
optimizer_v2.adam.Adam: {
'momenta': 'm',
'velocities': 'v'
},
optimizer_v2.ftrl.Ftrl: {
'accumulators': 'accumulator',
'linears': 'linear'
},
}
class TPUEmbeddingV0CorrectnessTest(tpu_embedding_base_test.TPUEmbeddingBaseTest
):
def _get_strategy(self):
if hasattr(self, 'strategy'):
return self.strategy
return super(TPUEmbeddingV0CorrectnessTest, self)._get_strategy()
def _create_mid_level(self, optimizer=None):
# Create `TPUEmbedding` object.
if optimizer is None:
optimizer = tpu_embedding_v2_utils.SGD(learning_rate=0.1)
return tpu_embedding_v1.TPUEmbeddingV0(
feature_config=self.feature_config, optimizer=optimizer)
def _get_slot_variable_creation_fn(self, optimizer):
# This is needed so that the mid level API can create slots using a user
# passed optimizer rather than the built-in methods. This allows a user to
# train the same model on CPU and TPU.
def slot_variable_creation_fn(table, slot_names, slot_initializers):
slots = {}
for slot, initializer in zip(slot_names, slot_initializers):
slots[slot] = optimizer.add_slot(
table, _SLOT_NAME_MAPPING[type(optimizer)][slot], initializer)
return slots
return slot_variable_creation_fn
def _create_strategy_and_mid_level(self, optimizer_name):
strategy = self._get_strategy()
# Keras optimizers has to be translated to embedding optimizer with slot
# variable creation fn properly populated.
with strategy.scope():
if optimizer_name == 'sgd':
optimizer = optimizer_v2.gradient_descent.SGD(learning_rate=0.1)
embedding_optimizer = tpu_embedding_v2_utils.SGD(learning_rate=0.1)
elif optimizer_name == 'adagrad':
optimizer = optimizer_v2.adagrad.Adagrad(learning_rate=0.1)
embedding_optimizer = tpu_embedding_v2_utils.Adagrad(
learning_rate=0.1,
slot_variable_creation_fn=self._get_slot_variable_creation_fn(
optimizer))
elif optimizer_name == 'adam':
optimizer = optimizer_v2.adam.Adam(learning_rate=0.1)
embedding_optimizer = tpu_embedding_v2_utils.Adam(
learning_rate=0.1,
slot_variable_creation_fn=self._get_slot_variable_creation_fn(
optimizer))
elif optimizer_name == 'ftrl':
optimizer = optimizer_v2.ftrl.Ftrl(learning_rate=0.1)
embedding_optimizer = tpu_embedding_v2_utils.FTRL(
learning_rate=0.1,
slot_variable_creation_fn=self._get_slot_variable_creation_fn(
optimizer))
else:
raise ValueError('optimizer is not recognized: ', optimizer_name)
mid_level_api = self._create_mid_level(optimizer=embedding_optimizer)
return strategy, mid_level_api, optimizer
@parameterized.parameters(
*itertools.product(['sgd', 'adagrad', 'adam', 'ftrl'], [True, False],
[True, False], [True, False]))
def test_embedding(self, optimizer_name, training, sparse,
is_high_dimensional):
strategy, mid_level_api, optimizer = (
self._create_strategy_and_mid_level(optimizer_name))
if sparse:
if is_high_dimensional:
dataset = self._create_high_dimensional_sparse_dataset(strategy)
else:
dataset = self._create_sparse_dataset(strategy)
else:
if is_high_dimensional:
dataset = self._create_high_dimensional_sparse_dataset(strategy)
else:
dataset = self._create_ragged_dataset(strategy)
dist = strategy.experimental_distribute_dataset(
dataset,
options=distribute_lib.InputOptions(experimental_fetch_to_device=False))
dist_iter = iter(dist)
@def_function.function
def test_fn():
"""Create and run computation that returns the embedding activations."""
def step(data):
if not training:
activations = mid_level_api(data)
total_loss = self._get_total_loss_tensor(activations)
ret_val = [total_loss] + list(activations)
return ret_val
else:
with backprop.GradientTape() as tape:
tape.watch(mid_level_api.embedding_tables.values())
activations = mid_level_api(data)
total_loss = self._get_total_loss_tensor(activations)
loss_per_replica = total_loss / strategy.num_replicas_in_sync
gradients = tape.gradient(loss_per_replica,
mid_level_api.embedding_tables.values())
optimizer.apply_gradients(
list(zip(gradients, mid_level_api.embedding_tables.values())))
ret_val = [total_loss] + list(activations)
return ret_val
return strategy.run(step, args=(next(dist_iter),))
# Run model.
shard_out_val = test_fn()
# Compute sparse tensors for global batch.
if is_high_dimensional:
input_data = next(
iter(self._create_high_dimensional_sparse_dataset(strategy)))
else:
input_data = next(iter(self._create_sparse_dataset(strategy)))
# Check results.
self._check_results(strategy, shard_out_val, training, input_data,
mid_level_api._variables, optimizer,
is_high_dimensional)
def _check_embedding_and_slot_variables(self, embedding_table_user_before,
gradients_wrt_user,
embedding_table_video_before,
gradients_wrt_video, optimizer,
table_to_variable):
if isinstance(optimizer, optimizer_v2.gradient_descent.SGD):
check_fn = self._check_embedding_and_slot_variables_for_sgd
elif isinstance(optimizer, optimizer_v2.adagrad.Adagrad):
check_fn = self._check_embedding_and_slot_variables_for_adagrad
elif isinstance(optimizer, optimizer_v2.adam.Adam):
check_fn = self._check_embedding_and_slot_variables_for_adam
elif isinstance(optimizer, optimizer_v2.ftrl.Ftrl):
check_fn = self._check_embedding_and_slot_variables_for_ftrl
else:
raise ValueError('optimizer is not recognized: ', type(optimizer))
check_fn(embedding_table_user_before, gradients_wrt_user, optimizer,
table_to_variable[self.table_user.name])
check_fn(embedding_table_video_before, gradients_wrt_video, optimizer,
table_to_variable[self.table_video.name])
def _check_embedding_and_slot_variables_for_sgd(self, embedding_table_before,
gradients, optimizer,
variables):
embedding_table = np.copy(embedding_table_before)
config = optimizer.get_config()
embedding_table -= config['learning_rate'] * np.sum(gradients, axis=0)
self.assertAllClose(
self._get_variable(variables['parameters']).numpy(), embedding_table)
def _check_embedding_and_slot_variables_for_adagrad(self,
embedding_table_before,
gradients, optimizer,
variables):
embedding_table = np.copy(embedding_table_before)
config = optimizer.get_config()
accumulator = (
config['initial_accumulator_value'] + np.sum(gradients, axis=0)**2)
embedding_table -= (
config['learning_rate'] * np.sum(gradients, axis=0) /
np.sqrt(accumulator))
self.assertAllClose(
self._get_variable(variables['parameters']).numpy(), embedding_table)
self.assertAllClose(
self._get_variable(variables['accumulators']).numpy(), accumulator)
def _check_embedding_and_slot_variables_for_adam(self, embedding_table_before,
gradients, optimizer,
variables):
embedding_table = np.copy(embedding_table_before)
config = optimizer.get_config()
g = np.sum(gradients, axis=0)
v = g**2 * (1 - config['beta_2'])
m = g * (1 - config['beta_1'])
epsilon = config['epsilon']
lr_modifier = np.sqrt(1 - config['beta_2']) / (1 - config['beta_1'])
embedding_table -= (
m * config['learning_rate'] * lr_modifier / (np.sqrt(v) + epsilon))
self.assertAllClose(
self._get_variable(variables['parameters']).numpy(),
embedding_table,
rtol=1e-3)
self.assertAllClose(
self._get_variable(variables['momenta']).numpy(), m, rtol=1e-4)
self.assertAllClose(
self._get_variable(variables['velocities']).numpy(), v, rtol=1e-4)
def _check_embedding_and_slot_variables_for_ftrl(self, embedding_table_before,
gradients, optimizer,
variables):
embedding_table = np.copy(embedding_table_before)
config = optimizer.get_config()
neg_lr_p = -config['learning_rate_power']
accumulator = (
config['initial_accumulator_value'] + np.sum(gradients, axis=0)**2)
sigma = (accumulator**neg_lr_p - config['initial_accumulator_value']**
neg_lr_p) / config['learning_rate']
linear = np.sum(gradients, axis=0) - sigma * embedding_table
quadratic = accumulator**neg_lr_p / config['learning_rate']
embedding_table = -linear / quadratic
actual_parameters = self._get_variable(variables['parameters']).numpy()
# For entries where `linear` == 0, it is not worth comparing since the
# initial values have not been touched yet and they will not agree with what
# the actual values should be.
actual_parameters *= (linear != 0.0)
# FTRL has a bit more precision diff on parameters.
self.assertAllClose(actual_parameters, embedding_table, rtol=5e-5)
self.assertAllClose(
self._get_variable(variables['linears']).numpy(), linear, rtol=5e-4)
self.assertAllClose(
self._get_variable(variables['accumulators']).numpy(), accumulator)
@parameterized.parameters(True, False)
def test_enqueue_with_weights(self, ragged):
strategy, mid_level_api, _ = self._create_strategy_and_mid_level('sgd')
weight = 0.5
if ragged:
dataset = self._create_ragged_dataset(
strategy, include_weights=True, weight=weight)
else:
dataset = self._create_sparse_dataset(
strategy, include_weights=True, weight=weight)
dataset_iter = iter(
strategy.experimental_distribute_dataset(
dataset,
options=distribute_lib.InputOptions(
experimental_fetch_to_device=False)))
@def_function.function
def embedding_lookup(features, weights):
def step(features, weights):
return mid_level_api(features, weights)
return strategy.run(step, args=(features, weights))
features, weights = next(dataset_iter)
# Replace the weight for the second feature by None to test.
weights = (weights[0], None, weights[2])
no_weights_activations = embedding_lookup(features, weights=None)
weights_activations = embedding_lookup(features, weights=weights)
no_weights0 = (self._unpack(strategy, no_weights_activations[0]),
self._unpack(strategy, no_weights_activations[1]),
self._unpack(strategy, no_weights_activations[2]))
weights0 = (self._unpack(strategy, weights_activations[0]),
self._unpack(strategy, weights_activations[1]),
self._unpack(strategy, weights_activations[2]))
# videos table has sum combiner and users table has mean combiner.
# i.e. users table lookups isn't affected by the weights as all the weights
# are the same.
# Tuple entry 0 and 1 are the watched and favorited features from the videos
# table and entry 2 is the friends feature from the users table.
# Note that None was passed as a weight for entry 1 so weight should have no
# effect.
weight = (0.5, 1.0, 1.0)
golden = tuple([no_weight * w for no_weight, w in zip(no_weights0, weight)])
self.assertAllClose(golden, weights0)
if __name__ == '__main__':
v2_compat.enable_v2_behavior()
test.main()
| [
"gardener@tensorflow.org"
] | gardener@tensorflow.org |
451ec70484000fda302a338852acf332709ecca6 | 1bad7d2b7fc920ecf2789755ed7f44b039d4134d | /ABC/138/D-1.py | 2543595f30ef39026a28d3c80847bb010a317fa7 | [] | no_license | kanekyo1234/AtCoder_solve | ce95caafd31f7c953c0fc699f0f4897dddd7a159 | e5ea7b080b72a2a2fd3fcb826cd10c4ab2e2720e | refs/heads/master | 2023-04-01T04:01:15.885945 | 2021-04-06T04:03:31 | 2021-04-06T04:03:31 | 266,151,065 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 826 | py | from collections import deque
n, q = map(int, input().split())
ab = [list(map(int, input().split())) for i in range(n-1)]
px = [list(map(int, input().split())) for i in range(q)]
ans = [0]*n
adlist = [[] for i in range(n)]
for i in range(q):
ans[px[i][0]-1] += px[i][1]
for i in range(n-1):
x, y = ab[i]
adlist[x-1].append(y)
adlist[y-1].append(x)
# print(adlist)
print(ans)
deq = deque() # まだ見ていない場所をメモするところ
deq.append(1) # 1を見るっていうメモを残す
finish = set()
while deq:
print(deq)
now = deq.popleft() # 見てる場所
finish.add(now)
for i in range(len(adlist[now-1])):
line = adlist[now-1][i]
# print(line)
if line not in finish:
deq.append(line)
ans[line-1] += ans[now-1]
print(*ans)
| [
"kanekyohunter.0314@softbank.ne.jp"
] | kanekyohunter.0314@softbank.ne.jp |
892c213e53ab6f5e683ffc239c9749f4aedcd193 | e6d08b66d50a93137126f24f8a5bc7118fa32375 | /TM1py/Services/ChoreService.py | b3c461073283ef42f817a4957fb9a773aedd3a8a | [
"MIT"
] | permissive | BigFriendly/tm1py | bfb000f8299c335beca494859ed0ec0d2f54ade1 | 03210d672cc3797025b8de80c42037e1e11f369f | refs/heads/master | 2021-02-26T12:38:03.081027 | 2020-02-05T00:52:35 | 2020-02-05T21:26:53 | 245,526,018 | 0 | 0 | MIT | 2020-03-06T22:13:07 | 2020-03-06T22:13:06 | null | UTF-8 | Python | false | false | 7,472 | py | # -*- coding: utf-8 -*-
import functools
import json
from TM1py.Objects import Chore, ChoreTask
from TM1py.Services.ObjectService import ObjectService
def deactivate_activate(func):
""" Higher Order function to handle activation and deactivation of chores before updating them
:param func:
:return:
"""
@functools.wraps(func)
def wrapper(self, chore):
# Get Chore
chore_old = self.get(chore.name)
# Deactivate
if chore_old.active:
self.deactivate(chore.name)
# Do stuff
try:
response = func(self, chore)
except Exception as e:
raise e
# Activate if necessary
finally:
if chore.active:
self.activate(chore.name)
return response
return wrapper
class ChoreService(ObjectService):
""" Service to handle Object Updates for TM1 Chores
"""
def __init__(self, rest):
super().__init__(rest)
def get(self, chore_name):
""" Get a chore from the TM1 Server
:param chore_name:
:return: instance of TM1py.Chore
"""
request = "/api/v1/Chores('{}')?$expand=Tasks($expand=*,Process($select=Name),Chore($select=Name))" \
.format(chore_name)
response = self._rest.GET(request)
return Chore.from_dict(response.json())
def get_all(self):
""" get a List of all Chores
:return: List of TM1py.Chore
"""
request = "/api/v1/Chores?$expand=Tasks($expand=*,Process($select=Name),Chore($select=Name))"
response = self._rest.GET(request)
return [Chore.from_dict(chore_as_dict) for chore_as_dict in response.json()['value']]
def get_all_names(self):
""" get a List of all Chores
:return: List of TM1py.Chore
"""
request = "/api/v1/Chores?$select=Name"
response = self._rest.GET(request)
return [chore['Name'] for chore in response.json()['value']]
def create(self, chore):
""" create chore in TM1
:param chore: instance of TM1py.Chore
:return:
"""
request = "/api/v1/Chores"
response = self._rest.POST(request, chore.body)
if chore.active:
self.activate(chore.name)
return response
def delete(self, chore_name):
""" delete chore in TM1
:param chore_name:
:return: response
"""
request = "/api/v1/Chores('{}')".format(chore_name)
response = self._rest.DELETE(request)
return response
def exists(self, chore_name):
""" Check if Chore exists
:param chore_name:
:return:
"""
request = "/api/v1/Chores('{}')".format(chore_name)
return self._exists(request)
@deactivate_activate
def update(self, chore):
""" update chore on TM1 Server
does not update: DST Sensitivity!
:param chore:
:return: response
"""
# Update StartTime, ExecutionMode, Frequency
request = "/api/v1/Chores('{}')".format(chore.name)
# Remove Tasks from Body. Tasks to be managed individually
chore_dict_without_tasks = chore.body_as_dict
chore_dict_without_tasks.pop("Tasks")
self._rest.PATCH(request, json.dumps(chore_dict_without_tasks))
# Update Tasks individually
task_old_count = self._get_tasks_count(chore.name)
for i, task_new in enumerate(chore.tasks):
if i >= task_old_count:
self._add_task(chore.name, task_new)
else:
task_old = self._get_task(chore.name, i)
if task_new != task_old:
self._update_task(chore.name, task_new)
for j in range(i + 1, task_old_count):
self._delete_task(chore.name, i + 1)
def activate(self, chore_name):
""" activate chore on TM1 Server
:param chore_name:
:return: response
"""
request = "/api/v1/Chores('{}')/tm1.Activate".format(chore_name)
return self._rest.POST(request, '')
def deactivate(self, chore_name):
""" deactivate chore on TM1 Server
:param chore_name:
:return: response
"""
request = "/api/v1/Chores('{}')/tm1.Deactivate".format(chore_name)
return self._rest.POST(request, '')
def set_local_start_time(self, chore_name, date_time):
""" Makes Server crash if chore is activate (10.2.2 FP6) :)
:param chore_name:
:param date_time:
:return:
"""
request = "/api/v1/Chores('{}')/tm1.SetServerLocalStartTime".format(chore_name)
# function for 3 to '03'
fill = lambda t: str(t).zfill(2)
data = {
"StartDate": "{}-{}-{}".format(date_time.year, date_time.month, date_time.day),
"StartTime": "{}:{}:{}".format(fill(date_time.hour), fill(date_time.minute), fill(date_time.second))
}
return self._rest.POST(request, json.dumps(data))
def execute_chore(self, chore_name):
""" Ask TM1 Server to execute a chore
:param chore_name: String, name of the chore to be executed
:return: the response
"""
return self._rest.POST("/api/v1/Chores('" + chore_name + "')/tm1.Execute", '')
def _get_tasks_count(self, chore_name):
""" Query Chore tasks count on TM1 Server
:param chore_name: name of Chore to count tasks
:return: int
"""
request = "/api/v1/Chores('{}')/Tasks/$count".format(chore_name)
response = self._rest.GET(request)
return int(response.text)
def _get_task(self, chore_name, step):
""" Get task from chore
:param chore_name: name of the chore
:param step: integer
:return: instance of TM1py.ChoreTask
"""
request = "/api/v1/Chores('{}')/Tasks({})?$expand=*,Process($select=Name),Chore($select=Name)" \
.format(chore_name, step)
response = self._rest.GET(request)
return ChoreTask.from_dict(response.json())
def _delete_task(self, chore_name, step):
""" Delete task from chore
:param chore_name: name of the chore
:param step: integer
:return: response
"""
request = "/api/v1/Chores('{}')/Tasks({})".format(chore_name, step)
response = self._rest.DELETE(request)
return response
def _add_task(self, chore_name, chore_task):
""" Create Chore task on TM1 Server
:param chore_name: name of Chore to update
:param chore_task: instance of TM1py.ChoreTask
:return: response
"""
chore = self.get(chore_name)
if chore.active:
self.deactivate(chore_name)
try:
request = "/api/v1/Chores('{}')/Tasks".format(chore_name)
response = self._rest.POST(request, chore_task.body)
except Exception as e:
raise e
finally:
if chore.active:
self.activate(chore_name)
return response
def _update_task(self, chore_name, chore_task):
""" update a chore task
:param chore_name: name of the Chore
:param chore_task: instance TM1py.ChoreTask
:return: response
"""
request = "/api/v1/Chores('{}')/Tasks({})".format(chore_name, chore_task.step)
return self._rest.PATCH(request, chore_task.body)
| [
"MariusWirtz2@gmail.com"
] | MariusWirtz2@gmail.com |
bfe22330785926fc4d2c6cf528c9842dbfcbed22 | d21071464bef4f3fd51e554f280418d06975a77e | /leetcode/43. Multiply Strings.py | 747f0a44adaf0dd54d658f7622d6a2399503bed4 | [] | no_license | DeshErBojhaa/sports_programming | ec106dcc24e96231d447cdcac494d76a94868b2d | 96e086d4ee6169c0f83fff3819f38f32b8f17c98 | refs/heads/master | 2021-06-13T19:43:40.782021 | 2021-03-27T14:21:49 | 2021-03-27T14:21:49 | 164,201,394 | 1 | 0 | null | 2019-08-27T22:21:26 | 2019-01-05T09:39:41 | C++ | UTF-8 | Python | false | false | 1,373 | py | # 43. Multiply Strings
class Solution:
def multiply(self, num1: str, num2: str) -> str:
if num1 == '0' or num2 == '0':
return '0'
def str_sum(a, b):
if len(a) < len(b):
a, b = b, a
ans, carry = [], 0
b = '0' * (len(a) - len(b)) + b
for x, y in zip(reversed(a), reversed(b)):
add = int(x) + int(y) + carry
ans.append(add % 10)
carry = int(add > 9)
if carry:
ans.append(1)
return ''.join(reversed([str(x) for x in ans]))
if len(num1) < len(num2):
num1, num2 = num2, num1
num1, num2 = num1[::-1], num2[::-1]
ans = '0'
carry = 0
for i in range(len(num2)):
x = int(num2[i])
carry, tmp_ans = 0, []
for j in range(len(num1)):
sm = x * int(num1[j]) + carry
tmp_ans.append(sm%10)
carry = sm // 10
if carry:
tmp_ans.append(carry)
tmp_ans = tmp_ans[::-1]
for j in range(i):
tmp_ans.append(0)
ans = str_sum(ans, ''.join(map(str,tmp_ans)))
return ans
| [
"noreply@github.com"
] | DeshErBojhaa.noreply@github.com |
e855c443e9701c74c9c931a05f911ad23be542d4 | 182d36353a6e33dc1f27f2dc7c0ae95577941dca | /python大数据分析基础及实战/pandas_data_clean.py | 319213a7a6809af5f975e40bdc4f0d7f12be8953 | [] | no_license | tp-yan/PythonScript | d0da587162b1f621ed6852be758705690a6c9dce | 497c933217019046aca0d4258b174a13965348a7 | refs/heads/master | 2020-09-02T02:49:20.305732 | 2019-12-01T06:54:19 | 2019-12-01T06:54:19 | 219,115,755 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,629 | py | # -*- coding: utf-8 -*-
"""
Created on Fri Jun 7 13:27:15 2019
pandas数据处理: 1.数据清洗
处理缺失数据以及清除无意义的信息,如删除无关数据、重复数据,平滑噪声数据,处理缺失、异常值等
@author: tangpeng
"""
from pandas import Series,DataFrame, read_excel
data_source_path = r'C:\Users\tangpeng\Documents\my_data_source\big_data_source'
print("================数据清洗================")
# (1)处理重复数据
df = DataFrame({
'age':Series([26,34,27,34,88,21,27]),
'name':Series(['Tom','Lee','Jon','Lee','James','Curry','Curry'])
})
print(df,'\n')
print(df.duplicated()) # 默认检查所有列(即所有列的值都相同才算是重复行),将后面重复的行标记为True(即第一次出现的行不计为重复行),返回Series
print('\n')
# subset:只检查部分列的重复值
print(df.duplicated(subset='name')) # 只检查name这列,只要这列的值相同就被视为重复行,不管其他列的值
# keep=False:所有重复行都标记为True,包括第一行。keep='first'(默认)/'last':除了第一/最后一行外其他行都标记为True
print(df.duplicated(subset='age',keep=False)) # 只检查name这列,只要这列的值相同就被视为重复行,不管其他列的值
# 删除重复行,只保留一行
print(df.drop_duplicates())
print(df.drop_duplicates(['name'])) # 只检查 name 列
# (2)处理缺失值
# ①识别缺失数据
# Pandas使用NaN表示浮点和非浮点数组里的缺失数据,使用.isnull() .notnull():判断是否缺失
filename = r'\rz.xlsx'
df = read_excel(data_source_path+filename,sheet_name='Sheet2')
print(df)
print(df.isnull())
print(df.notnull())
# ②处理缺失数据
# 处理方式:数据补齐、删除对应行、不处理
# 1.删除对应行:dropna
newDf = df.dropna() # 删除包含NaN的行
print(newDf)
print(len(newDf)) # 返回行数
print(newDf.columns) # 含列名的Index
newDf = df.dropna(how='all') # 只有当所有列全为空时,该行才删除
print(newDf)
print(df.dropna(axis=1)) # 按列丢弃
print(df.dropna(how='all',axis=1)) # 按列丢弃
# 2.数据补齐:fillna
print(df.fillna('?'))
df.at[0,'数分'] = None
print(df.fillna(method='pad')) # 使用该列的前一个值填充,若该行没有前一行,则仍然为NaN
print(df.fillna(method='bfill')) # 使用该列的后一个值填充,若该行没有后一行,则仍然为NaN
# 使用平均值或其他统计量代替NaN
print(df.fillna(df.mean())) # 使用该列的平均数替代
print(df.fillna(df.mean()['高代':'解几'])) # 用其他列('解几')均值替代指定列('高代')的NaN
# 不同列填充不同值
print(df.fillna({'数分':100,'高代':0})) # 没有列出的列不变
# strip()、lstrip()、rstrip():清除字符型数据首尾指定的字符(默认空白符)
df2 = DataFrame({
'age':Series([26,34,27,34,88,21,27]),
'name':Series([' Tom','Lee ',' Jon',' Lee','James ','Curry ',' Curryy'])
})
print(df2['name'])
print(type(df2['name'])) # <class 'pandas.core.series.Series'>
print(type(df2['name'][0])) # <class 'str'>
print('+++++++++++++++++++++')
print(df2['name'].str) # Series的属性,StringMethods类的实例,str:包含了很多处理字符类型的函数
print(type(df2['name'].str)) # <class 'pandas.core.strings.StringMethods'>
print('+++++++++++++++++++++')
print(df2['name'].str.strip())
print(df2['name'].str.lstrip('L')) # 去除左边L开头的字符
print(df2['name'].str.rstrip('y')) # 去除右边y结尾的字符
'''
2.数据抽取
'''
| [
"tp1084165470@gmail.com"
] | tp1084165470@gmail.com |
88d5af0f03ee81abab266a8e5a12b356f24cf021 | 02255565aff9ea18a4d566955cc53ca06090efa4 | /Python 2000/lambda.py | 02d5baf6f077110e462b6fd485c2077dce5d8115 | [] | no_license | BrainiacRawkib/Practical-Python-for-Begineers | 20a8a3697812bed78646c6af54a6dc195694109a | cb29ea1a38339fcf2fac005feb92b5a72ae98387 | refs/heads/master | 2020-12-01T09:10:06.802758 | 2019-12-28T15:27:40 | 2019-12-28T15:27:40 | 230,598,655 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 122 | py | lamba = lambda x: x * 2
print(lamba(12))
lambb = lambda x, y, z: lamba(x) + (y * 2) + (z * 2)
print(lambb(12, 13, 14))
| [
"brainiacrawkib@gmail.com"
] | brainiacrawkib@gmail.com |
3af0aa51c68aff6d586fb8fffd88f501e710c456 | 8e69eee9b474587925e22413717eb82e4b024360 | /v1.0.0.test/toontown/parties/InviteVisual.py | 4634f5f246c01da12300794e50bed844fd0c9bac | [
"MIT"
] | permissive | TTOFFLINE-LEAK/ttoffline | afaef613c36dc3b70514ccee7030ba73c3b5045b | bb0e91704a755d34983e94288d50288e46b68380 | refs/heads/master | 2020-06-12T15:41:59.411795 | 2020-04-17T08:22:55 | 2020-04-17T08:22:55 | 194,348,185 | 5 | 4 | null | null | null | null | UTF-8 | Python | false | false | 6,527 | py | from datetime import datetime
import calendar
from direct.gui.DirectGui import DirectFrame, DirectLabel
from toontown.toonbase import TTLocalizer
from direct.showbase import PythonUtil
from direct.fsm.FSM import FSM
from toontown.parties import PartyGlobals
from toontown.parties import PartyUtils
from toontown.toonbase.ToontownGlobals import VALENTINES_DAY
class InviteVisual(DirectFrame):
notify = directNotify.newCategory('InviteVisual')
def __init__(self, parent):
DirectFrame.__init__(self, parent=parent)
self.gui = loader.loadModel('phase_5.5/models/parties/partyInviteGUI')
self.inviteThemesIdToInfo = {PartyGlobals.InviteTheme.Birthday: (self.gui.find('**/birthdayPage'), TTLocalizer.PartyPlannerBirthdayTheme,
(0.0, 0.0, 0.0, 1.0)),
PartyGlobals.InviteTheme.GenericMale: (
self.gui.find('**/genericMalePage'), TTLocalizer.PartyPlannerGenericMaleTheme,
(0.7, 0.7, 0.0, 1.0)),
PartyGlobals.InviteTheme.GenericFemale: (
self.gui.find('**/genericFemalePage'), TTLocalizer.PartyPlannerGenericFemaleTheme,
(0.0, 1.0, 0.5, 1.0)),
PartyGlobals.InviteTheme.Racing: (
self.gui.find('**/racingPage'), TTLocalizer.PartyPlannerRacingTheme,
(0.0, 0.0, 0.0, 1.0)),
PartyGlobals.InviteTheme.Valentoons: (
self.gui.find('**/valentinePage1'), TTLocalizer.PartyPlannerValentoonsTheme,
(0.0, 0.0, 0.0, 1.0)),
PartyGlobals.InviteTheme.VictoryParty: (
self.gui.find('**/victoryPartyPage'), TTLocalizer.PartyPlannerVictoryPartyTheme,
(0.0, 0.0, 0.0, 1.0)),
PartyGlobals.InviteTheme.Winter: (
self.gui.find('**/winterPartyPage1'), TTLocalizer.PartyPlannerWinterPartyTheme,
(1.0, 1.0, 1.0, 1.0))}
self.inviteThemeBackground = DirectFrame(parent=self, image=self.inviteThemesIdToInfo[0][0], relief=None)
self.whosePartyLabel = DirectLabel(parent=self, relief=None, pos=self.gui.find('**/who_locator').getPos(), text='.', text_scale=0.067, textMayChange=True)
self.activityTextLabel = DirectLabel(parent=self, relief=None, text='.\n.\n.\n.', pos=self.gui.find('**/what_locator').getPos(), text_scale=TTLocalizer.IVactivityTextLabel, textMayChange=True)
self.whenTextLabel = DirectLabel(parent=self, relief=None, text='.\n.\n.', pos=self.gui.find('**/when_locator').getPos(), text_scale=TTLocalizer.IVwhenTextLabel, textMayChange=True)
self.noFriends = False
return
def setNoFriends(self, noFriends):
self.noFriends = noFriends
self.inviteThemeBackground.show()
def updateInvitation(self, hostsName, partyInfo):
self.partyInfo = partyInfo
hostsName = TTLocalizer.GetPossesive(hostsName)
self.whosePartyLabel['text'] = TTLocalizer.PartyPlannerInvitationWhoseSentence % hostsName
if self.partyInfo.isPrivate:
publicPrivateText = TTLocalizer.PartyPlannerPrivate.lower()
else:
publicPrivateText = TTLocalizer.PartyPlannerPublic.lower()
activities = self.getActivitiesFormattedCorrectly()
if self.noFriends:
self.activityTextLabel['text'] = TTLocalizer.PartyPlannerInvitationThemeWhatSentenceNoFriends % (publicPrivateText, activities)
else:
self.activityTextLabel['text'] = TTLocalizer.PartyPlannerInvitationThemeWhatSentence % (publicPrivateText, activities)
if self.noFriends:
self.whenTextLabel['text'] = TTLocalizer.PartyPlannerInvitationWhenSentenceNoFriends % (PartyUtils.formatDate(self.partyInfo.startTime.year, self.partyInfo.startTime.month, self.partyInfo.startTime.day), PartyUtils.formatTime(self.partyInfo.startTime.hour, self.partyInfo.startTime.minute))
else:
self.whenTextLabel['text'] = TTLocalizer.PartyPlannerInvitationWhenSentence % (PartyUtils.formatDate(self.partyInfo.startTime.year, self.partyInfo.startTime.month, self.partyInfo.startTime.day), PartyUtils.formatTime(self.partyInfo.startTime.hour, self.partyInfo.startTime.minute))
self.changeTheme(partyInfo.inviteTheme)
def getActivitiesFormattedCorrectly(self):
activitiesString = ''
activityList = []
for activity in self.partyInfo.activityList:
text = TTLocalizer.PartyActivityNameDict[activity.activityId]['invite']
if text not in activityList:
activityList.append(text)
if len(activityList) == 1:
return '\n' + TTLocalizer.PartyPlannerInvitationThemeWhatActivitiesBeginning + activityList[0]
conjunction = TTLocalizer.PartyActivityConjunction
for activity in activityList:
activitiesString = '%s, %s' % (activitiesString, activity)
activitiesString = activitiesString[2:]
activitiesString = activitiesString[:activitiesString.rfind(',')] + conjunction + activitiesString[activitiesString.rfind(',') + 1:]
activitiesString = TTLocalizer.PartyPlannerInvitationThemeWhatActivitiesBeginning + activitiesString
return self.insertCarriageReturn(activitiesString)
def insertCarriageReturn(self, stringLeft, stringDone=''):
desiredNumberOfCharactersInLine = 42
if len(stringLeft) < desiredNumberOfCharactersInLine:
return stringDone + '\n' + stringLeft
for i in xrange(desiredNumberOfCharactersInLine - 6, len(stringLeft)):
if stringLeft[i] == ' ':
return self.insertCarriageReturn(stringLeft[i:], stringDone + '\n' + stringLeft[:i])
return stringDone + '\n' + stringLeft
def changeTheme(self, newTheme):
self.inviteThemeBackground['image'] = self.inviteThemesIdToInfo[newTheme][0]
self.whosePartyLabel['text_fg'] = self.inviteThemesIdToInfo[newTheme][2]
self.activityTextLabel['text_fg'] = self.inviteThemesIdToInfo[newTheme][2]
self.whenTextLabel['text_fg'] = self.inviteThemesIdToInfo[newTheme][2]
def close(self):
self.destroy()
del self | [
"s0mberdemise@protonmail.com"
] | s0mberdemise@protonmail.com |
2ec4319a8b318185cc3a485ae30115f3a6f43c4c | 36add5afc63ec09d63b8a877c29c17391938ee5c | /.history/utils_20201113150643.py | b1ea8873e12bf771558a629a51c7e7e9797d58a3 | [] | no_license | E-STAT/sentiment_api | e84eb04a9f21c7368ca20bdb97436ffea9f65f25 | bd9ee0d78d9eac8b6448b96c2560611a64f7b79d | refs/heads/master | 2023-01-12T13:06:14.654883 | 2020-11-20T11:30:22 | 2020-11-20T11:30:22 | 314,534,974 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,264 | py | import re
import string
import numpy as np
from nltk.corpus import stopwords
from nltk.stem import PorterStemmer
from nltk.tokenize import TweetTokenizer
def process_tweet(tweet):
"""Process tweet function.
Input:
tweet: a string containing a tweet
Output:
tweets_clean: a list of words containing the processed tweet
"""
stemmer = PorterStemmer()
stopwords_english = stopwords.words('english')
# remove stock market tickers like $GE
tweet = re.sub(r'\$\w*', '', tweet)
# remove old style retweet text "RT"
tweet = re.sub(r'^RT[\s]+', '', tweet)
# remove hyperlinks
tweet = re.sub(r'https?:\/\/.*[\r\n]*', '', tweet)
# remove hashtags
# only removing the hash # sign from the word
tweet = re.sub(r'#', '', tweet)
# tokenize tweets
tokenizer = TweetTokenizer(preserve_case=False, strip_handles=True,
reduce_len=True)
tweet_tokens = tokenizer.tokenize(tweet)
tweets_clean = []
for word in tweet_tokens:
if (word not in stopwords_english and # remove stopwords
word not in string.punctuation): # remove punctuation
# tweets_clean.append(word)
stem_word = stemmer.stem(word) # stemming word
tweets_clean.append(stem_word)
return tweets_clean
def build_freqs(tweets, ys):
"""Build frequencies.
Input:
tweets: a list of tweets
ys: an m x 1 array with the sentiment label of each tweet
(either 0 or 1)
Output:
freqs: a dictionary mapping each (word, sentiment) pair to its
frequency
"""
# Convert np array to list since zip needs an iterable.
# The squeeze is necessary or the list ends up with one element.
# Also note that this is just a NOP if ys is already a list.
yslist = np.squeeze(ys).tolist()
# Start with an empty dictionary and populate it by looping over all tweets
# and over all processed words in each tweet.
freqs = {}
for y, tweet in zip(yslist, tweets):
for word in process_tweet(tweet):
pair = (word, y)
if pair in freqs:
freqs[pair] += 1
else:
freqs[pair] = 1
return freqs
| [
"owojori.tolulope@gmail.com"
] | owojori.tolulope@gmail.com |
a4899302ed7e52ae6969f56638557bd17b85fe82 | 0c1cf007f9d5d00ceefaf7be57e3f81c1c49fb11 | /lightning_asr/model/convolution.py | a50fc9319b9718886add9479c46efc446f3e0523 | [
"MIT"
] | permissive | sooftware/lightning-asr | f345f34dce132a6ccdb393b74c1f9bf0e1ccaac8 | 3b4d8222fad15c90a8c9b44ecacd67f309b34124 | refs/heads/main | 2023-04-30T17:46:21.737471 | 2021-05-19T11:56:33 | 2021-05-19T11:56:33 | 357,467,261 | 16 | 5 | MIT | 2021-05-12T14:22:05 | 2021-04-13T07:46:44 | Python | UTF-8 | Python | false | false | 7,518 | py | # MIT License
#
# Copyright (c) 2021 Soohwan Kim
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
import torch
import torch.nn as nn
from torch import Tensor
from typing import Tuple
from lightning_asr.model.activation import Swish, GLU
from lightning_asr.model.modules import LayerNorm, Transpose
class DepthwiseConv1d(nn.Module):
"""
When groups == in_channels and out_channels == K * in_channels, where K is a positive integer,
this operation is termed in literature as depthwise convolution.
Args:
in_channels (int): Number of channels in the input
out_channels (int): Number of channels produced by the convolution
kernel_size (int or tuple): Size of the convolving kernel
stride (int, optional): Stride of the convolution. Default: 1
padding (int or tuple, optional): Zero-padding added to both sides of the input. Default: 0
bias (bool, optional): If True, adds a learnable bias to the output. Default: True
Inputs: inputs
- **inputs** (batch, in_channels, time): Tensor containing input vector
Returns: outputs
- **outputs** (batch, out_channels, time): Tensor produces by depthwise 1-D convolution.
"""
def __init__(
self,
in_channels: int,
out_channels: int,
kernel_size: int,
stride: int = 1,
padding: int = 0,
bias: bool = False,
) -> None:
super(DepthwiseConv1d, self).__init__()
assert out_channels % in_channels == 0, "out_channels should be constant multiple of in_channels"
self.conv = nn.Conv1d(
in_channels=in_channels,
out_channels=out_channels,
kernel_size=kernel_size,
groups=in_channels,
stride=stride,
padding=padding,
bias=bias,
)
def forward(self, inputs: Tensor) -> Tensor:
return self.conv(inputs)
class PointwiseConv1d(nn.Module):
"""
When kernel size == 1 conv1d, this operation is termed in literature as pointwise convolution.
This operation often used to match dimensions.
Args:
in_channels (int): Number of channels in the input
out_channels (int): Number of channels produced by the convolution
stride (int, optional): Stride of the convolution. Default: 1
padding (int or tuple, optional): Zero-padding added to both sides of the input. Default: 0
bias (bool, optional): If True, adds a learnable bias to the output. Default: True
Inputs: inputs
- **inputs** (batch, in_channels, time): Tensor containing input vector
Returns: outputs
- **outputs** (batch, out_channels, time): Tensor produces by pointwise 1-D convolution.
"""
def __init__(
self,
in_channels: int,
out_channels: int,
stride: int = 1,
padding: int = 0,
bias: bool = True,
) -> None:
super(PointwiseConv1d, self).__init__()
self.conv = nn.Conv1d(
in_channels=in_channels,
out_channels=out_channels,
kernel_size=1,
stride=stride,
padding=padding,
bias=bias,
)
def forward(self, inputs: Tensor) -> Tensor:
return self.conv(inputs)
class ConformerConvModule(nn.Module):
"""
Conformer convolution module starts with a pointwise convolution and a gated linear unit (GLU).
This is followed by a single 1-D depthwise convolution layer. Batchnorm is deployed just after the convolution
to aid training deep models.
Args:
in_channels (int): Number of channels in the input
kernel_size (int or tuple, optional): Size of the convolving kernel Default: 31
dropout_p (float, optional): probability of dropout
Inputs: inputs
inputs (batch, time, dim): Tensor contains input sequences
Outputs: outputs
outputs (batch, time, dim): Tensor produces by model convolution module.
"""
def __init__(
self,
in_channels: int,
kernel_size: int = 31,
expansion_factor: int = 2,
dropout_p: float = 0.1,
) -> None:
super(ConformerConvModule, self).__init__()
assert (kernel_size - 1) % 2 == 0, "kernel_size should be a odd number for 'SAME' padding"
assert expansion_factor == 2, "Currently, Only Supports expansion_factor 2"
self.sequential = nn.Sequential(
LayerNorm(in_channels),
Transpose(shape=(1, 2)),
PointwiseConv1d(in_channels, in_channels * expansion_factor, stride=1, padding=0, bias=True),
GLU(dim=1),
DepthwiseConv1d(in_channels, in_channels, kernel_size, stride=1, padding=(kernel_size - 1) // 2),
nn.BatchNorm1d(in_channels),
Swish(),
PointwiseConv1d(in_channels, in_channels, stride=1, padding=0, bias=True),
nn.Dropout(p=dropout_p),
)
def forward(self, inputs: Tensor) -> Tensor:
return self.sequential(inputs).transpose(1, 2)
class Conv2dSubampling(nn.Module):
"""
Convolutional 2D subsampling (to 1/4 length)
Args:
in_channels (int): Number of channels in the input image
out_channels (int): Number of channels produced by the convolution
Inputs: inputs
- **inputs** (batch, time, dim): Tensor containing sequence of inputs
Returns: outputs, output_lengths
- **outputs** (batch, time, dim): Tensor produced by the convolution
- **output_lengths** (batch): list of sequence output lengths
"""
def __init__(self, in_channels: int, out_channels: int) -> None:
super(Conv2dSubampling, self).__init__()
self.sequential = nn.Sequential(
nn.Conv2d(in_channels, out_channels, kernel_size=3, stride=2),
nn.ReLU(),
nn.Conv2d(out_channels, out_channels, kernel_size=3, stride=2),
nn.ReLU(),
)
def forward(self, inputs: Tensor, input_lengths: Tensor) -> Tuple[Tensor, Tensor]:
outputs = self.sequential(inputs.unsqueeze(1))
batch_size, channels, subsampled_lengths, sumsampled_dim = outputs.size()
outputs = outputs.transpose(1, 2)
outputs = outputs.contiguous().view(batch_size, subsampled_lengths, channels * sumsampled_dim)
output_lengths = input_lengths >> 2
output_lengths -= 1
return outputs, output_lengths
| [
"sooftware@Soohwanui-MacBookPro.local"
] | sooftware@Soohwanui-MacBookPro.local |
c6150fdd3254128e541a79fb9345a0c27ab09eec | c0c45e74c57d451ca5f17cfd426bbfa8cc8c709a | /examples/wps-uk-station-data/midas/midasSubsetter.py | cb43282f202e4f5a5a6ce1d17a40e521df7b8084 | [
"Apache-2.0"
] | permissive | cehbrecht/goshawk | 42845f684b1ddd111bd6ed90b2af052fbc8a85a7 | 224d39a6e4ad64a5dc4034853853bdf8eb683d0b | refs/heads/master | 2020-05-01T18:15:30.891875 | 2019-03-29T22:11:47 | 2019-03-29T22:11:47 | 177,620,154 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 19,926 | py | #!/usr/bin/env python
"""
midasSubsetter.py
=================
Subsets data from the MIDAS flat files. Allows extraction by:
- table
- date range
- column name
- value conditions
The MIDASSubsetter class needs to be able to see the file 'midas_structure.txt' which
is essentially a description of the table contents in a text file. This is parsed each
time this script is called.
There is hard-coded limit of 100,000 lines that can currently be extracted.
Usage:
======
midasSubsetter.py -t <table> [-s <YYYYMMDDhhmm>] [-e <YYYYMMDDhhmm>]
[-c <column1>[,<column2>...]] [-n <conditions>] [-d <delimiter>]
[-i <src_id1>[,<src_id2>...]] [-g <groupfile>] [-r <region>] [-p <tempdir>] <outputFile>
Where:
------
<table> - is the name of the MIDAS table
-s - provide the start date/time
-e - provide the end date/time
-c - provide a comma-separated list of required columns
-n - provide a list of comma-separated list of conditions in the form:
* range=<low>:<high> [<low> and <high> are values]
* greater_than=<value>
* less_than=<value>
* exact=<match> [<match> is a string]
* pattern=<pattern> [<pattern> is a regular expression]
-d - delimiter is one of ","|"comma"|"tab" or other character/string.
-i - provide a comma separated list of station IDs
-g - provide the name of a file containing one station id per line.
-r - for GLOBAL table only - provide a region (optional - otherwise will do global search).
Regions are: 1-Africa, 2-Asia, 3-South America, 4-North Central America,
5-South West Pacific, 6-Europe, 7-Antarctic.
-p - temporary directory location (absolute path)
Examples:
=========
midasSubsetter.py -t RS -s 200401010000 -e 200401011000
midasSubsetter.py -t RS -s 200401010000 -e 200401011000 outputfile.dat
midasSubsetter.py -t RS -s 200401010000 -e 200401011000 -g testlist.txt outputfile.dat
midasSubsetter.py -t RS -s 200401010000 -e 200401011000 -i 214,926 -d tab
"""
# Import required modules
import sys
import commands
import os
import getopt
import re
import glob
import time
# Set up global variables
base_dir = os.path.dirname(os.path.dirname(os.path.realpath(__file__)))
def expand(i): return os.path.join(base_dir, i)
metadatadir = expand("metadata")
datadir = expand("data")
midasStructureTable = os.path.join(metadatadir, "allTablePartitionNames.txt")
temp_dir = expand(".temporary")
outputDir = temp_dir
# partition regex pattern
_partitionPattern = re.compile(r"nonsense-data_[a-zA-Z\-]+_(\d{6})-(\d{6})\.txt")
# Define nameDict globally
nameDict = {'STXX': 'SOIL_TEMP_OB', 'SRCC': 'SRC_CAPABILITY', 'GLXX': 'GBL_WX_OB',
'SRCE': 'SOURCE', 'TMSL': 'TEMP_MIN_SOIL_OB', 'MRXX': 'MARINE_OB',
'ROXX': 'RADT_OB_V2', 'TDXX': 'TEMP_DRNL_OB', 'WDXX': 'WEATHER_DRNL_OB',
'RDXX': 'RAIN_DRNL_OB', 'RSXX': 'RAIN_SUBHRLY_OB', 'RHXX': 'RAIN_HRLY_OB',
'WMXX': 'WIND_MEAN_OB', 'WHXX': 'WEATHER_HRLY_OB'}
globalWXCodes = {"1": "glblwx-africa", "2": "glblwx-asia",
"3": "glblwx-south-america", "4": "glblwx-north-central-america",
"5": "glblwx-south-west-pacific", "6": "glblwx-europe",
"7": "glblwx-antarctic"}
def countLines(fname):
"Returns a count of the lines in a files."
return commands.getoutput("wc -l %s" % fname).strip()
def dateMatch(line, pattern):
"""
If line matches pattern then return the date as a long, else None.
"""
match = pattern.match(line)
if match:
dateLong = long("".join(match.groups()[1:]))
return dateLong
return
def tableMatch(tableName):
"""
Takes what is given and returns a tuple of (tableID, tableName).
"""
if len(tableName) < 5:
shortnames = nameDict.keys()
if tableName in shortnames:
longname = nameDict[tableName]
elif tableName + "XX" in shortnames:
longname = nameDict[tableName + "XX"]
else:
raise Exception("Tablename not known: %s" % tableName)
shortname = tableName[:2]
else:
longnames = nameDict.values()
if tableName not in longnames:
raise Exception("Tablename not known: %s" % tableName)
else:
for s, l in nameDict.items():
if l == tableName:
shortname = s
break
longname = l
return (shortname[:2], longname)
def exitNicely(msg=""):
"""
Takes an error message as the argument and prints help message.
"""
print __doc__
print "ERROR:", msg
sys.exit()
def padTime(timestring):
"""
Returns a 12 digit string as time by padding any missing month, day, hour
or minute values.
"""
padder = "000001010000"
if len(timestring) < 12:
timestring = timestring + (padder[len(timestring):])
return timestring
def getColumnIndex(tableID, colName):
"""
Returns the index in a row of a given column name.
"""
inputFile = os.path.join(metadatadir, "table_structures/%sTB.txt" % tableID)
colNames = [col.strip().lower() for col in open(inputFile).readlines()]
if colName in colNames:
return colNames.index(colName)
raise Exception("Cannot find column name '%s' in table '%s'" %
(colName, tableID))
class MIDASSubsetter:
"""
Subsetting class to manage extractions from large text files holding MIDAS data.
"""
def __init__(self, tableNames, outputPath, startTime=None, endTime=None, columns="all", conditions=None,
src_ids=None, region=None, delimiter="default", tempDir=temp_dir, verbose=1):
"""
Initialisation of instance sets up the rules and calls various methods.
"""
self.region = region
self.verbose = verbose
self.tempDir = tempDir
tableNames = [a.upper() for a in tableNames]
if type(columns) == type([]):
# convert to list of ints if appropriate
try:
columns = [int(i) for i in columns]
except:
pass
# Get full list of all tables and partitions
tableDict = self._parseTableStructure()
(tableID, tableName) = tableMatch(tableNames[0])
if self.verbose:
print "NOTE: Multiple table search not yet implemented."
#print tableDict[tableName]
self.rowHeaders = self._getRowHeaders(tableID)
if self.verbose:
print "Got row headers..."
partitionFiles = tableDict[tableName]["partitionList"]
if self.verbose:
print "Got partition files..."
if self.verbose:
print "Getting file list..."
fileList = self._getFileList(
tableName, startTime, endTime, partitionFiles)
if columns == "all" and conditions == None:
if self.verbose:
print "\nExtracting all rows: %s\nFrom files: %s\nBetween: %s and %s\n" % (tableID, ("\t"+"\n\t".join(fileList)), startTime,
endTime)
dataFile = self._getCompleteRows(
tableID, fileList, startTime, endTime, src_ids=src_ids)
else:
if self.verbose:
print "\nExtracting row subsets for: %s\nFrom files: %s\nBetween: %s and %s\n" % (tableID, fileList, startTime,
endTime)
dataFile = self._getRowSubsets(
tableID, fileList, startTime, endTime, columns, conditions)
if self.verbose:
print "\nData extracted to temporary file(s)..."
self._writeOutputFile(dataFile, outputPath, delimiter)
def _parseTableStructure(self, structureFile=midasStructureTable):
"""
Parses the table structure text file to return a list of [<files>, <columns>]
where <files> is a list of [<file_name>, <start_time>, <end_time>].
"""
tableDict = {}
fpatt = re.compile(r"nonsense-data_([a-zA-Z\-]+)_(\d{6})-(\d{6}).txt")
tableList = nameDict.values()
for tableName in tableList:
if tableName in ["SRC_CAPABILITY", "SOURCE", "TEMP_MIN_SOIL_OB", "MARINE_OB"]:
continue
tableID = tableMatch(tableName)[0]
tableDict[tableName] = {"partitionList": []}
partitionDir = datadir
os.chdir(partitionDir)
partitionFiles = glob.glob("*.txt")
partitionFiles.sort()
for pfile in partitionFiles:
pmatch = fpatt.match(pfile)
if pmatch:
# Deal with non-matching regions if global used...
if self.region:
regionName = globalWXCodes[self.region]
if pmatch.groups()[0] != regionName:
continue
ppath = os.path.join(partitionDir, pfile)
tableDict[tableName]["partitionList"].append(ppath)
os.chdir(base_dir)
return tableDict
def _getFileList(self, table, startTime, endTime, partitionFiles, pattern=_partitionPattern):
"""
Returns a list of files required for reading based on the request.
"""
startYM = long(startTime[:6])
endYM = long(endTime[:6])
filePathList = []
template = "nonsense-data_%s_%s-%s.txt"
for file in partitionFiles:
(nameStart, nameEnd) = pattern.search(file).groups()
if long(nameEnd) < long(startYM) or long(nameStart) > long(endYM):
pass
else:
filePathList.append(file)
return filePathList
def _getCompleteRows(self, tableID, fileList, startTime, endTime, src_ids=None):
"""
Returns a list of complete rows from the database.
"""
try:
timeIndex = getColumnIndex(tableID, "ob_time")
except:
try:
timeIndex = getColumnIndex(tableID, "ob_date")
except:
timeIndex = getColumnIndex(tableID, "ob_end_time")
_datePattern = re.compile(
r"([^,]+, ){%s}(\d{4})-(\d{2})-(\d{2})\s+(\d{2}):(\d{2})" % timeIndex)
now = time.strftime("%Y%m%d.%H%M%S", time.localtime(time.time()))
print self.tempDir
tempFilePath = os.path.join(self.tempDir, "temp_%s" % (now))
tempFile = open(tempFilePath, "w")
startTimeLong = long(padTime(startTime))
endTimeLong = long(padTime(endTime))
getAllSrcIds = False
# Set up srcId pattern finders
if src_ids:
selectedRows = []
print "Now extracting station ids provided..."
srcidIndex = getColumnIndex(tableID, "src_id")
# reg ex module has a limit of 9999 items that can be in a "|" separated match option
# somewhere on web says it can be set at 7500
# For safety I'll split them into 5000 batches
n = 0
srcIdPatternsList = []
while n <= (len(src_ids) - 1):
srcIdPatternsList.append(re.compile(
r"([^,]+, ){%s}(%s)," % (srcidIndex, "|".join(src_ids[n: (n + 5000)]))))
n += 5000
else:
getAllSrcIds = True
count = 0
for filename in fileList:
lcount = 0
if self.verbose:
print "\nFiltering file '%s' containing %s lines." % (
filename, countLines(filename))
file = open(filename)
line = file.readline()
while line:
lcount = lcount+1
if self.verbose and lcount % 100000 == 0:
print "\tRead %s lines..." % lcount
line = line.strip()
dmatch = dateMatch(line, _datePattern)
# Check if datetime has gone past the selected range
if dmatch and dmatch > endTimeLong:
print "Breaking out of read loop because time past end time!"
break
# Now check if src ids need to match
idmatch = None
if src_ids:
for _srcidPattern in srcIdPatternsList:
if _srcidPattern.match(line):
idmatch = 1
break
if dmatch and (idmatch or getAllSrcIds):
if startTimeLong <= dmatch <= endTimeLong:
tempFile.write(line.strip()+"\n")
count += 1
line = file.readline()
file.close()
tempFile.close()
if self.verbose:
print "Lines to filter = ", countLines(tempFilePath)
return tempFilePath # rows
def _getRowHeaders(self, tableID, columns="all"):
"""
Reads in the dictionary to get the headers for each column.
"""
inputFile = os.path.join(
metadatadir, "table_structures/%sTB.txt" % tableID)
rowHeaders = [rh.strip().lower() for rh in open(inputFile).readlines()]
return rowHeaders
def _getRowSubsets(self, tableID, fileList, startTime, endTime, columns="all", conditions=None):
"""
Returns a list of rows after sub-setting according to columns and conditions.
"""
# rows=[]
now = time.strftime("%Y%m%d.%H%M%S", time.localtime(time.time()))
tempFilePath = os.path.join(self.tempDir, "temp_%s" % (now))
tempFile = open(tempFilePath, "w")
startTimeLong = long(padTime(startTime))
endTimeLong = long(padTime(endTime))
count = 0
for filename in fileList:
file = open(filename)
line = file.readline()
while line:
line = line.strip()
match = dateMatch(line)
if match:
dataTimeLong = long(match)
if startTimeLong < match < endTimeLong:
if type(columns) == type([]):
newLine = None
splitLine = re.split(",\s+", line)
for i in columns:
i = i-1
if newLine == None:
newLine = "%s, " % splitLine[i]
else:
newLine = "%s%s, " % (
newLine, splitLine[i])
# rows.append(newLine)
tempFile.write(newLine)
count = count+1
line = file.readline()
file.close()
tempFile.close()
return tempFilePath
def _writeOutputFile(self, tempDataFile, outputPath, delimiter="default"):
"""
Writes the output file and returns 1 if successful, if delimiter is not "default"
it modifies each output line accordingly to include chosen delimiter.
"""
headerLine = ", ".join(self.rowHeaders)+"\n"
print "Getting size of temporary output file."
size = os.path.getsize(tempDataFile)
if size > (200*10**6):
print "File is bigger than 200MB so I'm not going to try filtering it."
if outputPath == "display":
print "This file is too big to display so data has been saved to:"
now = time.strftime(
"%Y%m%d.%H%M%S", time.localtime(time.time()))
outputPath = os.path.join(outputDir, "out_%s.txt" % now)
outputFile = open(outputPath, "w")
outputFile.write(headerLine)
dataFile = open(tempDataFile)
line = dataFile.readline()
while line:
outputFile.write(line)
line = dataFile.readline()
dataFile.close()
outputFile.close()
print "\t", outputPath
os.unlink(tempDataFile)
return
else:
print "Can sort and filter since file is small."
dataFile = open(tempDataFile)
rows = dataFile.readlines()
dataFile.close()
rows.insert(0, headerLine)
if delimiter != "default":
rows = self._reFormatDelimiters(rows, delimiter)
data = "".join(rows)
if outputPath == "display":
print "Output data follows:\n"
print data+"\n"
else:
if len(rows) == 1:
print "===\nNo data found.\n===\n"
data = "Your extraction request has run successfully, but no data have been found matching your request.\n\nPlease use the MIDAS station search pages on the CEDA website (http://archive.ceda.ac.uk/midas_stations/) to check your station reporting periods and message types to ensure that your selected stations report message types containing the data elements you require within your selected period.\n\nAdditional information about data outages/known issues/instrument failure can also be found on station records.\n\nIf you have completed these checks and believe the data should be available please contact the CEDA helpdesk for further assistance (support@ceda.ac.uk), providing full details of the extractions you are trying to submit."
output = open(outputPath, "w")
output.write(data)
output.close()
if len(rows) > 1:
print "%s records written to: %s\n===\n" % (
len(rows), outputPath)
os.unlink(tempDataFile)
return 1
def _reFormatDelimiters(self, rows, delimiter):
"""
Returns a list of rows with delimiters as requested.
"""
if delimiter in ("comma", ","):
return rows
elif delimiter == "tab":
delimiter = "\t"
newRows = [delimiter.join(row.split(", ")) for row in rows]
return newRows
if __name__ == "__main__":
argList = sys.argv[1:]
outputPath = None
(args, outputPath) = getopt.getopt(argList, "t:s:e:c:n:d:i:r:g:p:")
startTime = None
endTime = None
columns = "all"
conditions = None
src_ids = None
delimiter = "default"
region = None
tableNames = []
tempDir = temp_dir
if not outputPath:
outputPath = "display"
else:
outputPath = outputPath[0]
for arg, value in args:
if arg == "-t":
tableNames = value.split(",")
elif arg == "-s":
startTime = value
elif arg == "-e":
endTime = value
elif arg == "-c":
columns = value.split(",")
elif arg == "-d":
delimiter = value
elif arg == "-i":
src_ids = value.split(",")
elif arg == "-r":
region = value
elif arg == "-p":
tempDir = value
elif arg == "-g":
src_ids = [i.strip() for i in open(value).readlines()]
elif arg == "-n":
conditions = {}
conditionList = value.split(",")
for cond in conditionList:
a, b = cond.split("=")
conditions[a] = b
if tableNames == []:
exitNicely("Must provide table name with '-t' argument.")
MIDASSubsetter(tableNames, outputPath, startTime, endTime, columns, conditions,
src_ids, region, delimiter, tempDir=tempDir)
| [
"ehbrecht@dkrz.de"
] | ehbrecht@dkrz.de |
70e6484e664647d51041b07444f98e59bc804062 | 4e44c4bbe274b0a8ccca274f29c4140dfad16d5e | /Push2_MIDI_Scripts/decompiled 10.1.2b5 scripts/Push2/master_track.py | 6945fed63946ff4e9f53dc50c482a386c8650f83 | [] | no_license | intergalacticfm/Push2_MIDI_Scripts | b48841e46b7a322f2673259d1b4131d2216f7db6 | a074e2337b2e5d2e5d2128777dd1424f35580ae1 | refs/heads/master | 2021-06-24T15:54:28.660376 | 2020-10-27T11:53:57 | 2020-10-27T11:53:57 | 137,673,221 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,809 | py | # uncompyle6 version 3.0.1
# Python bytecode 2.7 (62211)
# Decompiled from: Python 2.7.13 (default, Jan 19 2017, 14:48:08)
# [GCC 6.3.0 20170118]
# Embedded file name: c:\Jenkins\live\output\win_64_static\Release\python-bundle\MIDI Remote Scripts\Push2\master_track.py
# Compiled at: 2018-11-27 11:59:27
from __future__ import absolute_import, print_function, unicode_literals
from ableton.v2.base import listens
from ableton.v2.control_surface import Component
from ableton.v2.control_surface.control import ToggleButtonControl
class MasterTrackComponent(Component):
toggle_button = ToggleButtonControl()
def __init__(self, tracks_provider=None, *a, **k):
assert tracks_provider is not None
super(MasterTrackComponent, self).__init__(*a, **k)
self._tracks_provider = tracks_provider
self.__on_selected_item_changed.subject = self._tracks_provider
self._previous_selection = self._tracks_provider.selected_item
self._update_button_state()
return
@listens('selected_item')
def __on_selected_item_changed(self, *a):
self._update_button_state()
if not self._is_on_master():
self._previous_selection = self._tracks_provider.selected_item
def _update_button_state(self):
self.toggle_button.is_toggled = self._is_on_master()
@toggle_button.toggled
def toggle_button(self, toggled, button):
if toggled:
self._previous_selection = self._tracks_provider.selected_item
self._tracks_provider.selected_item = self.song.master_track
else:
self._tracks_provider.selected_item = self._previous_selection
self._update_button_state()
def _is_on_master(self):
return self._tracks_provider.selected_item == self.song.master_track | [
"ratsnake.cbs@gmail.com"
] | ratsnake.cbs@gmail.com |
7cfef3ad9a45a8220295e0ff7f9630081978c9af | a8d8d9343b9cccd03245946cce2b07d247177e63 | /Jupyter/work/bitbank/modules/scheduler/scheduler.py | e98d5ef7b44c584145c84a724211d9fed23c294e | [] | no_license | yamaguchi-milkcocholate/milkcocholate | 27dad24c6636e98948199dbfac0d5b39d6807529 | c8b013344472459b386890cacf4a39b39e9bb5a7 | refs/heads/master | 2020-03-28T16:04:45.734261 | 2019-04-06T04:52:15 | 2019-04-06T04:52:15 | 148,657,236 | 0 | 1 | null | 2019-04-06T04:52:16 | 2018-09-13T15:17:46 | Python | UTF-8 | Python | false | false | 1,692 | py | import sched
import datetime
import time
class Scheduler:
def __init__(self, runner, start, end, second):
"""
:param runner: object
:param start: tuple
:param end: tuple
:param second:
"""
self.runner = runner
self.start = datetime.datetime(start[0], start[1], start[2], start[3], start[4], start[5])
self.end = datetime.datetime(end[0], end[1], end[2], end[3], end[4], end[5])
self.second = datetime.datetime(second[0], second[1], second[2], second[3], second[4], second[5])
self.scheduler = sched.scheduler(time.time, time.sleep)
def __call__(self):
"""
スケジューラ実行
:return: Runnerクラス(定期実行で実際に実行するprocessingメソッドをもつクラスのインスタンス)
"""
self.schedule()
print('end of schedule')
return self.runner
def processing(self, *args):
"""
定期実行で実際に実行する処理
:param args:
:return:
"""
self.runner.processing()
def schedule(self):
"""
スケジュールを設定
:return:
"""
print('start ', self.start)
print('second', self.second)
print('end ', self.end)
print()
time_i = int(time.mktime(self.start.timetuple()))
span = int(time.mktime(self.second.timetuple()) - time_i)
while time_i <= int(time.mktime(self.end.timetuple())):
self.scheduler.enterabs(time_i, 1, self.processing, argument=(datetime.datetime.fromtimestamp(time_i),))
time_i += span
self.scheduler.run()
| [
"zuuuubo.tetsu@outlook.jp"
] | zuuuubo.tetsu@outlook.jp |
20cf2be0e8c4099cad188ec21f432f4050f80d42 | 3c000380cbb7e8deb6abf9c6f3e29e8e89784830 | /venv/Lib/site-packages/cobra/modelimpl/pres/perleafaggregatedepupd.py | f5b036959f13d5d4e0f60d34e24cf32dfccb64e2 | [] | no_license | bkhoward/aciDOM | 91b0406f00da7aac413a81c8db2129b4bfc5497b | f2674456ecb19cf7299ef0c5a0887560b8b315d0 | refs/heads/master | 2023-03-27T23:37:02.836904 | 2021-03-26T22:07:54 | 2021-03-26T22:07:54 | 351,855,399 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,041 | py | # coding=UTF-8
# **********************************************************************
# Copyright (c) 2013-2020 Cisco Systems, Inc. All rights reserved
# written by zen warriors, do not modify!
# **********************************************************************
from cobra.mit.meta import ClassMeta
from cobra.mit.meta import StatsClassMeta
from cobra.mit.meta import CounterMeta
from cobra.mit.meta import PropMeta
from cobra.mit.meta import Category
from cobra.mit.meta import SourceRelationMeta
from cobra.mit.meta import NamedSourceRelationMeta
from cobra.mit.meta import TargetRelationMeta
from cobra.mit.meta import DeploymentPathMeta, DeploymentCategory
from cobra.model.category import MoCategory, PropCategory, CounterCategory
from cobra.mit.mo import Mo
# ##################################################
class PerLeafAggregatedEpUpd(Mo):
"""
Mo doc not defined in techpub!!!
"""
meta = ClassMeta("cobra.model.pres.PerLeafAggregatedEpUpd")
meta.moClassName = "presPerLeafAggregatedEpUpd"
meta.rnFormat = "perLeafAggregatedEpUpd"
meta.category = MoCategory.REGULAR
meta.label = "None"
meta.writeAccessMask = 0x1
meta.readAccessMask = 0x1
meta.isDomainable = False
meta.isReadOnly = True
meta.isConfigurable = False
meta.isDeletable = False
meta.isContextRoot = False
meta.childClasses.add("cobra.model.fault.Counts")
meta.childClasses.add("cobra.model.health.Inst")
meta.childClasses.add("cobra.model.pres.Resolver")
meta.childNamesAndRnPrefix.append(("cobra.model.fault.Counts", "fltCnts"))
meta.childNamesAndRnPrefix.append(("cobra.model.health.Inst", "health"))
meta.childNamesAndRnPrefix.append(("cobra.model.pres.Resolver", "resl-"))
meta.parentClasses.add("cobra.model.pres.Registry")
meta.rnPrefixes = [
('perLeafAggregatedEpUpd', False),
]
prop = PropMeta("str", "childAction", "childAction", 4, PropCategory.CHILD_ACTION)
prop.label = "None"
prop.isImplicit = True
prop.isAdmin = True
prop._addConstant("deleteAll", "deleteall", 16384)
prop._addConstant("deleteNonPresent", "deletenonpresent", 8192)
prop._addConstant("ignore", "ignore", 4096)
meta.props.add("childAction", prop)
prop = PropMeta("str", "dn", "dn", 1, PropCategory.DN)
prop.label = "None"
prop.isDn = True
prop.isImplicit = True
prop.isAdmin = True
prop.isCreateOnly = True
meta.props.add("dn", prop)
prop = PropMeta("str", "lcOwn", "lcOwn", 9, PropCategory.REGULAR)
prop.label = "None"
prop.isImplicit = True
prop.isAdmin = True
prop.defaultValue = 0
prop.defaultValueStr = "local"
prop._addConstant("implicit", "implicit", 4)
prop._addConstant("local", "local", 0)
prop._addConstant("policy", "policy", 1)
prop._addConstant("replica", "replica", 2)
prop._addConstant("resolveOnBehalf", "resolvedonbehalf", 3)
meta.props.add("lcOwn", prop)
prop = PropMeta("str", "modTs", "modTs", 7, PropCategory.REGULAR)
prop.label = "None"
prop.isImplicit = True
prop.isAdmin = True
prop.defaultValue = 0
prop.defaultValueStr = "never"
prop._addConstant("never", "never", 0)
meta.props.add("modTs", prop)
prop = PropMeta("str", "rn", "rn", 2, PropCategory.RN)
prop.label = "None"
prop.isRn = True
prop.isImplicit = True
prop.isAdmin = True
prop.isCreateOnly = True
meta.props.add("rn", prop)
prop = PropMeta("str", "status", "status", 3, PropCategory.STATUS)
prop.label = "None"
prop.isImplicit = True
prop.isAdmin = True
prop._addConstant("created", "created", 2)
prop._addConstant("deleted", "deleted", 8)
prop._addConstant("modified", "modified", 4)
meta.props.add("status", prop)
def __init__(self, parentMoOrDn, markDirty=True, **creationProps):
namingVals = []
Mo.__init__(self, parentMoOrDn, markDirty, *namingVals, **creationProps)
# End of package file
# ##################################################
| [
"bkhoward@live.com"
] | bkhoward@live.com |
35ab6be71b35fa4128942fbd689562ea1203dcb3 | dd2147a468dea361d0cc86eef516106771b3f486 | /FlatTreeProducer/test/crabConfig_TT_DYJetsToLL_M-10to50_TuneCUETP8M1_13TeV-amcatnloFXFX-pythia8.py | 5355f6e5c5c6d01c7b08f6eb30eeda16385949e9 | [] | no_license | cirkovic/FlatTree | 2fe264d6d91ace3e09e0d9c648e7f2f61ad6150a | 6103cfc07a3fcf9fd3c8720e24b15b55e109af36 | refs/heads/master | 2020-07-30T02:05:29.234034 | 2016-12-07T09:34:52 | 2016-12-07T09:34:52 | 73,637,268 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 959 | py | from CRABClient.UserUtilities import config, getUsernameFromSiteDB
config = config()
#config.General.requestName = 'FCNC_MC_analysis_TTbar_Hct_1'
config.General.workArea = 'crab_projects'
#config.General.transferOutputs = True
#config.General.transferLogs = True
config.JobType.pluginName = 'Analysis'
config.JobType.psetName = 'runFlatTreeMINIAOD_cfg.py'
config.JobType.inputFiles = ['conf.xml']
config.Data.inputDataset = '/DYJetsToLL_M-10to50_TuneCUETP8M1_13TeV-amcatnloFXFX-pythia8/RunIIFall15MiniAODv1-PU25nsData2015v1_76X_mcRun2_asymptotic_v12-v1/MINIAODSIM'
#config.Data.inputDBS = 'phys03'
config.Data.splitting = 'FileBased'
config.Data.unitsPerJob = 1
#config.Data.totalUnits = 100
#config.Data.outLFNDirBase = '/store/user/%s/' % (getUsernameFromSiteDB())
#config.Data.publication = True
#config.Data.outputDatasetTag = 'CRAB3_tutorial_May2015_MC_analysis'
#config.Site.storageSite = 'T2_US_Nebraska'
config.Site.storageSite = 'T2_HU_Budapest'
| [
"predrag.cirkovic@cern.ch"
] | predrag.cirkovic@cern.ch |
579b1c0adfccd115f17b6c8ca30c0a740f1f152c | 78d35bb7876a3460d4398e1cb3554b06e36c720a | /sdk/communication/azure-communication-networktraversal/samples/network_traversal_samples.py | e0a658cbd18786cc9af061a881171e1587388e80 | [
"MIT",
"LicenseRef-scancode-generic-cla",
"LGPL-2.1-or-later"
] | permissive | catchsrinivas/azure-sdk-for-python | e35f59b60318a31b3c940a7a3a07b61b28118aa5 | 596227a7738a5342274486e30489239d539b11d1 | refs/heads/main | 2023-08-27T09:08:07.986249 | 2021-11-11T11:13:35 | 2021-11-11T11:13:35 | 427,045,896 | 0 | 0 | MIT | 2021-11-11T15:14:31 | 2021-11-11T15:14:31 | null | UTF-8 | Python | false | false | 3,611 | py | # coding: utf-8
# -------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
# --------------------------------------------------------------------------
"""
FILE: network_traversal_samples.py
DESCRIPTION:
These samples demonstrate creating a user, issuing a token, revoking a token and deleting a user.
USAGE:
python network_traversal_samples.py
Set the environment variables with your own values before running the sample:
1) COMMUNICATION_SAMPLES_CONNECTION_STRING - the connection string in your ACS resource
2) AZURE_CLIENT_ID - the client ID of your active directory application
3) AZURE_CLIENT_SECRET - the secret of your active directory application
4) AZURE_TENANT_ID - the tenant ID of your active directory application
"""
import os
from azure.communication.networktraversal._shared.utils import parse_connection_str
class CommunicationRelayClientSamples(object):
def __init__(self):
self.connection_string = os.getenv('COMMUNICATION_SAMPLES_CONNECTION_STRING')
self.client_id = os.getenv('AZURE_CLIENT_ID')
self.client_secret = os.getenv('AZURE_CLIENT_SECRET')
self.tenant_id = os.getenv('AZURE_TENANT_ID')
def get_relay_config(self):
from azure.communication.networktraversal import (
CommunicationRelayClient
)
from azure.communication.identity import (
CommunicationIdentityClient
)
if self.client_id is not None and self.client_secret is not None and self.tenant_id is not None:
from azure.identity import DefaultAzureCredential
endpoint, _ = parse_connection_str(self.connection_string)
identity_client = CommunicationIdentityClient(endpoint, DefaultAzureCredential())
relay_client = CommunicationRelayClient(endpoint, DefaultAzureCredential())
else:
identity_client = CommunicationIdentityClient.from_connection_string(self.connection_string)
relay_client = CommunicationRelayClient.from_connection_string(self.connection_string)
print("Creating new user")
user = identity_client.create_user()
print("User created with id:" + user.properties.get('id'))
print("Getting relay configuration")
relay_configuration = relay_client.get_relay_configuration(user)
for iceServer in relay_configuration.ice_servers:
print("Icer server:")
print(iceServer)
def get_relay_config_no_identity(self):
from azure.communication.networktraversal import (
CommunicationRelayClient
)
if self.client_id is not None and self.client_secret is not None and self.tenant_id is not None:
from azure.identity import DefaultAzureCredential
endpoint, _ = parse_connection_str(self.connection_string)
relay_client = CommunicationRelayClient(endpoint, DefaultAzureCredential())
else:
relay_client = CommunicationRelayClient.from_connection_string(self.connection_string)
print("Getting relay configuration")
relay_configuration = relay_client.get_relay_configuration()
for iceServer in relay_configuration.ice_servers:
print("Icer server:")
print(iceServer)
if __name__ == '__main__':
sample = CommunicationRelayClientSamples()
sample.get_relay_config()
sample.get_relay_config_no_identity()
| [
"noreply@github.com"
] | catchsrinivas.noreply@github.com |
ea82efb595ff46fca54727748c1b999323c90b93 | a07fd8aca2d69ade2e388054dd2c1c9991232185 | /tests/test_tutorial/test_extra_models/test_tutorial005_py39.py | 7278e93c36ae40070c1e1c9c204a6b9fe699ffdc | [
"MIT"
] | permissive | vitalik/fastapi | 76b71bbbade19f12484c73dcbdca426197cc2db6 | 0276f5fd3aafb38dcbb430177a4685aeb58e5c69 | refs/heads/master | 2023-08-01T06:56:06.053824 | 2023-07-25T20:46:02 | 2023-07-25T20:46:02 | 315,668,229 | 1 | 0 | MIT | 2020-11-24T15:07:16 | 2020-11-24T15:07:15 | null | UTF-8 | Python | false | false | 1,668 | py | import pytest
from fastapi.testclient import TestClient
from ...utils import needs_py39
@pytest.fixture(name="client")
def get_client():
from docs_src.extra_models.tutorial005_py39 import app
client = TestClient(app)
return client
@needs_py39
def test_get_items(client: TestClient):
response = client.get("/keyword-weights/")
assert response.status_code == 200, response.text
assert response.json() == {"foo": 2.3, "bar": 3.4}
@needs_py39
def test_openapi_schema(client: TestClient):
response = client.get("/openapi.json")
assert response.status_code == 200, response.text
assert response.json() == {
"openapi": "3.1.0",
"info": {"title": "FastAPI", "version": "0.1.0"},
"paths": {
"/keyword-weights/": {
"get": {
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"title": "Response Read Keyword Weights Keyword Weights Get",
"type": "object",
"additionalProperties": {"type": "number"},
}
}
},
}
},
"summary": "Read Keyword Weights",
"operationId": "read_keyword_weights_keyword_weights__get",
}
}
},
}
| [
"noreply@github.com"
] | vitalik.noreply@github.com |
a5c2ed13a059f9c0461c139bca5cf192899f27f1 | 53fab060fa262e5d5026e0807d93c75fb81e67b9 | /backup/user_174/ch15_2020_09_26_19_02_03_724087.py | 7093b5ceea863fa860debe8cedbf5d38ea052f2d | [] | no_license | gabriellaec/desoft-analise-exercicios | b77c6999424c5ce7e44086a12589a0ad43d6adca | 01940ab0897aa6005764fc220b900e4d6161d36b | refs/heads/main | 2023-01-31T17:19:42.050628 | 2020-12-16T05:21:31 | 2020-12-16T05:21:31 | 306,735,108 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 126 | py | NOME=input("Qual o seu nome?")
if NOME=='Chris':
print("Todo mundo odeia o Chris")
else:
print("Olá,NOME")
| [
"you@example.com"
] | you@example.com |
31a29ed36747fc61bbeb4a01851ced2c621d027f | 0d65e96ce358b7a6827734f6a5598f8a7ecf75e8 | /klokah/補充教材句型篇解析.py | cade41c9545c7c4ac6eb047e4cc7e3d86f0b49cd | [] | no_license | Taiwanese-Corpus/klokah_data_extract | 68f26cb8e851a6ea2e05995d02a7e4e01e4481b3 | 25cd44b68075b7650a8ec10c1c38eb16b3ca113d | refs/heads/master | 2021-01-18T12:45:46.420151 | 2015-11-04T13:03:32 | 2015-11-04T13:03:32 | 34,839,122 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,474 | py | from bs4 import BeautifulSoup
from os.path import dirname, join, abspath
class 補充教材句型篇解析:
專案目錄 = join(dirname(abspath(__file__)), '..')
def 解析全部檔案(self):
with open(join(self.專案目錄, '資料', 'dialectView.xml')) as 檔案:
for 方言 in BeautifulSoup(檔案.read(), 'xml').find_all('item'):
語言名 = 方言.find('languageCh').get_text(strip=True)
方言編號 = 方言.find('dialectId').get_text(strip=True)
方言名 = 方言.find('dialectCh').get_text(strip=True)
for 一筆資料 in self.解析一個方言檔案(方言編號):
一筆資料['languageCh'] = 語言名
一筆資料['dialectCh'] = 方言名
yield 一筆資料
def 解析一個方言檔案(self, 方言編號):
for 級 in ['junior', 'senior']:
with open(join(self.專案目錄, '資料', '補充教材', 級, 'classView.xml')) as 檔案:
for 檔案標仔 in BeautifulSoup(檔案.read(), 'xml').find_all('classId'):
for 一筆資料 in self.解析一個句型篇檔案(級, 方言編號, 檔案標仔.get_text(strip=True)):
yield 一筆資料
def 解析一個句型篇檔案(self, 級, 方言編號, 檔案編號):
資料陣列 = []
with open(join(self.專案目錄, '資料', '補充教材', 級, str(方言編號), str(檔案編號) + '.xml')) as 檔案:
for 方言 in BeautifulSoup(檔案.read(), 'xml').find_all('item'):
一筆資料 = {}
for 資料內容 in 方言.find_all(True):
一筆資料[資料內容.name] = 資料內容.get_text(strip=True)
資料陣列.append(self._資料欄位正規化(一筆資料))
return 資料陣列
def _資料欄位正規化(self, 資料):
正規化函式 = {
'1': self._一基本詞彙,
'2': self._二生活百句,
'3': self._三看圖識字,
'4': self._四選擇題一,
'5': self._五選擇題二,
'6': self._六配合題,
'7': self._七選擇題三,
'8': self._八唸唸看,
'9': self._九簡短對話,
'10': self._十看圖說話,
}
正規化函式[資料['typeId']](資料)
return 資料
def _一基本詞彙(self, 資料):
資料['資料'] = [(資料['wordAb'], 資料['wordCh'])]
def _二生活百句(self, 資料):
self._傳欄位名正規化(
[
('sentenceAAb', 'sentenceACh'),
('sentenceBAb', 'sentenceBCh'),
('sentenceCAb', 'sentenceCCh'),
],
資料
)
def _三看圖識字(self, 資料):
資料['資料'] = [(資料['recognizeAb'], 資料['recognizeCh'])]
def _四選擇題一(self, 資料):
self._傳欄位名正規化(
[
('choiceOneAAb', 'choiceOneACh'),
('choiceOneBAb', 'choiceOneBCh'),
('choiceOneCAb', 'choiceOneCCh'),
],
資料
)
def _傳欄位名正規化(self, 欄位對照, 資料):
資料陣列 = []
for 族欄位, 華欄位 in 欄位對照:
if 資料[族欄位]:
資料陣列.append((資料[族欄位], 資料[華欄位]))
資料['資料'] = 資料陣列
def _五選擇題二(self, 資料):
self._傳欄位名正規化(
[
('choiceTwoAAb', 'choiceTwoACh'),
('choiceTwoBAb', 'choiceTwoBCh'),
('choiceTwoCAb', 'choiceTwoCCh'),
],
資料
)
def _六配合題(self, 資料):
self._傳欄位名正規化(
[
('matchAAbA', 'matchAChA'),
('matchAAbB', 'matchAChB'),
('matchBAbA', 'matchBChA'),
('matchBAbB', 'matchBChB'),
('matchCAbA', 'matchCChA'),
('matchCAbB', 'matchCChB'),
('matchDAbA', 'matchDChA'),
('matchDAbB', 'matchDChB'),
('matchEAbA', 'matchEChA'),
('matchEAbB', 'matchEChB'),
],
資料
)
def _七選擇題三(self, 資料):
資料['資料'] = [(資料['choiceThreeAb'], 資料['choiceThreeCh'])]
def _八唸唸看(self, 資料):
self._傳欄位名正規化(
[
('oralReadingAAb', 'oralReadingACh'),
('oralReadingBAb', 'oralReadingBCh'),
('oralReadingCAb', 'oralReadingCCh'),
('oralReadingDAb', 'oralReadingDCh'),
('oralReadingEAb', 'oralReadingECh'),
],
資料
)
def _九簡短對話(self, 資料):
self._傳欄位名正規化(
[
('dialogueAAb', 'dialogueACh'),
('dialogueBAb', 'dialogueBCh'),
('dialogueCAb', 'dialogueCCh'),
('dialogueDAb', 'dialogueDCh'),
('dialogueEAb', 'dialogueECh'),
],
資料
)
def _十看圖說話(self, 資料):
self._傳欄位名正規化(
[
('pictureTalkAb', 'pictureTalkCh'),
],
資料
)
| [
"ihcaoe@gmail.com"
] | ihcaoe@gmail.com |
ce1d61db205731db825c00f838e83aaa92c2bb1d | d40ffccfb981d789ead4e5e3be150c4b55fd9547 | /test/test_quantized_nn_mods.py | 2af6f3b8302548cddff206305c2797104f08506a | [
"BSD-3-Clause",
"BSD-2-Clause",
"LicenseRef-scancode-generic-cla",
"Apache-2.0"
] | permissive | bhelo/pthorch | 0307fa4a64cf130667a183b2ce341c712d898cfc | 6590ecf1c9d30c2cfa5dbc762ce03672275ac8af | refs/heads/1.3.namedComp | 2022-11-11T18:05:24.384016 | 2019-10-07T03:04:28 | 2019-10-07T03:04:28 | 236,931,055 | 0 | 1 | NOASSERTION | 2022-10-22T19:34:46 | 2020-01-29T07:57:41 | C++ | UTF-8 | Python | false | false | 23,850 | py | import torch
import torch.nn.quantized as nnq
import torch.nn.quantized.dynamic as nnqd
import torch.nn._intrinsic.quantized as nnq_fused
import torch.nn.quantized.functional as qF
from torch.nn.quantized.modules import Conv2d
from torch.nn._intrinsic.quantized import ConvReLU2d
import torch.quantization
from common_utils import run_tests
from common_quantization import QuantizationTestCase, prepare_dynamic
from common_quantized import _calculate_dynamic_qparams
from hypothesis import given
from hypothesis import strategies as st
from hypothesis_utils import no_deadline
import unittest
import io
'''
Note that tests in this file are just API test, to make sure we wrapped the
quantized operator implementations correctly in the user facing APIs, these are
not correctness test for the underlying quantized operators. For correctness
test please see `caffe2/test/test_quantized.py`.
'''
class FunctionalAPITest(QuantizationTestCase):
def test_relu_api(self):
X = torch.arange(-5, 5, dtype=torch.float)
scale = 2.0
zero_point = 1
qX = torch.quantize_per_tensor(X, scale=scale, zero_point=zero_point, dtype=torch.quint8)
qY = torch.relu(qX)
qY_hat = qF.relu(qX)
self.assertEqual(qY, qY_hat)
@no_deadline
@unittest.skipUnless('fbgemm' in torch.backends.quantized.supported_engines,
" Quantized operations require FBGEMM. FBGEMM is only optimized for CPUs"
" with instruction set support avx2 or newer.")
@given(
use_bias=st.booleans(),
)
def test_conv_api(self, use_bias):
"""Tests the correctness of the conv module.
The correctness is defined against the functional implementation.
"""
N, iC, H, W = 10, 10, 10, 3
oC, g, kH, kW = 16, 1, 3, 3
scale, zero_point = 1.0 / 255, 128
stride = (1, 1)
i_padding = (0, 0)
dilation = (1, 1)
X = torch.randn(N, iC, H, W, dtype=torch.float32)
qX = torch.quantize_per_tensor(X, scale=scale, zero_point=128, dtype=torch.quint8)
w = torch.randn(oC, iC // g, kH, kW, dtype=torch.float32)
qw = torch.quantize_per_tensor(w, scale=scale, zero_point=0, dtype=torch.qint8)
b = torch.randn(oC, dtype=torch.float32) if use_bias else None
q_filters_ref = torch.ops.quantized.conv_prepack(qw,
b,
stride,
i_padding,
dilation,
g)
ref_result = torch.ops.quantized.conv2d(qX, q_filters_ref,
stride,
i_padding, dilation,
g, scale, zero_point)
q_result = torch.nn.quantized.functional.conv2d(qX,
qw,
bias=b, scale=scale,
zero_point=zero_point,
stride=stride, padding=i_padding,
dilation=dilation, groups=g,
dtype=torch.quint8)
self.assertEqual(ref_result, q_result)
class DynamicModuleAPITest(QuantizationTestCase):
@no_deadline
@unittest.skipUnless('fbgemm' in torch.backends.quantized.supported_engines,
" Quantized operations require FBGEMM. FBGEMM is only optimized for CPUs"
" with instruction set support avx2 or newer.")
@given(
batch_size=st.integers(1, 5),
in_features=st.integers(16, 32),
out_features=st.integers(4, 8),
use_bias=st.booleans(),
use_default_observer=st.booleans(),
)
def test_linear_api(self, batch_size, in_features, out_features, use_bias, use_default_observer):
"""test API functionality for nn.quantized.dynamic.Linear"""
W = torch.rand(out_features, in_features).float()
W_scale, W_zp = _calculate_dynamic_qparams(W, torch.qint8)
W_q = torch.quantize_per_tensor(W, W_scale, W_zp, torch.qint8)
X = torch.rand(batch_size, in_features).float()
B = torch.rand(out_features).float() if use_bias else None
qlinear = nnqd.Linear(in_features, out_features)
# Run module with default-initialized parameters.
# This tests that the constructor is correct.
qlinear.set_weight_bias(W_q, B)
qlinear(X)
# Simple round-trip test to ensure weight()/set_weight() API
self.assertEqual(qlinear.weight(), W_q)
W_pack = qlinear._packed_params
Z_dq = qlinear(X)
# Check if the module implementation matches calling the
# ops directly
Z_ref = torch.ops.quantized.linear_dynamic(X, W_pack)
self.assertEqual(Z_ref, Z_dq)
# Test serialization of dynamic quantized Linear Module using state_dict
model_dict = qlinear.state_dict()
self.assertEqual(model_dict['weight'], W_q)
if use_bias:
self.assertEqual(model_dict['bias'], B)
b = io.BytesIO()
torch.save(model_dict, b)
b.seek(0)
loaded_dict = torch.load(b)
for key in model_dict:
self.assertEqual(model_dict[key], loaded_dict[key])
loaded_qlinear = nnqd.Linear(in_features, out_features)
loaded_qlinear.load_state_dict(loaded_dict)
linear_unpack = torch.ops.quantized.linear_unpack
self.assertEqual(linear_unpack(qlinear._packed_params),
linear_unpack(loaded_qlinear._packed_params))
if use_bias:
self.assertEqual(qlinear.bias(), loaded_qlinear.bias())
self.assertTrue(dir(qlinear) == dir(loaded_qlinear))
self.assertTrue(hasattr(qlinear, '_packed_params'))
self.assertTrue(hasattr(loaded_qlinear, '_packed_params'))
self.assertTrue(hasattr(qlinear, '_weight_bias'))
self.assertTrue(hasattr(loaded_qlinear, '_weight_bias'))
self.assertEqual(qlinear._weight_bias(), loaded_qlinear._weight_bias())
self.assertEqual(qlinear._weight_bias(), torch.ops.quantized.linear_unpack(qlinear._packed_params))
Z_dq2 = qlinear(X)
self.assertEqual(Z_dq, Z_dq2)
# The below check is meant to ensure that `torch.save` and `torch.load`
# serialization works, however it is currently broken by the following:
# https://github.com/pytorch/pytorch/issues/24045
#
# Instead, we currently check that the proper exception is thrown on save.
# <start code>
# b = io.BytesIO()
# torch.save(qlinear, b)
# b.seek(0)
# loaded = torch.load(b)
# self.assertEqual(qlinear.weight(), loaded.weight())
# self.assertEqual(qlinear.zero_point, loaded.zero_point)
# <end code>
with self.assertRaisesRegex(RuntimeError, r'torch.save\(\) is not currently supported'):
b = io.BytesIO()
torch.save(qlinear, b)
# Test JIT
self.checkScriptable(qlinear, list(zip([X], [Z_ref])), check_save_load=True)
# Test from_float
float_linear = torch.nn.Linear(in_features, out_features).float()
if use_default_observer:
float_linear.qconfig = torch.quantization.default_dynamic_qconfig
prepare_dynamic(float_linear)
float_linear(X.float())
quantized_float_linear = nnqd.Linear.from_float(float_linear)
# Smoke test to make sure the module actually runs
quantized_float_linear(X)
# Smoke test extra_repr
str(quantized_float_linear)
class ModuleAPITest(QuantizationTestCase):
def test_relu(self):
relu_module = nnq.ReLU()
relu6_module = nnq.ReLU6()
x = torch.arange(-10, 10, dtype=torch.float)
y_ref = torch.relu(x)
y6_ref = torch.nn.modules.ReLU6()(x)
qx = torch.quantize_per_tensor(x, 1.0, 0, dtype=torch.qint32)
qy = relu_module(qx)
qy6 = relu6_module(qx)
self.assertEqual(y_ref, qy.dequantize(),
message="ReLU module API failed")
self.assertEqual(y6_ref, qy6.dequantize(),
message="ReLU6 module API failed")
@no_deadline
@unittest.skipUnless('fbgemm' in torch.backends.quantized.supported_engines,
" Quantized operations require FBGEMM. FBGEMM is only optimized for CPUs"
" with instruction set support avx2 or newer.")
@given(
batch_size=st.integers(1, 5),
in_features=st.integers(16, 32),
out_features=st.integers(4, 8),
use_bias=st.booleans(),
use_fused=st.booleans(),
)
def test_linear_api(self, batch_size, in_features, out_features, use_bias, use_fused):
"""test API functionality for nn.quantized.linear and nn._intrinsic.quantized.linear_relu"""
W = torch.rand(out_features, in_features).float()
W_q = torch.quantize_per_tensor(W, 0.1, 4, torch.qint8)
X = torch.rand(batch_size, in_features).float()
X_q = torch.quantize_per_tensor(X, 0.2, 10, torch.quint8)
B = torch.rand(out_features).float() if use_bias else None
scale = 0.5
zero_point = 3
if use_fused:
qlinear = nnq_fused.LinearReLU(in_features, out_features)
else:
qlinear = nnq.Linear(in_features, out_features)
# Run module with default-initialized parameters.
# This tests that the constructor is correct.
qlinear(X_q)
qlinear.set_weight_bias(W_q, B)
# Simple round-trip test to ensure weight()/set_weight() API
self.assertEqual(qlinear.weight(), W_q)
W_pack = qlinear._packed_params
qlinear.scale = float(scale)
qlinear.zero_point = int(zero_point)
Z_q = qlinear(X_q)
# Check if the module implementation matches calling the
# ops directly
if use_fused:
Z_ref = torch.ops.quantized.linear_relu(X_q, W_pack, scale, zero_point)
else:
Z_ref = torch.ops.quantized.linear(X_q, W_pack, scale, zero_point)
self.assertEqual(Z_ref, Z_q)
# Test serialization of quantized Linear Module using state_dict
model_dict = qlinear.state_dict()
self.assertEqual(model_dict['weight'], W_q)
if use_bias:
self.assertEqual(model_dict['bias'], B)
b = io.BytesIO()
torch.save(model_dict, b)
b.seek(0)
loaded_dict = torch.load(b)
for key in model_dict:
self.assertEqual(model_dict[key], loaded_dict[key])
if use_fused:
loaded_qlinear = nnq_fused.LinearReLU(in_features, out_features)
else:
loaded_qlinear = nnq.Linear(in_features, out_features)
loaded_qlinear.load_state_dict(loaded_dict)
linear_unpack = torch.ops.quantized.linear_unpack
self.assertEqual(linear_unpack(qlinear._packed_params),
linear_unpack(loaded_qlinear._packed_params))
if use_bias:
self.assertEqual(qlinear.bias(), loaded_qlinear.bias())
self.assertEqual(qlinear.scale, loaded_qlinear.scale)
self.assertEqual(qlinear.zero_point, loaded_qlinear.zero_point)
self.assertTrue(dir(qlinear) == dir(loaded_qlinear))
self.assertTrue(hasattr(qlinear, '_packed_params'))
self.assertTrue(hasattr(loaded_qlinear, '_packed_params'))
self.assertTrue(hasattr(qlinear, '_weight_bias'))
self.assertTrue(hasattr(loaded_qlinear, '_weight_bias'))
self.assertEqual(qlinear._weight_bias(), loaded_qlinear._weight_bias())
self.assertEqual(qlinear._weight_bias(), torch.ops.quantized.linear_unpack(qlinear._packed_params))
Z_q2 = loaded_qlinear(X_q)
self.assertEqual(Z_q, Z_q2)
# The below check is meant to ensure that `torch.save` and `torch.load`
# serialization works, however it is currently broken by the following:
# https://github.com/pytorch/pytorch/issues/24045
#
# Instead, we currently check that the proper exception is thrown on save.
# <start code>
# b = io.BytesIO()
# torch.save(qlinear, b)
# b.seek(0)
# loaded = torch.load(b)
# self.assertEqual(qlinear.weight(), loaded.weight())
# self.assertEqual(qlinear.scale, loaded.scale)
# self.assertEqual(qlinear.zero_point, loaded.zero_point)
# <end code>
with self.assertRaisesRegex(RuntimeError, r'torch.save\(\) is not currently supported'):
b = io.BytesIO()
torch.save(qlinear, b)
# Test JIT
self.checkScriptable(qlinear, list(zip([X_q], [Z_ref])), check_save_load=True)
# Test from_float.
float_linear = torch.nn.Linear(in_features, out_features).float()
float_linear.qconfig = torch.quantization.default_qconfig
torch.quantization.prepare(float_linear, inplace=True)
float_linear(X.float())
# Sequential allows swapping using "convert".
quantized_float_linear = torch.nn.Sequential(float_linear)
quantized_float_linear = torch.quantization.convert(quantized_float_linear, inplace=True)
# Smoke test to make sure the module actually runs
quantized_float_linear(X_q)
# Smoke test extra_repr
str(quantized_float_linear)
def test_quant_dequant_api(self):
r = torch.tensor([[1., -1.], [1., -1.]], dtype=torch.float)
scale, zero_point, dtype = 1.0, 2, torch.qint8
# testing Quantize API
qr = torch.quantize_per_tensor(r, scale, zero_point, dtype)
quant_m = nnq.Quantize(scale, zero_point, dtype)
qr2 = quant_m(r)
self.assertEqual(qr, qr2)
# testing Dequantize API
rqr = qr.dequantize()
dequant_m = nnq.DeQuantize()
rqr2 = dequant_m(qr2)
self.assertEqual(rqr, rqr2)
@no_deadline
@unittest.skipUnless('fbgemm' in torch.backends.quantized.supported_engines,
" Quantized operations require FBGEMM. FBGEMM is only optimized for CPUs"
" with instruction set support avx2 or newer.")
@given(
use_bias=st.booleans(),
use_fused=st.booleans(),
)
def test_conv_api(self, use_bias, use_fused):
"""Tests the correctness of the conv module.
The correctness is defined against the functional implementation.
"""
N, iC, H, W = 10, 10, 10, 3
oC, g, kH, kW = 16, 1, 3, 3
scale, zero_point = 1.0 / 255, 128
X = torch.randn(N, iC, H, W, dtype=torch.float32)
qX = torch.quantize_per_tensor(X, scale=scale, zero_point=128, dtype=torch.quint8)
w = torch.randn(oC, iC // g, kH, kW, dtype=torch.float32)
qw = torch.quantize_per_tensor(w, scale=scale, zero_point=0, dtype=torch.qint8)
b = torch.randn(oC, dtype=torch.float32) if use_bias else None
if use_fused:
conv_under_test = ConvReLU2d(in_channels=iC,
out_channels=oC,
kernel_size=(kH, kW),
stride=1,
padding=0,
dilation=1,
groups=g,
bias=use_bias,
padding_mode='zeros')
else:
conv_under_test = Conv2d(in_channels=iC,
out_channels=oC,
kernel_size=(kH, kW),
stride=1,
padding=0,
dilation=1,
groups=g,
bias=use_bias,
padding_mode='zeros')
# Run module with default-initialized parameters.
# This tests that the constructor is correct.
conv_under_test.set_weight_bias(qw, b)
conv_under_test(qX)
conv_under_test.scale = scale
conv_under_test.zero_point = zero_point
# Test members
self.assertTrue(hasattr(conv_under_test, '_packed_params'))
self.assertTrue(hasattr(conv_under_test, 'scale'))
self.assertTrue(hasattr(conv_under_test, 'zero_point'))
# Test properties
self.assertEqual(qw, conv_under_test.weight())
self.assertEqual(b, conv_under_test.bias())
self.assertEqual(scale, conv_under_test.scale)
self.assertEqual(zero_point, conv_under_test.zero_point)
# Test forward
result_under_test = conv_under_test(qX)
result_reference = qF.conv2d(qX, qw, bias=b,
scale=scale, zero_point=zero_point,
stride=1, padding=0,
dilation=1, groups=g, dtype=torch.quint8
)
if use_fused:
# result_reference < zero_point doesn't work for qtensor yet
# result_reference[result_reference < zero_point] = zero_point
MB, OC, OH, OW = result_reference.size()
for i in range(MB):
for j in range(OC):
for h in range(OH):
for w in range(OW):
if result_reference[i][j][h][w].int_repr() < zero_point:
# assign 0. that gets converted to zero_point
result_reference[i][j][h][w] = 0.
self.assertEqual(result_reference, result_under_test,
message="Tensors are not equal.")
# Test serialization of quantized Conv Module using state_dict
model_dict = conv_under_test.state_dict()
self.assertEqual(model_dict['weight'], qw)
if use_bias:
self.assertEqual(model_dict['bias'], b)
b = io.BytesIO()
torch.save(model_dict, b)
b.seek(0)
loaded_dict = torch.load(b)
for key in model_dict:
self.assertEqual(loaded_dict[key], model_dict[key])
if use_fused:
loaded_conv_under_test = ConvReLU2d(in_channels=iC,
out_channels=oC,
kernel_size=(kH, kW),
stride=1,
padding=0,
dilation=1,
groups=g,
bias=use_bias,
padding_mode='zeros')
else:
loaded_conv_under_test = Conv2d(in_channels=iC,
out_channels=oC,
kernel_size=(kH, kW),
stride=1,
padding=0,
dilation=1,
groups=g,
bias=use_bias,
padding_mode='zeros')
loaded_conv_under_test.load_state_dict(loaded_dict)
self.assertEqual(loaded_conv_under_test._weight_bias(), conv_under_test._weight_bias())
if use_bias:
self.assertEqual(loaded_conv_under_test.bias(), conv_under_test.bias())
self.assertEqual(loaded_conv_under_test.scale, conv_under_test.scale)
self.assertEqual(loaded_conv_under_test.zero_point, conv_under_test.zero_point)
self.assertTrue(dir(loaded_conv_under_test) == dir(conv_under_test))
self.assertTrue(hasattr(conv_under_test, '_packed_params'))
self.assertTrue(hasattr(loaded_conv_under_test, '_packed_params'))
self.assertTrue(hasattr(conv_under_test, '_weight_bias'))
self.assertTrue(hasattr(loaded_conv_under_test, '_weight_bias'))
self.assertEqual(loaded_conv_under_test._weight_bias(), conv_under_test._weight_bias())
self.assertEqual(loaded_conv_under_test.weight(), qw)
loaded_result = loaded_conv_under_test(qX)
self.assertEqual(loaded_result, result_reference)
# The below check is meant to ensure that `torch.save` and `torch.load`
# serialization works, however it is currently broken by the following:
# https://github.com/pytorch/pytorch/issues/24045
#
# Instead, we currently check that the proper exception is thrown on save.
# <start code>
# b = io.BytesIO()
# torch.save(conv_under_test, b)
# b.seek(0)
# loaded_conv = torch.load(b)
#
# self.assertEqual(conv_under_test.bias(), loaded_conv.bias())
# self.assertEqual(conv_under_test.scale, loaded_conv.scale)
# self.assertEqual(conv_under_test.zero_point, loaded_conv.zero_point)
# <end code>
with self.assertRaisesRegex(RuntimeError, r'torch.save\(\) is not currently supported'):
b = io.BytesIO()
torch.save(conv_under_test, b)
# JIT testing
self.checkScriptable(conv_under_test, list(zip([qX], [result_reference])), check_save_load=True)
# Test from_float
float_conv = torch.nn.Conv2d(in_channels=iC,
out_channels=oC,
kernel_size=(kH, kW),
stride=1,
padding=0,
dilation=1,
groups=g,
bias=use_bias,
padding_mode='zeros').float()
float_conv.qconfig = torch.quantization.default_qconfig
torch.quantization.prepare(float_conv, inplace=True)
float_conv(X.float())
quantized_float_conv = torch.nn.Sequential(float_conv)
torch.quantization.convert(quantized_float_conv, inplace=True)
# Smoke test to make sure the module actually runs
quantized_float_conv(qX)
if use_bias:
self.assertEqual(quantized_float_conv[0].bias(), float_conv.bias)
# Smoke test extra_repr
str(quantized_float_conv)
def test_pool_api(self):
"""Tests the correctness of the pool module.
The correctness is defined against the functional implementation.
"""
N, C, H, W = 10, 10, 10, 3
kwargs = {
'kernel_size': 2,
'stride': None,
'padding': 0,
'dilation': 1
}
scale, zero_point = 1.0 / 255, 128
X = torch.randn(N, C, H, W, dtype=torch.float32)
qX = torch.quantize_per_tensor(X, scale=scale, zero_point=zero_point,
dtype=torch.quint8)
qX_expect = torch.nn.functional.max_pool2d(qX, **kwargs)
pool_under_test = torch.nn.quantized.MaxPool2d(**kwargs)
qX_hat = pool_under_test(qX)
self.assertEqual(qX_expect, qX_hat)
# JIT Testing
self.checkScriptable(pool_under_test, list(zip([X], [qX_expect])))
if __name__ == '__main__':
run_tests()
| [
"facebook-github-bot@users.noreply.github.com"
] | facebook-github-bot@users.noreply.github.com |
960b6662c8bb4ab84cb3afa154fccf1b85150481 | 6fcfb638fa725b6d21083ec54e3609fc1b287d9e | /python/benanne_kaggle-ndsb/kaggle-ndsb-master/configurations/bagging_20_cp8.py | 076d49cce4675181859ea0dde853b7ff7e22974b | [] | no_license | LiuFang816/SALSTM_py_data | 6db258e51858aeff14af38898fef715b46980ac1 | d494b3041069d377d6a7a9c296a14334f2fa5acc | refs/heads/master | 2022-12-25T06:39:52.222097 | 2019-12-12T08:49:07 | 2019-12-12T08:49:07 | 227,546,525 | 10 | 7 | null | 2022-12-19T02:53:01 | 2019-12-12T07:29:39 | Python | UTF-8 | Python | false | false | 5,727 | py | import numpy as np
import theano
import theano.tensor as T
import lasagne as nn
import data
import load
import nn_plankton
import dihedral
import dihedral_fast
import tmp_dnn
import tta
validation_split_path = "splits/bagging_split_20.pkl"
patch_sizes = [(95, 95), (95, 95)]
augmentation_params = {
'zoom_range': (1 / 1.6, 1.6),
'rotation_range': (0, 360),
'shear_range': (-20, 20),
'translation_range': (-10, 10),
'do_flip': True,
'allow_stretch': 1.3,
}
batch_size = 128 // 8
chunk_size = 32768 // 8
num_chunks_train = 840
momentum = 0.9
learning_rate_schedule = {
0: 0.003,
700: 0.0003,
800: 0.00003,
}
validate_every = 20
save_every = 20
def tf1(img):
ds_factor = np.maximum(img.shape[0], img.shape[1]) / 85.0
return data.build_rescale_transform(ds_factor, img.shape, patch_sizes[0])
def tf2(img):
tf = tf1(img)
tf_center, tf_uncenter = data.build_center_uncenter_transforms(img.shape)
tf_rot = data.build_augmentation_transform(rotation=45)
tf_rot = tf_uncenter + tf_rot + tf_center
return tf + tf_rot
scale_factors = [tf1, tf2]
augmentation_transforms_test = tta.build_quasirandom_transforms(35, **{
'zoom_range': (1 / 1.4, 1.4),
'rotation_range': (0, 360),
'shear_range': (-10, 10),
'translation_range': (-8, 8),
'do_flip': True,
'allow_stretch': 1.2,
})
data_loader = load.ZmuvMultiscaleDataLoader(scale_factors=scale_factors, num_chunks_train=num_chunks_train,
patch_sizes=patch_sizes, chunk_size=chunk_size, augmentation_params=augmentation_params,
augmentation_transforms_test=augmentation_transforms_test, validation_split_path=validation_split_path)
# Conv2DLayer = nn.layers.cuda_convnet.Conv2DCCLayer
# MaxPool2DLayer = nn.layers.cuda_convnet.MaxPool2DCCLayer
Conv2DLayer = tmp_dnn.Conv2DDNNLayer
MaxPool2DLayer = tmp_dnn.MaxPool2DDNNLayer
def build_model():
l0 = nn.layers.InputLayer((batch_size, 1, patch_sizes[0][0], patch_sizes[0][1]))
l0_45 = nn.layers.InputLayer((batch_size, 1, patch_sizes[1][0], patch_sizes[1][1]))
l0_both = nn.layers.concat([l0, l0_45], axis=0) # stack both
l0c = dihedral.CyclicSliceLayer(l0_both)
l1a = Conv2DLayer(l0c, num_filters=32, filter_size=(3, 3), border_mode="same", W=nn_plankton.Conv2DOrthogonal(1.0), b=nn.init.Constant(0.1), nonlinearity=nn_plankton.leaky_relu, untie_biases=True)
l1b = Conv2DLayer(l1a, num_filters=16, filter_size=(3, 3), border_mode="same", W=nn_plankton.Conv2DOrthogonal(1.0), b=nn.init.Constant(0.1), nonlinearity=nn_plankton.leaky_relu, untie_biases=True)
l1 = MaxPool2DLayer(l1b, ds=(3, 3), strides=(2, 2))
l1r = dihedral_fast.CyclicConvRollLayer(l1)
l2a = Conv2DLayer(l1r, num_filters=64, filter_size=(3, 3), border_mode="same", W=nn_plankton.Conv2DOrthogonal(1.0), b=nn.init.Constant(0.1), nonlinearity=nn_plankton.leaky_relu, untie_biases=True)
l2b = Conv2DLayer(l2a, num_filters=32, filter_size=(3, 3), border_mode="same", W=nn_plankton.Conv2DOrthogonal(1.0), b=nn.init.Constant(0.1), nonlinearity=nn_plankton.leaky_relu, untie_biases=True)
l2 = MaxPool2DLayer(l2b, ds=(3, 3), strides=(2, 2))
l2r = dihedral_fast.CyclicConvRollLayer(l2)
l3a = Conv2DLayer(l2r, num_filters=128, filter_size=(3, 3), border_mode="same", W=nn_plankton.Conv2DOrthogonal(1.0), b=nn.init.Constant(0.1), nonlinearity=nn_plankton.leaky_relu, untie_biases=True)
l3b = Conv2DLayer(l3a, num_filters=128, filter_size=(3, 3), border_mode="same", W=nn_plankton.Conv2DOrthogonal(1.0), b=nn.init.Constant(0.1), nonlinearity=nn_plankton.leaky_relu, untie_biases=True)
l3c = Conv2DLayer(l3b, num_filters=64, filter_size=(3, 3), border_mode="same", W=nn_plankton.Conv2DOrthogonal(1.0), b=nn.init.Constant(0.1), nonlinearity=nn_plankton.leaky_relu, untie_biases=True)
l3 = MaxPool2DLayer(l3c, ds=(3, 3), strides=(2, 2))
l3r = dihedral_fast.CyclicConvRollLayer(l3)
l4a = Conv2DLayer(l3r, num_filters=256, filter_size=(3, 3), border_mode="same", W=nn_plankton.Conv2DOrthogonal(1.0), b=nn.init.Constant(0.1), nonlinearity=nn_plankton.leaky_relu, untie_biases=True)
l4b = Conv2DLayer(l4a, num_filters=256, filter_size=(3, 3), border_mode="same", W=nn_plankton.Conv2DOrthogonal(1.0), b=nn.init.Constant(0.1), nonlinearity=nn_plankton.leaky_relu, untie_biases=True)
l4c = Conv2DLayer(l4b, num_filters=128, filter_size=(3, 3), border_mode="same", W=nn_plankton.Conv2DOrthogonal(1.0), b=nn.init.Constant(0.1), nonlinearity=nn_plankton.leaky_relu, untie_biases=True)
l4 = MaxPool2DLayer(l4c, ds=(3, 3), strides=(2, 2))
l4r = dihedral_fast.CyclicConvRollLayer(l4)
l4f = nn.layers.flatten(l4r)
l5 = nn.layers.DenseLayer(nn.layers.dropout(l4f, p=0.5), num_units=1024, W=nn_plankton.Orthogonal(1.0), b=nn.init.Constant(0.1), nonlinearity=nn_plankton.leaky_relu)
l5fp = nn.layers.FeaturePoolLayer(l5, ds=2)
l5m = dihedral.DihedralPoolLayer(l5fp, pool_function=nn_plankton.rms) # reusing the dihedral pool layer here for 8-way cyclic pooling. Ew!
l6 = nn.layers.DenseLayer(nn.layers.dropout(l5m, p=0.5), num_units=1024, W=nn_plankton.Orthogonal(1.0), b=nn.init.Constant(0.1), nonlinearity=nn_plankton.leaky_relu)
l6fp = nn.layers.FeaturePoolLayer(l6, ds=2)
l7 = nn.layers.DenseLayer(nn.layers.dropout(l6fp, p=0.5), num_units=data.num_classes, nonlinearity=T.nnet.softmax, W=nn_plankton.Orthogonal(1.0))
return [l0, l0_45], l7
def build_objective(l_ins, l_out):
lambda_reg = 0.0005
params = nn.layers.get_all_non_bias_params(l_out)
reg_term = sum(T.sum(p**2) for p in params)
def loss(y, t):
return nn_plankton.log_loss(y, t) + lambda_reg * reg_term
return nn.objectives.Objective(l_out, loss_function=loss)
| [
"659338505@qq.com"
] | 659338505@qq.com |
3307b14e93f64351ac32c094b1588ce301c3bf9c | f0b549be6b291d98c20efc8a7b6322ae556f0068 | /data_structures/tree/binary_search_tree/binary_search_tree.py | 195990630439a798f46f1de4c5072e9efba16155 | [] | no_license | ehdgua01/Algorithms | 3607871d35521172e5f94c5dccb3b4e9e008fe61 | 107173ddf91f3588f10adbe294b64d680675a9ee | refs/heads/master | 2022-03-16T10:47:34.986441 | 2022-03-03T14:59:19 | 2022-03-03T15:28:44 | 249,157,085 | 3 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,148 | py | """
대용량의 데이터에 적합하지 않은 알고리즘이지만,
이진 탐색 트리 자료 구조를 학습하기 위한 알고리즘입니다.
"""
class Node(object):
def __init__(self, value) -> None:
self.left = None
self.right = None
self.parent = None
self.value = value
class BinarySearchTree(object):
def __init__(self) -> None:
self.root = None
def get_min(self, collection: Node, /) -> Node:
if collection.left:
return self.get_min(collection.left)
else:
return collection
def get_max(self, collection: Node, /) -> Node:
if collection.right:
return self.get_max(collection.right)
else:
return collection
def find_index(self, target: Node, /, collection=None):
if self.is_empty or collection is None:
return None
else:
if collection.value < target.value:
if collection.right:
collection = collection.right
else:
return collection
else:
if collection.left:
collection = collection.left
else:
return collection
return self.find_index(target, collection=collection)
def insert(self, node: Node, /) -> None:
if self.is_empty:
self.root = node
else:
index = self.find_index(node, collection=self.root)
node.parent = index
if index.value < node.value:
index.right = node
else:
index.left = node
def search(self, target, /, collection=None):
if self.is_empty or collection is None:
return None
else:
if collection.value == target:
return collection
elif collection.value < target:
return self.search(target, collection=collection.right)
else:
return self.search(target, collection=collection.left)
def remove(self, target, /):
if self.is_empty:
return None
collection = self.search(target, collection=self.root)
if collection is None:
return None
else:
self.__remove(collection, collection.parent)
def __remove(self, collection: Node, parent, /):
temp = None
if collection.right and collection.left:
temp = self.get_min(collection.right)
self.__remove(temp, temp.parent)
temp.left = collection.left
temp.right = collection.right
elif collection.right:
temp = collection.right
elif collection.left:
temp = collection.left
if temp:
temp.parent = parent
if parent:
is_left = parent.left == collection
if is_left:
parent.left = temp
else:
parent.right = temp
else:
self.root = temp
@property
def is_empty(self):
return self.root is None
| [
"ehdgua01@naver.com"
] | ehdgua01@naver.com |
bf650208e6b6746d1222cef1a8020c6fc0507a04 | 9743d5fd24822f79c156ad112229e25adb9ed6f6 | /xai/brain/wordbase/exclamations/_mans.py | 9abf726d7a0faffa49e8a16610dd007e86804acd | [
"MIT"
] | permissive | cash2one/xai | de7adad1758f50dd6786bf0111e71a903f039b64 | e76f12c9f4dcf3ac1c7c08b0cc8844c0b0a104b6 | refs/heads/master | 2021-01-19T12:33:54.964379 | 2017-01-28T02:00:50 | 2017-01-28T02:00:50 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 231 | py |
from xai.brain.wordbase.exclamations._man import _MAN
#calss header
class _MANS(_MAN, ):
def __init__(self,):
_MAN.__init__(self)
self.name = "MANS"
self.specie = 'exclamations'
self.basic = "man"
self.jsondata = {}
| [
"xingwang1991@gmail.com"
] | xingwang1991@gmail.com |
dae6a8f58e1e7f55370b2c531273fc77c51f3f32 | a62c437ed0beca4bb32cd085c7ba7bad80ce2022 | /urls.py | 1528960e812fc75085bdf164dade44bdc4fba14c | [
"MIT"
] | permissive | Lvxingpai/viae-gateway | d23303324e533bbe85f6209d3ca0eb67c9f5b07f | 5d88c3f0c7d1edd3e42da6bed6b866374ff7977b | refs/heads/master | 2021-01-10T16:58:05.079719 | 2016-01-15T06:23:01 | 2016-01-15T06:23:01 | 49,177,568 | 1 | 0 | null | 2016-01-10T08:50:08 | 2016-01-07T03:09:39 | Python | UTF-8 | Python | false | false | 254 | py | from django.conf.urls import url
from app.views import tasks, pong
# Uncomment the next two lines to enable the admin:
# from django.contrib import admin
# admin.autodiscover()
urlpatterns = [
url(r'ping/?$', pong),
url(r'^tasks/?$', tasks)
]
| [
"haizi.zh@gmail.com"
] | haizi.zh@gmail.com |
d9c5c7a4043db90471483a4129edf0208f509295 | c97a3396b9a574a8b43240a3a9d139be5d8dd204 | /config/setting.py | 2749adf6382f19add77cf0b560943e49549760ff | [] | no_license | cs4224485/ATM | 524f69335b8d0ca3cf910b9af36737370ab23d6c | c6ce9be03b55390f20f2bc763ade3fe8998dec9e | refs/heads/master | 2020-03-27T06:23:08.788653 | 2018-08-26T02:11:14 | 2018-08-26T02:11:14 | 146,101,769 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 798 | py | # Author: harry.cai
# DATE: 2018/1/31
import os
import logging
BASEDIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
USER_DB_PATH = os.path.join(BASEDIR, 'account', 'userdb')
ADMIN_DB_PATH = os.path.join(BASEDIR, 'account', 'admindb')
LOGGER_DB_PATH = os.path.join(BASEDIR, 'log', 'logdb')
# 日志类型
LogType = {
'access': 'access_log',
'transaction': 'transaction_log'
}
# 日志级别
LogLevel = {
'global': logging.DEBUG,
'console': logging.WARNING,
'file': logging.INFO
}
# 交易类型
TransAction = {
'transfer': {'method': 'plus_reduce', 'interest': 0},
'repay': {'method': 'plus', 'interest': 0},
'withdraw': {'method': 'reduce', 'interest': 0.05},
'consume': {'method': 'reduce', 'interest': 0}
}
| [
"414804000@qq.com"
] | 414804000@qq.com |
dae6836cf32d21b82c2ab6ec8088998e119643f4 | 60ec1bf5342eca3d97629dcdf974f7731d7be12b | /streamblocks/migrations/0002_indexedparagraph_height.py | 99cb5c1e1beb6fc4e73c255c435ba02a862c3105 | [
"BSD-2-Clause"
] | permissive | andywar65/rpnew_base | 8eef1b71562a00889d170b1668faa487a753cb05 | 9281cb16783313a1cd23b1394f2bad485ac1b33d | refs/heads/master | 2020-09-07T15:06:23.205802 | 2020-03-09T17:24:13 | 2020-03-09T17:24:13 | 220,818,439 | 1 | 0 | BSD-2-Clause | 2020-02-16T12:30:04 | 2019-11-10T16:38:52 | Python | UTF-8 | Python | false | false | 468 | py | # Generated by Django 3.0.2 on 2020-02-07 15:38
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('streamblocks', '0001_initial'),
]
operations = [
migrations.AddField(
model_name='indexedparagraph',
name='height',
field=models.CharField(choices=[('4', 'Medio'), ('5', 'Piccolo'), ('6', 'Molto piccolo')], default='4', max_length=1),
),
]
| [
"andy.war1965@gmail.com"
] | andy.war1965@gmail.com |
6dd9bbaa78c54ffbd643c88383638be880d8dd27 | bcdb24b6e8ffb2f0616e68965c1cb69841bde302 | /ml_explore/deepLearning/multi_gpu.py | bbab9a937466b0d88c600b89de753efce966fdfa | [] | no_license | Fisher87/ai_explore | 962fcf66acf81077ffe5cbd37108ea12ca2eb70a | 90898f8315a71207f746c57476a175bb92ef7a85 | refs/heads/master | 2022-09-12T23:42:28.360063 | 2022-09-01T07:06:35 | 2022-09-01T07:06:35 | 224,246,505 | 63 | 14 | null | null | null | null | UTF-8 | Python | false | false | 13,254 | py | #!/usr/bin/env python
# coding=utf-8
#================================================================
# Copyright (C) 2020 Fisher. All rights reserved.
#
# 文件名称:mulit_gpu.py
# 创 建 者:YuLianghua
# 创建日期:2020年01月09日
# 描 述:多卡训练
# reference: [1]. https://github.com/tensorflow/models/blob/master/tutorials/image/cifar10/cifar10_multi_gpu_train.py
#
#================================================================
import sys
import os
import numpy as np
import time
import tensorflow as tf
from tensorflow.examples.tutorials.mnist import input_data
def get_weight_varible(name,shape):
return tf.get_variable(name, shape=shape,
initializer=tf.contrib.layers.xavier_initializer())
def get_bias_varible(name,shape):
return tf.get_variable(name, shape=shape,
initializer=tf.contrib.layers.xavier_initializer())
#filter_shape: [f_h, f_w, f_ic, f_oc]
def conv2d(layer_name, x, filter_shape):
with tf.variable_scope(layer_name):
w = get_weight_varible('w', filter_shape)
b = get_bias_varible('b', filter_shape[-1])
y = tf.nn.bias_add(tf.nn.conv2d(input=x, filter=w, strides=[1, 1, 1, 1], padding='SAME'), b)
return y
def pool2d(layer_name, x):
with tf.variable_scope(layer_name):
y = tf.nn.max_pool(x, ksize=[1, 2, 2, 1], strides=[1, 2, 2, 1], padding='SAME')
return y
#inp_shape: [N, L]
#out_shape: [N, L]
def fc(layer_name, x, inp_shape, out_shape):
with tf.variable_scope(layer_name):
inp_dim = inp_shape[-1]
out_dim = out_shape[-1]
y = tf.reshape(x, shape=inp_shape)
w = get_weight_varible('w', [inp_dim, out_dim])
b = get_bias_varible('b', [out_dim])
y = tf.add(tf.matmul(y, w), b)
return y
def build_model(x):
y = tf.reshape(x,shape=[-1, 28, 28, 1])
#layer 1
y = conv2d('conv_1', y, [3, 3, 1, 8])
y = pool2d('pool_1', y)
#layer 2
y = conv2d('conv_2', y, [3, 3, 8, 16])
y = pool2d('pool_2', y)
#layer fc
y = fc('fc', y, [-1, 7*7*16], [-1, 10])
return y
def average_losses(loss):
tf.add_to_collection('losses', loss)
# Assemble all of the losses for the current tower only.
losses = tf.get_collection('losses')
# Calculate the total loss for the current tower.
regularization_losses = tf.get_collection(tf.GraphKeys.REGULARIZATION_LOSSES)
total_loss = tf.add_n(losses + regularization_losses, name='total_loss')
# Compute the moving average of all individual losses and the total loss.
loss_averages = tf.train.ExponentialMovingAverage(0.9, name='avg')
loss_averages_op = loss_averages.apply(losses + [total_loss])
with tf.control_dependencies([loss_averages_op]):
total_loss = tf.identity(total_loss)
return total_loss
def average_gradients(tower_grads):
average_grads = []
for grad_and_vars in zip(*tower_grads):
# Note that each grad_and_vars looks like the following:
# ((grad0_gpu0, var0_gpu0), ... , (grad0_gpuN, var0_gpuN))
grads = [g for g, _ in grad_and_vars]
# Average over the 'tower' dimension.
grad = tf.stack(grads, 0)
grad = tf.reduce_mean(grad, 0)
# Keep in mind that the Variables are redundant because they are shared
# across towers. So .. we will just return the first tower's pointer to
# the Variable.
v = grad_and_vars[0][1]
grad_and_var = (grad, v)
average_grads.append(grad_and_var)
return average_grads
def feed_all_gpu(inp_dict, models, payload_per_gpu, batch_x, batch_y):
for i in range(len(models)):
x, y, _, _, _ = models[i]
start_pos = i * payload_per_gpu
stop_pos = (i + 1) * payload_per_gpu
inp_dict[x] = batch_x[start_pos:stop_pos]
inp_dict[y] = batch_y[start_pos:stop_pos]
return inp_dict
def single_gpu():
batch_size = 128
mnist = input_data.read_data_sets('/tmp/data/mnist',one_hot=True)
tf.reset_default_graph()
with tf.Session() as sess:
with tf.device('/cpu:0'):
print('build model...')
print('build model on gpu tower...')
with tf.device('/gpu:0'):
x = tf.placeholder(tf.float32, [None, 784])
y = tf.placeholder(tf.float32, [None, 10])
pred = build_model(x)
loss = tf.reduce_mean(tf.nn.softmax_cross_entropy_with_logits(logits=pred, labels=y))
learning_rate = tf.placeholder(tf.float32, shape=[])
train_op = tf.train.AdamOptimizer(learning_rate=learning_rate).minimize(loss)
print('build model on gpu tower done.')
print('reduce model on cpu...')
all_y = tf.reshape(y, [-1,10])
all_pred = tf.reshape(pred, [-1,10])
correct_pred = tf.equal(tf.argmax(all_y, 1), tf.argmax(all_pred, 1))
accuracy = tf.reduce_mean(tf.cast(correct_pred, 'float'))
print('reduce model on cpu done.')
print('run train op...')
sess.run(tf.global_variables_initializer())
lr = 0.01
for epoch in range(2):
start_time = time.time()
total_batch = int(mnist.train.num_examples/batch_size)
avg_loss = 0.0
print('\n---------------------')
print('Epoch:%d, lr:%.4f' % (epoch,lr))
for batch_idx in range(total_batch):
batch_x,batch_y = mnist.train.next_batch(batch_size)
inp_dict = {}
inp_dict[learning_rate] = lr
inp_dict[x] = batch_x
inp_dict[y] = batch_y
_, _loss = sess.run([train_op, loss], inp_dict)
avg_loss += _loss
avg_loss /= total_batch
print('Train loss:%.4f' % (avg_loss))
lr = max(lr * 0.7,0.00001)
total_batch = int(mnist.validation.num_examples / batch_size)
preds = None
ys = None
for batch_idx in range(total_batch):
batch_x,batch_y = mnist.validation.next_batch(batch_size)
inp_dict = {}
inp_dict[x] = batch_x
inp_dict[y] = batch_y
batch_pred,batch_y = sess.run([all_pred,all_y], inp_dict)
if preds is None:
preds = batch_pred
else:
preds = np.concatenate((preds, batch_pred), 0)
if ys is None:
ys = batch_y
else:
ys = np.concatenate((ys,batch_y),0)
val_accuracy = sess.run([accuracy], {all_y:ys, all_pred:preds})[0]
print('Val Accuracy: %0.4f%%' % (100.0 * val_accuracy))
stop_time = time.time()
elapsed_time = stop_time - start_time
print('Cost time: ' + str(elapsed_time) + ' sec.')
print('training done.')
total_batch = int(mnist.test.num_examples / batch_size)
preds = None
ys = None
for batch_idx in range(total_batch):
batch_x, batch_y = mnist.test.next_batch(batch_size)
inp_dict = {}
inp_dict[x] = batch_x
inp_dict[y] = batch_y
batch_pred, batch_y = sess.run([all_pred, all_y], inp_dict)
if preds is None:
preds = batch_pred
else:
preds = np.concatenate((preds, batch_pred), 0)
if ys is None:
ys = batch_y
else:
ys = np.concatenate((ys, batch_y), 0)
test_accuracy = sess.run([accuracy], {all_y: ys, all_pred: preds})[0]
print('Test Accuracy: %0.4f%%' % (100.0 * test_accuracy))
def multi_gpu(num_gpu):
batch_size = 128 * num_gpu
mnist = input_data.read_data_sets('./data',one_hot=True)
tf.reset_default_graph()
with tf.Session() as sess:
with tf.device('/cpu:0'):
learning_rate = tf.placeholder(tf.float32, shape=[])
opt = tf.train.AdamOptimizer(learning_rate=learning_rate)
print('build model...')
print('build model on gpu tower...')
models = []
for gpu_id in range(num_gpu):
with tf.device('/gpu:%d' % gpu_id):
print('tower:%d...'% gpu_id)
with tf.name_scope('tower_%d' % gpu_id):
with tf.variable_scope('cpu_variables', reuse=gpu_id>0):
x = tf.placeholder(tf.float32, [None, 784])
y = tf.placeholder(tf.float32, [None, 10])
pred = build_model(x)
loss = tf.reduce_mean(tf.nn.softmax_cross_entropy_with_logits(logits=pred, labels=y))
grads = opt.compute_gradients(loss)
models.append((x,y,pred,loss,grads))
print('build model on gpu tower done.')
print('reduce model on cpu...')
tower_x, tower_y, tower_preds, tower_losses, tower_grads = zip(*models)
aver_loss_op = tf.reduce_mean(tower_losses)
apply_gradient_op = opt.apply_gradients(average_gradients(tower_grads))
all_y = tf.reshape(tf.stack(tower_y, 0), [-1,10])
all_pred = tf.reshape(tf.stack(tower_preds, 0), [-1,10])
correct_pred = tf.equal(tf.argmax(all_y, 1), tf.argmax(all_pred, 1))
accuracy = tf.reduce_mean(tf.cast(correct_pred, 'float'))
print('reduce model on cpu done.')
print('run train op...')
sess.run(tf.global_variables_initializer())
lr = 0.01
for epoch in range(2):
start_time = time.time()
payload_per_gpu = batch_size/num_gpu
total_batch = int(mnist.train.num_examples/batch_size)
avg_loss = 0.0
print('\n---------------------')
print('Epoch:%d, lr:%.4f' % (epoch,lr))
for batch_idx in range(total_batch):
batch_x,batch_y = mnist.train.next_batch(batch_size)
inp_dict = {}
inp_dict[learning_rate] = lr
inp_dict = feed_all_gpu(inp_dict, models, payload_per_gpu, batch_x, batch_y)
_, _loss = sess.run([apply_gradient_op, aver_loss_op], inp_dict)
avg_loss += _loss
avg_loss /= total_batch
print('Train loss:%.4f' % (avg_loss))
lr = max(lr * 0.7,0.00001)
val_payload_per_gpu = batch_size / num_gpu
total_batch = int(mnist.validation.num_examples / batch_size)
preds = None
ys = None
for batch_idx in range(total_batch):
batch_x,batch_y = mnist.validation.next_batch(batch_size)
inp_dict = feed_all_gpu({}, models, val_payload_per_gpu, batch_x, batch_y)
batch_pred,batch_y = sess.run([all_pred,all_y], inp_dict)
if preds is None:
preds = batch_pred
else:
preds = np.concatenate((preds, batch_pred), 0)
if ys is None:
ys = batch_y
else:
ys = np.concatenate((ys,batch_y),0)
val_accuracy = sess.run([accuracy], {all_y:ys, all_pred:preds})[0]
print('Val Accuracy: %0.4f%%' % (100.0 * val_accuracy))
stop_time = time.time()
elapsed_time = stop_time-start_time
print('Cost time: ' + str(elapsed_time) + ' sec.')
print('training done.')
test_payload_per_gpu = batch_size / num_gpu
total_batch = int(mnist.test.num_examples / batch_size)
preds = None
ys = None
for batch_idx in range(total_batch):
batch_x, batch_y = mnist.test.next_batch(batch_size)
inp_dict = feed_all_gpu({}, models, test_payload_per_gpu, batch_x, batch_y)
batch_pred, batch_y = sess.run([all_pred, all_y], inp_dict)
if preds is None:
preds = batch_pred
else:
preds = np.concatenate((preds, batch_pred), 0)
if ys is None:
ys = batch_y
else:
ys = np.concatenate((ys, batch_y), 0)
test_accuracy = sess.run([accuracy], {all_y: ys, all_pred: preds})[0]
print('Test Accuracy: %0.4f%%\n\n' % (100.0 * test_accuracy))
def print_time():
now = int(time.time())
timeStruct = time.localtime(now)
strTime = time.strftime("%Y-%m-%d %H:%M:%S", timeStruct)
print(strTime)
if __name__ == '__main__':
single_gpu()
multi_gpu(1)
#multi_gpu(2)
#multi_gpu(3)
#multi_gpu(4)
| [
"yulh@tuya.com"
] | yulh@tuya.com |
90dcd5b53232078c0c9160884ae5f2822bd1bd20 | 5241641cba4a6cf3b87284b72dcc5b6e70504f32 | /events/views.py | 842acbc90dfabe8acfe9851c847e7b8e158243a9 | [] | no_license | sdnnet3/coocooclub | a11505b2559b199164f2d881fa37a65cf9767aac | 5b1708194386048f62aa8222ef619f854758c556 | refs/heads/master | 2020-06-11T15:37:01.437796 | 2019-08-26T05:37:48 | 2019-08-26T05:37:48 | 194,009,534 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 266 | py | from django.http import HttpResponse
from django.shortcuts import render
from . models import event
def eventPage(request):
eventList = event.objects.order_by('-date')
context = {'eventList':eventList}
return render(request, 'events/twocolumn1.html', context) | [
"clayton.hutton@gmail.com"
] | clayton.hutton@gmail.com |
88c7325a6d02e081335eedd2028496386aeda85d | 540d62df9ac5a33598325f0a1267f31decf2b496 | /src/tests/mpi/common.py | ec7c0975d823d1f52a2a05114e315dd6c31ebd47 | [
"MIT"
] | permissive | ghackebeil/pybnb | a83c98995f11e30c3c752347f511dc4f80be4a4f | 1f69b0684cfbe83d69ca1be00641ce438cbc3d7b | refs/heads/master | 2021-07-14T11:59:10.955888 | 2021-07-08T16:33:05 | 2021-07-08T16:33:05 | 130,922,413 | 55 | 10 | MIT | 2019-12-27T23:50:41 | 2018-04-24T22:54:21 | Python | UTF-8 | Python | false | false | 127 | py | try:
import mpi4py # noqa: F401
mpi_available = True
except ImportError: # pragma:nocover
mpi_available = False
| [
"gabe.hackebeil@gmail.com"
] | gabe.hackebeil@gmail.com |
54f5da8cad0ea0623c6b009e440ad3adf8dcbe11 | 1577e1cf4e89584a125cffb855ca50a9654c6d55 | /pyobjc/pyobjc/pyobjc-framework-Cocoa-2.5.1/PyObjCTest/test_nspathutilties.py | 081c53662d09d0758abb0d4e48365801798ec651 | [
"MIT"
] | permissive | apple-open-source/macos | a4188b5c2ef113d90281d03cd1b14e5ee52ebffb | 2d2b15f13487673de33297e49f00ef94af743a9a | refs/heads/master | 2023-08-01T11:03:26.870408 | 2023-03-27T00:00:00 | 2023-03-27T00:00:00 | 180,595,052 | 124 | 24 | null | 2022-12-27T14:54:09 | 2019-04-10T14:06:23 | null | UTF-8 | Python | false | false | 3,966 | py | from PyObjCTools.TestSupport import *
from objc import *
from Foundation import *
try:
unicode
except NameError:
unicode = str
class TestNSPathUtilities(TestCase):
def testSearchPaths(self):
self.assert_(
NSSearchPathForDirectoriesInDomains( NSAllLibrariesDirectory, NSAllDomainsMask, NO ),
"NSSearchPathForDirectoriesInDomains() failed to return anything." )
self.assertArgIsBOOL(NSSearchPathForDirectoriesInDomains, 2)
def testTrue(self):
for boolVal in (1, 1==1, YES, -1):
self.assert_(
NSSearchPathForDirectoriesInDomains(NSLibraryDirectory,NSUserDomainMask, boolVal)[0][0] == '/', boolVal)
def testFalse(self):
for boolVal in (0, 1!=1, NO):
self.assert_(
NSSearchPathForDirectoriesInDomains(NSLibraryDirectory,NSUserDomainMask, boolVal)[0][0] != '/', boolVal)
def testFunctions(self):
s = NSUserName()
self.assertIsInstance(s, unicode)
s = NSFullUserName()
self.assertIsInstance(s, unicode)
s = NSHomeDirectory()
self.assertIsInstance(s, unicode)
s = NSHomeDirectoryForUser('root')
self.assertIsInstance(s, unicode)
s = NSTemporaryDirectory()
self.assertIsInstance(s, unicode)
s = NSOpenStepRootDirectory()
self.assertIsInstance(s, unicode)
def testConstants(self):
self.assertEqual(NSApplicationDirectory, 1)
self.assertEqual(NSDemoApplicationDirectory, 2)
self.assertEqual(NSDeveloperApplicationDirectory, 3)
self.assertEqual(NSAdminApplicationDirectory, 4)
self.assertEqual(NSLibraryDirectory, 5)
self.assertEqual(NSDeveloperDirectory, 6)
self.assertEqual(NSUserDirectory, 7)
self.assertEqual(NSDocumentationDirectory, 8)
self.assertEqual(NSDocumentDirectory, 9)
self.assertEqual(NSCoreServiceDirectory, 10)
self.assertEqual(NSDesktopDirectory, 12)
self.assertEqual(NSCachesDirectory, 13)
self.assertEqual(NSApplicationSupportDirectory, 14)
self.assertEqual(NSDownloadsDirectory, 15)
self.assertEqual(NSAllApplicationsDirectory, 100)
self.assertEqual(NSAllLibrariesDirectory, 101)
self.assertEqual(NSUserDomainMask, 1)
self.assertEqual(NSLocalDomainMask, 2)
self.assertEqual(NSNetworkDomainMask, 4)
self.assertEqual(NSSystemDomainMask, 8)
self.assertEqual(NSAllDomainsMask, 0x0ffff)
@min_os_level('10.6')
def testConstants10_6(self):
self.assertEqual(NSAutosavedInformationDirectory, 11)
self.assertEqual(NSInputMethodsDirectory, 16)
self.assertEqual(NSMoviesDirectory, 17)
self.assertEqual(NSMusicDirectory, 18)
self.assertEqual(NSPicturesDirectory, 19)
self.assertEqual(NSPrinterDescriptionDirectory, 20)
self.assertEqual(NSSharedPublicDirectory, 21)
self.assertEqual(NSPreferencePanesDirectory, 22)
self.assertEqual(NSItemReplacementDirectory, 99)
@min_os_level('10.8')
def testConstants10_8(self):
self.assertEqual(NSApplicationScriptsDirectory, 23)
self.assertEqual(NSTrashDirectory, 102)
def testMethods(self):
self.assertResultIsBOOL(NSString.isAbsolutePath)
self.assertArgIsOut(NSString.completePathIntoString_caseSensitive_matchesIntoArray_filterTypes_, 0)
self.assertArgIsBOOL(NSString.completePathIntoString_caseSensitive_matchesIntoArray_filterTypes_, 1)
self.assertArgIsOut(NSString.completePathIntoString_caseSensitive_matchesIntoArray_filterTypes_, 2)
self.assertResultIsBOOL(NSString.getFileSystemRepresentation_maxLength_)
self.assertArgHasType(NSString.getFileSystemRepresentation_maxLength_, 0, b'o^' + objc._C_CHAR_AS_TEXT)
self.assertArgSizeInArg(NSString.getFileSystemRepresentation_maxLength_, 0, 1)
if __name__ == '__main__':
main( )
| [
"opensource@apple.com"
] | opensource@apple.com |
85886a94f7c1a38d4d18359f4ddc35d5a4e21590 | 95368a0ed3e5d50ff3b8a435ecab9e8332772ec0 | /fluent_utils/softdeps/comments.py | fda3da49895771ec2e1e48311a8e0c9e3f9f9262 | [
"Apache-2.0"
] | permissive | seroy/django-fluent-utils | 7ed4a850f5651d12f68b55b4588d1d5f631bc67d | dfd4b65a27830876dd71f9d7a20a51c889a0468b | refs/heads/master | 2021-05-10T10:24:45.711558 | 2017-11-21T10:14:27 | 2017-11-21T10:15:47 | 118,381,508 | 0 | 0 | null | 2018-01-21T23:00:58 | 2018-01-21T23:00:58 | null | UTF-8 | Python | false | false | 7,390 | py | """
Optional integration with django-contrib-comments
This avoids loading django_comments or django.contrib.comments unless it's installed.
All functions even work without having the app installed,
and return stub or dummy values so all code works as expected.
"""
import django
from django.conf import settings
from django.contrib.contenttypes.fields import GenericForeignKey, GenericRelation
from django.contrib.contenttypes.models import ContentType
from django.contrib.sites.models import Site
from django.db import models
from django.dispatch import Signal
from django.utils.translation import ugettext_lazy as _
from fluent_utils.django_compat import is_installed
__all__ = (
'django_comments', # Main module
'signals', # Signals module
'get_model', # Get the comment model
'get_form', # Get the comment form
'get_public_comments_for_model', # Get publicly visible comments
'get_comments_are_open', # Utility to check if comments are open for a model.
'get_comments_are_moderated', # Utility to check if comments are moderated for a model.
'CommentModel', # Points to the comments model.
'CommentModerator', # Base class for all custom comment moderators
'CommentsRelation', # Generic relation back to the comments.
'CommentsMixin', # Model mixin for comments
'IS_INSTALLED',
)
django_comments = None
moderator = None
CommentModerator = None
get_model = None
IS_INSTALLED = False
if is_installed('django.contrib.comments'):
# Django 1.7 and below
from django.contrib import comments as django_comments
from django.contrib.comments import get_model, get_form, signals
from django.contrib.comments.moderation import moderator, CommentModerator
IS_INSTALLED = True
elif is_installed('django_comments'):
# as of Django 1.8, this is a separate app.
import django_comments
from django_comments import get_model, get_form, signals
from django_comments.moderation import moderator, CommentModerator
IS_INSTALLED = True
else:
def get_model():
return CommentManagerStub
def get_form():
raise NotImplementedError("No stub for comments.get_form() is implemented!")
class SignalsStub(object):
comment_will_be_posted = Signal(providing_args=["comment", "request"])
comment_was_posted = Signal(providing_args=["comment", "request"])
comment_was_flagged = Signal(providing_args=["comment", "flag", "created", "request"])
signals = SignalsStub()
def get_public_comments_for_model(model):
"""
Get visible comments for the model.
"""
if not IS_INSTALLED:
# No local comments, return empty queryset.
# The project might be using DISQUS or Facebook comments instead.
return CommentModelStub.objects.none()
else:
return CommentModel.objects.for_model(model).filter(is_public=True, is_removed=False)
def get_comments_are_open(instance):
"""
Check if comments are open for the instance
"""
if not IS_INSTALLED:
return False
try:
# Get the moderator which is installed for this model.
mod = moderator._registry[instance.__class__]
except KeyError:
# No moderator = no restrictions
return True
# Check the 'enable_field', 'auto_close_field' and 'close_after',
# by reusing the basic Django policies.
return CommentModerator.allow(mod, None, instance, None)
def get_comments_are_moderated(instance):
"""
Check if comments are moderated for the instance
"""
if not IS_INSTALLED:
return False
try:
# Get the moderator which is installed for this model.
mod = moderator._registry[instance.__class__]
except KeyError:
# No moderator = no moderation
return False
# Check the 'auto_moderate_field', 'moderate_after',
# by reusing the basic Django policies.
return CommentModerator.moderate(mod, None, instance, None)
# Can't use EmptyQueryset stub in Django 1.6 anymore,
# using this model to build a queryset instead.
class CommentManagerStub(models.Manager):
# Tell Django that related fields also need to use this manager:
# This makes sure that deleting a User won't cause any SQL queries
# on a non-existend django_comments_stub table.
use_for_related_fields = True
def get_queryset(self):
return super(CommentManagerStub, self).get_queryset().none()
if django.VERSION < (1, 7):
def get_query_set(self):
return super(CommentManagerStub, self).get_query_set().none()
def in_moderation(self):
return self.none()
def for_model(self):
return self.none()
class CommentModelStub(models.Model):
"""
Stub model that :func:`get_model` returns if *django.contrib.comments* is not installed.
"""
class Meta:
managed = False
app_label = 'django_comments'
db_table = "django_comments_stub"
objects = CommentManagerStub()
# add fields so ORM queries won't cause any issues.
content_type = models.ForeignKey(ContentType)
object_pk = models.TextField()
content_object = GenericForeignKey(ct_field="content_type", fk_field="object_pk")
site = models.ForeignKey(Site)
user = models.ForeignKey(settings.AUTH_USER_MODEL, related_name="%(class)s_comments")
user_name = models.CharField(max_length=50, blank=True)
user_email = models.EmailField(blank=True)
user_url = models.URLField(blank=True)
comment = models.TextField(max_length=3000)
submit_date = models.DateTimeField(default=None)
ip_address = models.GenericIPAddressField(unpack_ipv4=True, blank=True, null=True)
is_public = models.BooleanField(default=True)
is_removed = models.BooleanField(default=False)
CommentModel = get_model()
if IS_INSTALLED:
class CommentRelation(GenericRelation):
def __init__(self, to=CommentModel, **kwargs):
kwargs.setdefault('object_id_field', 'object_pk')
super(CommentRelation, self).__init__(to, **kwargs)
else:
class CommentRelation(models.Field):
def __init__(self, *args, **kwargs):
pass
def contribute_to_class(self, cls, name, virtual_only=False):
setattr(cls, name, CommentModelStub.objects.none())
class CommentsMixin(models.Model):
"""
Mixin for adding comments support to a model.
"""
enable_comments = models.BooleanField(_("Enable comments"), default=True)
# Reverse relation to the comments model.
# This is a stub when django.contrib.comments is not installed, so templates don't break.
# This avoids importing django.contrib.comments models when the app is not used.
all_comments = CommentRelation(verbose_name=_("Comments"))
class Meta:
abstract = True
# Properties
comments = property(get_public_comments_for_model, doc="Return the visible comments.")
comments_are_moderated = property(get_comments_are_moderated, doc="Check if comments are moderated")
@property
def comments_are_open(self):
"""
Check if comments are open
"""
if not self.enable_comments:
return False
return get_comments_are_open(self)
| [
"vdboor@edoburu.nl"
] | vdboor@edoburu.nl |
e8aa4e017e03c9d4c842e5c2b7bf15b3b18d5232 | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p03067/s448549647.py | f1bc365f60080966c05a2d74e27b78edf38e977c | [] | no_license | Aasthaengg/IBMdataset | 7abb6cbcc4fb03ef5ca68ac64ba460c4a64f8901 | f33f1c5c3b16d0ea8d1f5a7d479ad288bb3f48d8 | refs/heads/main | 2023-04-22T10:22:44.763102 | 2021-05-13T17:27:22 | 2021-05-13T17:27:22 | 367,112,348 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 96 | py | A, B, C = map(int, input().split())
print('Yes' if C in range(min(A, B)+1, max(A, B)) else 'No') | [
"66529651+Aastha2104@users.noreply.github.com"
] | 66529651+Aastha2104@users.noreply.github.com |
0a1a20b8bc8d9ad824d050a5ba78fdd7a944c3b1 | 8454441f899c3beb9fcea26cffc2f4c3cf75ff6a | /common/code/snippets/parasites/tweetable-polyglot-png-main/pack.py | cd7f50bd6f7027a29ee8897d091d8db24a8d38ad | [
"MIT"
] | permissive | nevesnunes/env | 4a837e8fcf4a6a597992103e0a0c3d0db93e1c78 | f2cd7d884d46275a2fcb206eeeac5a8e176b12af | refs/heads/master | 2023-08-22T15:49:35.897161 | 2023-08-15T13:51:08 | 2023-08-15T13:51:08 | 199,400,869 | 9 | 6 | MIT | 2023-06-22T10:59:51 | 2019-07-29T07:24:47 | Python | UTF-8 | Python | false | false | 1,941 | py | import zlib
import sys
PNG_MAGIC = b"\x89PNG\r\n\x1a\n"
if len(sys.argv) != 4:
print(f"USAGE: {sys.argv[0]} cover.png content.bin output.png")
# this function is gross
def fixup_zip(data, start_offset):
end_central_dir_offset = data.rindex(b"PK\x05\x06")
cdent_count = int.from_bytes(data[end_central_dir_offset+10:end_central_dir_offset+10+2], "little")
cd_range = slice(end_central_dir_offset+16, end_central_dir_offset+16+4)
central_dir_start_offset = int.from_bytes(data[cd_range], "little")
data[cd_range] = (central_dir_start_offset + start_offset).to_bytes(4, "little")
for _ in range(cdent_count):
central_dir_start_offset = data.index(b"PK\x01\x02", central_dir_start_offset)
off_range = slice(central_dir_start_offset+42, central_dir_start_offset+42+4)
off = int.from_bytes(data[off_range], "little")
data[off_range] = (off + start_offset).to_bytes(4, "little")
central_dir_start_offset += 1
png_in = open(sys.argv[1], "rb")
content_in = open(sys.argv[2], "rb")
png_out = open(sys.argv[3], "wb")
png_header = png_in.read(len(PNG_MAGIC))
assert(png_header == PNG_MAGIC)
png_out.write(png_header)
while True:
chunk_len = int.from_bytes(png_in.read(4), "big")
chunk_type = png_in.read(4)
chunk_body = png_in.read(chunk_len)
chunk_csum = int.from_bytes(png_in.read(4), "big")
if chunk_type == b"IDAT":
start_offset = png_in.tell()-4
content_dat = bytearray(content_in.read())
print("Embedded file starts at offset", hex(start_offset))
if sys.argv[2].endswith(".zip"):
print("Fixing up zip offsets...")
fixup_zip(content_dat, start_offset)
chunk_len += len(content_dat)
chunk_body += content_dat
chunk_csum = zlib.crc32(content_dat, chunk_csum)
png_out.write(chunk_len.to_bytes(4, "big"))
png_out.write(chunk_type)
png_out.write(chunk_body)
png_out.write(chunk_csum.to_bytes(4, "big"))
if chunk_type == b"IEND":
break
png_in.close()
content_in.close()
png_out.close()
| [
"9061071+nevesnunes@users.noreply.github.com"
] | 9061071+nevesnunes@users.noreply.github.com |
c1fbbf0d68a638d41feb44374be008c294de2af1 | 2bdedcda705f6dcf45a1e9a090377f892bcb58bb | /src/main/output/kid_part_day/year_air/netflix_number/DNS/man_money_eye/morning.py | 3cfcdaf46151c709896bd057eb2685a9b783a373 | [] | no_license | matkosoric/GenericNameTesting | 860a22af1098dda9ea9e24a1fc681bb728aa2d69 | 03f4a38229c28bc6d83258e5a84fce4b189d5f00 | refs/heads/master | 2021-01-08T22:35:20.022350 | 2020-02-21T11:28:21 | 2020-02-21T11:28:21 | 242,123,053 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,535 | py | export async function getWebTranslation(text, sourceLanguage, targetLanguage) {
let https = require ('https');
let host = 'api.cognitive.microsofttranslator.com';
let path = '/translate?api-version=3.0';
let params = '&from=' + sourceLanguage + '&to=' + targetLanguage;
let content = JSON.stringify ([{'Text' : text}]);
let response_handler = function (response) {
let body = '';
response.on ('data', function (d) {
body += d;
});
response.on ('end', function () {
let json = JSON.parse(body)
console.log(json);
return json
});
response.on ('error', function (e) {
return {Error: + e.message};
});
};
let get_guid = function () {
return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) {
var r = Math.random() * 16 | 0, v = c == 'x' ? r : (r & 0x3 | 0x8);
var subscriptionKey = '7b54eb7f629e60ccdcc0afe930ad2dc9';
return v.toString(16);
});
}
let Translate = async function (content) {
let request_params = {
method : 'POST',
hostname : host,
path : path + params,
headers : {
'Content-Type' : 'application/json',
'4b6fe6c509421e55748a9ad8a94dabad' : subscriptionKey,
'X-ClientTraceId' : get_guid (),
}
};
let req = await https.request (request_params, response_handler);
req.write (content);
req.end();
}
return await Translate (content);
}
| [
"soric.matko@gmail.com"
] | soric.matko@gmail.com |
6da545845c30626b26358c919e8cfd2df26da36b | f48d22a65b9c55f444ba63322272fc43a18be7f8 | /src/pybel/utils.py | 19f04bea60c020b4b14102e6c0bb59aa43211d64 | [
"Apache-2.0"
] | permissive | stashkov/pybel | 61b5eb52c83b0a830fcb77402a64a10dc74acf95 | 04dfd714d1469a149540465b09852ef64f12305e | refs/heads/master | 2020-03-26T03:51:36.011893 | 2018-07-31T11:28:52 | 2018-07-31T11:28:52 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 9,999 | py | # -*- coding: utf-8 -*-
from collections import Iterable, MutableMapping, defaultdict
import hashlib
import json
import logging
import networkx as nx
import pickle
from datetime import datetime
from six import string_types
from .constants import (
CITATION_AUTHORS, CITATION_ENTRIES, CITATION_REFERENCE, CITATION_TYPE,
PYBEL_EDGE_DATA_KEYS, VERSION,
)
log = logging.getLogger(__name__)
def expand_dict(flat_dict, sep='_'):
"""Expands a flattened dictionary
:param dict flat_dict: a nested dictionary that has been flattened so the keys are composite
:param str sep: the separator between concatenated keys
:rtype: dict
"""
res = {}
rdict = defaultdict(list)
for flat_key, value in flat_dict.items():
key = flat_key.split(sep, 1)
if 1 == len(key):
res[key[0]] = value
else:
rdict[key[0]].append((key[1:], value))
for k, v in rdict.items():
res[k] = expand_dict({ik: iv for (ik,), iv in v})
return res
def flatten_dict(d, parent_key='', sep='_'):
"""Flattens a nested dictionary.
:param d: A nested dictionary
:type d: dict or MutableMapping
:param str parent_key: The parent's key. This is a value for tail recursion, so don't set it yourself.
:param str sep: The separator used between dictionary levels
:rtype: dict
.. seealso:: http://stackoverflow.com/a/6027615
"""
items = []
for k, v in d.items():
new_key = parent_key + sep + k if parent_key else k
if isinstance(v, (dict, MutableMapping)):
items.extend(flatten_dict(v, new_key, sep=sep).items())
elif isinstance(v, (set, list)):
items.append((new_key, ','.join(v)))
else:
items.append((new_key, v))
return dict(items)
def flatten_graph_data(graph):
"""Returns a new graph with flattened edge data dictionaries.
:param nx.MultiDiGraph graph: A graph with nested edge data dictionaries
:return: A graph with flattened edge data dictionaries
:rtype: nx.MultiDiGraph
"""
g = nx.MultiDiGraph(**graph.graph)
for node, data in graph.nodes(data=True):
g.add_node(node, data)
for u, v, key, data in graph.edges(data=True, keys=True):
g.add_edge(u, v, key=key, attr_dict=flatten_dict(data))
return g
def list2tuple(l):
"""Recursively converts a nested list to a nested tuple
:type l: list
:rtype: tuple
"""
if isinstance(l, list):
return tuple(list2tuple(e) for e in l)
else:
return l
def get_version():
"""Gets the current PyBEL version
:return: The current PyBEL version
:rtype: str
"""
return VERSION
def tokenize_version(version_string):
"""Tokenizes a version string to a tuple. Truncates qualifiers like ``-dev``.
:param str version_string: A version string
:return: A tuple representing the version string
:rtype: tuple
>>> tokenize_version('0.1.2-dev')
(0, 1, 2)
"""
before_dash = version_string.split('-')[0]
version_tuple = before_dash.split('.')[:3] # take only the first 3 in case there's an extension like -dev.0
return tuple(map(int, version_tuple))
def citation_dict_to_tuple(citation):
"""Convert the ``d[CITATION]`` entry in an edge data dictionary to a tuple
:param dict citation:
:rtype: tuple[str]
"""
if len(citation) == 2 and CITATION_TYPE in citation and CITATION_REFERENCE in citation:
return citation[CITATION_TYPE], citation[CITATION_REFERENCE]
if all(x in citation for x in CITATION_ENTRIES):
return tuple(citation[x] for x in CITATION_ENTRIES)
if all(x in citation for x in CITATION_ENTRIES[3:5]):
ff = tuple(citation[x] for x in CITATION_ENTRIES[:4])
if isinstance(citation[CITATION_AUTHORS], string_types):
return ff + (citation[CITATION_AUTHORS],)
else:
return ff + ('|'.join(citation[CITATION_AUTHORS]),)
if all(x in citation for x in CITATION_ENTRIES[3:4]):
return tuple(citation[x] for x in CITATION_ENTRIES[:4])
return tuple(citation[x] for x in CITATION_ENTRIES[:3])
def flatten_citation(citation):
"""Flattens a citation dict, from the ``d[CITATION]`` entry in an edge data dictionary
:param dict[str,str] citation: A PyBEL citation data dictionary
:rtype: str
"""
return ','.join('"{}"'.format(e) for e in citation_dict_to_tuple(citation))
def ensure_quotes(s):
"""Quote a string that isn't solely alphanumeric
:type s: str
:rtype: str
"""
return '"{}"'.format(s) if not s.isalnum() else s
CREATION_DATE_FMT = '%Y-%m-%dT%H:%M:%S'
PUBLISHED_DATE_FMT = '%Y-%m-%d'
PUBLISHED_DATE_FMT_2 = '%d:%m:%Y %H:%M'
DATE_VERSION_FMT = '%Y%m%d'
def valid_date(s):
"""Checks that a string represents a valid date in ISO 8601 format YYYY-MM-DD
:type s: str
:rtype: bool
"""
try:
datetime.strptime(s, PUBLISHED_DATE_FMT)
return True
except ValueError:
return False
def valid_date_version(s):
"""Checks that the string is a valid date versions string
:type s: str
:rtype: bool
"""
try:
datetime.strptime(s, DATE_VERSION_FMT)
return True
except ValueError:
return False
def parse_datetime(s):
"""Tries to parse a datetime object from a standard datetime format or date format
:param str s: A string representing a date or datetime
:return: A parsed date object
:rtype: datetime.date
"""
try:
dt = datetime.strptime(s, CREATION_DATE_FMT)
return dt
except:
try:
dt = datetime.strptime(s, PUBLISHED_DATE_FMT)
return dt
except:
try:
dt = datetime.strptime(s, PUBLISHED_DATE_FMT_2)
return dt
except:
raise ValueError('Incorrect datetime format for {}'.format(s))
def hash_node(node_tuple):
"""Converts a PyBEL node tuple to a hash
:param tuple node_tuple: A BEL node
:return: A hashed version of the node tuple using :func:`hashlib.sha512` hash of the binary pickle dump
:rtype: str
"""
return hashlib.sha512(pickle.dumps(node_tuple)).hexdigest()
def _extract_pybel_data(data):
"""Extracts only the PyBEL-specific data from the given edge data dictionary
:param dict data: An edge data dictionary
:rtype: dict
"""
return {
key: value
for key, value in data.items()
if key in PYBEL_EDGE_DATA_KEYS
}
def _edge_to_tuple(u, v, data):
"""Converts an edge to tuple
:param tuple u: The source BEL node
:param tuple v: The target BEL node
:param dict data: The edge's data dictionary
:return: A tuple that can be hashed representing this edge. Makes no promises to its structure.
"""
extracted_data_dict = _extract_pybel_data(data)
return u, v, json.dumps(extracted_data_dict, ensure_ascii=False, sort_keys=True)
def hash_edge(u, v, data):
"""Converts an edge tuple to a hash
:param tuple u: The source BEL node
:param tuple v: The target BEL node
:param dict data: The edge's data dictionary
:return: A hashed version of the edge tuple using md5 hash of the binary pickle dump of u, v, and the json dump of d
:rtype: str
"""
edge_tuple = _edge_to_tuple(u, v, data)
edge_tuple_bytes = pickle.dumps(edge_tuple)
return hashlib.sha512(edge_tuple_bytes).hexdigest()
def subdict_matches(target, query, partial_match=True):
"""Checks if all the keys in the query dict are in the target dict, and that their values match
1. Checks that all keys in the query dict are in the target dict
2. Matches the values of the keys in the query dict
a. If the value is a string, then must match exactly
b. If the value is a set/list/tuple, then will match any of them
c. If the value is a dict, then recursively check if that subdict matches
:param dict target: The dictionary to search
:param dict query: A query dict with keys to match
:param bool partial_match: Should the query values be used as partial or exact matches? Defaults to :code:`True`.
:return: if all keys in b are in target_dict and their values match
:rtype: bool
"""
for k, v in query.items():
if k not in target:
return False
elif not isinstance(v, (int, string_types, dict, Iterable)):
raise ValueError('invalid value: {}'.format(v))
elif isinstance(v, (int, string_types)) and target[k] != v:
return False
elif isinstance(v, dict):
if partial_match:
if not isinstance(target[k], dict):
return False
elif not subdict_matches(target[k], v, partial_match):
return False
elif not partial_match and target[k] != v:
return False
elif isinstance(v, Iterable) and target[k] not in v:
return False
return True
def hash_dump(data):
"""Hashes an arbitrary JSON dictionary by dumping it in sorted order, encoding it in UTF-8, then hashing the bytes
:param data: An arbitrary JSON-serializable object
:type data: dict or list or tuple
:rtype: str
"""
return hashlib.sha512(json.dumps(data, sort_keys=True).encode('utf-8')).hexdigest()
def hash_citation(type, reference):
"""Creates a hash for a type/reference pair of a citation
:param str type: The corresponding citation type
:param str reference: The citation reference
:rtype: str
"""
return hash_dump((type, reference))
def hash_evidence(text, type, reference):
"""Creates a hash for an evidence and its citation
:param str text: The evidence text
:param str type: The corresponding citation type
:param str reference: The citation reference
:rtype: str
"""
return hash_dump((type, reference, text))
| [
"cthoyt@gmail.com"
] | cthoyt@gmail.com |
4d81faf8a6f057dae590eb378f38613b1f2d8f3a | 6e17999700d87263f3b2d146fc8b0502b31094cc | /setup.py | 86bed86eabe2291fdf92ca55990832adca2ef179 | [] | no_license | libargutxi/collective.newsticker | 9c85f75de24ad5be578c485b18f48d832b3ba402 | 11e596a5379608b920e20a1f231e6e29722457c4 | refs/heads/master | 2020-12-25T11:52:16.705745 | 2012-12-11T08:07:21 | 2012-12-11T08:07:21 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,938 | py | # -*- coding: utf-8 -*-
import os
from setuptools import setup, find_packages
version = '1.0rc2.dev0'
long_description = open("README.txt").read() + "\n" + \
open(os.path.join("docs", "INSTALL.txt")).read() + "\n" + \
open(os.path.join("docs", "CREDITS.txt")).read() + "\n" + \
open(os.path.join("docs", "HISTORY.txt")).read()
setup(name='collective.newsticker',
version=version,
description="News ticker inspired by the one on the BBC News website.",
long_description=long_description,
classifiers=[
"Development Status :: 5 - Production/Stable",
"Environment :: Web Environment",
"Framework :: Plone",
"Framework :: Plone :: 4.1",
# "Framework :: Plone :: 4.2", # FIXME
"Intended Audience :: System Administrators",
"License :: OSI Approved :: GNU General Public License (GPL)",
"Operating System :: OS Independent",
"Programming Language :: JavaScript",
"Programming Language :: Python",
"Programming Language :: Python :: 2.6",
"Topic :: Office/Business :: News/Diary",
"Topic :: Software Development :: Libraries :: Python Modules",
],
keywords='plone jquery newsticker',
author='Héctor Velarde',
author_email='hector.velarde@gmail.com',
url='https://github.com/collective/collective.newsticker',
license='GPL',
packages=find_packages('src'),
package_dir={'': 'src'},
namespace_packages=['collective'],
include_package_data=True,
zip_safe=False,
install_requires=[
'setuptools',
'five.grok>=1.2.0',
'zope.schema>=3.8.0', # required to use IContextAwareDefaultFactory
],
extras_require={
'test': ['plone.app.testing'],
},
entry_points="""
[z3c.autoinclude.plugin]
target = plone
""",
)
| [
"hector.velarde@gmail.com"
] | hector.velarde@gmail.com |
40c3139932cc04676b0b8dc6ab3baa716e931bc9 | 4e8cab639ddfa3e791b5b3a08aa491fb92c1ecaa | /Python_PostgresSQL/Python Refresher/errors_in_python.py | 7db3aaa46306a070397b8a7f319c0b86d4ef62ca | [] | no_license | LesediSekakatlela/SQL_projects | 49b91bebdf6f9b1176c40c3752232ab8d3d091dd | 9c78fc027dd137ef96446ea0946343293f3be007 | refs/heads/main | 2023-07-13T02:41:41.261558 | 2021-08-20T09:03:23 | 2021-08-20T09:03:23 | 386,646,245 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 712 | py | def divide(dividend, divisor):
if divisor == 0:
raise ZeroDivisionError("Divisor cannot be 0.")
return dividend / divisor
students = [
{"name": "Bob", "grades": [75,90]},
{"name": "Rolf", "grades": [50]},
{"name": "Jen", "grades": [100,90]},
]
print("Welcom to the average grade program.")
try:
for student in students:
name = student["name"]
grades = student["grades"]
average = divide(sum(grades), len(grades))
print(f"{name} averaged {average}.")
except ZeroDivisionError:
print(f"ERROR: {name} has no grades!")
else:
print("-- All student averages calculated --")
finally:
print("-- End of student average calculation --")
| [
"leseditumelo32@gmail.com"
] | leseditumelo32@gmail.com |
7010d13dee74c17cf18df227a66134c0f8afed28 | 39f2ff90808f68c2d88778a1d60ccf27c1d18121 | /leetcode/python/258.py | fba101b1fd8d04e081c5832730d8c2acf0ceea0c | [] | no_license | JushuangQiao/MyCodes | f4912d997fce8c14f5357e497fe52280e8bdaddf | 2fd6842784ef8e56e4e5f742ce1313d17130c0d9 | refs/heads/master | 2021-01-10T23:53:13.346573 | 2018-05-12T11:57:03 | 2018-05-12T11:57:03 | 70,792,457 | 0 | 0 | null | 2017-04-19T10:31:55 | 2016-10-13T09:47:30 | Python | UTF-8 | Python | false | false | 330 | py | class Solution(object):
def addDigits(self, num):
"""
:type num: int
:rtype: int
"""
s = str(num)
while len(s) != 1:
s = str(sum([int(i) for i in s]))
return int(s)
'''if num == 0:
return 0
return num % 9 if num % 9 !=0 else 9'''
| [
"747848783@qq.com"
] | 747848783@qq.com |
5a812f1449a8e78359f47d198f701adab733c96d | b3b68efa404a7034f0d5a1c10b281ef721f8321a | /src/sims4communitylib/enums/tags_enum.py | 3ddd96b101db644b2c3c94b042532665a4412b5a | [
"Apache-2.0"
] | permissive | velocist/TS4CheatsInfo | 62195f3333076c148b2a59f926c9fb5202f1c6fb | b59ea7e5f4bd01d3b3bd7603843d525a9c179867 | refs/heads/main | 2023-03-08T01:57:39.879485 | 2021-02-13T21:27:38 | 2021-02-13T21:27:38 | 337,543,310 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 209,543 | py | """
The Sims 4 Community Library is licensed under the Creative Commons Attribution 4.0 International public license (CC BY 4.0).
https://creativecommons.org/licenses/by/4.0/
https://creativecommons.org/licenses/by/4.0/legalcode
Copyright (c) COLONOLNUTTY
"""
from sims4communitylib.enums.enumtypes.common_int import CommonInt
class CommonGameTag(CommonInt):
"""Identifiers for vanilla game tags (These have been gathered dynamically from the :class:`.Tag` enum).
"""
INVALID: 'CommonGameTag' = 0
AGE_APPROPRIATE_ADULT: 'CommonGameTag' = 84
AGE_APPROPRIATE_CHILD: 'CommonGameTag' = 85
AGE_APPROPRIATE_ELDER: 'CommonGameTag' = 72
AGE_APPROPRIATE_TEEN: 'CommonGameTag' = 291
AGE_APPROPRIATE_TODDLER: 'CommonGameTag' = 1657
AGE_APPROPRIATE_YOUNG_ADULT: 'CommonGameTag' = 71
APPEARANCE_MODIFIER_HAIR_MAKEUP_CHAIR_MAKEUP: 'CommonGameTag' = 61609
APPEARANCE_MODIFIER_HAIR_MAKEUP_CHAIR_HAIR_STYLE: 'CommonGameTag' = 61494
APPROPRIATENESS_BARTENDING: 'CommonGameTag' = 406
APPROPRIATENESS_BATHING: 'CommonGameTag' = 402
APPROPRIATENESS_CAKE: 'CommonGameTag' = 605
APPROPRIATENESS_CALL_TO_MEAL: 'CommonGameTag' = 1170
APPROPRIATENESS_CLEANING: 'CommonGameTag' = 404
APPROPRIATENESS_COMPUTER: 'CommonGameTag' = 1373
APPROPRIATENESS_COOKING: 'CommonGameTag' = 405
APPROPRIATENESS_DANCING: 'CommonGameTag' = 603
APPROPRIATENESS_EATING: 'CommonGameTag' = 604
APPROPRIATENESS_FRONT_DESK: 'CommonGameTag' = 12413
APPROPRIATENESS_GRAB_SNACK: 'CommonGameTag' = 939
APPROPRIATENESS_GUEST: 'CommonGameTag' = 367
APPROPRIATENESS_HIRED_WORKER: 'CommonGameTag' = 368
APPROPRIATENESS_HOST: 'CommonGameTag' = 370
APPROPRIATENESS_NOT_DURING_WORK: 'CommonGameTag' = 1274
APPROPRIATENESS_NOT_DURING_WORK_LUNCH: 'CommonGameTag' = 1275
APPROPRIATENESS_PHONE: 'CommonGameTag' = 1594
APPROPRIATENESS_PHONE_GAME: 'CommonGameTag' = 1626
APPROPRIATENESS_PLAY_INSTRUMENT: 'CommonGameTag' = 2156
APPROPRIATENESS_PLAYING: 'CommonGameTag' = 1539
APPROPRIATENESS_READ_BOOKS: 'CommonGameTag' = 1276
APPROPRIATENESS_SERVICE_NPC: 'CommonGameTag' = 369
APPROPRIATENESS_SHOWER: 'CommonGameTag' = 352
APPROPRIATENESS_SINGING: 'CommonGameTag' = 55385
APPROPRIATENESS_SLEEPING: 'CommonGameTag' = 403
APPROPRIATENESS_SNOW_SHOVELING: 'CommonGameTag' = 69706
APPROPRIATENESS_SOCIAL_PICKER: 'CommonGameTag' = 1645
APPROPRIATENESS_STEREO: 'CommonGameTag' = 530
APPROPRIATENESS_TIP: 'CommonGameTag' = 2155
APPROPRIATENESS_TOUCHING: 'CommonGameTag' = 1526
APPROPRIATENESS_TRASH: 'CommonGameTag' = 12423
APPROPRIATENESS_TV_WATCHING: 'CommonGameTag' = 1273
APPROPRIATENESS_VIEW: 'CommonGameTag' = 12428
APPROPRIATENESS_VISITOR: 'CommonGameTag' = 1497
APPROPRIATENESS_WORK_SCIENTIST: 'CommonGameTag' = 12297
APPROPRIATENESS_WORKOUT: 'CommonGameTag' = 1277
ARCHETYPE_AFRICAN: 'CommonGameTag' = 73
ARCHETYPE_ASIAN: 'CommonGameTag' = 75
ARCHETYPE_CAUCASIAN: 'CommonGameTag' = 76
ARCHETYPE_ISLAND: 'CommonGameTag' = 2206
ARCHETYPE_LATIN: 'CommonGameTag' = 312
ARCHETYPE_MIDDLE_EASTERN: 'CommonGameTag' = 74
ARCHETYPE_NORTH_AMERICAN: 'CommonGameTag' = 89
ARCHETYPE_SOUTH_ASIAN: 'CommonGameTag' = 88
AT_PO_BEACH: 'CommonGameTag' = 2194
AT_PO_BEACH_WALKBY: 'CommonGameTag' = 2204
AT_PO_BLOSSOM_GURU: 'CommonGameTag' = 55386
AT_PO_BUSKER: 'CommonGameTag' = 1571
AT_PO_DYNAMIC_SPAWN_POINT: 'CommonGameTag' = 1915
AT_PO_FIREWORKS: 'CommonGameTag' = 55399
AT_PO_FLEA_MARKET_VENDOR: 'CommonGameTag' = 55334
AT_PO_GO_FOR_WALK: 'CommonGameTag' = 1916
AT_PO_GO_FOR_WALK_LONG: 'CommonGameTag' = 57394
AT_PO_GO_FOR_WALK_LONG_02: 'CommonGameTag' = 57432
AT_PO_GO_FOR_WALK_LONG_03: 'CommonGameTag' = 57433
AT_PO_GO_FOR_WALK_MED_02: 'CommonGameTag' = 57436
AT_PO_GO_FOR_WALK_MED_03: 'CommonGameTag' = 57437
AT_PO_GO_FOR_WALK_MEDIUM: 'CommonGameTag' = 57393
AT_PO_GO_FOR_WALK_SHORT: 'CommonGameTag' = 57389
AT_PO_GO_FOR_WALK_SHORT_02: 'CommonGameTag' = 57434
AT_PO_GO_FOR_WALK_SHORT_03: 'CommonGameTag' = 57435
AT_PO_GUITAR: 'CommonGameTag' = 2158
AT_PO_MAGIC_DUELING: 'CommonGameTag' = 2222
AT_PO_PROTESTER: 'CommonGameTag' = 1582
AT_PO_TOURIST: 'CommonGameTag' = 1570
AT_PO_UNIVERSITY_QUAD: 'CommonGameTag' = 2230
BOTTOM_BIKINI: 'CommonGameTag' = 1235
BOTTOM_CROPPED: 'CommonGameTag' = 945
BOTTOM_JEANS: 'CommonGameTag' = 382
BOTTOM_LEGGINGS: 'CommonGameTag' = 381
BOTTOM_PANTS: 'CommonGameTag' = 152
BOTTOM_SHORTS: 'CommonGameTag' = 154
BOTTOM_SKIRT: 'CommonGameTag' = 153
BOTTOM_SWIMSHORT: 'CommonGameTag' = 1238
BOTTOM_SWIMWEAR: 'CommonGameTag' = 1544
BOTTOM_UNDERWEAR: 'CommonGameTag' = 1543
BOTTOM_UNDERWEAR_FEMALE: 'CommonGameTag' = 946
BOTTOM_UNDERWEAR_MALE: 'CommonGameTag' = 1040
BREED_CAT_ABYSSINIAN: 'CommonGameTag' = 1830
BREED_CAT_AMERICAN_BOBTAIL: 'CommonGameTag' = 1831
BREED_CAT_AMERICAN_LONGHAIR: 'CommonGameTag' = 1931
BREED_CAT_AMERICAN_SHORTHAIR: 'CommonGameTag' = 1833
BREED_CAT_AMERICAN_WIREHAIR: 'CommonGameTag' = 1834
BREED_CAT_BALINESE: 'CommonGameTag' = 1835
BREED_CAT_BENGAL: 'CommonGameTag' = 1836
BREED_CAT_BIRMAN: 'CommonGameTag' = 1837
BREED_CAT_BLACK_CAT: 'CommonGameTag' = 1838
BREED_CAT_BOMBAY: 'CommonGameTag' = 1839
BREED_CAT_BRITISH_LONGHAIR: 'CommonGameTag' = 1840
BREED_CAT_BRITISH_SHORTHAIR: 'CommonGameTag' = 1841
BREED_CAT_BURMESE: 'CommonGameTag' = 1842
BREED_CAT_CALICO: 'CommonGameTag' = 1843
BREED_CAT_CHARTREUX: 'CommonGameTag' = 1844
BREED_CAT_COLORPOINT_SHORTHAIR: 'CommonGameTag' = 1845
BREED_CAT_CORNISH_REX: 'CommonGameTag' = 1832
BREED_CAT_DEVON_REX: 'CommonGameTag' = 1846
BREED_CAT_EGYPTIAN_MAU: 'CommonGameTag' = 1847
BREED_CAT_GERMAN_REX: 'CommonGameTag' = 1848
BREED_CAT_HAVANA_BROWN: 'CommonGameTag' = 1849
BREED_CAT_HIMALAYAN: 'CommonGameTag' = 1850
BREED_CAT_JAPANESE_BOBTAIL: 'CommonGameTag' = 1851
BREED_CAT_JAVANESE: 'CommonGameTag' = 1852
BREED_CAT_KORAT: 'CommonGameTag' = 1853
BREED_CAT_KURILIAN_BOBTAIL: 'CommonGameTag' = 1854
BREED_CAT_LA_PERM: 'CommonGameTag' = 1855
BREED_CAT_LYKOI: 'CommonGameTag' = 1975
BREED_CAT_MAINE_COON: 'CommonGameTag' = 1856
BREED_CAT_MANX: 'CommonGameTag' = 1857
BREED_CAT_MIXED: 'CommonGameTag' = 1926
BREED_CAT_NORWEGIAN_FOREST: 'CommonGameTag' = 1858
BREED_CAT_OCICAT: 'CommonGameTag' = 1859
BREED_CAT_ORIENTAL: 'CommonGameTag' = 1860
BREED_CAT_ORIENTAL_SHORTHAIR: 'CommonGameTag' = 1861
BREED_CAT_PERSIAN: 'CommonGameTag' = 1862
BREED_CAT_RACCOON: 'CommonGameTag' = 1974
BREED_CAT_RAGDOLL: 'CommonGameTag' = 1863
BREED_CAT_RUSSIAN_BLUE: 'CommonGameTag' = 1864
BREED_CAT_SAVANNAH: 'CommonGameTag' = 1865
BREED_CAT_SCOTTISH_FOLD: 'CommonGameTag' = 1866
BREED_CAT_SHORTHAIR_TABBY: 'CommonGameTag' = 1867
BREED_CAT_SIAMESE: 'CommonGameTag' = 1868
BREED_CAT_SIBERIAN: 'CommonGameTag' = 1869
BREED_CAT_SINGAPURA: 'CommonGameTag' = 1870
BREED_CAT_SOMALI: 'CommonGameTag' = 1871
BREED_CAT_SPHYNX: 'CommonGameTag' = 1886
BREED_CAT_TONKINESE: 'CommonGameTag' = 1872
BREED_CAT_TURKISH_ANGORA: 'CommonGameTag' = 1873
BREED_CAT_TUXEDO_CAT: 'CommonGameTag' = 1874
BREED_GROUP_HERDING: 'CommonGameTag' = 1893
BREED_GROUP_HOUND: 'CommonGameTag' = 1894
BREED_GROUP_NON_SPORTING: 'CommonGameTag' = 1911
BREED_GROUP_SPORTING: 'CommonGameTag' = 1895
BREED_GROUP_TERRIER: 'CommonGameTag' = 1896
BREED_GROUP_TOY: 'CommonGameTag' = 1897
BREED_GROUP_WORKING: 'CommonGameTag' = 1898
BREED_LARGE_DOG_AFGHAN_HOUND: 'CommonGameTag' = 1814
BREED_LARGE_DOG_AIREDALE_TERRIER: 'CommonGameTag' = 1745
BREED_LARGE_DOG_AKITA: 'CommonGameTag' = 1746
BREED_LARGE_DOG_ALASKAN_MALAMUTE: 'CommonGameTag' = 1747
BREED_LARGE_DOG_AMERICAN_ESKIMO: 'CommonGameTag' = 1748
BREED_LARGE_DOG_AMERICAN_FOXHOUND: 'CommonGameTag' = 1797
BREED_LARGE_DOG_AUSTRALIAN_CATTLE_DOG: 'CommonGameTag' = 1750
BREED_LARGE_DOG_AUSTRALIAN_SHEPHERD: 'CommonGameTag' = 1735
BREED_LARGE_DOG_BEDLINGTON_TERRIER: 'CommonGameTag' = 1950
BREED_LARGE_DOG_BERNESE_MOUNTAIN_DOG: 'CommonGameTag' = 1751
BREED_LARGE_DOG_BLACK_AND_TAN_COONHOUND: 'CommonGameTag' = 1798
BREED_LARGE_DOG_BLACK_RUSSIAN_TERRIER: 'CommonGameTag' = 1961
BREED_LARGE_DOG_BLOODHOUND: 'CommonGameTag' = 1753
BREED_LARGE_DOG_BLUETICK_COONHOUND: 'CommonGameTag' = 1796
BREED_LARGE_DOG_BORDER_COLLIE: 'CommonGameTag' = 1736
BREED_LARGE_DOG_BORZOI: 'CommonGameTag' = 1826
BREED_LARGE_DOG_BOXER: 'CommonGameTag' = 1755
BREED_LARGE_DOG_BRITTANY: 'CommonGameTag' = 1816
BREED_LARGE_DOG_BULLMASTIFF: 'CommonGameTag' = 1951
BREED_LARGE_DOG_CANAAN: 'CommonGameTag' = 1952
BREED_LARGE_DOG_CHESAPEAKE_BAY_RETRIEVER: 'CommonGameTag' = 1795
BREED_LARGE_DOG_CHOW_CHOW: 'CommonGameTag' = 1759
BREED_LARGE_DOG_CHOW_LAB_MIX: 'CommonGameTag' = 1953
BREED_LARGE_DOG_COLLIE: 'CommonGameTag' = 1740
BREED_LARGE_DOG_CURLY_COATED_RETRIEVER: 'CommonGameTag' = 1794
BREED_LARGE_DOG_DALMATIAN: 'CommonGameTag' = 1741
BREED_LARGE_DOG_DINGO: 'CommonGameTag' = 1954
BREED_LARGE_DOG_DOBERMAN: 'CommonGameTag' = 1742
BREED_LARGE_DOG_DOBERMAN_PINSCHER: 'CommonGameTag' = 1761
BREED_LARGE_DOG_ENGLISH_FOXHOUND: 'CommonGameTag' = 1821
BREED_LARGE_DOG_ENGLISH_SETTER: 'CommonGameTag' = 1819
BREED_LARGE_DOG_ENGLISH_SPRINGER_SPANIEL: 'CommonGameTag' = 1762
BREED_LARGE_DOG_FIELD_SPANIEL: 'CommonGameTag' = 1801
BREED_LARGE_DOG_GERMAN_POINTER: 'CommonGameTag' = 1737
BREED_LARGE_DOG_GERMAN_SHEPHERD: 'CommonGameTag' = 1743
BREED_LARGE_DOG_GIANT_SCHNAUZER: 'CommonGameTag' = 1792
BREED_LARGE_DOG_GOLDEN_DOODLE: 'CommonGameTag' = 1800
BREED_LARGE_DOG_GOLDEN_RETRIEVER: 'CommonGameTag' = 1731
BREED_LARGE_DOG_GREAT_DANE: 'CommonGameTag' = 1734
BREED_LARGE_DOG_GREAT_PYRANEES: 'CommonGameTag' = 1955
BREED_LARGE_DOG_GREYHOUND: 'CommonGameTag' = 1764
BREED_LARGE_DOG_HUSKY: 'CommonGameTag' = 1744
BREED_LARGE_DOG_IBIZAN: 'CommonGameTag' = 1738
BREED_LARGE_DOG_IRISH_RED_AND_WHITE_SETTER: 'CommonGameTag' = 1802
BREED_LARGE_DOG_IRISH_SETTER: 'CommonGameTag' = 1803
BREED_LARGE_DOG_IRISH_TERRIER: 'CommonGameTag' = 1828
BREED_LARGE_DOG_IRISH_WOLFHOUND: 'CommonGameTag' = 1827
BREED_LARGE_DOG_KEESHOND: 'CommonGameTag' = 1767
BREED_LARGE_DOG_KERRY_BLUE_TERRIER: 'CommonGameTag' = 1956
BREED_LARGE_DOG_LABRADOODLE: 'CommonGameTag' = 1957
BREED_LARGE_DOG_LABRADOR_RETRIEVER: 'CommonGameTag' = 1768
BREED_LARGE_DOG_MASTIFF: 'CommonGameTag' = 1804
BREED_LARGE_DOG_MIXED: 'CommonGameTag' = 1928
BREED_LARGE_DOG_NEWFOUNDLAND: 'CommonGameTag' = 1769
BREED_LARGE_DOG_NORWEGIAN_ELK_SHEPHERD: 'CommonGameTag' = 1958
BREED_LARGE_DOG_OLD_ENGLISH_SHEEPDOG: 'CommonGameTag' = 1771
BREED_LARGE_DOG_OTTERHOUND: 'CommonGameTag' = 1772
BREED_LARGE_DOG_PHARAOH_HOUND: 'CommonGameTag' = 1774
BREED_LARGE_DOG_PIT_BULL: 'CommonGameTag' = 1749
BREED_LARGE_DOG_POINTER: 'CommonGameTag' = 1775
BREED_LARGE_DOG_POLISH_LOWLAND_SHEEPDOG: 'CommonGameTag' = 1807
BREED_LARGE_DOG_POODLE: 'CommonGameTag' = 1777
BREED_LARGE_DOG_PORTUGUESE_WATER_DOG: 'CommonGameTag' = 1791
BREED_LARGE_DOG_REDBONE_COONHOUND: 'CommonGameTag' = 1810
BREED_LARGE_DOG_RHODESIAN_RIDGEBACK: 'CommonGameTag' = 1815
BREED_LARGE_DOG_ROTTWEILER: 'CommonGameTag' = 1779
BREED_LARGE_DOG_SAINT_BERNARD: 'CommonGameTag' = 1780
BREED_LARGE_DOG_SAMOYED: 'CommonGameTag' = 1781
BREED_LARGE_DOG_SCHNAUZER: 'CommonGameTag' = 1732
BREED_LARGE_DOG_SHAR_PEI: 'CommonGameTag' = 1959
BREED_LARGE_DOG_SIBERIAN_HUSKY: 'CommonGameTag' = 1812
BREED_LARGE_DOG_TIBETAN_MASTIFF: 'CommonGameTag' = 1960
BREED_LARGE_DOG_VIZSLA: 'CommonGameTag' = 1809
BREED_LARGE_DOG_WEIMARANER: 'CommonGameTag' = 1788
BREED_LARGE_DOG_WELSH_SPRINGER_SPANIEL: 'CommonGameTag' = 1808
BREED_LARGE_DOG_WHEATENS_TERRIER: 'CommonGameTag' = 1962
BREED_NONE: 'CommonGameTag' = 1733
BREED_SMALL_DOG_BASENJI: 'CommonGameTag' = 1817
BREED_SMALL_DOG_BEAGLE: 'CommonGameTag' = 1739
BREED_SMALL_DOG_BICHON_FRISE: 'CommonGameTag' = 1752
BREED_SMALL_DOG_BOCKER: 'CommonGameTag' = 1963
BREED_SMALL_DOG_BOSTON_TERRIER: 'CommonGameTag' = 1754
BREED_SMALL_DOG_BULL_TERRIER: 'CommonGameTag' = 1829
BREED_SMALL_DOG_BULLDOG: 'CommonGameTag' = 1756
BREED_SMALL_DOG_CARDIGAN_WELSH_CORGI: 'CommonGameTag' = 1964
BREED_SMALL_DOG_CAVALIER_KING_CHARLES_SPANIEL: 'CommonGameTag' = 1757
BREED_SMALL_DOG_CHIHUAHUA: 'CommonGameTag' = 1758
BREED_SMALL_DOG_COCKER_SPANIEL: 'CommonGameTag' = 1760
BREED_SMALL_DOG_COCKAPOO: 'CommonGameTag' = 1965
BREED_SMALL_DOG_DASCHUND: 'CommonGameTag' = 1966
BREED_SMALL_DOG_ENGLISH_COCKER_SPANIEL: 'CommonGameTag' = 1818
BREED_SMALL_DOG_ENGLISH_TOY_SPANIEL: 'CommonGameTag' = 1967
BREED_SMALL_DOG_FOX: 'CommonGameTag' = 1968
BREED_SMALL_DOG_FRENCH_BULLDOG: 'CommonGameTag' = 1763
BREED_SMALL_DOG_HAVANESE: 'CommonGameTag' = 1793
BREED_SMALL_DOG_ICELANDIC_SHEEP_DOG: 'CommonGameTag' = 1993
BREED_SMALL_DOG_ITALIAN_GREYHOUND: 'CommonGameTag' = 1825
BREED_SMALL_DOG_JACK_RUSSEL_TERRIER: 'CommonGameTag' = 1766
BREED_SMALL_DOG_LHASA_APSO: 'CommonGameTag' = 1823
BREED_SMALL_DOG_MALTESE: 'CommonGameTag' = 1943
BREED_SMALL_DOG_MINIATURE_PINSCHER: 'CommonGameTag' = 1805
BREED_SMALL_DOG_MINIATURE_POODLE: 'CommonGameTag' = 1969
BREED_SMALL_DOG_MINIATURE_SCHNAUZER: 'CommonGameTag' = 1806
BREED_SMALL_DOG_MIXED: 'CommonGameTag' = 1927
BREED_SMALL_DOG_NORWEGIAN_BUHUND: 'CommonGameTag' = 1992
BREED_SMALL_DOG_PAPILLON: 'CommonGameTag' = 1773
BREED_SMALL_DOG_PARSON_RUSSEL_TERRIER: 'CommonGameTag' = 1970
BREED_SMALL_DOG_PEKINGESE: 'CommonGameTag' = 1770
BREED_SMALL_DOG_PEMBROKE_WELSH_CORGI: 'CommonGameTag' = 1971
BREED_SMALL_DOG_POMERANIAN: 'CommonGameTag' = 1776
BREED_SMALL_DOG_PUG: 'CommonGameTag' = 1778
BREED_SMALL_DOG_PUGGLE: 'CommonGameTag' = 1820
BREED_SMALL_DOG_SCHIPPERKE: 'CommonGameTag' = 1782
BREED_SMALL_DOG_SCHNOODLE: 'CommonGameTag' = 1972
BREED_SMALL_DOG_SCOTTISH_TERRIER: 'CommonGameTag' = 1783
BREED_SMALL_DOG_SHETLAND_SHEEPDOG: 'CommonGameTag' = 1811
BREED_SMALL_DOG_SHIBA_INU: 'CommonGameTag' = 1784
BREED_SMALL_DOG_SHIH_TZU: 'CommonGameTag' = 1785
BREED_SMALL_DOG_SILKY_TERRIER: 'CommonGameTag' = 1973
BREED_SMALL_DOG_SMOOTH_FOX_TERRIER: 'CommonGameTag' = 1813
BREED_SMALL_DOG_SPITZ: 'CommonGameTag' = 1991
BREED_SMALL_DOG_STAFFORDSHIRE_BULL_TERRIER: 'CommonGameTag' = 1824
BREED_SMALL_DOG_STANDARD_SCHNAUZER: 'CommonGameTag' = 1786
BREED_SMALL_DOG_TOY_FOX_TERRIER: 'CommonGameTag' = 1787
BREED_SMALL_DOG_WEST_HIGHLAND_WHITE_TERRIER: 'CommonGameTag' = 1822
BREED_SMALL_DOG_WHIPPET: 'CommonGameTag' = 1799
BREED_SMALL_DOG_WIRE_FOX_TERRIER: 'CommonGameTag' = 1789
BREED_SMALL_DOG_YORKSHIRE_TERRIER: 'CommonGameTag' = 1790
BUFF_APPEARANCE_MODIFIER_MAKEUP: 'CommonGameTag' = 2154
BUFF_BUSINESS_CUSTOMER_STAR_RATING: 'CommonGameTag' = 1551
BUFF_BUSINESS_EMPLOYEE_TRAINING: 'CommonGameTag' = 1548
BUFF_CAULDRON_POTION_MAKE_GLOWY_FAILURE_VFX: 'CommonGameTag' = 49168
BUFF_DAY_NIGHT_TRACKING: 'CommonGameTag' = 1678
BUFF_HUMANOID_ROBOT_MOOD_VFX: 'CommonGameTag' = 65653
BUFF_MYSTICAL_RELIC_CURSE: 'CommonGameTag' = 45079
BUFF_OWNABLE_RESTAURANT_CUSTOMER: 'CommonGameTag' = 2150
BUFF_POSSESSED_BUFFS: 'CommonGameTag' = 47139
BUFF_POSSESSED_BUFFS_NO_ANIMATE: 'CommonGameTag' = 47148
BUFF_SPELLS_CASTING_SPELL: 'CommonGameTag' = 49157
BUFF_TEMPERATURE: 'CommonGameTag' = 2481
BUFF_VAMPIRE_SUNLIGHT: 'CommonGameTag' = 40989
BUFF_WEATHER: 'CommonGameTag' = 59431
BUILD_ARCH: 'CommonGameTag' = 561
BUILD_BB_GAMEPLAY_EFFECT_COLUMNS_BILLS_DECREASE: 'CommonGameTag' = 2419
BUILD_BB_GAMEPLAY_EFFECT_COLUMNS_BILLS_INCREASE: 'CommonGameTag' = 2420
BUILD_BB_GAMEPLAY_EFFECT_COLUMNS_ECO_FOOTPRINT_MINUS1: 'CommonGameTag' = 2413
BUILD_BB_GAMEPLAY_EFFECT_COLUMNS_ECO_FOOTPRINT_MINUS2: 'CommonGameTag' = 2414
BUILD_BB_GAMEPLAY_EFFECT_COLUMNS_ECO_FOOTPRINT_PLUS1: 'CommonGameTag' = 2411
BUILD_BB_GAMEPLAY_EFFECT_COLUMNS_ECO_FOOTPRINT_PLUS2: 'CommonGameTag' = 2412
BUILD_BB_GAMEPLAY_EFFECT_COLUMNS_ENVIRONMENT_SCORE_MINUS1: 'CommonGameTag' = 2417
BUILD_BB_GAMEPLAY_EFFECT_COLUMNS_ENVIRONMENT_SCORE_MINUS2: 'CommonGameTag' = 2418
BUILD_BB_GAMEPLAY_EFFECT_COLUMNS_ENVIRONMENT_SCORE_PLUS1: 'CommonGameTag' = 2415
BUILD_BB_GAMEPLAY_EFFECT_COLUMNS_ENVIRONMENT_SCORE_PLUS2: 'CommonGameTag' = 2416
BUILD_BB_GAMEPLAY_EFFECT_FENCES_BILLS_DECREASE: 'CommonGameTag' = 2409
BUILD_BB_GAMEPLAY_EFFECT_FENCES_BILLS_INCREASE: 'CommonGameTag' = 2410
BUILD_BB_GAMEPLAY_EFFECT_FENCES_ECO_FOOTPRINT_MINUS1: 'CommonGameTag' = 2403
BUILD_BB_GAMEPLAY_EFFECT_FENCES_ECO_FOOTPRINT_MINUS2: 'CommonGameTag' = 2404
BUILD_BB_GAMEPLAY_EFFECT_FENCES_ECO_FOOTPRINT_PLUS1: 'CommonGameTag' = 2401
BUILD_BB_GAMEPLAY_EFFECT_FENCES_ECO_FOOTPRINT_PLUS2: 'CommonGameTag' = 2402
BUILD_BB_GAMEPLAY_EFFECT_FENCES_ENVIRONMENT_SCORE_MINUS1: 'CommonGameTag' = 2407
BUILD_BB_GAMEPLAY_EFFECT_FENCES_ENVIRONMENT_SCORE_MINUS2: 'CommonGameTag' = 2408
BUILD_BB_GAMEPLAY_EFFECT_FENCES_ENVIRONMENT_SCORE_PLUS1: 'CommonGameTag' = 2405
BUILD_BB_GAMEPLAY_EFFECT_FENCES_ENVIRONMENT_SCORE_PLUS2: 'CommonGameTag' = 2406
BUILD_BB_GAMEPLAY_EFFECT_FLOOR_PATTERN_DECREASE_BILLS: 'CommonGameTag' = 2329
BUILD_BB_GAMEPLAY_EFFECT_FLOOR_PATTERN_ECO_FOOTPRINT_MINUS1: 'CommonGameTag' = 2308
BUILD_BB_GAMEPLAY_EFFECT_FLOOR_PATTERN_ECO_FOOTPRINT_MINUS2: 'CommonGameTag' = 2309
BUILD_BB_GAMEPLAY_EFFECT_FLOOR_PATTERN_ECO_FOOTPRINT_PLUS1: 'CommonGameTag' = 2306
BUILD_BB_GAMEPLAY_EFFECT_FLOOR_PATTERN_ECO_FOOTPRINT_PLUS2: 'CommonGameTag' = 2307
BUILD_BB_GAMEPLAY_EFFECT_FLOOR_PATTERN_ENVIRONMENT_SCORE_MINUS1: 'CommonGameTag' = 2296
BUILD_BB_GAMEPLAY_EFFECT_FLOOR_PATTERN_ENVIRONMENT_SCORE_MINUS2: 'CommonGameTag' = 2297
BUILD_BB_GAMEPLAY_EFFECT_FLOOR_PATTERN_ENVIRONMENT_SCORE_PLUS1: 'CommonGameTag' = 2294
BUILD_BB_GAMEPLAY_EFFECT_FLOOR_PATTERN_ENVIRONMENT_SCORE_PLUS2: 'CommonGameTag' = 2295
BUILD_BB_GAMEPLAY_EFFECT_FLOOR_PATTERN_INCREASE_BILLS: 'CommonGameTag' = 2328
BUILD_BB_GAMEPLAY_EFFECT_OBJECT_DECREASE_BILLS: 'CommonGameTag' = 2327
BUILD_BB_GAMEPLAY_EFFECT_OBJECT_ECO_FOOTPRINT_MINUS1: 'CommonGameTag' = 2300
BUILD_BB_GAMEPLAY_EFFECT_OBJECT_ECO_FOOTPRINT_MINUS2: 'CommonGameTag' = 2301
BUILD_BB_GAMEPLAY_EFFECT_OBJECT_ECO_FOOTPRINT_PLUS1: 'CommonGameTag' = 2298
BUILD_BB_GAMEPLAY_EFFECT_OBJECT_ECO_FOOTPRINT_PLUS2: 'CommonGameTag' = 2299
BUILD_BB_GAMEPLAY_EFFECT_OBJECT_ECO_FOOTPRINT_PLUS_PARK: 'CommonGameTag' = 2444
BUILD_BB_GAMEPLAY_EFFECT_OBJECT_ENVIRONMENT_SCORE_MINUS1: 'CommonGameTag' = 2288
BUILD_BB_GAMEPLAY_EFFECT_OBJECT_ENVIRONMENT_SCORE_MINUS2: 'CommonGameTag' = 2289
BUILD_BB_GAMEPLAY_EFFECT_OBJECT_ENVIRONMENT_SCORE_PLUS1: 'CommonGameTag' = 2286
BUILD_BB_GAMEPLAY_EFFECT_OBJECT_ENVIRONMENT_SCORE_PLUS2: 'CommonGameTag' = 2287
BUILD_BB_GAMEPLAY_EFFECT_OBJECT_INCREASE_BILLS: 'CommonGameTag' = 2326
BUILD_BB_GAMEPLAY_EFFECT_OBJECT_POWER_CONSUMER: 'CommonGameTag' = 2314
BUILD_BB_GAMEPLAY_EFFECT_OBJECT_POWER_PRODUCER: 'CommonGameTag' = 2316
BUILD_BB_GAMEPLAY_EFFECT_OBJECT_WATER_CONSUMER: 'CommonGameTag' = 2315
BUILD_BB_GAMEPLAY_EFFECT_OBJECT_WATER_PRODUCER: 'CommonGameTag' = 2317
BUILD_BB_GAMEPLAY_EFFECT_POOL_SURFACE_POWER_CONSUMER: 'CommonGameTag' = 2322
BUILD_BB_GAMEPLAY_EFFECT_POOL_SURFACE_POWER_PRODUCER: 'CommonGameTag' = 2324
BUILD_BB_GAMEPLAY_EFFECT_POOL_SURFACE_WATER_CONSUMER: 'CommonGameTag' = 2323
BUILD_BB_GAMEPLAY_EFFECT_POOL_SURFACE_WATER_PRODUCER: 'CommonGameTag' = 2325
BUILD_BB_GAMEPLAY_EFFECT_ROOF_MATERIAL_DECREASE_BILLS: 'CommonGameTag' = 2333
BUILD_BB_GAMEPLAY_EFFECT_ROOF_MATERIAL_ECO_FOOTPRINT_MINUS1: 'CommonGameTag' = 2312
BUILD_BB_GAMEPLAY_EFFECT_ROOF_MATERIAL_ECO_FOOTPRINT_MINUS2: 'CommonGameTag' = 2313
BUILD_BB_GAMEPLAY_EFFECT_ROOF_MATERIAL_ECO_FOOTPRINT_PLUS1: 'CommonGameTag' = 2310
BUILD_BB_GAMEPLAY_EFFECT_ROOF_MATERIAL_ECO_FOOTPRINT_PLUS2: 'CommonGameTag' = 2311
BUILD_BB_GAMEPLAY_EFFECT_ROOF_MATERIAL_ENVIRONMENT_SCORE_MINUS1: 'CommonGameTag' = 2319
BUILD_BB_GAMEPLAY_EFFECT_ROOF_MATERIAL_ENVIRONMENT_SCORE_PLUS1: 'CommonGameTag' = 2318
BUILD_BB_GAMEPLAY_EFFECT_ROOF_MATERIAL_INCREASE_BILLS: 'CommonGameTag' = 2332
BUILD_BB_GAMEPLAY_EFFECT_ROOF_MATERIAL_POWER_PRODUCER: 'CommonGameTag' = 2320
BUILD_BB_GAMEPLAY_EFFECT_ROOF_MATERIAL_WATER_PRODUCER: 'CommonGameTag' = 2321
BUILD_BB_GAMEPLAY_EFFECT_WALL_PATTERN_DECREASE_BILLS: 'CommonGameTag' = 2331
BUILD_BB_GAMEPLAY_EFFECT_WALL_PATTERN_ECO_FOOTPRINT_MINUS1: 'CommonGameTag' = 2304
BUILD_BB_GAMEPLAY_EFFECT_WALL_PATTERN_ECO_FOOTPRINT_MINUS2: 'CommonGameTag' = 2305
BUILD_BB_GAMEPLAY_EFFECT_WALL_PATTERN_ECO_FOOTPRINT_PLUS1: 'CommonGameTag' = 2302
BUILD_BB_GAMEPLAY_EFFECT_WALL_PATTERN_ECO_FOOTPRINT_PLUS2: 'CommonGameTag' = 2303
BUILD_BB_GAMEPLAY_EFFECT_WALL_PATTERN_ENVIRONMENT_SCORE_MINUS1: 'CommonGameTag' = 2292
BUILD_BB_GAMEPLAY_EFFECT_WALL_PATTERN_ENVIRONMENT_SCORE_MINUS2: 'CommonGameTag' = 2293
BUILD_BB_GAMEPLAY_EFFECT_WALL_PATTERN_ENVIRONMENT_SCORE_PLUS1: 'CommonGameTag' = 2290
BUILD_BB_GAMEPLAY_EFFECT_WALL_PATTERN_ENVIRONMENT_SCORE_PLUS2: 'CommonGameTag' = 2291
BUILD_BB_GAMEPLAY_EFFECT_WALL_PATTERN_INCREASE_BILLS: 'CommonGameTag' = 2330
BUILD_BLOCK: 'CommonGameTag' = 548
BUILD_BLOCK_BASEMENT: 'CommonGameTag' = 242
BUILD_BLOCK_DECK: 'CommonGameTag' = 1062
BUILD_BLOCK_DIAGONAL: 'CommonGameTag' = 1070
BUILD_BLOCK_FOUNTAIN: 'CommonGameTag' = 232
BUILD_BLOCK_FOUNTAIN_TOOL: 'CommonGameTag' = 233
BUILD_BLOCK_NO_WALLS: 'CommonGameTag' = 1064
BUILD_BLOCK_PLATFORM: 'CommonGameTag' = 2491
BUILD_BLOCK_PLATFORM_TOOL: 'CommonGameTag' = 2492
BUILD_BLOCK_POOL: 'CommonGameTag' = 1226
BUILD_BLOCK_POOL_TOOL: 'CommonGameTag' = 1227
BUILD_BLOCK_WALL_TOOL: 'CommonGameTag' = 653
BUILD_BLOCK_WITH_WALLS: 'CommonGameTag' = 1063
BUILD_BUY_AUTONOMY_MARKER_ATTRACTOR: 'CommonGameTag' = 1638
BUILD_BUY_NO_AUTONOMY_LIGHTS: 'CommonGameTag' = 1637
BUILD_BUY_NO_AUTONOMY_PLANTS: 'CommonGameTag' = 1636
BUILD_BUY_NO_AUTONOMY_RUGS: 'CommonGameTag' = 1639
BUILD_BUY_NO_AUTONOMY_SCULPTURES: 'CommonGameTag' = 1634
BUILD_BUY_WORLD_OBJECTS: 'CommonGameTag' = 787
BUILD_COLUMN: 'CommonGameTag' = 538
BUILD_DOOR: 'CommonGameTag' = 535
BUILD_DOOR_DOUBLE: 'CommonGameTag' = 918
BUILD_DOOR_SINGLE: 'CommonGameTag' = 974
BUILD_ELEVATOR: 'CommonGameTag' = 1611
BUILD_FENCE: 'CommonGameTag' = 544
BUILD_FLOOR_PATTERN: 'CommonGameTag' = 541
BUILD_FLOOR_TRIM: 'CommonGameTag' = 554
BUILD_FLOWER: 'CommonGameTag' = 556
BUILD_FLOWER_BUSH: 'CommonGameTag' = 1068
BUILD_FLOWER_GROUND_COVER: 'CommonGameTag' = 1067
BUILD_FLOWER_MISC: 'CommonGameTag' = 1069
BUILD_FOUNDATION: 'CommonGameTag' = 552
BUILD_FOUNTAIN_TRIM: 'CommonGameTag' = 1081
BUILD_FRIEZE: 'CommonGameTag' = 550
BUILD_GATE: 'CommonGameTag' = 537
BUILD_GATE_DOUBLE: 'CommonGameTag' = 915
BUILD_GATE_SINGLE: 'CommonGameTag' = 976
BUILD_GENERIC: 'CommonGameTag' = 1596
BUILD_HALF_WALL: 'CommonGameTag' = 1441
BUILD_HALF_WALL_TRIM: 'CommonGameTag' = 1442
BUILD_IS_SHELL_BUILDING: 'CommonGameTag' = 1574
BUILD_LADDER: 'CommonGameTag' = 2425
BUILD_PLATFORM_TRIM: 'CommonGameTag' = 2483
BUILD_POOL_STYLES: 'CommonGameTag' = 251
BUILD_POOL_TRIM: 'CommonGameTag' = 250
BUILD_POST: 'CommonGameTag' = 782
BUILD_RAILING: 'CommonGameTag' = 547
BUILD_ROCK: 'CommonGameTag' = 560
BUILD_ROOF: 'CommonGameTag' = 540
BUILD_ROOF_ATTACHMENT: 'CommonGameTag' = 539
BUILD_ROOF_ATTACHMENT_MISC: 'CommonGameTag' = 975
BUILD_ROOF_CHIMNEY: 'CommonGameTag' = 919
BUILD_ROOF_DIAGONAL: 'CommonGameTag' = 906
BUILD_ROOF_ORTHOGONAL: 'CommonGameTag' = 977
BUILD_ROOF_PATTERN: 'CommonGameTag' = 543
BUILD_ROOF_TRIM: 'CommonGameTag' = 551
BUILD_RUG: 'CommonGameTag' = 559
BUILD_SHRUB: 'CommonGameTag' = 557
BUILD_SHRUB_BUSH: 'CommonGameTag' = 1065
BUILD_SHRUB_CACTUS: 'CommonGameTag' = 1066
BUILD_SPANDREL: 'CommonGameTag' = 545
BUILD_STAIR: 'CommonGameTag' = 546
BUILD_STYLE: 'CommonGameTag' = 549
BUILD_TREE: 'CommonGameTag' = 558
BUILD_WALL_ATTACHMENT: 'CommonGameTag' = 555
BUILD_WALL_PATTERN: 'CommonGameTag' = 542
BUILD_WEDDING_ARCH: 'CommonGameTag' = 981
BUILD_WINDOW: 'CommonGameTag' = 536
BUY_CAT_CLEAN_POWER: 'CommonGameTag' = 67591
BUY_CAT_COLLECTION_ALIEN: 'CommonGameTag' = 1044
BUY_CAT_COLLECTION_ALL: 'CommonGameTag' = 1053
BUY_CAT_COLLECTION_CAPSULE: 'CommonGameTag' = 69729
BUY_CAT_COLLECTION_CITY_POSTER: 'CommonGameTag' = 55378
BUY_CAT_COLLECTION_CRYSTAL: 'CommonGameTag' = 1041
BUY_CAT_COLLECTION_ELEMENT: 'CommonGameTag' = 1042
BUY_CAT_COLLECTION_FISH: 'CommonGameTag' = 1051
BUY_CAT_COLLECTION_FOSSIL: 'CommonGameTag' = 1043
BUY_CAT_COLLECTION_FROG: 'CommonGameTag' = 1052
BUY_CAT_COLLECTION_GACHAPON: 'CommonGameTag' = 69728
BUY_CAT_COLLECTION_GARDENING: 'CommonGameTag' = 1159
BUY_CAT_COLLECTION_METAL: 'CommonGameTag' = 1045
BUY_CAT_COLLECTION_MY_SIM: 'CommonGameTag' = 1046
BUY_CAT_COLLECTION_POSTCARD: 'CommonGameTag' = 1049
BUY_CAT_COLLECTION_SLIDE: 'CommonGameTag' = 1048
BUY_CAT_COLLECTION_SNOW_GLOBE: 'CommonGameTag' = 55377
BUY_CAT_COLLECTION_SPACE_PRINT: 'CommonGameTag' = 1047
BUY_CAT_COLLECTION_SPACE_ROCK: 'CommonGameTag' = 1050
BUY_CAT_COLLECTION_TREASURE: 'CommonGameTag' = 2043
BUY_CAT_COLUMNS: 'CommonGameTag' = 429
BUY_CAT_COMMUNITY: 'CommonGameTag' = 1352
BUY_CAT_EASEL: 'CommonGameTag' = 440
BUY_CAT_EE_ACTIVE_ACTIVITY: 'CommonGameTag' = 970
BUY_CAT_EE_ALARM: 'CommonGameTag' = 169
BUY_CAT_EE_AUDIO: 'CommonGameTag' = 163
BUY_CAT_EE_BAR: 'CommonGameTag' = 176
BUY_CAT_EE_BASKETBALL: 'CommonGameTag' = 456
BUY_CAT_EE_CHESS_TABLE: 'CommonGameTag' = 457
BUY_CAT_EE_CLOCK: 'CommonGameTag' = 171
BUY_CAT_EE_COMPUTER: 'CommonGameTag' = 162
BUY_CAT_EE_CREATIVE_ACTIVITY: 'CommonGameTag' = 968
BUY_CAT_EE_GARDENING: 'CommonGameTag' = 2075
BUY_CAT_EE_HOBBY_SKILL: 'CommonGameTag' = 165
BUY_CAT_EE_INDOOR_ACTIVITY: 'CommonGameTag' = 173
BUY_CAT_EE_KID_ACTIVITY: 'CommonGameTag' = 174
BUY_CAT_EE_KID_FURNITURE: 'CommonGameTag' = 167
BUY_CAT_EE_KID_TOY: 'CommonGameTag' = 168
BUY_CAT_EE_KNOWLEDGE_ACTIVITY: 'CommonGameTag' = 969
BUY_CAT_EE_MISC_ELECTRONICS: 'CommonGameTag' = 177
BUY_CAT_EE_MISC_ENTERTAINMENT: 'CommonGameTag' = 178
BUY_CAT_EE_MISC_KIDS: 'CommonGameTag' = 179
BUY_CAT_EE_MONKEY_BARS: 'CommonGameTag' = 458
BUY_CAT_EE_OUTDOOR_ACTIVITY: 'CommonGameTag' = 175
BUY_CAT_EE_PARTY: 'CommonGameTag' = 166
BUY_CAT_EE_PET_ACTIVITY_TOYS: 'CommonGameTag' = 2014
BUY_CAT_EE_PET_MISC: 'CommonGameTag' = 1948
BUY_CAT_EE_PET_TOYS: 'CommonGameTag' = 1944
BUY_CAT_EE_PET_VET: 'CommonGameTag' = 1947
BUY_CAT_EE_TODDLERS: 'CommonGameTag' = 172
BUY_CAT_EE_TRANSPORTATION: 'CommonGameTag' = 2237
BUY_CAT_EE_TV: 'CommonGameTag' = 161
BUY_CAT_EE_TV_SETS: 'CommonGameTag' = 164
BUY_CAT_EE_TV_STAND: 'CommonGameTag' = 1122
BUY_CAT_EE_VIDEO_GAME_CONSOLE: 'CommonGameTag' = 55356
BUY_CAT_HOLIDAY_ALL: 'CommonGameTag' = 2084
BUY_CAT_HOLIDAY_DECOR_ALL: 'CommonGameTag' = 2085
BUY_CAT_INSTRUMENT: 'CommonGameTag' = 441
BUY_CAT_LD_AWNING: 'CommonGameTag' = 979
BUY_CAT_LD_BATHROOM_ACCENT: 'CommonGameTag' = 194
BUY_CAT_LD_CEILING_DECORATION: 'CommonGameTag' = 2188
BUY_CAT_LD_CEILING_LIGHT: 'CommonGameTag' = 205
BUY_CAT_LD_CLUTTER: 'CommonGameTag' = 823
BUY_CAT_LD_CURTAIN_BLIND: 'CommonGameTag' = 978
BUY_CAT_LD_FIREPLACE: 'CommonGameTag' = 785
BUY_CAT_LD_FLOOR_LAMP: 'CommonGameTag' = 204
BUY_CAT_LD_FOUNTAIN_DECORATION: 'CommonGameTag' = 199
BUY_CAT_LD_FOUNTAIN_EMITTER: 'CommonGameTag' = 231
BUY_CAT_LD_FOUNTAIN_OBJECTS: 'CommonGameTag' = 252
BUY_CAT_LD_KID_DECORATION: 'CommonGameTag' = 196
BUY_CAT_LD_LAWN_ORNAMENT: 'CommonGameTag' = 195
BUY_CAT_LD_MIRROR: 'CommonGameTag' = 207
BUY_CAT_LD_MIRROR_FREESTANDING: 'CommonGameTag' = 965
BUY_CAT_LD_MIRROR_WALL: 'CommonGameTag' = 964
BUY_CAT_LD_MISC_DECORATION: 'CommonGameTag' = 209
BUY_CAT_LD_MISC_LIGHT: 'CommonGameTag' = 208
BUY_CAT_LD_NIGHT_LIGHT: 'CommonGameTag' = 1718
BUY_CAT_LD_OUTDOOR_LIGHT: 'CommonGameTag' = 206
BUY_CAT_LD_PLANT: 'CommonGameTag' = 202
BUY_CAT_LD_POOL_DECORATIONS: 'CommonGameTag' = 1246
BUY_CAT_LD_POOL_OBJECTS: 'CommonGameTag' = 1228
BUY_CAT_LD_POOL_OBJECTS_INVENTORYABLE: 'CommonGameTag' = 2211
BUY_CAT_LD_RUG: 'CommonGameTag' = 198
BUY_CAT_LD_RUG_MANAGED: 'CommonGameTag' = 1496
BUY_CAT_LD_SCULPTURE: 'CommonGameTag' = 200
BUY_CAT_LD_TABLE_LAMP: 'CommonGameTag' = 203
BUY_CAT_LD_WALL_DECORATION: 'CommonGameTag' = 201
BUY_CAT_LD_WALL_LIGHT: 'CommonGameTag' = 310
BUY_CAT_LD_WALL_SCULPTURE: 'CommonGameTag' = 824
BUY_CAT_LD_WINDOW_TREATMENT: 'CommonGameTag' = 197
BUY_CAT_LOT_REQ_ELEVATOR: 'CommonGameTag' = 55374
BUY_CAT_LOT_REQ_ELEVATOR_BG: 'CommonGameTag' = 2240
BUY_CAT_LOT_REQ_MAILBOX: 'CommonGameTag' = 55375
BUY_CAT_LOT_REQ_MAILBOX_BG: 'CommonGameTag' = 2241
BUY_CAT_LOT_REQ_TRASH_CHUTE: 'CommonGameTag' = 55376
BUY_CAT_LOT_REQ_TRASH_CHUTE_BG: 'CommonGameTag' = 2242
BUY_CAT_MAG_BATHROOM: 'CommonGameTag' = 271
BUY_CAT_MAG_BEDROOM: 'CommonGameTag' = 272
BUY_CAT_MAG_CAREER: 'CommonGameTag' = 468
BUY_CAT_MAG_DINING_ROOM: 'CommonGameTag' = 273
BUY_CAT_MAG_KIDS: 'CommonGameTag' = 864
BUY_CAT_MAG_KITCHEN: 'CommonGameTag' = 274
BUY_CAT_MAG_LIVING_ROOM: 'CommonGameTag' = 270
BUY_CAT_MAG_MISC: 'CommonGameTag' = 407
BUY_CAT_MAG_OUTDOOR: 'CommonGameTag' = 275
BUY_CAT_MAG_STUDY: 'CommonGameTag' = 276
BUY_CAT_OTG_APPLIANCES: 'CommonGameTag' = 2380
BUY_CAT_OTG_CRAFTING: 'CommonGameTag' = 2381
BUY_CAT_OTG_LIGHTING: 'CommonGameTag' = 2382
BUY_CAT_OTG_MISC: 'CommonGameTag' = 2383
BUY_CAT_OTG_OUTDOOR_ACTIVITIES: 'CommonGameTag' = 2384
BUY_CAT_OTG_PLUMBING: 'CommonGameTag' = 2385
BUY_CAT_PA_COFFEE_MAKER: 'CommonGameTag' = 966
BUY_CAT_PA_DISPOSABLE: 'CommonGameTag' = 188
BUY_CAT_PA_DISPOSAL_INDOOR: 'CommonGameTag' = 972
BUY_CAT_PA_DISPOSAL_OUTDOOR: 'CommonGameTag' = 973
BUY_CAT_PA_LARGE_APPLIANCE: 'CommonGameTag' = 185
BUY_CAT_PA_LITTER_BOX: 'CommonGameTag' = 1978
BUY_CAT_PA_MICROWAVE: 'CommonGameTag' = 967
BUY_CAT_PA_MISC_APPLIANCE: 'CommonGameTag' = 193
BUY_CAT_PA_MISC_PLUMBING: 'CommonGameTag' = 192
BUY_CAT_PA_MISC_SMALL_APPLIANCE: 'CommonGameTag' = 191
BUY_CAT_PA_OUTDOOR_COOKING: 'CommonGameTag' = 190
BUY_CAT_PA_PET_CARE: 'CommonGameTag' = 1945
BUY_CAT_PA_PET_FOOD: 'CommonGameTag' = 1976
BUY_CAT_PA_PUBLIC_RESTROOM: 'CommonGameTag' = 2042
BUY_CAT_PA_REFRIGERATOR: 'CommonGameTag' = 189
BUY_CAT_PA_SHOWER: 'CommonGameTag' = 183
BUY_CAT_PA_SINK: 'CommonGameTag' = 180
BUY_CAT_PA_SINK_COUNTER: 'CommonGameTag' = 920
BUY_CAT_PA_SINK_FREESTANDING: 'CommonGameTag' = 182
BUY_CAT_PA_SMALL_APPLIANCE: 'CommonGameTag' = 186
BUY_CAT_PA_STOVE: 'CommonGameTag' = 187
BUY_CAT_PA_STOVE_HOOD: 'CommonGameTag' = 913
BUY_CAT_PA_TOILET: 'CommonGameTag' = 181
BUY_CAT_PA_TUB: 'CommonGameTag' = 184
BUY_CAT_PAINTING: 'CommonGameTag' = 446
BUY_CAT_SHAREABLE: 'CommonGameTag' = 1261
BUY_CAT_SPANDRELS_FRIEZES_TRIM: 'CommonGameTag' = 430
BUY_CAT_SS_ACCENT_TABLE: 'CommonGameTag' = 1123
BUY_CAT_SS_BARSTOOL: 'CommonGameTag' = 224
BUY_CAT_SS_BED: 'CommonGameTag' = 225
BUY_CAT_SS_BED_DOUBLE: 'CommonGameTag' = 914
BUY_CAT_SS_BED_SINGLE: 'CommonGameTag' = 971
BUY_CAT_SS_BOOKSHELF: 'CommonGameTag' = 226
BUY_CAT_SS_CABINET: 'CommonGameTag' = 211
BUY_CAT_SS_COFFEE_TABLE: 'CommonGameTag' = 214
BUY_CAT_SS_COUNTER: 'CommonGameTag' = 210
BUY_CAT_SS_DESK: 'CommonGameTag' = 215
BUY_CAT_SS_DESK_CHAIR: 'CommonGameTag' = 222
BUY_CAT_SS_DINING_CHAIR: 'CommonGameTag' = 217
BUY_CAT_SS_DINING_TABLE: 'CommonGameTag' = 212
BUY_CAT_SS_DINING_TABLE_LONG: 'CommonGameTag' = 963
BUY_CAT_SS_DINING_TABLE_SHORT: 'CommonGameTag' = 962
BUY_CAT_SS_DISPLAY: 'CommonGameTag' = 216
BUY_CAT_SS_DRESSER: 'CommonGameTag' = 227
BUY_CAT_SS_ELEMENT_DISPLAY: 'CommonGameTag' = 1072
BUY_CAT_SS_END_TABLE: 'CommonGameTag' = 213
BUY_CAT_SS_HALLWAY_TABLE: 'CommonGameTag' = 1126
BUY_CAT_SS_LIVING_CHAIR: 'CommonGameTag' = 221
BUY_CAT_SS_LOVE_SEAT: 'CommonGameTag' = 219
BUY_CAT_SS_MISC_COMFORT: 'CommonGameTag' = 229
BUY_CAT_SS_MISC_STORAGE: 'CommonGameTag' = 230
BUY_CAT_SS_MISC_SURFACE: 'CommonGameTag' = 228
BUY_CAT_SS_OUTDOOR_BENCH: 'CommonGameTag' = 916
BUY_CAT_SS_OUTDOOR_CHAIR: 'CommonGameTag' = 220
BUY_CAT_SS_OUTDOOR_SEATING: 'CommonGameTag' = 223
BUY_CAT_SS_OUTDOOR_TABLE: 'CommonGameTag' = 917
BUY_CAT_SS_PET_BED: 'CommonGameTag' = 1977
BUY_CAT_SS_PET_FURNITURE: 'CommonGameTag' = 1946
BUY_CAT_SS_POSTCARD_BOARD: 'CommonGameTag' = 1071
BUY_CAT_SS_SCRATCHING_POST: 'CommonGameTag' = 1979
BUY_CAT_SS_SOFA: 'CommonGameTag' = 218
BUY_CAT_VENUE_ARTS_CENTER: 'CommonGameTag' = 1604
BUY_CAT_VENUE_ARTS_COMMONS: 'CommonGameTag' = 2273
BUY_CAT_VENUE_BAR: 'CommonGameTag' = 1353
BUY_CAT_VENUE_BEACH: 'CommonGameTag' = 2199
BUY_CAT_VENUE_BLUFFS: 'CommonGameTag' = 24612
BUY_CAT_VENUE_CAFE: 'CommonGameTag' = 24578
BUY_CAT_VENUE_CHALET: 'CommonGameTag' = 24611
BUY_CAT_VENUE_CLUB: 'CommonGameTag' = 1354
BUY_CAT_VENUE_COMMUNITY_SPACE_DEFAULT: 'CommonGameTag' = 2438
BUY_CAT_VENUE_COMMUNITY_SPACE_GARDEN: 'CommonGameTag' = 2440
BUY_CAT_VENUE_COMMUNITY_SPACE_MAKER_SPACE: 'CommonGameTag' = 2439
BUY_CAT_VENUE_COMMUNITY_SPACE_MARKETPLACE: 'CommonGameTag' = 2441
BUY_CAT_VENUE_DOCTOR_CLINIC: 'CommonGameTag' = 1362
BUY_CAT_VENUE_FOREST_PARK: 'CommonGameTag' = 1355
BUY_CAT_VENUE_GYM: 'CommonGameTag' = 1356
BUY_CAT_VENUE_KARAOKE: 'CommonGameTag' = 1579
BUY_CAT_VENUE_LIBRARY: 'CommonGameTag' = 1357
BUY_CAT_VENUE_LOUNGE: 'CommonGameTag' = 1358
BUY_CAT_VENUE_MUSEUM: 'CommonGameTag' = 1359
BUY_CAT_VENUE_ONSEN: 'CommonGameTag' = 69662
BUY_CAT_VENUE_PARK: 'CommonGameTag' = 1360
BUY_CAT_VENUE_PENTHOUSE: 'CommonGameTag' = 55373
BUY_CAT_VENUE_PENTHOUSE_BG: 'CommonGameTag' = 2239
BUY_CAT_VENUE_POLICE_STATION: 'CommonGameTag' = 1363
BUY_CAT_VENUE_POOL: 'CommonGameTag' = 1459
BUY_CAT_VENUE_RELAXATION_CENTER: 'CommonGameTag' = 18436
BUY_CAT_VENUE_RESTAURANT: 'CommonGameTag' = 26625
BUY_CAT_VENUE_RETAIL: 'CommonGameTag' = 1361
BUY_CAT_VENUE_RUINS: 'CommonGameTag' = 24613
BUY_CAT_VENUE_SCIENCE_COMMONS: 'CommonGameTag' = 2272
BUY_CAT_VENUE_SCIENTIST_LAB: 'CommonGameTag' = 1364
BUY_CAT_VENUE_STAR_GARDEN: 'CommonGameTag' = 1580
BUY_CAT_VENUE_UNIVERSITY_HOUSING: 'CommonGameTag' = 2229
BUY_CAT_VENUE_VET: 'CommonGameTag' = 57401
BUY_CAT_WINDOWS: 'CommonGameTag' = 428
BUY_TAG_DISABLE_PLACEMENT_OUTLINE: 'CommonGameTag' = 43017
BUY_TAG_NOT_AUTO_COUNTER_APPLIANCE: 'CommonGameTag' = 2274
BUY_TAG_SHOW_IF_WALLS_CUTAWAY: 'CommonGameTag' = 1492
CAS_STORY_ADD_CAREER: 'CommonGameTag' = 2213
CAS_STORY_ADD_FUNDS: 'CommonGameTag' = 2212
CAS_STORY_ADD_OCCULT: 'CommonGameTag' = 2215
CAS_STORY_ADD_SKILL: 'CommonGameTag' = 2214
COAT_PATTERN_BICOLOR: 'CommonGameTag' = 2004
COAT_PATTERN_BRINDLE: 'CommonGameTag' = 1995
COAT_PATTERN_CALICO: 'CommonGameTag' = 2006
COAT_PATTERN_COLORPOINT: 'CommonGameTag' = 2019
COAT_PATTERN_FANTASY: 'CommonGameTag' = 2009
COAT_PATTERN_HARLEQUIN: 'CommonGameTag' = 2022
COAT_PATTERN_MASK: 'CommonGameTag' = 2001
COAT_PATTERN_MERLE: 'CommonGameTag' = 1999
COAT_PATTERN_ROSETTE: 'CommonGameTag' = 2008
COAT_PATTERN_SABLE: 'CommonGameTag' = 1996
COAT_PATTERN_SADDLE: 'CommonGameTag' = 2000
COAT_PATTERN_SOLID: 'CommonGameTag' = 1994
COAT_PATTERN_SPECKLED: 'CommonGameTag' = 1998
COAT_PATTERN_SPOTTED: 'CommonGameTag' = 1997
COAT_PATTERN_STRIPED: 'CommonGameTag' = 2003
COAT_PATTERN_TABBY: 'CommonGameTag' = 2002
COAT_PATTERN_TIPPED: 'CommonGameTag' = 2007
COAT_PATTERN_TORTOISESHELL: 'CommonGameTag' = 2005
COAT_PATTERN_TRI_COLOR: 'CommonGameTag' = 2021
COLOR_BLACK: 'CommonGameTag' = 93
COLOR_BLUE: 'CommonGameTag' = 68
COLOR_BROWN: 'CommonGameTag' = 91
COLOR_BROWN_LIGHT: 'CommonGameTag' = 293
COLOR_DARK_BROWN: 'CommonGameTag' = 90
COLOR_GRAY: 'CommonGameTag' = 92
COLOR_GREEN: 'CommonGameTag' = 69
COLOR_ORANGE: 'CommonGameTag' = 95
COLOR_PALETTE_EARTH_TONES: 'CommonGameTag' = 280
COLOR_PALETTE_GOTH_ROCK_PUNK: 'CommonGameTag' = 288
COLOR_PALETTE_GRAYSCALE_DARK: 'CommonGameTag' = 282
COLOR_PALETTE_GRAYSCALE_LIGHT: 'CommonGameTag' = 283
COLOR_PALETTE_JEWEL: 'CommonGameTag' = 141
COLOR_PALETTE_SPRING: 'CommonGameTag' = 285
COLOR_PALETTE_SUMMER: 'CommonGameTag' = 286
COLOR_PALETTE_WINTER: 'CommonGameTag' = 287
COLOR_PINK: 'CommonGameTag' = 106
COLOR_PURPLE: 'CommonGameTag' = 107
COLOR_RED: 'CommonGameTag' = 65
COLOR_WHITE: 'CommonGameTag' = 105
COLOR_YELLOW: 'CommonGameTag' = 104
CRAFTING_GARDENING: 'CommonGameTag' = 424
CRAFTING_SONG: 'CommonGameTag' = 447
DOG_SIZE_LARGE: 'CommonGameTag' = 1892
DOG_SIZE_SMALL: 'CommonGameTag' = 1891
DRINK_ALCOHOLIC: 'CommonGameTag' = 264
DRINK_ANY: 'CommonGameTag' = 269
DRINK_CRAFTED: 'CommonGameTag' = 351
DRINK_CRAFTED_COFFEE_TEA: 'CommonGameTag' = 459
DRINK_FIZZY: 'CommonGameTag' = 18451
DRINK_KAVA: 'CommonGameTag' = 63538
DRINK_NON_ALCOHOLIC: 'CommonGameTag' = 265
DRINK_SERUM: 'CommonGameTag' = 12290
DRINK_SPACE_ENERGY: 'CommonGameTag' = 691
DRINK_TODDLER: 'CommonGameTag' = 1661
DRINKS_ANY: 'CommonGameTag' = 159
DRINKS_BAR_ALCOHOLIC: 'CommonGameTag' = 157
DRINKS_BAR_ANY: 'CommonGameTag' = 160
DRINKS_BAR_NON_ALCOHOLIC: 'CommonGameTag' = 158
DUPLICATE_AFFORDANCE_COUNTER: 'CommonGameTag' = 57450
DUPLICATE_AFFORDANCE_MAGIC_HQ_BE_AMAZED: 'CommonGameTag' = 49184
DUPLICATE_AFFORDANCE_MAGIC_HQ_BROWSE_BOOKS: 'CommonGameTag' = 49185
DUPLICATE_AFFORDANCE_MIRROR: 'CommonGameTag' = 2172
DUPLICATE_AFFORDANCE_READ: 'CommonGameTag' = 1173
DUPLICATE_AFFORDANCE_SCRATCH: 'CommonGameTag' = 57449
DUPLICATE_AFFORDANCE_SINK: 'CommonGameTag' = 2096
DUPLICATE_AFFORDANCE_TOYS_PICK_UP: 'CommonGameTag' = 1697
DUPLICATE_AFFORDANCE_TOYS_PLAY_WITH: 'CommonGameTag' = 1696
DUPLICATE_AFFORDANCE_TRAIT_INTERACTIONS: 'CommonGameTag' = 1174
DUPLICATE_AFFORDANCE_VIEW: 'CommonGameTag' = 1175
EARS_DOWN: 'CommonGameTag' = 57347
EARS_UP: 'CommonGameTag' = 57348
ENSEMBLE_FIN_ORANGE_RED: 'CommonGameTag' = 63537
ENSEMBLE_FIN_PASTEL: 'CommonGameTag' = 63535
ENSEMBLE_FIN_TEAL_PURPLE: 'CommonGameTag' = 63536
ENSEMBLE_SWIM_BANDEAU_BLACK: 'CommonGameTag' = 1257
ENSEMBLE_SWIM_BANDEAU_BLUE: 'CommonGameTag' = 1258
ENSEMBLE_SWIM_BANDEAU_CORAL: 'CommonGameTag' = 1251
ENSEMBLE_SWIM_BANDEAU_YELLOW: 'CommonGameTag' = 1254
ENSEMBLE_SWIM_HALTER_BLACK: 'CommonGameTag' = 1239
ENSEMBLE_SWIM_HALTER_LIME: 'CommonGameTag' = 1255
ENSEMBLE_SWIM_HALTER_RED: 'CommonGameTag' = 1252
ENSEMBLE_SWIM_HALTER_WHITE: 'CommonGameTag' = 1256
ENSEMBLE_SWIM_METAL_BROWN: 'CommonGameTag' = 1259
ENSEMBLE_SWIM_METAL_GREEN: 'CommonGameTag' = 1260
ENSEMBLE_SWIM_METAL_PINK: 'CommonGameTag' = 1250
ENSEMBLE_SWIM_METAL_TEAL: 'CommonGameTag' = 1253
EYE_COLOR_ALIEN: 'CommonGameTag' = 12392
EYE_COLOR_AMBER: 'CommonGameTag' = 114
EYE_COLOR_AQUA: 'CommonGameTag' = 115
EYE_COLOR_BLACK: 'CommonGameTag' = 116
EYE_COLOR_BLUE: 'CommonGameTag' = 117
EYE_COLOR_BLUE_GRAY: 'CommonGameTag' = 1884
EYE_COLOR_BROWN: 'CommonGameTag' = 118
EYE_COLOR_DARK_BROWN: 'CommonGameTag' = 119
EYE_COLOR_GOLDEN: 'CommonGameTag' = 423
EYE_COLOR_GRAY: 'CommonGameTag' = 120
EYE_COLOR_GREEN: 'CommonGameTag' = 121
EYE_COLOR_HAZEL: 'CommonGameTag' = 421
EYE_COLOR_HAZEL_BLUE: 'CommonGameTag' = 122
EYE_COLOR_HAZEL_GREEN: 'CommonGameTag' = 123
EYE_COLOR_HONEY: 'CommonGameTag' = 422
EYE_COLOR_LIGHT_BLUE: 'CommonGameTag' = 124
EYE_COLOR_LIGHT_BROWN: 'CommonGameTag' = 125
EYE_COLOR_LIGHT_GREEN: 'CommonGameTag' = 126
EYE_COLOR_LIGHT_YELLOW: 'CommonGameTag' = 1880
EYE_COLOR_VAMPIRE_BLACK: 'CommonGameTag' = 40988
EYE_COLOR_VAMPIRE_BLUE_BLACK: 'CommonGameTag' = 40980
EYE_COLOR_VAMPIRE_GREEN: 'CommonGameTag' = 40981
EYE_COLOR_VAMPIRE_ICE_BLUE: 'CommonGameTag' = 40982
EYE_COLOR_VAMPIRE_PURPLE: 'CommonGameTag' = 40983
EYE_COLOR_VAMPIRE_RED: 'CommonGameTag' = 40984
EYE_COLOR_VAMPIRE_RED_BLACK: 'CommonGameTag' = 40985
EYE_COLOR_VAMPIRE_WHITE: 'CommonGameTag' = 40986
EYE_COLOR_VAMPIRE_YELLOW: 'CommonGameTag' = 40987
EYE_COLOR_YELLOW: 'CommonGameTag' = 1879
EYE_COLOR_YELLOW_GREEN: 'CommonGameTag' = 1885
EYEBROW_SHAPE_ARCHED: 'CommonGameTag' = 1060
EYEBROW_SHAPE_CURVED: 'CommonGameTag' = 1059
EYEBROW_SHAPE_STRAIGHT: 'CommonGameTag' = 1058
EYEBROW_THICKNESS_BALD: 'CommonGameTag' = 12393
EYEBROW_THICKNESS_BUSHY: 'CommonGameTag' = 1054
EYEBROW_THICKNESS_MEDIUM: 'CommonGameTag' = 1057
EYEBROW_THICKNESS_SPARSE: 'CommonGameTag' = 1056
EYEBROW_THICKNESS_THIN: 'CommonGameTag' = 1055
FABRIC_COTTON: 'CommonGameTag' = 532
FABRIC_DENIM: 'CommonGameTag' = 587
FABRIC_LEATHER: 'CommonGameTag' = 531
FABRIC_METAL: 'CommonGameTag' = 932
FABRIC_SILK: 'CommonGameTag' = 585
FABRIC_SILVER: 'CommonGameTag' = 933
FABRIC_SYNTHETIC: 'CommonGameTag' = 584
FABRIC_WOOL: 'CommonGameTag' = 586
FACE_DETAIL_FRECKLES_NOSE: 'CommonGameTag' = 1651
FACE_DETAIL_FRECKLES_SPREAD: 'CommonGameTag' = 1650
FACE_DETAIL_TEETH_BUCK: 'CommonGameTag' = 1647
FACE_DETAIL_TEETH_GAP: 'CommonGameTag' = 1649
FACE_DETAIL_TEETH_SNAGGLE: 'CommonGameTag' = 1648
FACE_DETAIL_TEETH_STRAIGHT: 'CommonGameTag' = 1652
FACIAL_HAIR_BEARD: 'CommonGameTag' = 378
FACIAL_HAIR_GOATEE: 'CommonGameTag' = 379
FACIAL_HAIR_MUSTACHE: 'CommonGameTag' = 380
FIRE_FLAMMABLE_AUTO_ADDED: 'CommonGameTag' = 1925
FLOOR_PATTERN_CARPET: 'CommonGameTag' = 298
FLOOR_PATTERN_DIRT_SAND: 'CommonGameTag' = 309
FLOOR_PATTERN_FLOWERS: 'CommonGameTag' = 308
FLOOR_PATTERN_GRASS: 'CommonGameTag' = 307
FLOOR_PATTERN_LINOLEUM: 'CommonGameTag' = 303
FLOOR_PATTERN_MASONRY: 'CommonGameTag' = 302
FLOOR_PATTERN_METAL: 'CommonGameTag' = 304
FLOOR_PATTERN_MISC: 'CommonGameTag' = 305
FLOOR_PATTERN_OUTDOOR: 'CommonGameTag' = 306
FLOOR_PATTERN_STONE: 'CommonGameTag' = 301
FLOOR_PATTERN_TILE: 'CommonGameTag' = 299
FLOOR_PATTERN_WOOD: 'CommonGameTag' = 300
FOOD_ANY: 'CommonGameTag' = 268
FOOD_AROMATIC: 'CommonGameTag' = 1614
FOOD_BATUU: 'CommonGameTag' = 51240
FOOD_BEACH_BUM: 'CommonGameTag' = 2203
FOOD_BURRITO: 'CommonGameTag' = 1602
FOOD_CAFETERIA_STATION_PRANKED: 'CommonGameTag' = 65551
FOOD_CAMPFIRE: 'CommonGameTag' = 10263
FOOD_CHOPSTICKS: 'CommonGameTag' = 55379
FOOD_DESSERT: 'CommonGameTag' = 359
FOOD_DISH_BOWL: 'CommonGameTag' = 1980
FOOD_DISH_PLATE: 'CommonGameTag' = 1981
FOOD_DISH_SHORT_FOOD: 'CommonGameTag' = 1988
FOOD_DISH_TALL_FOOD: 'CommonGameTag' = 1987
FOOD_EAT_WITH_TODDLER_SIZED: 'CommonGameTag' = 1675
FOOD_EAT_WITH_UTENSIL: 'CommonGameTag' = 1674
FOOD_FOOD_BLOB_APPLESAUCE_LIGHT_BROWN: 'CommonGameTag' = 1687
FOOD_FOOD_BLOB_FRUIT_SALAD_RED_YELLOW_BLUE: 'CommonGameTag' = 1688
FOOD_FOOD_BLOB_MAC_CHEESE_YELLOW_SPOTTY: 'CommonGameTag' = 1689
FOOD_FOOD_BLOB_MINESTRONE_REDDISH_BROWN: 'CommonGameTag' = 1690
FOOD_FOOD_BLOB_OATMEAL_LIGHT_BROWN_SPOTTY: 'CommonGameTag' = 1691
FOOD_FOOD_BLOB_PEAS_GREEN: 'CommonGameTag' = 1693
FOOD_FOOD_BLOB_YOGURT_PINK_WHITISH: 'CommonGameTag' = 1692
FOOD_FRIDGE: 'CommonGameTag' = 348
FOOD_GOURMET_MEAL: 'CommonGameTag' = 2511
FOOD_GRAND_MEAL_EP05: 'CommonGameTag' = 2083
FOOD_GRILLED_CHEESE: 'CommonGameTag' = 1499
FOOD_HAS_FISH: 'CommonGameTag' = 2201
FOOD_HAS_MEAT: 'CommonGameTag' = 1572
FOOD_HAS_MEAT_SUBSTITUTE: 'CommonGameTag' = 1573
FOOD_HEALTHY: 'CommonGameTag' = 2494
FOOD_HEALTHY_MEAL: 'CommonGameTag' = 69668
FOOD_ICO: 'CommonGameTag' = 1984
FOOD_ISLAND: 'CommonGameTag' = 63511
FOOD_JUNGLE: 'CommonGameTag' = 45089
FOOD_JUNK: 'CommonGameTag' = 2495
FOOD_JUNK_SUGAR_ADDED: 'CommonGameTag' = 69705
FOOD_KALUA_PORK: 'CommonGameTag' = 63512
FOOD_MEAL_BREAKFAST: 'CommonGameTag' = 1728
FOOD_MEAL_DINNER: 'CommonGameTag' = 1730
FOOD_MEAL_LUNCH: 'CommonGameTag' = 1729
FOOD_MULTI: 'CommonGameTag' = 347
FOOD_PICKY_EATER_A_LIKE: 'CommonGameTag' = 1712
FOOD_PICKY_EATER_B_LIKE: 'CommonGameTag' = 1713
FOOD_PICKY_EATER_C_LIKE: 'CommonGameTag' = 1714
FOOD_PICKY_EATER_D_LIKE: 'CommonGameTag' = 1715
FOOD_PICKY_EATER_DISLIKE: 'CommonGameTag' = 1717
FOOD_PICKY_EATER_E_LIKE: 'CommonGameTag' = 1716
FOOD_PREPARED: 'CommonGameTag' = 759
FOOD_QUICK_MEAL: 'CommonGameTag' = 2236
FOOD_SACK_LUNCH: 'CommonGameTag' = 43025
FOOD_SINGLE: 'CommonGameTag' = 1686
FOOD_SNACK: 'CommonGameTag' = 651
FOOD_SPICY: 'CommonGameTag' = 1603
FOOD_TODDLER_DISLIKE: 'CommonGameTag' = 1659
FOOD_TODDLER_LIKE: 'CommonGameTag' = 1660
FULL_BODY_APRON: 'CommonGameTag' = 951
FULL_BODY_COSTUME: 'CommonGameTag' = 948
FULL_BODY_JUMPSUITS: 'CommonGameTag' = 374
FULL_BODY_LINGERIE: 'CommonGameTag' = 950
FULL_BODY_LONG_DRESS: 'CommonGameTag' = 375
FULL_BODY_OUTERWEAR: 'CommonGameTag' = 947
FULL_BODY_OVERALL: 'CommonGameTag' = 952
FULL_BODY_ROBE: 'CommonGameTag' = 949
FULL_BODY_SHORT_DRESS: 'CommonGameTag' = 376
FULL_BODY_SUITS: 'CommonGameTag' = 377
FULL_BODY_SWIMSUIT: 'CommonGameTag' = 1237
FUNC_ACCURSED_OBJECT: 'CommonGameTag' = 86019
FUNC_ACCURSED_OBJECT_REWARD_DOLL: 'CommonGameTag' = 86026
FUNC_ACCURSED_OBJECT_REWARD_TENDRIL: 'CommonGameTag' = 86027
FUNC_ACID_MUD_PUDDLE: 'CommonGameTag' = 67625
FUNC_ACTIVITY_TABLE: 'CommonGameTag' = 688
FUNC_ACTIVITY_TABLE_DRAWING: 'CommonGameTag' = 934
FUNC_ACTOR_CAREER_CELL_DOOR: 'CommonGameTag' = 61496
FUNC_ACTOR_CAREER_FRIDGE: 'CommonGameTag' = 61495
FUNC_ACTOR_CAREER_HOSPITAL_EXAM_BED: 'CommonGameTag' = 61497
FUNC_ACTOR_CAREER_MOVIE_MEDIEVAL_STAGE_PROP: 'CommonGameTag' = 61647
FUNC_ACTOR_CAREER_MOVIE_PIRATE_STAGE_PROP: 'CommonGameTag' = 61625
FUNC_ACTOR_CAREER_MOVIE_SUPER_HERO_STAGE_PROP: 'CommonGameTag' = 61627
FUNC_ACTOR_CAREER_PEDESTAL: 'CommonGameTag' = 61498
FUNC_ACTOR_CAREER_PIRATE_WHEEL: 'CommonGameTag' = 61499
FUNC_ACTOR_CAREER_STAGE_MARK_LARGE: 'CommonGameTag' = 61500
FUNC_ACTOR_CAREER_STAGE_OBJECT_ALL: 'CommonGameTag' = 61611
FUNC_ACTOR_CAREER_STAGE_OBJECT_CAMPFIRE: 'CommonGameTag' = 61633
FUNC_ACTOR_CAREER_STUDIO_DOOR_PRIVATE: 'CommonGameTag' = 61641
FUNC_ACTOR_CAREER_TV_HIGH_APOCALYPSE_STAGE_PROP: 'CommonGameTag' = 61626
FUNC_ADVENTURE_GEAR: 'CommonGameTag' = 69710
FUNC_AIR: 'CommonGameTag' = 1284
FUNC_ALERT: 'CommonGameTag' = 1392
FUNC_ALIEN: 'CommonGameTag' = 12397
FUNC_ALIEN_PORTAL: 'CommonGameTag' = 12436
FUNC_ALIEN_SATELLITE_DISH: 'CommonGameTag' = 12370
FUNC_AMBROSIA: 'CommonGameTag' = 1989
FUNC_AMBROSIA_TREAT: 'CommonGameTag' = 57399
FUNC_ANIMAL: 'CommonGameTag' = 506
FUNC_ANNIVERSARY: 'CommonGameTag' = 1366
FUNC_APARTMENT_PROBLEM: 'CommonGameTag' = 55333
FUNC_APPARITION: 'CommonGameTag' = 1195
FUNC_AQUARIUM: 'CommonGameTag' = 1109
FUNC_ARCADE: 'CommonGameTag' = 24605
FUNC_ARCHAEOLOGY_CAN_BE_STUDIED: 'CommonGameTag' = 45112
FUNC_ARCHAEOLOGY_CAN_BE_STUDIED_BG: 'CommonGameTag' = 2051
FUNC_ARCHAEOLOGY_ITEM_MED: 'CommonGameTag' = 45073
FUNC_ARCHAEOLOGY_ITEM_SMALL: 'CommonGameTag' = 45074
FUNC_ARCHAEOLOGY_TABLE: 'CommonGameTag' = 45072
FUNC_ART: 'CommonGameTag' = 484
FUNC_ART_SCULPTURE: 'CommonGameTag' = 2209
FUNC_ARTS_UNIVERSITY_SHELL: 'CommonGameTag' = 65548
FUNC_ARTS_UNIVERSITY_SHELL_SHELL1: 'CommonGameTag' = 65560
FUNC_ARTS_UNIVERSITY_SHELL_SHELL2: 'CommonGameTag' = 65561
FUNC_ASH_PILE: 'CommonGameTag' = 1465
FUNC_ASTRONAUT: 'CommonGameTag' = 1131
FUNC_ATHLETIC: 'CommonGameTag' = 476
FUNC_ATMOSPHERIC_CONDENSER: 'CommonGameTag' = 67616
FUNC_ATOM: 'CommonGameTag' = 1394
FUNC_AUTHOR: 'CommonGameTag' = 1119
FUNC_AUTO_PET_FEEDER: 'CommonGameTag' = 57396
FUNC_AUTOGRAPHED_OBJECT: 'CommonGameTag' = 61614
FUNC_AUTONOMY_AREA_MARKER: 'CommonGameTag' = 2186
FUNC_AWNING: 'CommonGameTag' = 1155
FUNC_BABY: 'CommonGameTag' = 744
FUNC_BABY_YODA: 'CommonGameTag' = 2280
FUNC_BADGE: 'CommonGameTag' = 1421
FUNC_BAIT_CRYSTAL: 'CommonGameTag' = 983
FUNC_BAIT_ELEMENT: 'CommonGameTag' = 982
FUNC_BAIT_FRESH_FLOWER: 'CommonGameTag' = 827
FUNC_BAIT_FRESH_FRUIT: 'CommonGameTag' = 825
FUNC_BAIT_FROG: 'CommonGameTag' = 788
FUNC_BAIT_MED_FISH: 'CommonGameTag' = 829
FUNC_BAIT_METAL: 'CommonGameTag' = 984
FUNC_BAIT_ORGANIC: 'CommonGameTag' = 789
FUNC_BAIT_PLASMA_FRUIT: 'CommonGameTag' = 40972
FUNC_BAIT_ROTTEN_FLOWER: 'CommonGameTag' = 828
FUNC_BAIT_ROTTEN_FRUIT: 'CommonGameTag' = 826
FUNC_BAIT_SMALL_FISH: 'CommonGameTag' = 796
FUNC_BAIT_TRASH: 'CommonGameTag' = 830
FUNC_BAKE: 'CommonGameTag' = 1385
FUNC_BAKING: 'CommonGameTag' = 1387
FUNC_BALL: 'CommonGameTag' = 528
FUNC_BANQUET: 'CommonGameTag' = 8218
FUNC_BANQUET_TABLE: 'CommonGameTag' = 8213
FUNC_BAR: 'CommonGameTag' = 498
FUNC_BAR_GLOBE: 'CommonGameTag' = 36865
FUNC_BARBECUE: 'CommonGameTag' = 1079
FUNC_BARREL: 'CommonGameTag' = 12378
FUNC_BASEBOARD: 'CommonGameTag' = 1084
FUNC_BASIN: 'CommonGameTag' = 1110
FUNC_BASKET: 'CommonGameTag' = 527
FUNC_BASKETBALL: 'CommonGameTag' = 55404
FUNC_BASKETBALL_HOOP: 'CommonGameTag' = 55402
FUNC_BAT: 'CommonGameTag' = 1220
FUNC_BATH: 'CommonGameTag' = 1022
FUNC_BATHROOM: 'CommonGameTag' = 1023
FUNC_BATHTUB: 'CommonGameTag' = 990
FUNC_BATTLE_STATION: 'CommonGameTag' = 32770
FUNC_BATUU_ANTIQUITIES: 'CommonGameTag' = 51230
FUNC_BATUU_BINOCULARS: 'CommonGameTag' = 51238
FUNC_BATUU_BLASTER: 'CommonGameTag' = 51233
FUNC_BATUU_COMM_LINK: 'CommonGameTag' = 51234
FUNC_BATUU_CONTROL_PANEL: 'CommonGameTag' = 51239
FUNC_BATUU_CONTROL_PANEL_FIRST_ORDER: 'CommonGameTag' = 51250
FUNC_BATUU_CONTROL_PANEL_FIRST_ORDER_COMMUNICATIONS_TOWER: 'CommonGameTag' = 51244
FUNC_BATUU_CONTROL_PANEL_MAIN_STRIP: 'CommonGameTag' = 51257
FUNC_BATUU_CONTROL_PANEL_RESISTANCE: 'CommonGameTag' = 51256
FUNC_BATUU_DATA_SPIKE: 'CommonGameTag' = 51235
FUNC_BATUU_FAKE_ID: 'CommonGameTag' = 51236
FUNC_BATUU_MISSION_RS8_RESCUE_PREP_OBJ: 'CommonGameTag' = 51245
FUNC_BATUU_MISSION_VALUABLE: 'CommonGameTag' = 51242
FUNC_BATUU_PORG: 'CommonGameTag' = 51271
FUNC_BATUU_SHELL: 'CommonGameTag' = 51249
FUNC_BATUU_SHELL_DOCKING_BAY: 'CommonGameTag' = 51247
FUNC_BATUU_SHELL_DWELLING: 'CommonGameTag' = 51248
FUNC_BATUU_SUPPLY_CRATE: 'CommonGameTag' = 51206
FUNC_BATUU_SUPPLY_CRATE_BLACK_SPIRE: 'CommonGameTag' = 51268
FUNC_BATUU_SUPPLY_CRATE_FIRST_ORDER: 'CommonGameTag' = 51267
FUNC_BATUU_SUPPLY_CRATE_RESISTANCE: 'CommonGameTag' = 51266
FUNC_BATUU_THERMAL_DETONATOR: 'CommonGameTag' = 51237
FUNC_BBQ: 'CommonGameTag' = 1078
FUNC_BEACH_CAVE: 'CommonGameTag' = 63534
FUNC_BEAM: 'CommonGameTag' = 1427
FUNC_BEAR: 'CommonGameTag' = 508
FUNC_BEAST: 'CommonGameTag' = 1216
FUNC_BED: 'CommonGameTag' = 777
FUNC_BED_KID: 'CommonGameTag' = 888
FUNC_BED_VALID_MONSTER_UNDER_TARGET: 'CommonGameTag' = 1542
FUNC_BEDSIDE_TABLE: 'CommonGameTag' = 1009
FUNC_BEE_SWARM: 'CommonGameTag' = 59452
FUNC_BEE_BOX: 'CommonGameTag' = 59449
FUNC_BENCH: 'CommonGameTag' = 494
FUNC_BEVERAGE: 'CommonGameTag' = 500
FUNC_BG_PIPE_ORGAN: 'CommonGameTag' = 1709
FUNC_BG_YOGA_MAT: 'CommonGameTag' = 1710
FUNC_BIKE: 'CommonGameTag' = 2278
FUNC_BIN: 'CommonGameTag' = 925
FUNC_BIO_FUEL: 'CommonGameTag' = 2336
FUNC_BIRD_FEEDER: 'CommonGameTag' = 34820
FUNC_BIZARRE_IDOL: 'CommonGameTag' = 86030
FUNC_BLADDER: 'CommonGameTag' = 995
FUNC_BLINDS: 'CommonGameTag' = 1153
FUNC_BLOB: 'CommonGameTag' = 512
FUNC_BLOCK_CONSTRUCTION_TABLE: 'CommonGameTag' = 43029
FUNC_BONE: 'CommonGameTag' = 1210
FUNC_BONFIRE: 'CommonGameTag' = 2190
FUNC_BONY: 'CommonGameTag' = 1211
FUNC_BOOK: 'CommonGameTag' = 893
FUNC_BOOK_BOOK_OF_LIFE: 'CommonGameTag' = 1177
FUNC_BOOK_HOMEWORK: 'CommonGameTag' = 1080
FUNC_BOOK_MAGIC_TOME: 'CommonGameTag' = 49153
FUNC_BOOK_PLAYER_CREATED: 'CommonGameTag' = 656
FUNC_BOOKCASE: 'CommonGameTag' = 1389
FUNC_BOOMBOX: 'CommonGameTag' = 991
FUNC_BOOTH: 'CommonGameTag' = 26629
FUNC_BOOTH_BANQUETTE: 'CommonGameTag' = 26641
FUNC_BOOTH_CORNER: 'CommonGameTag' = 26636
FUNC_BOTTLE: 'CommonGameTag' = 1160
FUNC_BOWL: 'CommonGameTag' = 1222
FUNC_BOWLING: 'CommonGameTag' = 38925
FUNC_BOWLING_LANE: 'CommonGameTag' = 38913
FUNC_BOWLING_LANE_BG: 'CommonGameTag' = 1720
FUNC_BOX: 'CommonGameTag' = 579
FUNC_BOX_OF_DECORATIONS: 'CommonGameTag' = 59408
FUNC_BREWER: 'CommonGameTag' = 1882
FUNC_BRICK: 'CommonGameTag' = 1086
FUNC_BRIEFCASE: 'CommonGameTag' = 55407
FUNC_BUBBLE_BLOWER: 'CommonGameTag' = 55310
FUNC_BUCKET: 'CommonGameTag' = 1291
FUNC_BUFFET: 'CommonGameTag' = 8217
FUNC_BUSH: 'CommonGameTag' = 1163
FUNC_BUSINESS: 'CommonGameTag' = 1323
FUNC_BUSINESS_LIGHT: 'CommonGameTag' = 1545
FUNC_CABINET: 'CommonGameTag' = 1409
FUNC_CAFETERIA_STATION: 'CommonGameTag' = 65550
FUNC_CAGE: 'CommonGameTag' = 1431
FUNC_CAKE: 'CommonGameTag' = 1391
FUNC_CALENDAR: 'CommonGameTag' = 1395
FUNC_CAMERA_NORMAL: 'CommonGameTag' = 12342
FUNC_CAMERA_OUTSTANDING: 'CommonGameTag' = 12343
FUNC_CAMERA_POOR: 'CommonGameTag' = 12341
FUNC_CAMERA_PRO: 'CommonGameTag' = 79875
FUNC_CAMERA_SLOT_TRIPOD: 'CommonGameTag' = 2221
FUNC_CAMERA_TRIPOD: 'CommonGameTag' = 79873
FUNC_CAMERA_TRIPOD_ANCHOR_MARK: 'CommonGameTag' = 79877
FUNC_CAMERAS: 'CommonGameTag' = 1381
FUNC_CAMPFIRE: 'CommonGameTag' = 10246
FUNC_CAMPING: 'CommonGameTag' = 10245
FUNC_CANDLE: 'CommonGameTag' = 1207
FUNC_CANDLE_MAKING_STATION: 'CommonGameTag' = 67628
FUNC_CANDLES: 'CommonGameTag' = 1328
FUNC_CANDY_BOWL: 'CommonGameTag' = 2117
FUNC_CANDY_SKULL: 'CommonGameTag' = 1554
FUNC_CANDY_SKULL_01: 'CommonGameTag' = 1555
FUNC_CANDY_SKULL_02: 'CommonGameTag' = 1556
FUNC_CANDY_SKULL_03: 'CommonGameTag' = 1557
FUNC_CANDY_SKULL_04: 'CommonGameTag' = 1558
FUNC_CANDY_SKULL_05: 'CommonGameTag' = 1559
FUNC_CANDY_SKULL_06: 'CommonGameTag' = 1560
FUNC_CANDY_SKULL_07: 'CommonGameTag' = 1561
FUNC_CANDY_SKULL_08: 'CommonGameTag' = 1562
FUNC_CANDY_SKULL_09: 'CommonGameTag' = 1563
FUNC_CANDY_SKULL_10: 'CommonGameTag' = 1564
FUNC_CANS: 'CommonGameTag' = 1297
FUNC_CANT_REPOSSESS: 'CommonGameTag' = 2276
FUNC_CANVAS: 'CommonGameTag' = 573
FUNC_CARD_GAME: 'CommonGameTag' = 922
FUNC_CARD_TABLE: 'CommonGameTag' = 988
FUNC_CARDS: 'CommonGameTag' = 1316
FUNC_CARPENTER: 'CommonGameTag' = 492
FUNC_CARPET: 'CommonGameTag' = 1161
FUNC_CART: 'CommonGameTag' = 1402
FUNC_CARVED_PUMPKIN: 'CommonGameTag' = 22529
FUNC_CARVING_STATION: 'CommonGameTag' = 22540
FUNC_CASE: 'CommonGameTag' = 1411
FUNC_CAT_CONDO: 'CommonGameTag' = 57383
FUNC_CAT_WAND: 'CommonGameTag' = 57429
FUNC_CAT_WAND_RAINBOW: 'CommonGameTag' = 57453
FUNC_CAULDRON: 'CommonGameTag' = 49155
FUNC_CAULDRON_POTION: 'CommonGameTag' = 49156
FUNC_CELEBRITY_FAN_TARGETABLE: 'CommonGameTag' = 61475
FUNC_CELEBRITY_TILE_ORIGINAL: 'CommonGameTag' = 61636
FUNC_CELL: 'CommonGameTag' = 1378
FUNC_CEMETERY: 'CommonGameTag' = 1200
FUNC_CHAIR: 'CommonGameTag' = 1303
FUNC_CHAIR_DEBATE_SHOWDOWN_AUDIENCE: 'CommonGameTag' = 65592
FUNC_CHAIR_DEBATE_SHOWDOWN_JUDGE: 'CommonGameTag' = 65593
FUNC_CHALKBOARD: 'CommonGameTag' = 1426
FUNC_CHANGE_CLOTHES: 'CommonGameTag' = 1448
FUNC_CHARISMA: 'CommonGameTag' = 1099
FUNC_CHEF: 'CommonGameTag' = 1115
FUNC_CHEF_STATION: 'CommonGameTag' = 26627
FUNC_CHEM_ANALYZER: 'CommonGameTag' = 12361
FUNC_CHEM_LAB: 'CommonGameTag' = 12360
FUNC_CHESS: 'CommonGameTag' = 485
FUNC_CHILD: 'CommonGameTag' = 1136
FUNC_CHILD_VIOLIN: 'CommonGameTag' = 1176
FUNC_CHIMNEY: 'CommonGameTag' = 1164
FUNC_CHRISTMAS: 'CommonGameTag' = 1327
FUNC_CLAY: 'CommonGameTag' = 511
FUNC_CLIMBING_ROUTE: 'CommonGameTag' = 69692
FUNC_CLIMBING_ROUTE_LARGE: 'CommonGameTag' = 69701
FUNC_CLIMBING_ROUTE_MEDIUM: 'CommonGameTag' = 69700
FUNC_CLIMBING_ROUTE_SMALL: 'CommonGameTag' = 69699
FUNC_CLOBBERS_SNOW_FOOTPRINTS: 'CommonGameTag' = 2114
FUNC_CLONE_NORMAL_MIN: 'CommonGameTag' = 12344
FUNC_CLOSET: 'CommonGameTag' = 1139
FUNC_CLOTHES: 'CommonGameTag' = 1162
FUNC_CLUBS: 'CommonGameTag' = 24593
FUNC_CLUE: 'CommonGameTag' = 12371
FUNC_COAT_RACK: 'CommonGameTag' = 1500
FUNC_COBWEB: 'CommonGameTag' = 1193
FUNC_COCONUT_PLANT: 'CommonGameTag' = 63518
FUNC_COFFEE: 'CommonGameTag' = 525
FUNC_COFFEE_CART: 'CommonGameTag' = 65603
FUNC_COFFEE_MAKER: 'CommonGameTag' = 1167
FUNC_COFFIN: 'CommonGameTag' = 40970
FUNC_COLLECT_ARTIFACT: 'CommonGameTag' = 45075
FUNC_COLLECT_ARTIFACT_FAKE: 'CommonGameTag' = 45076
FUNC_COLLECT_ARTIFACT_GENUINE: 'CommonGameTag' = 45092
FUNC_COLLECT_ARTIFACT_KNIFE: 'CommonGameTag' = 45098
FUNC_COLLECT_ARTIFACT_MAIL: 'CommonGameTag' = 45077
FUNC_COLLECT_ARTIFACT_MAIL_FAKE: 'CommonGameTag' = 45093
FUNC_COLLECT_ARTIFACT_MASK: 'CommonGameTag' = 45099
FUNC_COLLECT_ARTIFACT_SKULL: 'CommonGameTag' = 45100
FUNC_COLLECT_ARTIFACT_STATUE: 'CommonGameTag' = 45101
FUNC_COLLECT_ARTIFACT_VASE: 'CommonGameTag' = 45097
FUNC_COLLECTION_MONSTERS: 'CommonGameTag' = 32771
FUNC_COLLECTION_SPAWNER: 'CommonGameTag' = 12425
FUNC_COLOR_FROM_SAND: 'CommonGameTag' = 2200
FUNC_COMEDY: 'CommonGameTag' = 1130
FUNC_COMEDY_ROUTINE: 'CommonGameTag' = 589
FUNC_COMEDY_ROUTINE_LONG: 'CommonGameTag' = 594
FUNC_COMEDY_ROUTINE_MEDIUM: 'CommonGameTag' = 593
FUNC_COMEDY_ROUTINE_SHORT: 'CommonGameTag' = 592
FUNC_COMMUNITY_BOARD_BG: 'CommonGameTag' = 2284
FUNC_COMPUTER: 'CommonGameTag' = 514
FUNC_COMPUTER_GLASSES: 'CommonGameTag' = 65655
FUNC_CONCEPT_ECO_INVENTION: 'CommonGameTag' = 67612
FUNC_CONCEPT_MUNICIPAL: 'CommonGameTag' = 67611
FUNC_CONCRETE: 'CommonGameTag' = 1092
FUNC_COOK: 'CommonGameTag' = 524
FUNC_COOKING: 'CommonGameTag' = 1102
FUNC_COOLER: 'CommonGameTag' = 10243
FUNC_CORPORATE_WORKER_APOLOGY_GIFT: 'CommonGameTag' = 69742
FUNC_COT: 'CommonGameTag' = 1287
FUNC_COUCH: 'CommonGameTag' = 989
FUNC_COUNTER: 'CommonGameTag' = 1525
FUNC_COWPLANT: 'CommonGameTag' = 1375
FUNC_CRAFT: 'CommonGameTag' = 513
FUNC_CRAFT_SALES_TABLE: 'CommonGameTag' = 55365
FUNC_CRAFT_SALES_TABLE_JUNGLE_SUPPLIES_FUN: 'CommonGameTag' = 2047
FUNC_CRAFT_SALES_TABLE_JUNGLE_SUPPLIES_FURNITURE: 'CommonGameTag' = 2046
FUNC_CRAFT_SALES_TABLE_JUNGLE_SUPPLIES_PET: 'CommonGameTag' = 2048
FUNC_CRAFT_SALES_TABLE_JUNGLE_SUPPLIES_SUPPLIES: 'CommonGameTag' = 2045
FUNC_CRAFT_SALES_TABLE_PAINTING: 'CommonGameTag' = 2387
FUNC_CRAFT_SALES_TABLE_REQUIRED_OBJECT_BG: 'CommonGameTag' = 2285
FUNC_CRAFT_SALES_TABLE_SECRET_ITEMS_COLLECTIBLES: 'CommonGameTag' = 2050
FUNC_CRAFT_SALES_TABLE_SECRET_ITEMS_SUPPLIES: 'CommonGameTag' = 2049
FUNC_CRAFT_SALES_TABLE_TABLE: 'CommonGameTag' = 2386
FUNC_CRAFTED_CANDLE: 'CommonGameTag' = 67622
FUNC_CRATE: 'CommonGameTag' = 12379
FUNC_CRATES: 'CommonGameTag' = 1401
FUNC_CRATES_ROUTABLE: 'CommonGameTag' = 57385
FUNC_CREATIVITY: 'CommonGameTag' = 24597
FUNC_CRIB: 'CommonGameTag' = 745
FUNC_CRIME_MAP: 'CommonGameTag' = 12372
FUNC_CRIMINAL: 'CommonGameTag' = 1113
FUNC_CRYPT: 'CommonGameTag' = 1201
FUNC_CRYSTAL_BALL: 'CommonGameTag' = 1184
FUNC_CUBE: 'CommonGameTag' = 502
FUNC_CULINARY: 'CommonGameTag' = 1114
FUNC_CULLING_PORTAL: 'CommonGameTag' = 1546
FUNC_CUP: 'CommonGameTag' = 1302
FUNC_CUPBOARD: 'CommonGameTag' = 1012
FUNC_CUPCAKE_MACHINE: 'CommonGameTag' = 1376
FUNC_CURTAIN: 'CommonGameTag' = 1014
FUNC_DJING: 'CommonGameTag' = 24600
FUNC_DANCEFLOOR: 'CommonGameTag' = 1455
FUNC_DANCING: 'CommonGameTag' = 24601
FUNC_DARTBOARD: 'CommonGameTag' = 24609
FUNC_DAY_OF_THE_DEAD: 'CommonGameTag' = 1565
FUNC_DEATH: 'CommonGameTag' = 575
FUNC_DECAL: 'CommonGameTag' = 1151
FUNC_DETECTIVE: 'CommonGameTag' = 12327
FUNC_DENIZEN_POND: 'CommonGameTag' = 2157
FUNC_DESSERT: 'CommonGameTag' = 1386
FUNC_DETECTIVE_CHIEF_CHAIR: 'CommonGameTag' = 12435
FUNC_DETECTIVE_CLUE_ADD_TO_MAP: 'CommonGameTag' = 12318
FUNC_DETECTIVE_CLUE_CHEMICAL: 'CommonGameTag' = 12296
FUNC_DETECTIVE_CLUE_DATABASE: 'CommonGameTag' = 12326
FUNC_DETECTIVE_CLUE_PICTURE: 'CommonGameTag' = 12312
FUNC_DETECTIVE_CLUE_SAMPLE: 'CommonGameTag' = 12313
FUNC_DEW_COLLECTOR: 'CommonGameTag' = 67615
FUNC_DEW_COLLECTOR_HIGH_QUALITY: 'CommonGameTag' = 67646
FUNC_DIA_DE_LOS_MUERTOS: 'CommonGameTag' = 1566
FUNC_DIGITAL_FRAME: 'CommonGameTag' = 2216
FUNC_DINING: 'CommonGameTag' = 1124
FUNC_DINING_CHAIR: 'CommonGameTag' = 1006
FUNC_DINING_HUTCH: 'CommonGameTag' = 1125
FUNC_DINOSAUR: 'CommonGameTag' = 509
FUNC_DIPLOMA: 'CommonGameTag' = 1415
FUNC_DIRECTOR_CHAIR: 'CommonGameTag' = 61463
FUNC_DISABLE_IN_LOT_THUMBNAILS: 'CommonGameTag' = 2100
FUNC_DISHWASHER: 'CommonGameTag' = 1451
FUNC_DISPENSER: 'CommonGameTag' = 1419
FUNC_DIVIDER: 'CommonGameTag' = 1033
FUNC_DJ_BOOTH: 'CommonGameTag' = 1456
FUNC_DOCTOR: 'CommonGameTag' = 12328
FUNC_DOCTOR_ITEM_SAMPLE: 'CommonGameTag' = 12330
FUNC_DOCTOR_OBJECT_EXAM_BED: 'CommonGameTag' = 12329
FUNC_DOCTOR_OBJECT_MEDICAL_TREADMILL: 'CommonGameTag' = 12348
FUNC_DOCTOR_OBJECT_SURGERY_TABLE: 'CommonGameTag' = 12333
FUNC_DOCTOR_OBJECT_XRAY_MACHINE: 'CommonGameTag' = 12332
FUNC_DOCTOR_PLAYSET: 'CommonGameTag' = 43030
FUNC_DOESNT_SPAWN_FIRE: 'CommonGameTag' = 1494
FUNC_DOLL: 'CommonGameTag' = 580
FUNC_DOLLHOUSE: 'CommonGameTag' = 666
FUNC_DOLLY_CAMERA: 'CommonGameTag' = 61462
FUNC_DOLPHIN_ALBINO: 'CommonGameTag' = 63492
FUNC_DOLPHIN_MERFOLK: 'CommonGameTag' = 63493
FUNC_DOLPHIN_SPAWNER: 'CommonGameTag' = 63494
FUNC_DOLPHIN_STANDARD: 'CommonGameTag' = 63491
FUNC_DONT_WAKE_LLAMA: 'CommonGameTag' = 24608
FUNC_DOUBLE_BED: 'CommonGameTag' = 778
FUNC_DRAGON: 'CommonGameTag' = 510
FUNC_DRAW_SOMETHING: 'CommonGameTag' = 1003
FUNC_DRAWING_POSTED: 'CommonGameTag' = 43011
FUNC_DRINK: 'CommonGameTag' = 499
FUNC_DRINK_TRAY: 'CommonGameTag' = 1552
FUNC_DROID_PERSONALITY_CHIP: 'CommonGameTag' = 51211
FUNC_DROID_PERSONALITY_CHIP_FIRST_ORDER: 'CommonGameTag' = 51213
FUNC_DROID_PERSONALITY_CHIP_FIRST_ORDER_2: 'CommonGameTag' = 51252
FUNC_DROID_PERSONALITY_CHIP_RESISTANCE: 'CommonGameTag' = 51212
FUNC_DROID_PERSONALITY_CHIP_RESISTANCE_2: 'CommonGameTag' = 51251
FUNC_DROID_PERSONALITY_CHIP_SCOUNDREL: 'CommonGameTag' = 51214
FUNC_DROID_PERSONALITY_CHIP_SCOUNDREL_2: 'CommonGameTag' = 51253
FUNC_DROID_BB_SERIES: 'CommonGameTag' = 51219
FUNC_DROID_R_SERIES: 'CommonGameTag' = 51220
FUNC_DROPS_LEAVES_EP10_MAPLE_GREEN: 'CommonGameTag' = 2513
FUNC_DROPS_LEAVES_EP10_MAPLE_RED: 'CommonGameTag' = 2514
FUNC_DROPS_LEAVES_LARGE: 'CommonGameTag' = 2063
FUNC_DROPS_LEAVES_MEDIUM: 'CommonGameTag' = 2062
FUNC_DROPS_LEAVES_SMALL: 'CommonGameTag' = 2056
FUNC_DROPS_LEAVES_X_LARGE: 'CommonGameTag' = 2064
FUNC_DUCT: 'CommonGameTag' = 1428
FUNC_DUMPSTER: 'CommonGameTag' = 67605
FUNC_DUMPSTER_DEAL_APPLIANCE: 'CommonGameTag' = 2446
FUNC_DUMPSTER_DEAL_BURNT_AND_SCRATCHED: 'CommonGameTag' = 2445
FUNC_DUMPSTER_DEAL_COLLECTIBLE: 'CommonGameTag' = 2454
FUNC_DUMPSTER_DEAL_CRAFTABLE: 'CommonGameTag' = 2455
FUNC_DUMPSTER_DEAL_MISCELLANEOUS: 'CommonGameTag' = 2448
FUNC_DUMPSTER_DEAL_PLUMBING: 'CommonGameTag' = 2447
FUNC_DUMPSTER_DEAL_UPGRADE_PART: 'CommonGameTag' = 2456
FUNC_DUMPSTER_HIGH_PRICE_DROP: 'CommonGameTag' = 67610
FUNC_DUMPSTER_INSECT: 'CommonGameTag' = 67645
FUNC_DUMPSTER_LOW_PRICE_DROP: 'CommonGameTag' = 67609
FUNC_DUMPSTER_MEAL_FOOD: 'CommonGameTag' = 2452
FUNC_DUMPSTER_MEAL_INGREDIENT: 'CommonGameTag' = 2451
FUNC_DUMPSTER_MEAL_INSECT: 'CommonGameTag' = 2453
FUNC_DUMPSTER_UNIQUE_DROP: 'CommonGameTag' = 67608
FUNC_ESPORTS_GAMER: 'CommonGameTag' = 1134
FUNC_EARBUDS: 'CommonGameTag' = 1725
FUNC_EASEL: 'CommonGameTag' = 482
FUNC_EASTER_EGG: 'CommonGameTag' = 2082
FUNC_ECO_ECOFRIENDY_APPLIANCES: 'CommonGameTag' = 2375
FUNC_ECO_FOOTPRINT_OBJECT_STATE: 'CommonGameTag' = 2376
FUNC_ECO_FOOTPRINT_SUN_RAY: 'CommonGameTag' = 67588
FUNC_ECO_GREEN_GARDENING: 'CommonGameTag' = 2374
FUNC_ECO_NEIGHBORHOOD_UTILITY: 'CommonGameTag' = 2372
FUNC_ECO_UPCYCLING_INITIATIVE: 'CommonGameTag' = 2373
FUNC_ENERGY: 'CommonGameTag' = 997
FUNC_ENTERTAINER: 'CommonGameTag' = 1129
FUNC_EP01_ALIEN_TRANSMUTE_COMPATIBLE: 'CommonGameTag' = 12369
FUNC_EP01_COLLECTIBLE_BG: 'CommonGameTag' = 2038
FUNC_EP01_SERUM_AGE_AWAY: 'CommonGameTag' = 12422
FUNC_EP01_SERUM_ALIEN_AURA: 'CommonGameTag' = 12421
FUNC_EP01_SERUM_EMBIGGEN: 'CommonGameTag' = 12416
FUNC_EP01_SERUM_FIXERS_LUCK: 'CommonGameTag' = 12419
FUNC_EP01_SERUM_GHOST_GOO: 'CommonGameTag' = 12417
FUNC_EP01_SERUM_NEED_FIXER: 'CommonGameTag' = 12354
FUNC_EP01_SERUM_OX_STRENGTH: 'CommonGameTag' = 12418
FUNC_EP01_SERUM_REAPERS_FRIEND: 'CommonGameTag' = 12420
FUNC_EP01_SERUM_RED_HOT: 'CommonGameTag' = 12414
FUNC_EP01_SERUM_ROSE_PERFUME: 'CommonGameTag' = 12352
FUNC_EP01_SERUM_SLIMIFY: 'CommonGameTag' = 12415
FUNC_EP01_SERUM_SMART: 'CommonGameTag' = 12356
FUNC_EP01_SERUM_SNAKE_OIL: 'CommonGameTag' = 12353
FUNC_EP01_SERUM_SPARK_DRIVE: 'CommonGameTag' = 12355
FUNC_EP01_SERUM_SYNTHETIC_FOOD: 'CommonGameTag' = 12351
FUNC_EP10_FESTIVAL_FOOD: 'CommonGameTag' = 69732
FUNC_ESPRESSO_BAR: 'CommonGameTag' = 1452
FUNC_ESPRESSO_GRINDER: 'CommonGameTag' = 1454
FUNC_ESPRESSO_MACHINE: 'CommonGameTag' = 1453
FUNC_ETAGERE: 'CommonGameTag' = 1035
FUNC_EXERCISE: 'CommonGameTag' = 473
FUNC_EXIT: 'CommonGameTag' = 1416
FUNC_EXPERIMENTAL_FOOD: 'CommonGameTag' = 26631
FUNC_EXTINGUISHER: 'CommonGameTag' = 1417
FUNC_FABRICATED_ITEM: 'CommonGameTag' = 67587
FUNC_FABRICATION_DYE: 'CommonGameTag' = 67590
FUNC_FABRICATION_DYE_COMMON: 'CommonGameTag' = 67637
FUNC_FABRICATOR: 'CommonGameTag' = 67586
FUNC_FACE: 'CommonGameTag' = 1214
FUNC_FAMILY_BULLETIN_BOARD: 'CommonGameTag' = 43016
FUNC_FAN: 'CommonGameTag' = 1414
FUNC_FASHION_STUDIO_SEARCH: 'CommonGameTag' = 2220
FUNC_FAUCET: 'CommonGameTag' = 1138
FUNC_FAVORITE_CHOPSTICK_CLASSIC_WOOD: 'CommonGameTag' = 69741
FUNC_FAVORITE_CHOPSTICK_PLASTIC: 'CommonGameTag' = 69687
FUNC_FAVORITE_CHOPSTICK_STEEL: 'CommonGameTag' = 69688
FUNC_FAVORITE_CHOPSTICK_WOOD: 'CommonGameTag' = 69686
FUNC_FAVORITE_CHOPSTICKS: 'CommonGameTag' = 69685
FUNC_FESTIVAL_AUTONOMY_AREA_MARKER: 'CommonGameTag' = 1575
FUNC_FESTIVAL_AUTONOMY_AREA_MARKER: 'CommonGameTag' = 55297
FUNC_FESTIVAL_BLOSSOM_TEA_FOUNTAIN: 'CommonGameTag' = 55388
FUNC_FESTIVAL_CURRY_CONTEST: 'CommonGameTag' = 55369
FUNC_FESTIVAL_FIREWORKS_DARK_SIDE: 'CommonGameTag' = 55366
FUNC_FESTIVAL_FIREWORKS_LIGHT_SIDE: 'CommonGameTag' = 55367
FUNC_FESTIVAL_FLEA_MARKET_OBJECTS: 'CommonGameTag' = 55392
FUNC_FESTIVAL_LAMP_TEA_FOUNTAINS: 'CommonGameTag' = 55387
FUNC_FESTIVAL_TEA_DARK_TEA: 'CommonGameTag' = 55345
FUNC_FESTIVAL_TEA_LIGHT_TEA: 'CommonGameTag' = 55346
FUNC_FESTIVAL_TEA_SAKURA: 'CommonGameTag' = 55347
FUNC_FETCHABLE: 'CommonGameTag' = 1875
FUNC_FIGURINE: 'CommonGameTag' = 1157
FUNC_FILE_HOLDER: 'CommonGameTag' = 1425
FUNC_FIRE: 'CommonGameTag' = 1305
FUNC_FIRE_ALARM: 'CommonGameTag' = 1165
FUNC_FIRE_PIT: 'CommonGameTag' = 1306
FUNC_FIREPLACE_MAGIC: 'CommonGameTag' = 49183
FUNC_FIREWORKS: 'CommonGameTag' = 1578
FUNC_FIREWORKS_ARTS_CRAFTS: 'CommonGameTag' = 1588
FUNC_FIREWORKS_BLOSSOM: 'CommonGameTag' = 1583
FUNC_FIREWORKS_FOOD: 'CommonGameTag' = 1586
FUNC_FIREWORKS_LAMP: 'CommonGameTag' = 1585
FUNC_FIREWORKS_LOGIC: 'CommonGameTag' = 1584
FUNC_FIREWORKS_MUSIC: 'CommonGameTag' = 1587
FUNC_FIREWORKS_SPARKLER: 'CommonGameTag' = 1590
FUNC_FIREWORKS_SPARKLER_BLOSSOM: 'CommonGameTag' = 55408
FUNC_FIREWORKS_SPARKLER_FOOD: 'CommonGameTag' = 55409
FUNC_FIREWORKS_SPARKLER_LAMP: 'CommonGameTag' = 55410
FUNC_FIREWORKS_SPARKLER_LOGIC: 'CommonGameTag' = 55411
FUNC_FIREWORKS_SPARKLER_WEDDING: 'CommonGameTag' = 55412
FUNC_FIREWORKS_WEDDING: 'CommonGameTag' = 1589
FUNC_FISH: 'CommonGameTag' = 992
FUNC_FISH_ENDANGERED: 'CommonGameTag' = 63503
FUNC_FISH_FISHBOWL: 'CommonGameTag' = 869
FUNC_FISH_INVASIVE: 'CommonGameTag' = 2195
FUNC_FISHING_LOCATION_ANY: 'CommonGameTag' = 2164
FUNC_FISHING_LOCATION_HOLE: 'CommonGameTag' = 937
FUNC_FISHING_LOCATION_SPOT: 'CommonGameTag' = 938
FUNC_FISHING_SPOT_BAY: 'CommonGameTag' = 63528
FUNC_FISHING_SPOT_COMMON: 'CommonGameTag' = 2193
FUNC_FISHING_SPOT_RARE: 'CommonGameTag' = 2192
FUNC_FISHING_SPOT_TROPICAL: 'CommonGameTag' = 63526
FUNC_FISHING_SPOT_UNCOMMON: 'CommonGameTag' = 2191
FUNC_FITNESS: 'CommonGameTag' = 474
FUNC_FLAG: 'CommonGameTag' = 1403
FUNC_FLAGSTONE: 'CommonGameTag' = 1094
FUNC_FLOWER: 'CommonGameTag' = 1314
FUNC_FLOWER_ARRANGEMENT: 'CommonGameTag' = 59457
FUNC_FLOWERS_10: 'CommonGameTag' = 59490
FUNC_FLOWERS_3: 'CommonGameTag' = 59483
FUNC_FLOWERS_4: 'CommonGameTag' = 59484
FUNC_FLOWERS_5: 'CommonGameTag' = 59485
FUNC_FLOWERS_6: 'CommonGameTag' = 59486
FUNC_FLOWERS_7: 'CommonGameTag' = 59487
FUNC_FLOWERS_8: 'CommonGameTag' = 59488
FUNC_FLOWERS_9: 'CommonGameTag' = 59489
FUNC_FLOWERS_BOP_BEG: 'CommonGameTag' = 2106
FUNC_FLOWERS_CHRY_SNAP: 'CommonGameTag' = 2104
FUNC_FLOWERS_DAI_BLU: 'CommonGameTag' = 2102
FUNC_FLOWERS_LILY_DEATH: 'CommonGameTag' = 2107
FUNC_FLOWERS_ROS_DAH: 'CommonGameTag' = 2103
FUNC_FLOWERS_SCENT: 'CommonGameTag' = 2090
FUNC_FLOWERS_SCENT_RARE: 'CommonGameTag' = 2091
FUNC_FLOWERS_SNO_CROC: 'CommonGameTag' = 2101
FUNC_FLOWERS_TUL_CHRI: 'CommonGameTag' = 2105
FUNC_FOLDERS: 'CommonGameTag' = 1412
FUNC_FOLDING: 'CommonGameTag' = 1304
FUNC_FOOD: 'CommonGameTag' = 520
FUNC_FOOD_PET_EDIBLE: 'CommonGameTag' = 2030
FUNC_FOOD_PLATTER: 'CommonGameTag' = 26643
FUNC_FOOSBALL_TABLE: 'CommonGameTag' = 24591
FUNC_FORTUNE: 'CommonGameTag' = 1180
FUNC_FORTUNE_TELLING: 'CommonGameTag' = 8200
FUNC_FOSSIL_BRUSHED: 'CommonGameTag' = 2044
FUNC_FOSSIL_ROCK: 'CommonGameTag' = 2037
FUNC_FOUNTAIN: 'CommonGameTag' = 8216
FUNC_FREE_LANCE_MAKER_CARVED_CANDLES: 'CommonGameTag' = 67599
FUNC_FREE_LANCE_MAKER_COUCH: 'CommonGameTag' = 67596
FUNC_FREE_LANCE_MAKER_CRAFTED_CANDLES: 'CommonGameTag' = 67601
FUNC_FREE_LANCE_MAKER_FINE_WALL_DECOR: 'CommonGameTag' = 67602
FUNC_FREE_LANCE_MAKER_FLOOR_LIGHTS: 'CommonGameTag' = 67598
FUNC_FREE_LANCE_MAKER_JAR_CANDLES: 'CommonGameTag' = 67595
FUNC_FREE_LANCE_MAKER_KIDS_BED: 'CommonGameTag' = 67600
FUNC_FREE_LANCE_MAKER_KOMBUCHA: 'CommonGameTag' = 67597
FUNC_FREE_LANCE_MAKER_RUGS: 'CommonGameTag' = 67593
FUNC_FREE_LANCE_MAKER_TO_FIZZ: 'CommonGameTag' = 67594
FUNC_FREELANCER_CANVAS_CHARACTER_DESIGN: 'CommonGameTag' = 2177
FUNC_FREELANCER_CANVAS_ENVIRONMENT_DESIGN: 'CommonGameTag' = 2178
FUNC_FREELANCER_CANVAS_ICON: 'CommonGameTag' = 2183
FUNC_FREELANCER_CANVAS_ILLUSTRATIVE: 'CommonGameTag' = 2184
FUNC_FREELANCER_CANVAS_LOGO: 'CommonGameTag' = 2182
FUNC_FREELANCER_CANVAS_PORTRAIT: 'CommonGameTag' = 2179
FUNC_FREELANCER_CANVAS_RECREATED_ART: 'CommonGameTag' = 2181
FUNC_FREELANCER_CANVAS_REFERENCE: 'CommonGameTag' = 2185
FUNC_FREELANCER_CANVAS_SPLASH_ART: 'CommonGameTag' = 2180
FUNC_FRIDGE: 'CommonGameTag' = 1002
FUNC_FRIDGE_MINI: 'CommonGameTag' = 2233
FUNC_FRONT_DESK: 'CommonGameTag' = 12331
FUNC_FROSTY: 'CommonGameTag' = 1337
FUNC_FRUIT_CAKE: 'CommonGameTag' = 1445
FUNC_FRUIT_PUNCH_FOUNTAIN: 'CommonGameTag' = 8214
FUNC_FRYING_PAN: 'CommonGameTag' = 2449
FUNC_FUN: 'CommonGameTag' = 999
FUNC_FUTURE: 'CommonGameTag' = 503
FUNC_GAME: 'CommonGameTag' = 481
FUNC_GAMING: 'CommonGameTag' = 1075
FUNC_GARBAGE: 'CommonGameTag' = 924
FUNC_GARDEN: 'CommonGameTag' = 1150
FUNC_GARDEN_FLOWER: 'CommonGameTag' = 59447
FUNC_GARDEN_GARLIC: 'CommonGameTag' = 40971
FUNC_GARDEN_GHOST_DESTROY: 'CommonGameTag' = 2176
FUNC_GARDEN_PLASMA_TREE: 'CommonGameTag' = 40973
FUNC_GARDENING: 'CommonGameTag' = 1107
FUNC_GARDENING_FERTILIZER_BAD: 'CommonGameTag' = 862
FUNC_GARDENING_FERTILIZER_HIGH: 'CommonGameTag' = 859
FUNC_GARDENING_FERTILIZER_LOW: 'CommonGameTag' = 861
FUNC_GARDENING_FERTILIZER_MAX: 'CommonGameTag' = 870
FUNC_GARDENING_FERTILIZER_MED: 'CommonGameTag' = 860
FUNC_GARDENING_FLOWERS: 'CommonGameTag' = 59463
FUNC_GARDENING_FORBIDDEN_FRUIT: 'CommonGameTag' = 1708
FUNC_GARDENING_GRAFTABLE: 'CommonGameTag' = 2092
FUNC_GARDENING_GROWFRUIT: 'CommonGameTag' = 1502
FUNC_GARDENING_MONEY_TREE: 'CommonGameTag' = 59482
FUNC_GARDENING_SEED_COMMON: 'CommonGameTag' = 831
FUNC_GARDENING_SEED_RARE: 'CommonGameTag' = 833
FUNC_GARDENING_SEED_UNCOMMON: 'CommonGameTag' = 832
FUNC_GARDENING_SEEDS: 'CommonGameTag' = 1029
FUNC_GARDENING_SKILL_PLANT: 'CommonGameTag' = 1721
FUNC_GARDENING_SPRINKLER: 'CommonGameTag' = 59437
FUNC_GARDENING_TOXIC: 'CommonGameTag' = 10254
FUNC_GARDENING_WILD: 'CommonGameTag' = 1272
FUNC_GARLAND: 'CommonGameTag' = 1334
FUNC_GARLIC: 'CommonGameTag' = 40962
FUNC_GATE: 'CommonGameTag' = 1390
FUNC_GHOST: 'CommonGameTag' = 1190
FUNC_GIVE_GIFT_NOT_GIFTABLE: 'CommonGameTag' = 2160
FUNC_GIVE_GIFT_REWARD: 'CommonGameTag' = 2088
FUNC_GLASS: 'CommonGameTag' = 1432
FUNC_GNOME: 'CommonGameTag' = 1365
FUNC_GNOME_KICK_REWARD: 'CommonGameTag' = 2087
FUNC_GO_DANCING_OBJECT_VISIBILITY: 'CommonGameTag' = 24587
FUNC_GO_FOR_WALK_DOG_INTERACTIONS: 'CommonGameTag' = 57395
FUNC_GONDOLA_BOTTOM: 'CommonGameTag' = 69654
FUNC_GONDOLA_TOP: 'CommonGameTag' = 69653
FUNC_GOURMET_COOKING: 'CommonGameTag' = 1104
FUNC_GRAFFITI: 'CommonGameTag' = 55403
FUNC_GRAND_MEAL: 'CommonGameTag' = 2095
FUNC_GRASS: 'CommonGameTag' = 1093
FUNC_GRAVE: 'CommonGameTag' = 1198
FUNC_GRAVESTONE: 'CommonGameTag' = 1203
FUNC_GREEN_SCREEN: 'CommonGameTag' = 61465
FUNC_GRILL_RECIPE: 'CommonGameTag' = 1247
FUNC_GUITAR: 'CommonGameTag' = 565
FUNC_GYM: 'CommonGameTag' = 562
FUNC_GYPSY: 'CommonGameTag' = 1183
FUNC_HABITAT: 'CommonGameTag' = 77826
FUNC_HAIR_MAKEUP_CHAIR: 'CommonGameTag' = 61442
FUNC_HAIR_PILE: 'CommonGameTag' = 57411
FUNC_HALLOWEEN: 'CommonGameTag' = 1179
FUNC_HAMPER: 'CommonGameTag' = 75783
FUNC_HAMSTER: 'CommonGameTag' = 77828
FUNC_HAND: 'CommonGameTag' = 1209
FUNC_HANDINESS: 'CommonGameTag' = 1100
FUNC_HANUKKAH: 'CommonGameTag' = 1329
FUNC_HARDWOOD: 'CommonGameTag' = 1095
FUNC_HARVESTABLE: 'CommonGameTag' = 2126
FUNC_HARVESTABLE_RARE: 'CommonGameTag' = 2072
FUNC_HARVESTABLE_SUPER_RARE: 'CommonGameTag' = 2074
FUNC_HARVESTABLE_UNCOMMON: 'CommonGameTag' = 2073
FUNC_HAUNTED: 'CommonGameTag' = 1223
FUNC_HAUNTED_PAINTING: 'CommonGameTag' = 86028
FUNC_HEAD: 'CommonGameTag' = 1213
FUNC_HEALTH: 'CommonGameTag' = 475
FUNC_HEART: 'CommonGameTag' = 1369
FUNC_HEAT_LAMP: 'CommonGameTag' = 14338
FUNC_HEAT_LAMP_BG: 'CommonGameTag' = 1520
FUNC_HEDGEHOG: 'CommonGameTag' = 77829
FUNC_HERBALISM: 'CommonGameTag' = 10249
FUNC_HERBALISM_INGREDIENT: 'CommonGameTag' = 10251
FUNC_HERBALISM_INGREDIENT_CHAMOMILE: 'CommonGameTag' = 10271
FUNC_HERBALISM_INGREDIENT_ELDERBERRY: 'CommonGameTag' = 10272
FUNC_HERBALISM_INGREDIENT_FIRELEAF: 'CommonGameTag' = 10273
FUNC_HERBALISM_INGREDIENT_HUCKLEBERRY: 'CommonGameTag' = 10274
FUNC_HERBALISM_INGREDIENT_MOREL_MUSHROOM: 'CommonGameTag' = 10275
FUNC_HERBALISM_PLANT: 'CommonGameTag' = 10250
FUNC_HERBALISM_POTION: 'CommonGameTag' = 10255
FUNC_HIDEABLE: 'CommonGameTag' = 1914
FUNC_HIGH_CHAIR: 'CommonGameTag' = 1654
FUNC_HIGH_CHAIR_DRINK: 'CommonGameTag' = 1695
FUNC_HIGH_CHAIR_FOOD: 'CommonGameTag' = 1694
FUNC_HOLIDAY_TREE_ORNAMENTS: 'CommonGameTag' = 59411
FUNC_HOLIDAY: 'CommonGameTag' = 1326
FUNC_HOLIDAY_CANDLE: 'CommonGameTag' = 2128
FUNC_HOLIDAY_DECO_OBJECTS: 'CommonGameTag' = 2098
FUNC_HOLIDAY_FESTIVE_LIGHTING: 'CommonGameTag' = 2129
FUNC_HOLIDAY_GNOME_GROUP01: 'CommonGameTag' = 2121
FUNC_HOLIDAY_GNOME_GROUP02: 'CommonGameTag' = 2122
FUNC_HOLIDAY_GNOME_GROUP03: 'CommonGameTag' = 2123
FUNC_HOLIDAY_GNOME_GROUP04: 'CommonGameTag' = 2124
FUNC_HOLIDAY_TRADITION_BAKING_RECIPE: 'CommonGameTag' = 2116
FUNC_HOLIDAY_TRADITION_BONFIRE: 'CommonGameTag' = 2109
FUNC_HOLIDAY_TRADITION_DECO_BE_ROMANTIC: 'CommonGameTag' = 2108
FUNC_HOLIDAY_TRADITION_HAVE_DECORATIONS: 'CommonGameTag' = 2110
FUNC_HOLIDAY_TRADITION_OPEN_PRESENTS: 'CommonGameTag' = 2111
FUNC_HOLIDAY_TRADITION_PARTY: 'CommonGameTag' = 2112
FUNC_HOLIDAY_TREE: 'CommonGameTag' = 59409
FUNC_HOLIDAY_TREE_GARLAND: 'CommonGameTag' = 59412
FUNC_HOLIDAY_TREE_SKIRT: 'CommonGameTag' = 59413
FUNC_HOLIDAY_TREE_TOPPER: 'CommonGameTag' = 59414
FUNC_HOLIDAY_CANDLE: 'CommonGameTag' = 59478
FUNC_HOLOTABLE_FIRST_ORDER_PURCHASE: 'CommonGameTag' = 51207
FUNC_HOLOTABLE_RESISTANCE_PURCHASE: 'CommonGameTag' = 51208
FUNC_HONEY: 'CommonGameTag' = 59450
FUNC_HOOD: 'CommonGameTag' = 1168
FUNC_HOOP: 'CommonGameTag' = 553
FUNC_HOSPITAL: 'CommonGameTag' = 1377
FUNC_HOST_STATION: 'CommonGameTag' = 26628
FUNC_HOT_SAUCE: 'CommonGameTag' = 1300
FUNC_HOT_SPRINGS: 'CommonGameTag' = 69675
FUNC_HOT_TUB: 'CommonGameTag' = 1444
FUNC_HOUSE: 'CommonGameTag' = 1224
FUNC_HOUSEHOLD_INVENTORY_OBJECT_PROXY: 'CommonGameTag' = 2388
FUNC_HUNGER: 'CommonGameTag' = 996
FUNC_HUTCH: 'CommonGameTag' = 1030
FUNC_HYDRAULIC: 'CommonGameTag' = 1429
FUNC_HYGIENE: 'CommonGameTag' = 998
FUNC_ICE_CHEST: 'CommonGameTag' = 1249
FUNC_ICE_CREAM: 'CommonGameTag' = 20486
FUNC_ICE_CREAM_BOWL: 'CommonGameTag' = 20483
FUNC_ICE_CREAM_CARTON: 'CommonGameTag' = 20482
FUNC_ICE_CREAM_CONE: 'CommonGameTag' = 20484
FUNC_ICE_CREAM_MACHINE: 'CommonGameTag' = 20481
FUNC_ICE_CREAM_MILK_SHAKE: 'CommonGameTag' = 20485
FUNC_IMPORTANT_ITEMS: 'CommonGameTag' = 2283
FUNC_INCENSE: 'CommonGameTag' = 18442
FUNC_INFECTED_PLANT: 'CommonGameTag' = 47129
FUNC_INFLATABLE: 'CommonGameTag' = 1286
FUNC_INFO_BOARD: 'CommonGameTag' = 69714
FUNC_INGREDIENT: 'CommonGameTag' = 523
FUNC_INGREDIENT_ARTISAN_HERB_BREAD: 'CommonGameTag' = 12302
FUNC_INGREDIENT_BEETLE: 'CommonGameTag' = 10253
FUNC_INGREDIENT_COWPLANT_ESSENCE: 'CommonGameTag' = 12373
FUNC_INGREDIENT_CRAWDAD: 'CommonGameTag' = 10241
FUNC_INGREDIENT_CRYSTAL: 'CommonGameTag' = 1345
FUNC_INGREDIENT_CRYSTAL_ALIEN: 'CommonGameTag' = 12386
FUNC_INGREDIENT_CRYSTAL_COMMON: 'CommonGameTag' = 1349
FUNC_INGREDIENT_CRYSTAL_RARE: 'CommonGameTag' = 1351
FUNC_INGREDIENT_CRYSTAL_UNCOMMON: 'CommonGameTag' = 1350
FUNC_INGREDIENT_EXOTIC_FRUIT_PIE: 'CommonGameTag' = 12305
FUNC_INGREDIENT_EXOTIC_FRUIT_TART: 'CommonGameTag' = 12301
FUNC_INGREDIENT_FISH: 'CommonGameTag' = 817
FUNC_INGREDIENT_FISH_PIE: 'CommonGameTag' = 12303
FUNC_INGREDIENT_FISH_PUFFERFISH: 'CommonGameTag' = 55335
FUNC_INGREDIENT_FIZZY_JUICE: 'CommonGameTag' = 67631
FUNC_INGREDIENT_FIZZY_JUICE_EP09: 'CommonGameTag' = 2429
FUNC_INGREDIENT_FRUIT: 'CommonGameTag' = 795
FUNC_INGREDIENT_FRUIT_MUFFINS: 'CommonGameTag' = 12298
FUNC_INGREDIENT_FRUIT_SCONES: 'CommonGameTag' = 12299
FUNC_INGREDIENT_FRUITCAKE_SET1: 'CommonGameTag' = 12307
FUNC_INGREDIENT_FRUITCAKE_SET2: 'CommonGameTag' = 12308
FUNC_INGREDIENT_GRIMBUCHA_EP09: 'CommonGameTag' = 2432
FUNC_INGREDIENT_HERB: 'CommonGameTag' = 816
FUNC_INGREDIENT_INFECTED_SPORE: 'CommonGameTag' = 47142
FUNC_INGREDIENT_INSECT: 'CommonGameTag' = 1242
FUNC_INGREDIENT_JELLY_FILLED_DOUGHNUTS: 'CommonGameTag' = 12306
FUNC_INGREDIENT_KOMBUCHA: 'CommonGameTag' = 67632
FUNC_INGREDIENT_KOMBUCHA_EP09: 'CommonGameTag' = 2430
FUNC_INGREDIENT_LOCUST: 'CommonGameTag' = 10242
FUNC_INGREDIENT_METAL: 'CommonGameTag' = 1344
FUNC_INGREDIENT_METAL_ALIEN: 'CommonGameTag' = 12387
FUNC_INGREDIENT_METAL_COMMON: 'CommonGameTag' = 1346
FUNC_INGREDIENT_METAL_RARE: 'CommonGameTag' = 1348
FUNC_INGREDIENT_METAL_UNCOMMON: 'CommonGameTag' = 1347
FUNC_INGREDIENT_MUSHROOM: 'CommonGameTag' = 1243
FUNC_INGREDIENT_PLANT_ALIEN: 'CommonGameTag' = 12388
FUNC_INGREDIENT_RAINBOW_GELATIN_CAKE_SET1: 'CommonGameTag' = 12309
FUNC_INGREDIENT_RAINBOW_GELATIN_CAKE_SET2: 'CommonGameTag' = 12310
FUNC_INGREDIENT_ROSE_QUARTZ: 'CommonGameTag' = 12364
FUNC_INGREDIENT_SELTZER: 'CommonGameTag' = 67633
FUNC_INGREDIENT_STANDARD_FRUIT_PIE: 'CommonGameTag' = 12304
FUNC_INGREDIENT_STANDARD_FRUIT_TART: 'CommonGameTag' = 12300
FUNC_INGREDIENT_SUSPICIOUS: 'CommonGameTag' = 67634
FUNC_INGREDIENT_SUSPICIOUS_EP09: 'CommonGameTag' = 2431
FUNC_INGREDIENT_VEGGIE: 'CommonGameTag' = 815
FUNC_INGREDIENT_WAX_BLOCK: 'CommonGameTag' = 67636
FUNC_INSANE_TALK_TO_OBJECTS: 'CommonGameTag' = 1929
FUNC_INSECT_FARM: 'CommonGameTag' = 67592
FUNC_INSTRUMENT: 'CommonGameTag' = 570
FUNC_INSTRUMENTS: 'CommonGameTag' = 1413
FUNC_INTERACTIVE_BUSH: 'CommonGameTag' = 24588
FUNC_INTERACTIVE_BUSH_BG: 'CommonGameTag' = 2070
FUNC_INTERACTIVE_CLOSET: 'CommonGameTag' = 24589
FUNC_INVENTION_CONSTRUCTOR: 'CommonGameTag' = 12394
FUNC_INVESTIGATION_DOSSIER: 'CommonGameTag' = 47165
FUNC_INVESTIGATION_EVIDENCE: 'CommonGameTag' = 47106
FUNC_INVESTIGATION_HAZMAT_SUIT: 'CommonGameTag' = 47147
FUNC_INVESTIGATION_JUNK_PILE: 'CommonGameTag' = 47126
FUNC_INVESTIGATION_KEYCARD: 'CommonGameTag' = 47164
FUNC_INVESTIGATION_SEALED_DOOR_FLOOR: 'CommonGameTag' = 47136
FUNC_INVESTIGATION_SEALED_DOOR_HALLWAY: 'CommonGameTag' = 47138
FUNC_INVESTIGATION_SEALED_DOOR_MOTHER_PLANT: 'CommonGameTag' = 47137
FUNC_INVESTIGATION_SPORE_FILTER: 'CommonGameTag' = 47146
FUNC_INVESTIGATION_SPORE_SAMPLE: 'CommonGameTag' = 47135
FUNC_INVISIBLE: 'CommonGameTag' = 1219
FUNC_ISLAND_CANOE: 'CommonGameTag' = 63501
FUNC_ISLAND_CANOE_BEACH_VENUE: 'CommonGameTag' = 2198
FUNC_ISLAND_SPIRIT: 'CommonGameTag' = 63497
FUNC_ISLAND_SPIRIT_INACTIVE: 'CommonGameTag' = 63498
FUNC_ITEM_BATUU: 'CommonGameTag' = 2464
FUNC_JACK_O_LANTERN: 'CommonGameTag' = 1206
FUNC_JAIL: 'CommonGameTag' = 1379
FUNC_JIG: 'CommonGameTag' = 1342
FUNC_JOURNAL: 'CommonGameTag' = 43009
FUNC_JOURNAL_BASE_GAME: 'CommonGameTag' = 1724
FUNC_JOURNALIST: 'CommonGameTag' = 1118
FUNC_JUICE_FIZZER: 'CommonGameTag' = 67629
FUNC_JUICE_FIZZING_PRODUCT: 'CommonGameTag' = 67635
FUNC_JUICE_KEG: 'CommonGameTag' = 65539
FUNC_JUICE_KEG_CONFIDENT: 'CommonGameTag' = 65543
FUNC_JUICE_KEG_FLIRTY: 'CommonGameTag' = 65542
FUNC_JUICE_KEG_HAPPY: 'CommonGameTag' = 65544
FUNC_JUICE_KEG_PLAYFUL: 'CommonGameTag' = 65545
FUNC_JUMP_STAND: 'CommonGameTag' = 24604
FUNC_JUNGLE: 'CommonGameTag' = 563
FUNC_JUNGLE_GYM: 'CommonGameTag' = 1034
FUNC_KARAOKE_MACHINE: 'CommonGameTag' = 1581
FUNC_KEROSENE: 'CommonGameTag' = 1282
FUNC_KETCHUP: 'CommonGameTag' = 1298
FUNC_KETTLE: 'CommonGameTag' = 1221
FUNC_KID: 'CommonGameTag' = 1091
FUNC_KIDDIE_POOL: 'CommonGameTag' = 59462
FUNC_KNIFE: 'CommonGameTag' = 1140
FUNC_KNITTING: 'CommonGameTag' = 83992
FUNC_KNITTING_BABY_ONESIE: 'CommonGameTag' = 83983
FUNC_KNITTING_BEANIE: 'CommonGameTag' = 83973
FUNC_KNITTING_CHILD_SWEATER: 'CommonGameTag' = 83988
FUNC_KNITTING_CLOTHING: 'CommonGameTag' = 83993
FUNC_KNITTING_DECORATION: 'CommonGameTag' = 83979
FUNC_KNITTING_FURNISHING: 'CommonGameTag' = 83975
FUNC_KNITTING_GIFTED: 'CommonGameTag' = 83990
FUNC_KNITTING_GRIM: 'CommonGameTag' = 83987
FUNC_KNITTING_ONESIE: 'CommonGameTag' = 83980
FUNC_KNITTING_POUFFE: 'CommonGameTag' = 83978
FUNC_KNITTING_RUG: 'CommonGameTag' = 83976
FUNC_KNITTING_SOCKS: 'CommonGameTag' = 83974
FUNC_KNITTING_SWEATER: 'CommonGameTag' = 83977
FUNC_KNITTING_SWEATER_SCARF: 'CommonGameTag' = 83981
FUNC_KNITTING_TOY: 'CommonGameTag' = 83982
FUNC_KNITTING_WIP: 'CommonGameTag' = 2463
FUNC_KNIVES: 'CommonGameTag' = 1141
FUNC_KNOWLEDGE: 'CommonGameTag' = 24595
FUNC_KWANZAA: 'CommonGameTag' = 1330
FUNC_LAB: 'CommonGameTag' = 1400
FUNC_LAB_DOOR: 'CommonGameTag' = 47105
FUNC_LADDER: 'CommonGameTag' = 1230
FUNC_LAMP: 'CommonGameTag' = 1283
FUNC_LAMP_POST: 'CommonGameTag' = 1293
FUNC_LANDFILL_DUMPABLE_APPLIANCE: 'CommonGameTag' = 67607
FUNC_LANTERN: 'CommonGameTag' = 1205
FUNC_LAPTOP: 'CommonGameTag' = 515
FUNC_LASER: 'CommonGameTag' = 1396
FUNC_LASER_LIGHT: 'CommonGameTag' = 24577
FUNC_LAUNDRY_CLOTHES_LINE: 'CommonGameTag' = 75781
FUNC_LAUNDRY_DRYER: 'CommonGameTag' = 75779
FUNC_LAUNDRY_HAMPER: 'CommonGameTag' = 2033
FUNC_LAUNDRY_HERO_OBJECT: 'CommonGameTag' = 2032
FUNC_LAUNDRY_PILE: 'CommonGameTag' = 75777
FUNC_LAUNDRY_SEARCH_TERM: 'CommonGameTag' = 75782
FUNC_LAUNDRY_WASH_TUB: 'CommonGameTag' = 75780
FUNC_LAUNDRY_WASHING_MACHINE: 'CommonGameTag' = 75778
FUNC_LAVA_ROCK: 'CommonGameTag' = 63499
FUNC_LEAF_PILE: 'CommonGameTag' = 59432
FUNC_LECTERN: 'CommonGameTag' = 55405
FUNC_LIFESTYLES_ELECTRONICS: 'CommonGameTag' = 2493
FUNC_LIFESTYLES_TECH_BOOK: 'CommonGameTag' = 2505
FUNC_LIFESTYLES_TECH_SCHOOL_PROJECT: 'CommonGameTag' = 2506
FUNC_LIGHT_CANDLE_WITH_AUTO_LIGHTS: 'CommonGameTag' = 1446
FUNC_LIGHT_NO_AUTO_LIGHTS: 'CommonGameTag' = 1325
FUNC_LIGHT_NON_ELECTRIC: 'CommonGameTag' = 1374
FUNC_LIGHTING_NOT_STAGE_LIGHTS: 'CommonGameTag' = 61467
FUNC_LIGHTNING_CAN_STRIKE: 'CommonGameTag' = 2076
FUNC_LIGHTNING_CLEANUP: 'CommonGameTag' = 59491
FUNC_LIGHTNING_OBJECT: 'CommonGameTag' = 59440
FUNC_LIGHTS: 'CommonGameTag' = 1338
FUNC_LIGHTSABER_CRYSTAL: 'CommonGameTag' = 51203
FUNC_LIGHTSABER_HILT: 'CommonGameTag' = 51204
FUNC_LINOLEUM: 'CommonGameTag' = 1097
FUNC_LISTENING_DEVICE_BUG: 'CommonGameTag' = 47145
FUNC_LITTER_BOX: 'CommonGameTag' = 57355
FUNC_LITTER_BOX_HIGH_TECH: 'CommonGameTag' = 57360
FUNC_LIVE_DRAG_ALLOWED_WITH_CHILDREN: 'CommonGameTag' = 1722
FUNC_LIVING_CHAIR: 'CommonGameTag' = 1005
FUNC_LOCATOR_BEACH_PORTAL: 'CommonGameTag' = 2187
FUNC_LOCATOR_TERRAIN_WALKSTYLE_PORTAL: 'CommonGameTag' = 2482
FUNC_LOG: 'CommonGameTag' = 1307
FUNC_LOGIC: 'CommonGameTag' = 1098
FUNC_LOTUS: 'CommonGameTag' = 1288
FUNC_LOUNGE_EVENT_AWARD_TROPHY: 'CommonGameTag' = 61632
FUNC_MACHINE: 'CommonGameTag' = 578
FUNC_MAGAZINE: 'CommonGameTag' = 1405
FUNC_MAGIC_BEAN: 'CommonGameTag' = 1701
FUNC_MAGIC_BEAN_ANGRY_RED: 'CommonGameTag' = 1702
FUNC_MAGIC_BEAN_CONFIDENT_LIGHT_BLUE: 'CommonGameTag' = 1707
FUNC_MAGIC_BEAN_FLIRTY_PINK: 'CommonGameTag' = 1705
FUNC_MAGIC_BEAN_PLAYFUL_GREEN: 'CommonGameTag' = 1703
FUNC_MAGIC_BEAN_SAD_NAVY_BLUE: 'CommonGameTag' = 1706
FUNC_MAGIC_BEAN_UNCOMFORTABLE_ORANGE: 'CommonGameTag' = 1704
FUNC_MAGIC_BROOM: 'CommonGameTag' = 49169
FUNC_MAGIC_PORTAL_DUELING_TO_HQ: 'CommonGameTag' = 49159
FUNC_MAGIC_PORTAL_HQ_TO_DUELING: 'CommonGameTag' = 49160
FUNC_MAGIC_PORTAL_HQ_TO_MARKET: 'CommonGameTag' = 49161
FUNC_MAGIC_PORTAL_HQ_TO_VISTA: 'CommonGameTag' = 49162
FUNC_MAGIC_PORTAL_MARKET_TO_HQ: 'CommonGameTag' = 49163
FUNC_MAGIC_PORTAL_VISTA_TO_HQ: 'CommonGameTag' = 49164
FUNC_MAHI_MAHI: 'CommonGameTag' = 63509
FUNC_MAILBOX: 'CommonGameTag' = 954
FUNC_MAILBOX_WALL: 'CommonGameTag' = 2168
FUNC_MAKEUP_TABLE: 'CommonGameTag' = 36868
FUNC_MANNEQUIN: 'CommonGameTag' = 1322
FUNC_MANSION: 'CommonGameTag' = 1225
FUNC_MAP: 'CommonGameTag' = 1312
FUNC_MARKET_STALL: 'CommonGameTag' = 55298
FUNC_MARKET_STALLS: 'CommonGameTag' = 1932
FUNC_MARKET_STALLS_DOCKYARD_PETS: 'CommonGameTag' = 57410
FUNC_MARKET_STALLS_PURCHASE_FOOD: 'CommonGameTag' = 2378
FUNC_MARKET_STALLS_PURCHASE_NON_FOOD: 'CommonGameTag' = 2379
FUNC_MARKET_STALLS_SEAFOOD: 'CommonGameTag' = 1936
FUNC_MARKET_STALLS_SEASONAL_FALL: 'CommonGameTag' = 59404
FUNC_MARKET_STALLS_SEASONAL_SPRING: 'CommonGameTag' = 59403
FUNC_MARKET_STALLS_SEASONAL_SUMMER: 'CommonGameTag' = 59402
FUNC_MARKET_STALLS_SEASONAL_WINTER: 'CommonGameTag' = 59405
FUNC_MARKET_STALLS_SQUARE_SNACKS: 'CommonGameTag' = 57405
FUNC_MARKET_STALLS_SQUARE_SNACKS_PETS: 'CommonGameTag' = 57406
FUNC_MASCOT: 'CommonGameTag' = 1295
FUNC_MASONRY: 'CommonGameTag' = 1096
FUNC_MASSAGE: 'CommonGameTag' = 18454
FUNC_MASSAGE_CHAIR: 'CommonGameTag' = 18440
FUNC_MASSAGE_TABLE: 'CommonGameTag' = 18434
FUNC_MATTRESS: 'CommonGameTag' = 1285
FUNC_MEAL: 'CommonGameTag' = 521
FUNC_MEAT_WALL: 'CommonGameTag' = 67648
FUNC_MECH_SUIT_BODY: 'CommonGameTag' = 65639
FUNC_MECH_SUIT_HEAD: 'CommonGameTag' = 65640
FUNC_MEDITATION: 'CommonGameTag' = 18452
FUNC_MEDITATION_STOOL: 'CommonGameTag' = 18438
FUNC_MEDIUM: 'CommonGameTag' = 1188
FUNC_MEGAPHONE: 'CommonGameTag' = 55406
FUNC_MENTAL: 'CommonGameTag' = 24599
FUNC_MERCHANDISE_VENDING_MACHINE: 'CommonGameTag' = 2508
FUNC_MESS: 'CommonGameTag' = 43031
FUNC_METAL: 'CommonGameTag' = 1090
FUNC_MICROPHONE: 'CommonGameTag' = 488
FUNC_MICROSCOPE: 'CommonGameTag' = 857
FUNC_MICROWAVE: 'CommonGameTag' = 526
FUNC_MILITARY_CAREER_MEDAL: 'CommonGameTag' = 47143
FUNC_MINI_BOTS: 'CommonGameTag' = 65582
FUNC_MINI_BOTS_PARTY: 'CommonGameTag' = 65641
FUNC_MINI_BOTS_WORKER: 'CommonGameTag' = 2275
FUNC_MIRROR_NO_VANITY: 'CommonGameTag' = 2165
FUNC_MIXOLOGIST: 'CommonGameTag' = 1116
FUNC_MIXOLOGY: 'CommonGameTag' = 1103
FUNC_MODEL: 'CommonGameTag' = 1158
FUNC_MONKEY: 'CommonGameTag' = 564
FUNC_MONKEY_BARS: 'CommonGameTag' = 1001
FUNC_MONSTER: 'CommonGameTag' = 1217
FUNC_MOTHER_PLANT: 'CommonGameTag' = 47131
FUNC_MOTHER_PLANT_PIT: 'CommonGameTag' = 47144
FUNC_MOTION: 'CommonGameTag' = 480
FUNC_MOTION_GAMING_RIG: 'CommonGameTag' = 1016
FUNC_MOTOR: 'CommonGameTag' = 24598
FUNC_MOVIE: 'CommonGameTag' = 1498
FUNC_MUD_PUDDLE: 'CommonGameTag' = 59406
FUNC_MUD_BATH: 'CommonGameTag' = 18456
FUNC_MUG: 'CommonGameTag' = 1301
FUNC_MURAL: 'CommonGameTag' = 55371
FUNC_MUSIC: 'CommonGameTag' = 491
FUNC_MUSIC_DISC: 'CommonGameTag' = 61470
FUNC_MUSIC_PRODUCTION_STATION: 'CommonGameTag' = 61469
FUNC_MUSICIAN: 'CommonGameTag' = 1083
FUNC_MUSTARD: 'CommonGameTag' = 1299
FUNC_MYSTICAL_RELIC_BOTTOM: 'CommonGameTag' = 45067
FUNC_MYSTICAL_RELIC_CRYSTAL: 'CommonGameTag' = 45068
FUNC_MYSTICAL_RELIC_FUSED: 'CommonGameTag' = 45078
FUNC_MYSTICAL_RELIC_TOP: 'CommonGameTag' = 45066
FUNC_MYSTICAL_RELIC_UNBREAKABLE: 'CommonGameTag' = 45111
FUNC_NECTAR: 'CommonGameTag' = 1527
FUNC_NEON: 'CommonGameTag' = 12400
FUNC_NESTING_BLOCKS: 'CommonGameTag' = 1662
FUNC_NEVER_RECEIVES_SNOW: 'CommonGameTag' = 2069
FUNC_NO_CLEAN_UP_FROM_INVENTORY: 'CommonGameTag' = 2210
FUNC_NON_BAR_JUICE_ENTHUSIAST_QUIRK: 'CommonGameTag' = 2144
FUNC_OBJECT_UPGRADE_PART: 'CommonGameTag' = 780
FUNC_OBSERVATORY: 'CommonGameTag' = 572
FUNC_OFF_THE_GRID: 'CommonGameTag' = 2219
FUNC_OFF_THE_GRID_TOGGLE_UTILITY_USAGE: 'CommonGameTag' = 2427
FUNC_ORACLE: 'CommonGameTag' = 1185
FUNC_ORRERY: 'CommonGameTag' = 12429
FUNC_OTTOMAN: 'CommonGameTag' = 1007
FUNC_OUTDOOR: 'CommonGameTag' = 1430
FUNC_OUTDOOR_CHAIR: 'CommonGameTag' = 1004
FUNC_OUTDOOR_PLANT: 'CommonGameTag' = 1013
FUNC_OUTDOORS: 'CommonGameTag' = 1280
FUNC_OVEN: 'CommonGameTag' = 748
FUNC_PAINT: 'CommonGameTag' = 483
FUNC_PAINTER: 'CommonGameTag' = 1120
FUNC_PAINTING: 'CommonGameTag' = 894
FUNC_PAINTING_HAUNTED: 'CommonGameTag' = 2515
FUNC_PANS: 'CommonGameTag' = 1296
FUNC_PAPER: 'CommonGameTag' = 1418
FUNC_PAPER_POSTED: 'CommonGameTag' = 43010
FUNC_PARK_FOUNTAIN: 'CommonGameTag' = 30721
FUNC_PARTY: 'CommonGameTag' = 529
FUNC_PATH_OBSTACLE_JUNGLE_01_ENTRANCE: 'CommonGameTag' = 45060
FUNC_PATH_OBSTACLE_JUNGLE_01_EXIT: 'CommonGameTag' = 45061
FUNC_PATH_OBSTACLE_JUNGLE_02_ENTRANCE: 'CommonGameTag' = 45062
FUNC_PATH_OBSTACLE_JUNGLE_02_EXIT: 'CommonGameTag' = 45063
FUNC_PATH_OBSTACLE_JUNGLE_03_ENTRANCE: 'CommonGameTag' = 45080
FUNC_PATH_OBSTACLE_JUNGLE_03_EXIT: 'CommonGameTag' = 45081
FUNC_PATH_OBSTACLE_JUNGLE_04_ENTRANCE: 'CommonGameTag' = 45082
FUNC_PATH_OBSTACLE_JUNGLE_04_EXIT: 'CommonGameTag' = 45083
FUNC_PATH_OBSTACLE_JUNGLE_05_ENTRANCE: 'CommonGameTag' = 45084
FUNC_PATH_OBSTACLE_JUNGLE_05_EXIT: 'CommonGameTag' = 45085
FUNC_PATH_OBSTACLE_JUNGLE_06_ENTRANCE: 'CommonGameTag' = 45086
FUNC_PATH_OBSTACLE_JUNGLE_06_EXIT: 'CommonGameTag' = 45087
FUNC_PATH_OBSTACLE_JUNGLE_POOL_ENTRANCE: 'CommonGameTag' = 45095
FUNC_PATH_OBSTACLE_JUNGLE_POOL_EXIT: 'CommonGameTag' = 45096
FUNC_PATH_OBSTACLE_JUNGLE_TEMPLE_ENTRANCE: 'CommonGameTag' = 45064
FUNC_PATH_OBSTACLE_JUNGLE_TEMPLE_EXIT: 'CommonGameTag' = 45065
FUNC_PATIO_FURNITURE: 'CommonGameTag' = 1011
FUNC_PEDESTAL: 'CommonGameTag' = 1399
FUNC_PERFORMANCE_SPACE: 'CommonGameTag' = 55299
FUNC_PET_BALL: 'CommonGameTag' = 57412
FUNC_PET_BED: 'CommonGameTag' = 57386
FUNC_PET_BOWL: 'CommonGameTag' = 1876
FUNC_PET_BUSH: 'CommonGameTag' = 57445
FUNC_PET_CATNIP: 'CommonGameTag' = 57421
FUNC_PET_CRATE: 'CommonGameTag' = 57388
FUNC_PET_DIRT_MOUND: 'CommonGameTag' = 57448
FUNC_PET_DOG_TOY: 'CommonGameTag' = 57454
FUNC_PET_FEAR_SOUNDS_BG: 'CommonGameTag' = 2171
FUNC_PET_FILLER: 'CommonGameTag' = 57380
FUNC_PET_FILLER_THREE: 'CommonGameTag' = 57382
FUNC_PET_FILLER_TWO: 'CommonGameTag' = 57381
FUNC_PET_FISH_PILE: 'CommonGameTag' = 57446
FUNC_PET_FOOD: 'CommonGameTag' = 57379
FUNC_PET_GIFT: 'CommonGameTag' = 57444
FUNC_PET_HIDE_NO_FADE: 'CommonGameTag' = 2031
FUNC_PET_MINOR_CAGE: 'CommonGameTag' = 77825
FUNC_PET_MINOR_CAGE_BG: 'CommonGameTag' = 2052
FUNC_PET_NO_ROUTE_UNDER: 'CommonGameTag' = 2028
FUNC_PET_OBSTACLE_COURSE: 'CommonGameTag' = 57415
FUNC_PET_OBSTACLE_COURSE_HOOP: 'CommonGameTag' = 57416
FUNC_PET_OBSTACLE_COURSE_PLATFORM: 'CommonGameTag' = 57418
FUNC_PET_OBSTACLE_COURSE_RAMP: 'CommonGameTag' = 57417
FUNC_PET_OBSTACLE_COURSE_TUNNEL: 'CommonGameTag' = 57420
FUNC_PET_OBSTACLE_COURSE_WEAVING_FLAGS: 'CommonGameTag' = 57419
FUNC_PET_POOP: 'CommonGameTag' = 57361
FUNC_PET_POOP_NO_CLEAN: 'CommonGameTag' = 57455
FUNC_PET_RECIPE: 'CommonGameTag' = 57404
FUNC_PET_RECIPE_FOOD: 'CommonGameTag' = 1930
FUNC_PET_SCRATCHABLE_FURNITURE: 'CommonGameTag' = 1878
FUNC_PET_SEAWEED: 'CommonGameTag' = 57447
FUNC_PET_SQUEAKY_BALL: 'CommonGameTag' = 57413
FUNC_PET_TOY: 'CommonGameTag' = 1877
FUNC_PET_TOY_BOX: 'CommonGameTag' = 57376
FUNC_PET_TOY_NEW: 'CommonGameTag' = 57440
FUNC_PET_TOY_SMART_TRAIT_CARRY: 'CommonGameTag' = 57456
FUNC_PET_TREAT: 'CommonGameTag' = 57426
FUNC_PET_TREAT_EDIBLE: 'CommonGameTag' = 57431
FUNC_PET_TREAT_EDIBLE_CHILD: 'CommonGameTag' = 57438
FUNC_PET_TREAT_EDIBLE_ELDER: 'CommonGameTag' = 57439
FUNC_PHANTOM: 'CommonGameTag' = 1194
FUNC_PHOTO: 'CommonGameTag' = 1382
FUNC_PHOTO_COLLAGE: 'CommonGameTag' = 79874
FUNC_PHOTO_STUDIO: 'CommonGameTag' = 1941
FUNC_PHOTO_STUDIO_SEARCH: 'CommonGameTag' = 2218
FUNC_PHOTOGRAPHY: 'CommonGameTag' = 1383
FUNC_PHOTOGRAPHY_DISALLOW: 'CommonGameTag' = 1438
FUNC_PIANO: 'CommonGameTag' = 566
FUNC_PICNIC: 'CommonGameTag' = 1317
FUNC_PICNIC_TABLE: 'CommonGameTag' = 1248
FUNC_PILLAR: 'CommonGameTag' = 1010
FUNC_PIPE: 'CommonGameTag' = 1410
FUNC_PIPE_ORGAN: 'CommonGameTag' = 40963
FUNC_PIRATE: 'CommonGameTag' = 501
FUNC_PIT_BBQ: 'CommonGameTag' = 63527
FUNC_PLACEMAT_DRAWING: 'CommonGameTag' = 26639
FUNC_PLACEMAT_FORMAL: 'CommonGameTag' = 1711
FUNC_PLANTER_BOX: 'CommonGameTag' = 1149
FUNC_PLAQUE: 'CommonGameTag' = 1420
FUNC_PLAY: 'CommonGameTag' = 1142
FUNC_PLUSH: 'CommonGameTag' = 1021
FUNC_PODIUM: 'CommonGameTag' = 1577
FUNC_PODIUM_PAIR: 'CommonGameTag' = 65591
FUNC_PODIUM_PAIR_DEBATE_SHOWDOWN: 'CommonGameTag' = 65594
FUNC_POLE: 'CommonGameTag' = 1404
FUNC_POLICE: 'CommonGameTag' = 12398
FUNC_POOL: 'CommonGameTag' = 1233
FUNC_POOL_LADDER: 'CommonGameTag' = 1240
FUNC_POOL_LIGHT: 'CommonGameTag' = 1234
FUNC_POPCORN: 'CommonGameTag' = 28674
FUNC_POPCORN_BUTTERED: 'CommonGameTag' = 28678
FUNC_POPCORN_CARAMEL: 'CommonGameTag' = 28676
FUNC_POPCORN_CHEDDAR: 'CommonGameTag' = 28675
FUNC_POPCORN_KETTLE: 'CommonGameTag' = 28677
FUNC_POPCORN_POPPER: 'CommonGameTag' = 28673
FUNC_PORTABLE_BAR: 'CommonGameTag' = 24602
FUNC_PORTABLE_KEYBOARD: 'CommonGameTag' = 1627
FUNC_PORTAL: 'CommonGameTag' = 1435
FUNC_PORTRAIT: 'CommonGameTag' = 1422
FUNC_POSTER: 'CommonGameTag' = 895
FUNC_POT: 'CommonGameTag' = 1144
FUNC_POTION: 'CommonGameTag' = 993
FUNC_POTTY: 'CommonGameTag' = 1664
FUNC_POWER_GENERATOR: 'CommonGameTag' = 67617
FUNC_PREGENERATE_DEFAULT_MAT_GEO_STATE_THUMBNAIL_ONLY: 'CommonGameTag' = 2170
FUNC_PRESENT_PILE: 'CommonGameTag' = 59410
FUNC_PRESENT_PILE_LARGE: 'CommonGameTag' = 59416
FUNC_PRESENT_PILE_SMALL: 'CommonGameTag' = 59415
FUNC_PREVENT_RECYCLING: 'CommonGameTag' = 2442
FUNC_PRISON: 'CommonGameTag' = 1380
FUNC_PRIVACY_OBEY_APPROPRIATE: 'CommonGameTag' = 61640
FUNC_PROGRAMMING: 'CommonGameTag' = 1101
FUNC_PROPANE: 'CommonGameTag' = 1281
FUNC_PSYCHIC: 'CommonGameTag' = 1186
FUNC_PUBLIC_BATHROOM: 'CommonGameTag' = 1340
FUNC_PUDDLE: 'CommonGameTag' = 567
FUNC_PUMPKIN: 'CommonGameTag' = 1204
FUNC_PUNCHING: 'CommonGameTag' = 477
FUNC_PUPPET_THEATER: 'CommonGameTag' = 32769
FUNC_PURCHASE_BEACH: 'CommonGameTag' = 63506
FUNC_PURCHASE_BEACH_ACCESSORIES: 'CommonGameTag' = 63532
FUNC_PURCHASE_BEACH_FISHING: 'CommonGameTag' = 63529
FUNC_PURCHASE_BEACH_FRUITS: 'CommonGameTag' = 63533
FUNC_PURCHASE_BEACH_LEISURE: 'CommonGameTag' = 63530
FUNC_PURCHASE_BEACH_VEHICLES: 'CommonGameTag' = 63531
FUNC_PURCHASE_PICKER_CATEGORY_BOOK_EMOTIONAL: 'CommonGameTag' = 1037
FUNC_PURCHASE_PICKER_CATEGORY_BOOK_SKILL: 'CommonGameTag' = 1036
FUNC_PURCHASE_VACATION_FUN: 'CommonGameTag' = 2503
FUNC_PURCHASE_VACATION_FURNITURE: 'CommonGameTag' = 2500
FUNC_PURCHASE_VACATION_MISC: 'CommonGameTag' = 2504
FUNC_PURCHASE_VACATION_SUPPLIES: 'CommonGameTag' = 2502
FUNC_PURCHASE_VACATION_TENTS: 'CommonGameTag' = 2501
FUNC_QUADCOPTER: 'CommonGameTag' = 65624
FUNC_RACK: 'CommonGameTag' = 1146
FUNC_RANGE: 'CommonGameTag' = 1169
FUNC_RANGER_STATION: 'CommonGameTag' = 1341
FUNC_RANGER_STATION_CATEGORY_FUN: 'CommonGameTag' = 1889
FUNC_RANGER_STATION_CATEGORY_FURNITURE: 'CommonGameTag' = 1888
FUNC_RANGER_STATION_CATEGORY_INGREDIENT: 'CommonGameTag' = 1890
FUNC_RANGER_STATION_CATEGORY_SUPPLIES: 'CommonGameTag' = 1887
FUNC_RANGER_STATION_CATEGORY_PET: 'CommonGameTag' = 2012
FUNC_RANGER_STATION_FUN: 'CommonGameTag' = 10269
FUNC_RANGER_STATION_FURNITURE: 'CommonGameTag' = 10268
FUNC_RANGER_STATION_INGREDIENT: 'CommonGameTag' = 10270
FUNC_RANGER_STATION_SUPPLIES: 'CommonGameTag' = 10267
FUNC_RAT: 'CommonGameTag' = 77830
FUNC_REAPER: 'CommonGameTag' = 576
FUNC_REBATE_PLANT: 'CommonGameTag' = 2205
FUNC_RECIPE: 'CommonGameTag' = 522
FUNC_RECIPE_BAKING_CUPCAKE_FACTORY: 'CommonGameTag' = 12377
FUNC_RECIPE_BAKING_OVEN: 'CommonGameTag' = 12376
FUNC_RECLINER: 'CommonGameTag' = 1111
FUNC_RECORDING: 'CommonGameTag' = 47149
FUNC_RECYCLER: 'CommonGameTag' = 67585
FUNC_REFRIGERATOR: 'CommonGameTag' = 519
FUNC_REGISTERED_VAMPIRE_LAIR: 'CommonGameTag' = 2271
FUNC_REGISTERS: 'CommonGameTag' = 12395
FUNC_RELAXATION: 'CommonGameTag' = 18457
FUNC_REPAIR_BURNT: 'CommonGameTag' = 67644
FUNC_REPAIR_BURNT_VARIABLE_HEIGHT: 'CommonGameTag' = 67643
FUNC_REPAIR_BURNT_VARIABLE_HEIGHT_BG: 'CommonGameTag' = 2435
FUNC_REQUIRES_OCEAN_LOT: 'CommonGameTag' = 63519
FUNC_RESEARCH_MACHINE: 'CommonGameTag' = 65631
FUNC_RESTAURANT_NOT_A_TABLE: 'CommonGameTag' = 26649
FUNC_RETAIL: 'CommonGameTag' = 1321
FUNC_RETAIL_FRIDGE: 'CommonGameTag' = 12431
FUNC_RETAIL_NEON_LIGHT: 'CommonGameTag' = 12365
FUNC_RETAIL_NPC_ITEM_FOR_SALE: 'CommonGameTag' = 12384
FUNC_RETAIL_PEDESTAL: 'CommonGameTag' = 12383
FUNC_RETAIL_REGISTER: 'CommonGameTag' = 12311
FUNC_REVIEW_PRODUCT_BEAUTY: 'CommonGameTag' = 61557
FUNC_REVIEW_PRODUCT_GADGET: 'CommonGameTag' = 61559
FUNC_REVIEW_PRODUCT_TECH: 'CommonGameTag' = 61558
FUNC_REWARD: 'CommonGameTag' = 1121
FUNC_RIG: 'CommonGameTag' = 1015
FUNC_ROBOT_VACUUM: 'CommonGameTag' = 1982
FUNC_ROBOT_VACUUM_BASE: 'CommonGameTag' = 1983
FUNC_ROBOT_VACUUM_CLEAN_DEFAULT: 'CommonGameTag' = 57422
FUNC_ROBOT_VACUUM_CLEAN_UPGRADE: 'CommonGameTag' = 57423
FUNC_ROBOT_VACUUM_MESS_DEFAULT_CLEAN: 'CommonGameTag' = 2010
FUNC_ROBOT_VACUUM_MESS_UPGRADED_CLEAN: 'CommonGameTag' = 2011
FUNC_ROBOTIC_ARM: 'CommonGameTag' = 2281
FUNC_ROBOTICS_TABLE: 'CommonGameTag' = 65565
FUNC_ROCK: 'CommonGameTag' = 1318
FUNC_ROCK_CLIMBING_WALL: 'CommonGameTag' = 71681
FUNC_ROCK_WALL: 'CommonGameTag' = 71682
FUNC_ROCKET: 'CommonGameTag' = 495
FUNC_ROCKET_SCIENCE: 'CommonGameTag' = 1105
FUNC_ROCKING_CHAIR: 'CommonGameTag' = 2462
FUNC_ROCKING_CHAIR_ARM_CHAIR: 'CommonGameTag' = 83986
FUNC_ROOMMATE_ABSENT: 'CommonGameTag' = 2263
FUNC_ROOMMATE_ART: 'CommonGameTag' = 2259
FUNC_ROOMMATE_BAKING: 'CommonGameTag' = 2257
FUNC_ROOMMATE_BATHROOM_HOG: 'CommonGameTag' = 2262
FUNC_ROOMMATE_BIG_CLOSET: 'CommonGameTag' = 2264
FUNC_ROOMMATE_BREAKER: 'CommonGameTag' = 2256
FUNC_ROOMMATE_CANT_STOP_THE_BEAT: 'CommonGameTag' = 2255
FUNC_ROOMMATE_CHEERLEADER: 'CommonGameTag' = 2248
FUNC_ROOMMATE_CLINGY_SOCIALITE: 'CommonGameTag' = 2251
FUNC_ROOMMATE_COMPUTER: 'CommonGameTag' = 2260
FUNC_ROOMMATE_COUCH_POTATO: 'CommonGameTag' = 2252
FUNC_ROOMMATE_EMO_LONER: 'CommonGameTag' = 2254
FUNC_ROOMMATE_FITNESS: 'CommonGameTag' = 2261
FUNC_ROOMMATE_FIXER: 'CommonGameTag' = 2250
FUNC_ROOMMATE_LATE_ON_RENT: 'CommonGameTag' = 2267
FUNC_ROOMMATE_MEAL_MAKER: 'CommonGameTag' = 2249
FUNC_ROOMMATE_MUSIC: 'CommonGameTag' = 2258
FUNC_ROOMMATE_PARTY_PLANNER: 'CommonGameTag' = 2253
FUNC_ROOMMATE_PRANKSTER: 'CommonGameTag' = 2266
FUNC_ROOMMATE_PUBLIC_AFFECTION_DISPLAYER: 'CommonGameTag' = 2265
FUNC_ROOMMATE_SUPER_NEAT: 'CommonGameTag' = 2247
FUNC_RUBBISH: 'CommonGameTag' = 923
FUNC_RUG: 'CommonGameTag' = 2020
FUNC_RUSTIC: 'CommonGameTag' = 1320
FUNC_SABACC_CHIP_PILE: 'CommonGameTag' = 51254
FUNC_SACRED_CANDLE: 'CommonGameTag' = 86020
FUNC_SALE: 'CommonGameTag' = 1406
FUNC_SALINE: 'CommonGameTag' = 1407
FUNC_SAUCE_POT: 'CommonGameTag' = 2450
FUNC_SAUCER: 'CommonGameTag' = 1393
FUNC_SAUNA: 'CommonGameTag' = 18455
FUNC_SAWHORSE: 'CommonGameTag' = 1408
FUNC_SCARECROW: 'CommonGameTag' = 59459
FUNC_SCENT_FLOWER_HIGH_SKILL: 'CommonGameTag' = 59470
FUNC_SCENT_FLOWER_LOW_SKILL: 'CommonGameTag' = 59469
FUNC_SCHOOL_PROJECT_BOX_CHILD: 'CommonGameTag' = 43013
FUNC_SCHOOL_PROJECT_BOX_TEEN: 'CommonGameTag' = 43014
FUNC_SCIENCE: 'CommonGameTag' = 1019
FUNC_SCIENCE_TABLE: 'CommonGameTag' = 858
FUNC_SCIENCE_UNIVERSITY_SHELL: 'CommonGameTag' = 65549
FUNC_SCIENCE_UNIVERSITY_SHELL_SHELL_1: 'CommonGameTag' = 65562
FUNC_SCIENCE_UNIVERSITY_SHELL_SHELL_2: 'CommonGameTag' = 65563
FUNC_SCIENTIST: 'CommonGameTag' = 12396
FUNC_SCRATCHED_ALL: 'CommonGameTag' = 57369
FUNC_SCRATCHED_LOW: 'CommonGameTag' = 57368
FUNC_SCRATCHING_POST: 'CommonGameTag' = 57384
FUNC_SCREEN: 'CommonGameTag' = 1031
FUNC_SCYTHE: 'CommonGameTag' = 574
FUNC_SEANCE: 'CommonGameTag' = 1189
FUNC_SEANCE_CIRCLE: 'CommonGameTag' = 86018
FUNC_SEANCE_TABLE: 'CommonGameTag' = 86017
FUNC_SEASHELL: 'CommonGameTag' = 63508
FUNC_SEASONAL: 'CommonGameTag' = 59445
FUNC_SECRET_AGENT: 'CommonGameTag' = 1127
FUNC_SECRET_SOCIETY_GARDEN: 'CommonGameTag' = 65569
FUNC_SEER: 'CommonGameTag' = 1187
FUNC_SHADES: 'CommonGameTag' = 1154
FUNC_SHEET: 'CommonGameTag' = 1290
FUNC_SHELF: 'CommonGameTag' = 1148
FUNC_SHIP: 'CommonGameTag' = 496
FUNC_SHELL_INTERACTIVE: 'CommonGameTag' = 2245
FUNC_SHOWER: 'CommonGameTag' = 1315
FUNC_SHOWER_TUB: 'CommonGameTag' = 1663
FUNC_SHUTTLE: 'CommonGameTag' = 1397
FUNC_SIGN: 'CommonGameTag' = 1027
FUNC_SIM_RAY: 'CommonGameTag' = 1278
FUNC_SIM_RAY_NOT_VALID_TRANSFORM_RESULT: 'CommonGameTag' = 12433
FUNC_SIM_RAY_NOT_VALID_TRANSFORM_RESULT_BG: 'CommonGameTag' = 1528
FUNC_SIM_RAY_TRANSFORM_ALIEN_VISITOR_ALLOW: 'CommonGameTag' = 12362
FUNC_SING: 'CommonGameTag' = 489
FUNC_SINGLE_BED: 'CommonGameTag' = 779
FUNC_SINK: 'CommonGameTag' = 1313
FUNC_SIT: 'CommonGameTag' = 1434
FUNC_SIT_LOUNGE: 'CommonGameTag' = 2196
FUNC_SIT_LOUNGE_FLOAT: 'CommonGameTag' = 2202
FUNC_SKATING_RINK: 'CommonGameTag' = 59407
FUNC_SKATING_RINK_ICE_NATURAL: 'CommonGameTag' = 59399
FUNC_SKATING_RINK_ICE_RINK: 'CommonGameTag' = 59398
FUNC_SKATING_RINK_LARGE: 'CommonGameTag' = 59436
FUNC_SKATING_RINK_ROLLER_RINK: 'CommonGameTag' = 59400
FUNC_SKATING_RINK_SEASONAL: 'CommonGameTag' = 59448
FUNC_SKATING_RINK_SMALL: 'CommonGameTag' = 59435
FUNC_SKELETON: 'CommonGameTag' = 1208
FUNC_SKETCHPAD: 'CommonGameTag' = 2159
FUNC_SKILLS: 'CommonGameTag' = 1384
FUNC_SKULL: 'CommonGameTag' = 1212
FUNC_SLEEP: 'CommonGameTag' = 1143
FUNC_SLEEPING_POD: 'CommonGameTag' = 61624
FUNC_SLIDE_LAWN: 'CommonGameTag' = 34818
FUNC_SLIPPY_SLIDE: 'CommonGameTag' = 34817
FUNC_SMART_HUB: 'CommonGameTag' = 2174
FUNC_SNOB_ART_ASSESS: 'CommonGameTag' = 2133
FUNC_SNOB_ART_ASSESS_NO_RESERVE: 'CommonGameTag' = 2134
FUNC_SNOW: 'CommonGameTag' = 1333
FUNC_SNOW_ANGEL: 'CommonGameTag' = 2484
FUNC_SNOW_DRIFT: 'CommonGameTag' = 2485
FUNC_SNOW_MAN: 'CommonGameTag' = 1336
FUNC_SNOW_PAL: 'CommonGameTag' = 2486
FUNC_SNOW_SPORTS_SLOPE_BUNNY_SLOPE: 'CommonGameTag' = 69646
FUNC_SNOW_SPORTS_SLOPE_EASY_SLOPE: 'CommonGameTag' = 69647
FUNC_SNOW_SPORTS_SLOPE_EXPERT_SLOPE: 'CommonGameTag' = 69649
FUNC_SNOW_SPORTS_SLOPE_EXTREME_SLOPE: 'CommonGameTag' = 69650
FUNC_SNOW_SPORTS_SLOPE_INTERMEDIATE_SLOPE: 'CommonGameTag' = 69648
FUNC_SNOW_SPORTS_SLOPE_SKIS: 'CommonGameTag' = 69643
FUNC_SNOW_SPORTS_SLOPE_SKIS_ADULT: 'CommonGameTag' = 69715
FUNC_SNOW_SPORTS_SLOPE_SKIS_ADULT_RENTABLE: 'CommonGameTag' = 69717
FUNC_SNOW_SPORTS_SLOPE_SKIS_CHILD: 'CommonGameTag' = 69676
FUNC_SNOW_SPORTS_SLOPE_SKIS_CHILD_RENTABLE: 'CommonGameTag' = 69719
FUNC_SNOW_SPORTS_SLOPE_SKIS_RENTED: 'CommonGameTag' = 69678
FUNC_SNOW_SPORTS_SLOPE_SLED: 'CommonGameTag' = 69645
FUNC_SNOW_SPORTS_SLOPE_SNOWBOARD: 'CommonGameTag' = 69644
FUNC_SNOW_SPORTS_SLOPE_SNOWBOARD_ADULT: 'CommonGameTag' = 69716
FUNC_SNOW_SPORTS_SLOPE_SNOWBOARD_ADULT_RENTABLE: 'CommonGameTag' = 69718
FUNC_SNOW_SPORTS_SLOPE_SNOWBOARD_CHILD: 'CommonGameTag' = 69677
FUNC_SNOW_SPORTS_SLOPE_SNOWBOARD_CHILD_RENTABLE: 'CommonGameTag' = 69720
FUNC_SNOW_SPORTS_SLOPE_SNOWBOARD_RENTED: 'CommonGameTag' = 69679
FUNC_SOAP: 'CommonGameTag' = 1423
FUNC_SOCCER_BALL: 'CommonGameTag' = 65540
FUNC_SOCIAL: 'CommonGameTag' = 1000
FUNC_SOLAR_PANEL: 'CommonGameTag' = 67613
FUNC_SOUND: 'CommonGameTag' = 517
FUNC_SP_TABLE: 'CommonGameTag' = 1182
FUNC_SPACE: 'CommonGameTag' = 497
FUNC_SPACE_RANGER: 'CommonGameTag' = 1132
FUNC_SPACESHIP: 'CommonGameTag' = 994
FUNC_SPAWNER: 'CommonGameTag' = 59453
FUNC_SPECTER: 'CommonGameTag' = 86022
FUNC_SPECTER_JAR_FRIENDLY: 'CommonGameTag' = 86023
FUNC_SPECTER_JAR_MEAN: 'CommonGameTag' = 86024
FUNC_SPECTER_JAR_MYSTERIOUS: 'CommonGameTag' = 86025
FUNC_SPELLS_DUPLICATE: 'CommonGameTag' = 49165
FUNC_SPELLS_DUPLICATE_BG: 'CommonGameTag' = 2268
FUNC_SPELLS_STEAL: 'CommonGameTag' = 49167
FUNC_SPELLS_STEAL_BG: 'CommonGameTag' = 2436
FUNC_SPIDER: 'CommonGameTag' = 1192
FUNC_SPIRIT: 'CommonGameTag' = 1197
FUNC_SPOOK: 'CommonGameTag' = 1196
FUNC_SPOOKY: 'CommonGameTag' = 1178
FUNC_SPORTS_ARENA_ARTS: 'CommonGameTag' = 65607
FUNC_SPORTS_ARENA_SCIENCE: 'CommonGameTag' = 65608
FUNC_SPRINKLER: 'CommonGameTag' = 1061
FUNC_SPRINKLER_FLOOR: 'CommonGameTag' = 2099
FUNC_STAGE_GATE_ACTORS: 'CommonGameTag' = 61464
FUNC_STAGE_LIGHT_ALL: 'CommonGameTag' = 61461
FUNC_STAGE_MARK_DUO1_1: 'CommonGameTag' = 61443
FUNC_STAGE_MARK_DUO1_2: 'CommonGameTag' = 61444
FUNC_STAGE_MARK_DUO1_3: 'CommonGameTag' = 61445
FUNC_STAGE_MARK_DUO2_1: 'CommonGameTag' = 61481
FUNC_STAGE_MARK_DUO2_2: 'CommonGameTag' = 61482
FUNC_STAGE_MARK_DUO2_3: 'CommonGameTag' = 61483
FUNC_STAGE_MARK_DUO3_1: 'CommonGameTag' = 61484
FUNC_STAGE_MARK_DUO3_2: 'CommonGameTag' = 61485
FUNC_STAGE_MARK_DUO3_3: 'CommonGameTag' = 61486
FUNC_STAGE_MARK_DUO_SWORD_FIGHT: 'CommonGameTag' = 61623
FUNC_STAGE_MARK_SOLO1_1: 'CommonGameTag' = 61446
FUNC_STAGE_MARK_SOLO1_2: 'CommonGameTag' = 61447
FUNC_STAGE_MARK_SOLO1_3: 'CommonGameTag' = 61448
FUNC_STAGE_MARK_SOLO2_1: 'CommonGameTag' = 61487
FUNC_STAGE_MARK_SOLO2_2: 'CommonGameTag' = 61488
FUNC_STAGE_MARK_SOLO2_3: 'CommonGameTag' = 61489
FUNC_STAGE_MARK_SOLO3_1: 'CommonGameTag' = 61490
FUNC_STAGE_MARK_SOLO3_2: 'CommonGameTag' = 61491
FUNC_STAGE_MARK_SOLO3_3: 'CommonGameTag' = 61492
FUNC_STAGE_MARK_SOLO_DEATH: 'CommonGameTag' = 61622
FUNC_STALLS_CURIO_SHOP_OBJECTS: 'CommonGameTag' = 47107
FUNC_STALLS_PRODUCE_CURRY_CHILI: 'CommonGameTag' = 55342
FUNC_STALLS_PRODUCE_GROCERY: 'CommonGameTag' = 55341
FUNC_STALLS_PRODUCE_SAFFRON: 'CommonGameTag' = 55343
FUNC_STALLS_PRODUCE_WASABI: 'CommonGameTag' = 55344
FUNC_STALLS_SCHWAG_FESTIVAL_ALL_STALLS: 'CommonGameTag' = 55349
FUNC_STALLS_SCHWAG_FESTIVAL_BLOSSOM: 'CommonGameTag' = 55336
FUNC_STALLS_SCHWAG_FESTIVAL_FLEA_MARKET: 'CommonGameTag' = 55337
FUNC_STALLS_SCHWAG_FESTIVAL_FOOD: 'CommonGameTag' = 55338
FUNC_STALLS_SCHWAG_FESTIVAL_LAMP: 'CommonGameTag' = 55339
FUNC_STALLS_SCHWAG_FESTIVAL_LOGIC: 'CommonGameTag' = 55340
FUNC_STAND: 'CommonGameTag' = 1166
FUNC_STANDING_LAMP: 'CommonGameTag' = 1137
FUNC_STATUE: 'CommonGameTag' = 1156
FUNC_STEAM_FISSURE: 'CommonGameTag' = 24585
FUNC_STEAM_ROOM: 'CommonGameTag' = 18444
FUNC_STEAM_VENT: 'CommonGameTag' = 63500
FUNC_STEPS: 'CommonGameTag' = 1077
FUNC_STEREO: 'CommonGameTag' = 516
FUNC_STEREO_PUBLIC: 'CommonGameTag' = 2135
FUNC_STICKER: 'CommonGameTag' = 1152
FUNC_STONE: 'CommonGameTag' = 1089
FUNC_STOOL: 'CommonGameTag' = 1008
FUNC_STORE: 'CommonGameTag' = 12424
FUNC_STRATEGY: 'CommonGameTag' = 487
FUNC_STRIPED: 'CommonGameTag' = 1388
FUNC_STUFFED: 'CommonGameTag' = 504
FUNC_STUFFED_ANIMAL: 'CommonGameTag' = 1020
FUNC_STUMP: 'CommonGameTag' = 1308
FUNC_STYLEBOARD: 'CommonGameTag' = 2130
FUNC_SUGAR_SKULL: 'CommonGameTag' = 1567
FUNC_SUNFLOWER: 'CommonGameTag' = 1398
FUNC_SUPPLIES: 'CommonGameTag' = 1294
FUNC_SWIM: 'CommonGameTag' = 1231
FUNC_SWIMMING_POOL: 'CommonGameTag' = 1232
FUNC_SWING_SET: 'CommonGameTag' = 2125
FUNC_SWING_SET_BG: 'CommonGameTag' = 2120
FUNC_SWIPE_BASIC: 'CommonGameTag' = 2136
FUNC_SWIPE_HIGH_SKILL: 'CommonGameTag' = 2138
FUNC_SWIPE_HOUSEHOLD_INVENTORY_BASIC: 'CommonGameTag' = 2139
FUNC_SWIPE_HOUSEHOLD_INVENTORY_HIGH_SKILL: 'CommonGameTag' = 2141
FUNC_SWIPE_HOUSEHOLD_INVENTORY_MED_SKILL: 'CommonGameTag' = 2140
FUNC_SWIPE_MED_SKILL: 'CommonGameTag' = 2137
FUNC_SYNC_SHOE_REMOVAL_RULE: 'CommonGameTag' = 69667
FUNC_SERUMS: 'CommonGameTag' = 12430
FUNC_SYSTEM: 'CommonGameTag' = 518
FUNC_TABLE: 'CommonGameTag' = 486
FUNC_TABLE_LOW: 'CommonGameTag' = 2507
FUNC_TABLE_CLOTH: 'CommonGameTag' = 1335
FUNC_TABLE_DINING_BAR: 'CommonGameTag' = 1538
FUNC_TABLE_DINING_UMBRELLA: 'CommonGameTag' = 1547
FUNC_TABLET: 'CommonGameTag' = 1108
FUNC_TANK: 'CommonGameTag' = 1433
FUNC_TARP: 'CommonGameTag' = 1289
FUNC_TEA: 'CommonGameTag' = 577
FUNC_TECH_GURU: 'CommonGameTag' = 1133
FUNC_TEDDY: 'CommonGameTag' = 1073
FUNC_TEDDY_BEAR: 'CommonGameTag' = 1074
FUNC_TELESCOPE: 'CommonGameTag' = 571
FUNC_TELEVISION: 'CommonGameTag' = 470
FUNC_TELLER: 'CommonGameTag' = 1181
FUNC_TEMP_CRAFT_SALES_TABLE_CREATED_OBJECTS: 'CommonGameTag' = 55370
FUNC_TEMP_CRAFT_SALES_TABLE_CREATED_OBJECTS_BG: 'CommonGameTag' = 2040
FUNC_TEMPERATURE_COOLER: 'CommonGameTag' = 2060
FUNC_TEMPERATURE_HEATER: 'CommonGameTag' = 2059
FUNC_TEMPLE_CHEST: 'CommonGameTag' = 45091
FUNC_TEMPLE_GATE: 'CommonGameTag' = 45057
FUNC_TEMPLE_TRAP: 'CommonGameTag' = 45058
FUNC_TENT: 'CommonGameTag' = 2478
FUNC_TERM_PRESENTATION_CLASS_A: 'CommonGameTag' = 65649
FUNC_TERM_PRESENTATION_CLASS_B: 'CommonGameTag' = 65650
FUNC_TERM_PRESENTATION_CLASS_C: 'CommonGameTag' = 65651
FUNC_TERM_PRESENTATION_CLASS_D: 'CommonGameTag' = 65652
FUNC_TERRACOTTA: 'CommonGameTag' = 1087
FUNC_TERRARIUM: 'CommonGameTag' = 77827
FUNC_THERMOSTAT: 'CommonGameTag' = 59456
FUNC_THROWING_MUD: 'CommonGameTag' = 59428
FUNC_THROWING_SNOWBALLS: 'CommonGameTag' = 2487
FUNC_THROWING_WATER_BALLOONS: 'CommonGameTag' = 59427
FUNC_TILE: 'CommonGameTag' = 1088
FUNC_TODDLER: 'CommonGameTag' = 1685
FUNC_TODDLER_BALL_PIT: 'CommonGameTag' = 73734
FUNC_TODDLER_BED: 'CommonGameTag' = 1658
FUNC_TODDLER_BOOKCASE: 'CommonGameTag' = 1666
FUNC_TODDLER_GYM_OBJECT_BALL_PIT: 'CommonGameTag' = 73731
FUNC_TODDLER_GYM_OBJECT_FULL: 'CommonGameTag' = 1727
FUNC_TODDLER_GYM_OBJECT_SLIDE: 'CommonGameTag' = 1726
FUNC_TODDLER_GYM_OBJECT_SLIDE_CLIMBER: 'CommonGameTag' = 73730
FUNC_TODDLER_GYM_OBJECT_TUNNELS: 'CommonGameTag' = 73732
FUNC_TODDLER_JUNGLE_GYM_OBJECT: 'CommonGameTag' = 73729
FUNC_TODDLER_SEATING: 'CommonGameTag' = 1676
FUNC_TODDLER_SLIDE: 'CommonGameTag' = 73733
FUNC_TODDLER_TOY_BOX: 'CommonGameTag' = 1665
FUNC_TOILET: 'CommonGameTag' = 1881
FUNC_TOILET_TALKING: 'CommonGameTag' = 55311
FUNC_TOMB: 'CommonGameTag' = 1202
FUNC_TOMBSTONE: 'CommonGameTag' = 1199
FUNC_TOWEL: 'CommonGameTag' = 1147
FUNC_TOY: 'CommonGameTag' = 505
FUNC_TOY_BOX: 'CommonGameTag' = 1018
FUNC_TOY_BOX_PURCHASE: 'CommonGameTag' = 1646
FUNC_TOY_BOX_TOYS_TO_CLEAN_UP: 'CommonGameTag' = 533
FUNC_TOY_ROBOT: 'CommonGameTag' = 65625
FUNC_TRASH: 'CommonGameTag' = 581
FUNC_TRASH_CAN: 'CommonGameTag' = 891
FUNC_TRASH_CAN_INDOOR: 'CommonGameTag' = 2349
FUNC_TRASH_CAN_OUTDOOR: 'CommonGameTag' = 892
FUNC_TRASH_PILE: 'CommonGameTag' = 568
FUNC_TRASH_PILE_COMPOSTABLE: 'CommonGameTag' = 2335
FUNC_TRASH_PILE_RECYCLABLE: 'CommonGameTag' = 2334
FUNC_TRASHCAN_HI_TECH: 'CommonGameTag' = 2443
FUNC_TREADMILL: 'CommonGameTag' = 478
FUNC_TREASURE: 'CommonGameTag' = 63510
FUNC_TREASURE_CHEST: 'CommonGameTag' = 45113
FUNC_TREE: 'CommonGameTag' = 1332
FUNC_TREND_CELEBRITY: 'CommonGameTag' = 61638
FUNC_TREND_PRODUCT_REVIEW_BEAUTY: 'CommonGameTag' = 61547
FUNC_TREND_PRODUCT_REVIEW_TECH: 'CommonGameTag' = 61548
FUNC_TREND_PRODUCT_REVIEW_TOY: 'CommonGameTag' = 61549
FUNC_TREND_SKILL_ACTING: 'CommonGameTag' = 61635
FUNC_TREND_SKILL_ARCHAEOLOGY: 'CommonGameTag' = 61501
FUNC_TREND_SKILL_BAKING: 'CommonGameTag' = 61502
FUNC_TREND_SKILL_BOWLING: 'CommonGameTag' = 61503
FUNC_TREND_SKILL_CHARISMA: 'CommonGameTag' = 61504
FUNC_TREND_SKILL_COMEDY: 'CommonGameTag' = 61505
FUNC_TREND_SKILL_COOKING_GOURMET: 'CommonGameTag' = 61506
FUNC_TREND_SKILL_COOKING_HOME_STYLE: 'CommonGameTag' = 61507
FUNC_TREND_SKILL_DANCING: 'CommonGameTag' = 61508
FUNC_TREND_SKILL_DJ_MIXING: 'CommonGameTag' = 61509
FUNC_TREND_SKILL_FISHING: 'CommonGameTag' = 61510
FUNC_TREND_SKILL_FITNESS: 'CommonGameTag' = 61511
FUNC_TREND_SKILL_FLOWER_ARRANGING: 'CommonGameTag' = 61512
FUNC_TREND_SKILL_GARDENING: 'CommonGameTag' = 61513
FUNC_TREND_SKILL_GUITAR: 'CommonGameTag' = 61514
FUNC_TREND_SKILL_HANDINESS: 'CommonGameTag' = 61515
FUNC_TREND_SKILL_HERBALISM: 'CommonGameTag' = 61516
FUNC_TREND_SKILL_JUICE_FIZZING: 'CommonGameTag' = 67619
FUNC_TREND_SKILL_KNIT: 'CommonGameTag' = 2460
FUNC_TREND_SKILL_KNITTING: 'CommonGameTag' = 83970
FUNC_TREND_SKILL_LOCAL_CULTURE: 'CommonGameTag' = 61517
FUNC_TREND_SKILL_LOGIC: 'CommonGameTag' = 61518
FUNC_TREND_SKILL_MEDIA_PRODUCTION: 'CommonGameTag' = 61630
FUNC_TREND_SKILL_MISCHIEF: 'CommonGameTag' = 61519
FUNC_TREND_SKILL_MIXOLOGY: 'CommonGameTag' = 61520
FUNC_TREND_SKILL_PAINTING: 'CommonGameTag' = 61521
FUNC_TREND_SKILL_PARENTING: 'CommonGameTag' = 61522
FUNC_TREND_SKILL_PET_TRAINING: 'CommonGameTag' = 61523
FUNC_TREND_SKILL_PHOTOGRAPHY: 'CommonGameTag' = 61524
FUNC_TREND_SKILL_PIANO: 'CommonGameTag' = 61525
FUNC_TREND_SKILL_PIPE_ORGAN: 'CommonGameTag' = 61526
FUNC_TREND_SKILL_PROGRAMMING: 'CommonGameTag' = 61527
FUNC_TREND_SKILL_ROBOTICS: 'CommonGameTag' = 65632
FUNC_TREND_SKILL_ROCKET_SCIENCE: 'CommonGameTag' = 61631
FUNC_TREND_SKILL_SINGING: 'CommonGameTag' = 61528
FUNC_TREND_SKILL_VAMPIRE_LORE: 'CommonGameTag' = 61529
FUNC_TREND_SKILL_VETERINARIAN: 'CommonGameTag' = 61530
FUNC_TREND_SKILL_VIDEO_GAMING: 'CommonGameTag' = 61531
FUNC_TREND_SKILL_VIOLIN: 'CommonGameTag' = 61532
FUNC_TREND_SKILL_WELLNESS: 'CommonGameTag' = 61533
FUNC_TREND_SKILL_WRITING: 'CommonGameTag' = 61534
FUNC_TREND_TIPS_BEAUTY: 'CommonGameTag' = 61545
FUNC_TREND_TIPS_FASHION: 'CommonGameTag' = 61546
FUNC_TREND_TODDLER_CHILD: 'CommonGameTag' = 61550
FUNC_TREND_TRAVEL: 'CommonGameTag' = 61551
FUNC_TREND_VLOG_ANGRY: 'CommonGameTag' = 61535
FUNC_TREND_VLOG_CONFIDENT: 'CommonGameTag' = 61536
FUNC_TREND_VLOG_DAZED: 'CommonGameTag' = 61537
FUNC_TREND_VLOG_EMBARRASSED: 'CommonGameTag' = 61538
FUNC_TREND_VLOG_ENERGIZED: 'CommonGameTag' = 61539
FUNC_TREND_VLOG_FLIRTY: 'CommonGameTag' = 61540
FUNC_TREND_VLOG_FOCUSED: 'CommonGameTag' = 61610
FUNC_TREND_VLOG_HAPPY: 'CommonGameTag' = 61541
FUNC_TREND_VLOG_INSPIRED: 'CommonGameTag' = 61542
FUNC_TREND_VLOG_PLAYFUL: 'CommonGameTag' = 61543
FUNC_TREND_VLOG_SAD: 'CommonGameTag' = 61544
FUNC_TRIANGLE: 'CommonGameTag' = 1424
FUNC_TRIM: 'CommonGameTag' = 1135
FUNC_TRUNK: 'CommonGameTag' = 1292
FUNC_TURTLE: 'CommonGameTag' = 1241
FUNC_TV: 'CommonGameTag' = 471
FUNC_TV_STAND_SEARCH: 'CommonGameTag' = 2243
FUNC_TWIST: 'CommonGameTag' = 8215
FUNC_UMBRELLA: 'CommonGameTag' = 59430
FUNC_UMBRELLA_ADULT: 'CommonGameTag' = 59443
FUNC_UMBRELLA_CHILD: 'CommonGameTag' = 59444
FUNC_UMBRELLA_RACK: 'CommonGameTag' = 59441
FUNC_UMBRELLA_TABLE: 'CommonGameTag' = 1553
FUNC_UMBRELLA_USER: 'CommonGameTag' = 2118
FUNC_UNBREAKABLE_OBJECT: 'CommonGameTag' = 1172
FUNC_UNICORN: 'CommonGameTag' = 507
FUNC_UNIVERSITY_HOUSING_BED: 'CommonGameTag' = 65626
FUNC_UNIVERSITY_KIOSK_ACADEMIC: 'CommonGameTag' = 65575
FUNC_UNIVERSITY_KIOSK_DECO_SURFACE: 'CommonGameTag' = 65574
FUNC_UNIVERSITY_KIOSK_DECO_WALL: 'CommonGameTag' = 65573
FUNC_UNIVERSITY_KIOSK_DECO_WALL_ST: 'CommonGameTag' = 65615
FUNC_UNIVERSITY_KIOSK_ITEM: 'CommonGameTag' = 65564
FUNC_UNIVERSITY_KIOSK_ITEM_ST: 'CommonGameTag' = 65614
FUNC_UNIVERSITY_TEXT_BOOK: 'CommonGameTag' = 2235
FUNC_UNUSED_USE_ME: 'CommonGameTag' = 2175
FUNC_UNUSED_USE_ME_2: 'CommonGameTag' = 2228
FUNC_URN: 'CommonGameTag' = 1076
FUNC_URNSTONE: 'CommonGameTag' = 814
FUNC_VALENTINES_DAY: 'CommonGameTag' = 1370
FUNC_VAMPIRE_TOME: 'CommonGameTag' = 40961
FUNC_VAMPIRE_TOME_SET1: 'CommonGameTag' = 40974
FUNC_VAMPIRE_TOME_SET2: 'CommonGameTag' = 40975
FUNC_VAMPIRE_TOME_SET3: 'CommonGameTag' = 40976
FUNC_VAMPIRE_TOME_ULTIMATE: 'CommonGameTag' = 40977
FUNC_VANITY_TABLE: 'CommonGameTag' = 36866
FUNC_VASE: 'CommonGameTag' = 1145
FUNC_VAULT_DOOR: 'CommonGameTag' = 61472
FUNC_VAULT_SAFE: 'CommonGameTag' = 61471
FUNC_VEHICLE: 'CommonGameTag' = 2226
FUNC_VEHICLE_BIKE: 'CommonGameTag' = 2227
FUNC_VEHICLE_LAND: 'CommonGameTag' = 2231
FUNC_VEHICLE_WATER: 'CommonGameTag' = 2232
FUNC_VENDING_MACHINE_COLD_DRINK_AND_SNACK_ENERGY_EP10: 'CommonGameTag' = 69672
FUNC_VENDING_MACHINE_COLD_DRINK_AND_SNACK_FOOD_EP10: 'CommonGameTag' = 69671
FUNC_VENDING_MACHINE_COLD_DRINK_AND_SNACK_FRUIT_EP10: 'CommonGameTag' = 69673
FUNC_VENDING_MACHINE_HOT_FOOD_AND_DRINK_ENERGY_EP10: 'CommonGameTag' = 69670
FUNC_VENDING_MACHINE_HOT_FOOD_AND_DRINK_FOOD_EP10: 'CommonGameTag' = 69669
FUNC_VENUE_NOT_DESTROYABLE_BY_CLEAN_UP: 'CommonGameTag' = 2013
FUNC_VENUE_NOT_UNBROKEN_BY_CLEAN_UP: 'CommonGameTag' = 2509
FUNC_VERTICAL_GARDEN: 'CommonGameTag' = 67618
FUNC_VET: 'CommonGameTag' = 57378
FUNC_VET_EXAM_TABLE: 'CommonGameTag' = 57375
FUNC_VET_MEDICINE_STATION: 'CommonGameTag' = 57428
FUNC_VET_PODIUM: 'CommonGameTag' = 57374
FUNC_VET_SURGERY_STATION: 'CommonGameTag' = 57390
FUNC_VET_VENDING_MACHINE: 'CommonGameTag' = 57430
FUNC_VFX_MACHINE_CONTROL_DESK: 'CommonGameTag' = 61479
FUNC_VFX_MACHINE_EMITTER: 'CommonGameTag' = 61468
FUNC_VIDEO_GAME: 'CommonGameTag' = 1644
FUNC_VIDEO_GAME_CONSOLE_DISPLAY: 'CommonGameTag' = 55368
FUNC_VIDEO_GAMING: 'CommonGameTag' = 24596
FUNC_VIDEO_RECORDING: 'CommonGameTag' = 61474
FUNC_VIDEO_RECORDING_BG: 'CommonGameTag' = 2189
FUNC_VIDEO_STATION: 'CommonGameTag' = 61473
FUNC_VIDEOGAME: 'CommonGameTag' = 479
FUNC_VILLAIN: 'CommonGameTag' = 1128
FUNC_VIOLIN: 'CommonGameTag' = 569
FUNC_VIOLIN_ADULT: 'CommonGameTag' = 1635
FUNC_VIP_ROPE: 'CommonGameTag' = 61477
FUNC_VOCAL: 'CommonGameTag' = 490
FUNC_VOODOO: 'CommonGameTag' = 582
FUNC_WAINSCOTING: 'CommonGameTag' = 1085
FUNC_WAITER_STATION: 'CommonGameTag' = 26626
FUNC_WALL_LAMP: 'CommonGameTag' = 1112
FUNC_WALL_TEST_LO_S: 'CommonGameTag' = 2029
FUNC_WANDS: 'CommonGameTag' = 49173
FUNC_WARDROBE_PEDESTAL: 'CommonGameTag' = 61441
FUNC_WARMING_RACK: 'CommonGameTag' = 12375
FUNC_WATER_SCOOTER: 'CommonGameTag' = 63490
FUNC_WATER_SCOOTER_BEACH_VENUE: 'CommonGameTag' = 2197
FUNC_WAX_BLOCK: 'CommonGameTag' = 67630
FUNC_WEB: 'CommonGameTag' = 1191
FUNC_WELLNESS: 'CommonGameTag' = 18453
FUNC_WEREWOLF: 'CommonGameTag' = 1215
FUNC_WFS: 'CommonGameTag' = 61480
FUNC_WFS_PRE_MADE_CELEBRITY: 'CommonGameTag' = 61612
FUNC_WHIRLPOOL_TUB: 'CommonGameTag' = 882
FUNC_WILDERNESS: 'CommonGameTag' = 1279
FUNC_WILDLIFE_ENCOUNTER_DETERRENT: 'CommonGameTag' = 69665
FUNC_WILDLIFE_ENCOUNTER_REMEDY: 'CommonGameTag' = 69666
FUNC_WIND_CHIMES: 'CommonGameTag' = 34819
FUNC_WIND_TURBINE: 'CommonGameTag' = 67614
FUNC_WIND_TURBINE_UPGRADED_LIGHTNING_ROD: 'CommonGameTag' = 2437
FUNC_WISHING_WELL: 'CommonGameTag' = 30722
FUNC_WITCH: 'CommonGameTag' = 1218
FUNC_WOOD: 'CommonGameTag' = 1319
FUNC_WOODWORKING: 'CommonGameTag' = 1462
FUNC_WORKBENCH: 'CommonGameTag' = 493
FUNC_WORKOUT: 'CommonGameTag' = 472
FUNC_WORKOUT_MACHINE: 'CommonGameTag' = 1324
FUNC_WRITER: 'CommonGameTag' = 1117
FUNC_WRITING: 'CommonGameTag' = 1106
FUNC_XMAS: 'CommonGameTag' = 1331
FUNC_YARN_BASKET: 'CommonGameTag' = 83972
FUNC_YARNY: 'CommonGameTag' = 83971
FUNC_YARNY_STATUE: 'CommonGameTag' = 83991
FUNC_YOGA: 'CommonGameTag' = 18458
FUNC_YOGA_CLASS_INSTRUCTOR_MAT: 'CommonGameTag' = 18447
FUNC_YOGA_CLASS_MEMBER_MAT: 'CommonGameTag' = 18448
FUNC_YOGA_CLASS_MEMBER_TEMP_MAT: 'CommonGameTag' = 18449
FUNC_YOGA_MAT: 'CommonGameTag' = 18433
FUR_CHOW: 'CommonGameTag' = 57356
FUR_COLLIE: 'CommonGameTag' = 57364
FUR_LENGTH_HAIRLESS: 'CommonGameTag' = 2018
FUR_LENGTH_LONG_HAIR: 'CommonGameTag' = 2017
FUR_LENGTH_SHORT_HAIR: 'CommonGameTag' = 2016
FUR_MEDIUM_SMOOTH: 'CommonGameTag' = 57357
FUR_MEDIUM_WIRY: 'CommonGameTag' = 57366
FUR_POODLE: 'CommonGameTag' = 57358
FUR_RETRIEVER: 'CommonGameTag' = 57359
FUR_SPANIEL: 'CommonGameTag' = 57365
GENDER_APPROPRIATE_FEMALE: 'CommonGameTag' = 1530
GENDER_APPROPRIATE_MALE: 'CommonGameTag' = 1529
GENRE_ACTIVITY_TABLE_DINO: 'CommonGameTag' = 877
GENRE_ACTIVITY_TABLE_FAMILY: 'CommonGameTag' = 878
GENRE_ACTIVITY_TABLE_HORSE: 'CommonGameTag' = 879
GENRE_ACTIVITY_TABLE_SHAPES: 'CommonGameTag' = 880
GENRE_ACTIVITY_TABLE_TRUCK: 'CommonGameTag' = 881
GENRE_BOOK_BIOGRAPHY: 'CommonGameTag' = 768
GENRE_BOOK_CHILDRENS: 'CommonGameTag' = 769
GENRE_BOOK_EMOTION_CONFIDENT: 'CommonGameTag' = 790
GENRE_BOOK_EMOTION_ENERGIZED: 'CommonGameTag' = 791
GENRE_BOOK_EMOTION_FLIRTY: 'CommonGameTag' = 792
GENRE_BOOK_EMOTION_FOCUSED: 'CommonGameTag' = 1038
GENRE_BOOK_EMOTION_INSPIRED: 'CommonGameTag' = 1039
GENRE_BOOK_EMOTION_PLAYFUL: 'CommonGameTag' = 793
GENRE_BOOK_EMOTION_SAD: 'CommonGameTag' = 794
GENRE_BOOK_EMOTIONAL: 'CommonGameTag' = 980
GENRE_BOOK_FANTASY: 'CommonGameTag' = 770
GENRE_BOOK_MAGIC: 'CommonGameTag' = 2224
GENRE_BOOK_MYSTERY_THRILLER: 'CommonGameTag' = 866
GENRE_BOOK_NON_FICTION: 'CommonGameTag' = 771
GENRE_BOOK_POEMS: 'CommonGameTag' = 772
GENRE_BOOK_ROMANCE: 'CommonGameTag' = 773
GENRE_BOOK_SCI_FI: 'CommonGameTag' = 774
GENRE_BOOK_SCREEN_PLAY: 'CommonGameTag' = 775
GENRE_BOOK_SHORT_STORIES: 'CommonGameTag' = 776
GENRE_BOOK_SKILL: 'CommonGameTag' = 1032
GENRE_BOOK_SKILL_ACTING: 'CommonGameTag' = 61493
GENRE_BOOK_SKILL_ARCHAEOLOGY: 'CommonGameTag' = 45069
GENRE_BOOK_SKILL_BARTENDING: 'CommonGameTag' = 797
GENRE_BOOK_SKILL_CHARISMA: 'CommonGameTag' = 798
GENRE_BOOK_SKILL_COMEDY: 'CommonGameTag' = 799
GENRE_BOOK_SKILL_COOKING: 'CommonGameTag' = 800
GENRE_BOOK_SKILL_FABRICATION: 'CommonGameTag' = 67621
GENRE_BOOK_SKILL_FISHING: 'CommonGameTag' = 921
GENRE_BOOK_SKILL_FITNESS: 'CommonGameTag' = 810
GENRE_BOOK_SKILL_GARDENING: 'CommonGameTag' = 801
GENRE_BOOK_SKILL_GOURMET: 'CommonGameTag' = 802
GENRE_BOOK_SKILL_GUITAR: 'CommonGameTag' = 803
GENRE_BOOK_SKILL_HACKING: 'CommonGameTag' = 804
GENRE_BOOK_SKILL_HANDINESS: 'CommonGameTag' = 805
GENRE_BOOK_SKILL_HERBALISM: 'CommonGameTag' = 10256
GENRE_BOOK_SKILL_LOGIC: 'CommonGameTag' = 806
GENRE_BOOK_SKILL_MISCHIEF: 'CommonGameTag' = 807
GENRE_BOOK_SKILL_PAINTING: 'CommonGameTag' = 808
GENRE_BOOK_SKILL_PARENTING: 'CommonGameTag' = 43012
GENRE_BOOK_SKILL_PIANO: 'CommonGameTag' = 809
GENRE_BOOK_SKILL_RESEARCH_DEBATE: 'CommonGameTag' = 2246
GENRE_BOOK_SKILL_ROBOTICS: 'CommonGameTag' = 65623
GENRE_BOOK_SKILL_ROCKET_SCIENCE: 'CommonGameTag' = 811
GENRE_BOOK_SKILL_VIDEO_GAMING: 'CommonGameTag' = 812
GENRE_BOOK_SKILL_VIOLIN: 'CommonGameTag' = 813
GENRE_BOOK_SKILL_WOO_HOO: 'CommonGameTag' = 865
GENRE_BOOK_SKILL_WRITING: 'CommonGameTag' = 818
GENRE_BOOK_SUPERNATURAL: 'CommonGameTag' = 819
GENRE_BOOK_TODDLER_PICTURE_BOOK: 'CommonGameTag' = 1656
GENRE_BOOK_TRAVEL_GUIDE: 'CommonGameTag' = 45071
GENRE_PAINTING_ABSTRACT: 'CommonGameTag' = 667
GENRE_PAINTING_CLASSICS: 'CommonGameTag' = 669
GENRE_PAINTING_IMPRESSIONISM: 'CommonGameTag' = 670
GENRE_PAINTING_LANDSCAPE: 'CommonGameTag' = 10260
GENRE_PAINTING_MATHEMATICS: 'CommonGameTag' = 671
GENRE_PAINTING_POP_ART: 'CommonGameTag' = 672
GENRE_PAINTING_REALISM: 'CommonGameTag' = 673
GENRE_PAINTING_SURREALISM: 'CommonGameTag' = 674
GP09: 'CommonGameTag' = 51270
GROUP_PHOTO_X_ACTOR: 'CommonGameTag' = 1436
GROUP_PHOTO_Y_ACTOR: 'CommonGameTag' = 1437
GROUP_PHOTO_Z_ACTOR: 'CommonGameTag' = 2217
HAIR_COLOR_AUBURN: 'CommonGameTag' = 896
HAIR_COLOR_BLACK: 'CommonGameTag' = 131
HAIR_COLOR_BLACK_SALT_AND_PEPPER: 'CommonGameTag' = 897
HAIR_COLOR_BLONDE: 'CommonGameTag' = 94
HAIR_COLOR_BROWN: 'CommonGameTag' = 132
HAIR_COLOR_BROWN_SALT_AND_PEPPER: 'CommonGameTag' = 898
HAIR_COLOR_DARK_BLUE: 'CommonGameTag' = 899
HAIR_COLOR_DARK_BROWN: 'CommonGameTag' = 133
HAIR_COLOR_DIRTY_BLOND: 'CommonGameTag' = 900
HAIR_COLOR_GRAY: 'CommonGameTag' = 134
HAIR_COLOR_GREEN: 'CommonGameTag' = 901
HAIR_COLOR_HOT_PINK: 'CommonGameTag' = 902
HAIR_COLOR_ORANGE: 'CommonGameTag' = 135
HAIR_COLOR_PLATINUM: 'CommonGameTag' = 96
HAIR_COLOR_PURPLE_PASTEL: 'CommonGameTag' = 903
HAIR_COLOR_RED: 'CommonGameTag' = 136
HAIR_COLOR_TURQUOISE: 'CommonGameTag' = 904
HAIR_COLOR_WHITE: 'CommonGameTag' = 905
HAIR_CURLY: 'CommonGameTag' = 314
HAIR_LENGTH_LONG: 'CommonGameTag' = 664
HAIR_LENGTH_MEDIUM: 'CommonGameTag' = 820
HAIR_LENGTH_SHORT: 'CommonGameTag' = 662
HAIR_LENGTH_UPDO: 'CommonGameTag' = 2173
HAIR_LONG: 'CommonGameTag' = 151
HAIR_MEDIUM: 'CommonGameTag' = 150
HAIR_SHORT: 'CommonGameTag' = 149
HAIR_STRAIGHT: 'CommonGameTag' = 313
HAIR_TEXTURE_BALD: 'CommonGameTag' = 12391
HAIR_TEXTURE_CURLY: 'CommonGameTag' = 821
HAIR_TEXTURE_STRAIGHT: 'CommonGameTag' = 822
HAIR_TEXTURE_WAVY: 'CommonGameTag' = 663
HAIR_WAVY: 'CommonGameTag' = 315
HAT_BRIM: 'CommonGameTag' = 371
HAT_BRIMLESS: 'CommonGameTag' = 372
HAT_CAP: 'CommonGameTag' = 373
HAT_PAPER_BAG: 'CommonGameTag' = 2428
HOUSEHOLD_MEMBER_1: 'CommonGameTag' = 642
HOUSEHOLD_MEMBER_2: 'CommonGameTag' = 643
HOUSEHOLD_MEMBER_3: 'CommonGameTag' = 644
HOUSEHOLD_MEMBER_4: 'CommonGameTag' = 645
HOUSEHOLD_MEMBER_5: 'CommonGameTag' = 646
HOUSEHOLD_MEMBER_6: 'CommonGameTag' = 647
HOUSEHOLD_MEMBER_7: 'CommonGameTag' = 648
HOUSEHOLD_MEMBER_8: 'CommonGameTag' = 649
INSTRUMENT_VIOLIN: 'CommonGameTag' = 401
INTERACTION_ADOPTION: 'CommonGameTag' = 57441
INTERACTION_ADVENTUROUS_ONE_SHOT: 'CommonGameTag' = 69723
INTERACTION_ALL: 'CommonGameTag' = 462
INTERACTION_ARGUMENT: 'CommonGameTag' = 43015
INTERACTION_ASK_TO_LEAVE_LOT: 'CommonGameTag' = 689
INTERACTION_BAR_VENUE: 'CommonGameTag' = 1599
INTERACTION_BASKETBALL_PLAY: 'CommonGameTag' = 2127
INTERACTION_BATHTUB: 'CommonGameTag' = 2348
INTERACTION_BATUU_IGNORE_REPUTATION: 'CommonGameTag' = 51246
INTERACTION_BE_READ_TO: 'CommonGameTag' = 863
INTERACTION_BONFIRE: 'CommonGameTag' = 24590
INTERACTION_BROWSE_RESEARCH: 'CommonGameTag' = 757
INTERACTION_CAMPFIRE: 'CommonGameTag' = 10262
INTERACTION_CAREER_WORK_RABBIT_HOLE: 'CommonGameTag' = 2490
INTERACTION_CHARITY: 'CommonGameTag' = 750
INTERACTION_CHAT: 'CommonGameTag' = 342
INTERACTION_CLEAN: 'CommonGameTag' = 781
INTERACTION_CLIMBING_ROUTE: 'CommonGameTag' = 69691
INTERACTION_COLLECT: 'CommonGameTag' = 1309
INTERACTION_COMEDY_MIC: 'CommonGameTag' = 1613
INTERACTION_COMPUTER: 'CommonGameTag' = 439
INTERACTION_COMPUTER_TYPING: 'CommonGameTag' = 1367
INTERACTION_CONSUME: 'CommonGameTag' = 394
INTERACTION_COOK: 'CommonGameTag' = 358
INTERACTION_CURIO_SHOP_BROWSE_BUY: 'CommonGameTag' = 47134
INTERACTION_DEATH: 'CommonGameTag' = 425
INTERACTION_DOCTOR_TREAT_PATIENT: 'CommonGameTag' = 12337
INTERACTION_DRINK: 'CommonGameTag' = 654
INTERACTION_ECO_FOOTPRINT_GREEN: 'CommonGameTag' = 67603
INTERACTION_EXAM_TABLE_EXAM: 'CommonGameTag' = 57391
INTERACTION_EXTREME_SPORTS: 'CommonGameTag' = 69727
INTERACTION_FASHION_BLOG: 'CommonGameTag' = 2131
INTERACTION_FESTIVE: 'CommonGameTag' = 2058
INTERACTION_FOOSBALL_TABLE_PLAY: 'CommonGameTag' = 24581
INTERACTION_FRIENDLY: 'CommonGameTag' = 431
INTERACTION_FUNNY: 'CommonGameTag' = 432
INTERACTION_GAME_CONSOLE: 'CommonGameTag' = 55384
INTERACTION_GO_JOGGING: 'CommonGameTag' = 926
INTERACTION_GREEN_UPGRADED: 'CommonGameTag' = 67589
INTERACTION_GREETING: 'CommonGameTag' = 453
INTERACTION_GROUP_DANCE_TOGETHER: 'CommonGameTag' = 24607
INTERACTION_GROUP_WORKOUT: 'CommonGameTag' = 71683
INTERACTION_HACK: 'CommonGameTag' = 435
INTERACTION_HUG: 'CommonGameTag' = 1990
INTERACTION_IGNORE_GROUNDING: 'CommonGameTag' = 43028
INTERACTION_INFECT_HOUSE: 'CommonGameTag' = 47125
INTERACTION_INSTRUMENT_LISTEN: 'CommonGameTag' = 639
INTERACTION_INTELLIGENCE_RESEARCH: 'CommonGameTag' = 746
INTERACTION_INVENTION_CONSTRUCTOR_UPGRADE: 'CommonGameTag' = 12368
INTERACTION_INVITE_TO_STAY: 'CommonGameTag' = 417
INTERACTION_JOKE: 'CommonGameTag' = 871
INTERACTION_JUICE_KEG: 'CommonGameTag' = 2347
INTERACTION_KARAOKE_VENUE: 'CommonGameTag' = 1600
INTERACTION_KISS: 'CommonGameTag' = 350
INTERACTION_KNITTING: 'CommonGameTag' = 83984
INTERACTION_LAUNDRY_GENERATE_NO_PILE: 'CommonGameTag' = 2035
INTERACTION_LAUNDRY_PUT_AWAY_FINISHED_LAUNDRY: 'CommonGameTag' = 2034
INTERACTION_LEAVE: 'CommonGameTag' = 420
INTERACTION_LEAVE_MUST_RUN: 'CommonGameTag' = 419
INTERACTION_LIFESTYLES_ADRENALINE_SEEKER_DISCOURAGE_AUTONOMY: 'CommonGameTag' = 69730
INTERACTION_LIFESTYLES_ADRENALINE_SEEKER_FLEXIBLE_LENGTH: 'CommonGameTag' = 69655
INTERACTION_LIFESTYLES_ADRENALINE_SEEKER_MUNDANE: 'CommonGameTag' = 69712
INTERACTION_LIFESTYLES_ADRENALINE_SEEKER_ONE_SHOT: 'CommonGameTag' = 69656
INTERACTION_LIFESTYLES_ELECTRONICS: 'CommonGameTag' = 69651
INTERACTION_LIFESTYLES_ELECTRONICS_REPAIR: 'CommonGameTag' = 69652
INTERACTION_LIFESTYLES_ENERGETIC_FLEXIBLE_LENGTH: 'CommonGameTag' = 69634
INTERACTION_LIFESTYLES_ENERGETIC_ONE_SHOT: 'CommonGameTag' = 69690
INTERACTION_LIFESTYLES_ENERGETIC_AUTONOMY: 'CommonGameTag' = 69737
INTERACTION_LIFESTYLES_FREQUENT_TRAVELER_FLEXIBLE_LENGTH: 'CommonGameTag' = 69636
INTERACTION_LIFESTYLES_FREQUENT_TRAVELER_ONE_SHOT: 'CommonGameTag' = 69635
INTERACTION_LIFESTYLES_INDOORSY_FLEXIBLE_LENGTH: 'CommonGameTag' = 69657
INTERACTION_LIFESTYLES_INDOORSY_ONE_SHOT: 'CommonGameTag' = 69658
INTERACTION_LIFESTYLES_INDOORSY_AUTONOMY: 'CommonGameTag' = 69731
INTERACTION_LIFESTYLES_OUTDOORSY_FLEXIBLE_LENGTH: 'CommonGameTag' = 69659
INTERACTION_LIFESTYLES_OUTDOORSY_ONE_SHOT: 'CommonGameTag' = 69660
INTERACTION_LIFESTYLES_OUTDOORSY_AUTONOMY: 'CommonGameTag' = 69734
INTERACTION_LIFESTYLES_ROMANTIC_MEDIA: 'CommonGameTag' = 69713
INTERACTION_LIFESTYLES_SEDENTARY_FLEXIBLE_LENGTH: 'CommonGameTag' = 69633
INTERACTION_LIFESTYLES_SEDENTARY_ONE_SHOT: 'CommonGameTag' = 69689
INTERACTION_LIFESTYLES_SEDENTARY_AUTONOMY: 'CommonGameTag' = 69736
INTERACTION_LIFESTYLES_TECH_CAREER: 'CommonGameTag' = 69663
INTERACTION_LIFESTYLES_TECHIE_FLEXIBLE_LENGTH: 'CommonGameTag' = 69638
INTERACTION_LIFESTYLES_TECHIE_ONE_SHOT: 'CommonGameTag' = 69639
INTERACTION_LIFESTYLES_TECHIE_AUTONOMY: 'CommonGameTag' = 69735
INTERACTION_LIFESTYLES_TECHNOPHOBE_FLEXIBLE_LENGTH: 'CommonGameTag' = 69641
INTERACTION_LIFESTYLES_TECHNOPHOBE_ONE_SHOT: 'CommonGameTag' = 69640
INTERACTION_LIFESTYLES_TECHNOPHOBE_SABOTAGE: 'CommonGameTag' = 69704
INTERACTION_LISTEN_MUSIC: 'CommonGameTag' = 444
INTERACTION_MAKE_APP: 'CommonGameTag' = 683
INTERACTION_MAKE_COFFEE_OR_TEA: 'CommonGameTag' = 1028
INTERACTION_MARKET_STALL_TEND: 'CommonGameTag' = 55400
INTERACTION_MARKET_STALLS_TEND: 'CommonGameTag' = 1934
INTERACTION_MASSAGE_TABLE: 'CommonGameTag' = 18439
INTERACTION_MEAN: 'CommonGameTag' = 433
INTERACTION_MENTOR: 'CommonGameTag' = 455
INTERACTION_MENTOR_MUSIC: 'CommonGameTag' = 695
INTERACTION_MISCHIEVOUS: 'CommonGameTag' = 434
INTERACTION_MIXER: 'CommonGameTag' = 461
INTERACTION_NAP: 'CommonGameTag' = 591
INTERACTION_NESTING_BLOCKS: 'CommonGameTag' = 1698
INTERACTION_NOISY_ELECTRONICS: 'CommonGameTag' = 1628
INTERACTION_OBSERVATORY: 'CommonGameTag' = 1598
INTERACTION_OLD_DAY_FINE: 'CommonGameTag' = 67638
INTERACTION_PAINT: 'CommonGameTag' = 694
INTERACTION_PAINT_BY_REFERENCE: 'CommonGameTag' = 1372
INTERACTION_PAINT_MURAL: 'CommonGameTag' = 55359
INTERACTION_PARK_VENUE: 'CommonGameTag' = 1601
INTERACTION_PARTY: 'CommonGameTag' = 2061
INTERACTION_PERFORM_COMEDY_ROUTINE: 'CommonGameTag' = 469
INTERACTION_PET_MISBEHAVIOR: 'CommonGameTag' = 57397
INTERACTION_PETS_FRIENDLY: 'CommonGameTag' = 57370
INTERACTION_PETS_GREETING: 'CommonGameTag' = 57372
INTERACTION_PETS_MEAN: 'CommonGameTag' = 57371
INTERACTION_PETS_SS3_ALLOWED: 'CommonGameTag' = 2015
INTERACTION_PHOTO_STUDIO_TAKE_PICTURE: 'CommonGameTag' = 1942
INTERACTION_PLAY_DJ_BOOTH: 'CommonGameTag' = 1618
INTERACTION_PLAY_GAME: 'CommonGameTag' = 640
INTERACTION_PLAY_GUITAR: 'CommonGameTag' = 1615
INTERACTION_PLAY_GUITAR_FOR_TIPS: 'CommonGameTag' = 1024
INTERACTION_PLAY_INSTRUMENT: 'CommonGameTag' = 442
INTERACTION_PLAY_INSTRUMENT_FOR_TIPS: 'CommonGameTag' = 443
INTERACTION_PLAY_INSTRUMENT_OR_COMEDY_FOR_TIPS: 'CommonGameTag' = 606
INTERACTION_PLAY_PIANO: 'CommonGameTag' = 690
INTERACTION_PLAY_PIANO_FOR_TIPS: 'CommonGameTag' = 1025
INTERACTION_PLAY_TOY: 'CommonGameTag' = 1339
INTERACTION_PLAY_VIDEO_GAMES: 'CommonGameTag' = 685
INTERACTION_PLAY_VIOLIN: 'CommonGameTag' = 1616
INTERACTION_PLAY_VIOLIN_FOR_TIPS: 'CommonGameTag' = 1026
INTERACTION_PLAY_WITH_CAT: 'CommonGameTag' = 57362
INTERACTION_PLAY_WITH_DOG: 'CommonGameTag' = 57363
INTERACTION_PRACTICE_ACTING: 'CommonGameTag' = 61552
INTERACTION_PRACTICE_CODING: 'CommonGameTag' = 693
INTERACTION_PRACTICE_DEBATE: 'CommonGameTag' = 65648
INTERACTION_PRACTICE_WRITING: 'CommonGameTag' = 692
INTERACTION_PRANK: 'CommonGameTag' = 583
INTERACTION_PRANK_OBJECT: 'CommonGameTag' = 752
INTERACTION_PROGRAMMING: 'CommonGameTag' = 751
INTERACTION_PUBLISH_BOOK: 'CommonGameTag' = 660
INTERACTION_READ_TO_CHILD: 'CommonGameTag' = 931
INTERACTION_REPAIR: 'CommonGameTag' = 464
INTERACTION_RESTAURANT_WAIT_TO_PLACE_ORDER: 'CommonGameTag' = 2151
INTERACTION_RETAIL: 'CommonGameTag' = 12347
INTERACTION_ROCKET: 'CommonGameTag' = 465
INTERACTION_ROCKET_SHIP_LAUNCH: 'CommonGameTag' = 438
INTERACTION_ROCKET_SHIP_UPGRADE: 'CommonGameTag' = 437
INTERACTION_RUN_AWAY: 'CommonGameTag' = 57443
INTERACTION_SCHOOL_WORK: 'CommonGameTag' = 43026
INTERACTION_SCIENCE_TABLE: 'CommonGameTag' = 786
INTERACTION_SEASON_FALL: 'CommonGameTag' = 59420
INTERACTION_SEASON_SPRING: 'CommonGameTag' = 59418
INTERACTION_SEASON_SUMMER: 'CommonGameTag' = 59419
INTERACTION_SEASON_WINTER: 'CommonGameTag' = 59421
INTERACTION_SELL_ART: 'CommonGameTag' = 661
INTERACTION_SHOWER: 'CommonGameTag' = 1447
INTERACTION_SHOWOFF: 'CommonGameTag' = 427
INTERACTION_SIM_TV: 'CommonGameTag' = 55362
INTERACTION_SITUATION_PHOTOGRAPHY: 'CommonGameTag' = 79876
INTERACTION_SKATING_ICE_SKATING: 'CommonGameTag' = 59395
INTERACTION_SKATING_ROLLER_SKATING: 'CommonGameTag' = 59396
INTERACTION_SKATING_ROUTINE: 'CommonGameTag' = 59397
INTERACTION_SKATING_SKATING: 'CommonGameTag' = 59394
INTERACTION_SKATING_TRICK: 'CommonGameTag' = 59401
INTERACTION_SKETCH: 'CommonGameTag' = 2132
INTERACTION_SKIING: 'CommonGameTag' = 69726
INTERACTION_SKILL_ACTING: 'CommonGameTag' = 2340
INTERACTION_SKILL_BAKING: 'CommonGameTag' = 2346
INTERACTION_SKILL_BARTENDING: 'CommonGameTag' = 835
INTERACTION_SKILL_CHARISMA: 'CommonGameTag' = 837
INTERACTION_SKILL_CHILD_CREATIVITY: 'CommonGameTag' = 853
INTERACTION_SKILL_CHILD_MENTAL: 'CommonGameTag' = 854
INTERACTION_SKILL_CHILD_MOTOR: 'CommonGameTag' = 855
INTERACTION_SKILL_CHILD_SOCIAL: 'CommonGameTag' = 856
INTERACTION_SKILL_COMEDY: 'CommonGameTag' = 838
INTERACTION_SKILL_DANCING: 'CommonGameTag' = 2343
INTERACTION_SKILL_DJ_MIXING: 'CommonGameTag' = 2342
INTERACTION_SKILL_DOG_TRAINING: 'CommonGameTag' = 57373
INTERACTION_SKILL_FABRICATION: 'CommonGameTag' = 2434
INTERACTION_SKILL_FISHING: 'CommonGameTag' = 839
INTERACTION_SKILL_FITNESS: 'CommonGameTag' = 836
INTERACTION_SKILL_FLOWER_ARRANGEMENT: 'CommonGameTag' = 2344
INTERACTION_SKILL_GARDENING: 'CommonGameTag' = 834
INTERACTION_SKILL_GOURMET_COOKING: 'CommonGameTag' = 840
INTERACTION_SKILL_GUITAR: 'CommonGameTag' = 841
INTERACTION_SKILL_HANDINESS: 'CommonGameTag' = 842
INTERACTION_SKILL_HERBALISM: 'CommonGameTag' = 2339
INTERACTION_SKILL_HOME_STYLE_COOKING: 'CommonGameTag' = 843
INTERACTION_SKILL_JUICE_FIZZING: 'CommonGameTag' = 2424
INTERACTION_SKILL_KNITTING: 'CommonGameTag' = 2461
INTERACTION_SKILL_LOGIC: 'CommonGameTag' = 844
INTERACTION_SKILL_MEDIA_PRODUCTION: 'CommonGameTag' = 2338
INTERACTION_SKILL_MISCHIEF: 'CommonGameTag' = 845
INTERACTION_SKILL_PAINTING: 'CommonGameTag' = 846
INTERACTION_SKILL_PHOTOGRAPHY: 'CommonGameTag' = 1938
INTERACTION_SKILL_PIANO: 'CommonGameTag' = 847
INTERACTION_SKILL_PIPE_ORGAN: 'CommonGameTag' = 2341
INTERACTION_SKILL_PROGRAMMING: 'CommonGameTag' = 848
INTERACTION_SKILL_ROBOTICS: 'CommonGameTag' = 2345
INTERACTION_SKILL_ROCKET_SCIENCE: 'CommonGameTag' = 849
INTERACTION_SKILL_SINGING: 'CommonGameTag' = 55364
INTERACTION_SKILL_SINGING_KARAOKE: 'CommonGameTag' = 1617
INTERACTION_SKILL_VIDEO_GAMING: 'CommonGameTag' = 850
INTERACTION_SKILL_VIOLIN: 'CommonGameTag' = 851
INTERACTION_SKILL_WELLNESS: 'CommonGameTag' = 18465
INTERACTION_SKILL_WELLNESS_BG: 'CommonGameTag' = 2337
INTERACTION_SKILL_WRITING: 'CommonGameTag' = 852
INTERACTION_SLEDDING: 'CommonGameTag' = 69725
INTERACTION_SLEEP: 'CommonGameTag' = 451
INTERACTION_SLEEP_GROUP: 'CommonGameTag' = 2094
INTERACTION_SLEEP_NAP: 'CommonGameTag' = 59477
INTERACTION_SNIFF_NEW_OBJECTS: 'CommonGameTag' = 2093
INTERACTION_SNOWBOARDING: 'CommonGameTag' = 69724
INTERACTION_SOCIAL_ALL: 'CommonGameTag' = 2161
INTERACTION_SOCIAL_CONTAGIOUS: 'CommonGameTag' = 2041
INTERACTION_SOCIAL_MEDIA_CHECK_IN: 'CommonGameTag' = 1619
INTERACTION_SOCIAL_MEDIA_PERSUADE_TO: 'CommonGameTag' = 55319
INTERACTION_SOCIAL_MIXER: 'CommonGameTag' = 2162
INTERACTION_SOCIAL_NETWORK: 'CommonGameTag' = 1595
INTERACTION_SOCIAL_SUPER: 'CommonGameTag' = 454
INTERACTION_SOCIAL_TOUCHING: 'CommonGameTag' = 2163
INTERACTION_SPRAY_GRAFFITI: 'CommonGameTag' = 55361
INTERACTION_STEREO_DANCE: 'CommonGameTag' = 876
INTERACTION_STEREO_LISTEN: 'CommonGameTag' = 638
INTERACTION_STUFFED_ANIMAL_BABBLE: 'CommonGameTag' = 1723
INTERACTION_SUPER: 'CommonGameTag' = 460
INTERACTION_SURGERY_STATION_EXAM: 'CommonGameTag' = 57392
INTERACTION_SWIM: 'CommonGameTag' = 1591
INTERACTION_TAKE_PHOTO: 'CommonGameTag' = 1939
INTERACTION_TAKE_PIZZA: 'CommonGameTag' = 1640
INTERACTION_TALK_LIKE_A_PIRATE_DAY: 'CommonGameTag' = 59439
INTERACTION_TEEN_CAREER_RABBIT_HOLE: 'CommonGameTag' = 1719
INTERACTION_TELESCOPE: 'CommonGameTag' = 436
INTERACTION_TELL_STORY: 'CommonGameTag' = 466
INTERACTION_TENT_SLEEP: 'CommonGameTag' = 2477
INTERACTION_THROWING: 'CommonGameTag' = 2488
INTERACTION_THROWING_MUD: 'CommonGameTag' = 59425
INTERACTION_THROWING_SNOWBALL: 'CommonGameTag' = 2489
INTERACTION_THROWING_WATER_BALLOON: 'CommonGameTag' = 59426
INTERACTION_TOURNAMENT: 'CommonGameTag' = 749
INTERACTION_TRANSFER_FIRELEAF_RASH: 'CommonGameTag' = 2479
INTERACTION_TREADMILL: 'CommonGameTag' = 353
INTERACTION_TRY_FOR_BABY: 'CommonGameTag' = 452
INTERACTION_UNIVERSITY_STUDY_WITH: 'CommonGameTag' = 65609
INTERACTION_UPGRADE: 'CommonGameTag' = 658
INTERACTION_USE_TOILET: 'CommonGameTag' = 396
INTERACTION_VIDEO_GAME_LIVESTREAM: 'CommonGameTag' = 1641
INTERACTION_VIDEO_GAME_MONEY: 'CommonGameTag' = 655
INTERACTION_VIDEO_GAME_STREAM_LETS_PLAY: 'CommonGameTag' = 1642
INTERACTION_VIEW_ART: 'CommonGameTag' = 758
INTERACTION_VISIT_LOT: 'CommonGameTag' = 449
INTERACTION_VOODOO: 'CommonGameTag' = 426
INTERACTION_WAIT_IN_LINE: 'CommonGameTag' = 2497
INTERACTION_WAITSTAFF_IDLE: 'CommonGameTag' = 26634
INTERACTION_WATCH_PERFORMER: 'CommonGameTag' = 1597
INTERACTION_WATCH_TV: 'CommonGameTag' = 450
INTERACTION_WATCH_TV_COOKING: 'CommonGameTag' = 55320
INTERACTION_WATCH_TV_ROM_COM_ACT: 'CommonGameTag' = 55321
INTERACTION_WEATHER_RAIN: 'CommonGameTag' = 59423
INTERACTION_WEATHER_SNOW: 'CommonGameTag' = 59422
INTERACTION_WOODWORKING: 'CommonGameTag' = 1612
INTERACTION_WORKOUT: 'CommonGameTag' = 463
INTERACTION_WORKOUT_MACHINE: 'CommonGameTag' = 354
INTERACTION_WORKOUT_PUSH_THE_LIMITS: 'CommonGameTag' = 1171
INTERACTION_WRITE: 'CommonGameTag' = 55360
INTERACTION_WRITE_ARTICLE: 'CommonGameTag' = 665
INTERACTION_WRITE_JOKES: 'CommonGameTag' = 696
INTERACTION_YOGA_CLASS_MEMBER: 'CommonGameTag' = 18461
INVENTORY_BOOKS_FUN: 'CommonGameTag' = 2350
INVENTORY_BOOKS_OTHER: 'CommonGameTag' = 2352
INVENTORY_BOOKS_SKILL: 'CommonGameTag' = 2351
INVENTORY_COLLECTIBLE_CREATURE: 'CommonGameTag' = 2353
INVENTORY_COLLECTIBLE_DECORATION: 'CommonGameTag' = 2354
INVENTORY_COLLECTIBLE_NATURAL: 'CommonGameTag' = 2355
INVENTORY_COLLECTIBLE_OTHER: 'CommonGameTag' = 2356
INVENTORY_CONSUMABLE_DRINK: 'CommonGameTag' = 2358
INVENTORY_CONSUMABLE_FOOD: 'CommonGameTag' = 2357
INVENTORY_CONSUMABLE_OTHER: 'CommonGameTag' = 2359
INVENTORY_GARDENING_OTHER: 'CommonGameTag' = 2360
INVENTORY_HOME_SKILL_DECORATION: 'CommonGameTag' = 2362
INVENTORY_HOME_SKILL_HOME: 'CommonGameTag' = 2363
INVENTORY_HOME_SKILL_LITTLE_ONES: 'CommonGameTag' = 2364
INVENTORY_HOME_SKILL_SKILL: 'CommonGameTag' = 2361
INVENTORY_PLOPSY_ALL: 'CommonGameTag' = 2459
INVENTORY_PLOPSY_LISTED: 'CommonGameTag' = 2457
INVENTORY_PLOPSY_PENDING_SALE: 'CommonGameTag' = 2458
INVENTORY_PLOPSY_UNAVAILABLE: 'CommonGameTag' = 83989
INVENTORY_SCRAPS_JUNK: 'CommonGameTag' = 2371
INVENTORY_SCRAPS_PARTS: 'CommonGameTag' = 2370
INVENTORY_SIM_CRAFTED_ARTWORK: 'CommonGameTag' = 2368
INVENTORY_SIM_CRAFTED_OTHER: 'CommonGameTag' = 2369
INVENTORY_SPECIAL_CAREER_ACTIVITY: 'CommonGameTag' = 2365
INVENTORY_SPECIAL_EDUCATION: 'CommonGameTag' = 2366
INVENTORY_SPECIAL_STORY: 'CommonGameTag' = 2367
JOB_BATUU_NPC: 'CommonGameTag' = 2512
JOB_RESTAURANT_DINER: 'CommonGameTag' = 2145
JOB_VENUE: 'CommonGameTag' = 1464
JOB_VET_PATIENT: 'CommonGameTag' = 57442
JOB_WALKBY: 'CommonGameTag' = 1463
LIFESTYLES_DANGEROUS_CAREER: 'CommonGameTag' = 69711
LIFESTYLES_HIGH_ENERGY_CAREER: 'CommonGameTag' = 69683
LIFESTYLES_INDOORSY_CAREER: 'CommonGameTag' = 69733
LIFESTYLES_LOW_ENERGY_CAREER: 'CommonGameTag' = 69684
LIFESTYLES_OUTDOORSY_CAREER: 'CommonGameTag' = 69721
MAILBOX: 'CommonGameTag' = 346
MAIN_PET_SOCIAL: 'CommonGameTag' = 57349
MENTOR_ACTIVITY_TABLE: 'CommonGameTag' = 588
MENTOR_EASEL: 'CommonGameTag' = 365
MENTOR_FITNESS: 'CommonGameTag' = 357
MENTOR_GUITAR: 'CommonGameTag' = 361
MENTOR_MURAL: 'CommonGameTag' = 55398
MENTOR_PIANO: 'CommonGameTag' = 362
MENTOR_REPAIR: 'CommonGameTag' = 765
MENTOR_TREADMILL: 'CommonGameTag' = 355
MENTOR_UPGRADE: 'CommonGameTag' = 766
MENTOR_VIOLIN: 'CommonGameTag' = 363
MENTOR_WOODWORKING_TABLE: 'CommonGameTag' = 764
MENTOR_WORKOUT_MACHINE: 'CommonGameTag' = 356
MICROSCOPE_SLIDE_CRYSTAL: 'CommonGameTag' = 344
MICROSCOPE_SLIDE_FOSSIL: 'CommonGameTag' = 343
MICROSCOPE_SLIDE_PLANT: 'CommonGameTag' = 345
MOOD_ANGRY: 'CommonGameTag' = 317
MOOD_BORED: 'CommonGameTag' = 318
MOOD_CONFIDENT: 'CommonGameTag' = 319
MOOD_CRANKY: 'CommonGameTag' = 320
MOOD_DEPRESSED: 'CommonGameTag' = 321
MOOD_DRUNK: 'CommonGameTag' = 322
MOOD_EMBARRASSED: 'CommonGameTag' = 323
MOOD_ENERGIZED: 'CommonGameTag' = 324
MOOD_FINE: 'CommonGameTag' = 331
MOOD_FLIRTY: 'CommonGameTag' = 325
MOOD_FOCUSED: 'CommonGameTag' = 326
MOOD_HAPPY: 'CommonGameTag' = 328
MOOD_IMAGINATIVE: 'CommonGameTag' = 329
MOOD_OPTIMISM: 'CommonGameTag' = 64
MOOD_PLAYFUL: 'CommonGameTag' = 332
MOOD_SAD: 'CommonGameTag' = 333
MOOD_SLOSHED: 'CommonGameTag' = 334
MOOD_TENSE: 'CommonGameTag' = 327
MOOD_UNCOMFORTABLE: 'CommonGameTag' = 330
NONE_EP03_PLEASE_REUSE_ME: 'CommonGameTag' = 24592
NOSE_COLOR_BLACK: 'CommonGameTag' = 1917
NOSE_COLOR_BLACK_PINK: 'CommonGameTag' = 1922
NOSE_COLOR_BROWN: 'CommonGameTag' = 1918
NOSE_COLOR_BROWN_PINK: 'CommonGameTag' = 1923
NOSE_COLOR_LIVER: 'CommonGameTag' = 1919
NOSE_COLOR_PINK: 'CommonGameTag' = 1920
NOSE_COLOR_TAN: 'CommonGameTag' = 1921
NUDE_PART_ALWAYS: 'CommonGameTag' = 1540
NUDE_PART_MALE_WITH_BREAST: 'CommonGameTag' = 1541
OBJECT_BAR: 'CommonGameTag' = 349
OBJECT_MURAL: 'CommonGameTag' = 55363
OCCULT_ALIEN: 'CommonGameTag' = 12319
OCCULT_HUMAN: 'CommonGameTag' = 1310
OCCULT_MERMAID: 'CommonGameTag' = 2208
OCCULT_VAMPIRE: 'CommonGameTag' = 1677
OCCULT_WITCH: 'CommonGameTag' = 2279
OUTFIT_ART_CRITIC_LEVEL10: 'CommonGameTag' = 55393
OUTFIT_ARTS_CRITIC: 'CommonGameTag' = 55301
OUTFIT_CATEGORY_ATHLETIC: 'CommonGameTag' = 80
OUTFIT_CATEGORY_BATHING: 'CommonGameTag' = 82
OUTFIT_CATEGORY_BATUU = 2470
OUTFIT_CATEGORY_CAREER: 'CommonGameTag' = 263
OUTFIT_CATEGORY_COLD_WEATHER: 'CommonGameTag' = 2054
OUTFIT_CATEGORY_EVERYDAY: 'CommonGameTag' = 77
OUTFIT_CATEGORY_FORMAL: 'CommonGameTag' = 78
OUTFIT_CATEGORY_HOT_WEATHER: 'CommonGameTag' = 2053
OUTFIT_CATEGORY_PARTY: 'CommonGameTag' = 83
OUTFIT_CATEGORY_RETAIL_UNIFORMS: 'CommonGameTag' = 1371
OUTFIT_CATEGORY_SITUATION: 'CommonGameTag' = 335
OUTFIT_CATEGORY_SLEEP: 'CommonGameTag' = 81
OUTFIT_CATEGORY_SWIMWEAR: 'CommonGameTag' = 1229
OUTFIT_CATEGORY_UNUSED: 'CommonGameTag' = 79
OUTFIT_CATEGORY_WITCH: 'CommonGameTag' = 8210
OUTFIT_FOOD_CRITIC: 'CommonGameTag' = 55300
OUTFIT_FOOD_CRITIC_LEVEL10: 'CommonGameTag' = 55394
PATTERN_ANIMAL: 'CommonGameTag' = 590
PATTERN_BICOLOR: 'CommonGameTag' = 1905
PATTERN_BRINDLE: 'CommonGameTag' = 1902
PATTERN_CALICO: 'CommonGameTag' = 1912
PATTERN_HARLEQUIN: 'CommonGameTag' = 1909
PATTERN_MERLE: 'CommonGameTag' = 1907
PATTERN_SABLE: 'CommonGameTag' = 1910
PATTERN_SADDLE: 'CommonGameTag' = 1903
PATTERN_SPECKLED: 'CommonGameTag' = 1913
PATTERN_SPOTTED: 'CommonGameTag' = 1900
PATTERN_STRIPED: 'CommonGameTag' = 1901
PATTERN_SWIRLED: 'CommonGameTag' = 1904
PATTERN_TABBY: 'CommonGameTag' = 1899
PATTERN_TRICOLOR: 'CommonGameTag' = 1906
PATTERN_TUXEDO: 'CommonGameTag' = 1908
PERSONA_BOHO: 'CommonGameTag' = 130
PERSONA_FASHIONISTA: 'CommonGameTag' = 129
PERSONA_MOM: 'CommonGameTag' = 148
PERSONA_ROCKER: 'CommonGameTag' = 128
PORTAL_DISALLOWANCE_MASCOT: 'CommonGameTag' = 69745
PORTAL_DISALLOWANCE_UNGREETED: 'CommonGameTag' = 668
POSTURE_LIFESTYLES_RELAXED_SIT: 'CommonGameTag' = 69695
RECIPE_CANDLE_MAKING_STATION_CANDLE: 'CommonGameTag' = 67604
RECIPE_CATEGORY_CAKE_PIE: 'CommonGameTag' = 1536
RECIPE_CATEGORY_CHOCOLATE: 'CommonGameTag' = 1537
RECIPE_CATEGORY_COLD: 'CommonGameTag' = 1533
RECIPE_CATEGORY_DRINKS: 'CommonGameTag' = 1518
RECIPE_CATEGORY_FIZZY: 'CommonGameTag' = 1531
RECIPE_CATEGORY_FRUIT: 'CommonGameTag' = 1532
RECIPE_CATEGORY_GRAINS: 'CommonGameTag' = 1515
RECIPE_CATEGORY_HOT: 'CommonGameTag' = 1534
RECIPE_CATEGORY_MEAT: 'CommonGameTag' = 1513
RECIPE_CATEGORY_MISC: 'CommonGameTag' = 1517
RECIPE_CATEGORY_NECTAR: 'CommonGameTag' = 1535
RECIPE_CATEGORY_SEAFOOD: 'CommonGameTag' = 1519
RECIPE_CATEGORY_SWEETS: 'CommonGameTag' = 1516
RECIPE_CATEGORY_VEGETARIAN: 'CommonGameTag' = 1514
RECIPE_CATEGORY_WATER: 'CommonGameTag' = 1522
RECIPE_CAULDRON_POTION: 'CommonGameTag' = 49154
RECIPE_CHEFS_CHOICE_CHILD_FRIENDLY: 'CommonGameTag' = 1521
RECIPE_CHILD_RESTRICTED: 'CommonGameTag' = 1523
RECIPE_COURSE_APPETIZER: 'CommonGameTag' = 1507
RECIPE_COURSE_DESSERT: 'CommonGameTag' = 1509
RECIPE_COURSE_DRINK: 'CommonGameTag' = 1524
RECIPE_COURSE_MAIN: 'CommonGameTag' = 1508
RECIPE_FLOWER_ARRANGEMENT: 'CommonGameTag' = 59472
RECIPE_MEAL_BREAKFAST: 'CommonGameTag' = 1510
RECIPE_MEAL_DINNER: 'CommonGameTag' = 1512
RECIPE_MEAL_LUNCH: 'CommonGameTag' = 1511
RECIPE_PLOPSY_BROWSER: 'CommonGameTag' = 83985
RECIPE_TYPE_DRINK: 'CommonGameTag' = 1506
RECIPE_TYPE_DRINK_PRANK: 'CommonGameTag' = 2423
RECIPE_TYPE_FOOD: 'CommonGameTag' = 1505
RECIPE_TYPE_PET_DRINK: 'CommonGameTag' = 57425
RECIPE_TYPE_PET_FOOD: 'CommonGameTag' = 57424
REGION_ACTIVE_CAREER: 'CommonGameTag' = 12437
REGION_CAMPING: 'CommonGameTag' = 1245
REGION_JUNGLE: 'CommonGameTag' = 45059
REGION_RESIDENTIAL: 'CommonGameTag' = 1244
REGION_RETAIL: 'CommonGameTag' = 12374
RESERVED_TEMP_BETA_FIX_DO_NOT_USE_1: 'CommonGameTag' = 138
RESERVED_TEMP_BETA_FIX_DO_NOT_USE_2: 'CommonGameTag' = 139
RESERVED_TEMP_BETA_FIX_DO_NOT_USE_3: 'CommonGameTag' = 142
RESERVED_TEMP_BETA_FIX_DO_NOT_USE_4: 'CommonGameTag' = 143
RESERVED_TEMP_BETA_FIX_DO_NOT_USE_5: 'CommonGameTag' = 144
RESERVED_TEMP_BETA_FIX_DO_NOT_USE_6: 'CommonGameTag' = 147
RESERVED_TEMP_BETA_FIX_DO_NOT_USE_7: 'CommonGameTag' = 281
RESERVED_TEMP_BETA_FIX_DO_NOT_USE_8: 'CommonGameTag' = 284
RESERVED_TEMP_BETA_FIX_DO_NOT_USE_9: 'CommonGameTag' = 290
REWARD_CAS_PART: 'CommonGameTag' = 767
ROLE_BAKE_ONE_CAKE: 'CommonGameTag' = 2277
ROLE_BARTENDER: 'CommonGameTag' = 277
ROLE_BUSINESS_CUSTOMER: 'CommonGameTag' = 1924
ROLE_CAREER: 'CommonGameTag' = 467
ROLE_CATERER: 'CommonGameTag' = 278
ROLE_COLLEGE_ORGANIZATION_EVENT: 'CommonGameTag' = 65583
ROLE_COWORKER: 'CommonGameTag' = 12292
ROLE_CUSTOMER: 'CommonGameTag' = 2142
ROLE_DATE: 'CommonGameTag' = 1439
ROLE_DETECTIVE: 'CommonGameTag' = 12294
ROLE_DOCTOR: 'CommonGameTag' = 12295
ROLE_ENTERTAINER: 'CommonGameTag' = 650
ROLE_FESTIVAL_ARTS_CRAFTS: 'CommonGameTag' = 55317
ROLE_FESTIVAL_BLOSSOM: 'CommonGameTag' = 55312
ROLE_FESTIVAL_FLEA_MARKET: 'CommonGameTag' = 55318
ROLE_FESTIVAL_FOOD: 'CommonGameTag' = 55315
ROLE_FESTIVAL_LAMP: 'CommonGameTag' = 55313
ROLE_FESTIVAL_LOGIC: 'CommonGameTag' = 55314
ROLE_FESTIVAL_MUSIC: 'CommonGameTag' = 55316
ROLE_FORTUNE_TELLER: 'CommonGameTag' = 8199
ROLE_GUEST: 'CommonGameTag' = 266
ROLE_HOST: 'CommonGameTag' = 267
ROLE_HOST_AT_STATION: 'CommonGameTag' = 26635
ROLE_LEAVE: 'CommonGameTag' = 418
ROLE_MAID: 'CommonGameTag' = 279
ROLE_RESTAURANT_DINER: 'CommonGameTag' = 2147
ROLE_RESTAURANT_EAT: 'CommonGameTag' = 2148
ROLE_RESTAURANT_POST_PLACE_ORDER: 'CommonGameTag' = 2149
ROLE_RESTAURANT_STAFF: 'CommonGameTag' = 26633
ROLE_ROOMMATE_NPC: 'CommonGameTag' = 65541
ROLE_SCIENTIST: 'CommonGameTag' = 12293
ROLE_SERVICE: 'CommonGameTag' = 416
ROLE_SPA_STAFF_BORED: 'CommonGameTag' = 18441
ROLE_STATE_EP01_PATIENT_TREATED: 'CommonGameTag' = 12434
ROLE_VET_PATIENT: 'CommonGameTag' = 57400
ROLE_VIP_ROPE_ALLOWED: 'CommonGameTag' = 2143
ROLE_YOGA_CLASS_POST_CLASS: 'CommonGameTag' = 18435
ROLE_YOGA_PRE_CLASS: 'CommonGameTag' = 18463
ROYALTY_APPS: 'CommonGameTag' = 908
ROYALTY_BOOKS: 'CommonGameTag' = 909
ROYALTY_GAMES: 'CommonGameTag' = 910
ROYALTY_LYRICS: 'CommonGameTag' = 1629
ROYALTY_PAINTINGS: 'CommonGameTag' = 911
ROYALTY_SONGS: 'CommonGameTag' = 912
SHOES_BOOTIES: 'CommonGameTag' = 383
SHOES_BOOTS: 'CommonGameTag' = 384
SHOES_FLATS: 'CommonGameTag' = 385
SHOES_HEELS: 'CommonGameTag' = 386
SHOES_LACE_UP_ADULT: 'CommonGameTag' = 387
SHOES_LACE_UP_CHILDREN: 'CommonGameTag' = 388
SHOES_LOAFERS: 'CommonGameTag' = 389
SHOES_SANDALS: 'CommonGameTag' = 390
SHOES_SLIPPERS: 'CommonGameTag' = 391
SHOES_SNEAKERS: 'CommonGameTag' = 392
SHOES_WEDGES: 'CommonGameTag' = 393
SICKNESS_CHECK_UP: 'CommonGameTag' = 57407
SICKNESS_CURED_BY_EXAM_TABLE: 'CommonGameTag' = 57451
SICKNESS_CURED_BY_SURGERY_STATION: 'CommonGameTag' = 57452
SICKNESS_ILLNESS: 'CommonGameTag' = 57408
SICKNESS_PET_EXAM: 'CommonGameTag' = 57403
SITUATION_ACTIVE_CAREER: 'CommonGameTag' = 12358
SITUATION_ACTIVE_CAREER_SCIENTIST: 'CommonGameTag' = 12427
SITUATION_ACTOR_CAREER_COMMERCIAL: 'CommonGameTag' = 61553
SITUATION_ACTOR_CAREER_MOVIE: 'CommonGameTag' = 61556
SITUATION_ACTOR_CAREER_PREP_TASK_ACTING: 'CommonGameTag' = 61615
SITUATION_ACTOR_CAREER_PREP_TASK_CHARISMA: 'CommonGameTag' = 61458
SITUATION_ACTOR_CAREER_PREP_TASK_CO_STAR_REL: 'CommonGameTag' = 61454
SITUATION_ACTOR_CAREER_PREP_TASK_COMEDY: 'CommonGameTag' = 61456
SITUATION_ACTOR_CAREER_PREP_TASK_DIRECTOR_REL: 'CommonGameTag' = 61455
SITUATION_ACTOR_CAREER_PREP_TASK_FITNESS: 'CommonGameTag' = 61459
SITUATION_ACTOR_CAREER_PREP_TASK_GUITAR: 'CommonGameTag' = 61460
SITUATION_ACTOR_CAREER_PREP_TASK_HANDINESS: 'CommonGameTag' = 61457
SITUATION_ACTOR_CAREER_PREP_TASK_PRACTICE_ACTION: 'CommonGameTag' = 61619
SITUATION_ACTOR_CAREER_PREP_TASK_PRACTICE_DRAMATIC: 'CommonGameTag' = 61620
SITUATION_ACTOR_CAREER_PREP_TASK_PRACTICE_ROMANTIC: 'CommonGameTag' = 61621
SITUATION_ACTOR_CAREER_PREP_TASK_RESEARCH_FLIRTY: 'CommonGameTag' = 61616
SITUATION_ACTOR_CAREER_PREP_TASK_RESEARCH_FUNNY: 'CommonGameTag' = 61617
SITUATION_ACTOR_CAREER_PREP_TASK_RESEARCH_MEAN: 'CommonGameTag' = 61618
SITUATION_ACTOR_CAREER_TV_HIGH: 'CommonGameTag' = 61555
SITUATION_ACTOR_CAREER_TV_LOW: 'CommonGameTag' = 61554
SITUATION_APARTMENT_NEIGHBOR_ANSWER_DOOR_COMPLAINT: 'CommonGameTag' = 55304
SITUATION_APARTMENT_NEIGHBOR_LOUD_NOISES: 'CommonGameTag' = 55303
SITUATION_BASKET_BALLER_A: 'CommonGameTag' = 55381
SITUATION_BASKET_BALLER_B: 'CommonGameTag' = 55382
SITUATION_BATUU_ARREST: 'CommonGameTag' = 51231
SITUATION_BATUU_FR13_MISSION: 'CommonGameTag' = 51278
SITUATION_BATUU_FS2_MISSION: 'CommonGameTag' = 51263
SITUATION_BATUU_FS3_MISSION: 'CommonGameTag' = 51264
SITUATION_BATUU_FS4_CRIMINAL: 'CommonGameTag' = 51255
SITUATION_BATUU_FS6_MISSION: 'CommonGameTag' = 51262
SITUATION_BATUU_FS7_MISSION: 'CommonGameTag' = 51261
SITUATION_BATUU_INSPECTION: 'CommonGameTag' = 51232
SITUATION_BATUU_MISSION_LIGHTSABER: 'CommonGameTag' = 51241
SITUATION_BATUU_OGAS_CELEBRATION_BLACKLISTED: 'CommonGameTag' = 51243
SITUATION_BATUU_RS2_MISSION: 'CommonGameTag' = 51272
SITUATION_BATUU_RS4_MISSION: 'CommonGameTag' = 51269
SITUATION_BATUU_RS6_MISSION: 'CommonGameTag' = 51273
SITUATION_BATUU_RS7_MISSION: 'CommonGameTag' = 51274
SITUATION_BATUU_SABACC_OPPONENT_1: 'CommonGameTag' = 51258
SITUATION_BATUU_SABACC_OPPONENT_2: 'CommonGameTag' = 51259
SITUATION_BATUU_SABACC_OPPONENT_3: 'CommonGameTag' = 51260
SITUATION_BATUU_SR4_MISSION: 'CommonGameTag' = 51275
SITUATION_BATUU_SR9_MISSION: 'CommonGameTag' = 51265
SITUATION_BATUU_SS8_MISSION: 'CommonGameTag' = 51276
SITUATION_BATUU_SS9_MISSION: 'CommonGameTag' = 51277
SITUATION_BEAR: 'CommonGameTag' = 10247
SITUATION_BONFIRE: 'CommonGameTag' = 24586
SITUATION_BOWLING_GROUP: 'CommonGameTag' = 38919
SITUATION_BOWLING_GROUP_2: 'CommonGameTag' = 38920
SITUATION_BOWLING_GROUP_3: 'CommonGameTag' = 38921
SITUATION_BOWLING_GROUP_4: 'CommonGameTag' = 38922
SITUATION_BUSKER: 'CommonGameTag' = 55308
SITUATION_BUTLER: 'CommonGameTag' = 36867
SITUATION_CELEBRITY_FAN: 'CommonGameTag' = 61476
SITUATION_CITY_INVITES: 'CommonGameTag' = 55380
SITUATION_CITY_REPAIR: 'CommonGameTag' = 55355
SITUATION_CLOWN: 'CommonGameTag' = 955
SITUATION_COMPLAINT_NOISE: 'CommonGameTag' = 55425
SITUATION_COOKING_INTERACTIONS: 'CommonGameTag' = 1017
SITUATION_CRIMINAL: 'CommonGameTag' = 956
SITUATION_DANCE_TOGETHER: 'CommonGameTag' = 24606
SITUATION_DJ_PERFORMANCE: 'CommonGameTag' = 24582
SITUATION_EVENT_NPC: 'CommonGameTag' = 1501
SITUATION_FESTIVAL: 'CommonGameTag' = 55401
SITUATION_FESTIVAL_BLOSSOM_ROMANTIC_COUPLE: 'CommonGameTag' = 55390
SITUATION_FESTIVAL_LOGIC_ROCKET_SHIP_WOOHOOERS: 'CommonGameTag' = 55389
SITUATION_FIREFIGHTER: 'CommonGameTag' = 2377
SITUATION_FLOWER_BUNNY: 'CommonGameTag' = 59476
SITUATION_FOREST_GHOST: 'CommonGameTag' = 10259
SITUATION_FOREST_RANGER: 'CommonGameTag' = 10264
SITUATION_GP07_WALKBY_CONSPIRACIST_01: 'CommonGameTag' = 47158
SITUATION_GP07_WALKBY_CONSPIRACIST_02: 'CommonGameTag' = 47159
SITUATION_GP07_WALKBY_CONSPIRACIST_03: 'CommonGameTag' = 47160
SITUATION_GP07_WALKBY_FBI_01: 'CommonGameTag' = 47161
SITUATION_GP07_WALKBY_FBI_02: 'CommonGameTag' = 47162
SITUATION_GP07_WALKBY_FBI_03: 'CommonGameTag' = 47163
SITUATION_GP07_WALKBY_MILITARY_01: 'CommonGameTag' = 47150
SITUATION_GP07_WALKBY_MILITARY_02: 'CommonGameTag' = 47151
SITUATION_GP07_WALKBY_MILITARY_03: 'CommonGameTag' = 47152
SITUATION_GP07_WALKBY_MILITARY_04: 'CommonGameTag' = 47153
SITUATION_GP07_WALKBY_SCIENTIST_01: 'CommonGameTag' = 47154
SITUATION_GP07_WALKBY_SCIENTIST_02: 'CommonGameTag' = 47155
SITUATION_GP07_WALKBY_SCIENTIST_03: 'CommonGameTag' = 47156
SITUATION_GP07_WALKBY_SCIENTIST_04: 'CommonGameTag' = 47157
SITUATION_GARDENER: 'CommonGameTag' = 2152
SITUATION_GNOME_BERSERK: 'CommonGameTag' = 59455
SITUATION_GNOME_NORMAL: 'CommonGameTag' = 59454
SITUATION_GRILL_GROUP: 'CommonGameTag' = 1461
SITUATION_HIKING_TRAIL: 'CommonGameTag' = 69746
SITUATION_HIRED_NANNY: 'CommonGameTag' = 1550
SITUATION_HOLIDAY: 'CommonGameTag' = 59460
SITUATION_HOME_CHEF: 'CommonGameTag' = 26642
SITUATION_HOT_DOG: 'CommonGameTag' = 958
SITUATION_INTRIGUED_NOISE: 'CommonGameTag' = 55426
SITUATION_INTRIGUED_SMELL: 'CommonGameTag' = 55427
SITUATION_ISLAND_SPIRITS: 'CommonGameTag' = 63496
SITUATION_LIVES_ON_STREET_A: 'CommonGameTag' = 55435
SITUATION_LIVES_ON_STREET_B: 'CommonGameTag' = 55436
SITUATION_LIVES_ON_STREET_C: 'CommonGameTag' = 55437
SITUATION_LIVES_ON_STREET_D: 'CommonGameTag' = 55438
SITUATION_MAID: 'CommonGameTag' = 957
SITUATION_MAILMAN: 'CommonGameTag' = 1343
SITUATION_MARKET_STALL_VENDOR: 'CommonGameTag' = 1949
SITUATION_MASTER_FISHERMAN: 'CommonGameTag' = 889
SITUATION_MASTER_GARDENER: 'CommonGameTag' = 890
SITUATION_MURAL_PAINTER: 'CommonGameTag' = 55383
SITUATION_NIGHT_TIME_VISIT: 'CommonGameTag' = 1679
SITUATION_PET_OBSTACLE_COURSE: 'CommonGameTag' = 57427
SITUATION_PICNIC_TABLE: 'CommonGameTag' = 1460
SITUATION_PIZZA: 'CommonGameTag' = 960
SITUATION_PLAYER_FACING_CAN_HOST: 'CommonGameTag' = 1643
SITUATION_PLAYER_VISITING_NPC: 'CommonGameTag' = 1493
SITUATION_POSSESSED: 'CommonGameTag' = 47124
SITUATION_PROMO_NIGHT: 'CommonGameTag' = 24594
SITUATION_REAPER: 'CommonGameTag' = 959
SITUATION_REPAIRMAN: 'CommonGameTag' = 2153
SITUATION_RESTAURANT_DINING: 'CommonGameTag' = 2146
SITUATION_RETAIL_CUSTOMER: 'CommonGameTag' = 12323
SITUATION_RETAIL_EMPLOYEE: 'CommonGameTag' = 12324
SITUATION_RING_DOORBELL: 'CommonGameTag' = 684
SITUATION_ROOMMATE_NPC_POTENTIAL: 'CommonGameTag' = 65572
SITUATION_SECRET_SOCIETY: 'CommonGameTag' = 65570
SITUATION_SPOOKY_PARTY: 'CommonGameTag' = 22541
SITUATION_SQUAD: 'CommonGameTag' = 61634
SITUATION_SUN_RAY: 'CommonGameTag' = 67647
SITUATION_TRAGIC_CLOWN: 'CommonGameTag' = 1504
SITUATION_TUTORIAL_FTUE: 'CommonGameTag' = 2167
SITUATION_UMBRELLA_USER: 'CommonGameTag' = 2119
SITUATION_UNIVERSITY_HOUSING_KICK_OUT_BLOCKER: 'CommonGameTag' = 65571
SITUATION_UNIVERSITY_RIVALS_PRANK: 'CommonGameTag' = 65606
SITUATION_VENUE_KARAOKE_DUETERS: 'CommonGameTag' = 55391
SITUATION_VET_PLAYER_PET_OWNER: 'CommonGameTag' = 57414
SITUATION_VET_SICK_PET: 'CommonGameTag' = 57402
SITUATION_VIP_ROPE_BOUNCER: 'CommonGameTag' = 61613
SITUATION_VISITOR_NPC_ANGRY_SIM: 'CommonGameTag' = 67606
SITUATION_VISITOR_NPCS: 'CommonGameTag' = 2282
SITUATION_WAIT_IN_LINE_TOGETHER: 'CommonGameTag' = 2496
SITUATION_WALKBY_FIRST_ORDER_OFFICER_SPY: 'CommonGameTag' = 51226
SITUATION_WEATHER_RAIN_HEAVY: 'CommonGameTag' = 2078
SITUATION_WEATHER_RAIN_LIGHT: 'CommonGameTag' = 2079
SITUATION_WEATHER_RAIN_STORM: 'CommonGameTag' = 2077
SITUATION_WEATHER_SNOW_HEAVY: 'CommonGameTag' = 2080
SITUATION_WEATHER_SNOW_STORM: 'CommonGameTag' = 2081
SITUATION_WEIRDO: 'CommonGameTag' = 55309
SITUATION_WELCOME_WAGON: 'CommonGameTag' = 1457
SITUATION_YOGA_CLASS: 'CommonGameTag' = 18462
SKILL_ALL: 'CommonGameTag' = 448
SKILL_ALL_VISIBLE: 'CommonGameTag' = 2097
SKILL_ARCHAEOLOGY: 'CommonGameTag' = 45094
SKILL_ATHLETIC: 'CommonGameTag' = 86
SKILL_BARTENDING: 'CommonGameTag' = 137
SKILL_CHARISMA: 'CommonGameTag' = 676
SKILL_CHILD: 'CommonGameTag' = 641
SKILL_CLIMBING_SKIING_SNOWBOARDING: 'CommonGameTag' = 69698
SKILL_COMEDY_OR_MISCHIEF: 'CommonGameTag' = 1576
SKILL_COOKING: 'CommonGameTag' = 87
SKILL_CREATIVE: 'CommonGameTag' = 336
SKILL_DOG_TRAINING: 'CommonGameTag' = 57367
SKILL_FITNESS_OR_PROGRAMMING: 'CommonGameTag' = 652
SKILL_FLOWER_ARRANGING: 'CommonGameTag' = 59451
SKILL_GARDENING: 'CommonGameTag' = 1605
SKILL_GUITAR_OR_COMEDY: 'CommonGameTag' = 935
SKILL_HANDINESS: 'CommonGameTag' = 1368
SKILL_JUICE_FIZZING: 'CommonGameTag' = 67620
SKILL_KNITTING: 'CommonGameTag' = 83969
SKILL_LOCAL_CULTURE: 'CommonGameTag' = 45070
SKILL_LOGIC: 'CommonGameTag' = 677
SKILL_MENTAL: 'CommonGameTag' = 337
SKILL_MUSIC_OR_COMEDY: 'CommonGameTag' = 55305
SKILL_MUSICAL: 'CommonGameTag' = 445
SKILL_PAINTING: 'CommonGameTag' = 1607
SKILL_PERFORMANCE: 'CommonGameTag' = 1630
SKILL_PHOTOGRAPHY: 'CommonGameTag' = 1940
SKILL_PHOTOGRAPHY_BG: 'CommonGameTag' = 1609
SKILL_PHYSICAL: 'CommonGameTag' = 338
SKILL_PIPE_ORGAN: 'CommonGameTag' = 40969
SKILL_PROGRAMMING: 'CommonGameTag' = 1606
SKILL_PSYCHIC: 'CommonGameTag' = 8194
SKILL_ROCK_CLIMBING: 'CommonGameTag' = 69697
SKILL_ROCKET_SCIENCE: 'CommonGameTag' = 678
SKILL_SCHOOL_TASK: 'CommonGameTag' = 1653
SKILL_SINGING: 'CommonGameTag' = 1633
SKILL_SKATING: 'CommonGameTag' = 59393
SKILL_SKIING: 'CommonGameTag' = 69637
SKILL_SNOWBOARDING: 'CommonGameTag' = 69696
SKILL_SOCIAL: 'CommonGameTag' = 339
SKILL_TODDLER: 'CommonGameTag' = 1655
SKILL_VIDEO_GAMING: 'CommonGameTag' = 675
SKILL_VIOLIN_OR_GUITAR: 'CommonGameTag' = 936
SKILL_WELLNESS: 'CommonGameTag' = 18466
SKILL_WELLNESS_BG: 'CommonGameTag' = 1608
SKILL_WRITING: 'CommonGameTag' = 679
SKIN_HUE_BLUE: 'CommonGameTag' = 12382
SKIN_HUE_BLUE_SKIN: 'CommonGameTag' = 1449
SKIN_HUE_GREEN: 'CommonGameTag' = 12389
SKIN_HUE_GREEN_SKIN: 'CommonGameTag' = 1450
SKIN_HUE_OLIVE: 'CommonGameTag' = 763
SKIN_HUE_PURPLE: 'CommonGameTag' = 12390
SKIN_HUE_RED: 'CommonGameTag' = 761
SKIN_HUE_RED_SKIN: 'CommonGameTag' = 1625
SKIN_HUE_YELLOW: 'CommonGameTag' = 762
SKINTONE_BLEND_YES: 'CommonGameTag' = 1458
SKINTONE_TYPE_FANTASY: 'CommonGameTag' = 12317
SKINTONE_TYPE_NATURAL: 'CommonGameTag' = 12316
SKINTONE_TYPE_SICKNESS_1: 'CommonGameTag' = 12320
SKINTONE_TYPE_SICKNESS_2: 'CommonGameTag' = 12321
SKINTONE_TYPE_SICKNESS_3: 'CommonGameTag' = 12322
SKINTONE_TYPE_SICKNESS_GREEN: 'CommonGameTag' = 12325
SOCIAL_BLACK_AND_WHITE: 'CommonGameTag' = 686
SOCIAL_COSTUME_PARTY: 'CommonGameTag' = 687
SOCIAL_FLIRTY: 'CommonGameTag' = 340
SOCIAL_WEENIE_ROAST: 'CommonGameTag' = 10244
SOCIAL_WOOHOO: 'CommonGameTag' = 364
SP03_PLEASE_REUSE_ME_I_WAS_BLANK_ON_ACCIDENT: 'CommonGameTag' = 20487
SP03_PLEASE_REUSE_ME_I_WAS_BLANK_ON_ACCIDENT_2: 'CommonGameTag' = 20488
SPAWN_ARRIVAL: 'CommonGameTag' = 397
SPAWN_ARTS_PARK: 'CommonGameTag' = 65622
SPAWN_ARTS_QUAD: 'CommonGameTag' = 65619
SPAWN_ARTS_UNIVERSITY_SHELL: 'CommonGameTag' = 65546
SPAWN_ARTS_UNIVERSITY_SHELL_SHELL_1: 'CommonGameTag' = 65556
SPAWN_ARTS_UNIVERSITY_SHELL_SHELL_2: 'CommonGameTag' = 65557
SPAWN_BATTLE_HELPER: 'CommonGameTag' = 47133
SPAWN_BATUU_DWELLING: 'CommonGameTag' = 51216
SPAWN_BATUU_FIRST_ORDER_PATROL: 'CommonGameTag' = 51227
SPAWN_BATUU_LT_AGNON: 'CommonGameTag' = 51218
SPAWN_BATUU_RESISTANCE_PATROL_1: 'CommonGameTag' = 51228
SPAWN_BATUU_RESISTANCE_PATROL_2: 'CommonGameTag' = 51229
SPAWN_BATUU_VI_MORADI: 'CommonGameTag' = 51217
SPAWN_FIREPLACE: 'CommonGameTag' = 2057
SPAWN_GENERIC_01: 'CommonGameTag' = 2465
SPAWN_GENERIC_02: 'CommonGameTag' = 2466
SPAWN_GENERIC_03: 'CommonGameTag' = 2467
SPAWN_GENERIC_04: 'CommonGameTag' = 2468
SPAWN_GENERIC_05: 'CommonGameTag' = 2469
SPAWN_GRIM_REAPER: 'CommonGameTag' = 987
SPAWN_LIGHTHOUSE: 'CommonGameTag' = 57409
SPAWN_LIGHTHOUSE_ARRIVAL: 'CommonGameTag' = 1935
SPAWN_MAGIC_PORTAL: 'CommonGameTag' = 2223
SPAWN_MAGIC_PORTAL_MARKET: 'CommonGameTag' = 49182
SPAWN_MARKET_STALL_MAGIC_BROOM: 'CommonGameTag' = 49166
SPAWN_MARKET_STALL_MAGIC_POTION: 'CommonGameTag' = 49171
SPAWN_MARKET_STALL_MAGIC_WAND: 'CommonGameTag' = 49172
SPAWN_NIGHT_STALKER: 'CommonGameTag' = 49158
SPAWN_PET_CRATE: 'CommonGameTag' = 57387
SPAWN_REAR_WALKBY: 'CommonGameTag' = 400
SPAWN_SCIENCE_QUAD: 'CommonGameTag' = 65620
SPAWN_SCIENCE_UNIVERSITY_SHELL: 'CommonGameTag' = 65547
SPAWN_SCIENCE_UNIVERSITY_SHELL_SHELL_1: 'CommonGameTag' = 65558
SPAWN_SCIENCE_UNIVERSITY_SHELL_SHELL_2: 'CommonGameTag' = 65559
SPAWN_SEANCE: 'CommonGameTag' = 86021
SPAWN_SECRET_SOCIETY: 'CommonGameTag' = 65621
SPAWN_SHELL_ARRIVAL: 'CommonGameTag' = 1933
SPAWN_SKELETON_ARRIVAL: 'CommonGameTag' = 2039
SPAWN_SNOW_SPORTS_SLOPE_BUNNY_SLOPE: 'CommonGameTag' = 69740
SPAWN_STARSHIP: 'CommonGameTag' = 51215
SPAWN_VISITOR_ARRIVAL: 'CommonGameTag' = 399
SPAWN_WALKBY: 'CommonGameTag' = 398
SPAWN_WALKBY_SPORTS_SHELL_EP08: 'CommonGameTag' = 2234
SPAWN_ZOMBIE: 'CommonGameTag' = 47132
SPECIAL_NUDE: 'CommonGameTag' = 127
SPELL_MAGIC: 'CommonGameTag' = 49170
STYLE_ARTS_QUARTER: 'CommonGameTag' = 55330
STYLE_BOHEMIAN: 'CommonGameTag' = 1495
STYLE_BUSINESS: 'CommonGameTag' = 1593
STYLE_CAS_BRANDED_MAC: 'CommonGameTag' = 2433
STYLE_CLASSICS: 'CommonGameTag' = 239
STYLE_COUNTRY: 'CommonGameTag' = 985
STYLE_FASHION_DISTRICT: 'CommonGameTag' = 55331
STYLE_FESTIVAL_BLOSSOM: 'CommonGameTag' = 55348
STYLE_FESTIVAL_DARK: 'CommonGameTag' = 1623
STYLE_FESTIVAL_FOOD: 'CommonGameTag' = 1624
STYLE_FESTIVAL_LIGHT: 'CommonGameTag' = 1622
STYLE_FESTIVAL_NERD: 'CommonGameTag' = 1621
STYLE_FESTIVAL_ROMANCE: 'CommonGameTag' = 1620
STYLE_FORMAL_MODERN: 'CommonGameTag' = 248
STYLE_FORMAL_TRENDY: 'CommonGameTag' = 249
STYLE_FRANKENSTEIN: 'CommonGameTag' = 8197
STYLE_GEN_CITY_SLEEK: 'CommonGameTag' = 238
STYLE_GEN_CONTEMPORARY_BASIC: 'CommonGameTag' = 240
STYLE_GEN_CONTEMPORARY_DESIGNER: 'CommonGameTag' = 241
STYLE_GEN_OUTDOOR_EXPLORER: 'CommonGameTag' = 243
STYLE_GEN_PARTY_TRENDY: 'CommonGameTag' = 244
STYLE_GEN_POLISHED: 'CommonGameTag' = 245
STYLE_GEN_PREPPY: 'CommonGameTag' = 246
STYLE_GEN_ROMANTIC: 'CommonGameTag' = 247
STYLE_GEN_SUMMER: 'CommonGameTag' = 237
STYLE_GLAMPING: 'CommonGameTag' = 10265
STYLE_GOTH_ROCK_PUNK: 'CommonGameTag' = 289
STYLE_HIPSTER: 'CommonGameTag' = 986
STYLE_ISLAND_ELEMENTAL: 'CommonGameTag' = 63517
STYLE_ISLANDER: 'CommonGameTag' = 63495
STYLE_JAPANESE_CONTEMPORARY: 'CommonGameTag' = 69693
STYLE_JUNGLE: 'CommonGameTag' = 2036
STYLE_PIRATE: 'CommonGameTag' = 8196
STYLE_PROFESSOR_NPC_GOOD: 'CommonGameTag' = 65597
STYLE_PROFESSOR_NPC_GRUMPY: 'CommonGameTag' = 65596
STYLE_PROFESSOR_NPC_HIP: 'CommonGameTag' = 65595
STYLE_PROFESSOR_NPC_SMART: 'CommonGameTag' = 65598
STYLE_SEASONAL_FALL: 'CommonGameTag' = 2066
STYLE_SEASONAL_SPRING: 'CommonGameTag' = 2067
STYLE_SEASONAL_SUMMER: 'CommonGameTag' = 2068
STYLE_SEASONAL_WINTER: 'CommonGameTag' = 2065
STYLE_SPICE_MARKET: 'CommonGameTag' = 55332
STYLE_STREET: 'CommonGameTag' = 1592
STYLE_VAMPIRE_ARCHETYPE_DRACULA: 'CommonGameTag' = 1681
STYLE_VAMPIRE_ARCHETYPE_MODERN: 'CommonGameTag' = 1682
STYLE_VAMPIRE_ARCHETYPE_NOSFERATU: 'CommonGameTag' = 1680
STYLE_VAMPIRE_ARCHETYPE_PUNK: 'CommonGameTag' = 1684
STYLE_VAMPIRE_ARCHETYPE_VICTORIAN: 'CommonGameTag' = 1683
STYLE_VAMPIRE_WALKBY_MODERN: 'CommonGameTag' = 40966
STYLE_VAMPIRE_WALKBY_NOSFERATU: 'CommonGameTag' = 40964
STYLE_VAMPIRE_WALKBY_PUNK: 'CommonGameTag' = 40968
STYLE_VAMPIRE_WALKBY_VICTORIAN: 'CommonGameTag' = 40967
STYLE_WITCH: 'CommonGameTag' = 8195
TAIL_LONG: 'CommonGameTag' = 57350
TAIL_RING: 'CommonGameTag' = 57351
TAIL_SABER: 'CommonGameTag' = 57354
TAIL_SCREW: 'CommonGameTag' = 57352
TAIL_STUB: 'CommonGameTag' = 57353
TERRAIN_MANIP_ALL: 'CommonGameTag' = 2169
TERRAIN_PAINT_ALL: 'CommonGameTag' = 1082
TERRAIN_PAINT_DIRT: 'CommonGameTag' = 872
TERRAIN_PAINT_GRASS: 'CommonGameTag' = 873
TERRAIN_PAINT_MISC: 'CommonGameTag' = 875
TERRAIN_PAINT_STONE: 'CommonGameTag' = 874
TOOLTIP_AMBIENCE_ANGRY: 'CommonGameTag' = 732
TOOLTIP_AMBIENCE_BORED: 'CommonGameTag' = 733
TOOLTIP_AMBIENCE_CONFIDENT: 'CommonGameTag' = 734
TOOLTIP_AMBIENCE_EMBARRASSED: 'CommonGameTag' = 735
TOOLTIP_AMBIENCE_ENERGIZED: 'CommonGameTag' = 736
TOOLTIP_AMBIENCE_FLIRTY: 'CommonGameTag' = 737
TOOLTIP_AMBIENCE_FOCUSED: 'CommonGameTag' = 738
TOOLTIP_AMBIENCE_HAPPY: 'CommonGameTag' = 739
TOOLTIP_AMBIENCE_IMAGINATIVE: 'CommonGameTag' = 740
TOOLTIP_AMBIENCE_PLAYFUL: 'CommonGameTag' = 741
TOOLTIP_AMBIENCE_SAD: 'CommonGameTag' = 742
TOOLTIP_AMBIENCE_TENSE: 'CommonGameTag' = 743
TOOLTIP_BILLS_DECREASE: 'CommonGameTag' = 2396
TOOLTIP_BILLS_INCREASE: 'CommonGameTag' = 2395
TOOLTIP_COLUMN_HEIGHT_RESTRICTED: 'CommonGameTag' = 2238
TOOLTIP_CRAFTING_QUALITY_CARPENTRY: 'CommonGameTag' = 706
TOOLTIP_CRAFTING_QUALITY_COOKING: 'CommonGameTag' = 703
TOOLTIP_CRAFTING_QUALITY_DRINKS: 'CommonGameTag' = 704
TOOLTIP_CRAFTING_QUALITY_PAINTING: 'CommonGameTag' = 705
TOOLTIP_ECO_FOOTPRINT_NEGATIVE: 'CommonGameTag' = 67624
TOOLTIP_ECO_FOOTPRINT_POSITIVE: 'CommonGameTag' = 67623
TOOLTIP_ENVIRONMENT_SCORE_NEGATIVE: 'CommonGameTag' = 2389
TOOLTIP_ENVIRONMENT_SCORE_POSITIVE: 'CommonGameTag' = 2390
TOOLTIP_EP09_ECO_FOOTPRINT_NEGATIVE: 'CommonGameTag' = 2422
TOOLTIP_EP09_ECO_FOOTPRINT_POSITIVE: 'CommonGameTag' = 2421
TOOLTIP_HIGH_FIRE_RESISTANCE: 'CommonGameTag' = 2392
TOOLTIP_HIGH_WATER_RESISTANCE: 'CommonGameTag' = 2394
TOOLTIP_LOW_FIRE_RESISTANCE: 'CommonGameTag' = 2391
TOOLTIP_LOW_WATER_RESISTANCE: 'CommonGameTag' = 2393
TOOLTIP_MISC_CATS_ONLY: 'CommonGameTag' = 2027
TOOLTIP_MISC_CHILDREN_ONLY: 'CommonGameTag' = 783
TOOLTIP_MISC_COMFORT: 'CommonGameTag' = 784
TOOLTIP_MISC_DOGS_ONLY: 'CommonGameTag' = 2026
TOOLTIP_MISC_PETS_ONLY: 'CommonGameTag' = 2025
TOOLTIP_MISC_RELIABILITY: 'CommonGameTag' = 907
TOOLTIP_MISC_TODDLER_ONLY: 'CommonGameTag' = 1667
TOOLTIP_MISC_UNBREAKABLE: 'CommonGameTag' = 731
TOOLTIP_MISC_UNCOMFORTABLE: 'CommonGameTag' = 747
TOOLTIP_MISC_UNCOMFORTABLE_FOR_ADULTS: 'CommonGameTag' = 940
TOOLTIP_MOOD_RELIEF_ANGRY: 'CommonGameTag' = 710
TOOLTIP_MOOD_RELIEF_BORED: 'CommonGameTag' = 711
TOOLTIP_MOOD_RELIEF_EMBARRASSED: 'CommonGameTag' = 712
TOOLTIP_MOOD_RELIEF_SAD: 'CommonGameTag' = 709
TOOLTIP_MOOD_RELIEF_STRESS: 'CommonGameTag' = 707
TOOLTIP_MOOD_RELIEF_UNCOMFORTABLE: 'CommonGameTag' = 708
TOOLTIP_MOTIVE_BLADDER: 'CommonGameTag' = 701
TOOLTIP_MOTIVE_ENERGY: 'CommonGameTag' = 698
TOOLTIP_MOTIVE_FUN: 'CommonGameTag' = 699
TOOLTIP_MOTIVE_HUNGER: 'CommonGameTag' = 702
TOOLTIP_MOTIVE_HYGIENE: 'CommonGameTag' = 697
TOOLTIP_MOTIVE_SOCIAL: 'CommonGameTag' = 700
TOOLTIP_OFF_THE_GRID: 'CommonGameTag' = 2207
TOOLTIP_POWER_CONSUMER: 'CommonGameTag' = 2398
TOOLTIP_POWER_PRODUCER: 'CommonGameTag' = 2397
TOOLTIP_SKILL_ACTING: 'CommonGameTag' = 61637
TOOLTIP_SKILL_ARCHAEOLOGY: 'CommonGameTag' = 45110
TOOLTIP_SKILL_BARTENDING: 'CommonGameTag' = 717
TOOLTIP_SKILL_CHARISMA: 'CommonGameTag' = 729
TOOLTIP_SKILL_COMEDY: 'CommonGameTag' = 726
TOOLTIP_SKILL_COMMUNICATION: 'CommonGameTag' = 1670
TOOLTIP_SKILL_COOKING: 'CommonGameTag' = 713
TOOLTIP_SKILL_CREATIVITY: 'CommonGameTag' = 927
TOOLTIP_SKILL_DANCE: 'CommonGameTag' = 24615
TOOLTIP_SKILL_DJ: 'CommonGameTag' = 24614
TOOLTIP_SKILL_DOG_TRAINING: 'CommonGameTag' = 2023
TOOLTIP_SKILL_FITNESS: 'CommonGameTag' = 716
TOOLTIP_SKILL_FLOWER_ARRANGING: 'CommonGameTag' = 2115
TOOLTIP_SKILL_GARDENING: 'CommonGameTag' = 728
TOOLTIP_SKILL_GUITAR: 'CommonGameTag' = 727
TOOLTIP_SKILL_HANDINESS: 'CommonGameTag' = 719
TOOLTIP_SKILL_IMAGINATION: 'CommonGameTag' = 1669
TOOLTIP_SKILL_LOGIC: 'CommonGameTag' = 721
TOOLTIP_SKILL_MENTAL: 'CommonGameTag' = 928
TOOLTIP_SKILL_MISCHIEF: 'CommonGameTag' = 722
TOOLTIP_SKILL_MOTOR: 'CommonGameTag' = 929
TOOLTIP_SKILL_MOVEMENT: 'CommonGameTag' = 1668
TOOLTIP_SKILL_PAINTING: 'CommonGameTag' = 718
TOOLTIP_SKILL_PIANO: 'CommonGameTag' = 724
TOOLTIP_SKILL_PIPE_ORGAN: 'CommonGameTag' = 40978
TOOLTIP_SKILL_POTTY: 'CommonGameTag' = 1672
TOOLTIP_SKILL_PROGRAMMING: 'CommonGameTag' = 715
TOOLTIP_SKILL_PSYCHIC: 'CommonGameTag' = 8212
TOOLTIP_SKILL_RESEARCH_DEBATE: 'CommonGameTag' = 2269
TOOLTIP_SKILL_ROBOTICS: 'CommonGameTag' = 2270
TOOLTIP_SKILL_ROCKET_SCIENCE: 'CommonGameTag' = 720
TOOLTIP_SKILL_SINGING: 'CommonGameTag' = 55434
TOOLTIP_SKILL_SOCIAL: 'CommonGameTag' = 930
TOOLTIP_SKILL_THINKING: 'CommonGameTag' = 1671
TOOLTIP_SKILL_VET: 'CommonGameTag' = 2024
TOOLTIP_SKILL_VIDEO_GAMING: 'CommonGameTag' = 714
TOOLTIP_SKILL_VIOLIN: 'CommonGameTag' = 725
TOOLTIP_SKILL_WELLNESS: 'CommonGameTag' = 18459
TOOLTIP_SKILL_WOOHOO: 'CommonGameTag' = 730
TOOLTIP_SKILL_WRITING: 'CommonGameTag' = 723
TOOLTIP_WATER_CONSUMER: 'CommonGameTag' = 2400
TOOLTIP_WATER_PRODUCER: 'CommonGameTag' = 2399
TOP_BIKINI: 'CommonGameTag' = 1236
TOP_BLOUSE: 'CommonGameTag' = 155
TOP_BRASSIERE: 'CommonGameTag' = 944
TOP_BUTTON_UPS: 'CommonGameTag' = 395
TOP_JACKET: 'CommonGameTag' = 295
TOP_POLO: 'CommonGameTag' = 943
TOP_SHIRT_TEE: 'CommonGameTag' = 296
TOP_SUIT_JACKET: 'CommonGameTag' = 942
TOP_SWEATER: 'CommonGameTag' = 297
TOP_SWEATSHIRT: 'CommonGameTag' = 941
TOP_TANKTOP: 'CommonGameTag' = 360
TOP_VEST: 'CommonGameTag' = 156
TRAIT_ACHIEVEMENT: 'CommonGameTag' = 235
TRAIT_AGE: 'CommonGameTag' = 657
TRAIT_GROUP_EMOTIONAL: 'CommonGameTag' = 753
TRAIT_GROUP_HOBBIES: 'CommonGameTag' = 754
TRAIT_GROUP_LIFESTYLE: 'CommonGameTag' = 755
TRAIT_GROUP_SOCIAL: 'CommonGameTag' = 756
TRAIT_PERSONALITY: 'CommonGameTag' = 234
TRAIT_WALKSTYLE: 'CommonGameTag' = 236
UNIFORM_ACTIVIST_CRIMINAL_JUSTICE: 'CommonGameTag' = 55413
UNIFORM_ACTIVIST_ECONOMIC_GROWTH: 'CommonGameTag' = 55414
UNIFORM_ACTIVIST_ENVIRONMENT: 'CommonGameTag' = 55415
UNIFORM_ACTIVIST_GLOBAL_PEACE: 'CommonGameTag' = 55416
UNIFORM_ACTIVIST_TAX_REFORM: 'CommonGameTag' = 55417
UNIFORM_ACTOR_CAREER_COMMERCIAL_HOSPITAL_ACTOR: 'CommonGameTag' = 61561
UNIFORM_ACTOR_CAREER_COMMERCIAL_HOSPITAL_CO_STAR: 'CommonGameTag' = 61562
UNIFORM_ACTOR_CAREER_COMMERCIAL_HOUSE_NICE_ACTOR: 'CommonGameTag' = 61564
UNIFORM_ACTOR_CAREER_COMMERCIAL_HOUSE_NICE_CO_STAR: 'CommonGameTag' = 61565
UNIFORM_ACTOR_CAREER_COMMERCIAL_KIDS_ACTOR: 'CommonGameTag' = 61566
UNIFORM_ACTOR_CAREER_COMMERCIAL_PIRATE_ACTOR: 'CommonGameTag' = 61560
UNIFORM_ACTOR_CAREER_COMMERCIAL_WESTERN_ACTOR: 'CommonGameTag' = 61563
UNIFORM_ACTOR_CAREER_MOVIE_CITY_ACTOR: 'CommonGameTag' = 61608
UNIFORM_ACTOR_CAREER_MOVIE_CITY_CO_STAR: 'CommonGameTag' = 61452
UNIFORM_ACTOR_CAREER_MOVIE_CITY_LOVE_INTEREST: 'CommonGameTag' = 61451
UNIFORM_ACTOR_CAREER_MOVIE_MEDIEVAL_ACTOR: 'CommonGameTag' = 61594
UNIFORM_ACTOR_CAREER_MOVIE_MEDIEVAL_LOVE_INTEREST: 'CommonGameTag' = 61596
UNIFORM_ACTOR_CAREER_MOVIE_MEDIEVAL_VILLAIN: 'CommonGameTag' = 61595
UNIFORM_ACTOR_CAREER_MOVIE_PIRATE_ACTOR: 'CommonGameTag' = 61591
UNIFORM_ACTOR_CAREER_MOVIE_PIRATE_LOVE_INTEREST: 'CommonGameTag' = 61593
UNIFORM_ACTOR_CAREER_MOVIE_PIRATE_VILLAIN: 'CommonGameTag' = 61592
UNIFORM_ACTOR_CAREER_MOVIE_SUPER_HERO_ACTOR: 'CommonGameTag' = 61603
UNIFORM_ACTOR_CAREER_MOVIE_SUPER_HERO_LOVE_INTEREST: 'CommonGameTag' = 61605
UNIFORM_ACTOR_CAREER_MOVIE_SUPER_HERO_VILLAIN: 'CommonGameTag' = 61604
UNIFORM_ACTOR_CAREER_MOVIE_VICTORIAN_ACTOR: 'CommonGameTag' = 61600
UNIFORM_ACTOR_CAREER_MOVIE_VICTORIAN_CO_STAR: 'CommonGameTag' = 61602
UNIFORM_ACTOR_CAREER_MOVIE_VICTORIAN_LOVE_INTEREST: 'CommonGameTag' = 61601
UNIFORM_ACTOR_CAREER_MOVIE_WESTERN_ACTOR: 'CommonGameTag' = 61597
UNIFORM_ACTOR_CAREER_MOVIE_WESTERN_ALIEN: 'CommonGameTag' = 61599
UNIFORM_ACTOR_CAREER_MOVIE_WESTERN_CREATURE: 'CommonGameTag' = 61598
UNIFORM_ACTOR_CAREER_TV_HIGH_APOCALYPSE_ACTOR: 'CommonGameTag' = 61577
UNIFORM_ACTOR_CAREER_TV_HIGH_APOCALYPSE_CO_STAR: 'CommonGameTag' = 61578
UNIFORM_ACTOR_CAREER_TV_HIGH_APOCALYPSE_VILLAIN: 'CommonGameTag' = 61579
UNIFORM_ACTOR_CAREER_TV_HIGH_HOSPITAL_ACTOR: 'CommonGameTag' = 61580
UNIFORM_ACTOR_CAREER_TV_HIGH_HOSPITAL_CO_STAR: 'CommonGameTag' = 61582
UNIFORM_ACTOR_CAREER_TV_HIGH_HOSPITAL_LOVE_INTEREST: 'CommonGameTag' = 61581
UNIFORM_ACTOR_CAREER_TV_HIGH_POLICE_ACTOR: 'CommonGameTag' = 61588
UNIFORM_ACTOR_CAREER_TV_HIGH_POLICE_CO_STAR: 'CommonGameTag' = 61590
UNIFORM_ACTOR_CAREER_TV_HIGH_POLICE_VILLAIN: 'CommonGameTag' = 61589
UNIFORM_ACTOR_CAREER_TV_HIGH_VICTORIAN_ACTOR: 'CommonGameTag' = 61585
UNIFORM_ACTOR_CAREER_TV_HIGH_VICTORIAN_CO_STAR: 'CommonGameTag' = 61587
UNIFORM_ACTOR_CAREER_TV_HIGH_VICTORIAN_LOVE_INTEREST: 'CommonGameTag' = 61586
UNIFORM_ACTOR_CAREER_TV_HIGH_WESTERN_ACTOR: 'CommonGameTag' = 61583
UNIFORM_ACTOR_CAREER_TV_HIGH_WESTERN_VILLAIN: 'CommonGameTag' = 61584
UNIFORM_ACTOR_CAREER_TV_LOW_HOUSE_LOW_ACTOR: 'CommonGameTag' = 61574
UNIFORM_ACTOR_CAREER_TV_LOW_HOUSE_LOW_CO_STAR: 'CommonGameTag' = 61575
UNIFORM_ACTOR_CAREER_TV_LOW_HOUSE_NICE_ACTOR: 'CommonGameTag' = 61570
UNIFORM_ACTOR_CAREER_TV_LOW_HOUSE_NICE_CO_STAR: 'CommonGameTag' = 61571
UNIFORM_ACTOR_CAREER_TV_LOW_KIDS_ACTOR: 'CommonGameTag' = 61576
UNIFORM_ACTOR_CAREER_TV_LOW_PIRATE_ACTOR: 'CommonGameTag' = 61567
UNIFORM_ACTOR_CAREER_TV_LOW_PIRATE_CO_STAR: 'CommonGameTag' = 61569
UNIFORM_ACTOR_CAREER_TV_LOW_PIRATE_LOVE_INTEREST: 'CommonGameTag' = 61568
UNIFORM_ACTOR_CAREER_TV_LOW_WESTERN_ACTOR: 'CommonGameTag' = 61572
UNIFORM_ACTOR_CAREER_TV_LOW_WESTERN_CO_STAR: 'CommonGameTag' = 61573
UNIFORM_ARRESTED: 'CommonGameTag' = 12336
UNIFORM_ART_CRITIC_SHOW_FORMAL: 'CommonGameTag' = 55395
UNIFORM_ARTS_CENTER_PAINTER: 'CommonGameTag' = 55357
UNIFORM_ASTRONAUT_STATUE_GOLD: 'CommonGameTag' = 55302
UNIFORM_ASTRONAUT_STATUE_SILVER: 'CommonGameTag' = 55354
UNIFORM_ASTRONAUT_SUIT: 'CommonGameTag' = 614
UNIFORM_ATHLETIC_CHEERLEADER: 'CommonGameTag' = 1262
UNIFORM_ATHLETIC_LIFTER: 'CommonGameTag' = 1263
UNIFORM_ATHLETIC_MAJOR_LEAGUER: 'CommonGameTag' = 1266
UNIFORM_ATHLETIC_MASCOT: 'CommonGameTag' = 1264
UNIFORM_ATHLETIC_MINOR_LEAGUER: 'CommonGameTag' = 1267
UNIFORM_ATHLETIC_TRACK_SUIT: 'CommonGameTag' = 1265
UNIFORM_BABYSITTER: 'CommonGameTag' = 887
UNIFORM_BACKGROUND_ACTOR_COSTUME_1: 'CommonGameTag' = 61642
UNIFORM_BACKGROUND_ACTOR_COSTUME_2: 'CommonGameTag' = 61643
UNIFORM_BACKGROUND_ACTOR_COSTUME_3: 'CommonGameTag' = 61644
UNIFORM_BACKGROUND_ACTOR_COSTUME_4: 'CommonGameTag' = 61645
UNIFORM_BACKGROUND_ACTOR_COSTUME_5: 'CommonGameTag' = 61646
UNIFORM_BARISTA: 'CommonGameTag' = 884
UNIFORM_BARTENDER: 'CommonGameTag' = 621
UNIFORM_BARTENDER_JUNGLE: 'CommonGameTag' = 45090
UNIFORM_BATUU_ALIEN_ABEDNEDO: 'CommonGameTag' = 2471
UNIFORM_BATUU_ALIEN_BITH: 'CommonGameTag' = 2472
UNIFORM_BATUU_ALIEN_MIRIALAN: 'CommonGameTag' = 2473
UNIFORM_BATUU_ALIEN_TWILEK: 'CommonGameTag' = 2474
UNIFORM_BATUU_ALIEN_WEEQUAY: 'CommonGameTag' = 2475
UNIFORM_BATUU_ALIEN_ZABRAK: 'CommonGameTag' = 2476
UNIFORM_BATUU_BARTENDER: 'CommonGameTag' = 51225
UNIFORM_BATUU_CITIZEN: 'CommonGameTag' = 51210
UNIFORM_BATUU_FIRST_ORDER_OFFICER: 'CommonGameTag' = 51205
UNIFORM_BATUU_FIRST_ORDER_PILOT: 'CommonGameTag' = 51221
UNIFORM_BATUU_FIRST_ORDER_STORMTROOPER: 'CommonGameTag' = 51201
UNIFORM_BATUU_RESISTANCE_MEMBER: 'CommonGameTag' = 51202
UNIFORM_BATUU_RESISTANCE_PILOT: 'CommonGameTag' = 51222
UNIFORM_BATUU_SCOUNDREL_MEMBER: 'CommonGameTag' = 51209
UNIFORM_BATUU_SERVICE_NPC: 'CommonGameTag' = 51224
UNIFORM_BEAR_SUIT: 'CommonGameTag' = 10258
UNIFORM_BEE_KEEPING_SUIT: 'CommonGameTag' = 59466
UNIFORM_BIG_HEAD: 'CommonGameTag' = 2244
UNIFORM_BIKE_HELMET: 'CommonGameTag' = 65618
UNIFORM_BLACK_AND_WHITE_PARTY: 'CommonGameTag' = 682
UNIFORM_BLACK_TURTLENECK: 'CommonGameTag' = 627
UNIFORM_BONEHILDA: 'CommonGameTag' = 86029
UNIFORM_BOWLING_GLOVES: 'CommonGameTag' = 38924
UNIFORM_BOWLING_NPC: 'CommonGameTag' = 38918
UNIFORM_BOWLING_SHOES: 'CommonGameTag' = 38923
UNIFORM_BOWLING_TEAM_1: 'CommonGameTag' = 38914
UNIFORM_BOWLING_TEAM_2: 'CommonGameTag' = 38915
UNIFORM_BOWLING_TEAM_3: 'CommonGameTag' = 38916
UNIFORM_BOWLING_TEAM_4: 'CommonGameTag' = 38917
UNIFORM_BUSINESS_CHEAP_SUIT: 'CommonGameTag' = 1269
UNIFORM_BUSINESS_DECENT_SUIT: 'CommonGameTag' = 1270
UNIFORM_BUSINESS_EXPENSIVE_SUIT: 'CommonGameTag' = 1271
UNIFORM_BUSINESS_OFFICE_WORKER: 'CommonGameTag' = 1268
UNIFORM_BUTLER: 'CommonGameTag' = 36869
UNIFORM_CAMERA_OPERATOR: 'CommonGameTag' = 61450
UNIFORM_CAREER_GARDENER_BOTANIST: 'CommonGameTag' = 59480
UNIFORM_CAREER_GARDENER_FLORIST: 'CommonGameTag' = 59481
UNIFORM_CAREER_GARDENER_MAIN: 'CommonGameTag' = 59479
UNIFORM_CHEF: 'CommonGameTag' = 620
UNIFORM_CHILDHOOD_PHASE_BEAR: 'CommonGameTag' = 43027
UNIFORM_CIVIC_INSPECTOR: 'CommonGameTag' = 67627
UNIFORM_CIVIL_DESIGNER_CIVIC_PLANNER: 'CommonGameTag' = 67641
UNIFORM_CIVIL_DESIGNER_GREEN_TECHNICIAN: 'CommonGameTag' = 67640
UNIFORM_CIVIL_DESIGNER_MAIN: 'CommonGameTag' = 67639
UNIFORM_CLOWN: 'CommonGameTag' = 680
UNIFORM_CONCERT_OUTFIT: 'CommonGameTag' = 618
UNIFORM_CONSERVATIONIST_ENVIRONMENTAL_MANAGER: 'CommonGameTag' = 63523
UNIFORM_CONSERVATIONIST_MAIN: 'CommonGameTag' = 63522
UNIFORM_CONSERVATIONIST_MARINE_BIOLOGIST: 'CommonGameTag' = 63524
UNIFORM_CONSPIRACIST: 'CommonGameTag' = 47130
UNIFORM_COOK: 'CommonGameTag' = 619
UNIFORM_CORPORATE_WORKER_EXPERT: 'CommonGameTag' = 69708
UNIFORM_CORPORATE_WORKER_MAIN: 'CommonGameTag' = 69707
UNIFORM_CORPORATE_WORKER_SUPERVISOR: 'CommonGameTag' = 69709
UNIFORM_COSTUME_AAYLA_SECURA: 'CommonGameTag' = 1486
UNIFORM_COSTUME_ALIEN_HUNTER: 'CommonGameTag' = 1700
UNIFORM_COSTUME_ANIMAL_HOOD: 'CommonGameTag' = 2113
UNIFORM_COSTUME_ANIMAL_HOODIE: 'CommonGameTag' = 59475
UNIFORM_COSTUME_ASTRONAUT_ORANGE: 'CommonGameTag' = 1480
UNIFORM_COSTUME_ASTRONAUT_WHITE: 'CommonGameTag' = 1466
UNIFORM_COSTUME_BOBA_FETT: 'CommonGameTag' = 1475
UNIFORM_COSTUME_CARTOON_PLUMBERS: 'CommonGameTag' = 1631
UNIFORM_COSTUME_CHEERLEADER_GREEN: 'CommonGameTag' = 1476
UNIFORM_COSTUME_CLOWN_PINK: 'CommonGameTag' = 1481
UNIFORM_COSTUME_CLOWN_YELLOW: 'CommonGameTag' = 1467
UNIFORM_COSTUME_COLORFUL_ANIMALS: 'CommonGameTag' = 1632
UNIFORM_COSTUME_DARTH_MAUL: 'CommonGameTag' = 1474
UNIFORM_COSTUME_DARTH_VADER: 'CommonGameTag' = 1473
UNIFORM_COSTUME_FAIRY: 'CommonGameTag' = 22530
UNIFORM_COSTUME_FAIRY_BLUE: 'CommonGameTag' = 22547
UNIFORM_COSTUME_FAIRY_GREEN: 'CommonGameTag' = 22546
UNIFORM_COSTUME_FAIRY_PURPLE: 'CommonGameTag' = 22548
UNIFORM_COSTUME_HOLIDAY_HELPER: 'CommonGameTag' = 59473
UNIFORM_COSTUME_HOT_DOG_RED: 'CommonGameTag' = 1468
UNIFORM_COSTUME_LEGIONNAIRE: 'CommonGameTag' = 22532
UNIFORM_COSTUME_LEIA: 'CommonGameTag' = 1485
UNIFORM_COSTUME_LLAMA: 'CommonGameTag' = 22531
UNIFORM_COSTUME_LLAMA_GIRL_PURPLE: 'CommonGameTag' = 22549
UNIFORM_COSTUME_LLAMA_MAN_BLACK: 'CommonGameTag' = 22544
UNIFORM_COSTUME_LUKE_SKYWALKER: 'CommonGameTag' = 1472
UNIFORM_COSTUME_MAID_BLACK: 'CommonGameTag' = 1483
UNIFORM_COSTUME_MAID_BLUE: 'CommonGameTag' = 1470
UNIFORM_COSTUME_MAILMAN_BLUE: 'CommonGameTag' = 1479
UNIFORM_COSTUME_MASCOT_BLUE_BLACK: 'CommonGameTag' = 1469
UNIFORM_COSTUME_MASCOT_WHITE: 'CommonGameTag' = 1482
UNIFORM_COSTUME_MONSTER: 'CommonGameTag' = 1699
UNIFORM_COSTUME_NINJA: 'CommonGameTag' = 22533
UNIFORM_COSTUME_NINJA_RED: 'CommonGameTag' = 22543
UNIFORM_COSTUME_PIRATE: 'CommonGameTag' = 22534
UNIFORM_COSTUME_PIRATE_BROWN: 'CommonGameTag' = 22559
UNIFORM_COSTUME_PIRATE_NAVY: 'CommonGameTag' = 22542
UNIFORM_COSTUME_PIRATE_RED: 'CommonGameTag' = 22550
UNIFORM_COSTUME_PIRATE_WHITE: 'CommonGameTag' = 22566
UNIFORM_COSTUME_PIZZA_ORANGE: 'CommonGameTag' = 1471
UNIFORM_COSTUME_PIZZA_RED: 'CommonGameTag' = 1484
UNIFORM_COSTUME_PRINCESS: 'CommonGameTag' = 22537
UNIFORM_COSTUME_PRINCESS_BLUE: 'CommonGameTag' = 22556
UNIFORM_COSTUME_PRINCESS_GOLD: 'CommonGameTag' = 22557
UNIFORM_COSTUME_PRINCESS_PINK: 'CommonGameTag' = 22558
UNIFORM_COSTUME_PUMPKIN_BROWN: 'CommonGameTag' = 22564
UNIFORM_COSTUME_PUMPKIN_MAN: 'CommonGameTag' = 22535
UNIFORM_COSTUME_PUMPKIN_NAVY: 'CommonGameTag' = 22563
UNIFORM_COSTUME_PUMPKIN_PLUM: 'CommonGameTag' = 22565
UNIFORM_COSTUME_ROBO_HAT: 'CommonGameTag' = 2225
UNIFORM_COSTUME_SAUSAGE_GRAY: 'CommonGameTag' = 1489
UNIFORM_COSTUME_SCHOOL_GIRL: 'CommonGameTag' = 22538
UNIFORM_COSTUME_SKELETON: 'CommonGameTag' = 22539
UNIFORM_COSTUME_SKELETON_GREEN: 'CommonGameTag' = 22561
UNIFORM_COSTUME_SKELETON_ORANGE: 'CommonGameTag' = 22562
UNIFORM_COSTUME_SKELETON_WHITE: 'CommonGameTag' = 22560
UNIFORM_COSTUME_SMUGGLER_BROWN: 'CommonGameTag' = 1488
UNIFORM_COSTUME_SMUGGLER_TAN: 'CommonGameTag' = 1477
UNIFORM_COSTUME_SPACE_RANGER_BLACK: 'CommonGameTag' = 1487
UNIFORM_COSTUME_SPACE_RANGER_BLUE: 'CommonGameTag' = 1478
UNIFORM_COSTUME_SPARTAN_BROWN: 'CommonGameTag' = 22551
UNIFORM_COSTUME_SPARTAN_GOLD: 'CommonGameTag' = 22545
UNIFORM_COSTUME_TREE_FIR: 'CommonGameTag' = 59474
UNIFORM_COSTUME_WITCH: 'CommonGameTag' = 22536
UNIFORM_COSTUME_WITCH_BLACK: 'CommonGameTag' = 22552
UNIFORM_COSTUME_WITCH_GREEN: 'CommonGameTag' = 22553
UNIFORM_COSTUME_WITCH_ORANGE: 'CommonGameTag' = 22554
UNIFORM_COSTUME_YODA: 'CommonGameTag' = 1490
UNIFORM_COSTUME_ZOMBIE_BLUE: 'CommonGameTag' = 22555
UNIFORM_COWBOY_STATUE_GOLD: 'CommonGameTag' = 55433
UNIFORM_CRIME_BOSS: 'CommonGameTag' = 623
UNIFORM_CRIME_LORD_HAT: 'CommonGameTag' = 622
UNIFORM_DAY_OF_THE_DEAD_WALKBY: 'CommonGameTag' = 1568
UNIFORM_DAY_OF_THE_DEAD_WALKBY_FEMALE: 'CommonGameTag' = 1569
UNIFORM_DEBATE_JUDGE: 'CommonGameTag' = 65590
UNIFORM_DETECTIVE: 'CommonGameTag' = 12334
UNIFORM_DIRECTOR: 'CommonGameTag' = 61449
UNIFORM_DIVER: 'CommonGameTag' = 63515
UNIFORM_DJ_HIGH: 'CommonGameTag' = 24584
UNIFORM_DJ_LOW: 'CommonGameTag' = 24583
UNIFORM_DOCTOR_HIGH: 'CommonGameTag' = 12340
UNIFORM_DOCTOR_LOW: 'CommonGameTag' = 12339
UNIFORM_DRAMA_CLUB: 'CommonGameTag' = 61639
UNIFORM_ECO_INSPECTOR: 'CommonGameTag' = 67626
UNIFORM_EDUCATION: 'CommonGameTag' = 65552
UNIFORM_EDUCATION_ADMIN: 'CommonGameTag' = 65553
UNIFORM_EDUCATION_PROFESSOR: 'CommonGameTag' = 65554
UNIFORM_ELBOW_PATCH_JACKET: 'CommonGameTag' = 625
UNIFORM_EP01_ALIEN: 'CommonGameTag' = 12385
UNIFORM_EP01_DOCTOR_MID: 'CommonGameTag' = 12357
UNIFORM_EP01_POLICE_CHIEF: 'CommonGameTag' = 12426
UNIFORM_EP01_RETAIL_EMPLOYEE: 'CommonGameTag' = 12412
UNIFORM_EP01_SCIENTIST_ALIEN_HUNTER: 'CommonGameTag' = 12381
UNIFORM_EP01_SCIENTIST_HIGH: 'CommonGameTag' = 12349
UNIFORM_EP01_SCIENTIST_LOW: 'CommonGameTag' = 12350
UNIFORM_EP01_SCIENTIST_MID: 'CommonGameTag' = 12359
UNIFORM_EP01_SCIENTIST_VERY_HIGH: 'CommonGameTag' = 12399
UNIFORM_EP01_SUSPECT_BLACK_HAIR: 'CommonGameTag' = 12401
UNIFORM_EP01_SUSPECT_BLONDE_HAIR: 'CommonGameTag' = 12367
UNIFORM_EP01_SUSPECT_BOTTOM_PANTS: 'CommonGameTag' = 12408
UNIFORM_EP01_SUSPECT_BOTTOM_SHORTS: 'CommonGameTag' = 12411
UNIFORM_EP01_SUSPECT_BOTTOM_SKIRT: 'CommonGameTag' = 12409
UNIFORM_EP01_SUSPECT_BOTTOM_SLACKS: 'CommonGameTag' = 12410
UNIFORM_EP01_SUSPECT_BROWN_HAIR: 'CommonGameTag' = 12402
UNIFORM_EP01_SUSPECT_GREY_HAIR: 'CommonGameTag' = 12432
UNIFORM_EP01_SUSPECT_RED_HAIR: 'CommonGameTag' = 12366
UNIFORM_EP01_SUSPECT_TOP_BLOUSE: 'CommonGameTag' = 12406
UNIFORM_EP01_SUSPECT_TOP_JACKET: 'CommonGameTag' = 12404
UNIFORM_EP01_SUSPECT_TOP_LONG_SLEEVE: 'CommonGameTag' = 12405
UNIFORM_EP01_SUSPECT_TOP_SHORT_SLEEVE: 'CommonGameTag' = 12403
UNIFORM_EP01_SUSPECT_TOP_TANK: 'CommonGameTag' = 12407
UNIFORM_EP07_VENDOR: 'CommonGameTag' = 63525
UNIFORM_ESPORTS_PLAYER_ARTS: 'CommonGameTag' = 65601
UNIFORM_ESPORTS_PLAYER_SCIENCE: 'CommonGameTag' = 65602
UNIFORM_FAIRY: 'CommonGameTag' = 8209
UNIFORM_FAST_FOOD: 'CommonGameTag' = 883
UNIFORM_FATHER_WINTER: 'CommonGameTag' = 2071
UNIFORM_FATHER_WINTER_SUMMER: 'CommonGameTag' = 2086
UNIFORM_FESTIVAL_BLOSSOM_SHIRT: 'CommonGameTag' = 55350
UNIFORM_FESTIVAL_FOOD_CURRY_CONTEST_SHIRT: 'CommonGameTag' = 55397
UNIFORM_FESTIVAL_FOOD_SHIRT: 'CommonGameTag' = 55351
UNIFORM_FESTIVAL_LAMP_SHIRT: 'CommonGameTag' = 55352
UNIFORM_FESTIVAL_LLAMA_BLUE: 'CommonGameTag' = 55421
UNIFORM_FESTIVAL_LLAMA_GOLD: 'CommonGameTag' = 55423
UNIFORM_FESTIVAL_LLAMA_SILVER: 'CommonGameTag' = 55424
UNIFORM_FESTIVAL_LLAMA_YELLOW: 'CommonGameTag' = 55422
UNIFORM_FESTIVAL_LOGIC_SHIRT: 'CommonGameTag' = 55353
UNIFORM_FESTIVE_SPIRIT: 'CommonGameTag' = 2089
UNIFORM_FIREFIGHTER: 'CommonGameTag' = 2426
UNIFORM_FLOWER_BUNNY: 'CommonGameTag' = 59458
UNIFORM_FOOD_CRITIC_RESTAURANT_CASUAL: 'CommonGameTag' = 55396
UNIFORM_FOREST_RANGER: 'CommonGameTag' = 10266
UNIFORM_FORTUNE_TELLER: 'CommonGameTag' = 8198
UNIFORM_FRANKENSTEIN: 'CommonGameTag' = 8201
UNIFORM_GAMESCOM_CLOSET_FAIL: 'CommonGameTag' = 24579
UNIFORM_GAMESCOM_CLOSET_SUCCEED: 'CommonGameTag' = 24580
UNIFORM_GP01_CF_TANK_LACE: 'CommonGameTag' = 10291
UNIFORM_GP01_CU_POCKET_ZIP: 'CommonGameTag' = 10288
UNIFORM_GP01_CU_TEE_LONG_SHIRT_PANTS: 'CommonGameTag' = 10290
UNIFORM_GP01_CU_TEE_LONG_SHIRT_SHORTS: 'CommonGameTag' = 10287
UNIFORM_GP01_CU_VEST_DOWN: 'CommonGameTag' = 10289
UNIFORM_GP01_WALKBYS_1: 'CommonGameTag' = 10292
UNIFORM_GP01_WALKBYS_2: 'CommonGameTag' = 10293
UNIFORM_GP01_WALKBYS_3: 'CommonGameTag' = 10294
UNIFORM_GP01_WALKBYS_4: 'CommonGameTag' = 10295
UNIFORM_GP01_WALKBYS_5: 'CommonGameTag' = 10296
UNIFORM_GP01_WALKBYS_6: 'CommonGameTag' = 10297
UNIFORM_GP01_YF_JACKET_FLEECE: 'CommonGameTag' = 10279
UNIFORM_GP01_YF_LAYERS: 'CommonGameTag' = 10276
UNIFORM_GP01_YF_LAYERS_HAT: 'CommonGameTag' = 10277
UNIFORM_GP01_YF_TEE_TIED: 'CommonGameTag' = 10281
UNIFORM_GP01_YF_VEST_FLANNEL: 'CommonGameTag' = 10278
UNIFORM_GP01_YF_VEST_TEE: 'CommonGameTag' = 10280
UNIFORM_GP01_YM_FINGER_SHIRT: 'CommonGameTag' = 10285
UNIFORM_GP01_YM_TANK: 'CommonGameTag' = 10283
UNIFORM_GP01_YM_THICK_LAYERS: 'CommonGameTag' = 10284
UNIFORM_GP01_YM_VEST_CARABINER: 'CommonGameTag' = 10282
UNIFORM_GP01_YM_VEST_FLEECE: 'CommonGameTag' = 10286
UNIFORM_GRIM_REAPER: 'CommonGameTag' = 316
UNIFORM_GRIM_REAPER_HELPER: 'CommonGameTag' = 366
UNIFORM_HACKER: 'CommonGameTag' = 624
UNIFORM_HAIR_MAKEUP_CHAIR_STYLIST: 'CommonGameTag' = 61453
UNIFORM_HAZMAT_SUIT: 'CommonGameTag' = 47127
UNIFORM_HAZMAT_SUIT_WITH_FILTER: 'CommonGameTag' = 47128
UNIFORM_HERMIT: 'CommonGameTag' = 10257
UNIFORM_HIRED_NANNY: 'CommonGameTag' = 1549
UNIFORM_HOT_DOG: 'CommonGameTag' = 681
UNIFORM_INVESTIGATIVE_JOURNALIST: 'CommonGameTag' = 626
UNIFORM_ISLAND_ELEMENTAL: 'CommonGameTag' = 63516
UNIFORM_ISLAND_LOCAL: 'CommonGameTag' = 63513
UNIFORM_ISLAND_LOCAL_FLOWER_MUSIC: 'CommonGameTag' = 63514
UNIFORM_JAPANESE_TRADITIONAL: 'CommonGameTag' = 69694
UNIFORM_JUNGLE_VENDOR1: 'CommonGameTag' = 45102
UNIFORM_JUNGLE_VENDOR2: 'CommonGameTag' = 45103
UNIFORM_JUNGLE_VENDOR3: 'CommonGameTag' = 45104
UNIFORM_KNIGHT_SUIT: 'CommonGameTag' = 24610
UNIFORM_LAW_CAREER_JUDGE: 'CommonGameTag' = 65628
UNIFORM_LAW_CAREER_MAIN: 'CommonGameTag' = 65627
UNIFORM_LAW_CAREER_MAIN_HIGH: 'CommonGameTag' = 65630
UNIFORM_LAW_CAREER_PRIVATE_ATTORNEY: 'CommonGameTag' = 65629
UNIFORM_LIFEGUARD: 'CommonGameTag' = 63502
UNIFORM_LOVE_GURU: 'CommonGameTag' = 55358
UNIFORM_MAID: 'CommonGameTag' = 262
UNIFORM_MAID_DEPRECATED: 'CommonGameTag' = 636
UNIFORM_MAILMAN: 'CommonGameTag' = 341
UNIFORM_MAINTENANCE_WORKER: 'CommonGameTag' = 613
UNIFORM_MANUAL_LABOR: 'CommonGameTag' = 885
UNIFORM_MASCOT_ALT_ARTS: 'CommonGameTag' = 65588
UNIFORM_MASCOT_ALT_SCIENCE: 'CommonGameTag' = 65589
UNIFORM_MASCOT_ARTS: 'CommonGameTag' = 65586
UNIFORM_MASCOT_SCIENCE: 'CommonGameTag' = 65587
UNIFORM_MASSAGE_THERAPIST: 'CommonGameTag' = 18446
UNIFORM_MASSAGE_TOWEL: 'CommonGameTag' = 18450
UNIFORM_MASTER_FISHERMAN: 'CommonGameTag' = 867
UNIFORM_MASTER_GARDENER: 'CommonGameTag' = 868
UNIFORM_MILITARY_COVERT_HEADSET: 'CommonGameTag' = 47123
UNIFORM_MILITARY_COVERT_SUIT: 'CommonGameTag' = 47121
UNIFORM_MILITARY_COVERT_SUNGLASSES: 'CommonGameTag' = 47122
UNIFORM_MILITARY_MAIN_LEVEL_01: 'CommonGameTag' = 47111
UNIFORM_MILITARY_MAIN_LEVEL_02: 'CommonGameTag' = 47112
UNIFORM_MILITARY_MAIN_LEVEL_03: 'CommonGameTag' = 47113
UNIFORM_MILITARY_MAIN_LEVEL_04: 'CommonGameTag' = 47114
UNIFORM_MILITARY_MAIN_LEVEL_05: 'CommonGameTag' = 47115
UNIFORM_MILITARY_OFFICER_LEVEL_01: 'CommonGameTag' = 47116
UNIFORM_MILITARY_OFFICER_LEVEL_02: 'CommonGameTag' = 47117
UNIFORM_MILITARY_OFFICER_LEVEL_03: 'CommonGameTag' = 47118
UNIFORM_MILITARY_OFFICER_LEVEL_04: 'CommonGameTag' = 47119
UNIFORM_MILITARY_OFFICER_LEVEL_05: 'CommonGameTag' = 47120
UNIFORM_NINJA: 'CommonGameTag' = 8205
UNIFORM_OFFICE_WORKER: 'CommonGameTag' = 607
UNIFORM_ONSEN_VENUE_EMPLOYEE: 'CommonGameTag' = 69664
UNIFORM_ORACLE: 'CommonGameTag' = 659
UNIFORM_ORGANIZATION_ART_SOCIETY_MEMBER: 'CommonGameTag' = 65617
UNIFORM_ORGANIZATION_ART_SOCIETY_MODEL: 'CommonGameTag' = 65616
UNIFORM_ORGANIZATION_DEBATE: 'CommonGameTag' = 65635
UNIFORM_ORGANIZATION_DEBATE_JUDGE: 'CommonGameTag' = 65642
UNIFORM_ORGANIZATION_DEBATE_SHOWDOWN: 'CommonGameTag' = 65643
UNIFORM_ORGANIZATION_DEBATE_SHOWDOWN_FOXBURY: 'CommonGameTag' = 65654
UNIFORM_ORGANIZATION_HONOR: 'CommonGameTag' = 65636
UNIFORM_ORGANIZATION_PARTY: 'CommonGameTag' = 65637
UNIFORM_ORGANIZATION_PRANK: 'CommonGameTag' = 65638
UNIFORM_ORGANIZATION_ROBOTICS: 'CommonGameTag' = 65634
UNIFORM_PAINTER: 'CommonGameTag' = 629
UNIFORM_PAPARAZZI: 'CommonGameTag' = 61606
UNIFORM_PART_TIME_FISHERMAN: 'CommonGameTag' = 63520
UNIFORM_PARTS_BRIDE: 'CommonGameTag' = 631
UNIFORM_PARTS_GROOM: 'CommonGameTag' = 630
UNIFORM_PARTS_LIBRARIAN: 'CommonGameTag' = 633
UNIFORM_PARTS_OFFICE_WORKER: 'CommonGameTag' = 634
UNIFORM_PARTS_PARK_SLEEPER: 'CommonGameTag' = 635
UNIFORM_PARTY_PARTY_HATS: 'CommonGameTag' = 632
UNIFORM_PATIENT: 'CommonGameTag' = 12338
UNIFORM_PIRATE: 'CommonGameTag' = 8203
UNIFORM_PIZZA_DELIVERY: 'CommonGameTag' = 637
UNIFORM_POLICE_OFFICER: 'CommonGameTag' = 12335
UNIFORM_POLITICIAN_HIGH_LEVEL: 'CommonGameTag' = 55418
UNIFORM_POLITICIAN_LOW_LEVEL: 'CommonGameTag' = 55420
UNIFORM_POLITICIAN_MEDIUM_LEVEL: 'CommonGameTag' = 55419
UNIFORM_PRINCESS: 'CommonGameTag' = 8208
UNIFORM_PRO_GAMER: 'CommonGameTag' = 628
UNIFORM_PROFESSOR_NPC_GOOD: 'CommonGameTag' = 65647
UNIFORM_PROFESSOR_NPC_GRUMPY: 'CommonGameTag' = 65646
UNIFORM_PROFESSOR_NPC_HIP: 'CommonGameTag' = 65645
UNIFORM_PROFESSOR_NPC_SMART: 'CommonGameTag' = 65644
UNIFORM_PRODUCER: 'CommonGameTag' = 61628
UNIFORM_PUMPKIN: 'CommonGameTag' = 8206
UNIFORM_RACCOON: 'CommonGameTag' = 55372
UNIFORM_REFLEXOLOGIST: 'CommonGameTag' = 18460
UNIFORM_REPAIR: 'CommonGameTag' = 1491
UNIFORM_REPO_PERSON: 'CommonGameTag' = 65633
UNIFORM_RESTAURANT_CRITIC: 'CommonGameTag' = 26644
UNIFORM_RETAIL: 'CommonGameTag' = 886
UNIFORM_ROBE: 'CommonGameTag' = 18437
UNIFORM_ROCK_CLIMBING_GEAR_GLOVES: 'CommonGameTag' = 69743
UNIFORM_ROCK_CLIMBING_GEAR_SHOES: 'CommonGameTag' = 69744
UNIFORM_SCHOOL_GIRL: 'CommonGameTag' = 8207
UNIFORM_SCOUT_BASIC: 'CommonGameTag' = 59464
UNIFORM_SCOUT_EXPERT: 'CommonGameTag' = 59465
UNIFORM_SECRET_SOCIETY_LEVEL_1: 'CommonGameTag' = 65566
UNIFORM_SECRET_SOCIETY_LEVEL_2: 'CommonGameTag' = 65567
UNIFORM_SECRET_SOCIETY_LEVEL_3: 'CommonGameTag' = 65568
UNIFORM_SHOES_OFF_INDOORS: 'CommonGameTag' = 69703
UNIFORM_SKATING_GENERIC: 'CommonGameTag' = 59471
UNIFORM_SKATING_ICE: 'CommonGameTag' = 59433
UNIFORM_SKATING_PRO: 'CommonGameTag' = 59442
UNIFORM_SKATING_ROLLER: 'CommonGameTag' = 59434
UNIFORM_SKELETON: 'CommonGameTag' = 8204
UNIFORM_SKELETON_GP06: 'CommonGameTag' = 45088
UNIFORM_SKI_BOOTS: 'CommonGameTag' = 69738
UNIFORM_SLIPPERS_INDOORS: 'CommonGameTag' = 69702
UNIFORM_SMUGGLER: 'CommonGameTag' = 616
UNIFORM_SNOWBOARD_BOOTS: 'CommonGameTag' = 69739
UNIFORM_SNOWY_VENDOR: 'CommonGameTag' = 69722
UNIFORM_SOCCER_PLAYER_ARTS: 'CommonGameTag' = 65599
UNIFORM_SOCCER_PLAYER_SCIENCE: 'CommonGameTag' = 65600
UNIFORM_SPACE_RANGER: 'CommonGameTag' = 615
UNIFORM_SPARTAN: 'CommonGameTag' = 8211
UNIFORM_SPELLCASTER_EDGY: 'CommonGameTag' = 49177
UNIFORM_SPELLCASTER_FAIRYTALE: 'CommonGameTag' = 49176
UNIFORM_SPELLCASTER_SAGE: 'CommonGameTag' = 49178
UNIFORM_SPELLCASTER_SAGE_MISCHIEF: 'CommonGameTag' = 49180
UNIFORM_SPELLCASTER_SAGE_PRACTICAL: 'CommonGameTag' = 49179
UNIFORM_SPELLCASTER_SAGE_UNTAMED: 'CommonGameTag' = 49181
UNIFORM_SPELLCASTER_STREET_MODERN: 'CommonGameTag' = 49175
UNIFORM_SPELLCASTER_VINTAGE: 'CommonGameTag' = 49174
UNIFORM_SPORTS_FAN_ARTS: 'CommonGameTag' = 65604
UNIFORM_SPORTS_FAN_SCIENCE: 'CommonGameTag' = 65605
UNIFORM_STALLS_CURIO_SHOP_HAT: 'CommonGameTag' = 47109
UNIFORM_STALLS_CURIO_SHOP_SHIRT: 'CommonGameTag' = 47110
UNIFORM_STALLS_CURIO_SHOP_VENDOR: 'CommonGameTag' = 47108
UNIFORM_STALLS_FOOD_FESTIVAL: 'CommonGameTag' = 55429
UNIFORM_STALLS_GENERIC: 'CommonGameTag' = 55428
UNIFORM_STALLS_GENERIC_MARKET_STALLS: 'CommonGameTag' = 1937
UNIFORM_STALLS_LAMP_FESTIVAL: 'CommonGameTag' = 55430
UNIFORM_STALLS_NERD_FESTIVAL: 'CommonGameTag' = 55432
UNIFORM_STALLS_PET_WORLD: 'CommonGameTag' = 1986
UNIFORM_STALLS_ROMANCE_FESTIVAL: 'CommonGameTag' = 55431
UNIFORM_STRANGERVILLE_SCIENTIST: 'CommonGameTag' = 47140
UNIFORM_SUIT: 'CommonGameTag' = 608
UNIFORM_SUIT_LEISURE: 'CommonGameTag' = 617
UNIFORM_SUMMIT_STUDENT: 'CommonGameTag' = 69674
UNIFORM_SUPER_TUXEDO: 'CommonGameTag' = 610
UNIFORM_TACTICAL_TURTLENECK: 'CommonGameTag' = 612
UNIFORM_TEENAGER: 'CommonGameTag' = 760
UNIFORM_TODDLER_DIAPER_ONLY: 'CommonGameTag' = 1673
UNIFORM_TOURIST: 'CommonGameTag' = 55306
UNIFORM_TOURIST_BASE_GAME: 'CommonGameTag' = 2166
UNIFORM_TOWEL: 'CommonGameTag' = 1440
UNIFORM_TRAGIC_CLOWN: 'CommonGameTag' = 1503
UNIFORM_TURTLE_FANATIC: 'CommonGameTag' = 63521
UNIFORM_TUXEDO: 'CommonGameTag' = 609
UNIFORM_UNIVERSITY_GRADUATION_ARTS: 'CommonGameTag' = 65610
UNIFORM_UNIVERSITY_GRADUATION_ARTS_NO_CAP: 'CommonGameTag' = 65611
UNIFORM_UNIVERSITY_GRADUATION_SCIENCE: 'CommonGameTag' = 65612
UNIFORM_UNIVERSITY_GRADUATION_SCIENCE_NO_CAP: 'CommonGameTag' = 65613
UNIFORM_UNIVERSITY_KIOSK_BOTTOM_AH: 'CommonGameTag' = 65578
UNIFORM_UNIVERSITY_KIOSK_BOTTOM_ST: 'CommonGameTag' = 65579
UNIFORM_UNIVERSITY_KIOSK_HAT_AH: 'CommonGameTag' = 65580
UNIFORM_UNIVERSITY_KIOSK_HAT_ST: 'CommonGameTag' = 65581
UNIFORM_UNIVERSITY_KIOSK_TOP_AH: 'CommonGameTag' = 65576
UNIFORM_UNIVERSITY_KIOSK_TOP_ST: 'CommonGameTag' = 65577
UNIFORM_UNIVERSITY_STUDENT: 'CommonGameTag' = 65555
UNIFORM_UNIVERSITY_STUDENT_ARTS: 'CommonGameTag' = 65584
UNIFORM_UNIVERSITY_STUDENT_SCIENCE: 'CommonGameTag' = 65585
UNIFORM_VENDING_MACHINE_PAPER_HAT: 'CommonGameTag' = 69681
UNIFORM_VENDING_MACHINE_SNOW_OUTFIT: 'CommonGameTag' = 69682
UNIFORM_VENDING_MACHINE_YUKATA: 'CommonGameTag' = 69680
UNIFORM_VET: 'CommonGameTag' = 57398
UNIFORM_VFX_MACHINE_OPERATOR: 'CommonGameTag' = 61629
UNIFORM_VILLAIN: 'CommonGameTag' = 611
UNIFORM_VIP_ROPE_BOUNCER: 'CommonGameTag' = 61478
UNIFORM_WARDROBE_PEDESTAL_STYLIST: 'CommonGameTag' = 61466
UNIFORM_WASTE_MANAGER: 'CommonGameTag' = 67642
UNIFORM_WEIRDO: 'CommonGameTag' = 55307
UNIFORM_WINDENBURG_BARISTA: 'CommonGameTag' = 24603
UNIFORM_WITCH: 'CommonGameTag' = 8202
UNIFORM_YOGA_INSTRUCTOR: 'CommonGameTag' = 18445
VENUE_OBJECT_BENCH: 'CommonGameTag' = 598
VENUE_OBJECT_CHAIR: 'CommonGameTag' = 961
VENUE_OBJECT_EXERCISE: 'CommonGameTag' = 601
VENUE_OBJECT_LOCKER: 'CommonGameTag' = 1443
VENUE_OBJECT_MICROPHONE: 'CommonGameTag' = 597
VENUE_OBJECT_MONKEY_BARS: 'CommonGameTag' = 599
VENUE_OBJECT_ONSEN_LOCKER: 'CommonGameTag' = 69661
VENUE_OBJECT_PAINTING: 'CommonGameTag' = 595
VENUE_OBJECT_PATIO_TABLE: 'CommonGameTag' = 602
VENUE_OBJECT_PLAYGROUND: 'CommonGameTag' = 600
VENUE_OBJECT_RELAXATION: 'CommonGameTag' = 18443
VENUE_OBJECT_SCULPTURE: 'CommonGameTag' = 596
WALL_PATTERN_MASONRY: 'CommonGameTag' = 412
WALL_PATTERN_MISC: 'CommonGameTag' = 415
WALL_PATTERN_PAINT: 'CommonGameTag' = 408
WALL_PATTERN_PANELING: 'CommonGameTag' = 411
WALL_PATTERN_ROCK_AND_STONE: 'CommonGameTag' = 413
WALL_PATTERN_SIDING: 'CommonGameTag' = 414
WALL_PATTERN_TILE: 'CommonGameTag' = 410
WALL_PATTERN_WALLPAPER: 'CommonGameTag' = 409
WORLD_LOG_NOT_INTERACTIVE: 'CommonGameTag' = 1985
| [
"cristina.caballero2406@gmail.com"
] | cristina.caballero2406@gmail.com |
ea712da6c3c5368cbe62fe07cdf80b5d4dfe2388 | 9c894d56f153156b82bc4bbde2db09fb04ec58cf | /17/mc/ExoDiBosonResonances/EDBRTreeMaker/test/c23000.py | ec854653b2df327b7979e936336071e57cb3f4fb | [] | no_license | gqlcms/run2_ntuple | 023bb97238980e3d4e7b8c112bc11e63658f1844 | 196c90facf042a64fddfef1e1c69681ccb9ab71c | refs/heads/master | 2020-08-04T09:01:43.466814 | 2019-10-01T11:40:36 | 2019-10-01T11:40:36 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,400 | py | from WMCore.Configuration import Configuration
config = Configuration()
config.section_("General")
config.General.requestName = 'c2_3000'
config.General.transferLogs = True
config.section_("JobType")
config.JobType.pluginName='Analysis'
config.JobType.sendExternalFolder=True# = 'Analysis'
config.JobType.inputFiles = ['Fall17_17Nov2017_V8_MC_L1FastJet_AK4PFchs.txt','Fall17_17Nov2017_V8_MC_L2Relative_AK4PFchs.txt','Fall17_17Nov2017_V8_MC_L3Absolute_AK4PFchs.txt','Fall17_17Nov2017_V8_MC_L1FastJet_AK8PFchs.txt','Fall17_17Nov2017_V8_MC_L2Relative_AK8PFchs.txt','Fall17_17Nov2017_V8_MC_L3Absolute_AK8PFchs.txt','Fall17_17Nov2017_V8_MC_L1FastJet_AK8PFPuppi.txt','Fall17_17Nov2017_V8_MC_L2Relative_AK8PFPuppi.txt','Fall17_17Nov2017_V8_MC_L3Absolute_AK8PFPuppi.txt','Fall17_17Nov2017_V8_MC_L1FastJet_AK4PFPuppi.txt','Fall17_17Nov2017_V8_MC_L2Relative_AK4PFPuppi.txt','Fall17_17Nov2017_V8_MC_L3Absolute_AK4PFPuppi.txt']
#config.JobType.inputFiles = ['PHYS14_25_V2_All_L1FastJet_AK4PFchs.txt','PHYS14_25_V2_All_L2Relative_AK4PFchs.txt','PHYS14_25_V2_All_L3Absolute_AK4PFchs.txt','PHYS14_25_V2_All_L1FastJet_AK8PFchs.txt','PHYS14_25_V2_All_L2Relative_AK8PFchs.txt','PHYS14_25_V2_All_L3Absolute_AK8PFchs.txt']
# Name of the CMSSW configuration file
#config.JobType.psetName = 'bkg_ana.py'
config.JobType.psetName = 'analysis.py'
#config.JobType.allowUndistributedCMSSW = True
config.JobType.allowUndistributedCMSSW = True
config.section_("Data")
#config.Data.inputDataset = '/WJetsToLNu_13TeV-madgraph-pythia8-tauola/Phys14DR-PU20bx25_PHYS14_25_V1-v1/MINIAODSIM'
config.Data.inputDataset = '/WkkToWRadionToWWW_M3000-R0-06-TuneCUEP8M1_13TeV-madgraph/RunIISummer16MiniAODv2-PUMoriond17_80X_mcRun2_asymptotic_2016_TrancheIV_v6-v1/MINIAODSIM'
config.Data.inputDBS = 'global'
#config.Data.inputDBS = 'phys03'
config.Data.splitting = 'FileBased'
config.Data.unitsPerJob =5
config.Data.totalUnits = -1
# This string is used to construct the output dataset name
name='WWW'
steam_dir='chench'
config.Data.outLFNDirBase='/store/user/chench/'#='/store/group/dpg_trigger/comm_trigger/TriggerStudiesGroup/STEAM/'+steam_dir+'/'+name+'/'
#config.Data.outLFNDirBase='/store/user/chench/'#='/eos/uscms/store/user/jingli/chench/'
config.Data.publication = False
config.Data.outputDatasetTag = 'c2_3000'
config.section_("Site")
# Where the output files will be transmitted to
config.Site.storageSite = 'T2_CH_CERN'
| [
"c.chen@cern.ch"
] | c.chen@cern.ch |
3c30e065e142dc6f48ba905cc61fc78f98dfea69 | 5f4d82c3a6b89b75da63893b77892f9e252b7b06 | /first_year/combinatorial_algorithms/Labs/first/reverse_order/sorter_binary_insertions.py | 22984bc44d908dfb7fa01398d68f5be183655f44 | [] | no_license | jackiejohn/ifmo | 180813cbde45e3e4842452c9a57b5d54bbd207ce | c5ad17de8bfc6baa3c6166220849c564e1071e4b | refs/heads/master | 2021-06-02T06:58:47.726339 | 2017-12-28T16:46:19 | 2017-12-28T16:46:19 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 682 | py | import time
f = open('data1024.txt')
j=0
k = []
numberofelements = int(f.readline())
while j<numberofelements:
i = int(f.readline())
k.append(i)
j=j+1
tit1=time.time()
for i in range(1,len(k)):
if k[i-1]>k[i]:
left = 0
right = i - 1
while True:
mid = (left + right) // 2
if k[mid]>k[i]:
right = mid - 1
else:
left = mid + 1
if left > right:
break
key = k[i]
for j in reversed(range(left+1,i+1)):
k[j] = k[j-1]
k[left] = key
tit2=time.time()
print(tit2-tit1)
| [
"zeionara@gmail.com"
] | zeionara@gmail.com |
0152c1fa815851d72ad325f7a22d2e29930e2d13 | 545bdb267ecc33ead36fadbbb94b0b9584a0d281 | /train_test/model.py | cd9663d35505c065df0fc99bcf241339af590da5 | [] | no_license | Sardhendu/DeepFaceRecognition | 20fb19fccd330505953a7a8796152caff224e8ae | b360a6df8c11f6ddcb5fd58aa55e2b70bb1df23d | refs/heads/master | 2021-09-10T15:08:39.868773 | 2018-03-28T08:28:12 | 2018-03-28T08:28:12 | 112,471,536 | 21 | 7 | null | null | null | null | UTF-8 | Python | false | false | 3,848 | py | from __future__ import division, print_function, absolute_import
from nn.loss import loss
from nn.network import *
from config import myNet, vars
import tensorflow as tf
def trainModel_FT(imgShape, params, init_wght_type='random'):
inpTensor = tf.placeholder(dtype=tf.float32, shape=[None, imgShape[0], imgShape[1], imgShape[2]])
logging.info('SHAPE: inpTensor %s', str(inpTensor.shape))
# Pad the input to make of actual size
X = tf.pad(inpTensor, paddings=[[0, 0], [3, 3], [3, 3], [0, 0]])
X = conv1(X, params)
X = conv2(X, params)
X = conv3(X, params)
X = inception3a(X, params, trainable=False)
X = inception3b(X, params, trainable=False)
X = inception3c(X, params, trainable=False)
X = inception4a(X, params, trainable=False)
X = inception4e(X, params, trainable=False)
if init_wght_type == 'pretrained':
logging.info(
'Initializing the last layer weights with inception pre-trained weight but the parameters are '
'trainable')
X = inception5a(X, params, trainable=True)
X = inception5b(X, params, trainable=True)
X = fullyConnected(X, params, trainable=True)
elif init_wght_type == 'random':
logging.info('Initializing the last layer weights with random values and the parameter is trainable')
X = inception5a_FT(X)
X = inception5b_FT(X)
X = fullyConnected_FT(X, [736, 128])
else:
raise ValueError('Provide a valid weight initialization type')
return dict(inpTensor=inpTensor, embeddings=X)
def getEmbeddings(imgShape, params):
inpTensor = tf.placeholder(dtype=tf.float32, shape=[None, imgShape[0], imgShape[1], imgShape[2]])
logging.info('GET EMBEDDINGS: SHAPE: inpTensor %s', str(inpTensor.shape))
# Pad the input to make of actual size
X = tf.pad(inpTensor, paddings=[[0, 0], [3, 3], [3, 3], [0, 0]])
X = conv1(X, params)
X = conv2(X, params)
X = conv3(X, params)
X = inception3a(X, params, trainable=False)
X = inception3b(X, params, trainable=False)
X = inception3c(X, params, trainable=False)
X = inception4a(X, params, trainable=False)
X = inception4e(X, params, trainable=False)
X = inception5a(X, params, trainable=False)
X = inception5b(X, params, trainable=False)
X = fullyConnected(X, params, trainable=False)
return dict(inpTensor=inpTensor, embeddings=X)
def trainEmbeddings(weightDict, init_wght_type):
logging.info('INITIALIZING THE NETWORK !! ...............................')
with tf.name_scope("learning_rate"):
global_step = tf.Variable(0, trainable=False)
learning_rate = tf.train.exponential_decay(myNet['learning_rate'],
global_step * vars['batchSize'], # Used for decay computation
vars['trainSize'], # Decay steps
myNet['learning_rate_decay_rate'], # Decay rate
staircase=True)
tf.summary.scalar('learning_rate', learning_rate)
embeddingDict = trainModel_FT(myNet['image_shape'], params=weightDict,
init_wght_type=init_wght_type)
embeddingDict['triplet_loss'] = loss(embeddingDict['embeddings'])
optimizer = tf.train.AdamOptimizer(learning_rate=learning_rate).minimize(
embeddingDict['triplet_loss'], global_step=global_step
)
embeddingDict['optimizer'] = optimizer
embeddingDict['learning_rate'] = learning_rate
return embeddingDict
def summaryBuilder(sess, outFilePath):
mergedSummary = tf.summary.merge_all()
writer = tf.summary.FileWriter(outFilePath)
writer.add_graph(sess.graph)
return mergedSummary, writer
| [
"sardhendumishra@gmail.com"
] | sardhendumishra@gmail.com |
42871c96c31961ac437daddcb2ba133e49eda6cb | ac1ce9002c03014482e8f6b190eae1595affee4b | /src/adjust_brightness_pre-process.py | e86d39cd791f90685a044be93a2b1b112831f651 | [] | no_license | tom-uchida/brightness-adjustment | 83a35601c283ce6069467f019c75a6af84fc4d2e | f79c07dab20db7d55d48039d7f05b6f4a8617fdd | refs/heads/master | 2023-03-05T18:05:30.338443 | 2021-02-13T08:21:45 | 2021-02-13T08:21:45 | 150,406,878 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 29,893 | py | ######################################################
# @file adjust_brightness_decompose_mapping.py
# @author Tomomasa Uchida
# @date 2019/10/27
######################################################
import numpy as np
from matplotlib import pyplot as plt
from matplotlib import cycler
from scipy import stats
import matplotlib.gridspec as gridspec
import matplotlib.patches as pat
import cv2
import subprocess
import sys
import statistics
import time
# Graph settings
# plt.style.use('seaborn-white')
plt.style.use('bmh')
colors = cycler('color', ['#EE6666', '#3388BB', '#9988DD', '#EECC55', '#88BB44', '#FFBBBB'])
plt.rc('axes', facecolor='#E6E6E6', edgecolor='none', axisbelow=True, grid=False, prop_cycle=colors)
plt.rc('grid', color='w', linestyle='solid')
plt.rc('patch', edgecolor='#E6E6E6')
plt.rc('lines', linewidth=2)
# plt.rcParams['font.family'] = 'IPAGothic' # font setting
plt.rcParams["mathtext.fontset"] = "cm"
plt.rcParams["mathtext.rm"] = "Times New Roman"
# Message
print("=================================================")
print(" Brightness Adjustment: Pre-Process ver.")
print(" Tomomasa Uchida")
print(" 2019/11/15")
print("=================================================")
# Check arguments
args = sys.argv
if len(args) != 3:
print("\n")
print("USAGE : $ python adjust_brightness_decompose.py [input_image_data] [input_image_data(L=1)]")
print("EXAMPLE : $ python adjust_brightness_decompose.py [input_image.bmp] [input_image_L1.bmp]")
#raise Exception
sys.exit()
# Set initial parameter
p_init = 1.0
p_interval = 0.01
ratio_of_ref_section = 0.001 # 1(%)
BGColor = [0, 0, 0] # Background color
BGColor_Gray = np.uint8(0.299*BGColor[0]+0.587*BGColor[1]+0.114*BGColor[2])
print("\n")
print("Input image data (args[1]) :", args[1])
print("Input image data (L=1) (args[2]) :", args[2])
print("Background Color :", BGColor)
print("Background Color (Grayscale) :", BGColor_Gray, "(pixel value)")
# print("p_init :", p_init)
# print("p_interval :", p_interval)
# print("Ratio of reference section :", ratio_of_ref_section*100, "(%)")
# Read Input Image
def readImage(_img_name):
# read input image
img_BGR = cv2.imread(_img_name)
# convert color BGR to RGB
img_RGB = cv2.cvtColor(img_BGR, cv2.COLOR_BGR2RGB)
return img_RGB
# RGB Histogram
def rgbHist(_img_rgb, _ax, _title):
R_nonzero = _img_rgb[:,:,0][_img_rgb[:,:,0] != BGColor[0]]
G_nonzero = _img_rgb[:,:,1][_img_rgb[:,:,1] != BGColor[1]]
B_nonzero = _img_rgb[:,:,2][_img_rgb[:,:,2] != BGColor[2]]
_ax.hist(R_nonzero.ravel(), bins=bin_number, color='r', alpha=0.5, label="R")
_ax.hist(G_nonzero.ravel(), bins=bin_number, color='g', alpha=0.5, label="G")
_ax.hist(B_nonzero.ravel(), bins=bin_number, color='b', alpha=0.5, label="B")
# _ax.legend()
_ax.set_title(_title)
_ax.set_xlim([-5, 260])
return _ax
# Grayscale Histogram
def grayscaleHist(_img_gray, _ax, _title):
img_Gray_nonzero = _img_gray[_img_gray != BGColor_Gray]
_ax.hist(img_Gray_nonzero.ravel(), bins=bin_number, color='black', alpha=1.0)
_ax.set_title(_title)
_ax.set_xlim([-5, 260])
return _ax
# Histograms of Input image(L=1), Input image and Adjusted image
def comparativeHist(_img_in_rgb_L1, _img_in_rgb, _img_out_rgb, _ax, _y_max):
# Convert RGB to Grayscale
img_in_Gray_L1 = cv2.cvtColor(_img_in_rgb_L1, cv2.COLOR_RGB2GRAY)
img_in_Gray_L1_non_bgcolor = img_in_Gray_L1[img_in_Gray_L1 != BGColor_Gray]
img_in_Gray = cv2.cvtColor(_img_in_rgb, cv2.COLOR_RGB2GRAY)
img_in_Gray_non_bgcolor = img_in_Gray[img_in_Gray != BGColor_Gray]
img_out_Gray = cv2.cvtColor(_img_out_rgb, cv2.COLOR_RGB2GRAY)
img_out_Gray_non_bgcolor = img_out_Gray[img_out_Gray != BGColor_Gray]
# input image(L=1)
mean_in_L1 = int(np.mean(img_in_Gray_L1_non_bgcolor))
_ax.hist(img_in_Gray_L1_non_bgcolor.ravel(), bins=bin_number, alpha=0.5, label="Input image ($L_{\mathrm{R}}=1$)", color='#1F77B4')
_ax.axvline(mean_in_L1, color='#1F77B4')
_ax.text(mean_in_L1+5, _y_max*0.8, "mean:"+str(mean_in_L1), color='#1F77B4', fontsize='12')
# input image
mean_in = int(np.mean(img_in_Gray_non_bgcolor))
_ax.hist(img_in_Gray_non_bgcolor.ravel(), bins=bin_number, alpha=0.5, label="Input image", color='#FF7E0F')
_ax.axvline(mean_in, color='#FF7E0F')
_ax.text(mean_in+5, _y_max*0.6, "mean:"+str(mean_in), color='#FF7E0F', fontsize='12')
# adjusted image
mean_out = int(np.mean(img_out_Gray_non_bgcolor))
_ax.hist(img_out_Gray_non_bgcolor.ravel(), bins=bin_number, alpha=0.5, label="Adjusted image", color='#2C9F2C')
_ax.axvline(mean_out, color='#2C9F2C')
_ax.text(mean_out+5, _y_max*0.7, "mean:"+str(mean_out), color='#2C9F2C', fontsize='12')
_ax.set_title('Comparative histogram')
_ax.set_xlabel("Pixel value")
_ax.set_ylabel("Number of pixels")
# _ax.legend(fontsize='12')
return _ax
# Create Figure
def createFigure(_img_in_RGB_L1, _img_in_RGB, _img_adjusted_RGB, _ref_pixel_value_L1, _ratio, _max_pixel_value_L1, _ratio_of_ref_section_L1):
# Convert RGB to Grayscale
img_in_Gray_L1 = cv2.cvtColor(_img_in_RGB_L1, cv2.COLOR_RGB2GRAY)
img_in_Gray = cv2.cvtColor(_img_in_RGB, cv2.COLOR_RGB2GRAY)
img_adjusted_Gray = cv2.cvtColor(_img_adjusted_RGB, cv2.COLOR_RGB2GRAY)
fig = plt.figure(figsize=(10, 6)) # figsize=(width, height)
gs = gridspec.GridSpec(2,3)
# Input image(L=1)
ax1 = fig.add_subplot(gs[0,0])
# ax1.set_title('Input image ($L_{\mathrm{R}}=1$)')
ax1.set_title('Input image ($L=1$)')
ax1.imshow(_img_in_RGB_L1)
ax1.set_xticks([]), ax1.set_yticks([])
# Input image
ax2 = fig.add_subplot(gs[0,1])
ax2.set_title('Input image')
ax2.imshow(_img_in_RGB)
ax2.set_xticks([]), ax2.set_yticks([])
# adjusted image
ax3 = fig.add_subplot(gs[0,2])
ax3.set_title('Adjusted image')
ax3.imshow(_img_adjusted_RGB)
ax3.set_xticks([]), ax3.set_yticks([])
# Histogram(input image(L=1))
ax4 = fig.add_subplot(gs[1,0])
# ax4 = grayscaleHist(img_in_Gray_L1, ax4, "Input image ($L_{\mathrm{R}}=1$)")
# ax4 = rgbHist(_img_in_RGB_L1, ax4, "Input image ($L_{\mathrm{R}}=1$)")
ax4 = rgbHist(_img_in_RGB_L1, ax4, "Input image ($L=1$)")
# Histogram(input image)
ax5 = fig.add_subplot(gs[1,1])
# ax5 = grayscaleHist(img_in_Gray, ax5, "Input image")
ax5 = rgbHist(_img_in_RGB, ax5, "Input image")
# Histogram(output image)
ax6 = fig.add_subplot(gs[1,2])
# ax6 = grayscaleHist(img_adjusted_Gray, ax6, "adjusted image")
ax6 = rgbHist(_img_adjusted_RGB, ax6, "Adjusted image")
# Unify ylim b/w input image and adjusted image
hist_in_L1, bins_in_L1 = np.histogram(img_in_Gray_L1[img_in_Gray_L1 != BGColor_Gray], bin_number)
hist_in, bins_in = np.histogram(img_in_Gray[img_in_Gray != BGColor_Gray], bin_number)
hist_adjusted, bins_adjusted = np.histogram(img_adjusted_Gray[img_adjusted_Gray != BGColor_Gray], bin_number)
list_max = [max(hist_in_L1), max(hist_in), max(hist_adjusted)]
ax4.set_ylim([0, max(list_max)*1.1])
ax5.set_ylim([0, max(list_max)*1.1])
ax6.set_ylim([0, max(list_max)*1.1])
# # Histograms(Input(L1), Input, adjusted)
# ax7 = fig.add_subplot(gs[2,:])
# ax7 = comparativeHist(_img_in_RGB_L1, _img_in_RGB, _img_adjusted_RGB, ax7, max(list_max)*1.1)
# ax7.set_ylim([0, max(list_max)*1.1])
# Draw text
x = (_ref_pixel_value_L1+_max_pixel_value_L1)*0.5 - 100
text = "["+str(_ref_pixel_value_L1)+", "+str(_max_pixel_value_L1)+"]\n→ "+str(round(_ratio_of_ref_section_L1*100, 2))+"(%)"
ax4.text(x, max(list_max)*1.1*0.8, text, color='black', fontsize='12')
text = "["+str(_ref_pixel_value_L1)+", "+str(_max_pixel_value_L1)+"]\n→ "+str(round(_ratio*100, 2))+"(%)"
ax6.text(x, max(list_max)*1.1*0.8, text, color='black', fontsize='12')
# Draw reference section
rect = plt.Rectangle((_ref_pixel_value_L1, 0), _max_pixel_value_L1-_ref_pixel_value_L1, max(list_max)*1.1, fc='black', alpha=0.3)
ax4.add_patch(rect)
rect = plt.Rectangle((_ref_pixel_value_L1, 0), _max_pixel_value_L1-_ref_pixel_value_L1, max(list_max)*1.1, fc='black', alpha=0.3)
ax6.add_patch(rect)
# Adjust Pixel Value for each RGB
def adjust_pixel_value(_rgb_img, _adjust_param):
adjusted_img_RGB = np.empty((_rgb_img.shape[0], _rgb_img.shape[1], 3), dtype=np.uint8)
# Apply adjustment
adjusted_img_RGB[:, :, 0] = cv2.multiply(_rgb_img[:, :, 0], _adjust_param) # R
adjusted_img_RGB[:, :, 1] = cv2.multiply(_rgb_img[:, :, 1], _adjust_param) # G
adjusted_img_RGB[:, :, 2] = cv2.multiply(_rgb_img[:, :, 2], _adjust_param) # B
return adjusted_img_RGB
# Search the threshold pixel value
def searchThresholdPixelValue():
# Get histogram of input image
hist, bins = np.histogram(img_in_Gray[img_in_Gray != BGColor_Gray], bins=bin_number)
# Convert "tuple" to "numpy array"
hist = np.array(hist) # print(hist.size)
bins = np.array(bins) # print(bins)
# Search a threshold pixel value
diff_max, index4bins = -1, -1
for i in range(int(hist.size*0.1), hist.size-1):
diff = np.abs(hist[i] - hist[i+1])
# print("diff = ", diff)
if diff > diff_max:
diff_max = diff
index4bins = i+1
# end if
# end for
threshold_pixel_value = int(bins[index4bins]) + int(255/bin_number)
return threshold_pixel_value
# Decompose the input image
def separateBackgroundColor():
num_of_bgcolor = np.count_nonzero(b_index_bgcolor)
num_of_non_bgcolor = np.count_nonzero(b_index_non_bgcolor)
print("Num of Background Color :", num_of_bgcolor, "(pixels)")
print("Num of Non-Background Color :", num_of_non_bgcolor, "(pixels)")
print("The ratio of Background Color :", round(num_of_bgcolor/N_all*100), "(%)")
# Apply decomposition
bg_R = np.where(b_index_bgcolor, BGColor[0], 0)
bg_G = np.where(b_index_bgcolor, BGColor[1], 0)
bg_B = np.where(b_index_bgcolor, BGColor[2], 0)
non_bg_R = np.where(b_index_non_bgcolor, img_in_RGB[:,:,0], 0)
non_bg_G = np.where(b_index_non_bgcolor, img_in_RGB[:,:,1], 0)
non_bg_B = np.where(b_index_non_bgcolor, img_in_RGB[:,:,2], 0)
# Create BGColor image and Non-BGColor image
img_in_RGB_bgcolor, img_in_RGB_non_bgcolor = img_in_RGB.copy(), img_in_RGB.copy()
img_in_RGB_bgcolor[:,:,0], img_in_RGB_bgcolor[:,:,1], img_in_RGB_bgcolor[:,:,2] = bg_R, bg_G, bg_B
img_in_RGB_non_bgcolor[:,:,0], img_in_RGB_non_bgcolor[:,:,1], img_in_RGB_non_bgcolor[:,:,2] = non_bg_R,non_bg_G, non_bg_B
return img_in_RGB_bgcolor, img_in_RGB_non_bgcolor
def transformPixelValueDistributionStatistically():
tmp_img_uint8 = img_in_RGB_non_bgcolor.copy()
tmp_img_float = tmp_img_uint8.astype(float)
# Make the mean pixel value "0"
tmp_img_float[:,:,0] = cv2.subtract(tmp_img_float[:,:,0], float(mean_pixel_value)) # R
tmp_img_float[:,:,1] = cv2.subtract(tmp_img_float[:,:,1], float(mean_pixel_value)) # G
tmp_img_float[:,:,2] = cv2.subtract(tmp_img_float[:,:,2], float(mean_pixel_value)) # B
# Make the std pixel value "ideal_std_pixel_value"
multiply_value = ideal_std_pixel_value / std_pixel_value
tmp_img_float[:,:,0] = cv2.multiply(tmp_img_float[:,:,0], float(multiply_value))
tmp_img_float[:,:,1] = cv2.multiply(tmp_img_float[:,:,1], float(multiply_value))
tmp_img_float[:,:,2] = cv2.multiply(tmp_img_float[:,:,2], float(multiply_value))
# Make the mean pixel value "ideal_mean_pixel_value"
tmp_img_float[:,:,0] = cv2.add(tmp_img_float[:,:,0], float(ideal_mean_pixel_value))
tmp_img_float[:,:,1] = cv2.add(tmp_img_float[:,:,1], float(ideal_mean_pixel_value))
tmp_img_float[:,:,2] = cv2.add(tmp_img_float[:,:,2], float(ideal_mean_pixel_value))
# Convert float to np.uint8
tmp_img_uint8 = tmp_img_float.astype(np.uint8)
# Exclude background color from calculation
pre_processed_img_in_RGB = tmp_img_uint8
pre_processed_img_in_RGB[:,:,0] = np.where(b_index_non_bgcolor, tmp_img_uint8[:,:,0], 0) # R
pre_processed_img_in_RGB[:,:,1] = np.where(b_index_non_bgcolor, tmp_img_uint8[:,:,1], 0) # G
pre_processed_img_in_RGB[:,:,2] = np.where(b_index_non_bgcolor, tmp_img_uint8[:,:,2], 0) # B
print("\nStatistically, transformed pixel value distribution.")
# Save image
pre_processed_img_in_BGR = cv2.cvtColor(pre_processed_img_in_RGB, cv2.COLOR_RGB2BGR)
cv2.imwrite("images/transformed.bmp", pre_processed_img_in_BGR)
# Create figure
fig = plt.figure(figsize=(8, 6)) # figsize=(width, height)
gs = gridspec.GridSpec(2,2)
ax1 = fig.add_subplot(gs[0,0])
ax1.set_title('Before')
ax1.imshow(img_in_RGB)
ax1.set_xticks([]), ax1.set_yticks([])
ax2 = fig.add_subplot(gs[0,1])
ax2.set_title('After')
ax2.imshow(pre_processed_img_in_RGB)
ax2.set_xticks([]), ax2.set_yticks([])
ax3 = fig.add_subplot(gs[1,0])
ax3 = rgbHist(img_in_RGB, ax3, "Before")
ax3.axvline(threshold_pixel_value, color='red')
ax4 = fig.add_subplot(gs[1,1])
ax4 = rgbHist(pre_processed_img_in_RGB, ax4, "After")
ax4.axvline(threshold_pixel_value, color='red')
plt.show()
return pre_processed_img_in_RGB
def robustScalePixelValueDistribution():
# Exclude background color pixel
tmp_img = img_in_Gray[b_index_non_bgcolor]
# Calc quartile pixel value
first_quater = np.uint8(stats.scoreatpercentile(tmp_img, 25))
second_quater = np.uint8(np.median(tmp_img))
third_quater = np.uint8(stats.scoreatpercentile(tmp_img, 75))
print ("1st quartile :", first_quater, "(pixel value)")
print ("2nd quartile (median) :", second_quater, "(pixel value")
print ("3rd quartile :", third_quater, "(pixel value)")
# RobustScale
robust_scaled_img_in_RGB_f = (img_in_RGB.copy().astype(float)-second_quater) / (third_quater-first_quater)
# # Make the min pixel value "0"
# tmp_img_float = tmp_img_float + (-tmp_min)
# tmp_max, tmp_min = np.max(tmp_img_float), np.min(tmp_img_float)
# print("( Max, Min ) = (", tmp_max, ",", tmp_min, ")")
print("\nRobust scaling done.")
# # Create figure
# fig = plt.figure(figsize=(8, 6)) # figsize=(width, height)
# gs = gridspec.GridSpec(2,2)
# ax1 = fig.add_subplot(gs[0,0])
# ax1.set_title('Before')
# ax1.imshow(img_in_RGB)
# ax1.set_xticks([]), ax1.set_yticks([])
# ax2 = fig.add_subplot(gs[0,1])
# ax2.set_title('After')
# ax2.imshow(scaled_img_in_RGB)
# ax2.set_xticks([]), ax2.set_yticks([])
# ax3 = fig.add_subplot(gs[1,0])
# ax3 = rgbHist(img_in_RGB, ax3, "Before")
# ax3.axvline(first_quater, color='red')
# ax3.axvline(second_quater, color='blue')
# ax3.axvline(third_quater, color='green')
# ax4 = fig.add_subplot(gs[1,1])
# ax4 = rgbHist(scaled_img_in_RGB, ax4, "After")
# ax4.axvline(first_quater, color='red')
# ax4.axvline(second_quater, color='blue')
# ax4.axvline(third_quater, color='green')
# plt.show()
return robust_scaled_img_in_RGB_f
def preProcessPixelValueDistribution(_robust_scaled_img_in_RGB_f):
scaled_min_pixel_value, scaled_max_pixel_value = np.min(_robust_scaled_img_in_RGB_f), np.max(_robust_scaled_img_in_RGB_f)
print("( min, max ) = (", scaled_min_pixel_value, ",", scaled_max_pixel_value, ")")
# Mapping
robust_scaled_img_in_RGB_f = (_robust_scaled_img_in_RGB_f-float(scaled_min_pixel_value)) / (float(scaled_max_pixel_value)-float(scaled_min_pixel_value)) * float(threshold_pixel_value)
robust_scaled_img_in_RGB = robust_scaled_img_in_RGB_f.astype(np.uint8)
pre_processed_img_in_RGB = robust_scaled_img_in_RGB
print("Pre-processing done.")
# Save image
pre_processed_img_in_BGR = cv2.cvtColor(pre_processed_img_in_RGB, cv2.COLOR_RGB2BGR)
cv2.imwrite("images/pre-processed.bmp", pre_processed_img_in_BGR)
# # Create figure
# fig = plt.figure(figsize=(8, 6)) # figsize=(width, height)
# gs = gridspec.GridSpec(2,2)
# ax1 = fig.add_subplot(gs[0,0])
# ax1.set_title('Before')
# ax1.imshow(img_in_RGB)
# ax1.set_xticks([]), ax1.set_yticks([])
# ax2 = fig.add_subplot(gs[0,1])
# ax2.set_title('After')
# ax2.imshow(pre_processed_img_in_RGB)
# ax2.set_xticks([]), ax2.set_yticks([])
# ax3 = fig.add_subplot(gs[1,0])
# ax3 = rgbHist(img_in_RGB, ax3, "Before")
# ax3.axvline(threshold_pixel_value, color='red')
# ax4 = fig.add_subplot(gs[1,1])
# ax4 = rgbHist(pre_processed_img_in_RGB, ax4, "After")
# ax4.axvline(threshold_pixel_value, color='red')
# plt.show()
return pre_processed_img_in_RGB
def dealWithOutlierPixelValue():
# # Calc. mean and std pixel value for each RGB
# bool_R_only_non_bgcolor = img_in_RGB[:,:,0][b_index_non_bgcolor]
# bool_G_only_non_bgcolor = img_in_RGB[:,:,1][b_index_non_bgcolor]
# bool_B_only_non_bgcolor = img_in_RGB[:,:,2][b_index_non_bgcolor]
# R_mean, R_std = np.uint8(np.mean(bool_R_only_non_bgcolor)), np.uint8(np.std(bool_R_only_non_bgcolor))
# G_mean, G_std = np.uint8(np.mean(bool_G_only_non_bgcolor)), np.uint8(np.std(bool_G_only_non_bgcolor))
# B_mean, B_std = np.uint8(np.mean(bool_B_only_non_bgcolor)), np.uint8(np.std(bool_B_only_non_bgcolor))
# print("R_mean, R_std :", R_mean, ",", R_std)
# print("G_mean, G_std :", G_mean, ",", G_std)
# print("B_mean, B_std :", B_mean, ",", B_std)
# bool_R_only_outlier = img_in_RGB[:,:,0] >= (R_mean+2*R_std)
# bool_G_only_outlier = img_in_RGB[:,:,1] >= (G_mean+2*G_std)
# bool_B_only_outlier = img_in_RGB[:,:,2] >= (B_mean+2*B_std)
# img_in_RGB_non_outlier = img_in_RGB.copy()
# img_in_RGB_non_outlier[:,:,0] = np.where(bool_R_only_outlier, img_in_RGB[:,:,0]/2.52, img_in_RGB[:,:,0])
# img_in_RGB_non_outlier[:,:,1] = np.where(bool_G_only_outlier, img_in_RGB[:,:,1]/2.52, img_in_RGB[:,:,1])
# img_in_RGB_non_outlier[:,:,2] = np.where(bool_B_only_outlier, img_in_RGB[:,:,2]/2.52, img_in_RGB[:,:,2])
gamma = 2
img_in_RGB_non_outlier_f = threshold_pixel_value*(img_in_RGB.copy().astype(float)/threshold_pixel_value)**(1/gamma)
img_in_RGB_non_outlier = img_in_RGB_non_outlier_f.astype(np.uint8)
# Save image
cv2.imwrite("images/non_outlier.bmp", cv2.cvtColor(img_in_RGB_non_outlier, cv2.COLOR_RGB2BGR))
# Create figure
fig = plt.figure(figsize=(8, 6)) # figsize=(width, height)
gs = gridspec.GridSpec(2,2)
ax1 = fig.add_subplot(gs[0,0])
ax1.set_title('Before')
ax1.imshow(img_in_RGB)
ax1.set_xticks([]), ax1.set_yticks([])
ax2 = fig.add_subplot(gs[0,1])
ax2.set_title('After')
ax2.imshow(img_in_RGB_non_outlier)
ax2.set_xticks([]), ax2.set_yticks([])
ax3 = fig.add_subplot(gs[1,0])
ax3 = rgbHist(img_in_RGB, ax3, "Before")
ax3.axvline(threshold_pixel_value, color='red')
ax4 = fig.add_subplot(gs[1,1])
ax4 = rgbHist(img_in_RGB_non_outlier, ax4, "After")
ax4.axvline(threshold_pixel_value, color='red')
plt.show()
def gamma_correction(_x, _gamma=2):
# y=255*(x/255)^(1/2)
return threshold_pixel_value*(_x/threshold_pixel_value)^(1/_gamma)
def preProcess(_img_RGB):
print("Input image (RGB) :", _img_RGB.shape) # (height, width, channel)
# Calc all number of pixels of the input image
N_all = _img_RGB.shape[0] * _img_RGB.shape[1]
print("N_all :", N_all, "(pixels)")
# Exclude background color
img_in_Gray_non_bgcolor = img_in_Gray[img_in_Gray != BGColor_Gray]
# Calc the number of pixels excluding background color
N_all_non_bgcolor = np.sum(img_in_Gray != BGColor_Gray)
print("N_all_non_bgcolor :", N_all_non_bgcolor, "(pixels)")
# Calc mean pixel value
max_pixel_value = np.max(img_in_Gray_non_bgcolor)
print("Max pixel value :", max_pixel_value, "(pixel value)")
# Calc mean pixel value
mean_pixel_value = np.mean(img_in_Gray_non_bgcolor)
print("Mean pixel value :", round(mean_pixel_value, 1), "(pixel value)")
# Calc std pixel value
std_pixel_value = np.std(img_in_Gray_non_bgcolor)
print("Std pixel value :", round(std_pixel_value, 1), "(pixel value)")
return N_all, N_all_non_bgcolor, mean_pixel_value, std_pixel_value
def preProcess4L1():
# Exclude background color
img_in_Gray_non_bgcolor_L1 = img_in_Gray_L1[img_in_Gray_L1 != BGColor_Gray]
# Calc the number of pixels excluding background color
N_all_non_bgcolor_L1 = np.sum(img_in_Gray_L1 != BGColor_Gray)
# Calc max pixel value of the input image (L=1)
max_pixel_value_L1 = np.max(img_in_Gray_non_bgcolor_L1)
print("\nMax pixel value (L=1) :", max_pixel_value_L1, "(pixel value)")
# Calc mean pixel value (L=1)
mean_pixel_value_L1 = np.mean(img_in_Gray_non_bgcolor_L1)
print("Mean pixel value (L=1) :", round(mean_pixel_value_L1, 1), "(pixel value)")
# Calc ratio of the max pixel value (L=1)
num_max_pixel_value_L1 = np.sum(img_in_Gray_non_bgcolor_L1 == max_pixel_value_L1)
print("Num. of max pixel value (L=1) :", num_max_pixel_value_L1, "(pixels)")
ratio_max_pixel_value_L1 = num_max_pixel_value_L1 / N_all_non_bgcolor_L1
# ratio_max_pixel_value_L1 = round(ratio_max_pixel_value_L1, 8)
print("Ratio of max pixel value (L=1) :", round(ratio_max_pixel_value_L1*100, 2), "(%)")
# Calc most frequent pixel value (L=1)
bincount = np.bincount(img_in_Gray_non_bgcolor_L1)
most_frequent_pixel_value_L1 = np.argmax( bincount )
print("Most frequent pixel value (L=1) :", most_frequent_pixel_value_L1, "(pixel value)")
return img_in_Gray_L1, img_in_Gray_non_bgcolor_L1, N_all_non_bgcolor_L1, max_pixel_value_L1, ratio_max_pixel_value_L1,
def determineAdjustParameter(_img_RGB, _img_in_Gray_non_bgcolor_L1, _N_all_non_bgcolor_L1, _max_pixel_value_L1, _ratio_of_ref_section):
# Initialize
tmp_ratio_of_ref_section = 0.0
ref_pixel_value_L1 = _max_pixel_value_L1
# Determine reference pixel value in the input image(L=1)
while tmp_ratio_of_ref_section < _ratio_of_ref_section:
# Temporarily calc
sum_of_pixels_in_section = np.sum( (ref_pixel_value_L1 <= _img_in_Gray_non_bgcolor_L1) )
tmp_ratio_of_ref_section = sum_of_pixels_in_section / _N_all_non_bgcolor_L1
# Next pixel value
ref_pixel_value_L1 -= 1
ref_pixel_value_L1 += 1
print("Reference pixel value (L=1) :", ref_pixel_value_L1, "(pixel value)")
print("Reference section (L=1) :", ref_pixel_value_L1, "~", _max_pixel_value_L1, "(pixel value)")
print("Ratio of reference section (L=1):", round(tmp_ratio_of_ref_section*100, 2), "(%)")
# Determine tuning parameter
p = p_init
tmp_ratio = 0.0
while tmp_ratio < _ratio_of_ref_section:
# Temporarily, adjust pixel value of the input image with p
tmp_img_adjusted_RGB = adjust_pixel_value(_img_RGB, p)
tmp_img_adjusted_Gray = cv2.cvtColor(tmp_img_adjusted_RGB, cv2.COLOR_RGB2GRAY)
# Exclude background color
tmp_adjusted_img_non_bgcolor_Gray = tmp_img_adjusted_Gray[tmp_img_adjusted_Gray != BGColor_Gray]
# Then, calc ratio of max pixel value(L=1)
sum_of_pixels_in_ref_section = np.sum(ref_pixel_value_L1 <= tmp_adjusted_img_non_bgcolor_Gray)
tmp_ratio = sum_of_pixels_in_ref_section / N_all_non_bgcolor
# Update parameter
p += p_interval
p_final = round(p, 2)
return p_final, ref_pixel_value_L1, tmp_ratio_of_ref_section
def adjustPixelValue(_img_RGB, _p_final, _ref_pixel_value_L1, _max_pixel_value_L1):
print("p_final :", _p_final)
# Create adjusted image
img_adjusted_RGB = adjust_pixel_value(_img_RGB, _p_final)
img_adjusted_Gray = cv2.cvtColor(img_adjusted_RGB, cv2.COLOR_RGB2GRAY)
# Exclude
img_adjusted_non_bgcolor_Gray = img_adjusted_Gray[img_adjusted_Gray != BGColor_Gray]
# For the adjusted image, calc ratio of num. of pixels in the reference section
sum_of_pixels_in_ref_section = np.sum( (_ref_pixel_value_L1 <= img_adjusted_Gray) & (img_adjusted_Gray <= _max_pixel_value_L1) )
ratio_final = sum_of_pixels_in_ref_section / N_all_non_bgcolor
print("Ratio of reference section :", round(ratio_final*100, 2), "(%)")
#print("Ratio of num. of pixels to 255 :", round(np.sum(img_adjusted_Gray==255) / N_all_non_bgcolor * 100, 2), "(%)")
return img_adjusted_RGB, ratio_final
# Save figure and images
def saveFigureAndImages(_p_final, _img_in_RGB, _img_adjusted_RGB):
fig_name = "images/figure_"+str(_p_final)+".png"
plt.savefig(fig_name)
# plt.show()
# convert color RGB to BGR
img_in_BGR = cv2.cvtColor(_img_in_RGB, cv2.COLOR_RGB2BGR)
img_out_BGR = cv2.cvtColor(_img_adjusted_RGB, cv2.COLOR_RGB2BGR)
input_img_name = "images/input.bmp"
adjusted_img_name = "images/adjusted_"+str(_p_final)+".bmp"
cv2.imwrite(input_img_name, img_in_BGR)
cv2.imwrite(adjusted_img_name, img_out_BGR)
#execCommand(fig_name, input_img_name, adjusted_img_name)
# Exec. command
def execCommand(_fig_name, _input_img_name, _adjusted_img_name):
preview_command = ['open', _fig_name, _input_img_name, _adjusted_img_name]
try:
res = subprocess.check_call(preview_command)
except:
print("ERROR")
def BrightnessAdjustment(_img_RGB):
print("\n\n====================================")
print(" STEP1: Get max pixel value (L=1)")
print("====================================")
N_all_non_bgcolor = preProcess(_img_RGB)
img_in_Gray_L1, img_in_Gray_non_bgcolor_L1, N_all_non_bgcolor_L1, max_pixel_value_L1, ratio_max_pixel_value_L1 = preProcess4L1()
print("\n\n================================================")
print(" STEP2: Search for reference pixel value (L=1)")
print("=================================================")
p_final, ref_pixel_value_L1, ratio_of_ref_section_L1 = determineAdjustParameter(_img_RGB, img_in_Gray_non_bgcolor_L1, N_all_non_bgcolor_L1, max_pixel_value_L1, ratio_of_ref_section)
print("\n\n============================")
print(" STEP3: Adjust pixel value")
print("============================")
img_adjusted_RGB, ratio_final = adjustPixelValue(_img_RGB, p_final, ref_pixel_value_L1, max_pixel_value_L1)
# Create figure
createFigure(img_in_RGB_L1, _img_RGB, img_adjusted_RGB, ref_pixel_value_L1, ratio_final, max_pixel_value_L1, ratio_of_ref_section_L1)
# Save figure and images
saveFigureAndImages(p_final, _img_RGB, img_adjusted_RGB)
return img_adjusted_RGB
if __name__ == "__main__":
# Read two input images
img_in_RGB = readImage(args[1])
img_in_RGB_L1 = readImage(args[2])
# Convert RGB image to Grayscale image
img_in_Gray = cv2.cvtColor(img_in_RGB, cv2.COLOR_RGB2GRAY)
img_in_Gray_L1 = cv2.cvtColor(img_in_RGB_L1, cv2.COLOR_RGB2GRAY)
# Extract background color index
b_index_bgcolor = img_in_Gray == BGColor_Gray # ndarray(dtype: bool)
b_index_non_bgcolor = ~b_index_bgcolor
# Start time count
start_time = time.time()
N_all, N_all_non_bgcolor, mean_pixel_value, std_pixel_value = preProcess(img_in_RGB)
bin_number = 50
# threshold_pixel_value = searchThresholdPixelValue()
# threshold_pixel_value = mean_pixel_value + std_pixel_value*2
threshold_pixel_value = mean_pixel_value
# ideal_std_pixel_value = threshold_pixel_value/4
# ideal_mean_pixel_value = threshold_pixel_value/2
img_in_RGB_bgcolor, img_in_RGB_non_bgcolor = separateBackgroundColor()
# robust_scaled_img_in_RGB_f = robustScalePixelValueDistribution()
# pre_processed_img_in_RGB = preProcessPixelValueDistribution(robust_scaled_img_in_RGB_f)
dealWithOutlierPixelValue()
# pre_processed_img_in_RGB = transformPixelValueDistributionStatistically()
# adjusted_img_out_RGB = BrightnessAdjustment(pre_processed_img_in_RGB)
# adjusted_img_out_Gray = cv2.cvtColor(adjusted_img_out_RGB, cv2.COLOR_RGB2GRAY)
# # Save image
# adjusted_img_out_BGR = cv2.cvtColor(adjusted_img_out_RGB, cv2.COLOR_RGB2BGR)
# cv2.imwrite("images/adjusted.bmp", adjusted_img_out_BGR)
print ("\nElapsed time : {0}".format(time.time() - start_time) + "[sec]")
# # Create figure
# fig = plt.figure(figsize=(8, 6)) # figsize=(width, height)
# gs = gridspec.GridSpec(2,2)
# ax1 = fig.add_subplot(gs[0,0])
# ax1.set_title('Before')
# ax1.imshow(pre_processed_img_in_RGB)
# ax1.set_xticks([]), ax1.set_yticks([])
# ax2 = fig.add_subplot(gs[0,1])
# ax2.set_title('After')
# ax2.imshow(adjusted_img_out_RGB)
# ax2.set_xticks([]), ax2.set_yticks([])
# ax3 = fig.add_subplot(gs[1,0])
# ax3 = rgbHist(pre_processed_img_in_RGB, ax3, "Before")
# ax3.axvline(threshold_pixel_value, color='red')
# ax4 = fig.add_subplot(gs[1,1])
# ax4 = rgbHist(adjusted_img_out_RGB, ax4, "After")
# ax4.axvline(threshold_pixel_value, color='red')
# plt.show() | [
"tomomasa.is.0930@gmail.com"
] | tomomasa.is.0930@gmail.com |
e7a80b2a8b0153488c715141516c2261b6829a26 | 22b8c680d7787cc9fcee678cdeed73dc685a4d0f | /sdk/python/gnmi/ydk/gnmi/path/__init__.py | 137096fb8ef3bb58c7b13c9c66c85a58cb06492a | [
"Apache-2.0"
] | permissive | CiscoDevNet/ydk-gen | cf36433acb8d90b514f8748531a2cb06e66f7f2d | 27dd7d85134a62aa9e9fa48edc0359d32b6a31ec | refs/heads/master | 2023-05-13T22:52:26.135573 | 2023-02-01T03:27:31 | 2023-02-01T03:27:31 | 53,680,541 | 138 | 98 | Apache-2.0 | 2023-09-07T21:55:37 | 2016-03-11T16:27:20 | C++ | UTF-8 | Python | false | false | 781 | py | # ----------------------------------------------------------------
# Copyright 2018 Cisco Systems
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ------------------------------------------------------------------
from .gnmi_session import gNMISession
__all__ = [ "gNMISession" ]
| [
"ygorelik@cisco.com"
] | ygorelik@cisco.com |
de449801de7b76559d6fec4f67ff7fccf572dd49 | 6fcdfb6cf2a1cbd4d40afd41bd229557abd54d67 | /mark2cure/common/formatter.py | b2920170923d72a1e47164b708a045b5320a03f0 | [
"MIT"
] | permissive | gtsueng/mark2cure | 37f96fa4ba155020a2cc88c8ce0760b2a38e7c71 | 715c577bbf8e4ebd100c0dbc1837a95a73447fc8 | refs/heads/master | 2021-01-21T09:46:36.925815 | 2016-11-29T22:14:55 | 2016-11-29T22:14:55 | 56,716,223 | 0 | 0 | null | 2016-05-20T19:00:11 | 2016-04-20T19:43:35 | Python | UTF-8 | Python | false | false | 8,593 | py | from ..common.bioc import BioCWriter, BioCCollection, BioCAnnotation, BioCLocation, BioCRelation, BioCNode
import xmltodict
import itertools
import datetime
import json
import nltk
def pad_split(text):
text = text.replace("\\(", " ( ")
text = text.replace("\\)", " ) ")
text = text.replace("\\.", " . ")
text = text.replace("\\,", " , ")
text = text.replace("\\%", " % ")
text = text.replace("\\#", " # ")
text = text.replace("\\&", " & ")
text = text.replace("\\+", " + ")
text = text.replace("\\=", " = ")
text = text.replace("\\[", " [ ")
text = text.replace("\\]", " ] ")
text = text.replace("\\;", " ; ")
text = text.replace("\\/", " / ")
text = text.replace("/", " / ")
text = text.replace("\\\"", " \" ")
text = text.replace(" ", " ")
text = text.replace(" ", " ")
return nltk.word_tokenize(text.encode('utf-8'))
def bioc_writer(request):
writer = BioCWriter()
writer.collection = BioCCollection()
writer.collection.date = datetime.date.today().strftime("%Y%m%d")
if request:
writer.collection.source = 'Mark2Cure API: {relative_url}'.format(
relative_url=request.META.get('PATH_INFO', ''))
else:
writer.collection.source = 'Mark2Cure Internal'
return writer
def bioc_as_json(writer):
o = xmltodict.parse(writer.__str__())
try:
json_dict = json.loads(json.dumps(o))
for passage_index, passage in enumerate(json_dict.get('collection').get('document').get('passage')):
anns = passage.get('annotation')
if type(anns) != list:
json_dict['collection']['document']['passage'][passage_index]['annotation'] = [anns]
return json.dumps(json_dict)
except:
return json.dumps(o)
# R & S are tuple of (start position, stop position)
def are_separate(r, s):
return r[1] < s[0] or s[1] < r[0]
def are_overlapping(r, s):
return not(r[1] < s[0] or s[1] < r[0])
def is_pubtator_df(df):
return df['user_id'].isnull().all()
def clean_df(df, overlap_protection=False, allow_duplicates=True):
"""Ensure all manager dataframe generators share a uniform format
This attempts to santize our Annotation Dataframes that may originate
from multiple sources (users, pubtator) so they're comparable
"""
if df.shape[1] is not 11:
raise ValueError('Incorrect number of dataframe columns.')
# If Pubtator included, make the user_id -1
df.fillna(value=-1, inplace=True)
df['user_id'] = df['user_id'].astype(int)
# Make all the offsets scoped the the entire document (like Pubtator)
df.ix[df['offset_relative'], 'start_position'] = df['section_offset'] + df['start_position']
df.ix[df['offset_relative'], 'offset_relative'] = False
# Not required, but easier to view this way
df.sort('start_position', inplace=True)
# Absolutely require UID and Source
df.dropna(subset=('uid', 'source'), how='any', inplace=True)
# Remove unnecessary prefixes from uids if coming from external sources (via pubtator algos)
df.loc[:, 'uid'] = df.loc[:, 'uid'].map(lambda v: v[5:] if v.startswith('MESH:') else v)
df.loc[:, 'uid'] = df.loc[:, 'uid'].map(lambda v: v[5:] if v.startswith('OMIM:') else v)
df.loc[:, 'uid'] = df.loc[:, 'uid'].map(lambda v: v[6:] if v.startswith('CHEBI:') else v)
# (TODO) Inspect for , in IDs and duplicate rows
# (TODO) Is there an ordering to the UIDs?
# (NOTES) After a short inspection, I didn't see an obvious order. -Max 3/2/2016
df = df[~df.uid.str.contains(",")]
df = df[~df.uid.str.contains("\|")]
# Only keep rows that are in our known annotation type lists
df['ann_type'] = df['ann_type'].str.lower()
ann_types_arr = ['chemical', 'gene', 'disease']
from ..document.models import Document
ann_types_arr.extend(Document.APPROVED_TYPES)
# from relation.task importer
# df = df[df['ann_type'].isin(['Chemical', 'Gene', 'Disease'])]
df = df[df['ann_type'].isin(ann_types_arr)]
df['ann_type_id'] = 0
df.ix[df['ann_type'] == 'disease', 'ann_type_id'] = 0
df.ix[df['ann_type'] == 'gene', 'ann_type_id'] = 1
df.ix[df['ann_type'] == 'gene_protein', 'ann_type_id'] = 1 # M2C Enum Syntax
df.ix[df['ann_type'] == 'chemical', 'ann_type_id'] = 2
df.ix[df['ann_type'] == 'drug', 'ann_type_id'] = 2 # M2C Enum Syntax
# We're previously DB Primary Keys
df.reset_index(inplace=True)
# is_pubtator = is_pubtator_df(df)
if overlap_protection:
# Removes any annotations (rows) that have span overlap
res = []
for index, row in df.iterrows():
loc_span = (row['start_position'], row['start_position'] + row['length'])
res.append((loc_span, index))
for x, y in itertools.combinations(res, 2):
span_a, span_a_row = x
span_b, span_b_row = y
if are_overlapping(span_a, span_b):
try:
# (TODO) Figure out why this fails sometimes...
df.drop(span_b_row, inplace=True)
except:
pass
if not allow_duplicates:
df.drop_duplicates(['uid', 'ann_type_id', 'text'], inplace=True)
return df
def apply_annotations(writer, er_df=None, rel_df=None):
'''
This takes a BioCWriter for N document(s) and a Pandas Dataframe of annotations
to apply to the BioCWriter
Enforces as little DF modification as possible. This function is only
intended to take the DF it was given and return a BioC Writer
'''
for bioc_doc in writer.collection.documents:
doc_pk_int = int(bioc_doc.infons.get('document_pk'))
if er_df is not None:
doc_df = er_df[er_df['document_pk'] == doc_pk_int]
'''
# (TODO) Cases in which a user hasn't annotated something in the title...
section_ids = list(doc_df['section_id'].unique())
if not len(section_ids) >= 1:
raise ValueError('Incorrect number of document sections.')
'''
i = 0
for offset_position, group_df in doc_df.groupby(['section_offset']):
# This is another approach to offset grouping:
# offset = int(bioc_passage.offset)
# for idx, row in df[df['offset'] == offset].iterrows():
# (TODO) (WARNING) If only 1 section, then the bioc_passage will be wrong
bioc_passage = bioc_doc.passages[i]
i = i + 1
# Should already be empty if from doc.as_writer(), but perhaps we add an
# append method in the future
bioc_passage.clear_annotations()
for row_idx, row in group_df.iterrows():
annotation = BioCAnnotation()
annotation.id = str(row_idx)
annotation.put_infon('uid', row['uid'])
annotation.put_infon('source', row['source'])
annotation.put_infon('user_id', str(int(row['user_id'])))
annotation.put_infon('type', row['ann_type'])
annotation.put_infon('type_id', str(row['ann_type_id']))
location = BioCLocation()
location.offset = str(int(row['start_position']))
location.length = str(int(row['length']))
annotation.add_location(location)
annotation.text = row['text']
bioc_passage.add_annotation(annotation)
if rel_df is not None:
'''
This takes a BioCWriter for 1 document and a Pandas Dataframe of annotations
to apply to the BioCWriter
Enforces as little DF modification as possible. This function is only
intended to take the DF it was given and return a BioC Writer
'''
doc_df = rel_df[rel_df['document_pk'] == doc_pk_int]
for row_idx, row in doc_df.iterrows():
# Relations get added on a document level, not passage
r = BioCRelation()
r.put_infon('event-type', row['answer'])
r.put_infon('relation-type', row['relation_type'])
n = BioCNode(refid=row['concept_1_id'], role='')
r.add_node(n)
n = BioCNode(refid=row['concept_2_id'], role='')
r.add_node(n)
bioc_doc.add_relation(r)
return writer
| [
"max@maxnanis.com"
] | max@maxnanis.com |
a00d423fc4ebad8852831d27ef7fe2ef797459ae | cad9c13ad5864317d7687b44f39db42a402f36f0 | /venv/Scripts/soup-script.py | 0e1a7ceadb25db4f357a25515879b4e87932b898 | [] | no_license | handaeho/lab_python | 12b686eb0d57358509f2d0cd607064deced5b25d | da068ea62682ffa70c7d23dde4ef132c49a81364 | refs/heads/master | 2020-11-26T08:22:27.656109 | 2020-04-13T02:28:47 | 2020-04-13T02:28:47 | 229,013,932 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 392 | py | #!C:\dev\lab-python\venv\Scripts\python.exe
# EASY-INSTALL-ENTRY-SCRIPT: 'soup==0.1.0','console_scripts','soup'
__requires__ = 'soup==0.1.0'
import re
import sys
from pkg_resources import load_entry_point
if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0])
sys.exit(
load_entry_point('soup==0.1.0', 'console_scripts', 'soup')()
)
| [
"mrdh94@naver.com"
] | mrdh94@naver.com |
16b8749ac5d03d7fa63239a1514a756a3a9d7c18 | 727e50c524c229bc7736a757fbc51cc5939b7e10 | /peering/migrations/0034_auto_20190308_1954.py | 03ed8a1d6237d1de1c86a9282d59370a63321db8 | [
"Apache-2.0"
] | permissive | netravnen/peering-manager | 71fbe1801fe6e063ac1b4375cdb9fe3c8c3feee5 | c2a5149b3cb197291e0c9c10040738ce5fb29f02 | refs/heads/main | 2023-08-17T02:56:43.799975 | 2023-07-04T18:23:15 | 2023-07-04T18:23:15 | 149,284,135 | 0 | 0 | Apache-2.0 | 2023-09-11T08:18:27 | 2018-09-18T12:24:28 | Python | UTF-8 | Python | false | false | 711 | py | # Generated by Django 2.1.7 on 2019-03-08 18:54
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [("peering", "0033_router_encrypt_passwords")]
operations = [
migrations.AlterModelOptions(
name="routingpolicy",
options={
"ordering": ["-weight", "name"],
"verbose_name_plural": "routing policies",
},
),
migrations.AddField(
model_name="routingpolicy",
name="weight",
field=models.PositiveSmallIntegerField(
default=0, help_text="The higher the number, the higher the priority"
),
),
]
| [
"guillaume@mazoyer.eu"
] | guillaume@mazoyer.eu |
2f478ff41ee28ca4a2b766dd50ae38fe69fbc4a1 | b9a23d1947f5f6328ca13c7e652499173f64da47 | /s_081/s_081_plotter.pyde | 9d43ff8402374529d9c685ad205a498e69d768ab | [] | no_license | berinhard/sketches | 96414a14ec40ca1281dcd8b2fec2c50db1d76e9a | f0e4be211397f205bcc6bd2c8b053b920a26bb62 | refs/heads/master | 2021-06-09T07:49:59.220785 | 2020-12-08T04:14:55 | 2020-12-08T04:23:43 | 137,092,663 | 41 | 15 | null | 2021-03-20T00:41:39 | 2018-06-12T15:34:49 | JavaScript | UTF-8 | Python | false | false | 2,108 | pyde | # Author: Berin
# Sketches repo: https://github.com/berinhard/sketches
from random import choice
from save_frames import save_video_frames
add_library('svg')
WHITE = color(235, 235, 235)
WHITE_WITH_ALPHA = color(235, 235, 235, 70)
BLACK = color(27, 27, 27)
RED = color(181, 32, 10, 7)
GOLDEN = color(218, 185, 32, 7)
GREEN = color(32, 181, 10, 7)
CYAN = color(20, 255, 255, 7)
PURPLE = color(255, 20, 255, 7)
DISTANCES = [20 * (i + 1) for i in range(15)]
ANGLES = [45, 135, 225, 315]
class SplitableLine(object):
def __init__(self, start_pos, angle=None, walking_distance=None):
self.start_pos = start_pos
self.walking_distance = walking_distance or choice(DISTANCES)
self.angle = angle or radians(choice(ANGLES))
self.end_pos = None
def split(self):
x = self.start_pos.x + cos(self.angle) * self.walking_distance
y = self.start_pos.y + sin(self.angle) * self.walking_distance
self.end_pos = PVector(x, y)
lerp_index = choice(range(1, 10)) / 10.0
pos = PVector.lerp(self.start_pos, self.end_pos, lerp_index)
return SplitableLine(pos, self.angle + HALF_PI)
def display(self):
stroke(0)
line(self.start_pos.x, self.start_pos.y, self.end_pos.x, self.end_pos.y)
splitable_lines = [
SplitableLine(PVector(200, 200), walking_distance=DISTANCES[-1]),
SplitableLine(PVector(600, 200), walking_distance=DISTANCES[-1]),
SplitableLine(PVector(200, 600), walking_distance=DISTANCES[-1]),
SplitableLine(PVector(600, 600), walking_distance=DISTANCES[-1]),
]
def setup():
global walker
size(800, 800)
#background(BLACK)
strokeWeight(1)
#frameRate(24)
stroke(0)
def draw():
global splitable_lines
beginRecord(SVG, 's_081.svg')
for i in range(1000):
new_lines = []
for s_line in splitable_lines:
new_lines.append(s_line.split())
s_line.display()
splitable_lines = new_lines
print frameCount
noLoop()
endRecord()
def keyPressed():
if key == 's':
saveFrame("#########.png") | [
"bernardoxhc@gmail.com"
] | bernardoxhc@gmail.com |
526c71bd6687a28464391300348158e387bdff04 | 9d91b256f737b90d397d7a9306ba0c5874027de1 | /tests/duration/test_add_sub.py | 92d97c70022b77b875b60c210a8b234536f30aa2 | [
"MIT"
] | permissive | devcode1981/pendulum | bde8e60526048c346fa4d420bf10fa338310efe1 | af128be06f6b42f8127ba906e418961396919ea7 | refs/heads/master | 2023-04-07T08:07:46.284600 | 2018-11-25T03:09:34 | 2018-11-25T03:09:34 | 158,993,326 | 1 | 0 | MIT | 2023-04-04T01:06:21 | 2018-11-25T03:10:25 | Python | UTF-8 | Python | false | false | 1,162 | py | import pendulum
from datetime import timedelta
from ..conftest import assert_duration
def test_add_interval():
p1 = pendulum.duration(days=23, seconds=32)
p2 = pendulum.duration(days=12, seconds=30)
p = p1 + p2
assert_duration(p, 0, 0, 5, 0, 0, 1, 2)
def test_add_timedelta():
p1 = pendulum.duration(days=23, seconds=32)
p2 = timedelta(days=12, seconds=30)
p = p1 + p2
assert_duration(p, 0, 0, 5, 0, 0, 1, 2)
def test_add_unsupported():
p = pendulum.duration(days=23, seconds=32)
assert NotImplemented == p.__add__(5)
def test_sub_interval():
p1 = pendulum.duration(days=23, seconds=32)
p2 = pendulum.duration(days=12, seconds=28)
p = p1 - p2
assert_duration(p, 0, 0, 1, 4, 0, 0, 4)
def test_sub_timedelta():
p1 = pendulum.duration(days=23, seconds=32)
p2 = timedelta(days=12, seconds=28)
p = p1 - p2
assert_duration(p, 0, 0, 1, 4, 0, 0, 4)
def test_sub_unsupported():
p = pendulum.duration(days=23, seconds=32)
assert NotImplemented == p.__sub__(5)
def test_neg():
p = pendulum.duration(days=23, seconds=32)
assert_duration(-p, 0, 0, -3, -2, 0, 0, -32)
| [
"sebastien@eustace.io"
] | sebastien@eustace.io |
1a634ab28dee07221b1c19f9000ec0baf19a5a2b | 6ee05982a411d09a38526de738372a29b0585bb3 | /language/canine/tydiqa/data.py | 3202f7c42302da0929ad964e2f23bd913a9001e4 | [
"Apache-2.0",
"LicenseRef-scancode-generic-cla"
] | permissive | rpiryani/language | 661b3f996c041ef0ea8a0a11fcc762ab82de03d2 | 6a33c77284add1c978d5b022c7ba63b54d4f54c3 | refs/heads/master | 2023-04-19T19:19:22.118137 | 2021-04-30T18:24:14 | 2021-04-30T18:44:43 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 9,746 | py | # coding=utf-8
# Copyright 2018 The Google AI Language Team Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""Python representations of the TyDi QA primary task data.
This module does not contain any model-specific code nor preprocessing
heuritics. It's used for deserializing the data.
This module does not depend on TensorFlow and should be re-usable within your
favorite ML/DL framework.
"""
import collections
import enum
TextSpan = collections.namedtuple("TextSpan", "byte_positions text")
class AnswerType(enum.IntEnum):
"""Type of TyDi answer."""
UNKNOWN = 0
YES = 1
NO = 2
MINIMAL = 3
PASSAGE = 4
class Language(enum.IntEnum):
"""Names of languages contained in TyDi dataset."""
ARABIC = 0
BENGALI = 1
FINNISH = 2
INDONESIAN = 3
JAPANESE = 4
SWAHILI = 5
KOREAN = 6
RUSSIAN = 7
TELUGU = 8
THAI = 9
ENGLISH = 10
class Answer(collections.namedtuple("Answer", ["type", "text", "offset"])):
"""Answer record.
An Answer contains the type of the answer and possibly the text (for
long) as well as the offset (for extractive).
"""
def __new__(cls,
type_,
text = None,
offset = None):
return super(Answer, cls).__new__(cls, type_, text, offset)
class TyDiExample(object):
"""A single training/test example.
Typically created by `to_tydi_example`. This class is a fairly straightforward
serialization of the dict-based entry format created in
`create_entry_from_json`.
"""
def __init__(self,
example_id,
language_id,
question,
contexts,
plaintext,
context_to_plaintext_offset,
answer = None,
start_byte_offset = None,
end_byte_offset = None):
self.example_id = example_id
# A member of the `Language` enumeration as converted by `get_language_id`.
self.language_id = language_id
# `question` and `contexts` are the preprocessed question and plaintext
# with special tokens appended by `create_entry_from_json`. All candidate
# contexts have been concatenated in `contexts`.
self.question = question
self.contexts = contexts
# `plaintext` is the original article plaintext from the corpus.
self.plaintext = plaintext
# `context_to_plaintext_offset` gives a mapping from byte indices in
# `context` to byte indices in `plaintext`.
self.context_to_plaintext_offset = context_to_plaintext_offset
# The following attributes will be `None` for non-training examples.
# For training, the *offset attributes are derived from the TyDi entry's
# `start_offset` attribute via `make_tydi_answer`. They are offsets within
# the original plaintext.
self.answer = answer
self.start_byte_offset = start_byte_offset
self.end_byte_offset = end_byte_offset
def byte_str(text):
return text.encode("utf-8")
def byte_len(text):
# Python 3 encodes text as character sequences, not byte sequences
# (like Python 2).
return len(byte_str(text))
def byte_slice(text, start, end, errors="replace"):
# Python 3 encodes text as character sequences, not byte sequences
# (like Python 2).
return byte_str(text)[start:end].decode("utf-8", errors=errors)
def has_passage_answer(a):
return a["passage_answer"]["candidate_index"] >= 0
def get_first_annotation(json_dict, max_passages):
"""Returns the first minimal or passage answer in the example.
Returns the annotation with the earliest minimal answer span. If no annotation
has a minimal answer span, then the annotation with the earliest passage
answer will be returned.
Args:
json_dict: annotated example.
max_passages: see FLAGS.max_passages.
Returns:
annotation: (dict) selected annotation.
annotated_idx: (int) index of the first annotated candidate.
annotated_span: (tuple) byte offset of the start and end token of the
minimal answer. The end token is exclusive. This index is relative to this
particular passage's plaintext, not the full plaintext.
"""
if "annotations" not in json_dict:
return None, -1, (-1, -1)
positive_annotations = sorted(
[a for a in json_dict["annotations"] if has_passage_answer(a)],
key=lambda a: a["passage_answer"]["candidate_index"])
for a in positive_annotations:
if a["minimal_answer"]:
# Check if it is a non null answer.
start_byte_offset = a["minimal_answer"]["plaintext_start_byte"]
if start_byte_offset < 0:
continue
idx = a["passage_answer"]["candidate_index"]
if idx >= max_passages:
continue
end_byte_offset = a["minimal_answer"]["plaintext_end_byte"]
return a, idx, (global_to_local_offset(json_dict, idx, start_byte_offset),
global_to_local_offset(json_dict, idx, end_byte_offset))
for a in positive_annotations:
idx = a["passage_answer"]["candidate_index"]
if idx >= max_passages:
continue
return a, idx, (-1, -1)
return None, -1, (-1, -1)
def get_text_span(example, span):
"""Returns the text in the example's document in the given span."""
byte_positions = []
# `text` is a byte string since `document_plaintext` is also a byte string.
start = span["plaintext_start_byte"]
end = span["plaintext_end_byte"]
text = byte_slice(example["document_plaintext"], start, end)
for i in range(span["plaintext_start_byte"], span["plaintext_end_byte"]):
byte_positions.append(i)
return TextSpan(byte_positions, text)
def global_to_local_offset(json_dict, candidate_idx, byte_index):
"""Converts a byte index within the article to the byte offset within the candidate."""
global_start = json_dict["passage_answer_candidates"][candidate_idx][
"plaintext_start_byte"]
return byte_index - global_start
def get_candidate_text(json_dict, idx):
"""Returns a text representation of the candidate at the given index."""
# No candidate at this index.
if idx < 0 or idx >= len(json_dict["passage_answer_candidates"]):
raise ValueError("Invalid index for passage candidate: {}".format(idx))
return get_text_span(json_dict, json_dict["passage_answer_candidates"][idx])
def candidates_iter(json_dict):
"""Yields the candidates that should not be skipped in an example."""
for idx, cand in enumerate(json_dict["passage_answer_candidates"]):
yield idx, cand
def make_tydi_answer(contexts, answer):
"""Makes an Answer object following TyDi conventions.
Args:
contexts: String containing the context.
answer: Dictionary with `span_start` and `input_text` fields.
Returns:
An Answer object. If the Answer type is YES or NO or PASSAGE, the text
of the answer is the passage answer. If the answer type is UNKNOWN,
the text of the answer is empty.
"""
start = answer["span_start"]
end = answer["span_end"]
input_text = answer["input_text"]
if (answer["candidate_id"] == -1 or start >= byte_len(contexts) or
end > byte_len(contexts)):
answer_type = AnswerType.UNKNOWN
start = 0
end = 1
elif input_text.lower() == "yes":
answer_type = AnswerType.YES
elif input_text.lower() == "no":
answer_type = AnswerType.NO
elif input_text.lower() == "passage":
answer_type = AnswerType.PASSAGE
else:
answer_type = AnswerType.MINIMAL
return Answer(
answer_type, text=byte_slice(contexts, start, end), offset=start)
def get_language_id(input_text):
"""Maps string language id into integer."""
if input_text.lower() == "arabic":
language_id = Language.ARABIC
elif input_text.lower() == "finnish":
language_id = Language.FINNISH
elif input_text.lower() == "indonesian":
language_id = Language.INDONESIAN
elif input_text.lower() == "japanese":
language_id = Language.JAPANESE
elif input_text.lower() == "korean":
language_id = Language.KOREAN
elif input_text.lower() == "russian":
language_id = Language.RUSSIAN
elif input_text.lower() == "swahili":
language_id = Language.SWAHILI
elif input_text.lower() == "thai":
language_id = Language.THAI
elif input_text.lower() == "telugu":
language_id = Language.TELUGU
elif input_text.lower() == "bengali":
language_id = Language.BENGALI
elif input_text.lower() == "english":
language_id = Language.ENGLISH
else:
raise ValueError("Invalid language <%s>" % input_text)
return language_id
def to_tydi_example(entry,
is_training):
"""Converts a TyDi 'entry' from `create_entry_from_json` to `TyDiExample`."""
if is_training:
answer = make_tydi_answer(entry["contexts"], entry["answer"])
start_byte_offset = answer.offset
end_byte_offset = answer.offset + byte_len(answer.text)
else:
answer = None
start_byte_offset = None
end_byte_offset = None
return TyDiExample(
example_id=int(entry["id"]),
language_id=get_language_id(entry["language"]),
question=entry["question"]["input_text"],
contexts=entry["contexts"],
plaintext=entry["plaintext"],
context_to_plaintext_offset=entry["context_to_plaintext_offset"],
answer=answer,
start_byte_offset=start_byte_offset,
end_byte_offset=end_byte_offset)
| [
"kentonl@google.com"
] | kentonl@google.com |
dfc5b8648b212583d761bc97c8fecf2e919110d5 | 362fc140b0a179878ecb9121bf83e10d78f60ce0 | /mlprodict/onnxrt/shape_object.py | 014119895379b6fe5a2512bb6c9d38ba26a54dcb | [
"MIT"
] | permissive | adrinjalali/mlprodict | 4694e7f8435c13079082ad8726698a4b1b74ea8d | bc1606ec3683a7e2830875350eafc8cb8e2bc3a0 | refs/heads/master | 2020-06-23T13:38:08.097582 | 2019-08-13T12:50:29 | 2019-08-13T12:50:29 | 198,639,337 | 0 | 0 | null | 2019-07-24T13:18:00 | 2019-07-24T13:17:59 | null | UTF-8 | Python | false | false | 23,872 | py | """
@file
@brief Shape object.
"""
import numpy
class BaseDimensionShape:
"""
Base class to @see cl DimensionObject,
@see cl ShapeOperator, @see cl ShapeObject.
"""
def to_string(self, use_x=True):
"""
Converts the object into a string.
"""
raise NotImplementedError()
def evaluate(self, **kwargs):
"""
Evaluates the object, reduces the expression
to a number or a string.
"""
raise NotImplementedError()
class ShapeOperator(BaseDimensionShape):
"""
Base class for all shapes operator.
"""
def __init__(self, name, fct, fct_string, *args):
"""
@param name display name of the operator
@param fct function doing the operator
if argument are numeric
@param fct_string function represented as a string
@param args argument of the operator
"""
self._name = name
self._fct = fct
self._fct_string = fct_string
self._args = args
for a in self._args:
if not isinstance(a, DimensionObject):
raise TypeError(
"All arguments must be of type DimensionObject not '{}'.".format(type(a)))
def __repr__(self):
"""
usual
"""
return "{0}('{1}', {2}, '{2}', {3})".format(
self.__class__.__name__, self._name,
self._fct_string, self._args)
def to_string(self, use_x=True):
"""
Displays as a string.
@return a string
"""
raise NotImplementedError(
"Operator '{}' does not implement 'to_string': {}.".format(
self.__class__.__name__, repr(self)))
def evaluate(self, **kwargs):
"""
Evalutes the operator.
@param kwargs value for the variables.
@return string or integer
"""
args = []
has_string = False
for a in self._args:
a = DimensionObject._same_(a)
v = a.evaluate(**kwargs)
if isinstance(v, str):
has_string = True
args.append(v)
if has_string:
res = self._evaluate_string_(args, **kwargs)
else:
try:
res = self._fct(*args)
except TypeError as e:
raise RuntimeError(
"Unable to evaluate operator {} due to {}".format(repr(self), e))
return res
def _evaluate_string_(self, args, **kwargs):
"""
Evalutes the operator assuming some of them are still strings.
@param args arguments extracted by method *evaluate*
@param kwargs value for the variables.
@return string or integer
"""
raise NotImplementedError("This function must be overwritten.")
class ShapeBinaryOperator(ShapeOperator):
"""
Base class for shape binary operator.
"""
def __init__(self, name, fct, fct_string, x, y):
"""
@param name display name of the operator
@param fct function doing the operator
if argument are numeric
@param fct_string function represented as a string
@param x first argument
@param y second argument
"""
ShapeOperator.__init__(self, name, fct, fct_string, x, y)
if isinstance(x, tuple):
raise TypeError('x cannot be a tuple')
if isinstance(y, tuple):
raise TypeError('y cannot be a tuple')
def to_string(self, use_x=True):
"""
Applies binary operator to a dimension.
@param use_x use `'x'` if dimension is unknown
@return a string
"""
x, y = self._args # pylint: disable=W0632
if isinstance(x._dim, int):
if isinstance(y, DimensionObject):
if isinstance(y._dim, int):
return DimensionObject(self._fct(x._dim, y._dim)).to_string()
if isinstance(y._dim, str):
return DimensionObject("{}{}{}".format(x._dim, self._name, y._dim)).to_string()
if y._dim is None:
if use_x:
return DimensionObject("{}{}x".format(x._dim, self._name)).to_string()
else:
return DimensionObject("{}{}DimensionObject()".format(x._dim, self._name)).to_string()
raise TypeError(
"Unable to handle type '{}'.".format(type(y._dim)))
raise TypeError("Unable to handle type '{}'.".format(type(y)))
elif isinstance(x._dim, str):
if isinstance(y._dim, int):
return DimensionObject("{}{}{}".format(x._dim, self._name, y._dim)).to_string()
elif isinstance(y._dim, str):
return DimensionObject("({}){}({})".format(x._dim, self._name, y._dim)).to_string()
raise TypeError("Unable to handle type '{}'.".format(type(y._dim)))
else:
raise TypeError(
"Unable to handle type '{}'.".format(type(x._dim)))
def _evaluate_string_(self, args, **kwargs):
"""
Evalutes the operator assuming some of them are still strings.
@param args arguments extracted by method *evaluate*
@param kwargs value for the variables.
@return string or integer
"""
return self._name.join(map(lambda s: '({})'.format(s), args))
class ShapeBinaryFctOperator(ShapeBinaryOperator):
"""
Base class for shape binary operator defined by a function.
"""
def to_string(self, use_x=True):
"""
Applies binary operator to a dimension.
@param use_x use `'x'` if dimension is unknown
@return a string
"""
x, y = self._args # pylint: disable=W0632
if isinstance(x._dim, int):
if isinstance(y, DimensionObject):
if isinstance(y._dim, int):
return DimensionObject(self._fct(x._dim, y._dim)).to_string()
if isinstance(y._dim, str):
return DimensionObject("{}({},{})".format(self._name, x._dim, y._dim)).to_string()
if y._dim is None:
if use_x:
return DimensionObject("{}({},x)".format(self._name, x._dim)).to_string()
else:
return DimensionObject("{}({},DimensionObject())".format(self._name, x._dim)).to_string()
raise TypeError(
"Unable to handle type '{}'.".format(type(y._dim)))
raise TypeError("Unable to handle type '{}'.".format(type(y)))
elif isinstance(x._dim, str):
if isinstance(y._dim, int):
return DimensionObject("{}({},{})".format(self._name, x._dim, y._dim)).to_string()
elif isinstance(y._dim, str):
return DimensionObject("{}({},{})".format(self._name, x._dim, y._dim)).to_string()
raise TypeError("Unable to handle type '{}'.".format(type(y._dim)))
else:
raise TypeError(
"Unable to handle type '{}'.".format(type(x._dim)))
def _evaluate_string_(self, args, **kwargs):
"""
Evalutes the operator assuming some of them are still strings.
@param args arguments extracted by method *evaluate*
@param kwargs value for the variables.
@return string or integer
"""
return "{}({})".format(self._name, ",".join(map(str, args)))
class ShapeOperatorAdd(ShapeBinaryOperator):
"""
Shape addition.
"""
def __init__(self, x, y):
ShapeBinaryOperator.__init__(
self, '+', lambda a, b: a + b, 'lambda a, b: a + b', x, y)
def __repr__(self):
"""
Displays a string.
@return a string
"""
return "{0}({1}, {2})".format(
self.__class__.__name__, repr(self._args[0]), repr(self._args[1]))
class ShapeOperatorMul(ShapeBinaryOperator):
"""
Shape multiplication.
"""
def __init__(self, x, y):
ShapeBinaryOperator.__init__(
self, '*', lambda a, b: a * b, 'lambda a, b: a * b', x, y)
def __repr__(self):
"""
Displays a string.
@return a string
"""
return "{0}({1}, {2})".format(
self.__class__.__name__, repr(self._args[0]), repr(self._args[1]))
class ShapeOperatorMax(ShapeBinaryFctOperator):
"""
Shape multiplication.
"""
def __init__(self, x, y):
ShapeBinaryFctOperator.__init__(
self, 'max', lambda a, b: max(a, b), 'max(a, b)', x, y)
def __repr__(self):
"""
Displays a string.
@return a string
"""
return "{0}({1}, {2})".format(
self.__class__.__name__, repr(self._args[0]), repr(self._args[1]))
class DimensionObject(BaseDimensionShape):
"""
One dimension of a shape.
"""
def __init__(self, obj):
"""
@param obj int or @see cl DimensionObject or None to
specify something unknown
"""
if obj is None or obj == 0 or obj == '?':
self._dim = None
elif isinstance(obj, (int, str, ShapeOperator, DimensionObject)):
self._dim = obj
else:
raise TypeError("Unexpected type for obj: {}".format(type(obj)))
@property
def dim(self):
"""
Returns the dimension.
"""
return self._dim
def __repr__(self):
"""
usual
"""
if isinstance(self._dim, int):
return "DimensionObject({})".format(self._dim)
if isinstance(self._dim, DimensionObject):
return repr(self._dim)
if isinstance(self._dim, ShapeOperator):
return "DimensionObject({})".format(repr(self._dim))
return "DimensionObject('{}')".format(self._dim)
@staticmethod
def _same_(obj):
"""
Returns *obj* if *obj* is @see cl DimensionObject
otherwise converts it.
"""
if isinstance(obj, DimensionObject):
return obj
return DimensionObject(obj)
def to_string(self, use_x=True):
"""
Represents the dimension as a string.
"""
if isinstance(self._dim, int):
return '{}'.format(self._dim)
if isinstance(self._dim, ShapeOperator):
return self._dim.to_string()
if isinstance(self._dim, str):
return self._dim
if self._dim is None:
return 'x' if use_x else '?'
raise NotImplementedError(
"Not implemented for '{}'.".format(repr(self)))
def evaluate(self, **kwargs):
"""
Evalutes the dimension.
@param kwargs value for the variables.
@return string or integer
"""
if isinstance(self._dim, (int, ShapeOperator, DimensionObject)):
res = self._dim
elif isinstance(self._dim, str):
if self._dim in kwargs:
res = kwargs[self._dim]
else:
res = self._dim
elif self._dim is None:
pref = str(hex(id(self)))[2:]
res = "n{}".format(pref)
elif isinstance(self._dim, ):
res = self._dim.evaluate(**kwargs)
else:
raise NotImplementedError(
"Not implemented for '{}'.".format(repr(self)))
if isinstance(res, (ShapeOperator, DimensionObject)):
return res.evaluate(**kwargs)
return res
def __eq__(self, v):
"""
usual
"""
if isinstance(v, (int, str)):
return self._dim == v
if isinstance(v, DimensionObject):
return v == self._dim
if isinstance(v, ShapeOperator):
ve = v.evaluate()
return ve == self._dim
if v is None:
return self._dim is None
raise TypeError(
"Unable to compare a DimensionObject to {}".format(type(v)))
def __add__(self, obj):
"""
usual
"""
return DimensionObject(
ShapeOperatorAdd(self, DimensionObject._same_(obj)))
def __mul__(self, obj):
"""
usual
"""
return DimensionObject(
ShapeOperatorMul(self, DimensionObject._same_(obj)))
def __gt__(self, obj):
"""
usual
"""
if obj is None:
return not isinstance(self._dim, int)
if isinstance(self._dim, int) and isinstance(obj._dim, int):
return self._dim > obj._dim
if isinstance(self._dim, int) and obj._dim is None:
return False
if self._dim is None and isinstance(obj._dim, int):
return True
elif isinstance(self._dim, int) and isinstance(obj._dim, str):
return False
elif isinstance(self._dim, str) and isinstance(obj._dim, int):
return True
else:
if self._dim == obj._dim:
return False
ev1 = self.evaluate()
ev2 = obj.evaluate()
if ev1 == ev2:
return False
if isinstance(ev1, int) and isinstance(ev2, int):
return ev1 > ev2
raise RuntimeError(
"Cannot decide between\n{} and\n{}".format(self, obj))
class ShapeObject(BaseDimensionShape):
"""
Handles mathematical operations around shapes.
It stores a type (:epkg:`numpy` type),
and a name to somehow have an idea of where
the shape comes from in the :epkg:`ONNX` graph.
The shape itself is defined by a list of
@see cl DimensionObject or @see cl ShapeOperator
or *None* if the shape is unknown. A dimension is an
integer or a variable encoded as a string. This variable
is a way to tell the dimension may vary.
.. runpython::
:showcode:
import numpy
from mlprodict.onnxrt.shape_object import ShapeObject
sh1 = ShapeObject((1, 2), dtype=numpy.float32)
sh2 = ShapeObject((45, 2), dtype=numpy.float32)
mx = max(sh1, sh2)
print(mx)
sh1 = ShapeObject((1, 2), dtype=numpy.float32)
sh2 = ShapeObject((None, 2), dtype=numpy.float32)
print(sh2)
mx = max(sh1, sh2)
print(mx.to_string())
sh1 = ShapeObject((1, 2), dtype=numpy.float32)
sh2 = ShapeObject(('n', 2), dtype=numpy.float32)
print(sh2)
mx = max(sh1, sh2)
print(mx.evaluate(n=4))
"""
def __init__(self, shape, dtype=None, use_n1=False, name=None):
"""
@param shape tuple or `numpy.array`
@param dtype dtype
@param use_n1 use `'n'` if the first dimension is unknown
@param name optional, for debugging purposes
"""
self.name = name
if isinstance(shape, numpy.ndarray):
self._shape = [DimensionObject(s) for s in shape.shape]
self._dtype = shape.dtype
elif isinstance(shape, dict) and 'type' in shape:
tshape = shape['type']
if tshape['kind'] == 'tensor':
if tshape['shape'] == ('?', ):
self._shape = None
else:
self._shape = [DimensionObject(s) for s in tshape['shape']]
self._dtype = tshape['elem']
elif tshape['kind'] == 'map':
self._shape = []
self._dtype = 'map'
else:
raise ValueError("Wrong shape value {}".format(shape))
elif isinstance(shape, (tuple, list)):
self._shape = []
for s in shape:
self._shape.append(DimensionObject(s))
self._dtype = dtype
elif shape is None:
# shape is unknown
self._shape = None
self._dtype = dtype
else:
raise TypeError(
"Unexpected type for shape: {}".format(type(shape)))
if self._dtype is None:
raise ValueError(
"dtype cannot be None, shape type is {}\n{}".format(
type(shape), shape))
if self._shape is not None:
for i, a in enumerate(self._shape):
if not isinstance(a, DimensionObject):
raise TypeError('Dimension {} has a wrong type {}'.format(
i, type(a)))
if use_n1:
sh = self._shape[0] if self._shape else None
if isinstance(sh, DimensionObject) and sh._dim is None:
sh._dim = 'n'
def copy(self, dtype=None, name=None):
"""
A copy not a deepcopy.
@param dtype None or a value to rewrite the type.
@param name overwrites the name
@return @see cl ShapeObject
"""
if self._shape is None:
return ShapeObject(None, dtype=self.dtype, name=name or self.name)
return ShapeObject(self._shape.copy(),
self.dtype if dtype is None else dtype,
name=name or self.name)
def __getitem__(self, index):
"""
Extracts a specific dimension.
"""
if self._shape is None:
return None
if index >= len(self._shape):
return 1
return self._shape[index]
def __setitem__(self, index, value):
"""
Changes a specific dimension.
"""
if self._shape is None:
return
while len(self._shape) <= index:
self._shape.append(DimensionObject(1))
self._shape[index] = value
@property
def shape(self):
"""
Returns the stored shape.
"""
if self._shape is None:
return None
return tuple(self._shape)
def __len__(self):
"""
Returns the number of dimensions.
"""
if self._shape is None:
return 0
return len(self._shape)
@property
def dtype(self):
"""
Returns the stored *dtype*.
"""
return self._dtype
def reduce(self, axis=1, keepdims=False, dtype=None):
"""
Reduces the matrix. Removes one dimension.
@param axis axis
@param keepdims keep dimensions, replaces the removed
dimension by 1
@param dtype if not None, changes the type
@return new dimension
"""
if self._shape is None:
if self.name is None:
return self.copy()
else:
return self.copy(name="{}-RD".format(self.name))
if 0 <= axis < len(self._shape):
cp = self._shape.copy()
if keepdims:
cp[axis] = DimensionObject(1)
else:
del cp[axis]
return ShapeObject(cp, self._dtype if dtype is None else dtype,
name="{}-RD".format(self.name))
raise IndexError("axis={} is wrong, shape is {}".format(axis, self))
def __repr__(self):
"""
usual
"""
st = str(self.dtype)
if "'" in st:
st = st.split("'")[1]
if self.shape is None:
if self.name is None:
return "ShapeObject(None, dtype={})".format(st)
else:
return "ShapeObject(None, dtype={}, name='{}')".format(st, self.name)
else:
st_shape = []
for s in self.shape:
if isinstance(s._dim, (int, str)):
st_shape.append(str(s._dim))
else:
st_shape.append(repr(s))
st_shape = '({})'.format(", ".join(st_shape))
if self.name is None:
return "ShapeObject({}, dtype={})".format(st_shape, st)
else:
return "ShapeObject({}, dtype={}, name='{}')".format(
st_shape, st, self.name)
def __iter__(self):
"""
Iterators over dimensions.
"""
if self._shape is not None:
for d in self._shape:
yield d
def __gt__(self, a):
"""
Compares shapes. Operator ``>``.
"""
if isinstance(a, tuple):
a = ShapeObject(a, dtype=self._dtype)
if self._shape is None and a._shape is None:
return False
if self._shape is None:
return True
if a._shape is None:
return False
if len(self) > len(a):
return True
if len(self) < len(a):
return False
for d1, d2 in zip(self, a):
if d1 > d2:
return True
if d1 < d2:
return False
return False
def __eq__(self, a):
"""
Tests equality between two shapes.
"""
if isinstance(a, tuple):
a = ShapeObject(a, dtype=self._dtype)
if self._shape is None and a._shape is None:
return True
if self._shape is None or a._shape is None:
return False
if len(self) != len(a):
return False
for d1, d2 in zip(self, a):
if d1 == d2:
continue
return False
return True
def evaluate(self, **kwargs):
"""
Evaluates the shape.
"""
vs = []
for v in self:
d = v.evaluate(**kwargs)
vs.append(d)
return ShapeObject(tuple(vs), self._dtype, name="{}-EV".format(self.name))
def to_string(self, use_x=False):
"""
Converts shapes into a string.
"""
shapes = []
for a in self._shape:
shapes.append(a.to_string(use_x=use_x))
return '({})'.format(', '.join(shapes))
def product(self):
"""
Multiplies all the dimension.
@return @see cl DimensionObject
"""
cl = self[0]
for i in range(1, len(self)):
cl = cl * self[i]
return cl
def append(self, dim):
"""
Appends a dimension.
"""
if self._shape is None:
return
if isinstance(dim, DimensionObject):
self._shape.append(dim)
else:
self._shape.append(DimensionObject(dim))
def squeeze(self, axis):
"""
Removes one dimension.
"""
cp = self.copy(name='{}-SZ'.format(self.name))
cp.drop_axis(axis)
return cp
def transpose(self, perm):
"""
Removes one dimension.
"""
if self.shape is None:
return self.copy(name='{}-TR'.format(self.name))
cp = ShapeObject([None for p in perm], dtype=self.dtype,
name="{}-TR".format(self.name))
for i, p in enumerate(perm):
if p >= len(self):
# This should not happen.
cp._shape[i] = None
else:
cp._shape[i] = self._shape[p]
return cp
def drop_axis(self, axis):
"""
Drops an axis.
"""
if self._shape is not None:
if isinstance(axis, (tuple, list)):
for i in sorted(axis, reverse=True):
del self._shape[i]
else:
del self._shape[axis]
| [
"xavier.dupre@gmail.com"
] | xavier.dupre@gmail.com |
af34211344ee131cb660ec7830500c7c4adce6fb | fee1f9ec7be6049a27396ca24fb12287d36f66af | /19100101/echojce/d6_exercise_stats_word.py | 5829b67c7d96bc59958eca82d0447526895c4da3 | [] | no_license | zhoujie454650/selfteaching-python-camp | 4a85c7a792157af84c1ecfc3468c1401f946a48a | 5bb6a0c35adb3e26fee0ac68f29e12ac11a13710 | refs/heads/master | 2020-05-01T09:49:06.986010 | 2019-05-14T12:32:50 | 2019-05-14T12:32:50 | 177,408,611 | 0 | 0 | null | 2019-03-24T11:59:04 | 2019-03-24T11:59:04 | null | UTF-8 | Python | false | false | 3,128 | py | # this is d6 excercise for defining functions
# date : 2019.3.23
# author by : qiming
# 示例字符串
string1 = '''
The Zen of Python, by Tim Peters
Beautiful is better than ugly.
Explicit is better than implicit.
Simple is better than complex.
Complex is better than complicated.
Flat is better than nested.
Sparse is better than dense.
Readability counts.
Special cases aren't special enough to break the rules.
Although practicality beats purity.
Errors should never pass silently.
Unless explicitly silenced.
In the face of ambxiguity, refuse the temptation to guess.
There should be one-- and preferably only one --obvious way to do it.
Although that way may not be obvious at first unless you're Dutch.
Now is better than never.
Although never is often better than *right* now.
If the implementation is hard to explain, it's a bad idea.
If the implementation is easy to explain, it may be a good idea.
Namespaces are one honking great idea -- let's do more of those!
Python是一种计算机程序设计语言。是一种动态的、面向对象的脚本语言,最初被设计用于编写自动化脚本(shell),随着版本的不断更新和语言新功能的添加,越来越多被用于独立的、大型项目的开发。
'''
import collections
import re
def stats_text_en(string_en):
''' 统计英文词频
第一步:过滤英文字符,并将string拆分为list。
第二步:清理*-等标点符号。
第三步:使用collections库中的Counter函数进行词频统计并输出统计结果。
'''
result = re.sub("[^A-Za-z]", " ", string_en.strip())
newList = result.split( )
i=0
for i in range(0,len(newList)):
newList[i]=newList[i].strip('*-,.?!')
if newList[i]==' ':
newList[i].remove(' ')
else:
i=i+1
print('英文单词词频统计结果: ',collections.Counter(newList),'\n')
def stats_text_cn(string_cn):
''' 统计中文汉字字频
第一步:过滤汉字字符,并定义频率统计函数 stats()。
第二步:清除文本中的标点字符,将非标点字符组成新列表 new_list。
第三步:遍历列表,将字符同上一次循环中频率统计结果作为形参传给统计函数stats()。
第四步:统计函数在上一次统计结果基础上得出本次统计结果,赋值给newDict。
第五步:new_list遍历结束,输出倒序排列的统计结果。
'''
result1 = re.findall(u'[\u4e00-\u9fff]+', string_cn)
newString = ''.join(result1)
def stats(orgString, newDict) :
d = newDict
for m in orgString :
d[m] = d.get(m, 0) + 1
return d
new_list = []
for char in newString :
cn = char.strip('-*、。,:?!……')
new_list.append(cn)
words = dict()
for n in range(0,len(new_list)) :
words = stats(new_list[n],words)
newWords = sorted(words.items(), key=lambda item: item[1], reverse=True)
print('中文汉字字频统计结果: ',dict(newWords))
# 调用函数
stats_text_en(string1)
stats_text_cn(string1)
| [
"6396023+realcaiying@users.noreply.github.com"
] | 6396023+realcaiying@users.noreply.github.com |
0a2b8d5776dab01f8b75e847a18ca27dee3f0e87 | 5a281cb78335e06c631181720546f6876005d4e5 | /ec2-api-8.0.0/ec2api/tests/unit/test_integrated_scenario.py | aea31950559b9408e34a661f7b99407d9673427d | [
"Apache-2.0"
] | permissive | scottwedge/OpenStack-Stein | d25b2a5bb54a714fc23f0ff0c11fb1fdacad85e8 | 7077d1f602031dace92916f14e36b124f474de15 | refs/heads/master | 2021-03-22T16:07:19.561504 | 2020-03-15T01:31:10 | 2020-03-15T01:31:10 | 247,380,811 | 0 | 0 | Apache-2.0 | 2020-03-15T01:24:15 | 2020-03-15T01:24:15 | null | UTF-8 | Python | false | false | 12,986 | py | # Copyright 2014
# The Cloudscaling Group, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import mock
from ec2api.api import image as image_api
from ec2api.api import instance as instance_api
from ec2api.api import snapshot as snapshot_api
from ec2api.api import volume as volume_api
from ec2api.db import api as db_api
from ec2api import exception
from ec2api.tests.unit import base
from ec2api.tests.unit import fakes
class DBItemsAutoCreationTestCase(base.DbTestCase):
def setUp(self):
super(DBItemsAutoCreationTestCase, self).setUp()
self.mock_all_os()
self.context = base.create_context()
def assert_image_project(self, expected_project_id, image_id):
if expected_project_id:
context = mock.NonCallableMock(project_id=expected_project_id)
else:
context = self.context
image_item = db_api.get_item_by_id(context, image_id)
if expected_project_id:
self.assertIsNotNone(image_item)
else:
self.assertIsNone(image_item)
def test_describe_new_instance_then_its_volume(self):
os_instance_id = fakes.random_os_id()
os_volume_id = fakes.random_os_id()
os_instance = {
'id': os_instance_id,
'flavor': {'id': 'fake'},
'volumes_attached': [{'id': os_volume_id}],
}
os_volume = {
'id': os_volume_id,
'status': 'in-use',
'attachments': [{'device': '/dev/vdb',
'server_id': os_instance_id}],
}
self.nova_admin.servers.list.return_value = [
fakes.OSInstance_full(os_instance)]
self.cinder.volumes.list.return_value = [
fakes.OSVolume(os_volume)]
reservations = instance_api.describe_instances(self.context)
instance = reservations['reservationSet'][0]['instancesSet'][0]
volume_id = instance['blockDeviceMapping'][0]['ebs']['volumeId']
volume_api.describe_volumes(self.context, [volume_id])
def _test_describe_new_images(self, image_project_id=None,
aki_image_project_id=None,
with_id_mapping=False):
os_image_id = fakes.random_os_id()
os_aki_image_id = fakes.random_os_id()
os_image = {
'id': os_image_id,
'owner': image_project_id,
'is_public': True,
'container_format': 'ami',
'kernel_id': os_aki_image_id,
}
os_aki_image = {
'id': os_aki_image_id,
'owner': aki_image_project_id,
'is_public': True,
'container_format': 'aki',
}
self.glance.images.list.return_value = (
[fakes.OSImage(os_image), fakes.OSImage(os_aki_image)]
if with_id_mapping else
[fakes.OSImage(os_aki_image), fakes.OSImage(os_image)])
images = image_api.describe_images(self.context)
image = next(i for i in images['imagesSet']
if i['imageType'] == 'machine')
aki_image = next(i for i in images['imagesSet']
if i['imageType'] == 'kernel')
self.assertEqual(image_project_id, image['imageOwnerId'])
self.assert_image_project(
(image_project_id
if image_project_id == fakes.ID_OS_PROJECT else
None),
image['imageId'])
self.assertEqual(aki_image_project_id, aki_image['imageOwnerId'])
self.assert_image_project(
(aki_image_project_id
if aki_image_project_id == fakes.ID_OS_PROJECT else
None),
aki_image['imageId'])
def test_describe_new_alien_images(self):
alien_project_id = fakes.random_os_id()
self._test_describe_new_images(
image_project_id=alien_project_id,
aki_image_project_id=alien_project_id,
with_id_mapping=False)
def test_describe_new_local_images(self):
self._test_describe_new_images(
image_project_id=fakes.ID_OS_PROJECT,
aki_image_project_id=fakes.ID_OS_PROJECT,
with_id_mapping=False)
def test_describe_new_local_ami_alien_aki_images(self):
alien_project_id = fakes.random_os_id()
self._test_describe_new_images(
image_project_id=fakes.ID_OS_PROJECT,
aki_image_project_id=alien_project_id,
with_id_mapping=False)
def test_describe_new_alien_ami_local_aki_images(self):
alien_project_id = fakes.random_os_id()
self._test_describe_new_images(
image_project_id=alien_project_id,
aki_image_project_id=fakes.ID_OS_PROJECT,
with_id_mapping=False)
def test_describe_new_alien_images_with_mappings(self):
alien_project_id = fakes.random_os_id()
self._test_describe_new_images(
image_project_id=alien_project_id,
aki_image_project_id=alien_project_id,
with_id_mapping=True)
def test_describe_new_local_images_with_mappings(self):
self._test_describe_new_images(
image_project_id=fakes.ID_OS_PROJECT,
aki_image_project_id=fakes.ID_OS_PROJECT,
with_id_mapping=True)
def test_describe_new_local_ami_alien_aki_images_with_mappings(self):
alien_project_id = fakes.random_os_id()
self._test_describe_new_images(
image_project_id=fakes.ID_OS_PROJECT,
aki_image_project_id=alien_project_id,
with_id_mapping=True)
def test_describe_new_alien_ami_local_aki_images_with_mappings(self):
alien_project_id = fakes.random_os_id()
self._test_describe_new_images(
image_project_id=alien_project_id,
aki_image_project_id=fakes.ID_OS_PROJECT,
with_id_mapping=True)
def _get_new_ebs_image(self, image_project_id=None,
bdm_image_project_id=None):
os_image_id = fakes.random_os_id()
os_snapshot_id = fakes.random_os_id()
os_bdm_image_id = fakes.random_os_id()
os_image = {
'id': os_image_id,
'owner': image_project_id,
'is_public': True,
'container_format': 'ami',
'bdm_v2': True,
'block_device_mapping': [{'device_name': '/dev/vds',
'source_type': 'snapshot',
'destination_type': 'volume',
'snapshot_id': os_snapshot_id}],
}
if os_bdm_image_id:
os_image['block_device_mapping'].append({
'device_name': '/dev/vdi',
'source_type': 'image',
'destination_type': 'volume',
'image_id': os_bdm_image_id,
'size': 100})
os_snapshot = {
'id': os_snapshot_id,
}
os_bdm_image = {
'id': os_bdm_image_id,
'owner': bdm_image_project_id,
'is_public': True,
}
os_images = [fakes.OSImage(os_image)]
if bdm_image_project_id:
os_images.append(fakes.OSImage(os_bdm_image))
self.glance.images.list.return_value = os_images
self.cinder.volume_snapshots.list.return_value = (
[fakes.OSSnapshot(os_snapshot)]
if image_project_id == fakes.ID_OS_PROJECT else
[])
images = image_api.describe_images(self.context)
return next(i for i in images['imagesSet']
if i['blockDeviceMapping'])
def _find_snapshot_id_in_bdm(self, image, device_name):
return next(bdm['ebs']['snapshotId']
for bdm in image['blockDeviceMapping']
if bdm['deviceName'] == device_name)
def test_describe_new_local_snapshot_from_new_image(self):
image = self._get_new_ebs_image(image_project_id=fakes.ID_OS_PROJECT)
snapshot_id = self._find_snapshot_id_in_bdm(image, '/dev/vds')
snapshot_api.describe_snapshots(self.context, [snapshot_id])
def test_describe_new_alien_snapshot_from_new_image(self):
image = self._get_new_ebs_image(image_project_id=fakes.random_os_id())
snapshot_id = self._find_snapshot_id_in_bdm(image, '/dev/vds')
self.assertRaises(exception.InvalidSnapshotNotFound,
snapshot_api.describe_snapshots,
self.context, [snapshot_id])
def test_describe_new_local_bdm_image_from_local_image(self):
image = self._get_new_ebs_image(
image_project_id=fakes.ID_OS_PROJECT,
bdm_image_project_id=fakes.ID_OS_PROJECT)
image_id = self._find_snapshot_id_in_bdm(image, '/dev/vdi')
image_api.describe_images(self.context, image_id=[image_id])
self.assert_image_project(fakes.ID_OS_PROJECT, image_id)
def test_describe_new_alien_bdm_image_from_new_local_image(self):
alien_project_id = fakes.random_os_id()
image = self._get_new_ebs_image(
image_project_id=fakes.ID_OS_PROJECT,
bdm_image_project_id=alien_project_id)
image_id = self._find_snapshot_id_in_bdm(image, '/dev/vdi')
image_api.describe_images(self.context, image_id=[image_id])
self.assert_image_project(None, image_id)
def test_describe_new_alien_bdm_image_from_new_alien_image(self):
alien_project_id = fakes.random_os_id()
image = self._get_new_ebs_image(
image_project_id=alien_project_id,
bdm_image_project_id=alien_project_id)
image_id = self._find_snapshot_id_in_bdm(image, '/dev/vdi')
image_api.describe_images(self.context, image_id=[image_id])
self.assert_image_project(None, image_id)
def _test_describe_new_instance_then_its_image(self, image_project_id):
os_instance_id = fakes.random_os_id()
os_image_id = fakes.random_os_id()
os_instance = {
'id': os_instance_id,
'flavor': {'id': 'fake'},
'image': {'id': os_image_id},
}
os_image = {
'id': os_image_id,
'owner': image_project_id,
'visibility': 'public',
}
self.nova_admin.servers.list.return_value = [
fakes.OSInstance_full(os_instance)]
self.glance.images.list.return_value = [fakes.OSImage(os_image)]
reservations = instance_api.describe_instances(self.context)
instance = reservations['reservationSet'][0]['instancesSet'][0]
image_id = instance['imageId']
image = (image_api.describe_images(self.context, image_id=[image_id])
['imagesSet'][0])
self.assertEqual(image_id, image['imageId'])
self.assertEqual(image_project_id, image['imageOwnerId'])
expected_project_id = (fakes.ID_OS_PROJECT
if image_project_id == fakes.ID_OS_PROJECT else
None)
self.assert_image_project(expected_project_id, image['imageId'])
def test_describe_new_instance_then_its_local_image(self):
self._test_describe_new_instance_then_its_image(fakes.ID_OS_PROJECT)
def test_describe_new_instance_then_its_alien_image(self):
self._test_describe_new_instance_then_its_image(fakes.random_os_id())
def test_describe_new_instance_then_its_alien_image_attribute(self):
os_instance_id = fakes.random_os_id()
os_image_id = fakes.random_os_id()
alien_project_id = fakes.random_os_id()
os_instance = {
'id': os_instance_id,
'flavor': {'id': 'fake'},
'image': {'id': os_image_id},
}
os_image = {
'id': os_image_id,
'owner': alien_project_id,
'is_public': True,
}
self.nova_admin.servers.list.return_value = [
fakes.OSInstance_full(os_instance)]
self.glance.images.get.return_value = fakes.OSImage(os_image)
reservations = instance_api.describe_instances(self.context)
instance = reservations['reservationSet'][0]['instancesSet'][0]
image_id = instance['imageId']
# NOTE(ft): ensure that InvalidAMIID.NotFound is not raised
self.assertRaises(exception.AuthFailure,
image_api.describe_image_attribute,
self.context, image_id, 'description')
| [
"Wayne Gong@minbgong-winvm.cisco.com"
] | Wayne Gong@minbgong-winvm.cisco.com |
a70f46a6bea169b6595b64c976d186f17c1cc171 | b47abf1a1e7daf4320c2c3a35d963ac6f7663702 | /mvpa/atlases/__init__.py | f09b72cb2af45c503c104bdd62bf243a69891440 | [
"MIT"
] | permissive | gorlins/PyMVPA | d9690399b24ae7d760735b4aa858e08912c9235d | 2a8fcaa57457c8994455144e9e69494d167204c4 | refs/heads/master | 2021-01-16T18:08:43.289333 | 2009-09-05T15:06:35 | 2009-09-05T15:06:35 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,046 | py | # emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-
# vi: set ft=python sts=4 ts=4 sw=4 et:
### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ##
#
# See COPYING file distributed along with the PyMVPA package for the
# copyright and license terms.
#
### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ##
"""Import helper for PyMVPA anatomical atlases
Module Organization
===================
mvpa.atlases module contains support for various atlases
.. packagetree::
:style: UML
:group Base Implementations: base
:group Atlases from FSL: fsl
:group Helpers: warehouse transformation
"""
__docformat__ = 'restructuredtext'
if __debug__:
from mvpa.base import debug
debug('INIT', 'mvpa.atlases')
from mvpa.atlases.base import LabelsAtlas, ReferencesAtlas, XMLAtlasException
from mvpa.atlases.fsl import FSLProbabilisticAtlas
from mvpa.atlases.warehouse import Atlas, KNOWN_ATLASES, KNOWN_ATLAS_FAMILIES
if __debug__:
debug('INIT', 'mvpa.atlases end')
| [
"debian@onerussian.com"
] | debian@onerussian.com |
d545c9d0153fe73fb3024225c493f6309795b2bb | 11c036911cf893325199d9e9a91a11cd1dca7c90 | /bst_iterator/solution.py | b4cc675a147cbbf30c4d9a1c0e14e5e271338b95 | [] | no_license | arpiagar/HackerEarth | 34f817f69e94d88657c1d8991a55aca302cdc890 | 4a94f1b11a353ab6b2837a1ac77bfbd7c91f91d2 | refs/heads/master | 2021-07-18T14:23:05.124943 | 2021-02-09T21:58:12 | 2021-02-09T21:58:12 | 19,204,412 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 2,192 | py | #https://leetcode.com/problems/binary-search-tree-iterator/submissions/
# Definition for a binary tree node.
# class TreeNode:
# def __init__(self, x):
# self.val = x
# self.left = None
# self.right = None
# 7 3
class BSTIterator:
def __init__(self, root: TreeNode):
self.node_list = [root]
self.node_visited = {root: 0}
def next(self) -> int:
"""
@return the next smallest number
"""
return self.add_to_list_and_map().val
def add_to_list_and_map(self):
node = self.node_list[0]
temp_node = node
if self.node_visited[temp_node] == 0:
self.node_visited[temp_node] = 1
if temp_node.left:
while temp_node.left !=None:
self.node_list.append(temp_node.left)
self.node_visited[temp_node.left] = 1
temp_node=temp_node.left
self.node_visited[temp_node] = 2
return temp_node
else:
self.node_visited[temp_node] = 1
return self.add_to_list_and_map()
elif self.node_visited[node] == 1:
self.node_visited[node] = 2
return node
else:
self.node_list = self.node_list[1:]
if node.right == None:
return self.add_to_list_and_map()
else:
self.node_list.append(node.right)
self.node_visited[node.right]=0
return self.add_to_list_and_map()
def hasNext(self) -> bool:
"""
@return whether we have a next smallest number
"""
if self.node_list:
print(len(self.node_list),self.node_list[0].left,self.node_list[0].right, self.node_list[0].val, self.node_visited[self.node_list[0]])
if len(self.node_list) == 1 and self.node_visited[self.node_list[0]]==2 and not self.node_list[0].right:
return False
return True
else:
return False
# Your BSTIterator object will be instantiated and called as such:
# obj = BSTIterator(root)
# param_1 = obj.next()
# param_2 = obj.hasNext()
| [
"arpit.agarwal@booking.com"
] | arpit.agarwal@booking.com |
91f420a5007fb80dea0f2198aa6fae2d6e6c238f | c5b7e98aa295b3bd0596e7fca1028e1e9bbba122 | /ARK.py | c4bf5b8be6a55dd47b4be6078c2115d417f9f47f | [] | no_license | sunomon/100at6low10 | a3439462fd8c2e92eb0b94e634cdf7c2c92f93e3 | d062161e542fe6d6168204f5a45ae6da62b6f589 | refs/heads/main | 2023-06-11T18:31:11.533914 | 2021-07-06T09:07:46 | 2021-07-06T09:07:46 | 382,562,626 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,377 | py | import time
import pyupbit
import datetime
import schedule
from fbprophet import Prophet
access = "PgXnWWPxxv88s7z2PSnz4aoqaYL0gxkRxReK0WDK"
secret = "wgCfiEmQVH76s9sblwFKQsOKOp91t2ic3XAHuNsK"
def get_target1_price(ticker, k):
df = pyupbit.get_ohlcv(ticker, interval="day", count=2)
target1_price = df.iloc[0]['close'] + (df.iloc[0]['high'] - df.iloc[0]['low']) * k
return target1_price
def get_target2_price(ticker, k):
df = pyupbit.get_ohlcv(ticker, interval="day", count=2)
target2_price = df.iloc[0]['close'] + (df.iloc[0]['high'] - df.iloc[0]['low']) * k
return target2_price
def get_target3_price(ticker, k):
df = pyupbit.get_ohlcv(ticker, interval="day", count=2)
target3_price = df.iloc[0]['close'] + (df.iloc[0]['high'] - df.iloc[0]['low']) * k
return target3_price
def get_target4_price(ticker, k):
df = pyupbit.get_ohlcv(ticker, interval="day", count=2)
target4_price = df.iloc[0]['close'] + (df.iloc[0]['high'] - df.iloc[0]['low']) * k
return target4_price
def get_target5_price(ticker, k):
df = pyupbit.get_ohlcv(ticker, interval="day", count=2)
target5_price = df.iloc[0]['close'] + (df.iloc[0]['high'] - df.iloc[0]['low']) * k
return target5_price
def get_target6_price(ticker, k):
df = pyupbit.get_ohlcv(ticker, interval="day", count=2)
target6_price = df.iloc[0]['close'] + (df.iloc[0]['high'] - df.iloc[0]['low']) * k
return target6_price
def get_start_time(ticker):
df = pyupbit.get_ohlcv(ticker, interval="day", count=1)
start_time = df.index[0]
return start_time
def get_balance(ticker):
balances = upbit.get_balances()
for b in balances:
if b['currency'] == ticker:
if b['balance'] is not None:
return float(b['balance'])
else:
return 0
return 0
def get_current_price(ticker):
return pyupbit.get_orderbook(tickers=ticker)[0]["orderbook_units"][0]["ask_price"]
predicted_close_price = 0
def predict_price(ticker):
global predicted_close_price
df = pyupbit.get_ohlcv(ticker, interval="minute60")
df = df.reset_index()
df['ds'] = df['index']
df['y'] = df['close']
data = df[['ds','y']]
model = Prophet()
model.fit(data)
future = model.make_future_dataframe(periods=24, freq='H')
forecast = model.predict(future)
closeDf = forecast[forecast['ds'] == forecast.iloc[-1]['ds'].replace(hour=9)]
if len(closeDf) == 0:
closeDf = forecast[forecast['ds'] == data.iloc[-1]['ds'].replace(hour=9)]
closeValue = closeDf['yhat'].values[0]
predicted_close_price = closeValue
predict_price("KRW-ARK")
schedule.every().hour.do(lambda: predict_price("KRW-ARK"))
upbit = pyupbit.Upbit(access, secret)
print("autotrade start")
while True:
try:
now = datetime.datetime.now()
start_time = get_start_time("KRW-ARK")
middle1_time = start_time + datetime.timedelta(hours=3)
middle2_time = start_time + datetime.timedelta(hours=9)
middle3_time = start_time + datetime.timedelta(hours=15)
end_time = start_time + datetime.timedelta(days=1)
schedule.run_pending()
if start_time < now < end_time - datetime.timedelta(hours=1):
target1_price = get_target1_price("KRW-ARK", 0.1)
target2_price = get_target2_price("KRW-ARK", 0.2)
target3_price = get_target3_price("KRW-ARK", 0.3)
target4_price = get_target4_price("KRW-ARK", 0.4)
target5_price = get_target5_price("KRW-ARK", 0.5)
target6_price = get_target6_price("KRW-ARK", 0.6)
current_price = get_current_price("KRW-ARK")
krw = get_balance("KRW")
ark = get_balance("ARK")
if target1_price <= current_price < target1_price*1.02 and target1_price*1.1 <= predicted_close_price:
if krw >= 1000000 and ark < 10000/(target1_price*1.02):
upbit.buy_market_order("KRW-ARK", 1000000)
if 5000 < krw < 1000000 and ark < 10000/(target1_price*1.02):
upbit.buy_market_order("KRW-ARK", krw*0.9995)
if target2_price <= current_price < target2_price*1.02 and target2_price*1.15 <= predicted_close_price:
if krw >= 1000000 and ark < 10000/(target2_price*1.02):
upbit.buy_market_order("KRW-ARK", 1000000)
if 5000 < krw < 1000000 and ark < 10000/(target2_price*1.02):
upbit.buy_market_order("KRW-ARK", krw*0.9995)
if target3_price <= current_price < target3_price*1.02 and target3_price*1.2 <= predicted_close_price:
if krw >= 1000000 and ark < 10000/(target3_price*1.02):
upbit.buy_market_order("KRW-ARK", 1000000)
if 5000 < krw < 1000000 and ark < 10000/(target3_price*1.02):
upbit.buy_market_order("KRW-ARK", krw*0.9995)
if target4_price <= current_price < target4_price*1.02 and target4_price*1.25 <= predicted_close_price:
if krw >= 1000000 and ark < 10000/(target4_price*1.02):
upbit.buy_market_order("KRW-ARK", 1000000)
if 5000 < krw < 1000000 and ark < 10000/(target4_price*1.02):
upbit.buy_market_order("KRW-ARK", krw*0.9995)
if target5_price <= current_price < target5_price*1.02 and target5_price*1.3 <= predicted_close_price:
if krw >= 1000000 and ark < 10000/(target5_price*1.02):
upbit.buy_market_order("KRW-ARK", 1000000)
if 5000 < krw < 1000000 and ark < 10000/(target5_price*1.02):
upbit.buy_market_order("KRW-ARK", krw*0.9995)
if target6_price <= current_price < target6_price*1.02 and target6_price*1.35 <= predicted_close_price:
if krw >= 1000000 and ark < 10000/(target6_price*1.02):
upbit.buy_market_order("KRW-ARK", 1000000)
if 5000 < krw < 1000000 and ark < 10000/(target6_price*1.02):
upbit.buy_market_order("KRW-ARK", krw*0.9995)
if ark > 1000000*1.001*1.2/current_price:
upbit.sell_market_order("KRW-ARK", ark*0.9995)
elif middle1_time < now < middle2_time:
ark = get_balance("ARK")
current_price = get_current_price("KRW-ARK")
if ark > 1000000*1.001*1.1/current_price:
upbit.sell_market_order("KRW-ARK", ark*0.9995)
elif middle2_time < now < middle3_time:
ark = get_balance("ARK")
current_price = get_current_price("KRW-ARK")
if ark > 1000000*1.001*1.05/current_price:
upbit.sell_market_order("KRW-ARK", ark*0.9995)
elif middle3_time < now < end_time - datetime.timedelta(hours=1):
ark = get_balance("ARK")
current_price = get_current_price("KRW-ARK")
if ark > 1000000*1.001*1.03/current_price or current_price > predicted_close_price:
upbit.sell_market_order("KRW-ARK", ark*0.9995)
else:
ark = get_balance("ARK")
current_price = get_current_price("KRW-ARK")
if ark > 1000000*1.001/current_price:
upbit.sell_market_order("KRW-ARK", ark*0.9995)
time.sleep(1)
except Exception as e:
print(e)
time.sleep(1)
| [
"noreply@github.com"
] | sunomon.noreply@github.com |
2c43299ecc34ec23afb270c90846c746c8306059 | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p02761/s462447361.py | 69384e889176bfda05dabb08fc5eb2678077220e | [] | no_license | Aasthaengg/IBMdataset | 7abb6cbcc4fb03ef5ca68ac64ba460c4a64f8901 | f33f1c5c3b16d0ea8d1f5a7d479ad288bb3f48d8 | refs/heads/main | 2023-04-22T10:22:44.763102 | 2021-05-13T17:27:22 | 2021-05-13T17:27:22 | 367,112,348 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 674 | py | def resolve():
N, M = list(map(int, input().split()))
SC = [list(map(int, input().split())) for _ in range(M)]
value = [None for _ in range(N)]
for s, c in SC:
if not (value[s-1] is None or value[s-1] == c):
print(-1)
return
value[s-1] = c
for i in range(N):
if value[i] is None:
if i == 0:
if N > 1:
value[i] = 1
else:
value[i] = 0
else:
value[i] = 0
if N > 1 and value[0] == 0:
print(-1)
else:
print("".join(map(str, value)))
if '__main__' == __name__:
resolve() | [
"66529651+Aastha2104@users.noreply.github.com"
] | 66529651+Aastha2104@users.noreply.github.com |
d68d1d9bd66667fde387802ccfbcdabf02aefc98 | 9294b3424928386124eee22d436f2eb8d4c261f2 | /agents/views.py | f05aa26bc8f3ce5586cdf06554387ef1d39b3eaf | [] | no_license | khrispin-whiteman/buysellauto | 1cb8ff0459f5cfeb81fcd1af5dc5fc7f27f478dd | e1cae7bdb8c74102eabd70f154c0ef0f03758d63 | refs/heads/master | 2022-11-10T23:28:19.151335 | 2020-06-21T14:45:08 | 2020-06-21T14:45:08 | 241,604,117 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 10,822 | py | from django.contrib import messages
from django.contrib.auth import authenticate, login
from django.contrib.auth.decorators import login_required
from django.contrib.auth.forms import AuthenticationForm
from django.contrib.auth.views import LoginView
from django.core.exceptions import ValidationError
from django.http import HttpResponseRedirect, HttpResponse
from django.shortcuts import render, redirect
from django.urls import reverse
from django.views import View
from agents.forms import AgentAddForm
from agents.models import Agent, AgentType
from businessdirectory.models import Equipment
from orders.models import Order
from store.decorators import agent_required
from store.models import User, Product
from django.views.generic import CreateView
# class AgentRegisterView(View):
# def get(self, request):
# return render(request, 'registration/agent_registration.html', { 'form': AgentAddForm() })
#
# def post(self, request):
# form = AgentAddForm(request.POST)
# if form.is_valid():
# user = form.save()
# return redirect(reverse('login'))
#
# return render(request, 'registration/agent_registration.html', { 'form': form })
class AgentRegisterView(CreateView):
model = User
form_class = AgentAddForm
template_name = 'registration/agent_registration.html'
def get_context_data(self, **kwargs):
kwargs['user_type'] = 'staff'
return super().get_context_data(**kwargs)
def form_valid(self, form):
user = form.save()
# if self.request.FILES:
# user.picture = self.request.FILES['picture']
# user.save()
return redirect('login')
# class AgentLoginView(View):
# def get(self, request):
# return render(request, 'registration/agent_login.html', {'form': AuthenticationForm})
#
# # really low level
# def post(self, request):
# form = AuthenticationForm(request, data=request.POST)
# if form.is_valid():
# user = authenticate(
# request,
# username=form.cleaned_data.get('username'),
# password=form.cleaned_data.get('password')
# )
#
# if user is None:
# print('USER IS NONE')
# return render(
# request,
# 'registration/agent_login.html',
# {'form': form, 'invalid_creds': True}
# )
#
# try:
# form.confirm_login_allowed(user)
# except ValidationError:
# return render(
# request,
# 'registration/agent_login.html',
# {'form': form, 'invalid_creds': True}
# )
# login(request, user)
#
# return redirect(reverse('agentdashboard'))
def user_login(request):
if request.method == 'POST':
username = request.POST.get('username')
password = request.POST.get('password')
user = authenticate(username=username, password=password)
if user:
if user.is_active:
login(request, user)
return HttpResponseRedirect(reverse('agentdashboard'))
else:
messages.success(request, "Your account is inactive.")
return render(request, 'registration/agent_login.html', {})
elif user is None:
messages.error(request, "Invalid login details given")
return render(request, 'registration/agent_login.html', {})
else:
return render(request, 'registration/agent_login.html', {})
@login_required
def agent_dashboard(request):
all_vehicles = Product.objects.filter(user__id=request.user.id)
print(request.user.username, all_vehicles.count())
active_vehicles = Product.objects.filter(user=request.user, active=True)
all_equipments = Equipment.objects.filter(user=request.user)
active_equipments = Equipment.objects.filter(user=request.user, active=True)
# orders = Order.objects.filter(vehicle_of_interest__user__product=request.user)
return render(request, 'agents/dashboard.html',
{
'all_vehicles': all_vehicles,
'active_vehicles': active_vehicles,
'all_equipments': all_equipments,
'active_equipments': active_equipments,
# 'orders': orders
})
@agent_required
def agent_profile(request):
agent = Agent.objects.get(user=request.user)
agent_types = AgentType.objects.all()
user = request.user.id
user = User.objects.get(pk=user)
form = AgentAddForm()
if request.method == 'POST':
form = AgentAddForm(request.POST)
if form.is_valid():
# update user
# user.first_name = request.POST.get('first_name')
# user.last_name = request.POST.get('last_name')
# user.email = request.POST.get('email')
# user.phone = request.POST.get('phone')
# user.portfolio_site = request.POST.get('portfolio_site')
# user.country = request.POST.get('country')
# user.city = request.POST.get('city')
# user.address = request.POST.get('address')
# user.postal_code = request.POST.get('postal_code')
# user.picture = request.POST.get('picture')
if request.FILES:
user.picture = request.FILES['picture']
user.save()
# update agent
print('AGENT TYPE ID: ', request.POST.get('agent_type'))
get_agent_type = AgentType.objects.get(id=request.POST.get('agent_type'))
agent.company_name = request.POST.get('company_name')
agent.agent_type = get_agent_type
agent.experience = request.POST.get('experience')
agent.description = request.POST.get('description')
agent.save()
messages.success(request, 'Your profile was successfully edited.')
return redirect("/profile/")
else:
form = AgentAddForm(instance=User, initial={
'firstname': user.first_name,
'lastname': user.last_name,
'email': user.email,
'phone': user.phone,
'portfolio_site': user.portfolio_site,
'country': user.country,
'city': user.city,
'address': user.address,
'postal_code': user.postal_code,
'picture': user.picture,
})
return render(request, 'agents/agent_profile.html',
{
'agent': agent,
'agent_types': agent_types,
'form': form
})
@login_required
def agent_profile_update(request):
""" Check if the fired request is a POST then grab changes and update the records otherwise we show an empty form """
user = request.user.id
user = User.objects.get(pk=user)
agent = Agent.objects.get(user=user)
agent_types = AgentType.objects.all()
form = AgentAddForm()
if request.method == 'POST':
# form = AgentAddForm(request.POST)
# if form.is_valid():
# update user
user.first_name = request.POST.get('first_name')
user.last_name = request.POST.get('last_name')
user.email = request.POST.get('email')
user.phone = request.POST.get('phone')
user.portfolio_site = request.POST.get('portfolio_site')
user.country = request.POST.get('country')
user.city = request.POST.get('city')
user.address = request.POST.get('address')
user.postal_code = request.POST.get('postal_code')
# user.picture = request.FILES.get['picture']
if request.FILES:
user.picture = request.FILES['picture']
user.save()
# update agent
print('AGENT TYPE ID: ', request.POST.get('agent_type'))
get_agent_type = AgentType.objects.get(id=request.POST.get('agent_type'))
agent.company_name = request.POST.get('company_name')
agent.agent_type = get_agent_type
agent.experience = request.POST.get('experience')
agent.description = request.POST.get('description')
agent.save()
messages.success(request, 'Your profile was successfully edited.')
return redirect("/profile/")
# else:
# form = AgentAddForm(instance=User, initial={
# 'first_name': user.first_name,
# 'last_name': user.last_name,
# 'email': user.email,
# 'phone': user.phone,
# 'portfolio_site': user.portfolio_site,
# 'country': user.country,
# 'city': user.city,
# 'address': user.address,
# 'postal_code': user.postal_code,
# 'picture': user.picture,
# })
return render(request, 'agents/agent_profile.html',
{
'agent': agent,
'agent_types': agent_types,
'form': form
})
@agent_required
def agent_vehicles(request):
all_vehicles = Product.objects.filter(user__id=request.user.id)
return render(request, 'agents/agent_vehicles.html',
{
'all_vehicles': all_vehicles,
})
@agent_required
def agent_vehicle_detail(request, pk):
vehicle_details = Product.objects.get(user=request.user, id=pk)
return render(request, 'agents/agent_vehicle_details.html',
{
'vehicle_details': vehicle_details,
})
@agent_required
def agent_equipments(request):
all_equipments = Equipment.objects.filter(user=request.user)
return render(request, 'agents/agent_equipments.html',
{
'all_equipments': all_equipments,
})
@agent_required
def agent_equipment_detail(request, pk):
equipment_details = Equipment.objects.get(user=request.user, id=pk)
return render(request, 'agents/agent_equipment_detail.html',
{
'equipment_details': equipment_details,
})
def agents_list(request):
all_agents = Agent.objects.all()
return render(request, 'agents/agents_list.html',
{
'all_agents': all_agents,
})
def agents_details(request, pk):
agent_details = Agent.objects.get(user__id=pk)
return render(request, 'agents/agents_details.html',
{
'agent_details': agent_details,
})
| [
"khrispinwhiteman@gmail.com"
] | khrispinwhiteman@gmail.com |
2aa898f0fc19d777a0f1a0ab64f2ad7965b9298b | bcbc5fbdaf73146c1473f925d8d3303ef9d1256f | /tests/logic_adapter_tests/test_data_cache.py | 007497cde3d393ad5e93ca65c3daac80d9cfd547 | [
"BSD-3-Clause"
] | permissive | korymath/ChatterBot | b1a3b2700d4eefbbc5a3460e174dd9d539131902 | b517e696e016b6c2fae4b5326029b16d45ee6471 | refs/heads/master | 2021-01-15T09:27:41.970135 | 2016-04-08T05:21:35 | 2016-04-08T05:21:35 | 55,752,170 | 1 | 0 | null | 2016-04-08T05:18:31 | 2016-04-08T05:18:31 | null | UTF-8 | Python | false | false | 2,270 | py | from unittest import TestCase
from chatterbot import ChatBot
from chatterbot.adapters.logic import LogicAdapter
from chatterbot.conversation import Statement
import os
class DummyMutatorLogicAdapter(LogicAdapter):
"""
This is a dummy class designed to modify a
the resulting statement before it is returned.
"""
def process(self, statement):
statement.add_extra_data("pos_tags", "NN")
self.context.storage.update(statement)
return 1, statement
class DataCachingTests(TestCase):
def setUp(self):
self.test_data_directory = 'test_data'
self.test_database_name = self.random_string() + ".db"
if not os.path.exists(self.test_data_directory):
os.makedirs(self.test_data_directory)
database_path = os.path.join(
self.test_data_directory,
self.test_database_name
)
self.chatbot = ChatBot(
"Test Bot",
io_adapter="chatterbot.adapters.io.NoOutputAdapter",
logic_adapter="tests.logic_adapter_tests.test_data_cache.DummyMutatorLogicAdapter",
database=database_path
)
self.chatbot.train([
"Hello",
"How are you?"
])
def random_string(self, start=0, end=9000):
"""
Generate a string based on a random number.
"""
from random import randint
return str(randint(start, end))
def remove_data(self):
import shutil
if os.path.exists(self.test_data_directory):
shutil.rmtree(self.test_data_directory)
def tearDown(self):
"""
Remove the test database.
"""
self.chatbot.storage.drop()
self.remove_data()
def test_additional_attributes_saved(self):
"""
Test that an additional data attribute can be added to the statement
and that this attribute is saved.
"""
response = self.chatbot.get_response("Hello")
found_statement = self.chatbot.storage.find("Hello")
self.assertIsNotNone(found_statement)
self.assertIn("pos_tags", found_statement.serialize())
self.assertEqual(
"NN",
found_statement.serialize()["pos_tags"]
)
| [
"gunthercx@gmail.com"
] | gunthercx@gmail.com |
48e884145f2d6d824b9b7ca96b18b696b8ba315c | 5d9932a1abeae21b8201368e5cf465680f106761 | /data_ccxt/async_support/acx.py | cfc8148129cac02d95e719368eb21d1300673d1f | [] | no_license | qqzhangjian789/text | 5dc6086e55d8a9494b889fa40cc9730da6bf5940 | 938be0df0a965aacf13cfb942548b8d2a1c7cec0 | refs/heads/master | 2023-05-04T11:38:47.178345 | 2021-05-21T17:44:13 | 2021-05-21T17:44:13 | 286,178,737 | 1 | 6 | null | null | null | null | UTF-8 | Python | false | false | 17,497 | py | # -*- coding: utf-8 -*-
# PLEASE DO NOT EDIT THIS FILE, IT IS GENERATED AND WILL BE OVERWRITTEN:
# https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code
from data_ccxt.async_support.base.exchange import Exchange
from data_ccxt.base.errors import InsufficientFunds
from data_ccxt.base.errors import OrderNotFound
class acx(Exchange):
def describe(self):
return self.deep_extend(super(acx, self).describe(), {
'id': 'acx',
'name': 'ACX',
'countries': ['AU'],
'rateLimit': 1000,
'version': 'v2',
'has': {
'cancelOrder': True,
'CORS': True,
'createOrder': True,
'fetchBalance': True,
'fetchMarkets': True,
'fetchOHLCV': True,
'fetchOrder': True,
'fetchOrderBook': True,
'fetchTicker': True,
'fetchTickers': True,
'fetchTime': True,
'fetchTrades': True,
'withdraw': True,
},
'timeframes': {
'1m': '1',
'5m': '5',
'15m': '15',
'30m': '30',
'1h': '60',
'2h': '120',
'4h': '240',
'12h': '720',
'1d': '1440',
'3d': '4320',
'1w': '10080',
},
'urls': {
'logo': 'https://user-images.githubusercontent.com/1294454/30247614-1fe61c74-9621-11e7-9e8c-f1a627afa279.jpg',
'extension': '.json',
'api': 'https://acx.io/api',
'www': 'https://acx.io',
'doc': 'https://acx.io/documents/api_v2',
},
'api': {
'public': {
'get': [
'depth', # Get depth or specified market Both asks and bids are sorted from highest price to lowest.
'k_with_pending_trades', # Get K data with pending trades, which are the trades not included in K data yet, because there's delay between trade generated and processed by K data generator
'k', # Get OHLC(k line) of specific market
'markets', # Get all available markets
'order_book', # Get the order book of specified market
'order_book/{market}',
'tickers', # Get ticker of all markets
'tickers/{market}', # Get ticker of specific market
'timestamp', # Get server current time, in seconds since Unix epoch
'trades', # Get recent trades on market, each trade is included only once Trades are sorted in reverse creation order.
'trades/{market}',
],
},
'private': {
'get': [
'members/me', # Get your profile and accounts info
'deposits', # Get your deposits history
'deposit', # Get details of specific deposit
'deposit_address', # Where to deposit The address field could be empty when a new address is generating(e.g. for bitcoin), you should try again later in that case.
'orders', # Get your orders, results is paginated
'order', # Get information of specified order
'trades/my', # Get your executed trades Trades are sorted in reverse creation order.
'withdraws', # Get your cryptocurrency withdraws
'withdraw', # Get your cryptocurrency withdraw
],
'post': [
'orders', # Create a Sell/Buy order
'orders/multi', # Create multiple sell/buy orders
'orders/clear', # Cancel all my orders
'order/delete', # Cancel an order
'withdraw', # Create a withdraw
],
},
},
'fees': {
'trading': {
'tierBased': False,
'percentage': True,
'maker': 0.2 / 100,
'taker': 0.2 / 100,
},
'funding': {
'tierBased': False,
'percentage': True,
'withdraw': {}, # There is only 1% fee on withdrawals to your bank account.
},
},
'commonCurrencies': {
'PLA': 'Plair',
},
'exceptions': {
'2002': InsufficientFunds,
'2003': OrderNotFound,
},
})
async def fetch_markets(self, params={}):
markets = await self.publicGetMarkets(params)
result = []
for i in range(0, len(markets)):
market = markets[i]
id = market['id']
symbol = market['name']
baseId = self.safe_string(market, 'base_unit')
quoteId = self.safe_string(market, 'quote_unit')
if (baseId is None) or (quoteId is None):
ids = symbol.split('/')
baseId = ids[0].lower()
quoteId = ids[1].lower()
base = baseId.upper()
quote = quoteId.upper()
base = self.safe_currency_code(base)
quote = self.safe_currency_code(quote)
# todo: find out their undocumented precision and limits
precision = {
'amount': 8,
'price': 8,
}
result.append({
'id': id,
'symbol': symbol,
'base': base,
'quote': quote,
'baseId': baseId,
'quoteId': quoteId,
'precision': precision,
'info': market,
'active': None,
'limits': self.limits,
})
return result
async def fetch_balance(self, params={}):
await self.load_markets()
response = await self.privateGetMembersMe(params)
balances = self.safe_value(response, 'accounts')
result = {'info': balances}
for i in range(0, len(balances)):
balance = balances[i]
currencyId = self.safe_string(balance, 'currency')
code = self.safe_currency_code(currencyId)
account = self.account()
account['free'] = self.safe_float(balance, 'balance')
account['used'] = self.safe_float(balance, 'locked')
result[code] = account
return self.parse_balance(result)
async def fetch_order_book(self, symbol, limit=None, params={}):
await self.load_markets()
market = self.market(symbol)
request = {
'market': market['id'],
}
if limit is not None:
request['limit'] = limit # default = 300
orderbook = await self.publicGetDepth(self.extend(request, params))
timestamp = self.safe_timestamp(orderbook, 'timestamp')
return self.parse_order_book(orderbook, timestamp)
def parse_ticker(self, ticker, market=None):
timestamp = self.safe_timestamp(ticker, 'at')
ticker = ticker['ticker']
symbol = None
if market:
symbol = market['symbol']
last = self.safe_float(ticker, 'last')
return {
'symbol': symbol,
'timestamp': timestamp,
'datetime': self.iso8601(timestamp),
'high': self.safe_float(ticker, 'high'),
'low': self.safe_float(ticker, 'low'),
'bid': self.safe_float(ticker, 'buy'),
'bidVolume': None,
'ask': self.safe_float(ticker, 'sell'),
'askVolume': None,
'vwap': None,
'open': self.safe_float(ticker, 'open'),
'close': last,
'last': last,
'previousClose': None,
'change': None,
'percentage': None,
'average': None,
'baseVolume': self.safe_float(ticker, 'vol'),
'quoteVolume': None,
'info': ticker,
}
async def fetch_tickers(self, symbols=None, params={}):
await self.load_markets()
response = await self.publicGetTickers(params)
ids = list(response.keys())
result = {}
for i in range(0, len(ids)):
id = ids[i]
market = None
symbol = id
if id in self.markets_by_id:
market = self.markets_by_id[id]
symbol = market['symbol']
else:
base = id[0:3]
quote = id[3:6]
base = base.upper()
quote = quote.upper()
base = self.safe_currency_code(base)
quote = self.safe_currency_code(quote)
symbol = base + '/' + quote
result[symbol] = self.parse_ticker(response[id], market)
return self.filter_by_array(result, 'symbol', symbols)
async def fetch_ticker(self, symbol, params={}):
await self.load_markets()
market = self.market(symbol)
request = {
'market': market['id'],
}
response = await self.publicGetTickersMarket(self.extend(request, params))
return self.parse_ticker(response, market)
def parse_trade(self, trade, market=None):
timestamp = self.parse8601(self.safe_string(trade, 'created_at'))
id = self.safe_string(trade, 'tid')
symbol = None
if market is not None:
symbol = market['symbol']
return {
'info': trade,
'id': id,
'timestamp': timestamp,
'datetime': self.iso8601(timestamp),
'symbol': symbol,
'type': None,
'side': None,
'order': None,
'takerOrMaker': None,
'price': self.safe_float(trade, 'price'),
'amount': self.safe_float(trade, 'volume'),
'cost': self.safe_float(trade, 'funds'),
'fee': None,
}
async def fetch_time(self, params={}):
response = await self.publicGetTimestamp(params)
#
# 1594911427
#
return response * 1000
async def fetch_trades(self, symbol, since=None, limit=None, params={}):
await self.load_markets()
market = self.market(symbol)
request = {
'market': market['id'],
}
response = await self.publicGetTrades(self.extend(request, params))
return self.parse_trades(response, market, since, limit)
def parse_ohlcv(self, ohlcv, market=None):
return [
self.safe_timestamp(ohlcv, 0),
self.safe_float(ohlcv, 1),
self.safe_float(ohlcv, 2),
self.safe_float(ohlcv, 3),
self.safe_float(ohlcv, 4),
self.safe_float(ohlcv, 5),
]
async def fetch_ohlcv(self, symbol, timeframe='1m', since=None, limit=None, params={}):
await self.load_markets()
market = self.market(symbol)
if limit is None:
limit = 500 # default is 30
request = {
'market': market['id'],
'period': self.timeframes[timeframe],
'limit': limit,
}
if since is not None:
request['timestamp'] = int(since / 1000)
response = await self.publicGetK(self.extend(request, params))
return self.parse_ohlcvs(response, market, timeframe, since, limit)
def parse_order_status(self, status):
statuses = {
'done': 'closed',
'wait': 'open',
'cancel': 'canceled',
}
return self.safe_string(statuses, status, status)
def parse_order(self, order, market=None):
marketId = self.safe_string(order, 'market')
symbol = self.safe_symbol(marketId, market)
timestamp = self.parse8601(self.safe_string(order, 'created_at'))
status = self.parse_order_status(self.safe_string(order, 'state'))
type = self.safe_string(order, 'type')
side = self.safe_string(order, 'side')
id = self.safe_string(order, 'id')
return self.safe_order({
'id': id,
'clientOrderId': None,
'timestamp': timestamp,
'datetime': self.iso8601(timestamp),
'lastTradeTimestamp': None,
'status': status,
'symbol': symbol,
'type': type,
'timeInForce': None,
'postOnly': None,
'side': side,
'price': self.safe_float(order, 'price'),
'stopPrice': None,
'amount': self.safe_float(order, 'volume'),
'filled': self.safe_float(order, 'executed_volume'),
'remaining': self.safe_float(order, 'remaining_volume'),
'trades': None,
'fee': None,
'info': order,
'cost': None,
'average': None,
})
async def fetch_order(self, id, symbol=None, params={}):
await self.load_markets()
request = {
'id': int(id),
}
response = await self.privateGetOrder(self.extend(request, params))
return self.parse_order(response)
async def create_order(self, symbol, type, side, amount, price=None, params={}):
await self.load_markets()
request = {
'market': self.market_id(symbol),
'side': side,
'volume': str(amount),
'ord_type': type,
}
if type == 'limit':
request['price'] = str(price)
response = await self.privatePostOrders(self.extend(request, params))
marketId = self.safe_value(response, 'market')
market = self.safe_value(self.markets_by_id, marketId)
return self.parse_order(response, market)
async def cancel_order(self, id, symbol=None, params={}):
await self.load_markets()
request = {
'id': id,
}
response = await self.privatePostOrderDelete(self.extend(request, params))
order = self.parse_order(response)
status = order['status']
if status == 'closed' or status == 'canceled':
raise OrderNotFound(self.id + ' ' + self.json(order))
return order
async def withdraw(self, code, amount, address, tag=None, params={}):
self.check_address(address)
await self.load_markets()
currency = self.currency(code)
# they have XRP but no docs on memo/tag
request = {
'currency': currency['id'],
'sum': amount,
'address': address,
}
response = await self.privatePostWithdraw(self.extend(request, params))
# withdrawal response is undocumented
return {
'info': response,
'id': None,
}
def nonce(self):
return self.milliseconds()
def encode_params(self, params):
if 'orders' in params:
orders = params['orders']
query = self.urlencode(self.keysort(self.omit(params, 'orders')))
for i in range(0, len(orders)):
order = orders[i]
keys = list(order.keys())
for k in range(0, len(keys)):
key = keys[k]
value = order[key]
query += '&orders%5B%5D%5B' + key + '%5D=' + str(value)
return query
return self.urlencode(self.keysort(params))
def sign(self, path, api='public', method='GET', params={}, headers=None, body=None):
request = '/api/' + self.version + '/' + self.implode_params(path, params)
if 'extension' in self.urls:
request += self.urls['extension']
query = self.omit(params, self.extract_params(path))
url = self.urls['api'] + request
if api == 'public':
if query:
url += '?' + self.urlencode(query)
else:
self.check_required_credentials()
nonce = str(self.nonce())
query = self.encode_params(self.extend({
'access_key': self.apiKey,
'tonce': nonce,
}, params))
auth = method + '|' + request + '|' + query
signed = self.hmac(self.encode(auth), self.encode(self.secret))
suffix = query + '&signature=' + signed
if method == 'GET':
url += '?' + suffix
else:
body = suffix
headers = {'Content-Type': 'application/x-www-form-urlencoded'}
return {'url': url, 'method': method, 'body': body, 'headers': headers}
def handle_errors(self, code, reason, url, method, headers, body, response, requestHeaders, requestBody):
if response is None:
return
if code == 400:
error = self.safe_value(response, 'error')
errorCode = self.safe_string(error, 'code')
feedback = self.id + ' ' + self.json(response)
self.throw_exactly_matched_exception(self.exceptions, errorCode, feedback)
# fallback to default error handler
| [
"qqzhangjian000@163.com"
] | qqzhangjian000@163.com |
709e78c2b8bc7044a4039b9309ee131eb6a4c2bf | 15f321878face2af9317363c5f6de1e5ddd9b749 | /solutions_python/Problem_135/2561.py | 5c5cf379a6e3f42b99e7e7d7cedcccfa7f4e7302 | [] | no_license | dr-dos-ok/Code_Jam_Webscraper | c06fd59870842664cd79c41eb460a09553e1c80a | 26a35bf114a3aa30fc4c677ef069d95f41665cc0 | refs/heads/master | 2020-04-06T08:17:40.938460 | 2018-10-14T10:12:47 | 2018-10-14T10:12:47 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 848 | py | def getint ():
return int(raw_input())
def printCase(c, s):
print "Case #" + str(c) + ": " + str(s)
def intersection (list1, list2):
first = set (list1)
second = set (list2)
return list(first.intersection(second))
def getPossibleCards (rows1, choice1, rows2, choice2):
firstpos = rows1[(choice1 - 1) * 4 : (choice1) * 4];
return intersection(firstpos, rows2[(choice2 - 1) * 4 : (choice2) * 4]);
for i in range(getint()):
a1 = getint();
rows1 = raw_input() + " " + raw_input() + " " + raw_input() + " " + raw_input()
a2 = getint();
rows2 = raw_input() + " " + raw_input() + " " + raw_input() + " " + raw_input()
pcards = getPossibleCards(rows1.split(" "), a1, rows2.split(" "), a2)
if len(pcards) == 0:
printCase(i+1,"Volunteer cheated!")
elif len(pcards) == 1:
printCase(i+1,pcards[0])
else:
printCase(i+1,"Bad magician!") | [
"miliar1732@gmail.com"
] | miliar1732@gmail.com |
0f8f8c2a132dc4b5f32f59e3caeec2ca41fa62fd | 48894ae68f0234e263d325470178d67ab313c73e | /pm/pmwriter/utils.py | 3d645751e738fe862b42f2f2f4e85fd3d1f828ce | [
"BSD-3-Clause"
] | permissive | DreamerDDL/noc | 7f949f55bb2c02c15ac2cc46bc62d957aee43a86 | 2ab0ab7718bb7116da2c3953efd466757e11d9ce | refs/heads/master | 2021-05-10T18:22:53.678588 | 2015-06-29T12:28:20 | 2015-06-29T12:28:20 | 118,628,133 | 0 | 0 | null | 2018-01-23T15:19:51 | 2018-01-23T15:19:51 | null | UTF-8 | Python | false | false | 2,347 | py | ## -*- coding: utf-8 -*-
##----------------------------------------------------------------------
## Various utilities
##----------------------------------------------------------------------
## Copyright (C) 2007-2014 The NOC Project
## See LICENSE for details
##----------------------------------------------------------------------
try:
from cStringIO import StringIO
except ImportError:
from StringIO import StringIO
try:
import cPickle as pickle
HAS_CPICKLE = True
except:
import pickle
HAS_CPICKLE = False
## Safe unpickler
if HAS_CPICKLE:
class SafeUnpickler(object):
PICKLE_SAFE = {
"copy_reg": set(["_reconstructor"]),
"__builtin__": set(["object"]),
}
@classmethod
def find_class(cls, module, name):
if not module in cls.PICKLE_SAFE:
raise pickle.UnpicklingError(
"Attempting to unpickle unsafe module %s" % module)
__import__(module)
mod = sys.modules[module]
if not name in cls.PICKLE_SAFE[module]:
raise pickle.UnpicklingError(
"Attempting to unpickle unsafe class %s" % name)
return getattr(mod, name)
@classmethod
def loads(cls, pickle_string):
pickle_obj = pickle.Unpickler(StringIO(pickle_string))
pickle_obj.find_global = cls.find_class
return pickle_obj.load()
else:
class SafeUnpickler(pickle.Unpickler):
PICKLE_SAFE = {
"copy_reg": set(["_reconstructor"]),
"__builtin__": set(["object"]),
}
def find_class(self, module, name):
if not module in self.PICKLE_SAFE:
raise pickle.UnpicklingError(
"Attempting to unpickle unsafe module %s" % module)
__import__(module)
mod = sys.modules[module]
if not name in self.PICKLE_SAFE[module]:
raise pickle.UnpicklingError(
"Attempting to unpickle unsafe class %s" % name)
return getattr(mod, name)
@classmethod
def loads(cls, pickle_string):
return cls(StringIO(pickle_string)).load()
def get_unpickler(insecure=False):
if insecure:
return pickle
else:
return SafeUnpickler
| [
"dv@nocproject.org"
] | dv@nocproject.org |
9c7dca77c6c26775f1feecfead204233a89add10 | d83fde3c891f44014f5339572dc72ebf62c38663 | /_bin/google-cloud-sdk/.install/.backup/lib/surface/compute/firewall_rules/update.py | 9a34bca4513ed8a3027d2f2242b7c8767484d7d2 | [
"LicenseRef-scancode-unknown-license-reference",
"Apache-2.0"
] | permissive | gyaresu/dotfiles | 047cc3ca70f4b405ba272856c69ee491a79d2ebe | e5e533b3a081b42e9492b228f308f6833b670cfe | refs/heads/master | 2022-11-24T01:12:49.435037 | 2022-11-01T16:58:13 | 2022-11-01T16:58:13 | 17,139,657 | 1 | 1 | null | 2020-07-25T14:11:43 | 2014-02-24T14:59:59 | Python | UTF-8 | Python | false | false | 10,340 | py | # Copyright 2014 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""Command for updating firewall rules."""
from __future__ import absolute_import
from __future__ import unicode_literals
from googlecloudsdk.api_lib.compute import base_classes
from googlecloudsdk.api_lib.compute import firewalls_utils
from googlecloudsdk.calliope import base
from googlecloudsdk.calliope import exceptions as calliope_exceptions
from googlecloudsdk.command_lib.compute.firewall_rules import flags
@base.ReleaseTracks(base.ReleaseTrack.GA)
class UpdateFirewall(base.UpdateCommand):
"""Update a firewall rule."""
with_egress_firewall = True
with_service_account = True
with_disabled = False
with_logging = False
FIREWALL_RULE_ARG = None
@classmethod
def Args(cls, parser):
cls.FIREWALL_RULE_ARG = flags.FirewallRuleArgument()
cls.FIREWALL_RULE_ARG.AddArgument(parser, operation_type='update')
firewalls_utils.AddCommonArgs(
parser,
for_update=True,
with_egress_support=cls.with_egress_firewall,
with_service_account=cls.with_service_account,
with_disabled=cls.with_disabled)
firewalls_utils.AddArgsForServiceAccount(parser, for_update=True)
def ValidateArgument(self, messages, args):
self.new_allowed = firewalls_utils.ParseRules(
args.allow, messages, firewalls_utils.ActionType.ALLOW)
args_unset = all(
x is None
for x in (args.allow, args.description, args.source_ranges,
args.source_tags, args.target_tags))
if self.with_egress_firewall:
args_unset = args_unset and all(
x is None
for x in (args.destination_ranges, args.priority, args.rules))
if self.with_service_account:
args_unset = args_unset and all(
x is None
for x in (args.source_service_accounts, args.target_service_accounts))
if self.with_disabled:
args_unset = args_unset and args.disabled is None
if self.with_logging:
args_unset = (args_unset and args.enable_logging is None)
if args_unset:
raise calliope_exceptions.ToolException(
'At least one property must be modified.')
if args.rules and args.allow:
raise firewalls_utils.ArgumentValidationError(
'Can NOT specify --rules and --allow in the same request.')
def Run(self, args):
"""Issues requests necessary to update the Firewall rules."""
holder = base_classes.ComputeApiHolder(self.ReleaseTrack())
client = holder.client
self.ValidateArgument(client.messages, args)
# Set the resource reference which is used in composing resource-get
# request.
resource_reference = self.FIREWALL_RULE_ARG.ResolveAsResource(
args, holder.resources)
get_request = self._GetGetRequest(client, resource_reference)
cleared_fields = []
objects = client.MakeRequests([get_request])
new_object = self.Modify(client, args, objects[0], cleared_fields)
# If existing object is equal to the proposed object or if
# Modify() returns None, then there is no work to be done, so we
# print the resource and exit.
if not new_object or objects[0] == new_object:
return objects[0]
with client.apitools_client.IncludeFields(cleared_fields):
resource_list = client.MakeRequests(
[self._GetSetRequest(client, resource_reference, new_object)])
return resource_list
def _GetGetRequest(self, client, resource_reference):
"""Returns the request for the existing Firewall resource."""
return (client.apitools_client.firewalls, 'Get',
client.messages.ComputeFirewallsGetRequest(
firewall=resource_reference.Name(),
project=resource_reference.project))
def _GetSetRequest(self, client, resource_reference, replacement):
request = client.messages.ComputeFirewallsPatchRequest(
firewall=replacement.name,
firewallResource=replacement,
project=resource_reference.project)
return (client.apitools_client.firewalls, 'Patch', request)
def Modify(self, client, args, existing, cleared_fields):
"""Returns a modified Firewall message and included fields."""
if args.allow:
allowed = self.new_allowed
elif args.allow is None:
allowed = existing.allowed
else:
cleared_fields.append('allowed')
allowed = []
if args.description:
description = args.description
elif args.description is None:
description = existing.description
else:
cleared_fields.append('description')
description = None
if args.source_ranges:
source_ranges = args.source_ranges
elif args.source_ranges is None:
source_ranges = existing.sourceRanges
else:
cleared_fields.append('sourceRanges')
source_ranges = []
if args.source_tags:
source_tags = args.source_tags
elif args.source_tags is None:
source_tags = existing.sourceTags
else:
cleared_fields.append('sourceTags')
source_tags = []
if args.target_tags:
target_tags = args.target_tags
elif args.target_tags is None:
target_tags = existing.targetTags
else:
cleared_fields.append('targetTags')
target_tags = []
denied = []
if args.rules:
if existing.allowed:
allowed = firewalls_utils.ParseRules(args.rules, client.messages,
firewalls_utils.ActionType.ALLOW)
else:
denied = firewalls_utils.ParseRules(args.rules, client.messages,
firewalls_utils.ActionType.DENY)
elif args.rules is not None:
if existing.allowed:
cleared_fields.append('allowed')
allowed = []
else:
cleared_fields.append('denied')
denied = []
direction = existing.direction
if args.priority is None:
priority = existing.priority
else:
priority = args.priority
destination_ranges = []
if args.destination_ranges:
destination_ranges = args.destination_ranges
elif args.destination_ranges is None:
destination_ranges = existing.destinationRanges
else:
cleared_fields.append('destinationRanges')
source_service_accounts = []
if args.source_service_accounts:
source_service_accounts = args.source_service_accounts
elif args.source_service_accounts is None:
source_service_accounts = existing.sourceServiceAccounts
else:
cleared_fields.append('sourceServiceAccounts')
target_service_accounts = []
if args.target_service_accounts:
target_service_accounts = args.target_service_accounts
elif args.target_service_accounts is None:
target_service_accounts = existing.targetServiceAccounts
else:
cleared_fields.append('targetServiceAccounts')
new_firewall = client.messages.Firewall(
name=existing.name,
direction=direction,
priority=priority,
allowed=allowed,
denied=denied,
description=description,
network=existing.network,
sourceRanges=source_ranges,
sourceTags=source_tags,
destinationRanges=destination_ranges,
targetTags=target_tags,
sourceServiceAccounts=source_service_accounts,
targetServiceAccounts=target_service_accounts)
return new_firewall
@base.ReleaseTracks(base.ReleaseTrack.BETA)
class BetaUpdateFirewall(UpdateFirewall):
"""Update a firewall rule."""
with_disabled = True
@classmethod
def Args(cls, parser):
cls.FIREWALL_RULE_ARG = flags.FirewallRuleArgument()
cls.FIREWALL_RULE_ARG.AddArgument(parser, operation_type='update')
firewalls_utils.AddCommonArgs(
parser,
for_update=True,
with_egress_support=cls.with_egress_firewall,
with_service_account=cls.with_service_account,
with_disabled=cls.with_disabled)
firewalls_utils.AddArgsForServiceAccount(parser, for_update=True)
def Modify(self, client, args, existing, cleared_fields):
new_firewall = super(BetaUpdateFirewall, self).Modify(
client, args, existing, cleared_fields)
if args.disabled is not None:
new_firewall.disabled = args.disabled
return new_firewall
@base.ReleaseTracks(base.ReleaseTrack.ALPHA)
class AlphaUpdateFirewall(BetaUpdateFirewall):
"""Update a firewall rule."""
with_logging = True
@classmethod
def Args(cls, parser):
cls.FIREWALL_RULE_ARG = flags.FirewallRuleArgument()
cls.FIREWALL_RULE_ARG.AddArgument(parser, operation_type='update')
firewalls_utils.AddCommonArgs(
parser,
for_update=True,
with_egress_support=cls.with_egress_firewall,
with_service_account=cls.with_service_account,
with_disabled=cls.with_disabled)
firewalls_utils.AddArgsForServiceAccount(parser, for_update=True)
flags.AddEnableLogging(parser, default=None)
def Modify(self, client, args, existing, cleared_fields):
new_firewall = super(AlphaUpdateFirewall, self).Modify(
client, args, existing, cleared_fields)
if args.enable_logging is None:
new_firewall.enableLogging = existing.enableLogging
else:
new_firewall.enableLogging = args.enable_logging
return new_firewall
UpdateFirewall.detailed_help = {
'brief':
'Update a firewall rule.',
'DESCRIPTION':
"""\
*{command}* is used to update firewall rules that allow/deny
incoming/outgoing traffic. The firewall rule will only be updated for
arguments that are specifically passed. Other attributes will remain
unaffected. The `action` flag (whether to allow or deny matching
traffic) cannot be defined when updating a firewall rule; use
`gcloud compute firewall-rules delete` to remove the rule instead.
""",
}
| [
"me@gareth.codes"
] | me@gareth.codes |
f85487eddb03f6b8cc19f4f619baaa31663a03f5 | de702e4f4a2344c891d396bb8332a90d042b0971 | /Back-End/Django/Bucky/website/music/admin.py | ae2c74d7782109c4bcc71cc9f49a13390b05001b | [] | no_license | ScarletMcLearn/Web-Development | 3bf093a261ddad4e83c3ebc6e724e87876f2541f | db68620ee11cd524ba4e244d746d11429f8b55c4 | refs/heads/master | 2022-12-17T10:56:56.238037 | 2021-01-18T14:13:33 | 2021-01-18T14:13:33 | 88,884,955 | 0 | 0 | null | 2022-12-08T06:47:35 | 2017-04-20T16:03:19 | HTML | UTF-8 | Python | false | false | 118 | py | from django.contrib import admin
# Register your models here.
from .models import Album
admin.site.register(Album) | [
"noreply@github.com"
] | ScarletMcLearn.noreply@github.com |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.