content stringlengths 7 1.05M |
|---|
class InterfaceError(Exception):
def __init__(self, message, human_message=None):
super().__init__(message)
if human_message is None:
self.human_message = message
else:
self.human_message = human_message
|
class Solution:
def compress(self, chars: List[str]) -> int:
read = 0
while read < len(chars) - 1:
count = 1
read_next = read + 1
while read < len(chars) - 1 and chars[read_next] == chars[read]:
del chars[read_next]
count += 1
if count > 1:
for char in str(count):
chars.insert(read_next, char)
read_next += 1
read = read_next
return len(chars)
|
class RunnerException(Exception):
def __init__(self, message=''):
super().__init__()
self.message = message
class ArgumentError(RunnerException):
def __str__(self):
return 'ArgumentError: %s' % self.message
|
"""StompListener: base class for a listener which will be invoked upon message
arrival
"""
class StompListener(object):
"""StompListener: base class for a listener which will be invoked upon message
arrival
"""
def on_message(self, frame):
"""Called by the STOMP receiver thread upon message arrival.
Parameters
----------
frame: webstompy.StompFrame
The frame containing the headers and the message
"""
pass
|
words = "Life is short"
def lazy_print(text):
return lambda: print(text)
task = lazy_print(words)
task()
|
"""
Implement the following operations of a stack using queues.
push(x) -- Push element x onto stack.
pop() -- Removes the element on top of the stack.
top() -- Get the top element.
empty() -- Return whether the stack is empty.
Notes:
You must use only standard operations of a queue -- which means only push to
back, peek/pop from front, size, and is empty operations are valid.
Depending on your language, queue may not be supported natively. You may
simulate a queue by using a list or deque (double-ended queue), as long as you
use only standard operations of a queue.
You may assume that all operations are valid (for example, no pop or top
operations will be called on an empty stack).
"""
class Stack(object):
def __init__(self):
"""
initialize your data structure here.
pop()
1. Dequeue an element from queue1
push(x)
1. queue2 is initially empty, queue1 stores old elements
queue2 = []
queue1 = [a, b, c]
2. enqueue(x) to queue2:
queue2 = [x]
queue1 = [a, b, c]
3. dequeue() each element from queue1 to queue2:
queue2 = [x, a, b, c]
queue1 = []
4. Swap queue1 and queue2
queue1 = [x, a, b, c]
queue2 = []
"""
self.queue1 = []
self.queue2 = []
def push(self, x):
"""
:type x: int
:rtype: nothing
"""
self.queue2.append(x)
while self.queue1:
self.queue2.append(self.queue1.pop(0))
self.queue1, self.queue2 = self.queue2, self.queue1
def pop(self):
"""
:rtype: nothing
"""
return self.queue1.pop(0)
def top(self):
"""
:rtype: int
"""
return self.queue1[0]
def empty(self):
"""
:rtype: bool
"""
return not self.queue1
|
g = int(input().strip())
for _ in range(g):
n = int(input().strip())
s = [int(x) for x in input().strip().split(' ')]
x = 0
for i in s:
x ^= i
if x:
print("First")
else:#x=0
print("Second")
|
# Write your solution here:
class SuperHero:
def __init__(self, name: str, superpowers: str):
self.name = name
self.superpowers = superpowers
def __str__(self):
return f'{self.name}, superpowers: {self.superpowers}'
class SuperGroup:
def __init__(self, name: str, location: str):
self._name = name
self._location = location
self._members = []
@property
def name(self):
return self._name
@property
def location(self):
return self._location
def add_member(self,hero: SuperHero):
self._members.append(hero)
def print_group(self):
print(f"{self.name}, {self.location}")
print("Members:")
for member in self._members:
print(f"{member.name}, superpowers: {member.superpowers}")
if __name__=="__main__":
superperson = SuperHero("SuperPerson", "Superspeed, superstrength")
invisible = SuperHero("Invisible Inca", "Invisibility")
revengers = SuperGroup("Revengers", "Emerald City")
revengers.add_member(superperson)
revengers.add_member(invisible)
revengers.print_group() |
#!/usr/bin/python
# list_comprehension.py
a = [1, 2, 3, 4, 5, 6, 7, 8, 9]
b = [e for e in a if e % 2]
print (b)
|
numbers = list(map(int, input().split()))
d = dict()
for n in numbers: d[n] = 0
for n in numbers: d[n] += 1
result = ""
for n in d:
if d[n] == 1: result += f"{n} "
print(result)
|
# Definition for singly-linked list.
# class ListNode(object):
# def __init__(self, x):
# self.val = x
# self.next = None
class Solution(object):
def reverseBetween(self, head, m, n):
"""
:type head: ListNode
:type m: int
:type n: int
:rtype: ListNode
"""
# Early exits
if not head:
return None
i = 0
current = head
previous = None
# Move to m
while i < m - 1:
previous = current
current = current.next
i += 1
tail = current
m_minus_1th_glue_nth_node = previous # connects m - 1th node to nth node
# Reverse from m to n
while i < n:
temp = current.next
current.next = previous
previous = current
current = temp
i += 1
# Fix tail
if m_minus_1th_glue_nth_node:
m_minus_1th_glue_nth_node.next = previous
else:
head = previous
tail.next = current
return head |
def coverDebts(s, debts, interests):
items = list(zip(interests, debts))
items.sort(reverse=True)
n = len(items)
ans = 0
for i in range(len(debts)):
items[i] = list(items[i])
while True:
amount = s*0.1
isEmpty = True
for i in range(n):
if items[i][1] > 0:
isEmpty = False
if items[i][1] > amount:
items[i][1] -= amount
ans += amount
break
else:
amount -= items[i][1]
ans += items[i][1]
items[i][1] = 0
if isEmpty:
break
else:
for i in range(n):
if items[i][1] > 0:
items[i][1] += items[i][1]*(items[i][0]*0.01)
return ans
def main():
print(coverDebts(50, [2,2,5], [200, 100, 150]))
if __name__ == "__main__":
main()
|
__author__ = 'shijianliu'
host = 'http://223.252.199.7'
server_host='127.0.0.1'
server_port=9999
username = 'liverliu'
password = 'liu90shi12jian21'
headers = {}
headers['Accept'] = '*/*'
headers['Accept-Encoding'] = 'gzip, deflate, sdch'
headers['Accept-Language'] = 'zh-CN,zh;q=0.8,en;q=0.6,ja;q=0.4,zh-TW;q=0.2'
headers['Host'] = 'music.163.com'
headers['Connection'] = 'keep-alive'
headers['Content-Type'] = 'application/x-www-form-urlencoded'
headers['Referer'] = 'http://music.163.com/'
headers['User-Agent'] = 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.152 Safari/537.36'
cookies = {'appver': '1.5.2'}
|
# -*- coding: utf-8 -*-
#
# Copyright (C) 2020-2021 Graz University of Technology.
#
# invenio-config-tugraz is free software; you can redistribute it and/or
# modify it under the terms of the MIT License; see LICENSE file for more
# details.
"""
Records permission policies.
Default policies for records:
.. code-block:: python
# Read access given to everyone.
can_search = [AnyUser()]
# Create action given to no one (Not even superusers) bc Deposits should
# be used.
can_create = [Disable()]
# Read access given to everyone if public record/files and owners always.
can_read = [AnyUserIfPublic(), RecordOwners()]
# Update access given to record owners.
can_update = [RecordOwners()]
# Delete access given to admins only.
can_delete = [Admin()]
# Associated files permissions (which are really bucket permissions)
can_read_files = [AnyUserIfPublic(), RecordOwners()]
can_update_files = [RecordOwners()]
How to override default policies for rdm-records.
Using Custom Generator for a policy:
.. code-block:: python
from invenio_rdm_records.services import (
BibliographicRecordServiceConfig,
RDMRecordPermissionPolicy,
)
from invenio_config_tugraz.generators import RecordIp
class TUGRAZPermissionPolicy(RDMRecordPermissionPolicy):
# Create access given to SuperUser only.
can_create = [SuperUser()]
RDM_RECORDS_BIBLIOGRAPHIC_SERVICE_CONFIG = TUGRAZBibliographicRecordServiceConfig
Permissions for Invenio (RDM) Records.
"""
# from invenio_rdm_records.services import RDMRecordPermissionPolicy
# from invenio_rdm_records.services.config import RDMRecordServiceConfig
# from invenio_rdm_records.services.generators import IfDraft, IfRestricted, RecordOwners
# from invenio_records_permissions.generators import (
# Admin,
# AnyUser,
# AuthenticatedUser,
# Disable,
# SuperUser,
# SystemProcess,
# )
# class TUGRAZPermissionPolicy(RDMRecordPermissionPolicy):
# """Access control configuration for rdm records.
# This overrides the origin:
# https://github.com/inveniosoftware/invenio-rdm-records/blob/master/invenio_rdm_records/services/permissions.py.
# Access control configuration for records.
# Note that even if the array is empty, the invenio_access Permission class
# always adds the ``superuser-access``, so admins will always be allowed.
# - Create action given to everyone for now.
# - Read access given to everyone if public record and given to owners
# always. (inherited)
# - Update access given to record owners. (inherited)
# - Delete access given to admins only. (inherited)
# """
# class TUGRAZRDMRecordServiceConfig(RDMRecordServiceConfig):
# """Overriding BibliographicRecordServiceConfig."""
|
def df_corr_pearson(data, y, excluded_list=False):
'''One-by-One Correlation
Based on the input data, returns a dictionary where each column
is provided a correlation coefficient and number of unique values.
Columns with non-numeric values will have None as their coefficient.
data : dataframe
A Pandas dataframe with the data
y : str
The prediction variable
excluded_list : bool
If True, then also a list will be returned with column labels for
non-numeric columns.
'''
out = {}
category_columns = []
for col in data.columns:
try:
out[col] = [data[y].corr(data[col]), len(data[col].unique())]
except TypeError:
out[col] = [None, len(data[col].unique())]
category_columns.append(col)
if excluded_list:
return out, category_columns
else:
return out
|
class Argument:
"""Parses a python argument as string.
All whitespace before and after the argument text itself
is stripped off and saved for later reformatting.
"""
def __init__(self, original: str):
original.lstrip()
start = 0
end = len(original) - 1
while original[start].isspace():
start += 1
while original[end].isspace():
end -= 1
# End requires +1 when used in string slicing.
end += 1
self._leading_whitespace = original[:start]
self._trailing_whitespace = original[end:]
self.set_text(original[start:end or None])
def get_leading_whitespace(self):
return self._leading_whitespace
def get_trailing_whitespace(self):
return self._trailing_whitespace
def set_text(self, text):
self._text = text
def get_text(self):
return self._text
def __str__(self):
return f"{self.get_leading_whitespace()}{self.get_text()}{self.get_trailing_whitespace()}"
def __repr__(self):
return f"'{self}'"
def __eq__(self, other):
return (
isinstance(other, Argument) and
self.get_leading_whitespace() == other.get_leading_whitespace() and
self.get_text() == other.get_text() and
self.get_trailing_whitespace() == other.get_trailing_whitespace()
) |
# Sem zip
a = [17, 28, 30]
b = [99, 16, 8]
alice = 0
bob = 0
# for i in range(len(a)):
# if a[i] > b[i]:
# alice += 1
# elif a[i] < b[i]:
# bob += 1
# print(alice, bob)
#Com Zip
for x, y in zip(a, b):
if x > y:
alice += 1
elif x < y:
bob += 1
print(alice, bob)
|
'''
Set of functions to provide managed input for Python
programs. Uses the input and print standard input
functions to read, but provides ranged checked input
functions, and also handles CTRL+C input which
would normally break a Python application.
CTRL+C handling can be turned off by
setting DEBUG_MODE to True so that a program
can be interrupted.
'''
DEBUG_MODE = True
def read_text(prompt):
'''
Displays a prompt and reads in a string of text.
Keyboard interrupts (CTRL+C) are ignored
returns a string containing the string input by the user
'''
while True: # repeat forever
try:
result=input(prompt) # read the input
# if we get here no exception was raised
if result=='':
#don't accept empty lines
print('Please enter text')
else:
# break out of the loop
break
except KeyboardInterrupt:
# if we get here the user pressed CTRL+C
print('Please enter text')
if DEBUG_MODE:
raise Exception('Keyboard interrupt')
# return the result
return result
def readme():
print('''Welcome to the BTCInput functions version 1.0
You can use these to read numbers and strings in your programs.
The functions are used as follows:
text = read_text(prompt)
int_value = read_int(prompt)
float_falue = read_float(prompt)
int_value = read_int_ranged(prompt, max_value, min_value)
float_falue = read_float_ranged(prompt, max_value, min_value)
Have fun with them.
Rob Miles''')
if __name__ == '__main__':
# Have the BTCInput module introduce itself
readme()
def read_number(prompt,function):
'''
Displays a prompt and reads in a floating point number.
Keyboard interrupts (CTRL+C) are ignored
Invalid numbers are rejected
returns a float containing the value input by the user
'''
while True: # repeat forever
try:
number_text=read_text(prompt)
result=function(number_text) # read the input
# if we get here no exception was raised
# break out of the loop
break
except ValueError:
# if we get here the user entered an invalid number
print('Please enter a number')
# return the result
return result
def read_number_ranged(prompt, function, min_value, max_value):
'''
Displays a prompt and reads in a number.
min_value gives the inclusive minimum value
max_value gives the inclusive maximum value
Raises an exception if max and min are the wrong way round
Keyboard interrupts (CTRL+C) are ignored
Invalid numbers are rejected
returns a number containing the value input by the user
'''
if min_value>max_value:
# If we get here the min and the max
# are wrong way round
raise Exception('Min value is greater than max value')
while True: # repeat forever
result=read_number(prompt,function)
if result<min_value:
# Value entered is too low
print('That number is too low')
print('Minimum value is:',min_value)
# Repeat the number reading loop
continue
if result>max_value:
# Value entered is too high
print('That number is too high')
print('Maximum value is:',max_value)
# Repeat the number reading loop
continue
# If we get here the number is valid
# break out of the loop
break
# return the result
return result
def read_float(prompt):
'''
Displays a prompt and reads in a floating point number.
Keyboard interrupts (CTRL+C) are ignored
Invalid numbers are rejected
returns a float containing the value input by the user
'''
return read_number(prompt,float)
def read_int(prompt):
'''
Displays a prompt and reads in an integer number.
Keyboard interrupts (CTRL+C) are ignored
Invalid numbers are rejected
returns an int containing the value input by the user
'''
return read_number(prompt,int)
def read_float_ranged(prompt, min_value, max_value):
'''
Displays a prompt and reads in a floating point number.
min_value gives the inclusive minimum value
max_value gives the inclusive maximum value
Raises an exception if max and min are the wrong way round
Keyboard interrupts (CTRL+C) are ignored
Invalid numbers are rejected
returns a number containing the value input by the user
'''
return read_number_ranged(prompt,float,min_value,max_value)
def read_int_ranged(prompt, min_value, max_value):
'''
Displays a prompt and reads in an integer point number.
min_value gives the inclusive minimum value
max_value gives the inclusive maximum value
Raises an exception if max and min are the wrong way round
Keyboard interrupts (CTRL+C) are ignored
Invalid numbers are rejected
returns a number containing the value input by the user
'''
return read_number_ranged(prompt,int,min_value,max_value)
|
"""
rules_binaries implements a set of rules for dealing with external binary dependencies in a Bazel
project.
"""
load(
"//internal:def.bzl",
_binary = "binary",
_binary_location = "binary_location",
)
binary = _binary
binary_location = _binary_location
|
'''
This package contains material and attributes class
'''
# ----------
# Attributes
# ----------
class Attributes():
'''Attributes is the base class for all attributes container.
`Environment` and `Material` are attribute container
'''
def __init__(self, attributes=None):
'''
*Parameters:*
- `attributes`: `list` of attributes ot initialize this object
'''
self.attributes = {}
if attributes:
for a in attributes:
self.set(a)
def set(self, attribute):
'''Set a material attribute
*Parameters:*
- `attribute`: `Attribute` to set
'''
self.attributes[attribute.__class__] = attribute
def get(self, attribute_class):
'''Get an attribute by class
*Parameters:*
- `attribute_class`: Class of the attribute to retrieve
'''
return self.attributes[attribute_class]
class Material(Attributes):
'''Material is a container for `Attribute` objects
Only one object of the same `Attribute` class can be inside the
material. If you set an attribute which is already in the `Material`,
the old one is replaced by the new one.
'''
pass
class Environments(Attributes):
'''
Environment contains all `Attribute` related to the environment,
like lights, fogs...
'''
pass
# ----------
# Attribute
# ----------
class Attribute():
'''
Base class for attribute classes.
'''
def __init__(self, value):
self.value = value
class ColorAttribute(Attribute):
pass
|
# ENTER TIME CONTROLLER
# This allows a user to enter a time of the day, in hours, minutes, and AM/PM
#
# INPUTS:
# temp_inside
# temp_outside
# humidity
# gas
# motion
# timestamp
#
# OUTPUTS:
# line1
# line2
#
# CONTEXT:
# action(start_in_minutes, end_in_minutes) -> function(inputs, state, settings) -> new_state, setting_changes
def time_in_minutes(t):
hour = t["hour"]
minute = t["minute"]
pm = t["pm"]
hour = hour % 12 + (12 if pm else 0)
return 60 * hour + minute
# INITIAL STATE
def init_state():
return {
"start": {
"hour": 12,
"minute": 0,
"pm": False,
},
"end": {
"hour": 12,
"minute": 0,
"pm": False,
},
"start_selected": True,
"selected": "hour"
}
# EVENT HANDLER
def handle_event(event, inputs, state, settings, context):
new_state = dict(state)
setting_changes = {}
log_entries = []
messages = []
done = False
launch = None
if event[0] == 'press':
key = event[1]
if key == 'A':
if state["selected"] == "hour":
new_state["start_selected"] = not state["start_selected"]
new_state["selected"] = "pm"
elif state["selected"] == "minute":
new_state["selected"] = "hour"
else:
new_state["selected"] = "minute"
elif key == 'D':
if state["selected"] == "hour":
new_state["selected"] = "minute"
elif state["selected"] == "minute":
new_state["selected"] = "pm"
else:
new_state["start_selected"] = not state["start_selected"]
new_state["selected"] = "hour"
elif key == 'C':
done = True
elif key == 'B':
done = True
launch = context(time_in_minutes(state["start"]), time_in_minutes(state["end"]))
elif str(key).isdigit():
tname = "start" if state["start_selected"] else "end"
if state["selected"] == "pm":
new_state[tname]["pm"] = int(key) > 1
else:
val = state[tname][state["selected"]]
new_val_concat = int(str(val) + str(key))
new_val_concat_valid = False
if state["selected"] == "hour" and 1 <= new_val_concat <= 12:
new_val_concat_valid = True
elif state["selected"] == "minute" and 0 <= new_val_concat < 60:
new_val_concat_valid = True
if new_val_concat_valid:
new_state[tname][state["selected"]] = new_val_concat
elif int(key) > 0:
new_state[tname][state["selected"]] = int(key)
return new_state, setting_changes, log_entries, messages, done, launch
def get_outputs(inputs, state, settings, context):
t = state["start"] if state["start_selected"] else state["end"]
hour = t["hour"]
minute = t["minute"]
pm = t["pm"]
hour = ' ' + str(hour) if len(str(hour)) == 1 else str(hour)
minute = '0' + str(minute) if len(str(minute)) == 1 else str(minute)
if state["selected"] == "hour":
line2 = "[" + str(hour) + "]: " + str(minute) + " " + ("PM" if pm else "AM") + " "
elif state["selected"] == "minute":
line2 = " " + str(hour) + " :[" + str(minute) + "] " + ("PM" if pm else "AM") + " "
else:
line2 = " " + str(hour) + " : " + str(minute) + " [" + ("PM" if pm else "AM") + "]"
return {
"line1": "On between..." if state["start_selected"] else "...and",
"line2": line2 + "->" if state["start_selected"] else "->" + line2
}
|
# n0 = int(input('Digite o primeiro numero: '))
# n1 = int(input('Digite o segundo numero: '))
# n2 = int(input('Digite o terceiro numero: '))
# n3 = int(input('Digite o quarto numero: '))
# tulipa = (n0, n1, n2, n3)
tulipa = (int(input('Digite o primeiro numero: ')), int(input('Digite o segundo numero: ')), int(input('Digite o terceiro numero: ')), int(input('Digite o quarto numero: ')))
print(f'A tupla formada é: {tulipa}')
print(f'Temos {tulipa.count(9)} noves na tupla')
# if tulipa.count(3) == 0:
if 3 in tulipa:
print(f'Não tem 3 na tupla')
else:
print(f'O primeiro 3 esta na {tulipa.index(3) + 1} posição')
print(f'Os numeros pares são:', end=' ')
for n in range(0, 4):
if tulipa[n] % 2 == 0:
print(tulipa[n], end=' ')
|
# Time between two pictures are taken in seconds, Raspberry Pi needs ca. 3 seconds to take one
# picture with the current setting, so this value should be at least 3
CAMERA_INTERVAL_SECONDS = 3600
# Settings used for Serial communication with Arduino
SERIAL_BAND_RATE = 9600
# times of retry when searing for the correct Serial port
SERIAL_ERROR_MAX_RETRY = 10
# when using a serial port which continously having false data but was proven working before before, max waiting
# time before abandoning the current connection and go through the port selection process again
SERIAL_ERROR_MAX_TIMEOUT = 300
# MQTT base topics used for communication between Raspberry Pi and Cloud, subtopics will
# be added after this depending on sensor or device type (these variables should end with '/')
TOPIC_PREFIX_SENSOR = "/iot_cloud_solutions/project/db/regensburg/rpi_1/sensor/"
TOPIC_PREFIX_CONTROL = "/iot_cloud_solutions/project/control/regensburg/rpi_1/device/"
|
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Union of rectangles
# jill-jenn vie et christoph durr - 2014-2018
# snip{ cover-query
class Cover_query:
"""Segment tree to maintain a set of integer intervals
and permitting to query the size of their union.
"""
def __init__(self, L):
"""creates a structure, where all possible intervals
will be included in [0, L - 1].
"""
assert L != [] # L is assumed sorted
self.N = 1
while self.N < len(L):
self.N *= 2
self.c = [0] * (2 * self.N) # --- covered
self.s = [0] * (2 * self.N) # --- score
self.w = [0] * (2 * self.N) # --- length
for i in range(len(L)):
self.w[self.N + i] = L[i]
for p in range(self.N - 1, 0, -1):
self.w[p] = self.w[2 * p] + self.w[2 * p + 1]
def cover(self):
""":returns: the size of the union of the stored intervals
"""
return self.s[1]
def change(self, i, k, delta):
"""when delta = +1, adds an interval [i, k], when delta = -1, removes it
:complexity: O(log L)
"""
self._change(1, 0, self.N, i, k, delta)
def _change(self, p, start, span, i, k, delta):
if start + span <= i or k <= start: # --- disjoint
return
if i <= start and start + span <= k: # --- included
self.c[p] += delta
else:
self._change(2 * p, start, span // 2, i, k, delta)
self._change(2 * p + 1, start + span // 2, span // 2,
i, k, delta)
if self.c[p] == 0:
if p >= self.N: # --- leaf
self.s[p] = 0
else:
self.s[p] = self.s[2 * p] + self.s[2 * p + 1]
else:
self.s[p] = self.w[p]
# snip}
# snip{ union_rectangles
def union_rectangles(R):
"""Area of union of rectangles
:param R: list of rectangles defined by (x1, y1, x2, y2)
where (x1, y1) is top left corner and (x2, y2) bottom right corner
:returns: area
:complexity: :math:`O(n^2)`
"""
if R == []:
return 0
X = []
Y = []
for j in range(len(R)):
(x1, y1, x2, y2) = R[j]
assert x1 <= x2 and y1 <= y2
X.append(x1)
X.append(x2)
Y.append((y1, +1, j)) # generate events
Y.append((y2, -1, j))
X.sort()
Y.sort()
X2i = {X[i]: i for i in range(len(X))}
L = [X[i + 1] - X[i] for i in range(len(X) - 1)]
C = Cover_query(L)
area = 0
last = 0
for (y, delta, j) in Y:
area += (y - last) * C.cover()
last = y
(x1, y1, x2, y2) = R[j]
i = X2i[x1]
k = X2i[x2]
C.change(i, k, delta)
return area
# snip}
|
'''
Used by __init__.py to set the MongoDB configuration for the whole app
The app can then be references/imported by other script using the __init__.py
'''
DEBUG = True
TESTING = True
# mongo db
SECRET_KEY = "vusualyzerrrrrrrr"
MONGO_URI = "mongodb://localhost:27017/vus"
# debug bar
DEBUG_TB_INTERCEPT_REDIRECTS = False
DEBUG_TB_PANELS = (
'flask_debugtoolbar.panels.versions.VersionDebugPanel',
'flask_debugtoolbar.panels.timer.TimerDebugPanel',
'flask_debugtoolbar.panels.headers.HeaderDebugPanel',
'flask_debugtoolbar.panels.request_vars.RequestVarsDebugPanel',
'flask_debugtoolbar.panels.template.TemplateDebugPanel',
'flask_debugtoolbar.panels.logger.LoggingPanel',
'flask_mongoengine.panels.MongoDebugPanel'
)
|
#Contributed by @Hinal-Srivastava
def binary_search(list,item):
first = 0
last = len(list)-1
flag = False
while( first<=last and not flag):
mid = (first + last)//2
if list[mid] == item :
flag = True
print("Element found at ", mid," after sorting the list")
else:
if (item < list[mid]):
last = mid - 1
else:
first = mid + 1
if(flag == False):
print("Element not part of given list")
#Driver Program
ele_lst = []
n = int(input("Enter number of elements : ")) #Length of list
print("Enter Elements \n")
for i in range(n):
element = int(input("\t"))
ele_lst.append(element)
ele_lst.sort()
item_=int(input("Enter search element : "))
print(binary_search(ele_lst, item_))
|
# compute voltage drops top-bottom of H16, so for black.
loops = 100
# iterations of voltage computation
# 18 nodes in graph after black capture and dead cell removal
Nbrs = [
[1,2,3,4],
[0,4,5],
[0,5,6],
[0,6,7],
[0,1,5,10,13],
[1,2,4,6,10,13],
[2,3,5,7,8],
[3,6,8,9],
[6,7,9,10,11],
[7,8,11,12],
[4,5,8,11,13,14],
[8,9,10,12,14,15],
[9,11,15,16],
[4,5,10,17],
[10,11,17],
[11,12,17],
[12,17],
[13,14,15,16]
]
#Nbrs2 has added the captured cells back in
Nbrs2 = [
[1,2,3,4,5,6],
[0,6],
[0,6],
[0,6,7],
[0,7,8],
[0,8,9],
[0,1,2,3,7,12,15],
[3,4,6,8,12,15],
[4,5,7,9,10],
[5,8,10,11],
[8,9,11,12,13],
[9,10,13,14],
[6,7,10,13,15,16],
[10,11,12,14,16,17],
[11,13,17,18],
[6,7,12,19],
[12,13,19],
[13,14,19],
[14,19],
[15,16,17,18]
]
def update(V,Nbrs):
for j in range(1,len(Nbrs)-1):
vsum = 0.0
for k in Nbrs[j]:
vsum+= V[k]
V[j] = vsum/len(Nbrs[j])
def VDrops(V,Nbrs):
Drops = []
for j in range(len(Nbrs)-1):
delta, v = 0.0, V[j]
for k in Nbrs[j]:
if V[k] < v:
delta += v - V[k]
Drops.append(delta)
return Drops
def initV(n):
V = [0.5] * n
V[0], V[n-1] = 100.0, 0.0
return V
Nb = Nbrs2
print(Nb)
print('')
Volts = initV(len(Nb))
print(Volts)
print('')
for t in range(loops):
update(Volts, Nb)
D = VDrops(Volts,Nb)
print(Volts)
print('')
print(D)
|
TARGET = 'embox'
ARCH = 'x86'
CFLAGS = ['-O0', '-g']
CFLAGS += ['-m32', '-march=i386', '-fno-stack-protector', '-Wno-array-bounds']
LDFLAGS = ['-N', '-g', '-m', 'elf_i386' ]
|
"""
Given a number with N digits, write a program to get the
smallest number possible after removing k digits from number N.
"""
def get_smallest(num: int, k: int) -> int:
num_lst = [int(n) for n in list(str(num))]
stack = []
index = 0
size = len(num_lst)
while index < size and k > 0:
if not stack or stack[-1] <= num_lst[index]:
stack.append(num_lst[index])
index += 1
else:
stack.pop()
k -= 1
if index < size:
stack.extend(num_lst[index:])
elif k > 0:
stack = stack[:-k]
return int("".join([str(n) for n in stack]))
if __name__ == "__main__":
assert get_smallest(1453287, 3) == 1287
assert get_smallest(4321, 2) == 21
assert get_smallest(22222, 3) == 22
assert get_smallest(2200010300, 4) == 0
assert get_smallest(4205123, 4) == 12
|
TITLE = "DoodleHop"
# screen dims
WIDTH = 480
HEIGHT = 600
# frames per second
FPS = 60
# colors
WHITE = (255, 255, 255)
BLACK = (0,0,0)
REDDISH = (240,55,66)
SKY_BLUE = (0, 0, 0)
FONT_NAME = 'arial'
SPRITESHEET = "spritesheet_jumper.png"
# data files
HS_FILE = "highscore.txt"
# player settings
PLAYER_ACC = 0.5
PLAYER_FRICTION = -0.12
PLAYER_GRAV = 0.8
PLAYER_JUMP = 25
PLAYER_SUPERJUMP = 300
# game settings
BOOST_POWER = 60
POW_SPAWN_PCT = 7
MOB_FREQ = 5000
PLAYER_LAYER = 2
PLATFORM_LAYER = 1
MLATFORM_LAYER = 1
POW_LAYER = 1
MOB_LAYER = 2
#SPRITES INT HE SAME LAYER CAN INTERACT WITH EACH OTHER (COLISONS)
# platform settings
''' old platforms from drawing rectangles'''
'''
PLATFORM_LIST = [(0, HEIGHT - 40, WIDTH, 40),
(65, HEIGHT - 300, WIDTH-400, 40),
(20, HEIGHT - 350, WIDTH-300, 40),
(200, HEIGHT - 150, WIDTH-350, 40),
(200, HEIGHT - 450, WIDTH-350, 40)]
'''
PLATFORM_LIST = [(0, HEIGHT - 40),
(65, HEIGHT - 300),
(20, HEIGHT - 350),
(200, HEIGHT - 150),
(200, HEIGHT - 450)]
MLATFORM_LIST = [(10, HEIGHT - 20),
(30, HEIGHT - 500),
(20, HEIGHT - 27)]
|
"""
if condition_1:
code
code
elif condition_2:
code
elif condition_3:
code
..
..
..
else:
code
elif not compulsory
else not compulsory
"""
number = int(input())
if number == 0:
print('i am in the if block')
print('i am leaving')
elif number < 10:
print('small number')
elif number < 100:
print('mehhhh')
elif number < 20:
print('okayish number')
else:
print('default case')
print('i am outside if else')
|
# -*- coding: utf-8 -*-
"""This module contains Exceptions specific to :mod:`mass` module."""
class MassSBMLError(Exception):
"""SBML error class."""
class MassSimulationError(Exception):
"""Simulation error class."""
class MassEnsembleError(Exception):
"""Simulation error class."""
__all__ = (
"MassSBMLError",
"MassSimulationError",
"MassEnsembleError",
)
|
height = int(input())
for i in range(1,height+1):
for j in range(1,height+1):
if(i < height//2+1):
print(0,end=" ")
else:
print(1,end=" ")
print()
# Sample Input :- 5
# Output :-
# 0 0 0 0 0
# 0 0 0 0 0
# 1 1 1 1 1
# 1 1 1 1 1
# 1 1 1 1 1
|
# -*- coding: utf-8 -*-
"""
***************************************************************************
ProviderActions.py
-------------------
Date : April 2017
Copyright : (C) 2017 by Nyall Dawson
Email : nyall dot dawson at gmail dot com
***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************
"""
__author__ = 'Nyall Dawson'
__date__ = 'April 2017'
__copyright__ = '(C) 2017, Nyall Dason'
class ProviderActions(object):
actions = {}
@staticmethod
def registerProviderActions(provider, actions):
""" Adds actions for a provider """
ProviderActions.actions[provider.id()] = actions
@staticmethod
def deregisterProviderActions(provider):
""" Removes actions for a provider """
if provider.id() in ProviderActions.actions:
del ProviderActions.actions[provider.id()]
class ProviderContextMenuActions(object):
# All the registered context menu actions for the toolbox
actions = []
@staticmethod
def registerProviderContextMenuActions(actions):
""" Adds context menu actions for a provider """
ProviderContextMenuActions.actions.extend(actions)
@staticmethod
def deregisterProviderContextMenuActions(actions):
""" Removes context menu actions for a provider """
for act in actions:
ProviderContextMenuActions.actions.remove(act)
|
class FsharpPackage(GitHubTarballPackage):
def __init__(self):
GitHubTarballPackage.__init__(self,
'fsharp', 'fsharp',
'3.0.27',
'f3c8ea8bf4831ce6dc30581558fa4a45a078cd55',
configure = '')
def build(self):
self.sh ('autoreconf')
self.sh ('./configure --prefix="%{prefix}"')
self.sh ('make')
FsharpPackage()
|
# key: symbol, charge, number of !'s (hypervalent marker)
VALENCE = {
("H", 0, 0): 1,
("H", 1, 0): 0,
("He", 0, 0): 0,
("Li", 1, 0): 0,
("Li", 0, 0): 1,
("Be", 2, 0): 0,
("B", 0, 0): 3,
("B", -1, 0): 4,
("C", 0, 0): 4,
("C", -1, 0): 3,
("C", 1, 0): 3,
("N", 0, 0): 3,
("N", 1, 0): 4,
("N", -1, 0): 2,
("O", 0, 0): 2,
("O", -1, 0): 1,
("O", -2, 0): 0,
("O", 1, 0): 3,
("F", 0, 0): 1,
("F", -1, 0): 0,
("F", 1, 0): 2,
("Na", 0, 0): 1,
("Na", 1, 0): 0,
("Mg", 0, 0): 2,
("Mg", 1, 0): 1,
("Mg", 2, 0): 0,
("Al", 0, 0): 3,
("Al", 3, 0): 0,
("Al", -3, 0): 6,
("Xe", 0, 0): 0,
("Si", 0, 0): 4,
("Si", -1, 0): 5,
("P", 0, 0): 3,
("P", 0, 1): 5,
("P", 0, 2): 7,
("P", 1, 0): 4,
("P", -1, 1): 6,
("S", 0, 0): 2,
("S", 0, 1): 4,
("S", 0, 2): 6,
("S", 1, 0): 3,
("S", 1, 1): 5,
("S", -1, 0): 1,
("S", -1, 1): 3,
("S", -2, 0): 0,
("Cl", 0, 0): 1,
("Cl", -1, 0): 0,
("Cl", 1, 0): 2,
("Cl", 2, 0): 3,
("Cl", 3, 0): 4,
("K", 0, 0): 1,
("K", 1, 0): 0,
("Ca", 0, 0): 2,
("Ca", 2, 0): 0,
("Zn", 0, 0): 2,
("Zn", 1, 0): 1,
("Zn", 2, 0): 1,
("Zn", -2, 0): 2,
("Zn", -2, 1): 4,
("As", 0, 0): 3,
("As", 0, 1): 5,
("As", 0, 2): 7,
("As", 1, 0): 4,
("As", -1, 1): 6,
("Se", 0, 0): 2,
("Se", 0, 1): 4,
("Se", 0, 2): 6,
("Se", 1, 0): 3,
("Se", 1, 1): 5,
("Se", -1, 0): 1,
("Se", -2, 0): 0,
("Cs", 1, 0): 0,
("Cs", 0, 0): 1,
("Ba", 0, 0): 2,
("Ba", 2, 0): 0,
("Bi", 0, 0): 3,
("Bi", 3, 0): 0,
("Br", 0, 0): 1,
("Br", -1, 0): 0,
("Br", 2, 0): 3,
("Kr", 0, 0): 0,
("Rb", 0, 0): 1,
("Rb", 1, 0): 0,
("Sr", 0, 0): 2,
("Sr", 2, 0): 0,
("Ag", 0, 0): 2,
("Ag", 1, 0): 0,
("Ag", -4, 0): 3,
("Te", 0, 0): 2,
("Te", 1, 0): 3,
("Te", 0, 1): 4,
("Te", 0, 2): 6,
("Te", -1, 1): 3,
("Te", -1, 2): 5,
("I", 0, 0): 1,
("I", 0, 1): 3,
("I", 0, 2): 5,
("I", -1, 0): 0,
("I", 1, 0): 2,
("I", 2, 1): 3,
("I", 3, 0): 4,
("Ra", 0, 0): 2,
("Ra", 2, 0): 0,
}
# key: symbol, charge, valence
BANGS = {
("S", 0, 4): 1,
("S", 1, 5): 1,
("S", -1, 3): 1,
("S", 0, 6): 2,
("P", 0, 5): 1,
("P", 0, 7): 2,
("P", -1, 6): 1,
("Zn", -2, 4): 1,
("As", 0, 5): 1,
("As", 0, 7): 2,
("As", -1, 6): 1,
("Se", 0, 4): 1,
("Se", 1, 5): 1,
("Se", -1, 3): 1,
("Se", 0, 6): 2,
("Te", 0, 4): 1,
("Te", 0, 6): 2,
("Te", -1, 3): 1,
("Te", -1, 5): 2,
("I", 0, 3): 1,
("I", 0, 5): 2,
("I", 2, 3): 1,
}
|
# -*- coding: utf-8 -*-
# @Time : 2020/8/25-10:03
# @Author : TuringEmmy
# @Email : yonglonggeng@163.com
# @WeChat : csy_lgy
# @File : sort012.py
# @Project : Happy-Algorithm
# 75. 颜色分类
# https://leetcode-cn.com/problems/sort-colors/
def sort_0_1_2(nums):
"""
阳光出行,有点鄙视非科班人
:param nums:
:return:
"""
left = 0
right = len(nums) - 1
i = 0
while i <= right:
if nums[i] == 0:
left += 1
if i != left:
nums[i], nums[left] = nums[left], nums[i]
elif nums[i] == 2:
right -= 1
if i != right:
nums[i], nums[right] = nums[right], nums[i]
i += 1
print(nums)
if __name__ == '__main__':
nums = [0, 1, 2, 2, 1, 2, 0, 0, 1, 2, 1, 1, 1, 1, 0, 2, 2, 2, 0, 0]
sort_0_1_2(nums)
|
# 235 Lowest Common Ancestor of a Binary Search Tree
# Definition for a binary tree node.
class TreeNode:
def __init__(self, x):
self.val = x
self.left = None
self.right = None
class Solution:
def lowestCommonAncestor(self, root, p, q):
if root.val == p.val or root.val == q.val:
return root
if (p.val < root.val and root.val < q.val) or (p.val > root.val and root.val > q.val):
return root
if p.val < root.val and q.val < root.val:
return self.lowestCommonAncestor(root.left, p, q)
return self.lowestCommonAncestor(root.right, p, q)
if __name__ == '__main__':
pass |
class GeneticProgramError(Exception):
"""
Encapsulating graceful exception handling during evolutionary runs.
Args:
message (str): Message to print.
exit (bool): Whether to hard exit the process or not (default = False).
"""
def __init__(self, message : str, exit : bool = False):
self.message = message
if exit:
print(f"GeneticProgramError: {self.message}")
quit(1)
def __str__(self):
return f"GeneticProgramError: {self.message}" |
def checkout_values(counter_of_items, dict_of_deals):
# loops through trying to find best deal on items
# does this by subtracting max until it can do no more, pops the max and
# loops with second max and so on...
value = 0
for item in counter_of_items:
if item in dict_of_deals:
num = counter_of_items[item]
list_of_dict = list(dict_of_deals[item])
result = []
while num > 0:
num -= max(list_of_dict)
if num == 0:
result.append(max(list_of_dict))
break
if num > 0:
result.append(max(list_of_dict))
if num < 0:
num += max(list_of_dict)
list_of_dict.pop(list_of_dict.index(max(list_of_dict)))
for x in result:
value += dict_of_deals[item][x]
return value
|
# This code is part of the Biopython distribution and governed by its
# license. Please see the LICENSE file that should have been included
# as part of this package.
#
"""Deal with Affymetrix related data such as cel files.
"""
__docformat__ = "restructuredtext en"
|
class DatabaseData:
'''
Representation of data read or to write in a no-sql database
Attributes:
category : str
Which document or root element this data belongs to
values : dict
Data to insert into the document or under the root element
'''
def __init__(self, category : str, values):
'''
Parameters:
category : str
What category/document/root this data is from
values : dict or list
Data read from the category
'''
self.category = category
self.values = values |
print('{:=^30}'.format('Calculadora de Média'))
nota1 = float(input('\nDigite a primeira nota:'))
nota2 = float(input('Digite a segunda nota:'))
media = ((nota1 + nota2) / 2)
print(f'\nA média entre {nota1:.2f} e {nota2:.2f} é igual a {media:.2f}') |
BLACK = ( 0, 0, 0)
WHITE = ( 255, 255, 255)
GREEN = ( 0, 255, 0)
RED = ( 255, 0, 0)
GREY = ( 100, 100, 100)
SCREEN_WIDTH = 900
SCREEN_HEIGHT = 600
|
"""
knn.py
~~~~~~~~~~~~~~~
Kth Nearest Neighbors implementation.
This module contains functions that can be used for kNN classification.
Call kNN(modelData, instance, k) on an existing modelData of training data to classify
a new instance based on the k nearest neighbors.
Example:
$ python knn.py
>>> import model
>>> m1 = Model("m1", 3)
>>> m1.load("model/test_model_1")
>>>
>>> instance = [ 0.432, 0.192, 0.416 ]
>>> print kNN(m1.data, instance, 5)
>>> { 'A': 0.8 , 'B': 0.2 }
"""
def kNN(modelData, instance, k):
"""Returns a dictionary of vote proportions for the kth nearest neighbors
of the instance in the modelData.
This is the main function called by other files."""
n = len(instance)
neighbors = allNeighbors(modelData, instance, n)
kNearest = kNearestNeighbors(neighbors, k)
return vote(kNearest)
def euclideanDistance(a, b, n):
"""Computes length of line segment connecting 2 n-dimensional points.
Each point is a list of at least length n."""
d = sum((a[i] - b[i]) ** 2 for i in xrange(n))
return d ** 0.5
def allNeighbors(modelData, instance, n):
"""Returns a list of (sym, distance) tuples of the modelData set, where
n is the dimenstionality of the instance used to calculate distance and
sym is the classification of the modelData data.
The modelData should be a list of tuples (sym, data)."""
neighbors = []
for (sym, data) in modelData:
distance = euclideanDistance(instance, data, n)
neighbors.append((sym, distance))
return neighbors
def kNearestNeighbors(neighbors, k):
"""Returns a list of the k neighbors with the least distance. Each element
in neighbors is a (sym, distance) tuple."""
# sort by comparing each tuple's distance (index = 1)
sortedNeighbors = sorted(neighbors, lambda a, b: cmp(a[1], b[1]))
return sortedNeighbors[:k]
def vote(neighbors):
"""Returns dictionary of the proportion of each instance in form
(instance, distance) tuples."""
total = 0
count = dict()
# Count all instances
for (instance, distance) in neighbors:
total += 1
if (instance in count):
count[instance] += 1
else:
count[instance] = 1
# Divide each count by total to get proportion
for instance in count.keys():
count[instance] = float(count[instance]) / total
return count
def topNClasses(voteProportions, n):
"""Returns a sorted descending list of the top n classes in a vote."""
votes = []
for key in voteProportions.keys(): # put votes into a list
votes.append((key, voteProportions[key]))
# sort votes by comparing vote proportion (index 1)
votes = sorted(votes, lambda a, b: cmp(a[1], b[1]))
votes = votes[::-1] # reverse to get descending order
return votes[:n] # return the n highest
|
class check_anagram:
def __init__(self,s1,s2):
self.s1=s1
self.s2=s2
def check(self):
# the sorted strings are checked
if(sorted(self.s1)== sorted(self.s2)):
print("The strings are anagrams.")
else:
print("The strings aren't anagrams.")
if __name__=='__main__':
# driver code
s1 =input("Enter the first string")
s2 =input("Enter the first string")
c_anangram=check_anagram(s1,s2)
c_anangram.check()
|
class CiphertextMessage(Message):
def __init__(self, text):
'''
Initializes a CiphertextMessage object
text (string): the message's text
a CiphertextMessage object has two attributes:
self.message_text (string, determined by input text)
self.valid_words (list, determined using helper function load_words)
'''
self.message_text = text
self.valid_words= (load_words(WORDLIST_FILENAME))
def decrypt_message(self):
'''
Decrypt self.message_text by trying every possible shift value
and find the "best" one. We will define "best" as the shift that
creates the maximum number of real words when we use apply_shift(shift)
on the message text. If s is the original shift value used to encrypt
the message, then we would expect 26 - s to be the best shift value
for decrypting it.
Note: if multiple shifts are equally good such that they all create
the maximum number of you may choose any of those shifts (and their
corresponding decrypted messages) to return
Returns: a tuple of the best shift value used to decrypt the message
and the decrypted message text using that shift value
'''
# pass #delete this line and replace with your code here
text = self.message_text.split(' ')
shift_value = 0
for shifter in range(26):
for i in list(super(CiphertextMessage, self).apply_shift(shifter).split(' ')):
if is_word(self.valid_words, i):
shift_value = shifter
listo = super(CiphertextMessage, self).apply_shift(shift_value)
return (shift_value, listo)
|
n = int(input())
p = list(map(int,input().split()))
p.sort()
sum_ = 0
for i in range(len(p)+1):
sum_ += sum(p[:i])
print(sum_) |
def initialize_database_skeleton(db):
###############################
# DROP ALL TABLES #
###############################
print('Dropping any residual tables')
db.query("DROP TABLE IF EXISTS messages")
db.commit()
db.query("DROP TABLE IF EXISTS digital_media")
db.commit()
db.query("DROP TABLE IF EXISTS categories")
db.commit()
db.query("DROP TABLE IF EXISTS media_types")
db.commit()
db.query("DROP TABLE IF EXISTS team_about")
db.commit()
db.query("DROP TABLE IF EXISTS user")
db.commit()
print('Residual Tables dropped')
############################
# USER TABLE #
############################
print('Creating User Table')
db.query("CREATE TABLE user ("
"user_id INT UNSIGNED NOT NULL AUTO_INCREMENT,"
"first_name VARCHAR(30),"
"last_name VARCHAR(30),"
"email VARCHAR(50),"
"phone_number VARCHAR(10),"
"username VARCHAR(30) UNIQUE,"
"password BINARY(60),"
"PRIMARY KEY (user_id))")
db.commit()
print('User Table created')
"""Creating an Index on the username to make login faster"""
###############################
# CATEGORIES TABLE #
###############################
print('Creating categories table')
db.query("CREATE TABLE categories ("
"category_id INT UNSIGNED NOT NULL AUTO_INCREMENT,"
"category VARCHAR(50),"
"PRIMARY KEY (category_id))")
db.commit()
print('Categories table created')
###############################
# MEDIA TYPE TABLE #
###############################
print('Creating media types table')
db.query("CREATE TABLE media_types ("
"media_type_id INT UNSIGNED NOT NULL AUTO_INCREMENT,"
"media_type VARCHAR(50),"
"PRIMARY KEY (media_type_id))")
db.commit()
print('Created media types table')
###############################
# DIGITAL MEDIA TABLE #
###############################
"""
https://stackoverflow.com/a/30532735/4944292
SHOW ENGINE INNODB STATUS
Go to "Latest Foreign Key Error" section
"""
print('Creating digital media table')
db.query("CREATE TABLE digital_media ("
"media_id INT UNSIGNED NOT NULL AUTO_INCREMENT,"
"owner_id INT UNSIGNED NOT NULL,"
"name VARCHAR(50),"
"description VARCHAR(150),"
"file_path VARCHAR(200),"
"thumbnail_path VARCHAR(200),"
"category VARCHAR(200),"
"media_type VARCHAR(200),"
"price FLOAT(2),"
"approval INT,"
"PRIMARY KEY (media_id),"
"FOREIGN KEY (owner_id) REFERENCES user (user_id),"
"INDEX (description))")
db.commit()
print('Digital media table created')
###############################
# MESSAGES TABLE #
###############################
print('Creating Messages Table')
db.query("CREATE TABLE messages ("
"message_id INT UNSIGNED NOT NULL AUTO_INCREMENT,"
"time_stamp DATETIME NOT NULL,"
"sender INT UNSIGNED NOT NULL,"
"recipient INT UNSIGNED NOT NULL,"
"message_body TEXT NOT NULL," # 64KB Limit
"media_id INT UNSIGNED NOT NULL,"
"seen BOOLEAN,"
"subject TINYTEXT NOT NULL," # 255 Byte Limit
"PRIMARY KEY (message_id),"
"FOREIGN KEY (sender) REFERENCES user (user_id),"
"FOREIGN KEY (recipient) REFERENCES user (user_id),"
"FOREIGN KEY (media_id) REFERENCES digital_media (media_id),"
"INDEX (time_stamp, sender, recipient, seen))")
db.commit()
print('Messages table created')
###############################
# TEAM ABOUT TABLE #
###############################
print('Creating team members profiles table')
db.query("CREATE TABLE team_about ("
"team_id INT UNSIGNED NOT NULL AUTO_INCREMENT,"
"name VARCHAR(50),"
"link VARCHAR(20),"
"position VARCHAR(50),"
"image VARCHAR(100),"
"description VARCHAR(100),"
"facebook VARCHAR(100),"
"twitter VARCHAR(100),"
"instagram VARCHAR(100),"
"linkedin VARCHAR(100),"
"PRIMARY KEY (team_id))")
db.commit()
print('Created team members profiles table') |
#!/usr/bin/env python
# START OMIT
i = 3
while i != 0:
print(i)
i -= 1
# END OMIT |
# Copyright (c) 2012 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
{
'variables': {
'chromium_code': 1,
# These files lists are shared with the GN build.
'ash_sources': [
'accelerators/accelerator_commands.cc',
'accelerators/accelerator_commands.h',
'accelerators/accelerator_controller.cc',
'accelerators/accelerator_controller.h',
'accelerators/accelerator_delegate.cc',
'accelerators/accelerator_delegate.h',
'accelerators/accelerator_table.cc',
'accelerators/accelerator_table.h',
'accelerators/debug_commands.cc',
'accelerators/debug_commands.h',
'accelerators/exit_warning_handler.cc',
'accelerators/exit_warning_handler.h',
'accelerators/focus_manager_factory.cc',
'accelerators/focus_manager_factory.h',
'accelerators/key_hold_detector.cc',
'accelerators/key_hold_detector.h',
'accelerators/magnifier_key_scroller.cc',
'accelerators/magnifier_key_scroller.h',
'accelerators/spoken_feedback_toggler.cc',
'accelerators/spoken_feedback_toggler.h',
'app_list/app_list_presenter_delegate.cc',
'app_list/app_list_presenter_delegate.h',
'app_list/app_list_presenter_delegate_factory.cc',
'app_list/app_list_presenter_delegate_factory.h',
'ash_export.h',
'ash_touch_exploration_manager_chromeos.cc',
'ash_touch_exploration_manager_chromeos.h',
'audio/sounds.cc',
'audio/sounds.h',
'aura/aura_layout_manager_adapter.cc',
'aura/aura_layout_manager_adapter.h',
'aura/wm_lookup_aura.cc',
'aura/wm_lookup_aura.h',
'aura/wm_root_window_controller_aura.cc',
'aura/wm_root_window_controller_aura.h',
'aura/wm_shelf_aura.cc',
'aura/wm_shelf_aura.h',
'aura/wm_shell_aura.cc',
'aura/wm_shell_aura.h',
'aura/wm_window_aura.cc',
'aura/wm_window_aura.h',
'autoclick/autoclick_controller.cc',
'autoclick/autoclick_controller.h',
'cancel_mode.cc',
'cancel_mode.h',
'common/accessibility_delegate.h',
'common/accessibility_types.h',
'common/ash_constants.cc',
'common/ash_constants.h',
'common/ash_layout_constants.cc',
'common/ash_layout_constants.h',
'common/ash_switches.cc',
'common/ash_switches.h',
'common/cast_config_delegate.cc',
'common/cast_config_delegate.h',
'common/default_accessibility_delegate.cc',
'common/default_accessibility_delegate.h',
'common/display/display_info.cc',
'common/display/display_info.h',
'common/focus_cycler.cc',
'common/focus_cycler.h',
'common/keyboard/keyboard_ui.cc',
'common/keyboard/keyboard_ui.h',
'common/keyboard/keyboard_ui_observer.h',
'common/login_status.h',
'common/material_design/material_design_controller.cc',
'common/material_design/material_design_controller.h',
'common/metrics/user_metrics_action.h',
'common/root_window_controller_common.cc',
'common/root_window_controller_common.h',
'common/session/session_state_delegate.cc',
'common/session/session_state_delegate.h',
'common/session/session_state_observer.cc',
'common/session/session_state_observer.h',
'common/session/session_types.h',
'common/shelf/shelf_alignment_menu.cc',
'common/shelf/shelf_alignment_menu.h',
'common/shelf/shelf_constants.cc',
'common/shelf/shelf_constants.h',
'common/shelf/shelf_item_delegate.h',
'common/shelf/shelf_item_delegate_manager.cc',
'common/shelf/shelf_item_delegate_manager.h',
'common/shelf/shelf_item_types.cc',
'common/shelf/shelf_item_types.h',
'common/shelf/shelf_menu_model.h',
'common/shelf/shelf_model.cc',
'common/shelf/shelf_model.h',
'common/shelf/shelf_model_observer.h',
'common/shelf/shelf_types.h',
'common/shelf/wm_shelf.h',
'common/shelf/wm_shelf_observer.h',
'common/shelf/wm_shelf_util.cc',
'common/shelf/wm_shelf_util.h',
'common/shell_window_ids.cc',
'common/shell_window_ids.h',
'common/system/accessibility_observer.h',
'common/system/audio/audio_observer.h',
'common/system/audio/tray_audio.cc',
'common/system/audio/tray_audio.h',
'common/system/audio/tray_audio_delegate.h',
'common/system/audio/volume_view.cc',
'common/system/audio/volume_view.h',
'common/system/cast/tray_cast.cc',
'common/system/cast/tray_cast.h',
'common/system/chromeos/audio/audio_detailed_view.cc',
'common/system/chromeos/audio/audio_detailed_view.h',
'common/system/chromeos/audio/tray_audio_chromeos.cc',
'common/system/chromeos/audio/tray_audio_chromeos.h',
'common/system/chromeos/audio/tray_audio_delegate_chromeos.cc',
'common/system/chromeos/audio/tray_audio_delegate_chromeos.h',
'common/system/chromeos/bluetooth/bluetooth_observer.h',
'common/system/chromeos/devicetype_utils.cc',
'common/system/chromeos/devicetype_utils.h',
'common/system/chromeos/enterprise/enterprise_domain_observer.h',
'common/system/chromeos/media_security/media_capture_observer.h',
'common/system/chromeos/network/network_detailed_view.h',
'common/system/chromeos/network/network_observer.h',
'common/system/chromeos/network/network_portal_detector_observer.h',
'common/system/chromeos/network/network_state_list_detailed_view.cc',
'common/system/chromeos/network/network_state_list_detailed_view.h',
'common/system/chromeos/network/tray_network.cc',
'common/system/chromeos/network/tray_network.h',
'common/system/chromeos/network/tray_network_state_observer.cc',
'common/system/chromeos/network/tray_network_state_observer.h',
'common/system/chromeos/network/tray_sms.cc',
'common/system/chromeos/network/tray_sms.h',
'common/system/chromeos/network/tray_vpn.cc',
'common/system/chromeos/network/tray_vpn.h',
'common/system/chromeos/network/vpn_delegate.cc',
'common/system/chromeos/network/vpn_delegate.h',
'common/system/chromeos/network/vpn_list_view.cc',
'common/system/chromeos/network/vpn_list_view.h',
'common/system/chromeos/power/battery_notification.cc',
'common/system/chromeos/power/battery_notification.h',
'common/system/chromeos/power/dual_role_notification.cc',
'common/system/chromeos/power/dual_role_notification.h',
'common/system/chromeos/power/power_status.cc',
'common/system/chromeos/power/power_status.h',
'common/system/chromeos/power/power_status_view.cc',
'common/system/chromeos/power/power_status_view.h',
'common/system/chromeos/power/tray_power.cc',
'common/system/chromeos/power/tray_power.h',
'common/system/chromeos/screen_security/screen_capture_observer.h',
'common/system/chromeos/screen_security/screen_capture_tray_item.cc',
'common/system/chromeos/screen_security/screen_capture_tray_item.h',
'common/system/chromeos/screen_security/screen_share_observer.h',
'common/system/chromeos/screen_security/screen_share_tray_item.cc',
'common/system/chromeos/screen_security/screen_share_tray_item.h',
'common/system/chromeos/screen_security/screen_tray_item.cc',
'common/system/chromeos/screen_security/screen_tray_item.h',
'common/system/chromeos/session/last_window_closed_observer.h',
'common/system/chromeos/session/logout_button_observer.h',
'common/system/chromeos/session/logout_button_tray.cc',
'common/system/chromeos/session/logout_button_tray.h',
'common/system/chromeos/session/logout_confirmation_controller.cc',
'common/system/chromeos/session/logout_confirmation_controller.h',
'common/system/chromeos/session/logout_confirmation_dialog.cc',
'common/system/chromeos/session/logout_confirmation_dialog.h',
'common/system/chromeos/session/session_length_limit_observer.h',
'common/system/chromeos/session/tray_session_length_limit.cc',
'common/system/chromeos/session/tray_session_length_limit.h',
'common/system/chromeos/settings/tray_settings.cc',
'common/system/chromeos/settings/tray_settings.h',
'common/system/chromeos/shutdown_policy_observer.h',
'common/system/chromeos/system_clock_observer.cc',
'common/system/chromeos/system_clock_observer.h',
'common/system/chromeos/tray_tracing.cc',
'common/system/chromeos/tray_tracing.h',
'common/system/chromeos/virtual_keyboard/virtual_keyboard_observer.h',
'common/system/chromeos/virtual_keyboard/virtual_keyboard_tray.cc',
'common/system/chromeos/virtual_keyboard/virtual_keyboard_tray.h',
'common/system/date/clock_observer.h',
'common/system/date/date_default_view.cc',
'common/system/date/date_default_view.h',
'common/system/date/date_view.cc',
'common/system/date/date_view.h',
'common/system/date/tray_date.cc',
'common/system/date/tray_date.h',
'common/system/ime/ime_observer.h',
'common/system/ime/tray_ime_chromeos.cc',
'common/system/ime/tray_ime_chromeos.h',
'common/system/locale/locale_notification_controller.cc',
'common/system/locale/locale_notification_controller.h',
'common/system/locale/locale_observer.h',
'common/system/networking_config_delegate.cc',
'common/system/networking_config_delegate.h',
'common/system/status_area_widget_delegate.cc',
'common/system/status_area_widget_delegate.h',
'common/system/system_notifier.cc',
'common/system/system_notifier.h',
'common/system/tray/actionable_view.cc',
'common/system/tray/actionable_view.h',
'common/system/tray/default_system_tray_delegate.cc',
'common/system/tray/default_system_tray_delegate.h',
'common/system/tray/fixed_sized_image_view.cc',
'common/system/tray/fixed_sized_image_view.h',
'common/system/tray/fixed_sized_scroll_view.cc',
'common/system/tray/fixed_sized_scroll_view.h',
'common/system/tray/hover_highlight_view.cc',
'common/system/tray/hover_highlight_view.h',
'common/system/tray/label_tray_view.cc',
'common/system/tray/label_tray_view.h',
'common/system/tray/special_popup_row.cc',
'common/system/tray/special_popup_row.h',
'common/system/tray/system_tray_bubble.cc',
'common/system/tray/system_tray_bubble.h',
'common/system/tray/system_tray_delegate.cc',
'common/system/tray/system_tray_delegate.h',
'common/system/tray/system_tray_item.cc',
'common/system/tray/system_tray_item.h',
'common/system/tray/system_tray_notifier.cc',
'common/system/tray/system_tray_notifier.h',
'common/system/tray/throbber_view.cc',
'common/system/tray/throbber_view.h',
'common/system/tray/tray_background_view.cc',
'common/system/tray/tray_background_view.h',
'common/system/tray/tray_bar_button_with_title.cc',
'common/system/tray/tray_bar_button_with_title.h',
'common/system/tray/tray_bubble_wrapper.cc',
'common/system/tray/tray_bubble_wrapper.h',
'common/system/tray/tray_constants.cc',
'common/system/tray/tray_constants.h',
'common/system/tray/tray_details_view.cc',
'common/system/tray/tray_details_view.h',
'common/system/tray/tray_event_filter.cc',
'common/system/tray/tray_event_filter.h',
'common/system/tray/tray_image_item.cc',
'common/system/tray/tray_image_item.h',
'common/system/tray/tray_item_more.cc',
'common/system/tray/tray_item_more.h',
'common/system/tray/tray_item_view.cc',
'common/system/tray/tray_item_view.h',
'common/system/tray/tray_notification_view.cc',
'common/system/tray/tray_notification_view.h',
'common/system/tray/tray_popup_header_button.cc',
'common/system/tray/tray_popup_header_button.h',
'common/system/tray/tray_popup_item_container.cc',
'common/system/tray/tray_popup_item_container.h',
'common/system/tray/tray_popup_label_button.cc',
'common/system/tray/tray_popup_label_button.h',
'common/system/tray/tray_popup_label_button_border.cc',
'common/system/tray/tray_popup_label_button_border.h',
'common/system/tray/tray_utils.cc',
'common/system/tray/tray_utils.h',
'common/system/tray/view_click_listener.h',
'common/system/tray_accessibility.cc',
'common/system/tray_accessibility.h',
'common/system/update/tray_update.cc',
'common/system/update/tray_update.h',
'common/system/update/update_observer.h',
'common/system/user/button_from_view.cc',
'common/system/user/button_from_view.h',
'common/system/user/login_status.cc',
'common/system/user/login_status.h',
'common/system/user/rounded_image_view.cc',
'common/system/user/rounded_image_view.h',
'common/system/user/tray_user_separator.cc',
'common/system/user/tray_user_separator.h',
'common/system/user/user_observer.h',
'common/system/volume_control_delegate.h',
'common/system/web_notification/ash_popup_alignment_delegate.cc',
'common/system/web_notification/ash_popup_alignment_delegate.h',
'common/system/web_notification/web_notification_tray.cc',
'common/system/web_notification/web_notification_tray.h',
'common/wm/always_on_top_controller.cc',
'common/wm/always_on_top_controller.h',
'common/wm/background_animator.cc',
'common/wm/background_animator.h',
'common/wm/container_finder.cc',
'common/wm/container_finder.h',
'common/wm/default_state.cc',
'common/wm/default_state.h',
'common/wm/default_window_resizer.cc',
'common/wm/default_window_resizer.h',
'common/wm/dock/docked_window_layout_manager.cc',
'common/wm/dock/docked_window_layout_manager.h',
'common/wm/dock/docked_window_layout_manager_observer.h',
'common/wm/dock/docked_window_resizer.cc',
'common/wm/dock/docked_window_resizer.h',
'common/wm/drag_details.cc',
'common/wm/drag_details.h',
'common/wm/focus_rules.cc',
'common/wm/focus_rules.h',
'common/wm/fullscreen_window_finder.cc',
'common/wm/fullscreen_window_finder.h',
'common/wm/maximize_mode/maximize_mode_event_handler.cc',
'common/wm/maximize_mode/maximize_mode_event_handler.h',
'common/wm/maximize_mode/maximize_mode_window_manager.cc',
'common/wm/maximize_mode/maximize_mode_window_manager.h',
'common/wm/maximize_mode/maximize_mode_window_state.cc',
'common/wm/maximize_mode/maximize_mode_window_state.h',
'common/wm/maximize_mode/workspace_backdrop_delegate.cc',
'common/wm/maximize_mode/workspace_backdrop_delegate.h',
'common/wm/mru_window_tracker.cc',
'common/wm/mru_window_tracker.h',
'common/wm/overview/cleanup_animation_observer.cc',
'common/wm/overview/cleanup_animation_observer.h',
'common/wm/overview/overview_animation_type.h',
'common/wm/overview/scoped_overview_animation_settings.h',
'common/wm/overview/scoped_overview_animation_settings_factory.cc',
'common/wm/overview/scoped_overview_animation_settings_factory.h',
'common/wm/overview/scoped_transform_overview_window.cc',
'common/wm/overview/scoped_transform_overview_window.h',
'common/wm/overview/window_grid.cc',
'common/wm/overview/window_grid.h',
'common/wm/overview/window_selector.cc',
'common/wm/overview/window_selector.h',
'common/wm/overview/window_selector_controller.cc',
'common/wm/overview/window_selector_controller.h',
'common/wm/overview/window_selector_item.cc',
'common/wm/overview/window_selector_item.h',
'common/wm/panels/panel_layout_manager.cc',
'common/wm/panels/panel_layout_manager.h',
'common/wm/panels/panel_window_resizer.cc',
'common/wm/panels/panel_window_resizer.h',
'common/wm/root_window_finder.cc',
'common/wm/root_window_finder.h',
'common/wm/root_window_layout_manager.cc',
'common/wm/root_window_layout_manager.h',
'common/wm/switchable_windows.cc',
'common/wm/switchable_windows.h',
'common/wm/window_animation_types.h',
'common/wm/window_parenting_utils.cc',
'common/wm/window_parenting_utils.h',
'common/wm/window_positioner.cc',
'common/wm/window_positioner.h',
'common/wm/window_positioning_utils.cc',
'common/wm/window_positioning_utils.h',
'common/wm/window_resizer.cc',
'common/wm/window_resizer.h',
'common/wm/window_state.cc',
'common/wm/window_state.h',
'common/wm/window_state_delegate.cc',
'common/wm/window_state_delegate.h',
'common/wm/window_state_observer.h',
'common/wm/window_state_util.cc',
'common/wm/window_state_util.h',
'common/wm/wm_event.cc',
'common/wm/wm_event.h',
'common/wm/wm_screen_util.cc',
'common/wm/wm_screen_util.h',
'common/wm/wm_snap_to_pixel_layout_manager.cc',
'common/wm/wm_snap_to_pixel_layout_manager.h',
'common/wm/wm_toplevel_window_event_handler.cc',
'common/wm/wm_toplevel_window_event_handler.h',
'common/wm/wm_types.cc',
'common/wm/wm_types.h',
'common/wm/workspace/magnetism_matcher.cc',
'common/wm/workspace/magnetism_matcher.h',
'common/wm/workspace/multi_window_resize_controller.cc',
'common/wm/workspace/multi_window_resize_controller.h',
'common/wm/workspace/phantom_window_controller.cc',
'common/wm/workspace/phantom_window_controller.h',
'common/wm/workspace/two_step_edge_cycler.cc',
'common/wm/workspace/two_step_edge_cycler.h',
'common/wm/workspace/workspace_layout_manager.cc',
'common/wm/workspace/workspace_layout_manager.h',
'common/wm/workspace/workspace_layout_manager_backdrop_delegate.h',
'common/wm/workspace/workspace_layout_manager_delegate.h',
'common/wm/workspace/workspace_types.h',
'common/wm/workspace/workspace_window_resizer.cc',
'common/wm/workspace/workspace_window_resizer.h',
'common/wm_activation_observer.h',
'common/wm_display_observer.h',
'common/wm_layout_manager.h',
'common/wm_lookup.cc',
'common/wm_lookup.h',
'common/wm_root_window_controller.h',
'common/wm_root_window_controller_observer.h',
'common/wm_shell.cc',
'common/wm_shell.h',
'common/wm_window.h',
'common/wm_window_observer.h',
'common/wm_window_property.h',
'common/wm_window_tracker.h',
'debug.cc',
'debug.h',
'default_user_wallpaper_delegate.cc',
'default_user_wallpaper_delegate.h',
'desktop_background/desktop_background_controller.cc',
'desktop_background/desktop_background_controller.h',
'desktop_background/desktop_background_controller_observer.h',
'desktop_background/desktop_background_view.cc',
'desktop_background/desktop_background_view.h',
'desktop_background/desktop_background_widget_controller.cc',
'desktop_background/desktop_background_widget_controller.h',
'desktop_background/user_wallpaper_delegate.h',
'display/cursor_window_controller.cc',
'display/cursor_window_controller.h',
'display/display_animator.h',
'display/display_animator_chromeos.cc',
'display/display_animator_chromeos.h',
'display/display_change_observer_chromeos.cc',
'display/display_change_observer_chromeos.h',
'display/display_color_manager_chromeos.cc',
'display/display_color_manager_chromeos.h',
'display/display_configuration_controller.cc',
'display/display_configuration_controller.h',
'display/display_error_observer_chromeos.cc',
'display/display_error_observer_chromeos.h',
'display/display_layout_store.cc',
'display/display_layout_store.h',
'display/display_manager.cc',
'display/display_manager.h',
'display/display_pref_util.h',
'display/display_util.cc',
'display/display_util.h',
'display/event_transformation_handler.cc',
'display/event_transformation_handler.h',
'display/extended_mouse_warp_controller.cc',
'display/extended_mouse_warp_controller.h',
'display/json_converter.cc',
'display/json_converter.h',
'display/mirror_window_controller.cc',
'display/mirror_window_controller.h',
'display/mouse_cursor_event_filter.cc',
'display/mouse_cursor_event_filter.h',
'display/mouse_warp_controller.h',
'display/null_mouse_warp_controller.cc',
'display/null_mouse_warp_controller.h',
'display/projecting_observer_chromeos.cc',
'display/projecting_observer_chromeos.h',
'display/resolution_notification_controller.cc',
'display/resolution_notification_controller.h',
'display/root_window_transformers.cc',
'display/root_window_transformers.h',
'display/screen_ash.cc',
'display/screen_ash.h',
'display/screen_orientation_controller_chromeos.cc',
'display/screen_orientation_controller_chromeos.h',
'display/screen_position_controller.cc',
'display/screen_position_controller.h',
'display/shared_display_edge_indicator.cc',
'display/shared_display_edge_indicator.h',
'display/unified_mouse_warp_controller.cc',
'display/unified_mouse_warp_controller.h',
'display/window_tree_host_manager.cc',
'display/window_tree_host_manager.h',
'drag_drop/drag_drop_controller.cc',
'drag_drop/drag_drop_controller.h',
'drag_drop/drag_drop_tracker.cc',
'drag_drop/drag_drop_tracker.h',
'drag_drop/drag_image_view.cc',
'drag_drop/drag_image_view.h',
'first_run/desktop_cleaner.cc',
'first_run/desktop_cleaner.h',
'first_run/first_run_helper.cc',
'first_run/first_run_helper.h',
'first_run/first_run_helper_impl.cc',
'first_run/first_run_helper_impl.h',
'frame/caption_buttons/caption_button_types.h',
'frame/caption_buttons/frame_caption_button.cc',
'frame/caption_buttons/frame_caption_button.h',
'frame/caption_buttons/frame_caption_button_container_view.cc',
'frame/caption_buttons/frame_caption_button_container_view.h',
'frame/caption_buttons/frame_size_button.cc',
'frame/caption_buttons/frame_size_button.h',
'frame/caption_buttons/frame_size_button_delegate.h',
'frame/custom_frame_view_ash.cc',
'frame/custom_frame_view_ash.h',
'frame/default_header_painter.cc',
'frame/default_header_painter.h',
'frame/frame_border_hit_test_controller.cc',
'frame/frame_border_hit_test_controller.h',
'frame/header_painter.h',
'frame/header_painter_util.cc',
'frame/header_painter_util.h',
'gpu_support.h',
'gpu_support_stub.cc',
'gpu_support_stub.h',
'high_contrast/high_contrast_controller.cc',
'high_contrast/high_contrast_controller.h',
'host/ash_window_tree_host.cc',
'host/ash_window_tree_host.h',
'host/ash_window_tree_host_init_params.cc',
'host/ash_window_tree_host_init_params.h',
'host/ash_window_tree_host_platform.cc',
'host/ash_window_tree_host_platform.h',
'host/ash_window_tree_host_unified.cc',
'host/ash_window_tree_host_unified.h',
'host/ash_window_tree_host_win.cc',
'host/ash_window_tree_host_win.h',
'host/ash_window_tree_host_x11.cc',
'host/ash_window_tree_host_x11.h',
'host/root_window_transformer.h',
'host/transformer_helper.cc',
'host/transformer_helper.h',
'ime/input_method_event_handler.cc',
'ime/input_method_event_handler.h',
'keyboard_uma_event_filter.cc',
'keyboard_uma_event_filter.h',
'link_handler_model.cc',
'link_handler_model.h',
'link_handler_model_factory.cc',
'link_handler_model_factory.h',
'magnifier/magnification_controller.cc',
'magnifier/magnification_controller.h',
'magnifier/partial_magnification_controller.cc',
'magnifier/partial_magnification_controller.h',
'metrics/desktop_task_switch_metric_recorder.cc',
'metrics/desktop_task_switch_metric_recorder.h',
'metrics/task_switch_metrics_recorder.cc',
'metrics/task_switch_metrics_recorder.h',
'metrics/task_switch_time_tracker.cc',
'metrics/task_switch_time_tracker.h',
'metrics/user_metrics_recorder.cc',
'metrics/user_metrics_recorder.h',
'multi_profile_uma.cc',
'multi_profile_uma.h',
'pointer_watcher_delegate.h',
'pointer_watcher_delegate_aura.cc',
'pointer_watcher_delegate_aura.h',
'popup_message.cc',
'popup_message.h',
'root_window_controller.cc',
'root_window_controller.h',
'root_window_settings.cc',
'root_window_settings.h',
'rotator/screen_rotation_animation.cc',
'rotator/screen_rotation_animation.h',
'rotator/screen_rotation_animator.cc',
'rotator/screen_rotation_animator.h',
'rotator/window_rotation.cc',
'rotator/window_rotation.h',
'scoped_target_root_window.cc',
'scoped_target_root_window.h',
'screen_util.cc',
'screen_util.h',
'screenshot_delegate.h',
'shelf/app_list_button.cc',
'shelf/app_list_button.h',
'shelf/app_list_shelf_item_delegate.cc',
'shelf/app_list_shelf_item_delegate.h',
'shelf/ink_drop_button_listener.h',
'shelf/overflow_bubble.cc',
'shelf/overflow_bubble.h',
'shelf/overflow_bubble_view.cc',
'shelf/overflow_bubble_view.h',
'shelf/overflow_button.cc',
'shelf/overflow_button.h',
'shelf/scoped_observer_with_duplicated_sources.h',
'shelf/shelf.cc',
'shelf/shelf.h',
'shelf/shelf_bezel_event_filter.cc',
'shelf/shelf_bezel_event_filter.h',
'shelf/shelf_button.cc',
'shelf/shelf_button.h',
'shelf/shelf_button_pressed_metric_tracker.cc',
'shelf/shelf_button_pressed_metric_tracker.h',
'shelf/shelf_delegate.h',
'shelf/shelf_icon_observer.h',
'shelf/shelf_layout_manager.cc',
'shelf/shelf_layout_manager.h',
'shelf/shelf_layout_manager_observer.h',
'shelf/shelf_locking_manager.cc',
'shelf/shelf_locking_manager.h',
'shelf/shelf_navigator.cc',
'shelf/shelf_navigator.h',
'shelf/shelf_tooltip_manager.cc',
'shelf/shelf_tooltip_manager.h',
'shelf/shelf_util.cc',
'shelf/shelf_util.h',
'shelf/shelf_view.cc',
'shelf/shelf_view.h',
'shelf/shelf_widget.cc',
'shelf/shelf_widget.h',
'shelf/shelf_window_watcher.cc',
'shelf/shelf_window_watcher.h',
'shelf/shelf_window_watcher_item_delegate.cc',
'shelf/shelf_window_watcher_item_delegate.h',
'shell.cc',
'shell.h',
'shell_delegate.h',
'shell_factory.h',
'shell_init_params.cc',
'shell_init_params.h',
'snap_to_pixel_layout_manager.cc',
'snap_to_pixel_layout_manager.h',
'sticky_keys/sticky_keys_controller.cc',
'sticky_keys/sticky_keys_controller.h',
'sticky_keys/sticky_keys_overlay.cc',
'sticky_keys/sticky_keys_overlay.h',
'sticky_keys/sticky_keys_state.h',
'system/brightness_control_delegate.h',
'system/chromeos/bluetooth/bluetooth_notification_controller.cc',
'system/chromeos/bluetooth/bluetooth_notification_controller.h',
'system/chromeos/bluetooth/tray_bluetooth.cc',
'system/chromeos/bluetooth/tray_bluetooth.h',
'system/chromeos/brightness/brightness_controller_chromeos.cc',
'system/chromeos/brightness/brightness_controller_chromeos.h',
'system/chromeos/brightness/tray_brightness.cc',
'system/chromeos/brightness/tray_brightness.h',
'system/chromeos/enterprise/tray_enterprise.cc',
'system/chromeos/enterprise/tray_enterprise.h',
'system/chromeos/keyboard_brightness_controller.cc',
'system/chromeos/keyboard_brightness_controller.h',
'system/chromeos/media_security/multi_profile_media_tray_item.cc',
'system/chromeos/media_security/multi_profile_media_tray_item.h',
'system/chromeos/multi_user/user_switch_util.cc',
'system/chromeos/multi_user/user_switch_util.h',
'system/chromeos/power/power_event_observer.cc',
'system/chromeos/power/power_event_observer.h',
'system/chromeos/power/video_activity_notifier.cc',
'system/chromeos/power/video_activity_notifier.h',
'system/chromeos/rotation/tray_rotation_lock.cc',
'system/chromeos/rotation/tray_rotation_lock.h',
'system/chromeos/supervised/custodian_info_tray_observer.h',
'system/chromeos/supervised/tray_supervised_user.cc',
'system/chromeos/supervised/tray_supervised_user.h',
'system/chromeos/tray_caps_lock.cc',
'system/chromeos/tray_caps_lock.h',
'system/chromeos/tray_display.cc',
'system/chromeos/tray_display.h',
'system/keyboard_brightness/keyboard_brightness_control_delegate.h',
'system/overview/overview_button_tray.cc',
'system/overview/overview_button_tray.h',
'system/status_area_widget.cc',
'system/status_area_widget.h',
'system/toast/toast_data.cc',
'system/toast/toast_data.h',
'system/toast/toast_manager.cc',
'system/toast/toast_manager.h',
'system/toast/toast_overlay.cc',
'system/toast/toast_overlay.h',
'system/tray/system_tray.cc',
'system/tray/system_tray.h',
'system/user/tray_user.cc',
'system/user/tray_user.h',
'system/user/user_card_view.cc',
'system/user/user_card_view.h',
'system/user/user_view.cc',
'system/user/user_view.h',
'touch/touch_hud_debug.cc',
'touch/touch_hud_debug.h',
'touch/touch_hud_projection.cc',
'touch/touch_hud_projection.h',
'touch/touch_observer_hud.cc',
'touch/touch_observer_hud.h',
'touch/touch_transformer_controller.cc',
'touch/touch_transformer_controller.h',
'touch/touch_uma.cc',
'touch/touch_uma.h',
'touch/touchscreen_util.cc',
'touch/touchscreen_util.h',
'utility/screenshot_controller.cc',
'utility/screenshot_controller.h',
'virtual_keyboard_controller.cc',
'virtual_keyboard_controller.h',
'wm/ash_focus_rules.cc',
'wm/ash_focus_rules.h',
'wm/ash_native_cursor_manager.cc',
'wm/ash_native_cursor_manager.h',
'wm/boot_splash_screen_chromeos.cc',
'wm/boot_splash_screen_chromeos.h',
'wm/cursor_manager_chromeos.cc',
'wm/cursor_manager_chromeos.h',
'wm/dim_window.cc',
'wm/dim_window.h',
'wm/drag_window_controller.cc',
'wm/drag_window_controller.h',
'wm/drag_window_resizer.cc',
'wm/drag_window_resizer.h',
'wm/event_client_impl.cc',
'wm/event_client_impl.h',
'wm/gestures/overview_gesture_handler.cc',
'wm/gestures/overview_gesture_handler.h',
'wm/gestures/shelf_gesture_handler.cc',
'wm/gestures/shelf_gesture_handler.h',
'wm/immersive_fullscreen_controller.cc',
'wm/immersive_fullscreen_controller.h',
'wm/immersive_revealed_lock.cc',
'wm/immersive_revealed_lock.h',
'wm/lock_layout_manager.cc',
'wm/lock_layout_manager.h',
'wm/lock_state_controller.cc',
'wm/lock_state_controller.h',
'wm/lock_state_observer.h',
'wm/lock_window_state.cc',
'wm/lock_window_state.h',
'wm/maximize_mode/maximize_mode_controller.cc',
'wm/maximize_mode/maximize_mode_controller.h',
'wm/maximize_mode/maximize_mode_event_handler_aura.cc',
'wm/maximize_mode/maximize_mode_event_handler_aura.h',
'wm/maximize_mode/scoped_disable_internal_mouse_and_keyboard.h',
'wm/maximize_mode/scoped_disable_internal_mouse_and_keyboard_ozone.cc',
'wm/maximize_mode/scoped_disable_internal_mouse_and_keyboard_ozone.h',
'wm/maximize_mode/scoped_disable_internal_mouse_and_keyboard_x11.cc',
'wm/maximize_mode/scoped_disable_internal_mouse_and_keyboard_x11.h',
'wm/overlay_event_filter.cc',
'wm/overlay_event_filter.h',
'wm/overview/scoped_overview_animation_settings_aura.cc',
'wm/overview/scoped_overview_animation_settings_aura.h',
'wm/overview/scoped_overview_animation_settings_factory_aura.cc',
'wm/overview/scoped_overview_animation_settings_factory_aura.h',
'wm/panels/attached_panel_window_targeter.cc',
'wm/panels/attached_panel_window_targeter.h',
'wm/panels/panel_frame_view.cc',
'wm/panels/panel_frame_view.h',
'wm/panels/panel_window_event_handler.cc',
'wm/panels/panel_window_event_handler.h',
'wm/power_button_controller.cc',
'wm/power_button_controller.h',
'wm/resize_handle_window_targeter.cc',
'wm/resize_handle_window_targeter.h',
'wm/resize_shadow.cc',
'wm/resize_shadow.h',
'wm/resize_shadow_controller.cc',
'wm/resize_shadow_controller.h',
'wm/screen_dimmer.cc',
'wm/screen_dimmer.h',
'wm/screen_pinning_controller.cc',
'wm/screen_pinning_controller.h',
'wm/session_state_animator.cc',
'wm/session_state_animator.h',
'wm/session_state_animator_impl.cc',
'wm/session_state_animator_impl.h',
'wm/stacking_controller.cc',
'wm/stacking_controller.h',
'wm/status_area_layout_manager.cc',
'wm/status_area_layout_manager.h',
'wm/system_background_controller.cc',
'wm/system_background_controller.h',
'wm/system_gesture_event_filter.cc',
'wm/system_gesture_event_filter.h',
'wm/system_modal_container_event_filter.cc',
'wm/system_modal_container_event_filter.h',
'wm/system_modal_container_event_filter_delegate.h',
'wm/system_modal_container_layout_manager.cc',
'wm/system_modal_container_layout_manager.h',
'wm/toplevel_window_event_handler.cc',
'wm/toplevel_window_event_handler.h',
'wm/video_detector.cc',
'wm/video_detector.h',
'wm/window_animations.cc',
'wm/window_animations.h',
'wm/window_cycle_controller.cc',
'wm/window_cycle_controller.h',
'wm/window_cycle_list.cc',
'wm/window_cycle_list.h',
'wm/window_properties.cc',
'wm/window_properties.h',
'wm/window_state_aura.cc',
'wm/window_state_aura.h',
'wm/window_util.cc',
'wm/window_util.h',
'wm/workspace/workspace_event_handler.cc',
'wm/workspace/workspace_event_handler.h',
'wm/workspace_controller.cc',
'wm/workspace_controller.h',
],
'ash_with_content_sources': [
'content/ash_with_content_export.h',
'content/gpu_support_impl.cc',
'content/gpu_support_impl.h',
'content/keyboard_overlay/keyboard_overlay_delegate.cc',
'content/keyboard_overlay/keyboard_overlay_delegate.h',
'content/keyboard_overlay/keyboard_overlay_view.cc',
'content/keyboard_overlay/keyboard_overlay_view.h',
'content/screen_orientation_delegate_chromeos.cc',
'content/screen_orientation_delegate_chromeos.h',
'content/shell_content_state.cc',
'content/shell_content_state.h',
],
'ash_test_support_sources': [
'desktop_background/desktop_background_controller_test_api.cc',
'desktop_background/desktop_background_controller_test_api.h',
'shell/toplevel_window.cc',
'shell/toplevel_window.h',
'test/ash_md_test_base.cc',
'test/ash_md_test_base.h',
'test/ash_test_base.cc',
'test/ash_test_base.h',
'test/ash_test_helper.cc',
'test/ash_test_helper.h',
'test/ash_test_views_delegate.cc',
'test/ash_test_views_delegate.h',
'test/child_modal_window.cc',
'test/child_modal_window.h',
'test/cursor_manager_test_api.cc',
'test/cursor_manager_test_api.h',
'test/display_manager_test_api.cc',
'test/display_manager_test_api.h',
'test/material_design_controller_test_api.cc',
'test/material_design_controller_test_api.h',
'test/mirror_window_test_api.cc',
'test/mirror_window_test_api.h',
'test/overflow_bubble_view_test_api.cc',
'test/overflow_bubble_view_test_api.h',
'test/shelf_button_pressed_metric_tracker_test_api.cc',
'test/shelf_button_pressed_metric_tracker_test_api.h',
'test/shelf_item_delegate_manager_test_api.cc',
'test/shelf_item_delegate_manager_test_api.h',
'test/shelf_test_api.h',
'test/shelf_view_test_api.cc',
'test/shelf_view_test_api.h',
'test/shell_test_api.cc',
'test/shell_test_api.h',
'test/status_area_widget_test_helper.cc',
'test/status_area_widget_test_helper.h',
'test/task_switch_time_tracker_test_api.cc',
'test/task_switch_time_tracker_test_api.h',
'test/test_activation_delegate.cc',
'test/test_activation_delegate.h',
'test/test_keyboard_ui.cc',
'test/test_keyboard_ui.h',
'test/test_lock_state_controller_delegate.cc',
'test/test_lock_state_controller_delegate.h',
'test/test_overlay_delegate.cc',
'test/test_overlay_delegate.h',
'test/test_screenshot_delegate.cc',
'test/test_screenshot_delegate.h',
'test/test_session_state_animator.cc',
'test/test_session_state_animator.h',
'test/test_session_state_delegate.cc',
'test/test_session_state_delegate.h',
'test/test_shelf_delegate.cc',
'test/test_shelf_delegate.h',
'test/test_shelf_item_delegate.cc',
'test/test_shelf_item_delegate.h',
'test/test_shell_delegate.cc',
'test/test_shell_delegate.h',
'test/test_suite.cc',
'test/test_suite.h',
'test/test_suite_init.h',
'test/test_suite_init.mm',
'test/test_system_tray_delegate.cc',
'test/test_system_tray_delegate.h',
'test/test_system_tray_item.cc',
'test/test_system_tray_item.h',
'test/test_user_wallpaper_delegate.cc',
'test/test_user_wallpaper_delegate.h',
'test/test_volume_control_delegate.cc',
'test/test_volume_control_delegate.h',
'test/tray_cast_test_api.cc',
'test/tray_cast_test_api.h',
'test/ui_controls_factory_ash.cc',
'test/ui_controls_factory_ash.h',
'test/user_metrics_recorder_test_api.cc',
'test/user_metrics_recorder_test_api.h',
'test/virtual_keyboard_test_helper.cc',
'test/virtual_keyboard_test_helper.h',
],
'ash_test_support_with_content_sources': [
'test/content/test_shell_content_state.cc',
'test/content/test_shell_content_state.h',
],
'ash_shell_lib_sources': [
'../ui/views/test/test_views_delegate_aura.cc',
'shell/app_list.cc',
'shell/bubble.cc',
'shell/context_menu.cc',
'shell/context_menu.h',
'shell/example_factory.h',
'shell/lock_view.cc',
'shell/panel_window.cc',
'shell/panel_window.h',
'shell/shelf_delegate_impl.cc',
'shell/shelf_delegate_impl.h',
'shell/shell_delegate_impl.cc',
'shell/shell_delegate_impl.h',
'shell/toplevel_window.cc',
'shell/toplevel_window.h',
'shell/widgets.cc',
'shell/window_type_launcher.cc',
'shell/window_type_launcher.h',
'shell/window_watcher.cc',
'shell/window_watcher.h',
'shell/window_watcher_shelf_item_delegate.cc',
'shell/window_watcher_shelf_item_delegate.h',
],
'ash_shell_with_content_lib_sources': [
'shell/content/client/shell_browser_main_parts.cc',
'shell/content/client/shell_browser_main_parts.h',
'shell/content/client/shell_content_browser_client.cc',
'shell/content/client/shell_content_browser_client.h',
'shell/content/client/shell_main_delegate.cc',
'shell/content/client/shell_main_delegate.h',
'shell/content/shell_content_state_impl.cc',
'shell/content/shell_content_state_impl.h',
],
'ash_unittests_sources': [
'accelerators/accelerator_commands_unittest.cc',
'accelerators/accelerator_controller_unittest.cc',
'accelerators/accelerator_filter_unittest.cc',
'accelerators/accelerator_table_unittest.cc',
'accelerators/magnifier_key_scroller_unittest.cc',
'accelerators/spoken_feedback_toggler_unittest.cc',
'app_list/app_list_presenter_delegate_unittest.cc',
'ash_touch_exploration_manager_chromeos_unittest.cc',
'autoclick/autoclick_unittest.cc',
'common/display/display_info_unittest.cc',
'common/material_design/material_design_controller_unittest.cc',
'common/shelf/shelf_model_unittest.cc',
'common/system/chromeos/power/power_status_unittest.cc',
'common/system/chromeos/power/power_status_view_unittest.cc',
'common/system/chromeos/power/tray_power_unittest.cc',
'common/system/chromeos/screen_security/screen_tray_item_unittest.cc',
'common/system/chromeos/session/logout_confirmation_controller_unittest.cc',
'common/system/chromeos/session/tray_session_length_limit_unittest.cc',
'common/system/date/date_view_unittest.cc',
'common/system/ime/tray_ime_chromeos_unittest.cc',
'common/system/tray/tray_details_view_unittest.cc',
'common/system/update/tray_update_unittest.cc',
'common/wm/overview/cleanup_animation_observer_unittest.cc',
'content/display/screen_orientation_controller_chromeos_unittest.cc',
'content/keyboard_overlay/keyboard_overlay_delegate_unittest.cc',
'content/keyboard_overlay/keyboard_overlay_view_unittest.cc',
'desktop_background/desktop_background_controller_unittest.cc',
'dip_unittest.cc',
'display/cursor_window_controller_unittest.cc',
'display/display_change_observer_chromeos_unittest.cc',
'display/display_color_manager_chromeos_unittest.cc',
'display/display_error_observer_chromeos_unittest.cc',
'display/display_manager_unittest.cc',
'display/display_util_unittest.cc',
'display/extended_mouse_warp_controller_unittest.cc',
'display/json_converter_unittest.cc',
'display/mirror_window_controller_unittest.cc',
'display/mouse_cursor_event_filter_unittest.cc',
'display/projecting_observer_chromeos_unittest.cc',
'display/resolution_notification_controller_unittest.cc',
'display/root_window_transformers_unittest.cc',
'display/screen_ash_unittest.cc',
'display/screen_position_controller_unittest.cc',
'display/unified_mouse_warp_controller_unittest.cc',
'display/window_tree_host_manager_unittest.cc',
'drag_drop/drag_drop_controller_unittest.cc',
'drag_drop/drag_drop_tracker_unittest.cc',
'extended_desktop_unittest.cc',
'focus_cycler_unittest.cc',
'frame/caption_buttons/frame_caption_button_container_view_unittest.cc',
'frame/caption_buttons/frame_size_button_unittest.cc',
'frame/custom_frame_view_ash_unittest.cc',
'frame/default_header_painter_unittest.cc',
'host/ash_window_tree_host_x11_unittest.cc',
'magnifier/magnification_controller_unittest.cc',
'metrics/desktop_task_switch_metric_recorder_unittest.cc',
'metrics/task_switch_metrics_recorder_unittest.cc',
'metrics/task_switch_time_tracker_unittest.cc',
'metrics/user_metrics_recorder_unittest.cc',
'popup_message_unittest.cc',
'root_window_controller_unittest.cc',
'rotator/screen_rotation_animation_unittest.cc',
'screen_util_unittest.cc',
'shelf/scoped_observer_with_duplicated_sources_unittest.cc',
'shelf/shelf_button_pressed_metric_tracker_unittest.cc',
'shelf/shelf_layout_manager_unittest.cc',
'shelf/shelf_locking_manager_unittest.cc',
'shelf/shelf_navigator_unittest.cc',
'shelf/shelf_tooltip_manager_unittest.cc',
'shelf/shelf_unittest.cc',
'shelf/shelf_view_unittest.cc',
'shelf/shelf_widget_unittest.cc',
'shelf/shelf_window_watcher_unittest.cc',
'shell_unittest.cc',
'sticky_keys/sticky_keys_overlay_unittest.cc',
'sticky_keys/sticky_keys_unittest.cc',
'system/chromeos/brightness/tray_brightness_unittest.cc',
'system/chromeos/media_security/multi_profile_media_tray_item_unittest.cc',
'system/chromeos/multi_user/user_switch_util_unittest.cc',
'system/chromeos/power/power_event_observer_unittest.cc',
'system/chromeos/rotation/tray_rotation_lock_unittest.cc',
'system/chromeos/supervised/tray_supervised_user_unittest.cc',
'system/chromeos/tray_display_unittest.cc',
'system/overview/overview_button_tray_unittest.cc',
'system/toast/toast_manager_unittest.cc',
'system/tray/system_tray_unittest.cc',
'system/user/tray_user_unittest.cc',
'system/web_notification/ash_popup_alignment_delegate_unittest.cc',
'system/web_notification/web_notification_tray_unittest.cc',
'test/ash_test_helper_unittest.cc',
'test/ash_unittests.cc',
'tooltips/tooltip_controller_unittest.cc',
'touch/touch_observer_hud_unittest.cc',
'touch/touch_transformer_controller_unittest.cc',
'touch/touchscreen_util_unittest.cc',
'utility/screenshot_controller_unittest.cc',
'virtual_keyboard_controller_unittest.cc',
'wm/always_on_top_controller_unittest.cc',
'wm/ash_focus_rules_unittest.cc',
'wm/ash_native_cursor_manager_unittest.cc',
'wm/dock/docked_window_layout_manager_unittest.cc',
'wm/dock/docked_window_resizer_unittest.cc',
'wm/drag_window_resizer_unittest.cc',
'wm/gestures/overview_gesture_handler_unittest.cc',
'wm/immersive_fullscreen_controller_unittest.cc',
'wm/lock_layout_manager_unittest.cc',
'wm/lock_state_controller_unittest.cc',
'wm/maximize_mode/accelerometer_test_data_literals.cc',
'wm/maximize_mode/maximize_mode_controller_unittest.cc',
'wm/maximize_mode/maximize_mode_window_manager_unittest.cc',
'wm/mru_window_tracker_unittest.cc',
'wm/overlay_event_filter_unittest.cc',
'wm/overview/window_selector_unittest.cc',
'wm/panels/panel_layout_manager_unittest.cc',
'wm/panels/panel_window_resizer_unittest.cc',
'wm/resize_shadow_and_cursor_unittest.cc',
'wm/root_window_layout_manager_unittest.cc',
'wm/screen_dimmer_unittest.cc',
'wm/screen_pinning_controller_unittest.cc',
'wm/session_state_animator_impl_unittest.cc',
'wm/stacking_controller_unittest.cc',
'wm/system_gesture_event_filter_unittest.cc',
'wm/system_modal_container_layout_manager_unittest.cc',
'wm/toplevel_window_event_handler_unittest.cc',
'wm/video_detector_unittest.cc',
'wm/window_animations_unittest.cc',
'wm/window_cycle_controller_unittest.cc',
'wm/window_manager_unittest.cc',
'wm/window_modality_controller_unittest.cc',
'wm/window_positioner_unittest.cc',
'wm/window_state_unittest.cc',
'wm/window_util_unittest.cc',
'wm/workspace/magnetism_matcher_unittest.cc',
'wm/workspace/multi_window_resize_controller_unittest.cc',
'wm/workspace/workspace_event_handler_test_helper.cc',
'wm/workspace/workspace_event_handler_test_helper.h',
'wm/workspace/workspace_event_handler_unittest.cc',
'wm/workspace/workspace_layout_manager_unittest.cc',
'wm/workspace/workspace_window_resizer_unittest.cc',
'wm/workspace_controller_test_helper.cc',
'wm/workspace_controller_test_helper.h',
'wm/workspace_controller_unittest.cc',
],
},
'targets': [
{
# GN version: //ash
'target_name': 'ash',
'type': '<(component)',
'dependencies': [
'../base/base.gyp:base',
'../base/base.gyp:base_i18n',
'../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
'../cc/cc.gyp:cc',
'../components/components.gyp:device_event_log_component',
'../components/components.gyp:onc_component',
'../components/components.gyp:signin_core_account_id',
'../components/components.gyp:user_manager',
'../components/components.gyp:wallpaper',
'../media/media.gyp:media',
'../net/net.gyp:net',
'../skia/skia.gyp:skia',
'../third_party/icu/icu.gyp:icui18n',
'../third_party/icu/icu.gyp:icuuc',
'../ui/accessibility/accessibility.gyp:accessibility',
'../ui/app_list/app_list.gyp:app_list',
'../ui/app_list/presenter/app_list_presenter.gyp:app_list_presenter',
'../ui/aura/aura.gyp:aura',
'../ui/base/ime/ui_base_ime.gyp:ui_base_ime',
'../ui/base/ui_base.gyp:ui_base',
'../ui/base/ui_base.gyp:ui_data_pack',
'../ui/compositor/compositor.gyp:compositor',
'../ui/display/display.gyp:display',
'../ui/events/devices/events_devices.gyp:events_devices',
'../ui/events/events.gyp:events',
'../ui/events/events.gyp:events_base',
'../ui/events/events.gyp:gesture_detection',
'../ui/events/platform/events_platform.gyp:events_platform',
'../ui/gfx/gfx.gyp:gfx',
'../ui/gfx/gfx.gyp:gfx_geometry',
'../ui/gfx/gfx.gyp:gfx_range',
'../ui/gfx/gfx.gyp:gfx_vector_icons',
'../ui/keyboard/keyboard.gyp:keyboard',
'../ui/message_center/message_center.gyp:message_center',
'../ui/native_theme/native_theme.gyp:native_theme',
'../ui/platform_window/stub/stub_window.gyp:stub_window',
'../ui/resources/ui_resources.gyp:ui_resources',
'../ui/strings/ui_strings.gyp:ui_strings',
'../ui/views/views.gyp:views',
'../ui/wm/wm.gyp:wm',
'../url/url.gyp:url_lib',
'ash_resources.gyp:ash_resources',
'ash_strings.gyp:ash_strings',
],
'defines': [
'ASH_IMPLEMENTATION',
],
'sources': [
'<@(ash_sources)',
],
'conditions': [
['OS=="win"', {
'sources!': [
# Note: sources list duplicated in GN build.
"sticky_keys/sticky_keys_controller.cc",
"sticky_keys/sticky_keys_controller.h",
],
# TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
'msvs_disabled_warnings': [ 4267, ],
}],
['use_x11==1', {
'dependencies': [
'../build/linux/system.gyp:x11',
'../build/linux/system.gyp:xfixes',
'../ui/base/x/ui_base_x.gyp:ui_base_x',
'../ui/events/devices/x11/events_devices_x11.gyp:events_devices_x11',
'../ui/gfx/x/gfx_x11.gyp:gfx_x11',
],
}],
['use_ozone==1', {
'dependencies': [
'../ui/events/ozone/events_ozone.gyp:events_ozone',
'../ui/ozone/ozone.gyp:ozone',
],
}],
['chromeos==1', {
'dependencies': [
'../chromeos/chromeos.gyp:chromeos',
# Ash #includes power_supply_properties.pb.h directly.
'../chromeos/chromeos.gyp:power_manager_proto',
'../components/components.gyp:quirks',
'../device/bluetooth/bluetooth.gyp:device_bluetooth',
'../third_party/qcms/qcms.gyp:qcms',
'../ui/chromeos/ui_chromeos.gyp:ui_chromeos_resources',
'../ui/chromeos/ui_chromeos.gyp:ui_chromeos_strings',
'../ui/chromeos/ui_chromeos.gyp:ui_chromeos',
'../ui/display/display.gyp:display_util',
],
}, { # else: chromeos!=1
'sources!': [
'accelerators/key_hold_detector.cc',
'accelerators/key_hold_detector.h',
'accelerators/magnifier_key_scroller.cc',
'accelerators/magnifier_key_scroller.h',
'accelerators/spoken_feedback_toggler.cc',
'accelerators/spoken_feedback_toggler.h',
'display/resolution_notification_controller.cc',
'display/resolution_notification_controller.h',
'touch/touch_transformer_controller.cc',
'touch/touch_transformer_controller.h',
'touch/touchscreen_util.cc',
'touch/touchscreen_util.h',
'virtual_keyboard_controller.cc',
'virtual_keyboard_controller.h'
],
}],
],
},
{
# GN version: //ash:ash_with_content
'target_name': 'ash_with_content',
'type': '<(component)',
'dependencies': [
'../base/base.gyp:base',
'../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
'../content/content.gyp:content_browser',
'../ipc/ipc.gyp:ipc',
'../skia/skia.gyp:skia',
'../ui/aura/aura.gyp:aura',
'../ui/base/ui_base.gyp:ui_base',
'../ui/compositor/compositor.gyp:compositor',
'../ui/display/display.gyp:display',
'../ui/events/events.gyp:events',
'../ui/gfx/gfx.gyp:gfx',
'../ui/gfx/gfx.gyp:gfx_geometry',
'../ui/keyboard/keyboard.gyp:keyboard_with_content',
'../ui/resources/ui_resources.gyp:ui_resources',
'../ui/strings/ui_strings.gyp:ui_strings',
'../ui/views/controls/webview/webview.gyp:webview',
'../ui/views/views.gyp:views',
'../ui/web_dialogs/web_dialogs.gyp:web_dialogs',
'../url/url.gyp:url_lib',
'ash',
'ash_resources.gyp:ash_resources',
'ash_strings.gyp:ash_strings',
],
'defines': [
'ASH_WITH_CONTENT_IMPLEMENTATION',
],
'sources': [
'<@(ash_with_content_sources)',
],
},
{
# GN version: //ash:test_support
'target_name': 'ash_test_support',
'type': 'static_library',
'dependencies': [
'../skia/skia.gyp:skia',
'../testing/gtest.gyp:gtest',
'../ui/accessibility/accessibility.gyp:ax_gen',
'../ui/app_list/app_list.gyp:app_list_test_support',
'../ui/app_list/presenter/app_list_presenter.gyp:app_list_presenter',
'../ui/events/devices/events_devices.gyp:events_devices',
'../ui/views/views.gyp:views_test_support',
'ash',
'ash_resources.gyp:ash_resources',
'ash_test_support_with_content',
],
'sources': [
'<@(ash_test_support_sources)',
],
'conditions': [
['OS=="win"', {
'dependencies': [
'../ui/platform_window/win/win_window.gyp:win_window',
],
}],
],
},
{
# GN version: //ash:test_support_with_content
'target_name': 'ash_test_support_with_content',
'type': 'static_library',
'dependencies': [
'../skia/skia.gyp:skia',
'ash_with_content',
],
'sources': [
'<@(ash_test_support_with_content_sources)',
],
},
{
# GN version: //ash:interactive_ui_test_support
'target_name': 'ash_interactive_ui_test_support',
'type': 'static_library',
'dependencies': [
'../skia/skia.gyp:skia',
'../testing/gtest.gyp:gtest',
'ash',
'ash_test_support',
],
'sources': [
'test/ash_interactive_ui_test_base.cc',
'test/ash_interactive_ui_test_base.h',
],
},
{
# GN version: //ash:ash_unittests
'target_name': 'ash_unittests',
'type': 'executable',
'dependencies': [
'../base/base.gyp:base',
'../base/base.gyp:test_support_base',
'../chrome/chrome_resources.gyp:packed_resources',
'../components/components.gyp:signin_core_account_id',
'../components/components.gyp:user_manager',
'../content/content.gyp:content_browser',
'../content/content_shell_and_tests.gyp:test_support_content',
'../skia/skia.gyp:skia',
'../testing/gmock.gyp:gmock',
'../testing/gtest.gyp:gtest',
'../third_party/icu/icu.gyp:icui18n',
'../third_party/icu/icu.gyp:icuuc',
'../ui/accessibility/accessibility.gyp:accessibility',
'../ui/app_list/app_list.gyp:app_list',
'../ui/app_list/presenter/app_list_presenter.gyp:app_list_presenter',
'../ui/aura/aura.gyp:aura',
'../ui/aura/aura.gyp:aura_test_support',
'../ui/base/ime/ui_base_ime.gyp:ui_base_ime',
'../ui/base/ui_base.gyp:ui_base',
'../ui/base/ui_base.gyp:ui_base_test_support',
'../ui/compositor/compositor.gyp:compositor',
'../ui/compositor/compositor.gyp:compositor_test_support',
'../ui/display/display.gyp:display',
'../ui/events/devices/events_devices.gyp:events_devices',
'../ui/events/events.gyp:events',
'../ui/events/events.gyp:events_test_support',
'../ui/events/events.gyp:gesture_detection',
'../ui/gfx/gfx.gyp:gfx',
'../ui/gfx/gfx.gyp:gfx_geometry',
'../ui/keyboard/keyboard.gyp:keyboard',
'../ui/keyboard/keyboard.gyp:keyboard_with_content',
'../ui/message_center/message_center.gyp:message_center',
'../ui/message_center/message_center.gyp:message_center_test_support',
'../ui/resources/ui_resources.gyp:ui_resources',
'../ui/views/controls/webview/webview_tests.gyp:webview_test_support',
'../ui/views/views.gyp:views',
'../ui/views/views.gyp:views_test_support',
'../ui/web_dialogs/web_dialogs.gyp:web_dialogs_test_support',
'../ui/wm/wm.gyp:wm',
'../ui/wm/wm.gyp:wm_test_support',
'../url/url.gyp:url_lib',
'ash',
'ash_resources.gyp:ash_resources',
'ash_resources.gyp:ash_test_resources_100_percent',
'ash_resources.gyp:ash_test_resources_200_percent',
'ash_strings.gyp:ash_strings',
'ash_strings.gyp:ash_test_strings',
'ash_test_support',
'ash_with_content',
],
'sources': [
'<@(ash_unittests_sources)',
],
'conditions': [
['chromeos==0', {
'sources!': [
# TODO(zork): fix this test to build on Windows. See: crosbug.com/26906
'focus_cycler_unittest.cc',
# All tests for multiple displays: not supported on Windows Ash.
'wm/drag_window_resizer_unittest.cc',
# Can't resize on Windows Ash. http://crbug.com/165962
'autoclick/autoclick_unittest.cc',
'magnifier/magnification_controller_unittest.cc',
'sticky_keys/sticky_keys_overlay_unittest.cc',
'sticky_keys/sticky_keys_unittest.cc',
'system/chromeos/rotation/tray_rotation_lock_unittest.cc',
'virtual_keyboard_controller_unittest.cc',
'wm/maximize_mode/maximize_mode_controller_unittest.cc',
'wm/workspace/workspace_window_resizer_unittest.cc',
],
'sources': [
'<(SHARED_INTERMEDIATE_DIR)/ui/resources/ui_unscaled_resources.rc',
],
# TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
'msvs_disabled_warnings': [ 4267, ],
}],
['chromeos==1', {
'dependencies': [
'../chromeos/chromeos.gyp:chromeos_test_support_without_gmock',
'../chromeos/chromeos.gyp:power_manager_proto',
'../components/components.gyp:quirks',
'../device/bluetooth/bluetooth.gyp:device_bluetooth',
'../ui/display/display.gyp:display_test_support',
'../ui/display/display.gyp:display_test_util',
'../ui/display/display.gyp:display_types',
],
'sources': [
'first_run/first_run_helper_unittest.cc',
],
}, { # else: chromeos!=1
'sources!': [
'accelerators/magnifier_key_scroller_unittest.cc',
'accelerators/spoken_feedback_toggler_unittest.cc',
'display/resolution_notification_controller_unittest.cc',
'touch/touch_transformer_controller_unittest.cc',
'touch/touchscreen_util_unittest.cc',
],
}],
],
},
{
# GN version: //ash:ash_shell_lib
'target_name': 'ash_shell_lib',
'type': 'static_library',
'dependencies': [
'../base/base.gyp:base',
'../base/base.gyp:base_i18n',
'../chrome/chrome_resources.gyp:packed_resources',
'../skia/skia.gyp:skia',
'../third_party/icu/icu.gyp:icui18n',
'../third_party/icu/icu.gyp:icuuc',
'../ui/app_list/app_list.gyp:app_list',
'../ui/app_list/presenter/app_list_presenter.gyp:app_list_presenter',
'../ui/aura/aura.gyp:aura',
'../ui/base/ime/ui_base_ime.gyp:ui_base_ime',
'../ui/base/ui_base.gyp:ui_base',
'../ui/compositor/compositor.gyp:compositor',
'../ui/events/events.gyp:events',
'../ui/gfx/gfx.gyp:gfx',
'../ui/gfx/gfx.gyp:gfx_geometry',
'../ui/keyboard/keyboard.gyp:keyboard',
'../ui/keyboard/keyboard.gyp:keyboard_with_content',
'../ui/message_center/message_center.gyp:message_center',
'../ui/resources/ui_resources.gyp:ui_resources',
'../ui/views/examples/examples.gyp:views_examples_lib',
'../ui/views/examples/examples.gyp:views_examples_with_content_lib',
'../ui/views/views.gyp:views',
'../ui/views/views.gyp:views_test_support',
'ash',
'ash_resources.gyp:ash_resources',
'ash_strings.gyp:ash_strings',
'ash_test_support',
'ash_with_content',
],
'sources': [
'<@(ash_shell_lib_sources)',
],
},
{
# GN version: //ash:ash_shell_lib_with_content
'target_name': 'ash_shell_lib_with_content',
'type': 'static_library',
'dependencies': [
'ash_shell_lib',
'../content/content_shell_and_tests.gyp:content_shell_lib',
'../content/content.gyp:content',
'../skia/skia.gyp:skia',
],
'sources': [
'<@(ash_shell_with_content_lib_sources)',
],
'conditions': [
['OS=="win"', {
'dependencies': [
'../content/content.gyp:sandbox_helper_win',
],
}],
],
},
{
# GN version: //ash:ash_shell_with_content
'target_name': 'ash_shell_with_content',
'type': 'executable',
'dependencies': [
'ash_shell_lib_with_content',
'../components/components.gyp:user_manager',
],
'sources': [
'shell/content/shell_with_content_main.cc',
],
'conditions': [
['OS=="win"', {
'msvs_settings': {
'VCLinkerTool': {
'SubSystem': '2', # Set /SUBSYSTEM:WINDOWS
},
},
'dependencies': [
'../sandbox/sandbox.gyp:sandbox',
],
}],
['chromeos==1', {
'dependencies': [
'../device/bluetooth/bluetooth.gyp:device_bluetooth',
],
}],
],
},
],
'conditions': [
['test_isolation_mode != "noop"', {
'targets': [
{
'target_name': 'ash_unittests_run',
'type': 'none',
'dependencies': [
'ash_unittests',
],
'includes': [
'../build/isolate.gypi',
],
'sources': [
'ash_unittests.isolate',
],
'conditions': [
['use_x11==1',
{
'dependencies': [
'../tools/xdisplaycheck/xdisplaycheck.gyp:xdisplaycheck',
],
}
],
],
},
],
}],
],
}
|
##############################################################################
#
# attachment_large_object module for OpenERP,
# Copyright (C) 2014 Anybox (http://anybox.fr) Georges Racinet
#
# This file is a part of attachment_large_object
#
# anybox_perf is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# anybox_perf is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
{
"name": "attachment_large_object",
"version": "13.0.1.0.0",
"category": "Extra Tools",
"summary": """Provides a storage option for attachments as PostgreSQL large objects.
""",
"author": "Anybox",
"website": "anybox.fr",
"depends": ["base"],
"test": [],
"installable": False,
"application": False,
"auto_install": False,
"license": "AGPL-3",
}
|
class Ksztalty:
# definicja konstruktora
def __init__(self, x, y):
# deklarujemy atrybuty
# self wskazuje że chodzi o zmienne właśnie definiowanej klasy
self.x=x
self.y=y
self.opis = "To będzie klasa dla ogólnych kształtów"
def pole(self):
return self.x * self.y
def obwod(self):
return 2 * self.x + 2 * self.y
def dodaj_opis(self, text):
self.opis = text
def skalowanie(self, czynnik):
self.x = self.x * czynnik
self.x = self.y * czynnik
class Kwadrat(Ksztalty):
def __init__(self, x):
self.x = x
self.y = x
def __add__(self, other):
return Kwadrat(self.x + other.x)
k1 = Kwadrat(4)
k2 = Kwadrat(16)
print(k1.x)
print(k2.x)
k3 = k1 + k2
print(k3.x)
|
templates = {
# HTTP Error
'htmlError':
"""<html>
<head></head>
<body>
<h2>{}</h2>
</body>
</html>""",
# XML DISCOVER
# with help from https://github.com/ZeWaren/python-upnp-ssdp-example
'xmlDiscover':
"""<root xmlns="urn:schemas-upnp-org:device-1-0">
<specVersion>
<major>1</major>
<minor>0</minor>
</specVersion>
<device>
<deviceType>urn:plex-tv:device:Media:1</deviceType>
<friendlyName>{0}</friendlyName>
<manufacturer>{0}</manufacturer>
<manufacturerURL>https://github.com/tgorgdotcom/locast2plex</manufacturerURL>
<modelName>{0}</modelName>
<modelNumber>{1}</modelNumber>
<modelDescription>{0}</modelDescription>
<modelURL>https://github.com/tgorgdotcom/locast2plex</modelURL>
<UDN>uuid:{2}</UDN>
<serviceList>
<service>
<URLBase>http://{3}</URLBase>
<serviceType>urn:plex-tv:service:MediaGrabber:1</serviceType>
<serviceId>urn:plex-tv:serviceId:MediaGrabber</serviceId>
</service>
</serviceList>
</device>
</root>""",
# XML DISCOVER OLD
# with help from https://github.com/ZeWaren/python-upnp-ssdp-example
'xmlDiscoverOld':
"""<root xmlns="urn:schemas-upnp-org:device-1-0">
<specVersion>
<major>1</major>
<minor>0</minor>
</specVersion>
<device>
<deviceType>urn:schemas-upnp-org:device:MediaServer:1</deviceType>
<friendlyName>{0}</friendlyName>
<manufacturer>{0}</manufacturer>
<manufacturerURL>https://github.com/tgorgdotcom/locast2plex</manufacturerURL>
<modelName>{0}</modelName>
<modelNumber>{1}</modelNumber>
<serialNumber/>
<UDN>uuid:{2}</UDN>
</device>
<URLBase>http://{3}</URLBase>
</root>""",
'xmlLineupItem':
"""<Program>
<GuideNumber>{}</GuideNumber>
<GuideName>{}</GuideName>
<URL>http://{}</URL>
</Program>""",
'xmlRmgIdentification':
"""<MediaContainer>
<MediaGrabber identifier="tv.plex.grabbers.locast2plex" title="{0}" protocols="livetv" />
</MediaContainer>""",
'xmlRmgDeviceDiscover':
"""<MediaContainer size="1">
<Device
key="{0}"
make="{1}"
model="{1}"
modelNumber="{2}"
protocol="livetv"
status="alive"
title="{1}"
tuners="{3}"
uri="http://{4}"
uuid="device://tv.plex.grabbers.locast2plex/{0}"
interface='network' />
</MediaContainer>""",
'xmlRmgDeviceIdentity':
"""<MediaContainer size="1">
<Device
key="{0}"
make="{1}"
model="{1}"
modelNumber="{2}"
protocol="livetv"
status="alive"
title="{1} ({4})"
tuners="{3}"
uri="http://{4}"
uuid="device://tv.plex.grabbers.locast2plex/{0}">
{5}
</Device>
</MediaContainer>""",
'xmlRmgTunerStreaming':
"""<Tuner
index="{0}"
status="streaming"
channelIdentifier="id://{1}"
lock="1"
signalStrength="100"
signalQuality="100" />""",
'xmlRmgTunerIdle':
"""<Tuner index="{0}" status="idle" />""",
'xmlRmgTunerScanning':
"""<Tuner
index="{0}"
status="scanning"
progress="50"
channelsFound="0" />""",
'xmlRmgDeviceChannels':
"""<MediaContainer size="{0}">
{1}
</MediaContainer>""",
'xmlRmgDeviceChannelItem':
"""<Channel
drm="0"
channelIdentifier="id://{0}"
name="{1}"
origin="Locast2Plex"
number="{0}"
type="tv" />""",
'xmlRmgScanProviders':
"""<MediaContainer size="1" simultaneousScanners="0">
<Scanner type="atsc">
<Setting
id="provider"
enumValues="1:Locast ({0})"/>
</Scanner>
</MediaContainer>""",
'xmlRmgScanStatus':
"""<MediaContainer status="0" message="Scanning..." />""",
# mostly pulled from tellytv
# NOTE: double curly brace escaped to prevent format from breaking
'jsonDiscover':
"""{{
"FriendlyName": "{0}",
"Manufacturer": "{0}",
"ModelNumber": "{1}",
"FirmwareName": "{2}",
"TunerCount": {3},
"FirmwareVersion": "{4}",
"DeviceID": "{5}",
"DeviceAuth": "locast2plex",
"BaseURL": "http://{6}",
"LineupURL": "http://{6}/lineup.json"
}}""",
# mostly pulled from tellytv
# Don't need curly braces to escape here
'jsonLineupStatus':
"""{
"ScanInProgress": true,
"Progress": 50,
"Found": 0
}""",
# mostly pulled from tellytv
# Don't need curly brece escape here
'jsonLineupComplete':
"""{
"ScanInProgress": false,
"ScanPossible": true,
"Source": "Antenna",
"SourceList": ["Antenna"]
}""",
'jsonLineupItem':
"""{{
"GuideNumber": "{}",
"GuideName": "{}",
"URL": "http://{}"
}}"""
}
|
class Entity:
def __init__(self, start, end, text, entity_type, confidence=1):
"""
:param start: start position of the entity in the source text
:param end: end position of the entity in the source text
:param text: entity text
:param entity_type: type of the entity
:param confidence: probability or confidence (range [0, 1])
"""
self.start = start
self.end = end
self.text = text
self.entity_type = entity_type
self.confidence = confidence
def __str__(self, ):
return 'Mention: {}, Class: {}, Start: {}, End: {}, Confidence: {:.2f}'.\
format(self.text, self.entity_type, self.start, self.end, self.confidence)
|
file = open('input.txt', 'r')
inputCodes = file.readline().split(',')
def processCode(codeIndex):
result = 0
if (inputCodes[codeIndex] == '1'):
result = int(inputCodes[int(inputCodes[codeIndex+1])]) + int(inputCodes[int(inputCodes[codeIndex+2])])
inputCodes[int(inputCodes[codeIndex+3])] = str(result)
processCode(codeIndex+4)
elif (inputCodes[codeIndex] == '2'):
result = int(inputCodes[int(inputCodes[codeIndex+1])]) * int(inputCodes[int(inputCodes[codeIndex+2])])
inputCodes[int(inputCodes[codeIndex+3])] = str(result)
processCode(codeIndex+4)
elif (inputCodes[codeIndex] == '99'):
print(inputCodes[0])
else:
print(f"Error invalid code at position {codeIndex}: {inputCodes[codeIndex]}")
processCode(0) |
expected_output = {
"vlan_id": {
"100": {"access_map_tag": "karim"},
"3": {"access_map_tag": "mordred"},
"15": {"access_map_tag": "mordred"},
"5": {"access_map_tag": "mordred"},
}
}
|
class ASCReader:
def __init__ (self, fileName):
self.FileName = fileName
self.Options = self.parse_config ( )
self.Time, self.Amplitude = self.parse_data();
def getParameterByName (self, Name ):
return self.Options[Name]
def getTime ( self, us=False ):
if us:
return self.Time*1e6
else:
return self.Time
def getData ( self ):
return self.Amplitude
def getGain ( self, Linear=False ):
if Linear:
return 10 ** ( float( self.Options['Gain'] ) / -20)
else:
return float( self.Options['Gain'] )
def parse_data ( self ):
data = np.loadtxt( self.FileName, skiprows=72, encoding='ISO-8859-1' )
dt = float ( self.Options ['TimeBase'] ) * 1e-6
dtO = float ( self.Options ['TriggerDelay'] ) *1e-6
amp = 100 * data / 2048
t = np.arange ( 0, (data.shape[0]*dt), dt) + dtO
return t, amp
def parse_config(self):
COMMENT_CHAR = '#'
OPTION_CHAR = ':'
options = {}
f = open(self.FileName, encoding='latin9')
for line in f:
# First, remove comments:
if COMMENT_CHAR in line:
# split on comment char, keep only the part before
line, comment = line.split(COMMENT_CHAR, 1)
# Second, find lines with an option=value:
if OPTION_CHAR in line:
# split on option char:
option, value = line.split(OPTION_CHAR, 1)
# strip spaces:
strOption = "".join(option)
if '[' in strOption:
option, ba = strOption.split ( '[', 1 )
option = option.strip()
# print ( option )
if option == 'Bemerkungen':
param_list = value.split(',')
for opt in param_list:
#print ( opt.strip() )
if '=' in opt:
param, val = "".join(opt).split('=', 1)
options[param.strip() ] = val.strip()
#print ('%s = %s' % (param, val ) )
value = value.strip()
# store in dictionary:
options[option] = value
f.close()
return options
|
animals = ['bear', 'python3.6', 'peacock', 'kangaroo', 'whale', 'platypus']
bear = animals[0]
python = animals[1]
peacock = animals[2]
kangaroo = animals[3]
whale = animals[4]
platypus = animals[5]
print(f"The first animal is at 0 and is a {bear}")
print(f"The third animal is at 2 and is a {peacock}")
print(f"The first animal is {bear}")
print(f"The animal at 3 is {peacock}")
print(f"The fifth animal is {whale}")
print(f"The animal at 2 is {python}")
print(f"The sixth animal is {platypus}")
print(f"The animal at 4 is {kangaroo}")
|
"""
Problem Link: https://binarysearch.io/problems/Second-Place
"""
# class Tree:
# def __init__(self, val, left=None, right=None):
# self.val = val
# self.left = left
# self.right = right
class Solution:
def solve(self, root):
# Write your code here
if root is None:
return None
nodes = []
nodes.append(root)
count = 0
prev = 0
now = 0
while nodes:
new = []
flag = True
for node in nodes:
if flag and (not node.left) and (not node.right):
prev = now
now = count
flag = False
if node.left:
new.append(node.left)
if node.right:
new.append(node.right)
nodes = new
count += 1
return prev
|
"""
Dump attributes of an object
From: https://blender.stackexchange.com/questions/1879/is-it-possible-to-dump-an-objects-properties-and-methods
"""
def dumpAttr(obj):
"""
Dump attributes of the object
"""
for attr in dir(obj):
if hasattr( obj, attr ):
print(f'obj.{attr} = {getattr(obj, attr)}')
|
def multiply(x, y):
'''
Multiply two numbers x and y
'''
print('multiplying x: {} * y: {}'.format(x, y))
|
for i in range(50,81):
if i%2==0:
print(i)
else:
break |
class TestAccomodation:
def test_list_accomodation(self, client):
response = client.get('/accomodation')
assert response.status_code == 200
def test_update_accomodation(client):
pass
|
class Edge:
def __init__(self, u, v, w):
self.u = u
self.v = v
self.w = w
def __eq__(self, edge):
if self.u.id == edge.u.id and self.v.id == edge.v.id:
return True
return False
def __ge__(self, v):
return True if self.w > v.w else False
def __lt__(self, v):
return True if self.w < v.w else False
@staticmethod
def weight(edge):
return edge.w
|
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
# --------------------------------------------------------------------------
"""This module defines errors that may be raised from a transport"""
class ConnectionFailedError(Exception):
"""
Connection failed to be established
"""
pass
class ConnectionDroppedError(Exception):
"""
Previously established connection was dropped
"""
pass
class NoConnectionError(Exception):
"""
There is no connection
"""
class UnauthorizedError(Exception):
"""
Authorization was rejected
"""
pass
class ProtocolClientError(Exception):
"""
Error returned from protocol client library
"""
pass
class TlsExchangeAuthError(Exception):
"""
Error returned when transport layer exchanges
result in a SSLCertVerification error.
"""
pass
class ProtocolProxyError(Exception):
"""
All proxy-related errors.
TODO : Not sure what to name it here. There is a class called Proxy Error already in Pysocks
"""
pass
|
description = 'setup for the status monitor'
group = 'special'
instrs = sorted(['BioDiff', 'DNS', 'Panda', 'JNSE', 'KWS1', 'KWS2', 'KWS3',
'Poli', 'Maria', 'Treff', 'Spheres'])
blocks = []
plotfields = []
for instr in instrs:
key = instr.lower() + '_cooling_'
fields = [Field(name='T_in', dev=key + 't_in'),
Field(name='T_out', dev=key + 't_out'),
Field(name='P_in', dev=key + 'p_in'),
Field(name='P_out', dev=key + 'p_out'),
Field(name='flow_in', dev=key + 'flow_in'),
Field(name='flow_out', dev=key + 'flow_out'),
Field(name='power', dev=key + 'power')]
if instr == 'JNSE':
del fields[-2]
blocks.append(Block('Cooling %s' % instr, [BlockRow(*fields)]))
plotfields.append(Field(plot='temp', name=instr + ' in', key=key + 't_in/value'))
plotfields.append(Field(plot='temp', name=instr + ' out', key=key + 't_out/value'))
plotfields[0]._options['plotwindow'] = 24*3600
plotfields[0]._options['width'] = 50
plotfields[0]._options['height'] = 40
plot = Block('Temperatures', [
BlockRow(*plotfields)
])
layout = [
Row(Column(*blocks), Column(plot)),
]
devices = dict(
Monitor = device('nicos.services.monitor.html.Monitor',
title = 'JCNS Memograph monitor',
loglevel = 'info',
# local cache!
cache = 'jcnsmon.jcns.frm2:14870',
font = 'Droid Sans',
valuefont = 'Droid Sans Mono',
fontsize = 14,
padding = 3,
layout = layout,
# expectmaster = False,
filename = '/WebServer/jcnswww.jcns.frm2/httpdocs/monitor/memograph.html',
noexpired = False,
),
)
|
x = int(input("enter first number\n"))
if(x>=0):
print(x,"is positive")
else:
print(x,"is negative")
|
salario = float (input ('Digite seu salário: R$'))
if salario > 1250:
print ('Seu salário com aumento ficou R${:.2f}'.format(salario + (salario * 10 / 100)))
else:
print ('Seu salário com aumento ficou R${:.2f}'.format(salario + (salario * 15 / 100)))
|
# -*- coding: utf-8 -*-
"""Top-level package for Training Logger."""
__author__ = """Fermin Hernandez Gil"""
__email__ = 'fermin.hdez@gmail.com'
__version__ = '0.1.0'
|
def reward_function(params):
"""
Reward function focused on making the agent to stay inside the two borders of the track while increasing speed
having even more reward than inside_lane_fast
"""
# Read input parameters
all_wheels_on_track = params['all_wheels_on_track']
distance_from_center = params['distance_from_center']
track_width = params['track_width']
speed = params['speed']
is_offtrack = params['is_offtrack']
# Give a very low reward by default
reward = 1e-3
# Give a high reward if no wheels go off the track and
# the car is somewhere in between the track borders
if all_wheels_on_track and (0.5 * track_width - distance_from_center) >= 0.05:
reward = 5.0
if speed < 0.5:
reward += 0
elif speed < 1:
reward += 2
elif speed < 2:
reward += 5
elif speed < 3:
reward += 8
else:
reward += 10
if is_offtrack:
reward = 1e-3 if reward < 1 else reward / 2
# Always return a float value
return reward
|
config = {
'metadata_version': '1.0',
'module_name': 'nifake',
'module_version': '1.1.1.dev0',
'c_function_prefix': 'niFake_',
'driver_name': 'NI-FAKE',
'session_class_description': 'An NI-FAKE session to a fake MI driver whose sole purpose is to test nimi-python code generation',
'session_handle_parameter_name': 'vi',
'library_info':
{
'Windows': {
'32bit': {'name': 'nifake_32.dll', 'type': 'windll'},
'64bit': {'name': 'nifake_64.dll', 'type': 'cdll'},
},
'Linux': {
'64bit': {'name': 'libnifake.so', 'type': 'cdll'},
},
},
'context_manager_name': {
'task': 'acquisition',
'initiate_function': 'Initiate',
'abort_function': 'Abort',
},
'init_function': 'InitWithOptions',
'close_function': 'close',
'custom_types': [
{'file_name': 'custom_struct', 'python_name': 'CustomStruct', 'ctypes_type': 'custom_struct', },
],
'enum_whitelist_suffix': ['_POINT_FIVE'],
'repeated_capabilities': [
{'python_name': 'channels', 'prefix': '', },
],
}
|
# Copyright (C) 2010, 2011 Sebastian Thiel (byronimo@gmail.com) and contributors
#
# This module is part of GitDB and is released under
# the New BSD License: http://www.opensource.org/licenses/bsd-license.php
"""Module containing information about types known to the database"""
str_blob_type = b'blob'
str_commit_type = b'commit'
str_tree_type = b'tree'
str_tag_type = b'tag'
|
palavra = input("Digite uma palavra: ")
#concatenar
print(palavra + 'oi')
#tamanho
print(len(palavra))
#primeiro caractere
print(f'Primeiro caractere da string {palavra}: {palavra[0]}')
#ultimo caractere
print(f'Ultimo caractere da string {palavra}: {palavra[-1]}')
# 3 primeiros elementos da strings
print(f'Três primeiros elementos da string {palavra}: {palavra[:3]}')
# 3 ultimos elementos da strings
print(f'Três ultimos elementos da string {palavra}: {palavra[-3:]}') |
n = 4
C=[[10,20,12,5],[3,14,9,1],[13,8,6,9],[7,15,6,9]]
X=[[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0]]
C1=[[10,20,12,5],[3,14,9,1],[13,8,6,9],[7,15,6,9]]
min_element=10**5
for i in range(n):
for j in range(n):
if C1[i][j]<min_element:
min_element=C1[i][j]
for j in range(n):
C1[i][j]=C1[i][j]-min_element
min_element=10**5
min_element=10**5
for j in range(n):
for i in range(n):
if C1[i][j]<min_element:
min_element=C1[i][j]
for i in range(n):
C1[i][j]=C1[i][j]-min_element
min_element=10**5
marked_zeros=[[n]*2]*n
scratched_zeros=[[n]*2]*n
double_covered_elements=[[n]*2]*n
covered_elements=[[n]*2]*((n*n)-n)
uncovered_elements=[[n]*2]*((n*n)-n)
control_array=[[n]*2]*n
horizontal_lines=[n]*n
vertical_lines=[n]*n
number_marked_zeros=0
while True:
for i in range(n):
if marked_zeros[i][0]!=n:
number_marked_zeros=number_marked_zeros+1
j_marked_zeros=n
i_marked_zeros=n
k=0
m=0
counter=0
complects_zeros_in_rows=0
complects_zeros_in_column=0
p=0
q=0
r=0
s=0
if number_marked_zeros<n:
j_marked_zeros=n
i_marked_zeros=n
k=0
m=0
for i in range(n):
for j in range(n):
if C1[i][j]==0 and counter==0 and i!=i_marked_zeros and j!=j_marked_zeros:
marked_zeros[k]=[i,j]
k=k+1
counter=counter+1
i_marked_zeros=i
j_marked_zeros=j
if C1[i][j]==0 and counter!=0 and i==i_marked_zeros and j!=j_marked_zeros:
scratched_zeros[m]=[i,j]
m=m+1
if C1[i][j]==0 and counter!=0 and i!=i_marked_zeros and j==j_marked_zeros:
scratched_zeros[m]=[i,j]
m=m+1
if C1[i][j]==0 and counter==0 and i==i_marked_zeros and j!=j_marked_zeros:
scratched_zeros[m]=[i,j]
m=m+1
if C1[i][j]==0 and counter==0 and i!=i_marked_zeros and j==j_marked_zeros:
scratched_zeros[m]=[i,j]
m=m+1
counter=0
if i==n-1:
control_array[0]=marked_zeros[k-1]
marked_zeros[k-1]=scratched_zeros[m-1]
scratched_zeros[m-1]=control_array[0]
for i in range(n):
if marked_zeros[i][0]==scratched_zeros[i][0] and marked_zeros[i][0]!=n and scratched_zeros[i][0]!=n:
complects_zeros_in_rows=complects_zeros_in_rows +1
horizontal_lines[p]=marked_zeros[i][0]
p=p+1
if marked_zeros[i][1]==scratched_zeros[i][1] and marked_zeros[i][1]!=n and scratched_zeros[i][1]!=n:
complects_zeros_in_colunm=complects_zeros_in_column+1
vertical_lines[q]=marked_zeros[i][1]
q=q+1
for i in range(n):
for j in range(n):
if horizontal_lines[j]!=n and vertical_lines[i]!=n:
double_covered_elements[j]=[horizontal_lines[j],vertical_lines[i]]
for i in range(n):
if r<horizontal_lines[0]:
covered_elements[i]=[i,vertical_lines[0]]
r=r+1
for i in range(n):
for j in range(n):
if j<vertical_lines[0] and i==horizontal_lines[0]:
covered_elements[r]=[i,j]
r=r+1
if j<vertical_lines[0] and i==horizontal_lines[1]:
covered_elements[r]=[i,j]
r=r+1
for i in range(n):
for j in range(n):
if[i,j]not in double_covered_elements and [i,j] not in covered_elements:
uncovered_elements[s]=[i,j]
s=s+1
min_element=10**5
for i in range(n):
for j in range(n):
if [i,j] in uncovered_elements:
if C1[i][j]<min_element:
min_element=C1[i][j]
for i in range(n):
for j in range(n):
if [i,j]in uncovered_elements:
C1[i][j]=C1[i][j]-min_element
if [i,j] in double_covered_elements:
C1[i][j]=C1[i][j]+min_element
else:
break
F=0
for i in range(n):
for j in range(n):
if i==marked_zeros[i][0] and j==marked_zeros[i][1]:
X[i][j]=1
for i in range(n):
for j in range(n):
if i==marked_zeros[i][0] and j==marked_zeros[i][0]:
F=F+C[i][j]
print(C1)
print(X)
print(F)
|
power = {'BUSES': {'Area': 1.33155,
'Bus/Area': 1.33155,
'Bus/Gate Leakage': 0.00662954,
'Bus/Peak Dynamic': 0.0,
'Bus/Runtime Dynamic': 0.0,
'Bus/Subthreshold Leakage': 0.0691322,
'Bus/Subthreshold Leakage with power gating': 0.0259246,
'Gate Leakage': 0.00662954,
'Peak Dynamic': 0.0,
'Runtime Dynamic': 0.0,
'Subthreshold Leakage': 0.0691322,
'Subthreshold Leakage with power gating': 0.0259246},
'Core': [{'Area': 32.6082,
'Execution Unit/Area': 8.2042,
'Execution Unit/Complex ALUs/Area': 0.235435,
'Execution Unit/Complex ALUs/Gate Leakage': 0.0132646,
'Execution Unit/Complex ALUs/Peak Dynamic': 0.113472,
'Execution Unit/Complex ALUs/Runtime Dynamic': 0.291815,
'Execution Unit/Complex ALUs/Subthreshold Leakage': 0.20111,
'Execution Unit/Complex ALUs/Subthreshold Leakage with power gating': 0.0754163,
'Execution Unit/Floating Point Units/Area': 4.6585,
'Execution Unit/Floating Point Units/Gate Leakage': 0.0656156,
'Execution Unit/Floating Point Units/Peak Dynamic': 0.692681,
'Execution Unit/Floating Point Units/Runtime Dynamic': 0.304033,
'Execution Unit/Floating Point Units/Subthreshold Leakage': 0.994829,
'Execution Unit/Floating Point Units/Subthreshold Leakage with power gating': 0.373061,
'Execution Unit/Gate Leakage': 0.122718,
'Execution Unit/Instruction Scheduler/Area': 2.17927,
'Execution Unit/Instruction Scheduler/FP Instruction Window/Area': 0.328073,
'Execution Unit/Instruction Scheduler/FP Instruction Window/Gate Leakage': 0.00115349,
'Execution Unit/Instruction Scheduler/FP Instruction Window/Peak Dynamic': 1.20978,
'Execution Unit/Instruction Scheduler/FP Instruction Window/Runtime Dynamic': 0.367774,
'Execution Unit/Instruction Scheduler/FP Instruction Window/Subthreshold Leakage': 0.017004,
'Execution Unit/Instruction Scheduler/FP Instruction Window/Subthreshold Leakage with power gating': 0.00962066,
'Execution Unit/Instruction Scheduler/Gate Leakage': 0.00730101,
'Execution Unit/Instruction Scheduler/Instruction Window/Area': 1.00996,
'Execution Unit/Instruction Scheduler/Instruction Window/Gate Leakage': 0.00529112,
'Execution Unit/Instruction Scheduler/Instruction Window/Peak Dynamic': 2.07911,
'Execution Unit/Instruction Scheduler/Instruction Window/Runtime Dynamic': 0.636852,
'Execution Unit/Instruction Scheduler/Instruction Window/Subthreshold Leakage': 0.0800117,
'Execution Unit/Instruction Scheduler/Instruction Window/Subthreshold Leakage with power gating': 0.0455351,
'Execution Unit/Instruction Scheduler/Peak Dynamic': 4.84781,
'Execution Unit/Instruction Scheduler/ROB/Area': 0.841232,
'Execution Unit/Instruction Scheduler/ROB/Gate Leakage': 0.000856399,
'Execution Unit/Instruction Scheduler/ROB/Peak Dynamic': 1.55892,
'Execution Unit/Instruction Scheduler/ROB/Runtime Dynamic': 0.365253,
'Execution Unit/Instruction Scheduler/ROB/Subthreshold Leakage': 0.0178624,
'Execution Unit/Instruction Scheduler/ROB/Subthreshold Leakage with power gating': 0.00897339,
'Execution Unit/Instruction Scheduler/Runtime Dynamic': 1.36988,
'Execution Unit/Instruction Scheduler/Subthreshold Leakage': 0.114878,
'Execution Unit/Instruction Scheduler/Subthreshold Leakage with power gating': 0.0641291,
'Execution Unit/Integer ALUs/Area': 0.47087,
'Execution Unit/Integer ALUs/Gate Leakage': 0.0265291,
'Execution Unit/Integer ALUs/Peak Dynamic': 0.257333,
'Execution Unit/Integer ALUs/Runtime Dynamic': 0.101344,
'Execution Unit/Integer ALUs/Subthreshold Leakage': 0.40222,
'Execution Unit/Integer ALUs/Subthreshold Leakage with power gating': 0.150833,
'Execution Unit/Peak Dynamic': 6.5717,
'Execution Unit/Register Files/Area': 0.570804,
'Execution Unit/Register Files/Floating Point RF/Area': 0.208131,
'Execution Unit/Register Files/Floating Point RF/Gate Leakage': 0.000232788,
'Execution Unit/Register Files/Floating Point RF/Peak Dynamic': 0.130862,
'Execution Unit/Register Files/Floating Point RF/Runtime Dynamic': 0.0133321,
'Execution Unit/Register Files/Floating Point RF/Subthreshold Leakage': 0.00399698,
'Execution Unit/Register Files/Floating Point RF/Subthreshold Leakage with power gating': 0.00176968,
'Execution Unit/Register Files/Gate Leakage': 0.000622708,
'Execution Unit/Register Files/Integer RF/Area': 0.362673,
'Execution Unit/Register Files/Integer RF/Gate Leakage': 0.00038992,
'Execution Unit/Register Files/Integer RF/Peak Dynamic': 0.135642,
'Execution Unit/Register Files/Integer RF/Runtime Dynamic': 0.0985991,
'Execution Unit/Register Files/Integer RF/Subthreshold Leakage': 0.00614175,
'Execution Unit/Register Files/Integer RF/Subthreshold Leakage with power gating': 0.00246675,
'Execution Unit/Register Files/Peak Dynamic': 0.266504,
'Execution Unit/Register Files/Runtime Dynamic': 0.111931,
'Execution Unit/Register Files/Subthreshold Leakage': 0.0101387,
'Execution Unit/Register Files/Subthreshold Leakage with power gating': 0.00423643,
'Execution Unit/Results Broadcast Bus/Area Overhead': 0.0442632,
'Execution Unit/Results Broadcast Bus/Gate Leakage': 0.00607074,
'Execution Unit/Results Broadcast Bus/Peak Dynamic': 0.358853,
'Execution Unit/Results Broadcast Bus/Runtime Dynamic': 0.918468,
'Execution Unit/Results Broadcast Bus/Subthreshold Leakage': 0.0920413,
'Execution Unit/Results Broadcast Bus/Subthreshold Leakage with power gating': 0.0345155,
'Execution Unit/Runtime Dynamic': 3.09747,
'Execution Unit/Subthreshold Leakage': 1.83518,
'Execution Unit/Subthreshold Leakage with power gating': 0.709678,
'Gate Leakage': 0.372997,
'Instruction Fetch Unit/Area': 5.86007,
'Instruction Fetch Unit/Branch Predictor/Area': 0.138516,
'Instruction Fetch Unit/Branch Predictor/Chooser/Area': 0.0435221,
'Instruction Fetch Unit/Branch Predictor/Chooser/Gate Leakage': 0.000278362,
'Instruction Fetch Unit/Branch Predictor/Chooser/Peak Dynamic': 0.0168831,
'Instruction Fetch Unit/Branch Predictor/Chooser/Runtime Dynamic': 0.00133722,
'Instruction Fetch Unit/Branch Predictor/Chooser/Subthreshold Leakage': 0.00759719,
'Instruction Fetch Unit/Branch Predictor/Chooser/Subthreshold Leakage with power gating': 0.0039236,
'Instruction Fetch Unit/Branch Predictor/Gate Leakage': 0.000757657,
'Instruction Fetch Unit/Branch Predictor/Global Predictor/Area': 0.0435221,
'Instruction Fetch Unit/Branch Predictor/Global Predictor/Gate Leakage': 0.000278362,
'Instruction Fetch Unit/Branch Predictor/Global Predictor/Peak Dynamic': 0.0168831,
'Instruction Fetch Unit/Branch Predictor/Global Predictor/Runtime Dynamic': 0.00133722,
'Instruction Fetch Unit/Branch Predictor/Global Predictor/Subthreshold Leakage': 0.00759719,
'Instruction Fetch Unit/Branch Predictor/Global Predictor/Subthreshold Leakage with power gating': 0.0039236,
'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Area': 0.0257064,
'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Gate Leakage': 0.000154548,
'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Peak Dynamic': 0.0142575,
'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Runtime Dynamic': 0.00117013,
'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Subthreshold Leakage': 0.00384344,
'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Subthreshold Leakage with power gating': 0.00198631,
'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Area': 0.0151917,
'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Gate Leakage': 8.00196e-05,
'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Peak Dynamic': 0.00527447,
'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Runtime Dynamic': 0.000455941,
'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Subthreshold Leakage': 0.00181347,
'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Subthreshold Leakage with power gating': 0.000957045,
'Instruction Fetch Unit/Branch Predictor/Peak Dynamic': 0.0597838,
'Instruction Fetch Unit/Branch Predictor/RAS/Area': 0.0105732,
'Instruction Fetch Unit/Branch Predictor/RAS/Gate Leakage': 4.63858e-05,
'Instruction Fetch Unit/Branch Predictor/RAS/Peak Dynamic': 0.0117602,
'Instruction Fetch Unit/Branch Predictor/RAS/Runtime Dynamic': 0.00141638,
'Instruction Fetch Unit/Branch Predictor/RAS/Subthreshold Leakage': 0.000932505,
'Instruction Fetch Unit/Branch Predictor/RAS/Subthreshold Leakage with power gating': 0.000494733,
'Instruction Fetch Unit/Branch Predictor/Runtime Dynamic': 0.00526096,
'Instruction Fetch Unit/Branch Predictor/Subthreshold Leakage': 0.0199703,
'Instruction Fetch Unit/Branch Predictor/Subthreshold Leakage with power gating': 0.0103282,
'Instruction Fetch Unit/Branch Target Buffer/Area': 0.64954,
'Instruction Fetch Unit/Branch Target Buffer/Gate Leakage': 0.00272758,
'Instruction Fetch Unit/Branch Target Buffer/Peak Dynamic': 0.177867,
'Instruction Fetch Unit/Branch Target Buffer/Runtime Dynamic': 0.0126276,
'Instruction Fetch Unit/Branch Target Buffer/Subthreshold Leakage': 0.0811682,
'Instruction Fetch Unit/Branch Target Buffer/Subthreshold Leakage with power gating': 0.0435357,
'Instruction Fetch Unit/Gate Leakage': 0.0590479,
'Instruction Fetch Unit/Instruction Buffer/Area': 0.0226323,
'Instruction Fetch Unit/Instruction Buffer/Gate Leakage': 6.83558e-05,
'Instruction Fetch Unit/Instruction Buffer/Peak Dynamic': 0.606827,
'Instruction Fetch Unit/Instruction Buffer/Runtime Dynamic': 0.0947859,
'Instruction Fetch Unit/Instruction Buffer/Subthreshold Leakage': 0.00151885,
'Instruction Fetch Unit/Instruction Buffer/Subthreshold Leakage with power gating': 0.000701682,
'Instruction Fetch Unit/Instruction Cache/Area': 3.14635,
'Instruction Fetch Unit/Instruction Cache/Gate Leakage': 0.029931,
'Instruction Fetch Unit/Instruction Cache/Peak Dynamic': 6.02919,
'Instruction Fetch Unit/Instruction Cache/Runtime Dynamic': 0.266465,
'Instruction Fetch Unit/Instruction Cache/Subthreshold Leakage': 0.367022,
'Instruction Fetch Unit/Instruction Cache/Subthreshold Leakage with power gating': 0.180386,
'Instruction Fetch Unit/Instruction Decoder/Area': 1.85799,
'Instruction Fetch Unit/Instruction Decoder/Gate Leakage': 0.0222493,
'Instruction Fetch Unit/Instruction Decoder/Peak Dynamic': 1.37404,
'Instruction Fetch Unit/Instruction Decoder/Runtime Dynamic': 0.321935,
'Instruction Fetch Unit/Instruction Decoder/Subthreshold Leakage': 0.442943,
'Instruction Fetch Unit/Instruction Decoder/Subthreshold Leakage with power gating': 0.166104,
'Instruction Fetch Unit/Peak Dynamic': 8.54479,
'Instruction Fetch Unit/Runtime Dynamic': 0.701075,
'Instruction Fetch Unit/Subthreshold Leakage': 0.932587,
'Instruction Fetch Unit/Subthreshold Leakage with power gating': 0.408542,
'L2/Area': 4.53318,
'L2/Gate Leakage': 0.015464,
'L2/Peak Dynamic': 0.0784516,
'L2/Runtime Dynamic': 0.0170574,
'L2/Subthreshold Leakage': 0.834142,
'L2/Subthreshold Leakage with power gating': 0.401066,
'Load Store Unit/Area': 8.80969,
'Load Store Unit/Data Cache/Area': 6.84535,
'Load Store Unit/Data Cache/Gate Leakage': 0.0279261,
'Load Store Unit/Data Cache/Peak Dynamic': 4.87526,
'Load Store Unit/Data Cache/Runtime Dynamic': 1.76986,
'Load Store Unit/Data Cache/Subthreshold Leakage': 0.527675,
'Load Store Unit/Data Cache/Subthreshold Leakage with power gating': 0.25085,
'Load Store Unit/Gate Leakage': 0.0351387,
'Load Store Unit/LoadQ/Area': 0.0836782,
'Load Store Unit/LoadQ/Gate Leakage': 0.00059896,
'Load Store Unit/LoadQ/Peak Dynamic': 0.117703,
'Load Store Unit/LoadQ/Runtime Dynamic': 0.117702,
'Load Store Unit/LoadQ/Subthreshold Leakage': 0.00941961,
'Load Store Unit/LoadQ/Subthreshold Leakage with power gating': 0.00536918,
'Load Store Unit/Peak Dynamic': 5.43334,
'Load Store Unit/Runtime Dynamic': 2.46803,
'Load Store Unit/StoreQ/Area': 0.322079,
'Load Store Unit/StoreQ/Gate Leakage': 0.00329971,
'Load Store Unit/StoreQ/Peak Dynamic': 0.290234,
'Load Store Unit/StoreQ/Runtime Dynamic': 0.580469,
'Load Store Unit/StoreQ/Subthreshold Leakage': 0.0345621,
'Load Store Unit/StoreQ/Subthreshold Leakage with power gating': 0.0197004,
'Load Store Unit/Subthreshold Leakage': 0.591622,
'Load Store Unit/Subthreshold Leakage with power gating': 0.283406,
'Memory Management Unit/Area': 0.434579,
'Memory Management Unit/Dtlb/Area': 0.0879726,
'Memory Management Unit/Dtlb/Gate Leakage': 0.00088729,
'Memory Management Unit/Dtlb/Peak Dynamic': 0.103005,
'Memory Management Unit/Dtlb/Runtime Dynamic': 0.104066,
'Memory Management Unit/Dtlb/Subthreshold Leakage': 0.0155699,
'Memory Management Unit/Dtlb/Subthreshold Leakage with power gating': 0.00887485,
'Memory Management Unit/Gate Leakage': 0.00813591,
'Memory Management Unit/Itlb/Area': 0.301552,
'Memory Management Unit/Itlb/Gate Leakage': 0.00393464,
'Memory Management Unit/Itlb/Peak Dynamic': 0.374873,
'Memory Management Unit/Itlb/Runtime Dynamic': 0.0440318,
'Memory Management Unit/Itlb/Subthreshold Leakage': 0.0413758,
'Memory Management Unit/Itlb/Subthreshold Leakage with power gating': 0.0235842,
'Memory Management Unit/Peak Dynamic': 0.711448,
'Memory Management Unit/Runtime Dynamic': 0.148097,
'Memory Management Unit/Subthreshold Leakage': 0.0769113,
'Memory Management Unit/Subthreshold Leakage with power gating': 0.0399462,
'Peak Dynamic': 25.9014,
'Renaming Unit/Area': 0.369768,
'Renaming Unit/FP Front End RAT/Area': 0.168486,
'Renaming Unit/FP Front End RAT/Gate Leakage': 0.00489731,
'Renaming Unit/FP Front End RAT/Peak Dynamic': 3.33511,
'Renaming Unit/FP Front End RAT/Runtime Dynamic': 0.456548,
'Renaming Unit/FP Front End RAT/Subthreshold Leakage': 0.0437281,
'Renaming Unit/FP Front End RAT/Subthreshold Leakage with power gating': 0.024925,
'Renaming Unit/Free List/Area': 0.0414755,
'Renaming Unit/Free List/Gate Leakage': 4.15911e-05,
'Renaming Unit/Free List/Peak Dynamic': 0.0401324,
'Renaming Unit/Free List/Runtime Dynamic': 0.0242997,
'Renaming Unit/Free List/Subthreshold Leakage': 0.000670426,
'Renaming Unit/Free List/Subthreshold Leakage with power gating': 0.000377987,
'Renaming Unit/Gate Leakage': 0.00863632,
'Renaming Unit/Int Front End RAT/Area': 0.114751,
'Renaming Unit/Int Front End RAT/Gate Leakage': 0.00038343,
'Renaming Unit/Int Front End RAT/Peak Dynamic': 0.86945,
'Renaming Unit/Int Front End RAT/Runtime Dynamic': 0.182883,
'Renaming Unit/Int Front End RAT/Subthreshold Leakage': 0.00611897,
'Renaming Unit/Int Front End RAT/Subthreshold Leakage with power gating': 0.00348781,
'Renaming Unit/Peak Dynamic': 4.56169,
'Renaming Unit/Runtime Dynamic': 0.663731,
'Renaming Unit/Subthreshold Leakage': 0.070483,
'Renaming Unit/Subthreshold Leakage with power gating': 0.0362779,
'Runtime Dynamic': 7.09547,
'Subthreshold Leakage': 6.21877,
'Subthreshold Leakage with power gating': 2.58311},
{'Area': 32.0201,
'Execution Unit/Area': 7.68434,
'Execution Unit/Complex ALUs/Area': 0.235435,
'Execution Unit/Complex ALUs/Gate Leakage': 0.0132646,
'Execution Unit/Complex ALUs/Peak Dynamic': 0.0503463,
'Execution Unit/Complex ALUs/Runtime Dynamic': 0.242233,
'Execution Unit/Complex ALUs/Subthreshold Leakage': 0.20111,
'Execution Unit/Complex ALUs/Subthreshold Leakage with power gating': 0.0754163,
'Execution Unit/Floating Point Units/Area': 4.6585,
'Execution Unit/Floating Point Units/Gate Leakage': 0.0656156,
'Execution Unit/Floating Point Units/Peak Dynamic': 0.298709,
'Execution Unit/Floating Point Units/Runtime Dynamic': 0.304033,
'Execution Unit/Floating Point Units/Subthreshold Leakage': 0.994829,
'Execution Unit/Floating Point Units/Subthreshold Leakage with power gating': 0.373061,
'Execution Unit/Gate Leakage': 0.120359,
'Execution Unit/Instruction Scheduler/Area': 1.66526,
'Execution Unit/Instruction Scheduler/FP Instruction Window/Area': 0.275653,
'Execution Unit/Instruction Scheduler/FP Instruction Window/Gate Leakage': 0.000977433,
'Execution Unit/Instruction Scheduler/FP Instruction Window/Peak Dynamic': 1.04181,
'Execution Unit/Instruction Scheduler/FP Instruction Window/Runtime Dynamic': 0.15454,
'Execution Unit/Instruction Scheduler/FP Instruction Window/Subthreshold Leakage': 0.0143453,
'Execution Unit/Instruction Scheduler/FP Instruction Window/Subthreshold Leakage with power gating': 0.00810519,
'Execution Unit/Instruction Scheduler/Gate Leakage': 0.00568913,
'Execution Unit/Instruction Scheduler/Instruction Window/Area': 0.805223,
'Execution Unit/Instruction Scheduler/Instruction Window/Gate Leakage': 0.00414562,
'Execution Unit/Instruction Scheduler/Instruction Window/Peak Dynamic': 1.6763,
'Execution Unit/Instruction Scheduler/Instruction Window/Runtime Dynamic': 0.249267,
'Execution Unit/Instruction Scheduler/Instruction Window/Subthreshold Leakage': 0.0625755,
'Execution Unit/Instruction Scheduler/Instruction Window/Subthreshold Leakage with power gating': 0.0355964,
'Execution Unit/Instruction Scheduler/Peak Dynamic': 3.82262,
'Execution Unit/Instruction Scheduler/ROB/Area': 0.584388,
'Execution Unit/Instruction Scheduler/ROB/Gate Leakage': 0.00056608,
'Execution Unit/Instruction Scheduler/ROB/Peak Dynamic': 1.10451,
'Execution Unit/Instruction Scheduler/ROB/Runtime Dynamic': 0.125822,
'Execution Unit/Instruction Scheduler/ROB/Subthreshold Leakage': 0.00906853,
'Execution Unit/Instruction Scheduler/ROB/Subthreshold Leakage with power gating': 0.00364446,
'Execution Unit/Instruction Scheduler/Runtime Dynamic': 0.529629,
'Execution Unit/Instruction Scheduler/Subthreshold Leakage': 0.0859892,
'Execution Unit/Instruction Scheduler/Subthreshold Leakage with power gating': 0.047346,
'Execution Unit/Integer ALUs/Area': 0.47087,
'Execution Unit/Integer ALUs/Gate Leakage': 0.0265291,
'Execution Unit/Integer ALUs/Peak Dynamic': 0.130953,
'Execution Unit/Integer ALUs/Runtime Dynamic': 0.101344,
'Execution Unit/Integer ALUs/Subthreshold Leakage': 0.40222,
'Execution Unit/Integer ALUs/Subthreshold Leakage with power gating': 0.150833,
'Execution Unit/Peak Dynamic': 4.59001,
'Execution Unit/Register Files/Area': 0.570804,
'Execution Unit/Register Files/Floating Point RF/Area': 0.208131,
'Execution Unit/Register Files/Floating Point RF/Gate Leakage': 0.000232788,
'Execution Unit/Register Files/Floating Point RF/Peak Dynamic': 0.0564325,
'Execution Unit/Register Files/Floating Point RF/Runtime Dynamic': 0.00648211,
'Execution Unit/Register Files/Floating Point RF/Subthreshold Leakage': 0.00399698,
'Execution Unit/Register Files/Floating Point RF/Subthreshold Leakage with power gating': 0.00176968,
'Execution Unit/Register Files/Gate Leakage': 0.000622708,
'Execution Unit/Register Files/Integer RF/Area': 0.362673,
'Execution Unit/Register Files/Integer RF/Gate Leakage': 0.00038992,
'Execution Unit/Register Files/Integer RF/Peak Dynamic': 0.064632,
'Execution Unit/Register Files/Integer RF/Runtime Dynamic': 0.0479391,
'Execution Unit/Register Files/Integer RF/Subthreshold Leakage': 0.00614175,
'Execution Unit/Register Files/Integer RF/Subthreshold Leakage with power gating': 0.00246675,
'Execution Unit/Register Files/Peak Dynamic': 0.121065,
'Execution Unit/Register Files/Runtime Dynamic': 0.0544213,
'Execution Unit/Register Files/Subthreshold Leakage': 0.0101387,
'Execution Unit/Register Files/Subthreshold Leakage with power gating': 0.00423643,
'Execution Unit/Results Broadcast Bus/Area Overhead': 0.0390912,
'Execution Unit/Results Broadcast Bus/Gate Leakage': 0.00537402,
'Execution Unit/Results Broadcast Bus/Peak Dynamic': 0.148751,
'Execution Unit/Results Broadcast Bus/Runtime Dynamic': 0.372135,
'Execution Unit/Results Broadcast Bus/Subthreshold Leakage': 0.081478,
'Execution Unit/Results Broadcast Bus/Subthreshold Leakage with power gating': 0.0305543,
'Execution Unit/Runtime Dynamic': 1.6038,
'Execution Unit/Subthreshold Leakage': 1.79543,
'Execution Unit/Subthreshold Leakage with power gating': 0.688821,
'Gate Leakage': 0.368936,
'Instruction Fetch Unit/Area': 5.85939,
'Instruction Fetch Unit/Branch Predictor/Area': 0.138516,
'Instruction Fetch Unit/Branch Predictor/Chooser/Area': 0.0435221,
'Instruction Fetch Unit/Branch Predictor/Chooser/Gate Leakage': 0.000278362,
'Instruction Fetch Unit/Branch Predictor/Chooser/Peak Dynamic': 0.0168831,
'Instruction Fetch Unit/Branch Predictor/Chooser/Runtime Dynamic': 0.000917974,
'Instruction Fetch Unit/Branch Predictor/Chooser/Subthreshold Leakage': 0.00759719,
'Instruction Fetch Unit/Branch Predictor/Chooser/Subthreshold Leakage with power gating': 0.0039236,
'Instruction Fetch Unit/Branch Predictor/Gate Leakage': 0.000757657,
'Instruction Fetch Unit/Branch Predictor/Global Predictor/Area': 0.0435221,
'Instruction Fetch Unit/Branch Predictor/Global Predictor/Gate Leakage': 0.000278362,
'Instruction Fetch Unit/Branch Predictor/Global Predictor/Peak Dynamic': 0.0168831,
'Instruction Fetch Unit/Branch Predictor/Global Predictor/Runtime Dynamic': 0.000917974,
'Instruction Fetch Unit/Branch Predictor/Global Predictor/Subthreshold Leakage': 0.00759719,
'Instruction Fetch Unit/Branch Predictor/Global Predictor/Subthreshold Leakage with power gating': 0.0039236,
'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Area': 0.0257064,
'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Gate Leakage': 0.000154548,
'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Peak Dynamic': 0.0142575,
'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Runtime Dynamic': 0.000825619,
'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Subthreshold Leakage': 0.00384344,
'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Subthreshold Leakage with power gating': 0.00198631,
'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Area': 0.0151917,
'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Gate Leakage': 8.00196e-05,
'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Peak Dynamic': 0.00527447,
'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Runtime Dynamic': 0.000333866,
'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Subthreshold Leakage': 0.00181347,
'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Subthreshold Leakage with power gating': 0.000957045,
'Instruction Fetch Unit/Branch Predictor/Peak Dynamic': 0.0597838,
'Instruction Fetch Unit/Branch Predictor/RAS/Area': 0.0105732,
'Instruction Fetch Unit/Branch Predictor/RAS/Gate Leakage': 4.63858e-05,
'Instruction Fetch Unit/Branch Predictor/RAS/Peak Dynamic': 0.0117602,
'Instruction Fetch Unit/Branch Predictor/RAS/Runtime Dynamic': 0.00068865,
'Instruction Fetch Unit/Branch Predictor/RAS/Subthreshold Leakage': 0.000932505,
'Instruction Fetch Unit/Branch Predictor/RAS/Subthreshold Leakage with power gating': 0.000494733,
'Instruction Fetch Unit/Branch Predictor/Runtime Dynamic': 0.00335022,
'Instruction Fetch Unit/Branch Predictor/Subthreshold Leakage': 0.0199703,
'Instruction Fetch Unit/Branch Predictor/Subthreshold Leakage with power gating': 0.0103282,
'Instruction Fetch Unit/Branch Target Buffer/Area': 0.64954,
'Instruction Fetch Unit/Branch Target Buffer/Gate Leakage': 0.00272758,
'Instruction Fetch Unit/Branch Target Buffer/Peak Dynamic': 0.177867,
'Instruction Fetch Unit/Branch Target Buffer/Runtime Dynamic': 0.00787022,
'Instruction Fetch Unit/Branch Target Buffer/Subthreshold Leakage': 0.0811682,
'Instruction Fetch Unit/Branch Target Buffer/Subthreshold Leakage with power gating': 0.0435357,
'Instruction Fetch Unit/Gate Leakage': 0.0589979,
'Instruction Fetch Unit/Instruction Buffer/Area': 0.0226323,
'Instruction Fetch Unit/Instruction Buffer/Gate Leakage': 6.83558e-05,
'Instruction Fetch Unit/Instruction Buffer/Peak Dynamic': 0.606827,
'Instruction Fetch Unit/Instruction Buffer/Runtime Dynamic': 0.0460851,
'Instruction Fetch Unit/Instruction Buffer/Subthreshold Leakage': 0.00151885,
'Instruction Fetch Unit/Instruction Buffer/Subthreshold Leakage with power gating': 0.000701682,
'Instruction Fetch Unit/Instruction Cache/Area': 3.14635,
'Instruction Fetch Unit/Instruction Cache/Gate Leakage': 0.029931,
'Instruction Fetch Unit/Instruction Cache/Peak Dynamic': 2.93141,
'Instruction Fetch Unit/Instruction Cache/Runtime Dynamic': 0.133269,
'Instruction Fetch Unit/Instruction Cache/Subthreshold Leakage': 0.367022,
'Instruction Fetch Unit/Instruction Cache/Subthreshold Leakage with power gating': 0.180386,
'Instruction Fetch Unit/Instruction Decoder/Area': 1.85799,
'Instruction Fetch Unit/Instruction Decoder/Gate Leakage': 0.0222493,
'Instruction Fetch Unit/Instruction Decoder/Peak Dynamic': 1.37404,
'Instruction Fetch Unit/Instruction Decoder/Runtime Dynamic': 0.156526,
'Instruction Fetch Unit/Instruction Decoder/Subthreshold Leakage': 0.442943,
'Instruction Fetch Unit/Instruction Decoder/Subthreshold Leakage with power gating': 0.166104,
'Instruction Fetch Unit/Peak Dynamic': 5.29219,
'Instruction Fetch Unit/Runtime Dynamic': 0.3471,
'Instruction Fetch Unit/Subthreshold Leakage': 0.932286,
'Instruction Fetch Unit/Subthreshold Leakage with power gating': 0.40843,
'L2/Area': 4.53318,
'L2/Gate Leakage': 0.015464,
'L2/Peak Dynamic': 0.0366939,
'L2/Runtime Dynamic': 0.00763293,
'L2/Subthreshold Leakage': 0.834142,
'L2/Subthreshold Leakage with power gating': 0.401066,
'Load Store Unit/Area': 8.80901,
'Load Store Unit/Data Cache/Area': 6.84535,
'Load Store Unit/Data Cache/Gate Leakage': 0.0279261,
'Load Store Unit/Data Cache/Peak Dynamic': 2.89071,
'Load Store Unit/Data Cache/Runtime Dynamic': 0.805089,
'Load Store Unit/Data Cache/Subthreshold Leakage': 0.527675,
'Load Store Unit/Data Cache/Subthreshold Leakage with power gating': 0.25085,
'Load Store Unit/Gate Leakage': 0.0350888,
'Load Store Unit/LoadQ/Area': 0.0836782,
'Load Store Unit/LoadQ/Gate Leakage': 0.00059896,
'Load Store Unit/LoadQ/Peak Dynamic': 0.0534977,
'Load Store Unit/LoadQ/Runtime Dynamic': 0.0534978,
'Load Store Unit/LoadQ/Subthreshold Leakage': 0.00941961,
'Load Store Unit/LoadQ/Subthreshold Leakage with power gating': 0.00536918,
'Load Store Unit/Peak Dynamic': 3.14334,
'Load Store Unit/Runtime Dynamic': 1.12242,
'Load Store Unit/StoreQ/Area': 0.322079,
'Load Store Unit/StoreQ/Gate Leakage': 0.00329971,
'Load Store Unit/StoreQ/Peak Dynamic': 0.131916,
'Load Store Unit/StoreQ/Runtime Dynamic': 0.263833,
'Load Store Unit/StoreQ/Subthreshold Leakage': 0.0345621,
'Load Store Unit/StoreQ/Subthreshold Leakage with power gating': 0.0197004,
'Load Store Unit/Subthreshold Leakage': 0.591321,
'Load Store Unit/Subthreshold Leakage with power gating': 0.283293,
'Memory Management Unit/Area': 0.4339,
'Memory Management Unit/Dtlb/Area': 0.0879726,
'Memory Management Unit/Dtlb/Gate Leakage': 0.00088729,
'Memory Management Unit/Dtlb/Peak Dynamic': 0.0468175,
'Memory Management Unit/Dtlb/Runtime Dynamic': 0.0473088,
'Memory Management Unit/Dtlb/Subthreshold Leakage': 0.0155699,
'Memory Management Unit/Dtlb/Subthreshold Leakage with power gating': 0.00887485,
'Memory Management Unit/Gate Leakage': 0.00808595,
'Memory Management Unit/Itlb/Area': 0.301552,
'Memory Management Unit/Itlb/Gate Leakage': 0.00393464,
'Memory Management Unit/Itlb/Peak Dynamic': 0.182264,
'Memory Management Unit/Itlb/Runtime Dynamic': 0.0220249,
'Memory Management Unit/Itlb/Subthreshold Leakage': 0.0413758,
'Memory Management Unit/Itlb/Subthreshold Leakage with power gating': 0.0235842,
'Memory Management Unit/Peak Dynamic': 0.418797,
'Memory Management Unit/Runtime Dynamic': 0.0693337,
'Memory Management Unit/Subthreshold Leakage': 0.0766103,
'Memory Management Unit/Subthreshold Leakage with power gating': 0.0398333,
'Peak Dynamic': 17.0705,
'Renaming Unit/Area': 0.303608,
'Renaming Unit/FP Front End RAT/Area': 0.131045,
'Renaming Unit/FP Front End RAT/Gate Leakage': 0.00351123,
'Renaming Unit/FP Front End RAT/Peak Dynamic': 2.51468,
'Renaming Unit/FP Front End RAT/Runtime Dynamic': 0.148448,
'Renaming Unit/FP Front End RAT/Subthreshold Leakage': 0.0308571,
'Renaming Unit/FP Front End RAT/Subthreshold Leakage with power gating': 0.0175885,
'Renaming Unit/Free List/Area': 0.0340654,
'Renaming Unit/Free List/Gate Leakage': 2.5481e-05,
'Renaming Unit/Free List/Peak Dynamic': 0.0306032,
'Renaming Unit/Free List/Runtime Dynamic': 0.008779,
'Renaming Unit/Free List/Subthreshold Leakage': 0.000370144,
'Renaming Unit/Free List/Subthreshold Leakage with power gating': 0.000201064,
'Renaming Unit/Gate Leakage': 0.00708398,
'Renaming Unit/Int Front End RAT/Area': 0.0941223,
'Renaming Unit/Int Front End RAT/Gate Leakage': 0.000283242,
'Renaming Unit/Int Front End RAT/Peak Dynamic': 0.731965,
'Renaming Unit/Int Front End RAT/Runtime Dynamic': 0.0758336,
'Renaming Unit/Int Front End RAT/Subthreshold Leakage': 0.00435488,
'Renaming Unit/Int Front End RAT/Subthreshold Leakage with power gating': 0.00248228,
'Renaming Unit/Peak Dynamic': 3.58947,
'Renaming Unit/Runtime Dynamic': 0.23306,
'Renaming Unit/Subthreshold Leakage': 0.0552466,
'Renaming Unit/Subthreshold Leakage with power gating': 0.0276461,
'Runtime Dynamic': 3.38334,
'Subthreshold Leakage': 6.16288,
'Subthreshold Leakage with power gating': 2.55328},
{'Area': 32.0201,
'Execution Unit/Area': 7.68434,
'Execution Unit/Complex ALUs/Area': 0.235435,
'Execution Unit/Complex ALUs/Gate Leakage': 0.0132646,
'Execution Unit/Complex ALUs/Peak Dynamic': 0.0542242,
'Execution Unit/Complex ALUs/Runtime Dynamic': 0.245279,
'Execution Unit/Complex ALUs/Subthreshold Leakage': 0.20111,
'Execution Unit/Complex ALUs/Subthreshold Leakage with power gating': 0.0754163,
'Execution Unit/Floating Point Units/Area': 4.6585,
'Execution Unit/Floating Point Units/Gate Leakage': 0.0656156,
'Execution Unit/Floating Point Units/Peak Dynamic': 0.291751,
'Execution Unit/Floating Point Units/Runtime Dynamic': 0.304033,
'Execution Unit/Floating Point Units/Subthreshold Leakage': 0.994829,
'Execution Unit/Floating Point Units/Subthreshold Leakage with power gating': 0.373061,
'Execution Unit/Gate Leakage': 0.120359,
'Execution Unit/Instruction Scheduler/Area': 1.66526,
'Execution Unit/Instruction Scheduler/FP Instruction Window/Area': 0.275653,
'Execution Unit/Instruction Scheduler/FP Instruction Window/Gate Leakage': 0.000977433,
'Execution Unit/Instruction Scheduler/FP Instruction Window/Peak Dynamic': 1.04181,
'Execution Unit/Instruction Scheduler/FP Instruction Window/Runtime Dynamic': 0.128974,
'Execution Unit/Instruction Scheduler/FP Instruction Window/Subthreshold Leakage': 0.0143453,
'Execution Unit/Instruction Scheduler/FP Instruction Window/Subthreshold Leakage with power gating': 0.00810519,
'Execution Unit/Instruction Scheduler/Gate Leakage': 0.00568913,
'Execution Unit/Instruction Scheduler/Instruction Window/Area': 0.805223,
'Execution Unit/Instruction Scheduler/Instruction Window/Gate Leakage': 0.00414562,
'Execution Unit/Instruction Scheduler/Instruction Window/Peak Dynamic': 1.6763,
'Execution Unit/Instruction Scheduler/Instruction Window/Runtime Dynamic': 0.20803,
'Execution Unit/Instruction Scheduler/Instruction Window/Subthreshold Leakage': 0.0625755,
'Execution Unit/Instruction Scheduler/Instruction Window/Subthreshold Leakage with power gating': 0.0355964,
'Execution Unit/Instruction Scheduler/Peak Dynamic': 3.82262,
'Execution Unit/Instruction Scheduler/ROB/Area': 0.584388,
'Execution Unit/Instruction Scheduler/ROB/Gate Leakage': 0.00056608,
'Execution Unit/Instruction Scheduler/ROB/Peak Dynamic': 1.10451,
'Execution Unit/Instruction Scheduler/ROB/Runtime Dynamic': 0.105006,
'Execution Unit/Instruction Scheduler/ROB/Subthreshold Leakage': 0.00906853,
'Execution Unit/Instruction Scheduler/ROB/Subthreshold Leakage with power gating': 0.00364446,
'Execution Unit/Instruction Scheduler/Runtime Dynamic': 0.44201,
'Execution Unit/Instruction Scheduler/Subthreshold Leakage': 0.0859892,
'Execution Unit/Instruction Scheduler/Subthreshold Leakage with power gating': 0.047346,
'Execution Unit/Integer ALUs/Area': 0.47087,
'Execution Unit/Integer ALUs/Gate Leakage': 0.0265291,
'Execution Unit/Integer ALUs/Peak Dynamic': 0.102778,
'Execution Unit/Integer ALUs/Runtime Dynamic': 0.101344,
'Execution Unit/Integer ALUs/Subthreshold Leakage': 0.40222,
'Execution Unit/Integer ALUs/Subthreshold Leakage with power gating': 0.150833,
'Execution Unit/Peak Dynamic': 4.53858,
'Execution Unit/Register Files/Area': 0.570804,
'Execution Unit/Register Files/Floating Point RF/Area': 0.208131,
'Execution Unit/Register Files/Floating Point RF/Gate Leakage': 0.000232788,
'Execution Unit/Register Files/Floating Point RF/Peak Dynamic': 0.0551181,
'Execution Unit/Register Files/Floating Point RF/Runtime Dynamic': 0.00540973,
'Execution Unit/Register Files/Floating Point RF/Subthreshold Leakage': 0.00399698,
'Execution Unit/Register Files/Floating Point RF/Subthreshold Leakage with power gating': 0.00176968,
'Execution Unit/Register Files/Gate Leakage': 0.000622708,
'Execution Unit/Register Files/Integer RF/Area': 0.362673,
'Execution Unit/Register Files/Integer RF/Gate Leakage': 0.00038992,
'Execution Unit/Register Files/Integer RF/Peak Dynamic': 0.0594634,
'Execution Unit/Register Files/Integer RF/Runtime Dynamic': 0.0400083,
'Execution Unit/Register Files/Integer RF/Subthreshold Leakage': 0.00614175,
'Execution Unit/Register Files/Integer RF/Subthreshold Leakage with power gating': 0.00246675,
'Execution Unit/Register Files/Peak Dynamic': 0.114581,
'Execution Unit/Register Files/Runtime Dynamic': 0.045418,
'Execution Unit/Register Files/Subthreshold Leakage': 0.0101387,
'Execution Unit/Register Files/Subthreshold Leakage with power gating': 0.00423643,
'Execution Unit/Results Broadcast Bus/Area Overhead': 0.0390912,
'Execution Unit/Results Broadcast Bus/Gate Leakage': 0.00537402,
'Execution Unit/Results Broadcast Bus/Peak Dynamic': 0.138832,
'Execution Unit/Results Broadcast Bus/Runtime Dynamic': 0.327911,
'Execution Unit/Results Broadcast Bus/Subthreshold Leakage': 0.081478,
'Execution Unit/Results Broadcast Bus/Subthreshold Leakage with power gating': 0.0305543,
'Execution Unit/Runtime Dynamic': 1.466,
'Execution Unit/Subthreshold Leakage': 1.79543,
'Execution Unit/Subthreshold Leakage with power gating': 0.688821,
'Gate Leakage': 0.368936,
'Instruction Fetch Unit/Area': 5.85939,
'Instruction Fetch Unit/Branch Predictor/Area': 0.138516,
'Instruction Fetch Unit/Branch Predictor/Chooser/Area': 0.0435221,
'Instruction Fetch Unit/Branch Predictor/Chooser/Gate Leakage': 0.000278362,
'Instruction Fetch Unit/Branch Predictor/Chooser/Peak Dynamic': 0.0168831,
'Instruction Fetch Unit/Branch Predictor/Chooser/Runtime Dynamic': 0.000569244,
'Instruction Fetch Unit/Branch Predictor/Chooser/Subthreshold Leakage': 0.00759719,
'Instruction Fetch Unit/Branch Predictor/Chooser/Subthreshold Leakage with power gating': 0.0039236,
'Instruction Fetch Unit/Branch Predictor/Gate Leakage': 0.000757657,
'Instruction Fetch Unit/Branch Predictor/Global Predictor/Area': 0.0435221,
'Instruction Fetch Unit/Branch Predictor/Global Predictor/Gate Leakage': 0.000278362,
'Instruction Fetch Unit/Branch Predictor/Global Predictor/Peak Dynamic': 0.0168831,
'Instruction Fetch Unit/Branch Predictor/Global Predictor/Runtime Dynamic': 0.000569244,
'Instruction Fetch Unit/Branch Predictor/Global Predictor/Subthreshold Leakage': 0.00759719,
'Instruction Fetch Unit/Branch Predictor/Global Predictor/Subthreshold Leakage with power gating': 0.0039236,
'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Area': 0.0257064,
'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Gate Leakage': 0.000154548,
'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Peak Dynamic': 0.0142575,
'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Runtime Dynamic': 0.000514967,
'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Subthreshold Leakage': 0.00384344,
'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Subthreshold Leakage with power gating': 0.00198631,
'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Area': 0.0151917,
'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Gate Leakage': 8.00196e-05,
'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Peak Dynamic': 0.00527447,
'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Runtime Dynamic': 0.000209829,
'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Subthreshold Leakage': 0.00181347,
'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Subthreshold Leakage with power gating': 0.000957045,
'Instruction Fetch Unit/Branch Predictor/Peak Dynamic': 0.0597838,
'Instruction Fetch Unit/Branch Predictor/RAS/Area': 0.0105732,
'Instruction Fetch Unit/Branch Predictor/RAS/Gate Leakage': 4.63858e-05,
'Instruction Fetch Unit/Branch Predictor/RAS/Peak Dynamic': 0.0117602,
'Instruction Fetch Unit/Branch Predictor/RAS/Runtime Dynamic': 0.000574722,
'Instruction Fetch Unit/Branch Predictor/RAS/Subthreshold Leakage': 0.000932505,
'Instruction Fetch Unit/Branch Predictor/RAS/Subthreshold Leakage with power gating': 0.000494733,
'Instruction Fetch Unit/Branch Predictor/Runtime Dynamic': 0.00222818,
'Instruction Fetch Unit/Branch Predictor/Subthreshold Leakage': 0.0199703,
'Instruction Fetch Unit/Branch Predictor/Subthreshold Leakage with power gating': 0.0103282,
'Instruction Fetch Unit/Branch Target Buffer/Area': 0.64954,
'Instruction Fetch Unit/Branch Target Buffer/Gate Leakage': 0.00272758,
'Instruction Fetch Unit/Branch Target Buffer/Peak Dynamic': 0.177867,
'Instruction Fetch Unit/Branch Target Buffer/Runtime Dynamic': 0.00477343,
'Instruction Fetch Unit/Branch Target Buffer/Subthreshold Leakage': 0.0811682,
'Instruction Fetch Unit/Branch Target Buffer/Subthreshold Leakage with power gating': 0.0435357,
'Instruction Fetch Unit/Gate Leakage': 0.0589979,
'Instruction Fetch Unit/Instruction Buffer/Area': 0.0226323,
'Instruction Fetch Unit/Instruction Buffer/Gate Leakage': 6.83558e-05,
'Instruction Fetch Unit/Instruction Buffer/Peak Dynamic': 0.606827,
'Instruction Fetch Unit/Instruction Buffer/Runtime Dynamic': 0.038461,
'Instruction Fetch Unit/Instruction Buffer/Subthreshold Leakage': 0.00151885,
'Instruction Fetch Unit/Instruction Buffer/Subthreshold Leakage with power gating': 0.000701682,
'Instruction Fetch Unit/Instruction Cache/Area': 3.14635,
'Instruction Fetch Unit/Instruction Cache/Gate Leakage': 0.029931,
'Instruction Fetch Unit/Instruction Cache/Peak Dynamic': 2.44645,
'Instruction Fetch Unit/Instruction Cache/Runtime Dynamic': 0.0992052,
'Instruction Fetch Unit/Instruction Cache/Subthreshold Leakage': 0.367022,
'Instruction Fetch Unit/Instruction Cache/Subthreshold Leakage with power gating': 0.180386,
'Instruction Fetch Unit/Instruction Decoder/Area': 1.85799,
'Instruction Fetch Unit/Instruction Decoder/Gate Leakage': 0.0222493,
'Instruction Fetch Unit/Instruction Decoder/Peak Dynamic': 1.37404,
'Instruction Fetch Unit/Instruction Decoder/Runtime Dynamic': 0.130631,
'Instruction Fetch Unit/Instruction Decoder/Subthreshold Leakage': 0.442943,
'Instruction Fetch Unit/Instruction Decoder/Subthreshold Leakage with power gating': 0.166104,
'Instruction Fetch Unit/Peak Dynamic': 4.78369,
'Instruction Fetch Unit/Runtime Dynamic': 0.275299,
'Instruction Fetch Unit/Subthreshold Leakage': 0.932286,
'Instruction Fetch Unit/Subthreshold Leakage with power gating': 0.40843,
'L2/Area': 4.53318,
'L2/Gate Leakage': 0.015464,
'L2/Peak Dynamic': 0.0398849,
'L2/Runtime Dynamic': 0.0072389,
'L2/Subthreshold Leakage': 0.834142,
'L2/Subthreshold Leakage with power gating': 0.401066,
'Load Store Unit/Area': 8.80901,
'Load Store Unit/Data Cache/Area': 6.84535,
'Load Store Unit/Data Cache/Gate Leakage': 0.0279261,
'Load Store Unit/Data Cache/Peak Dynamic': 2.62402,
'Load Store Unit/Data Cache/Runtime Dynamic': 0.67604,
'Load Store Unit/Data Cache/Subthreshold Leakage': 0.527675,
'Load Store Unit/Data Cache/Subthreshold Leakage with power gating': 0.25085,
'Load Store Unit/Gate Leakage': 0.0350888,
'Load Store Unit/LoadQ/Area': 0.0836782,
'Load Store Unit/LoadQ/Gate Leakage': 0.00059896,
'Load Store Unit/LoadQ/Peak Dynamic': 0.0448694,
'Load Store Unit/LoadQ/Runtime Dynamic': 0.0448695,
'Load Store Unit/LoadQ/Subthreshold Leakage': 0.00941961,
'Load Store Unit/LoadQ/Subthreshold Leakage with power gating': 0.00536918,
'Load Store Unit/Peak Dynamic': 2.8359,
'Load Store Unit/Runtime Dynamic': 0.94219,
'Load Store Unit/StoreQ/Area': 0.322079,
'Load Store Unit/StoreQ/Gate Leakage': 0.00329971,
'Load Store Unit/StoreQ/Peak Dynamic': 0.11064,
'Load Store Unit/StoreQ/Runtime Dynamic': 0.221281,
'Load Store Unit/StoreQ/Subthreshold Leakage': 0.0345621,
'Load Store Unit/StoreQ/Subthreshold Leakage with power gating': 0.0197004,
'Load Store Unit/Subthreshold Leakage': 0.591321,
'Load Store Unit/Subthreshold Leakage with power gating': 0.283293,
'Memory Management Unit/Area': 0.4339,
'Memory Management Unit/Dtlb/Area': 0.0879726,
'Memory Management Unit/Dtlb/Gate Leakage': 0.00088729,
'Memory Management Unit/Dtlb/Peak Dynamic': 0.0392666,
'Memory Management Unit/Dtlb/Runtime Dynamic': 0.0398373,
'Memory Management Unit/Dtlb/Subthreshold Leakage': 0.0155699,
'Memory Management Unit/Dtlb/Subthreshold Leakage with power gating': 0.00887485,
'Memory Management Unit/Gate Leakage': 0.00808595,
'Memory Management Unit/Itlb/Area': 0.301552,
'Memory Management Unit/Itlb/Gate Leakage': 0.00393464,
'Memory Management Unit/Itlb/Peak Dynamic': 0.152111,
'Memory Management Unit/Itlb/Runtime Dynamic': 0.0163474,
'Memory Management Unit/Itlb/Subthreshold Leakage': 0.0413758,
'Memory Management Unit/Itlb/Subthreshold Leakage with power gating': 0.0235842,
'Memory Management Unit/Peak Dynamic': 0.375673,
'Memory Management Unit/Runtime Dynamic': 0.0561847,
'Memory Management Unit/Subthreshold Leakage': 0.0766103,
'Memory Management Unit/Subthreshold Leakage with power gating': 0.0398333,
'Peak Dynamic': 16.1632,
'Renaming Unit/Area': 0.303608,
'Renaming Unit/FP Front End RAT/Area': 0.131045,
'Renaming Unit/FP Front End RAT/Gate Leakage': 0.00351123,
'Renaming Unit/FP Front End RAT/Peak Dynamic': 2.51468,
'Renaming Unit/FP Front End RAT/Runtime Dynamic': 0.14499,
'Renaming Unit/FP Front End RAT/Subthreshold Leakage': 0.0308571,
'Renaming Unit/FP Front End RAT/Subthreshold Leakage with power gating': 0.0175885,
'Renaming Unit/Free List/Area': 0.0340654,
'Renaming Unit/Free List/Gate Leakage': 2.5481e-05,
'Renaming Unit/Free List/Peak Dynamic': 0.0306032,
'Renaming Unit/Free List/Runtime Dynamic': 0.00758344,
'Renaming Unit/Free List/Subthreshold Leakage': 0.000370144,
'Renaming Unit/Free List/Subthreshold Leakage with power gating': 0.000201064,
'Renaming Unit/Gate Leakage': 0.00708398,
'Renaming Unit/Int Front End RAT/Area': 0.0941223,
'Renaming Unit/Int Front End RAT/Gate Leakage': 0.000283242,
'Renaming Unit/Int Front End RAT/Peak Dynamic': 0.731965,
'Renaming Unit/Int Front End RAT/Runtime Dynamic': 0.0629768,
'Renaming Unit/Int Front End RAT/Subthreshold Leakage': 0.00435488,
'Renaming Unit/Int Front End RAT/Subthreshold Leakage with power gating': 0.00248228,
'Renaming Unit/Peak Dynamic': 3.58947,
'Renaming Unit/Runtime Dynamic': 0.215551,
'Renaming Unit/Subthreshold Leakage': 0.0552466,
'Renaming Unit/Subthreshold Leakage with power gating': 0.0276461,
'Runtime Dynamic': 2.96246,
'Subthreshold Leakage': 6.16288,
'Subthreshold Leakage with power gating': 2.55328},
{'Area': 32.0201,
'Execution Unit/Area': 7.68434,
'Execution Unit/Complex ALUs/Area': 0.235435,
'Execution Unit/Complex ALUs/Gate Leakage': 0.0132646,
'Execution Unit/Complex ALUs/Peak Dynamic': 0.0529102,
'Execution Unit/Complex ALUs/Runtime Dynamic': 0.244246,
'Execution Unit/Complex ALUs/Subthreshold Leakage': 0.20111,
'Execution Unit/Complex ALUs/Subthreshold Leakage with power gating': 0.0754163,
'Execution Unit/Floating Point Units/Area': 4.6585,
'Execution Unit/Floating Point Units/Gate Leakage': 0.0656156,
'Execution Unit/Floating Point Units/Peak Dynamic': 0.270256,
'Execution Unit/Floating Point Units/Runtime Dynamic': 0.304033,
'Execution Unit/Floating Point Units/Subthreshold Leakage': 0.994829,
'Execution Unit/Floating Point Units/Subthreshold Leakage with power gating': 0.373061,
'Execution Unit/Gate Leakage': 0.120359,
'Execution Unit/Instruction Scheduler/Area': 1.66526,
'Execution Unit/Instruction Scheduler/FP Instruction Window/Area': 0.275653,
'Execution Unit/Instruction Scheduler/FP Instruction Window/Gate Leakage': 0.000977433,
'Execution Unit/Instruction Scheduler/FP Instruction Window/Peak Dynamic': 1.04181,
'Execution Unit/Instruction Scheduler/FP Instruction Window/Runtime Dynamic': 0.0878707,
'Execution Unit/Instruction Scheduler/FP Instruction Window/Subthreshold Leakage': 0.0143453,
'Execution Unit/Instruction Scheduler/FP Instruction Window/Subthreshold Leakage with power gating': 0.00810519,
'Execution Unit/Instruction Scheduler/Gate Leakage': 0.00568913,
'Execution Unit/Instruction Scheduler/Instruction Window/Area': 0.805223,
'Execution Unit/Instruction Scheduler/Instruction Window/Gate Leakage': 0.00414562,
'Execution Unit/Instruction Scheduler/Instruction Window/Peak Dynamic': 1.6763,
'Execution Unit/Instruction Scheduler/Instruction Window/Runtime Dynamic': 0.141732,
'Execution Unit/Instruction Scheduler/Instruction Window/Subthreshold Leakage': 0.0625755,
'Execution Unit/Instruction Scheduler/Instruction Window/Subthreshold Leakage with power gating': 0.0355964,
'Execution Unit/Instruction Scheduler/Peak Dynamic': 3.82262,
'Execution Unit/Instruction Scheduler/ROB/Area': 0.584388,
'Execution Unit/Instruction Scheduler/ROB/Gate Leakage': 0.00056608,
'Execution Unit/Instruction Scheduler/ROB/Peak Dynamic': 1.10451,
'Execution Unit/Instruction Scheduler/ROB/Runtime Dynamic': 0.0715416,
'Execution Unit/Instruction Scheduler/ROB/Subthreshold Leakage': 0.00906853,
'Execution Unit/Instruction Scheduler/ROB/Subthreshold Leakage with power gating': 0.00364446,
'Execution Unit/Instruction Scheduler/Runtime Dynamic': 0.301145,
'Execution Unit/Instruction Scheduler/Subthreshold Leakage': 0.0859892,
'Execution Unit/Instruction Scheduler/Subthreshold Leakage with power gating': 0.047346,
'Execution Unit/Integer ALUs/Area': 0.47087,
'Execution Unit/Integer ALUs/Gate Leakage': 0.0265291,
'Execution Unit/Integer ALUs/Peak Dynamic': 0.0590634,
'Execution Unit/Integer ALUs/Runtime Dynamic': 0.101344,
'Execution Unit/Integer ALUs/Subthreshold Leakage': 0.40222,
'Execution Unit/Integer ALUs/Subthreshold Leakage with power gating': 0.150833,
'Execution Unit/Peak Dynamic': 4.42336,
'Execution Unit/Register Files/Area': 0.570804,
'Execution Unit/Register Files/Floating Point RF/Area': 0.208131,
'Execution Unit/Register Files/Floating Point RF/Gate Leakage': 0.000232788,
'Execution Unit/Register Files/Floating Point RF/Peak Dynamic': 0.0510571,
'Execution Unit/Register Files/Floating Point RF/Runtime Dynamic': 0.00368569,
'Execution Unit/Register Files/Floating Point RF/Subthreshold Leakage': 0.00399698,
'Execution Unit/Register Files/Floating Point RF/Subthreshold Leakage with power gating': 0.00176968,
'Execution Unit/Register Files/Gate Leakage': 0.000622708,
'Execution Unit/Register Files/Integer RF/Area': 0.362673,
'Execution Unit/Register Files/Integer RF/Gate Leakage': 0.00038992,
'Execution Unit/Register Files/Integer RF/Peak Dynamic': 0.0470898,
'Execution Unit/Register Files/Integer RF/Runtime Dynamic': 0.0272579,
'Execution Unit/Register Files/Integer RF/Subthreshold Leakage': 0.00614175,
'Execution Unit/Register Files/Integer RF/Subthreshold Leakage with power gating': 0.00246675,
'Execution Unit/Register Files/Peak Dynamic': 0.0981469,
'Execution Unit/Register Files/Runtime Dynamic': 0.0309436,
'Execution Unit/Register Files/Subthreshold Leakage': 0.0101387,
'Execution Unit/Register Files/Subthreshold Leakage with power gating': 0.00423643,
'Execution Unit/Results Broadcast Bus/Area Overhead': 0.0390912,
'Execution Unit/Results Broadcast Bus/Gate Leakage': 0.00537402,
'Execution Unit/Results Broadcast Bus/Peak Dynamic': 0.112436,
'Execution Unit/Results Broadcast Bus/Runtime Dynamic': 0.232057,
'Execution Unit/Results Broadcast Bus/Subthreshold Leakage': 0.081478,
'Execution Unit/Results Broadcast Bus/Subthreshold Leakage with power gating': 0.0305543,
'Execution Unit/Runtime Dynamic': 1.21377,
'Execution Unit/Subthreshold Leakage': 1.79543,
'Execution Unit/Subthreshold Leakage with power gating': 0.688821,
'Gate Leakage': 0.368936,
'Instruction Fetch Unit/Area': 5.85939,
'Instruction Fetch Unit/Branch Predictor/Area': 0.138516,
'Instruction Fetch Unit/Branch Predictor/Chooser/Area': 0.0435221,
'Instruction Fetch Unit/Branch Predictor/Chooser/Gate Leakage': 0.000278362,
'Instruction Fetch Unit/Branch Predictor/Chooser/Peak Dynamic': 0.0168831,
'Instruction Fetch Unit/Branch Predictor/Chooser/Runtime Dynamic': 0.000249816,
'Instruction Fetch Unit/Branch Predictor/Chooser/Subthreshold Leakage': 0.00759719,
'Instruction Fetch Unit/Branch Predictor/Chooser/Subthreshold Leakage with power gating': 0.0039236,
'Instruction Fetch Unit/Branch Predictor/Gate Leakage': 0.000757657,
'Instruction Fetch Unit/Branch Predictor/Global Predictor/Area': 0.0435221,
'Instruction Fetch Unit/Branch Predictor/Global Predictor/Gate Leakage': 0.000278362,
'Instruction Fetch Unit/Branch Predictor/Global Predictor/Peak Dynamic': 0.0168831,
'Instruction Fetch Unit/Branch Predictor/Global Predictor/Runtime Dynamic': 0.000249816,
'Instruction Fetch Unit/Branch Predictor/Global Predictor/Subthreshold Leakage': 0.00759719,
'Instruction Fetch Unit/Branch Predictor/Global Predictor/Subthreshold Leakage with power gating': 0.0039236,
'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Area': 0.0257064,
'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Gate Leakage': 0.000154548,
'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Peak Dynamic': 0.0142575,
'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Runtime Dynamic': 0.000226678,
'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Subthreshold Leakage': 0.00384344,
'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Subthreshold Leakage with power gating': 0.00198631,
'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Area': 0.0151917,
'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Gate Leakage': 8.00196e-05,
'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Peak Dynamic': 0.00527447,
'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Runtime Dynamic': 9.27219e-05,
'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Subthreshold Leakage': 0.00181347,
'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Subthreshold Leakage with power gating': 0.000957045,
'Instruction Fetch Unit/Branch Predictor/Peak Dynamic': 0.0597838,
'Instruction Fetch Unit/Branch Predictor/RAS/Area': 0.0105732,
'Instruction Fetch Unit/Branch Predictor/RAS/Gate Leakage': 4.63858e-05,
'Instruction Fetch Unit/Branch Predictor/RAS/Peak Dynamic': 0.0117602,
'Instruction Fetch Unit/Branch Predictor/RAS/Runtime Dynamic': 0.000391563,
'Instruction Fetch Unit/Branch Predictor/RAS/Subthreshold Leakage': 0.000932505,
'Instruction Fetch Unit/Branch Predictor/RAS/Subthreshold Leakage with power gating': 0.000494733,
'Instruction Fetch Unit/Branch Predictor/Runtime Dynamic': 0.00111787,
'Instruction Fetch Unit/Branch Predictor/Subthreshold Leakage': 0.0199703,
'Instruction Fetch Unit/Branch Predictor/Subthreshold Leakage with power gating': 0.0103282,
'Instruction Fetch Unit/Branch Target Buffer/Area': 0.64954,
'Instruction Fetch Unit/Branch Target Buffer/Gate Leakage': 0.00272758,
'Instruction Fetch Unit/Branch Target Buffer/Peak Dynamic': 0.177867,
'Instruction Fetch Unit/Branch Target Buffer/Runtime Dynamic': 0.00207049,
'Instruction Fetch Unit/Branch Target Buffer/Subthreshold Leakage': 0.0811682,
'Instruction Fetch Unit/Branch Target Buffer/Subthreshold Leakage with power gating': 0.0435357,
'Instruction Fetch Unit/Gate Leakage': 0.0589979,
'Instruction Fetch Unit/Instruction Buffer/Area': 0.0226323,
'Instruction Fetch Unit/Instruction Buffer/Gate Leakage': 6.83558e-05,
'Instruction Fetch Unit/Instruction Buffer/Peak Dynamic': 0.606827,
'Instruction Fetch Unit/Instruction Buffer/Runtime Dynamic': 0.0262038,
'Instruction Fetch Unit/Instruction Buffer/Subthreshold Leakage': 0.00151885,
'Instruction Fetch Unit/Instruction Buffer/Subthreshold Leakage with power gating': 0.000701682,
'Instruction Fetch Unit/Instruction Cache/Area': 3.14635,
'Instruction Fetch Unit/Instruction Cache/Gate Leakage': 0.029931,
'Instruction Fetch Unit/Instruction Cache/Peak Dynamic': 1.66679,
'Instruction Fetch Unit/Instruction Cache/Runtime Dynamic': 0.0613393,
'Instruction Fetch Unit/Instruction Cache/Subthreshold Leakage': 0.367022,
'Instruction Fetch Unit/Instruction Cache/Subthreshold Leakage with power gating': 0.180386,
'Instruction Fetch Unit/Instruction Decoder/Area': 1.85799,
'Instruction Fetch Unit/Instruction Decoder/Gate Leakage': 0.0222493,
'Instruction Fetch Unit/Instruction Decoder/Peak Dynamic': 1.37404,
'Instruction Fetch Unit/Instruction Decoder/Runtime Dynamic': 0.0889998,
'Instruction Fetch Unit/Instruction Decoder/Subthreshold Leakage': 0.442943,
'Instruction Fetch Unit/Instruction Decoder/Subthreshold Leakage with power gating': 0.166104,
'Instruction Fetch Unit/Peak Dynamic': 3.96619,
'Instruction Fetch Unit/Runtime Dynamic': 0.179731,
'Instruction Fetch Unit/Subthreshold Leakage': 0.932286,
'Instruction Fetch Unit/Subthreshold Leakage with power gating': 0.40843,
'L2/Area': 4.53318,
'L2/Gate Leakage': 0.015464,
'L2/Peak Dynamic': 0.0285357,
'L2/Runtime Dynamic': 0.00792079,
'L2/Subthreshold Leakage': 0.834142,
'L2/Subthreshold Leakage with power gating': 0.401066,
'Load Store Unit/Area': 8.80901,
'Load Store Unit/Data Cache/Area': 6.84535,
'Load Store Unit/Data Cache/Gate Leakage': 0.0279261,
'Load Store Unit/Data Cache/Peak Dynamic': 1.99531,
'Load Store Unit/Data Cache/Runtime Dynamic': 0.376367,
'Load Store Unit/Data Cache/Subthreshold Leakage': 0.527675,
'Load Store Unit/Data Cache/Subthreshold Leakage with power gating': 0.25085,
'Load Store Unit/Gate Leakage': 0.0350888,
'Load Store Unit/LoadQ/Area': 0.0836782,
'Load Store Unit/LoadQ/Gate Leakage': 0.00059896,
'Load Store Unit/LoadQ/Peak Dynamic': 0.0245292,
'Load Store Unit/LoadQ/Runtime Dynamic': 0.0245291,
'Load Store Unit/LoadQ/Subthreshold Leakage': 0.00941961,
'Load Store Unit/LoadQ/Subthreshold Leakage with power gating': 0.00536918,
'Load Store Unit/Peak Dynamic': 2.11114,
'Load Store Unit/Runtime Dynamic': 0.521865,
'Load Store Unit/StoreQ/Area': 0.322079,
'Load Store Unit/StoreQ/Gate Leakage': 0.00329971,
'Load Store Unit/StoreQ/Peak Dynamic': 0.0604848,
'Load Store Unit/StoreQ/Runtime Dynamic': 0.120969,
'Load Store Unit/StoreQ/Subthreshold Leakage': 0.0345621,
'Load Store Unit/StoreQ/Subthreshold Leakage with power gating': 0.0197004,
'Load Store Unit/Subthreshold Leakage': 0.591321,
'Load Store Unit/Subthreshold Leakage with power gating': 0.283293,
'Memory Management Unit/Area': 0.4339,
'Memory Management Unit/Dtlb/Area': 0.0879726,
'Memory Management Unit/Dtlb/Gate Leakage': 0.00088729,
'Memory Management Unit/Dtlb/Peak Dynamic': 0.0214663,
'Memory Management Unit/Dtlb/Runtime Dynamic': 0.0218912,
'Memory Management Unit/Dtlb/Subthreshold Leakage': 0.0155699,
'Memory Management Unit/Dtlb/Subthreshold Leakage with power gating': 0.00887485,
'Memory Management Unit/Gate Leakage': 0.00808595,
'Memory Management Unit/Itlb/Area': 0.301552,
'Memory Management Unit/Itlb/Gate Leakage': 0.00393464,
'Memory Management Unit/Itlb/Peak Dynamic': 0.103635,
'Memory Management Unit/Itlb/Runtime Dynamic': 0.0100662,
'Memory Management Unit/Itlb/Subthreshold Leakage': 0.0413758,
'Memory Management Unit/Itlb/Subthreshold Leakage with power gating': 0.0235842,
'Memory Management Unit/Peak Dynamic': 0.296619,
'Memory Management Unit/Runtime Dynamic': 0.0319575,
'Memory Management Unit/Subthreshold Leakage': 0.0766103,
'Memory Management Unit/Subthreshold Leakage with power gating': 0.0398333,
'Peak Dynamic': 14.4153,
'Renaming Unit/Area': 0.303608,
'Renaming Unit/FP Front End RAT/Area': 0.131045,
'Renaming Unit/FP Front End RAT/Gate Leakage': 0.00351123,
'Renaming Unit/FP Front End RAT/Peak Dynamic': 2.51468,
'Renaming Unit/FP Front End RAT/Runtime Dynamic': 0.134308,
'Renaming Unit/FP Front End RAT/Subthreshold Leakage': 0.0308571,
'Renaming Unit/FP Front End RAT/Subthreshold Leakage with power gating': 0.0175885,
'Renaming Unit/Free List/Area': 0.0340654,
'Renaming Unit/Free List/Gate Leakage': 2.5481e-05,
'Renaming Unit/Free List/Peak Dynamic': 0.0306032,
'Renaming Unit/Free List/Runtime Dynamic': 0.00559899,
'Renaming Unit/Free List/Subthreshold Leakage': 0.000370144,
'Renaming Unit/Free List/Subthreshold Leakage with power gating': 0.000201064,
'Renaming Unit/Gate Leakage': 0.00708398,
'Renaming Unit/Int Front End RAT/Area': 0.0941223,
'Renaming Unit/Int Front End RAT/Gate Leakage': 0.000283242,
'Renaming Unit/Int Front End RAT/Peak Dynamic': 0.731965,
'Renaming Unit/Int Front End RAT/Runtime Dynamic': 0.0419014,
'Renaming Unit/Int Front End RAT/Subthreshold Leakage': 0.00435488,
'Renaming Unit/Int Front End RAT/Subthreshold Leakage with power gating': 0.00248228,
'Renaming Unit/Peak Dynamic': 3.58947,
'Renaming Unit/Runtime Dynamic': 0.181809,
'Renaming Unit/Subthreshold Leakage': 0.0552466,
'Renaming Unit/Subthreshold Leakage with power gating': 0.0276461,
'Runtime Dynamic': 2.13705,
'Subthreshold Leakage': 6.16288,
'Subthreshold Leakage with power gating': 2.55328}],
'DRAM': {'Area': 0,
'Gate Leakage': 0,
'Peak Dynamic': 5.992947460345098,
'Runtime Dynamic': 5.992947460345098,
'Subthreshold Leakage': 4.252,
'Subthreshold Leakage with power gating': 4.252},
'L3': [{'Area': 61.9075,
'Gate Leakage': 0.0484137,
'Peak Dynamic': 0.282264,
'Runtime Dynamic': 0.0831713,
'Subthreshold Leakage': 6.80085,
'Subthreshold Leakage with power gating': 3.32364}],
'Processor': {'Area': 191.908,
'Gate Leakage': 1.53485,
'Peak Dynamic': 73.8327,
'Peak Power': 106.945,
'Runtime Dynamic': 15.6615,
'Subthreshold Leakage': 31.5774,
'Subthreshold Leakage with power gating': 13.9484,
'Total Cores/Area': 128.669,
'Total Cores/Gate Leakage': 1.4798,
'Total Cores/Peak Dynamic': 73.5505,
'Total Cores/Runtime Dynamic': 15.5783,
'Total Cores/Subthreshold Leakage': 24.7074,
'Total Cores/Subthreshold Leakage with power gating': 10.2429,
'Total L3s/Area': 61.9075,
'Total L3s/Gate Leakage': 0.0484137,
'Total L3s/Peak Dynamic': 0.282264,
'Total L3s/Runtime Dynamic': 0.0831713,
'Total L3s/Subthreshold Leakage': 6.80085,
'Total L3s/Subthreshold Leakage with power gating': 3.32364,
'Total Leakage': 33.1122,
'Total NoCs/Area': 1.33155,
'Total NoCs/Gate Leakage': 0.00662954,
'Total NoCs/Peak Dynamic': 0.0,
'Total NoCs/Runtime Dynamic': 0.0,
'Total NoCs/Subthreshold Leakage': 0.0691322,
'Total NoCs/Subthreshold Leakage with power gating': 0.0259246}} |
def solve():
print(5)
def calc_new_grid(grid):
ans = grid.copy()
for i in range(len(grid)):
for j in range(len(grid[i])):
if grid[i][j] == '.':
ans[i] = ans[i][0:j] + '.' + ans[i][j+1:]
continue
ctr = 0
if ((i > 0 and i < len(grid)-1) and (j > 0 and j < len(grid[i])-1)):
if grid[i-1][j-1] == '#': ctr +=1
if grid[i-1][j] == '#': ctr +=1
if grid[i-1][j+1] == '#': ctr +=1
if grid[i][j-1] == '#': ctr +=1
if grid[i][j+1] == '#': ctr +=1
if grid[i+1][j-1] == '#': ctr +=1
if grid[i+1][j] == '#': ctr +=1
if grid[i+1][j+1] == '#': ctr +=1
else:
if i == 0 and j == 0:
if grid[0][1] == '#': ctr+=1
if grid[1][0] == '#': ctr+=1
if grid[1][1] == '#': ctr+=1
elif (i == len(grid)-1 and j == 0):
if grid[i-1][j] == '#': ctr+=1
if grid[i-1][j+1] == '#': ctr+=1
if grid[i][j+1] == '#': ctr+=1
elif (i == 0 and j == len(grid[i])-1):
if grid[i][j-1] == '#': ctr+=1
if grid[i+1][j] == '#': ctr+=1
if grid[i+1][j-1] == '#': ctr+=1
elif (i == len(grid)-1 and j == len(grid[i])-1):
if grid[i][j-1] == '#': ctr+=1
if grid[i-1][j] == '#': ctr+=1
if grid[i-1][j-1] == '#': ctr+=1
else:
if i == 0:
if grid[i][j-1] == '#': ctr+=1
if grid[i][j+1] == '#': ctr+=1
if grid[i+1][j+1] == '#': ctr+=1
if grid[i+1][j] == '#': ctr+=1
if grid[i+1][j-1] == '#': ctr+=1
if i == len(grid)-1:
if grid[i][j-1] == '#': ctr+=1
if grid[i][j+1] == '#': ctr+=1
if grid[i-1][j+1] == '#': ctr+=1
if grid[i-1][j] == '#': ctr+=1
if grid[i-1][j-1] == '#': ctr+=1
if j == 0:
if grid[i+1][j] == '#': ctr+=1
if grid[i+1][j+1] == '#': ctr+=1
if grid[i][j+1] == '#': ctr+=1
if grid[i-1][j] == '#': ctr+=1
if grid[i-1][j+1] == '#': ctr+=1
if j == len(grid[i])-1:
if grid[i+1][j] == '#': ctr+=1
if grid[i+1][j-1] == '#': ctr+=1
if grid[i][j-1] == '#': ctr+=1
if grid[i-1][j] == '#': ctr+=1
if grid[i-1][j-1] == '#': ctr+=1
if ctr >= 4:
ans[i] = ans[i][0:j] + 'L' + ans[i][j+1:]
elif (ctr == 0 and grid[i][j] == 'L'):
ans[i] = ans[i][0:j] + '#' + ans[i][j+1:]
return ans
def print_grid(grid):
for i in grid:
print(i)
print('\n\n')
def main():
grid = open('etc/data.txt').read().splitlines()
last = grid.copy()
ctr=0
print_grid(last)
while ctr < 1000:
new_grid = calc_new_grid(last)
if new_grid == last:
break
else:
last = new_grid
print_grid(last)
ctr+=1
ans = 0
for i in last:
for j in i:
if j == '#':
ans += 1
print(ans)
main()
|
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Tests for `staff_info` package."""
|
#
# Copyright (c) 2014, Multyvac 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.
#
# 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.
#
"""
All modules that are pre-installed on the base Multyvac layer.
Generated by running the following on an empty layer:
import pkgutil
mods = list(pkgutil.iter_modules())
print([entry for entry in sorted([[mod, is_pkg] for _,mod,is_pkg in mods])])
"""
modules = {}
modules['pywren_3.6'] = {'preinstalls': [['OpenSSL', True],
['PIL', True],
['__future__', False],
['_asyncio', False],
['_bisect', False],
['_blake2', False],
['_bootlocale', False],
['_bz2', False],
['_cffi_backend', False],
['_codecs_cn', False],
['_codecs_hk', False],
['_codecs_iso2022', False],
['_codecs_jp', False],
['_codecs_kr', False],
['_codecs_tw', False],
['_collections_abc', False],
['_compat_pickle', False],
['_compression', False],
['_crypt', False],
['_csv', False],
['_ctypes', False],
['_ctypes_test', False],
['_curses', False],
['_curses_panel', False],
['_datetime', False],
['_dbm', False],
['_decimal', False],
['_dummy_thread', False],
['_elementtree', False],
['_gdbm', False],
['_hashlib', False],
['_heapq', False],
['_json', False],
['_lsprof', False],
['_lzma', False],
['_markupbase', False],
['_md5', False],
['_multibytecodec', False],
['_multiprocessing', False],
['_opcode', False],
['_osx_support', False],
['_pickle', False],
['_posixsubprocess', False],
['_pydecimal', False],
['_pyio', False],
['_random', False],
['_sha1', False],
['_sha256', False],
['_sha3', False],
['_sha512', False],
['_sitebuiltins', False],
['_socket', False],
['_sqlite3', False],
['_ssl', False],
['_strptime', False],
['_struct', False],
['_sysconfigdata_m_linux_x86_64-linux-gnu', False],
['_testbuffer', False],
['_testcapi', False],
['_testimportmultiple', False],
['_testmultiphase', False],
['_threading_local', False],
['_tkinter', False],
['_weakrefset', False],
['abc', False],
['aifc', False],
['antigravity', False],
['argparse', False],
['array', False],
['asn1crypto', True],
['ast', False],
['asynchat', False],
['asyncio', True],
['asyncore', False],
['attr', True],
['audioop', False],
['autobahn', True],
['automat', True],
['base64', False],
['bdb', False],
['binascii', False],
['binhex', False],
['bisect', False],
['botocore', True],
['bs4', True],
['bson', True],
['bz2', False],
['cProfile', False],
['calendar', False],
['cassandra', True],
['certifi', True],
['cffi', True],
['cgi', False],
['cgitb', False],
['chardet', True],
['chunk', False],
['click', True],
['clidriver', True],
['cloudant', True],
['cmath', False],
['cmd', False],
['code', False],
['codecs', False],
['codeop', False],
['collections', True],
['colorsys', False],
['compileall', False],
['concurrent', True],
['config', False],
['configparser', False],
['constantly', True],
['contextlib', False],
['copy', False],
['copyreg', False],
['crypt', False],
['cryptography', True],
['cssselect', True],
['csv', False],
['ctypes', True],
['curses', True],
['datetime', False],
['dateutil', True],
['dbm', True],
['decimal', False],
['difflib', False],
['dis', False],
['distutils', True],
['doctest', False],
['docutils', True],
['dummy_threading', False],
['easy_install', False],
['elasticsearch', True],
['elasticsearch5', True],
['email', True],
['encodings', True],
['ensurepip', True],
['enum', False],
['exampleproj', True],
['fcntl', False],
['filecmp', False],
['fileinput', False],
['flask', True],
['fnmatch', False],
['formatter', False],
['fractions', False],
['ftplib', False],
['functools', False],
['genericpath', False],
['getopt', False],
['getpass', False],
['gettext', False],
['gevent', True],
['glob', False],
['greenlet', False],
['gridfs', True],
['grp', False],
['gzip', False],
['hamcrest', True],
['hashlib', False],
['heapq', False],
['hmac', False],
['html', True],
['http', True],
['httplib2', True],
['hyperlink', True],
['ibm_boto3', True],
['ibm_botocore', True],
['ibm_db', False],
['ibm_db_dbi', False],
['ibm_s3transfer', True],
['ibmcloudsql', True],
['idlelib', True],
['idna', True],
['imaplib', False],
['imghdr', False],
['imp', False],
['importlib', True],
['incremental', True],
['inspect', False],
['io', False],
['ipaddress', False],
['itsdangerous', False],
['jinja2', True],
['jmespath', True],
['json', True],
['kafka', True],
['keyword', False],
['lib2to3', True],
['linecache', False],
['locale', False],
['logging', True],
['lxml', True],
['lzma', False],
['macpath', False],
['macurl2path', False],
['mailbox', False],
['mailcap', False],
['markupsafe', True],
['math', False],
['mimetypes', False],
['mmap', False],
['modulefinder', False],
['multiprocessing', True],
['netrc', False],
['nis', False],
['nntplib', False],
['ntpath', False],
['nturl2path', False],
['numbers', False],
['numpy', True],
['opcode', False],
['operator', False],
['optparse', False],
['os', False],
['ossaudiodev', False],
['pandas', True],
['parsel', True],
['parser', False],
['pathlib', False],
['pdb', False],
['pickle', False],
['pickletools', False],
['pika', True],
['pip', True],
['pipes', False],
['pkg_resources', True],
['pkgutil', False],
['platform', False],
['plistlib', False],
['poplib', False],
['posixpath', False],
['pprint', False],
['profile', False],
['pstats', False],
['psycopg2', True],
['pty', False],
['py_compile', False],
['pyasn1', True],
['pyasn1_modules', True],
['pyclbr', False],
['pycparser', True],
['pydispatch', True],
['pydoc', False],
['pydoc_data', True],
['pyexpat', False],
['pymongo', True],
['pytz', True],
['queue', False],
['queuelib', True],
['quopri', False],
['random', False],
['re', False],
['readline', False],
['redis', True],
['reprlib', False],
['requests', True],
['resource', False],
['rlcompleter', False],
['runpy', False],
['sched', False],
['scipy', True],
['scrapy', True],
['secrets', False],
['select', False],
['selectors', False],
['service_identity', True],
['setuptools', True],
['shelve', False],
['shlex', False],
['shutil', False],
['signal', False],
['simplejson', True],
['site', False],
['six', False],
['sklearn', True],
['smtpd', False],
['smtplib', False],
['sndhdr', False],
['socket', False],
['socketserver', False],
['spwd', False],
['sqlite3', True],
['sre_compile', False],
['sre_constants', False],
['sre_parse', False],
['ssl', False],
['stat', False],
['statistics', False],
['string', False],
['stringprep', False],
['struct', False],
['subprocess', False],
['sunau', False],
['symbol', False],
['symtable', False],
['sysconfig', False],
['syslog', False],
['tabnanny', False],
['tarfile', False],
['telnetlib', False],
['tempfile', False],
['termios', False],
['testfunctions', False],
['tests', True],
['textwrap', False],
['this', False],
['threading', False],
['timeit', False],
['tkinter', True],
['token', False],
['tokenize', False],
['tornado', True],
['trace', False],
['traceback', False],
['tracemalloc', False],
['tty', False],
['turtle', False],
['turtledemo', True],
['twisted', True],
['txaio', True],
['types', False],
['typing', False],
['unicodedata', False],
['unittest', True],
['urllib', True],
['urllib3', True],
['uu', False],
['uuid', False],
['venv', True],
['virtualenv', False],
['virtualenv_support', True],
['w3lib', True],
['warnings', False],
['watson_developer_cloud', True],
['wave', False],
['weakref', False],
['webbrowser', False],
['werkzeug', True],
['wheel', True],
['wsgiref', True],
['xdrlib', False],
['xml', True],
['xmlrpc', True],
['xxlimited', False],
['zipapp', False],
['zipfile', False],
['zlib', False]],
'python_ver': '3.6'}
|
'''
给定一个包含 n 个整数的数组 nums 和一个目标值 target,判断 nums 中是否存在四个元素 a,b,c 和 d ,使得 a + b + c + d 的值与 target 相等?找出所有满足条件且不重复的四元组。
注意:
答案中不可以包含重复的四元组。
示例:
给定数组 nums = [1, 0, -1, 0, -2, 2],和 target = 0。
满足要求的四元组集合为:
[
[-1, 0, 0, 1],
[-2, -1, 1, 2],
[-2, 0, 0, 2]
]
'''
class Solution:
def fourSum(self, nums: List[int], target: int) -> List[List[int]]:
n = len(nums)
res = []
if n < 4:
return res
nums.sort()
for first in range(n - 3):
# 去除重复项
if first > 0 and nums[first] == nums[first - 1]:
continue
for second in range(first + 1, n - 2):
if second > first + 1 and nums[second] == nums[second - 1]:
continue
third, fourth = second + 1, n - 1
while third < fourth:
sumVal = nums[first] + nums[second] + nums[third] + nums[fourth]
if sumVal < target:
third += 1
elif sumVal > target:
fourth -= 1
else:
res.append([nums[first], nums[second], nums[third], nums[fourth]])
while third < fourth and nums[third] == nums[third + 1]:
third += 1
while third < fourth and nums[fourth] == nums[fourth - 1]:
fourth -= 1
third += 1
fourth -= 1
return res
|
{
'includes': ['../../common.gypi'],
'targets': [
{
'target_name': 'harfbuzz',
'type': 'static_library',
'defines': [
'HAVE_FREETYPE',
'HAVE_FT_GET_VAR_BLEND_COORDINATES',
'HAVE_INTEL_ATOMIC_PRIMITIVES',
'HAVE_OT',
'HAVE_UCDN',
],
'sources': [
'harfbuzz/src/hb-blob.cc',
'harfbuzz/src/hb-buffer-serialize.cc',
'harfbuzz/src/hb-buffer.cc',
'harfbuzz/src/hb-common.cc',
#'harfbuzz/src/hb-coretext.cc',
#'harfbuzz/src/hb-directwrite.cc',
'harfbuzz/src/hb-face.cc',
#'harfbuzz/src/hb-fallback-shape.cc',
'harfbuzz/src/hb-font.cc',
'harfbuzz/src/hb-ft.cc',
#'harfbuzz/src/hb-glib.cc',
#'harfbuzz/src/hb-gobject-structs.cc',
#'harfbuzz/src/hb-graphite2.cc',
#'harfbuzz/src/hb-icu.cc',
'harfbuzz/src/hb-ot-font.cc',
'harfbuzz/src/hb-ot-layout.cc',
'harfbuzz/src/hb-ot-map.cc',
'harfbuzz/src/hb-ot-var.cc',
'harfbuzz/src/hb-ot-shape-complex-arabic.cc',
'harfbuzz/src/hb-ot-shape-complex-default.cc',
'harfbuzz/src/hb-ot-shape-complex-hangul.cc',
'harfbuzz/src/hb-ot-shape-complex-hebrew.cc',
'harfbuzz/src/hb-ot-shape-complex-indic-table.cc',
'harfbuzz/src/hb-ot-shape-complex-indic.cc',
'harfbuzz/src/hb-ot-shape-complex-khmer.cc',
'harfbuzz/src/hb-ot-shape-complex-myanmar.cc',
'harfbuzz/src/hb-ot-shape-complex-thai.cc',
'harfbuzz/src/hb-ot-shape-complex-tibetan.cc',
'harfbuzz/src/hb-ot-shape-complex-use-table.cc',
'harfbuzz/src/hb-ot-shape-complex-use.cc',
'harfbuzz/src/hb-ot-shape-fallback.cc',
'harfbuzz/src/hb-ot-shape-normalize.cc',
'harfbuzz/src/hb-ot-shape.cc',
'harfbuzz/src/hb-ot-tag.cc',
'harfbuzz/src/hb-set.cc',
'harfbuzz/src/hb-shape-plan.cc',
'harfbuzz/src/hb-shape.cc',
'harfbuzz/src/hb-shaper.cc',
'harfbuzz/src/hb-ucdn.cc',
#'harfbuzz/src/hb-ucdn/ucdn.c',
'harfbuzz/src/hb-unicode.cc',
#'harfbuzz/src/hb-uniscribe.cc',
'harfbuzz/src/hb-warning.cc',
'harfbuzz/src/hb-buffer-deserialize-json.rl',
'harfbuzz/src/hb-buffer-deserialize-text.rl',
'harfbuzz/src/hb-ot-shape-complex-indic-machine.rl',
'harfbuzz/src/hb-ot-shape-complex-khmer-machine.rl',
'harfbuzz/src/hb-ot-shape-complex-myanmar-machine.rl',
'harfbuzz/src/hb-ot-shape-complex-use-machine.rl',
],
'direct_dependent_settings': {
'include_dirs': [
'autoconf_generated',
'harfbuzz/src',
],
},
'include_dirs': [
'autoconf_generated',
'harfbuzz/src',
#'harfbuzz/src/hb-ucdn',
'<(INTERMEDIATE_DIR)',
],
'rules': [
{
'rule_name': 'ragel',
'extension': 'rl',
'outputs': [
'<(INTERMEDIATE_DIR)/<(RULE_INPUT_ROOT).hh'
],
'action': [
'<(PRODUCT_DIR)/ragel', '-e', '-F1',
'-o', '<@(_outputs)',
'<(RULE_INPUT_PATH)'
],
}
],
'dependencies': [
'../freetype/freetype.gyp:freetype',
'../ragel/ragel.gyp:ragel',
'../ucdn/ucdn.gyp:ucdn',
],
},
]
}
|
print('===== DESAFIO 085 =====')
num = 0
for p in range(0, 7):
num = int(input('digite um numero: ')) |
sites_dict = {
'forbes': '(.*)forbes.com(.*)',
'hnews': '(.*)news.ycombinator.com(.*)',
'reddit': '(.*)reddit.com(.*)',
'hackaday': '(.*)hackaday.com(.*)',
}
|
'''
This module works with the board for skyscrapers game.
https://github.com/cosssec/skyscrapers
'''
def read_input(path: str):
"""
Read game board file from path.
Return list of str.
"""
digits = []
with open(path, 'r') as data:
for line in data:
line = line.strip()
line = line.split(' ')
str_digits = []
for digit in line:
str_digits.append(digit)
digits.extend(str_digits)
return digits
# print(read_input("input.txt"))
def left_to_right_check(input_line: str, pivot: int):
"""
Check row-wise visibility from left to right.
Return True if number of building from the left-most hint is visible \
looking to the right,
False otherwise.
input_line - representing board row.
pivot - number on the left-most hint of the input_line.
>>> left_to_right_check("412453*", 4)
True
>>> left_to_right_check("45453*", 5)
False
"""
res = 1
houses = input_line[1:-1]
now = houses[0]
for i in range(len(houses)):
if houses[i] > now:
res += 1
now = houses[i]
if res == pivot:
return True
return False
# print(left_to_right_check("4453*", 4))
def check_not_finished_board(board: list):
"""
Check if skyscraper board is not finished, i.e., '?' \
present on the game board.
Return True if finished, False otherwise.
>>> check_not_finished_board(['***21**', '4?????*', '4?????*', '*?????5', \
'*?????*', '*?????*', '*2*1***'])
False
>>> check_not_finished_board(['***21**', '412453*', '423145*', '*543215', \
'*35214*', '*41532*', '*2*1***'])
True
>>> check_not_finished_board(['***21**', '412453*', '423145*', '*5?3215', \
'*35214*', '*41532*', '*2*1***'])
False
"""
for small_lst in board:
for element in small_lst:
if element == '?':
return False
return True
# print(check_not_finished_board(
# ['***21**', '412453*', '423145*', '*543215', '*35214*', '*41532*', \
# '*2*1***']))
def check_uniqueness_in_rows(board: list):
"""
Check buildings of unique height in each row.
Return True if buildings in a row have unique length, False otherwise.
>>> check_uniqueness_in_rows(['***21**', '412453*', '423145*', '*543215', \
'*35214*', '*41532*', '*2*1***'])
True
>>> check_uniqueness_in_rows(['***21**', '452453*', '423145*', '*543215', \
'*35214*', '*41532*', '*2*1***'])
False
>>> check_uniqueness_in_rows(['***21**', '412453*', '423145*', '*553215', \
'*35214*', '*41532*', '*2*1***'])
False
"""
for line in board[1:-1]:
if len(list(line[1:-1])) != len(set(line[1:-1])):
return False
return True
# print(check_uniqueness_in_rows(
# ['***21**', '412453*', '423145*', '*553215', '*35214*', '*41532*', \
# '*2*1***']))
def check_horizontal_visibility(board: list):
"""
Check row-wise visibility (left-right and vice versa)
Return True if all horizontal hints are satisfiable,
i.e., for line 412453* , hint is 4, and 1245 are the four buildings
that could be observed from the hint looking to the right.
>>> check_horizontal_visibility(['***21**', '412453*', '423145*', \
'*543215', '*35214*', '*41532*', '*2*1***'])
True
>>> check_horizontal_visibility(['***21**', '452453*', '423145*', \
'*543215', '*35214*', '*41532*', '*2*1***'])
False
>>> check_horizontal_visibility(['***21**', '452413*', '423145*', \
'*543215', '*35214*', '*41532*', '*2*1***'])
False
"""
all_booleans = []
for line in board[1:-1]:
# print(line_splitted)
if line[0] != '*':
all_booleans.append(left_to_right_check(line, int(line[0])))
if line[-1] != '*':
all_booleans.append(left_to_right_check(
line[::-1], int(line[::-1][0])))
return all(all_booleans)
# print(check_horizontal_visibility(
# ['***21**', '412453*', '423145*', '*543215', '*35214*', \
# '*41532*', '*2*1***']))
def check_columns(board: list):
"""
Check column-wise compliance of the board for uniqueness \
(buildings of unique height) and visibility (top-bottom and vice versa).
Same as for horizontal cases, but aggregated in one function for vertical \
case, i.e. columns.
>>> check_columns(['***21**', '412453*', '423145*', '*543215', '*35214*', \
'*41532*', '*2*1***'])
True
>>> check_columns(['***21**', '412453*', '423145*', '*543215', '*35214*', \
'*41232*', '*2*1***'])
False
>>> check_columns(['***21**', '412553*', '423145*', '*543215', '*35214*', \
'*41532*', '*2*1***'])
False
"""
all_lines = []
for inner in range(len(board)):
n_lst = []
for element in range(len(board[inner])):
n_lst.append(board[element][inner])
all_lines.append(''.join(n_lst))
return check_horizontal_visibility(all_lines) and check_uniqueness_in_rows(all_lines)
# print(check_columns(['***21**', '412453*', '423145*',
# '*543215', '*35214*', '*41532*', '*2*1***']))
def check_skyscrapers(input_path: str):
"""
Main function to check the status of skyscraper game board.
Return True if the board status is compliant with the rules,
False otherwise.
"""
board = read_input(input_path)
if check_not_finished_board(board) == False or\
check_uniqueness_in_rows(board) == False or\
check_horizontal_visibility(board) == False\
or check_columns(board) == False:
return False
return True
# print(check_skyscrapers("check.txt"))
if __name__ == "__main__":
print(check_horizontal_visibility(
['*44****', '*125342', '*23451*', '2413251', '254213*', '*35142*', '***5***']))
|
# Python Program To Insert A New Elements Into A Tuple Of Elements At A Specified Position
'''
Function Name : Insert New Element Into Tuple At Any Position.
Function Date : 12 Sep 2020
Function Author : Prasad Dangare
Input : String,Integer
Output : String,Integer
'''
print("\n")
names = (' Prasad', 'Hritik','Shubham', 'Shiva')
print(names)
# Accept New Name And Position Numbers
lst = [input('\n Enter A New Name : ')]
new = tuple(lst)
pos = int(input('\n Enter Position No : '))
# Copy From 0th To pos-2 Into Tuple names1
names1 = names[0:pos-1]
# Concatenate New Elements At pos -1
names1 = names1+new
# Concatenate The Remaining Elements Of Names From pos-1 Till End
names = names1+names[pos-1:]
print(names)
print("\n") |
###############################################
# #
# PoC: Smartshark #
# #
# USAGE: #
# #
# Script to clean datasets #
# #
# #
# Put in row every Label and redirect #
# output to your new file #
# #
# #
# You can use 'ds_create_row_label.py' #
# to create your row variable #
# #
###############################################
#Choose your file
fichier = open("/run/media/Thytu/TOSHIBA EXT/PoC/Smartshark/DS/ds_benign_cleared_div_3_18rows.csv", "r")
#FOR DDOS
row = dict([('SourcePort', True), ('DestinationPort', True), ('Protocol', True), ('FlowDuration', True), ('TotalFwdPackets', True), ('TotalBackwardPackets', True), ('TotalLengthofFwdPackets', True), ('TotalLengthofBwdPackets', True), ('FwdPacketLengthMean', True), ('FwdPacketLengthStd', True), ('BwdPacketLengthMean', True), ('BwdPacketLengthStd', True), ('FlowBytes/s', False), ('FlowPackets/s', False), ('PacketLengthMean', True), ('PacketLengthStd', True), ('PacketLengthVariance', True), ('AveragePacketSize', True)])
"""
#FOR CLEANED
row = dict([('SrcPort', True), ('DstPort', True), ('Protocol', True), ('FlowDuration', True), ('TotalFwdPacket', True), ('TotalBwdpackets', True), ('TotalLengthofFwdPacket', True), ('TotalLengthofBwdPacket', True), ('FwdPacketLengthMean', True), ('FwdPacketLengthStd', True), ('BwdPacketLengthMean', True), ('BwdPacketLengthStd', True), ('FlowBytes/s', False), ('FlowPackets/s', False), ('PacketLengthMean', True), ('PacketLengthStd', True), ('PacketLengthVariance', True), ('AveragePacketSize', True)])
"""
def get_next_value(i, str, first):
if first:
result = ""
else:
result = ","
while (str[i] != ',' and str[i] != '\n'):
result = result + str[i]
i += 1
return (i, result)
result = ""
tmp = ""
for line in fichier:
first = True
index = 0
for i in row:
index, tmp = get_next_value(index, line, first)
if row.get(i):
first = False
result += tmp
index += 1
if (len(result) > 0 and result[len(result) - 1] != '\n'):
result += '\n'
print(result, end="", sep="")
fichier.close()
|
class Solution(object):
def convertToTitle(self, n):
"""
:type n: int
:rtype: str
"""
res = ''
base = ord('A') - 1
while n > 0:
rem = n % 26
rem = 26 if rem == 0 else rem
res = chr(rem + base) + res
n = (n - rem) / 26
return res
|
#chamar 5 valores
#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
#analisando os valores passados..
#1 2 3 Foram informados 3 valores ao todos.
#o maior valor informado foi 3.
#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
#se for zero o maior valor vai ser zero
def valores(*n):
maior = menor = 0
print('-'*35)
print('Analisando os valores passados...')
print(*n,sep=' ',end=' ')
tamanho = len(n)
print(f'Foram informados {tamanho} valores ao todos.')
#print(f'O maior valor informado foi {max(n)}')
for tp in n:
if tp == 1:
maior = tp
menor = tp
else:
if tp>maior:
maior = tp
if tp<menor:
menor = tp
print(f'O maior valor informado foi {maior}')
valores(1,2,3,4,5)
valores(12,34,5)
valores(78,6,45,32)
valores(7)
valores(20,21,22,23)
valores()
valores(0) |
#!/usr/bin/env python3
inputStr = input()
map1Str = input()
map2Str = input()
outputStr = ''
for i in inputStr:
match = False
for mapCharIndex, mapChar in enumerate( map1Str ):
if i == mapChar:
outputStr += map2Str[mapCharIndex]
match = True
break
for mapCharIndex, mapChar in enumerate( map2Str ):
if i == mapChar:
outputStr += map1Str[mapCharIndex]
match = True
break
if not match:
outputStr += i
print( '{}'.format( outputStr ) )
|
class spexxyException(Exception):
def __init__(self, message=""):
self.message = message
class spexxyValueTooLowException(spexxyException):
pass
class spexxyValueTooHighException(spexxyException):
pass
|
coordinates_E0E1E1 = ((127, 121),
(128, 121), (129, 105), (129, 107), (129, 121), (130, 103), (130, 104), (130, 108), (130, 121), (130, 123), (131, 100), (131, 105), (131, 106), (131, 107), (131, 109), (131, 120), (131, 122), (132, 100), (132, 103), (132, 104), (132, 105), (132, 106), (132, 108), (132, 119), (132, 122), (133, 100), (133, 102), (133, 103), (133, 104), (133, 105), (133, 107), (133, 118), (133, 121), (133, 132), (134, 100), (134, 101), (134, 102), (134, 103), (134, 104), (134, 105), (134, 107), (134, 117), (134, 119), (134, 122), (134, 133), (134, 135), (135, 101), (135, 103), (135, 104), (135, 105), (135, 107), (135, 115), (135, 117), (135, 122), (135, 133), (135, 135), (136, 101), (136, 103), (136, 104), (136, 105), (136, 106), (136, 107), (136, 108), (136, 112), (136, 113), (136, 122), (136, 123), (136, 133), (136, 134), (137, 101), (137, 103), (137, 104), (137, 105),
(137, 108), (137, 110), (137, 124), (137, 132), (138, 101), (138, 103), (138, 104), (138, 107), (138, 123), (138, 125), (138, 130), (139, 101), (139, 103), (139, 105), (139, 123), (139, 127), (139, 129), (140, 101), (140, 104), (140, 124), (140, 126), (141, 103), (141, 112), (141, 124), (141, 126), (141, 128), (142, 102), (142, 110), (142, 111), (142, 124), (142, 126), (142, 128), (143, 102), (143, 108), (143, 109), (143, 124), (143, 126), (143, 128), (143, 140), (144, 102), (144, 108), (144, 123), (144, 125), (144, 126), (144, 128), (144, 133), (144, 134), (144, 138), (144, 140), (145, 103), (145, 105), (145, 107), (145, 121), (145, 128), (145, 129), (145, 133), (145, 140), (146, 103), (146, 107), (146, 119), (146, 121), (146, 122), (146, 123), (146, 124), (146, 125), (146, 126), (146, 127), (146, 128), (146, 130), (146, 132), (146, 140), (147, 104),
(147, 106), (147, 128), (147, 131), (148, 105), (148, 107), (148, 128), (148, 130), (149, 106), (149, 107), (149, 128), (149, 129), (150, 107), (150, 128), (150, 129), (151, 108), (151, 110), (151, 111), (151, 128), (151, 129), (152, 109), (152, 112), (152, 113), (152, 115), (152, 128), (153, 111), (153, 116), (153, 131), (153, 132), (154, 132), (154, 134), (155, 133), (158, 133), )
coordinates_E1E1E1 = ((87, 126),
(87, 128), (88, 124), (88, 127), (89, 125), (89, 127), (90, 126), (90, 127), (91, 127), (92, 127), (93, 127), (94, 104), (94, 118), (94, 119), (94, 127), (94, 136), (94, 138), (95, 103), (95, 105), (95, 113), (95, 115), (95, 116), (95, 117), (95, 127), (95, 128), (95, 136), (95, 140), (96, 105), (96, 119), (96, 128), (96, 136), (96, 138), (96, 140), (97, 105), (97, 115), (97, 118), (97, 127), (97, 136), (97, 138), (97, 140), (98, 105), (98, 116), (98, 118), (98, 127), (98, 136), (98, 138), (98, 139), (98, 140), (98, 141), (99, 105), (99, 106), (99, 116), (99, 118), (99, 135), (99, 136), (99, 143), (100, 104), (100, 106), (100, 116), (100, 118), (100, 135), (100, 137), (100, 138), (100, 139), (100, 140), (100, 142), (101, 104), (101, 106), (101, 115), (101, 118), (101, 135), (102, 103), (102, 105),
(102, 114), (102, 116), (102, 117), (102, 119), (102, 134), (103, 103), (103, 105), (103, 113), (103, 115), (103, 116), (103, 117), (103, 119), (103, 132), (103, 133), (104, 103), (104, 105), (104, 113), (104, 115), (104, 116), (104, 117), (104, 118), (104, 120), (104, 132), (105, 103), (105, 105), (105, 113), (105, 114), (105, 115), (105, 116), (105, 117), (105, 118), (105, 119), (105, 121), (105, 127), (105, 129), (106, 103), (106, 105), (106, 114), (106, 116), (106, 117), (106, 118), (106, 119), (106, 120), (106, 122), (106, 126), (106, 130), (107, 102), (107, 105), (107, 114), (107, 116), (107, 117), (107, 118), (107, 119), (107, 120), (107, 122), (107, 125), (107, 127), (107, 128), (107, 130), (108, 102), (108, 105), (108, 114), (108, 116), (108, 117), (108, 118), (108, 119), (108, 120), (108, 121), (108, 122), (108, 124), (108, 126), (108, 127),
(108, 128), (108, 130), (109, 101), (109, 103), (109, 114), (109, 116), (109, 117), (109, 118), (109, 119), (109, 120), (109, 121), (109, 122), (109, 123), (109, 125), (109, 129), (109, 131), (110, 102), (110, 114), (110, 116), (110, 120), (110, 121), (110, 122), (110, 123), (110, 126), (110, 127), (110, 128), (110, 129), (110, 130), (110, 131), (110, 132), (110, 133), (110, 134), (110, 135), (110, 137), (111, 100), (111, 102), (111, 113), (111, 115), (111, 118), (111, 119), (111, 120), (111, 121), (111, 122), (111, 125), (111, 134), (112, 100), (112, 102), (112, 113), (112, 120), (112, 123), (112, 136), (113, 100), (113, 102), (113, 112), (113, 113), (113, 114), (113, 116), (113, 120), (113, 122), (113, 136), (114, 101), (114, 103), (114, 106), (114, 108), (114, 109), (114, 120), (114, 122), (115, 102), (115, 104), (115, 105), (115, 106), (115, 107),
(115, 120), (115, 121), (116, 119), (116, 121), (117, 119), (117, 121), (118, 118), (118, 120), (119, 113), (119, 115), (119, 116), (119, 120), (120, 112), (120, 114), (120, 115), (120, 116), (120, 117), (120, 119), )
coordinates_60CC60 = ((97, 158),
(97, 159), (98, 157), (98, 159), (99, 159), (100, 151), (100, 156), (100, 158), (100, 160), (101, 151), (101, 155), (101, 157), (101, 158), (101, 160), (102, 150), (102, 152), (102, 153), (102, 156), (102, 157), (102, 158), (102, 160), (103, 151), (103, 152), (103, 155), (103, 156), (103, 157), (103, 158), (103, 160), (104, 149), (104, 151), (104, 152), (104, 153), (104, 154), (104, 155), (104, 156), (104, 157), (104, 158), (104, 160), (105, 148), (105, 150), (105, 151), (105, 152), (105, 153), (105, 154), (105, 155), (105, 156), (105, 157), (105, 158), (105, 160), (106, 148), (106, 150), (106, 151), (106, 152), (106, 153), (106, 154), (106, 155), (106, 156), (106, 157), (106, 158), (106, 159), (106, 161), (107, 147), (107, 149), (107, 150), (107, 151), (107, 152), (107, 153), (107, 154), (107, 155), (107, 156), (107, 157), (107, 158), (107, 159),
(107, 161), (108, 147), (108, 149), (108, 150), (108, 151), (108, 152), (108, 153), (108, 154), (108, 155), (108, 156), (108, 157), (108, 158), (108, 159), (108, 160), (108, 161), (108, 162), (109, 147), (109, 149), (109, 150), (109, 151), (109, 152), (109, 153), (109, 154), (109, 155), (109, 156), (109, 157), (109, 158), (109, 159), (109, 160), (109, 162), (110, 147), (110, 149), (110, 150), (110, 151), (110, 152), (110, 153), (110, 154), (110, 155), (110, 156), (110, 157), (110, 158), (110, 159), (110, 160), (110, 162), (111, 147), (111, 149), (111, 150), (111, 151), (111, 152), (111, 153), (111, 154), (111, 155), (111, 156), (111, 157), (111, 158), (111, 159), (111, 161), (112, 147), (112, 149), (112, 150), (112, 151), (112, 152), (112, 153), (112, 154), (112, 155), (112, 156), (112, 157), (112, 158), (112, 159), (112, 161), (113, 147), (113, 149),
(113, 150), (113, 151), (113, 152), (113, 153), (113, 154), (113, 155), (113, 156), (113, 157), (113, 158), (113, 159), (113, 161), (114, 147), (114, 149), (114, 150), (114, 151), (114, 152), (114, 153), (114, 154), (114, 155), (114, 156), (114, 157), (114, 158), (114, 159), (114, 161), (115, 147), (115, 149), (115, 150), (115, 151), (115, 152), (115, 153), (115, 154), (115, 155), (115, 156), (115, 157), (115, 158), (115, 160), (116, 147), (116, 149), (116, 150), (116, 151), (116, 152), (116, 153), (116, 154), (116, 155), (116, 156), (116, 157), (116, 158), (116, 160), (117, 147), (117, 149), (117, 150), (117, 151), (117, 152), (117, 153), (117, 154), (117, 155), (117, 156), (117, 157), (117, 159), (118, 147), (118, 149), (118, 150), (118, 151), (118, 152), (118, 153), (118, 154), (118, 155), (118, 156), (118, 157), (118, 159), (119, 148), (119, 150),
(119, 151), (119, 152), (119, 153), (119, 154), (119, 155), (119, 156), (119, 158), (120, 155), (120, 156), (120, 158), (121, 149), (121, 151), (121, 153), (121, 154), (121, 158), (122, 155), (122, 157), )
coordinates_5FCC60 = ((131, 153),
(132, 148), (132, 150), (132, 151), (132, 152), (132, 153), (132, 155), (133, 147), (133, 153), (133, 156), (133, 158), (134, 147), (134, 149), (134, 150), (134, 151), (134, 152), (134, 153), (134, 154), (134, 155), (134, 158), (135, 147), (135, 149), (135, 150), (135, 151), (135, 152), (135, 153), (135, 154), (135, 155), (135, 156), (135, 157), (135, 159), (136, 147), (136, 149), (136, 150), (136, 151), (136, 152), (136, 153), (136, 154), (136, 155), (136, 156), (136, 157), (136, 159), (137, 147), (137, 149), (137, 150), (137, 151), (137, 152), (137, 153), (137, 154), (137, 155), (137, 156), (137, 157), (137, 159), (138, 146), (138, 148), (138, 149), (138, 150), (138, 151), (138, 152), (138, 153), (138, 154), (138, 155), (138, 156), (138, 157), (138, 159), (139, 146), (139, 148), (139, 149), (139, 150), (139, 151), (139, 152), (139, 153), (139, 154),
(139, 155), (139, 156), (139, 157), (139, 159), (140, 147), (140, 149), (140, 150), (140, 151), (140, 152), (140, 153), (140, 154), (140, 155), (140, 156), (140, 157), (140, 159), (141, 147), (141, 149), (141, 150), (141, 151), (141, 152), (141, 153), (141, 154), (141, 155), (141, 156), (141, 157), (141, 159), (142, 147), (142, 149), (142, 150), (142, 151), (142, 152), (142, 153), (142, 154), (142, 155), (142, 156), (142, 157), (142, 158), (142, 159), (143, 148), (143, 150), (143, 151), (143, 152), (143, 153), (143, 154), (143, 155), (143, 156), (143, 158), (144, 148), (144, 150), (144, 151), (144, 152), (144, 158), (145, 147), (145, 149), (145, 150), (145, 151), (145, 152), (145, 154), (145, 155), (145, 157), (146, 147), (146, 150), (146, 152), (146, 157), (147, 148), (147, 152), (148, 151), (149, 150), )
coordinates_F4DEB3 = ((138, 93),
(138, 94), (139, 93), (139, 95), (140, 95), (141, 94), (141, 95), )
coordinates_26408B = ((134, 92),
(134, 93), (135, 92), (135, 94), (136, 92), (136, 94), )
coordinates_F5DEB3 = ((93, 99),
(93, 100), (94, 98), (94, 100), (95, 97), (95, 101), (96, 97), (96, 100), (97, 96), (97, 99), (98, 96), (98, 98), (99, 95), (99, 97), (100, 95), (101, 95), )
coordinates_016400 = ((124, 132),
(124, 134), (125, 132), (125, 135), (126, 132), (126, 134), (126, 137), (127, 133), (127, 135), (127, 138), (128, 133), (128, 135), (128, 136), (128, 137), (128, 140), (129, 133), (129, 135), (129, 136), (129, 137), (129, 138), (129, 141), (130, 133), (130, 135), (130, 136), (130, 137), (130, 138), (130, 139), (130, 140), (130, 142), (131, 133), (131, 137), (131, 138), (131, 139), (131, 140), (131, 142), (132, 135), (132, 137), (132, 138), (132, 139), (132, 140), (132, 142), (133, 137), (133, 139), (133, 140), (133, 142), (134, 137), (134, 139), (134, 141), (135, 137), (135, 139), (135, 141), (136, 137), (136, 139), (136, 141), (137, 136), (137, 138), (137, 141), (138, 134), (138, 137), (138, 140), (139, 132), (139, 134), (139, 135), (139, 138), (140, 131), (140, 132), (140, 137), (141, 130), )
coordinates_27408B = ((97, 101),
(98, 100), (99, 99), (99, 100), (100, 98), (100, 99), (101, 97), (102, 96), (102, 98), (103, 95), (103, 97), )
coordinates_006400 = ((106, 132),
(106, 133), (106, 135), (106, 136), (106, 137), (106, 138), (106, 139), (107, 132), (107, 141), (108, 133), (108, 135), (108, 136), (108, 137), (108, 138), (108, 139), (108, 144), (109, 140), (109, 144), (110, 140), (110, 142), (110, 143), (110, 145), (111, 139), (111, 141), (111, 142), (111, 143), (111, 145), (112, 138), (112, 140), (112, 141), (112, 142), (112, 143), (112, 145), (113, 138), (113, 140), (113, 141), (113, 142), (113, 143), (113, 145), (114, 138), (114, 140), (114, 141), (114, 142), (114, 143), (114, 145), (115, 139), (115, 141), (115, 142), (115, 143), (115, 145), (116, 139), (116, 141), (116, 142), (116, 144), (117, 139), (117, 141), (117, 143), (118, 138), (118, 139), (118, 142), (119, 137), (119, 141), (120, 134), (120, 135), (120, 140), (121, 132), (121, 134), (121, 135), (121, 136), (121, 137), (121, 139), )
coordinates_6395ED = ((123, 129),
(124, 129), (125, 128), (125, 130), (126, 128), (126, 130), (127, 127), (127, 130), (128, 127), (128, 129), (128, 131), (129, 127), (129, 129), (129, 131), (130, 125), (130, 127), (130, 128), (130, 130), (131, 125), (131, 127), (131, 128), (131, 129), (131, 131), (132, 124), (132, 126), (132, 127), (132, 128), (132, 130), (133, 124), (133, 126), (133, 127), (133, 128), (133, 130), (134, 124), (134, 126), (134, 127), (134, 128), (134, 130), (134, 131), (135, 125), (135, 127), (135, 128), (135, 129), (135, 131), (136, 126), (136, 130), (137, 127), (137, 129), )
coordinates_00FFFE = ((138, 142),
(139, 141), (139, 143), (140, 140), (140, 143), (141, 139), (141, 141), (141, 143), (142, 138), (142, 142), (142, 143), (143, 142), (143, 143), (144, 142), (144, 143), (145, 142), (145, 143), (146, 138), (146, 142), (146, 143), (147, 138), (147, 142), (147, 143), (148, 138), (148, 140), (148, 141), (148, 143), (149, 139), (149, 142), (149, 144), (150, 139), (150, 141), (150, 143), (151, 140), (151, 143), (152, 141), (152, 143), (153, 142), )
coordinates_F98072 = ((124, 110),
(124, 112), (124, 113), (124, 114), (124, 115), (124, 116), (124, 117), (124, 118), (124, 119), (124, 120), (124, 121), (124, 122), (124, 123), (124, 124), (124, 126), (125, 108), (125, 112), (125, 115), (125, 122), (125, 126), (126, 105), (126, 106), (126, 107), (126, 110), (126, 112), (126, 116), (126, 118), (126, 120), (126, 123), (126, 125), (127, 101), (127, 102), (127, 103), (127, 104), (127, 105), (127, 106), (127, 107), (127, 110), (127, 112), (127, 116), (127, 119), (127, 123), (127, 125), (128, 99), (128, 103), (128, 109), (128, 111), (128, 113), (128, 116), (128, 119), (128, 123), (128, 124), (129, 98), (129, 101), (129, 110), (129, 112), (129, 115), (129, 116), (129, 117), (129, 119), (130, 111), (130, 113), (130, 116), (130, 118), (131, 111), (131, 113), (131, 114), (131, 115), (132, 111), (132, 113), (132, 116), (133, 110), (133, 115),
(134, 109), (134, 111), (134, 113), )
coordinates_97FB98 = ((141, 134),
(142, 132), (142, 134), (142, 136), (143, 130), (143, 132), (145, 136), (146, 136), (147, 134), (147, 136), (148, 133), (148, 136), (149, 132), (149, 134), (149, 136), (150, 131), (150, 135), (150, 137), (151, 131), (151, 133), (151, 136), (151, 138), (152, 135), (152, 136), (152, 137), (152, 139), (153, 136), (153, 140), (154, 136), (154, 138), (154, 141), (155, 131), (155, 136), (155, 138), (155, 139), (155, 141), (156, 131), (156, 135), (156, 136), (156, 137), (156, 138), (156, 139), (156, 140), (156, 142), (157, 130), (157, 133), (157, 136), (157, 137), (157, 138), (157, 139), (157, 140), (157, 142), (158, 130), (158, 132), (158, 134), (158, 135), (158, 136), (158, 137), (158, 138), (158, 139), (158, 140), (158, 143), (159, 130), (159, 132), (159, 133), (159, 134), (159, 135), (159, 136), (159, 138), (159, 139), (160, 130), (160, 132), (160, 133),
(160, 134), (160, 135), (160, 137), (160, 141), (161, 130), (161, 132), (161, 133), (161, 134), (161, 135), (161, 138), (161, 140), (162, 129), (162, 135), (163, 130), (163, 132), (163, 134), )
coordinates_323287 = ((156, 113),
(156, 114), (156, 115), (156, 116), (156, 117), (156, 118), (156, 119), (156, 120), (156, 121), (156, 122), (156, 123), (156, 125), (157, 111), (157, 126), (158, 111), (158, 113), (158, 114), (158, 115), (158, 116), (158, 117), (158, 118), (158, 119), (158, 120), (158, 121), (158, 122), (158, 123), (158, 124), (158, 126), (159, 111), (159, 113), (159, 114), (159, 115), (159, 117), (159, 118), (159, 119), (159, 120), (159, 121), (159, 122), (159, 123), (159, 124), (159, 126), (160, 112), (160, 114), (160, 118), (160, 119), (160, 120), (160, 121), (160, 122), (160, 123), (160, 124), (160, 126), (161, 112), (161, 115), (161, 119), (161, 120), (161, 121), (161, 122), (161, 125), (162, 113), (162, 114), (162, 118), (162, 123), (162, 125), (163, 119), (163, 121), (163, 122), )
coordinates_6495ED = ((112, 127),
(112, 129), (112, 130), (112, 132), (113, 125), (113, 134), (114, 124), (114, 127), (114, 128), (114, 129), (114, 130), (114, 131), (114, 132), (114, 135), (115, 124), (115, 126), (115, 127), (115, 128), (115, 129), (115, 130), (115, 131), (115, 132), (115, 133), (115, 135), (116, 123), (116, 125), (116, 126), (116, 127), (116, 128), (116, 129), (116, 130), (116, 131), (116, 132), (116, 133), (116, 134), (116, 136), (117, 123), (117, 125), (117, 126), (117, 127), (117, 128), (117, 129), (117, 130), (117, 131), (117, 132), (117, 136), (118, 123), (118, 125), (118, 126), (118, 127), (118, 128), (118, 129), (118, 130), (118, 135), (119, 123), (119, 125), (119, 126), (119, 127), (119, 128), (119, 129), (119, 132), (120, 123), (120, 130), (121, 124), (121, 126), (121, 127), (121, 129), )
coordinates_01FFFF = ((102, 139),
(102, 140), (102, 142), (103, 135), (103, 137), (104, 134), (104, 136), (104, 137), (104, 138), (104, 139), (104, 140), (104, 144), (104, 146), (105, 141), (105, 146), (106, 143), (106, 146), )
coordinates_FA8072 = ((97, 103),
(98, 103), (99, 102), (100, 102), (101, 101), (102, 100), (102, 101), (103, 101), (104, 99), (104, 101), (105, 99), (105, 101), (106, 99), (106, 101), (107, 99), (107, 100), (108, 99), (109, 98), (109, 99), (110, 98), (111, 98), (112, 97), (112, 98), (113, 97), (113, 98), (113, 118), (114, 97), (114, 118), (115, 97), (115, 99), (115, 111), (115, 112), (115, 113), (115, 114), (115, 115), (115, 116), (115, 118), (116, 100), (116, 109), (116, 110), (116, 117), (117, 98), (117, 102), (117, 105), (117, 106), (117, 107), (117, 113), (117, 114), (117, 116), (117, 117), (118, 99), (118, 103), (118, 109), (118, 110), (118, 111), (119, 100), (119, 104), (119, 105), (119, 108), (119, 110), (120, 106), (120, 110), (121, 108), (121, 110), (121, 111), (121, 121), (121, 122), (122, 114), (122, 115), (122, 116), (122, 117), (122, 118), (122, 119),
)
coordinates_98FB98 = ((85, 134),
(85, 136), (86, 134), (86, 137), (87, 133), (87, 136), (87, 138), (88, 133), (88, 135), (88, 137), (88, 139), (88, 143), (89, 132), (89, 134), (89, 137), (89, 138), (89, 139), (89, 144), (89, 146), (90, 132), (90, 134), (90, 137), (90, 139), (90, 141), (90, 143), (90, 147), (91, 132), (91, 134), (91, 137), (91, 139), (91, 140), (91, 142), (91, 143), (91, 144), (91, 145), (91, 147), (92, 132), (92, 134), (92, 135), (92, 136), (92, 137), (92, 138), (92, 141), (92, 142), (92, 143), (92, 144), (92, 145), (92, 147), (93, 133), (93, 134), (93, 140), (93, 142), (93, 143), (93, 144), (93, 145), (93, 146), (93, 147), (93, 148), (94, 133), (94, 134), (94, 141), (94, 143), (94, 144), (94, 145), (94, 146), (94, 148), (95, 134), (95, 142), (95, 144), (95, 145), (95, 146), (95, 148), (96, 134),
(96, 142), (96, 145), (96, 146), (96, 148), (97, 134), (97, 143), (97, 144), (97, 145), (97, 146), (97, 148), (98, 145), (98, 148), (99, 133), (99, 145), (99, 147), (99, 148), (100, 133), (100, 144), (100, 147), (101, 132), (101, 144), (102, 144), (102, 147), )
coordinates_FEC0CB = ((131, 97),
(131, 98), (132, 97), (132, 98), (133, 97), (133, 98), (134, 98), (135, 98), (136, 98), (136, 119), (136, 120), (137, 98), (137, 116), (137, 117), (137, 118), (137, 120), (138, 99), (138, 112), (138, 113), (138, 114), (138, 119), (138, 121), (139, 99), (139, 109), (139, 111), (139, 112), (139, 113), (139, 114), (139, 115), (139, 116), (139, 117), (139, 118), (139, 119), (139, 121), (140, 99), (140, 107), (140, 110), (140, 117), (140, 118), (140, 119), (140, 121), (141, 99), (141, 108), (141, 116), (141, 117), (141, 118), (141, 119), (141, 120), (141, 122), (142, 99), (142, 105), (142, 107), (142, 115), (142, 117), (142, 118), (142, 122), (143, 99), (143, 100), (143, 104), (143, 113), (143, 116), (143, 117), (143, 119), (143, 121), (143, 122), (144, 99), (144, 100), (144, 111), (144, 115), (144, 116), (144, 117), (144, 118), (145, 99),
(145, 101), (145, 110), (145, 113), (145, 114), (145, 115), (145, 117), (146, 99), (146, 101), (146, 109), (146, 111), (146, 112), (146, 113), (146, 114), (146, 115), (146, 117), (147, 100), (147, 102), (147, 109), (147, 111), (147, 112), (147, 113), (147, 114), (147, 115), (147, 116), (147, 117), (148, 100), (148, 109), (148, 113), (148, 114), (148, 115), (148, 116), (148, 117), (148, 119), (148, 120), (148, 121), (148, 122), (148, 123), (148, 124), (148, 126), (149, 101), (149, 110), (149, 112), (149, 117), (149, 120), (149, 124), (149, 126), (150, 102), (150, 113), (150, 114), (150, 115), (150, 118), (150, 120), (150, 124), (150, 126), (151, 102), (151, 117), (151, 119), (151, 121), (151, 124), (152, 103), (152, 107), (152, 118), (152, 124), (152, 126), (153, 104), (153, 108), (153, 118), (153, 119), (153, 120), (153, 121), (153, 122), (153, 126),
(154, 105), (154, 109), (154, 114), (154, 124), (154, 125), (155, 107), (155, 109), (155, 110), (155, 111), (155, 129), (156, 128), (157, 128), )
coordinates_333287 = ((81, 114),
(81, 116), (81, 117), (81, 120), (81, 122), (82, 112), (82, 118), (82, 119), (82, 125), (82, 126), (82, 127), (82, 128), (82, 129), (82, 130), (83, 111), (83, 114), (83, 115), (83, 116), (83, 117), (83, 120), (83, 121), (83, 122), (83, 132), (84, 110), (84, 112), (84, 113), (84, 114), (84, 115), (84, 116), (84, 117), (84, 118), (84, 119), (84, 120), (84, 121), (84, 122), (84, 123), (84, 130), (84, 132), (85, 109), (85, 111), (85, 112), (85, 113), (85, 114), (85, 115), (85, 116), (85, 117), (85, 118), (85, 119), (85, 120), (85, 121), (85, 122), (85, 125), (85, 126), (85, 127), (85, 128), (85, 129), (85, 130), (85, 132), (86, 109), (86, 111), (86, 112), (86, 113), (86, 114), (86, 115), (86, 116), (86, 117), (86, 118), (86, 119), (86, 120), (86, 121), (86, 122), (86, 123), (86, 130),
(86, 132), (87, 109), (87, 111), (87, 112), (87, 113), (87, 114), (87, 115), (87, 116), (87, 117), (87, 118), (87, 119), (87, 120), (87, 121), (87, 122), (87, 130), (87, 131), (88, 109), (88, 111), (88, 112), (88, 113), (88, 114), (88, 115), (88, 122), (88, 130), (88, 131), (89, 104), (89, 108), (89, 110), (89, 111), (89, 112), (89, 116), (89, 117), (89, 118), (89, 119), (89, 120), (89, 123), (89, 129), (89, 130), (90, 114), (90, 122), (90, 129), (90, 130), (91, 108), (91, 110), (91, 112), (91, 123), (91, 124), (91, 129), (91, 130), (92, 124), (92, 125), (92, 129), (92, 130), (93, 124), (93, 125), (93, 129), (93, 131), (94, 124), (94, 125), (94, 130), (94, 131), (95, 125), (95, 130), (95, 132), (96, 125), (96, 130), (96, 132), (97, 125), (97, 130), (97, 132), (98, 129), (98, 131),
(99, 129), (99, 131), )
coordinates_FFC0CB = ((91, 117),
(91, 118), (91, 120), (92, 102), (92, 104), (92, 106), (92, 114), (92, 118), (92, 119), (92, 121), (93, 102), (93, 105), (93, 107), (93, 113), (93, 114), (93, 115), (93, 116), (93, 122), (94, 106), (94, 110), (94, 122), (95, 107), (95, 111), (95, 122), (96, 107), (96, 109), (96, 110), (96, 112), (96, 121), (96, 122), (97, 108), (97, 110), (97, 111), (97, 113), (97, 121), (97, 123), (98, 108), (98, 110), (98, 111), (98, 112), (98, 114), (98, 120), (98, 123), (99, 108), (99, 110), (99, 111), (99, 112), (99, 114), (99, 120), (99, 122), (99, 124), (100, 108), (100, 110), (100, 111), (100, 113), (100, 120), (100, 122), (100, 123), (100, 126), (101, 108), (101, 110), (101, 112), (101, 121), (101, 123), (101, 124), (101, 128), (101, 130), (102, 108), (102, 111), (102, 121), (102, 123), (102, 124), (102, 125),
(102, 126), (102, 130), (103, 108), (103, 111), (103, 122), (103, 124), (103, 127), (103, 128), (104, 107), (104, 109), (104, 111), (104, 122), (105, 107), (105, 109), (105, 111), (105, 123), (105, 125), (106, 107), (106, 109), (106, 111), (106, 124), (107, 107), (107, 109), (107, 111), (108, 107), (108, 109), (108, 110), (108, 112), (109, 107), (109, 109), (109, 110), (109, 112), (110, 105), (110, 107), (110, 108), (110, 109), (110, 110), (111, 104), (111, 111), (112, 104), (112, 106), (112, 107), (112, 108), (112, 110), )
|
{
"name": "Web Refresher",
"version": "14.0.1.0.0",
"author": "Compassion Switzerland, Odoo Community Association (OCA)",
"license": "AGPL-3",
"website": "https://github.com/OCA/web",
"qweb": ["templates/pager_button.xml"],
"depends": ["web"],
"installable": True,
"auto_install": False,
}
|
"""Example Celery application and worker configuration."""
# URL to listen for tasks
broker_url = 'amqp://'
# URL to save task results
result_backend = 'redis://'
# Tasks must take care of saving results
task_ignore_result = False
# Save tasks timestamp in UTC
enable_utc = True
# Local timezone
timezone = 'UTC'
# Do not monitor tasks
worker_send_tasks_events = False
|
# functions for handling the diagnose file.
# - reading with "parse"
def automata_line(state, line):
"""
Automata parsing knowledges.
0: waiting for knowledge block
1: seen the heading of a knowledge block
2: we are in a knowledge block
"""
if state == 0 and "Undefined knowledges" in line:
return 1, None
elif state == 1 and "************************" in line:
return 2, None
elif (state == 2 or state == 0) and "************************" in line:
return 0, None
elif state == 2 and "| " in line:
s = (line.split("| ", 1)[1]).split("\n", 1)[0]
return 2, s
else:
return state, None
def unroll(automata, initial_state, generator):
state = initial_state
for y in generator:
state, z = automata(state, y)
yield z
def parse(filename):
with open(filename) as f:
list_notions = []
for notion in unroll(automata_line, 0, f.readlines()):
if notion is not None and notion not in list_notions:
list_notions.append(notion)
return list(list_notions)
|
load("//github.com/gogo/protobuf:gogofaster_grpc_compile.bzl", "gogofaster_grpc_compile")
load("@io_bazel_rules_go//go:def.bzl", "go_library")
load("//go:utils.bzl", "get_importmappings")
wkt_mappings = get_importmappings({
"google/protobuf/any.proto": "github.com/gogo/protobuf/types",
"google/protobuf/duration.proto": "github.com/gogo/protobuf/types",
"google/protobuf/struct.proto": "github.com/gogo/protobuf/types",
"google/protobuf/timestamp.proto": "github.com/gogo/protobuf/types",
"google/protobuf/wrappers.proto": "github.com/gogo/protobuf/types",
})
def gogofaster_grpc_library(**kwargs):
name = kwargs.get("name")
deps = kwargs.get("deps")
importpath = kwargs.get("importpath")
visibility = kwargs.get("visibility")
go_deps = kwargs.get("go_deps", [])
name_pb = name + "_pb"
gogofaster_grpc_compile(
name = name_pb,
deps = deps,
transitive = True,
plugin_options = get_importmappings(kwargs.pop("importmap", {})) + wkt_mappings,
visibility = visibility,
)
go_library(
name = name,
srcs = [name_pb],
deps = go_deps + [
"@com_github_gogo_protobuf//proto:go_default_library",
"@org_golang_google_grpc//:go_default_library",
"@org_golang_x_net//context:go_default_library",
],
importpath = importpath,
visibility = visibility,
)
|
class Solution:
def transpose(self, A: List[List[int]]) -> List[List[int]]:
l=[]
i=0
while(i!=len(A[0])):
x=[]
j=0
while(j<len(A)):
x.append(A[j][i])
j+=1
if(x!=[]):
l.append(x)
i+=1
return(l)
|
class Automobil(object): # Oberklasse / Superklasse
antrieb = "Ottomotor"
leistung_in_kw = 120
def ausgabe(self):
print("Antrieb: ", self.antrieb)
print("Leistung: ", self.leistung_in_kw)
class PKW(Automobil): # Unterklasse / Subklasse
pass
print("Automobil a: ")
a = Automobil()
a.ausgabe()
print("PKW b: ")
b = PKW()
b.ausgabe()
# Mehrfachvererbung
class lkw(object): # object sorgt dafuer, dass die Klasse lkw nur vererben kann
ladeflaeche = 6
def ausgabe_lkw(self):
print("Ladeflaeche in qm: ", self.ladeflaeche)
class pkw(object):
sitzplaetze = 4
def ausgabe_pkw(self):
print("Sitzplaetze: ", self.sitzplaetze)
class pick_up(lkw, pkw):
motorleistung = 120
def ausgabe(self):
self.ausgabe_lkw()
self.ausgabe_pkw()
print("Motorleistung in KW: ", self.motorleistung)
print("LKW c:")
c = lkw()
c.ausgabe_lkw
print("Pick-Up d:")
d = pick_up()
d.ausgabe()
|
roc_table = '''
Таблица значений метрик в каждой точке для данной группирующей переменной.
TP (True Positives) — верно классифицированные положительные примеры.
TN (True Negatives) — верно классифицированные отрицательные примеры.
FN (False Negatives) — положительные примеры, классифицированные как отрицательные.
FP (False Positives) — отрицательные примеры, классифицированные как положительные.
TP/{TP+FN} — чувствительность.
TN/{TN+FP}$ — специфичность.
'''
roc_roc = '''
ROC-кривая показывает зависимость количества верно классифицированных положительных примеров от количества неверно классифицированных отрицательных примеров при различных значениях порога отсечения. Чем ближе кривая к верхнему левому углу, тем выше предсказательная способность модели.
'''
roc_table_metrics = '''
Таблица со значениями AUC и остальными метриками, выбранными ранее.
AUC (Area Under Curve) – численный показатель площади под кривой.
Оптимальный порог отсечения – варьируя порог отсечения, получаем то или иное разбиение на два класса, для определения оптимального порога в данном модуле используется критерий баланса между чувствительностью и специфичностью.
Полнота – показатель, который отражает, какой процент объектов положительного класса правильно классифицировали.
Точность – показатель, который отражает, какой процент положительных объектов (т.е. тех, что мы считаем положительными) правильно классифицирован.
Доля верных ответов – доля (процент) объектов, на которых алгоритм выдал правильные ответы.
F1-мера – среднее гармоническое точности и полноты.
'''
roc_inter_graph = '''
График пересечения чувствительности и специфичности для каждой зависимой переменной. Данный график наглядно показывает реализованный критерий выбора оптимального порога отсечения – критерий баланса между чувствительностью и специфичностью.
'''
roc_comp_roc = '''
Кривая, расположенная выше и левее, свидетельствует о большей предсказательной способности модели.
'''
roc_comp_metrics = '''
Показатель AUC предназначен для сравнительного анализа нескольких моделей. Чем больше значение AUC, тем лучше модель классификации.
'''
|
print("I will now count my chickens:")
print("Hens", 25 + 30 / 6)
print(f"Roosters {100 - 25 * 3 % 4}")
|
'''
import pandas as pd
from bokeh.plotting import figure, show, ColumnDataSource
from bokeh.layouts import column
from bokeh.models import CustomJS, Slider
df = pd.DataFrame([[1,2,3,4,5],[2,20,3,10,20]], columns = ['1','21','22','31','32'])
source_available = ColumnDataSource(df)
source_visible = ColumnDataSource(data = dict(x = df['1'], y = df['21']))
p = figure(title = 'SLIMe')
p.circle('x', 'y', source = source_visible)
slider1 = Slider(title = "SlideME", value = 2, start = 2, end = 3, step = 1)
slider2 = Slider(title = "SlideME2", value = 1, start = 1, end = 2, step = 1)
slider1.js_on_change('value', CustomJS(
args=dict(source_visible=source_visible,
source_available=source_available,
slider1 = slider1,
slider2 = slider2), code="""
var sli1 = slider1.value;
var sli2 = slider2.value;
var data_visible = source_visible.data;
var data_available = source_available.data;
data_visible.y = data_available[sli1.toString() + sli2.toString()];
source_visible.change.emit();
""") )
slider2.js_on_change('value', CustomJS(
args=dict(source_visible=source_visible,
source_available=source_available,
slider1 = slider1,
slider2 = slider2), code="""
var sli1 = slider1.value;
var sli2 = slider2.value;
var data_visible = source_visible.data;
var data_available = source_available.data;
data_visible.y = data_available[sli1.toString() + sli2.toString()];
source_visible.change.emit();
""") )
show(column(p, slider1, slider2))''' |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.