content
stringlengths
7
1.05M
""" Date: Jan 13 2022 Last Revision: N/A General Notes: - 2249ms runtime (10.57%) and 59MB (65.71%) - Not a bad first attempt. I wonder if I could think of something that doesn't require sorting - However, hard to think of a solution that is better than O(n) while mine is O(n*logn)... so is it worth considering the simplicity of the current solution? Solution Notes: - Greedy solution that "groups" balloons together based off their sorted end points """ class Solution: def findMinArrowShots(self, points: List[List[int]]) -> int: points.sort(key = lambda x:x[1]) num_arrows, arrow = 0, None for point in points: if arrow is not None and point[0] <= arrow: pass #arrow pops current balloon else: arrow = point[1] #new arrow to pop current balloon num_arrows += 1 return num_arrows
class doggy(object): def __init__(self, name, age, color): self.name = name self.age = age self.color = color def myNameIs(self): print ('%s, %s, %s' % (self.name, self.age, self.color)) def bark(self): print ("Wang Wang !!") wangcai = doggy("Wangcai Masarchik", 17, "gold") xiaoming = doggy("Ming Van Der Ryn", 16, "silver") wangcai.myNameIs() xiaoming.myNameIs() xiaoming.bark()
# DFLOW LIBRARY: # dflow utilities module # with new range function # and dictenumerate def range(_from, _to, step=1): out = [] aux = _from while aux < _to: out.append(aux) aux += step return out def dictenumerate(d): return {k: v for v, k in enumerate(d)} def prod(x): res = 1 for X in x: res *= X return res
class TFException(Exception): pass class TFAPIUnavailable(Exception): pass class TFLogParsingException(Exception): def __init__(self, type): self.type = type
# Definition for a binary tree node. class TreeNode: def __init__(self, x): self.val = x self.left = None self.right = None class Solution: def isSubtree(self, s, t, match=False): """ :type s: TreeNode :type t: TreeNode :rtype: bool """ # parameter match is a flag to judge s.parent == t.parent if not s and not t: return True elif not s or not t: return False if match and s.val != t.val: return False if s.val == t.val and self.isSubtree(s.right, t.right, True) and self.isSubtree(s.left, t.left, True): return True return self.isSubtree(s.right, t, match) or self.isSubtree(s.left, t, match) class Solution: def isSubtree(self, s: TreeNode, t: TreeNode) -> bool: # very slowly. most time wasted on self.judge function which can merge to self.subtree function stri = "s: {}, t: {}" ts = s.val if s is not None else 'none' tt = t.val if t is not None else 'none' # print(stri.format(ts, tt)) if (s is None) ^ (t is None): # print('a') return False if (s is None) and (t is None): # print('b') return True if s.val == t.val and self.judge(s, t): return True # print('d') A = self.isSubtree(s.left, t) # print("e") B = self.isSubtree(s.right, t) # print('f') return A or B def judge(self, s, t): sq = [s] tq = [t] while len(sq) > 0 and len(tq) > 0: ts = sq.pop() tt = tq.pop() if (ts is None) ^ (tt is None): return False if ts is None and tt is None: continue if ts.val != tt.val: return False sq.append(ts.left) sq.append(ts.right) tq.append(tt.left) tq.append(tt.right) if len(sq) == len(tq) == 0: return True return False
""" Some models such as A model with high precision """ class Model_Regression(): def __init__(self): self.name = 'a_good_model' def predict(self,x): y = x*2 return y if __name__ == '__main__': model = Model_Regression() print(model.predict(1))
print("Hello Aline and Basti!") print("What's up?") # We need escaping: \" cancels its meaning. print("Are you \"Monty\"?") # Alternatively you can use ': print('Are you "Monty"?') # But you will need escaping for the last: print("Can't you just pretend you were \"Monty\"?") # or print('Can\'t you just pretend you were "Monty"?')
""" Codemonk link: https://www.hackerearth.com/problem/algorithm/max-num-6fbf414b/ You are given an array A of n elements A1, A2, ..., An. Let us define a function F(x) = ΣAi&x. Here, & represents bitwise AND operator. You are required to find the number of different values of x for which F(x) is maximized. There exists a condition for x that it must have exactly l bits sets in its binary representation. Your task is to find a number of such values for which this function is maximized. Print the required number. If there are infinite such numbers, then print -1. Input - Output: The first line contains the number of test cases. The second line contains two space-separated integers n and l. The third line contains the array. There are T lines of the output. The only line of output for each test case contains a single integer as described in the problem statement. Sample input: 2 5 2 3 5 7 1 4 5 1 3 5 7 1 4 Sample Output: 2 1 """ """ The idea is the following. We know in advance the amount of set bits in the final number. We are going to use the bits that give the biggest decimal result in our array. For example, if the numbers are [3, 5, 7, 1, 4], their binary equivalent is [011, 101, 111, 001, 100]. The x we want to find must maximize the following: 011&x + 101&x + 111&x + 001&x + 100&x. If we just need 1 bit to be set, we have to find which bit from the available 3 gives the biggest decimal value after the sum. The first bit is set in 3 numbers (101, 111, 100) giving a total of 4 + 4 + 4 = 12, meaning that this is the biggest value it can contribute. The second bit is set in 2 numbers (011, 111) giving a total of 2 + 2 = 4 and the third bit is set in 4 numbers (011, 101, 111, 001) giving a total of 1 + 1 + 1 + 1 = 4. It is obvious that x must have the first bit set and this is the only solution. But what if we wanted x to have 2 bits set? In that case, the obvious choice is the first bit but for the second set bit we can either choose the second one or the third one. That gives us a total of 2 numbers that maximize our function. If l is a number bigger than the number of bits of our max value in our array then there are infinite solutions. In our example, if l=4, then we choose the first 3 bits to be set but then, for the fourth bit we can choose whichever we want and the result will still be the same (that bit will always turn to 0 after the & with each number in our array because no number has it set). To sum up, we are always going to choose the bits that give the biggest decimal value after the bitwise "and" and the sum and if there are more than 1 then we can directly use the bionimial coefficient to find the desired value. To further clarify the usage of the bionimial coefficient, if we had for example the array [12, 8, 4, 4, 4, 4] (corresponding to the decimal values of the bits -we don't actually care about the position of the bits-) and l had to be 3, then we would choose 12, 8 and 4, but we would need to account for all the different 4's we can choose. In that case that would be the ways we can choose 1 number from 4 numbers (we would have 12, 8, 4 or 12, 8, 4 or 12, 8, 4 or 12, 8, 4, so 4 different x numbers maximize our function). If l had to be 4, then we would account the different ways we can choose 2 numbers from 4 numbers etc. Lets analyze the complexity. We will consider nothing to be insignificant at the beginning and will simplify things later. O(T) for the input cases. O(30*N) for finding the decimal values of each bit after the "and" and the sum. O(30log30) for the sorting. O(30) for looping through this array and O(3*N) for the bionimial function. Note that every calculation happens inside the first "for" loop of the test cases, meaning that we multiply the complexities to get the final result. Final complexity: O(T*(30log30 + 30*N + 3*N)) => O(T*N) """ def factorial(n): fact = 1 for i in range(1, n + 1): fact = fact * i return fact def bionimial(n, k): bion = factorial(n)//(factorial(k)*(factorial(n-k))) return bion inp_len = int(input()) for _ in range(inp_len): n, l = map(int, input().rstrip().split()) array = list(map(int, input().rstrip().split())) # Creating an array that will hold the total # decimal value for each bit. final_list = [0] * 30 for element in array: for j in range(30): final_list[j] += element & (1 << j) final_list = sorted(final_list, reverse=True) final_list_len = len(final_list) element = final_list[l-1] count = 0 index = 0 if element == 0: print(-1) else: for i in range(final_list_len): if final_list[i] == element: count += 1 if count == 1: index = l - i print(bionimial(count, index)) """ Same as the above, with a slightly different technique for finding the total decimal value of each bit. """ # from math import log2, ceil # # # def factorial(n): # fact = 1 # for i in range(1, n + 1): # fact = fact * i # # return fact # # # def bionimial(n, k): # bion = factorial(n)//(factorial(k)*(factorial(n-k))) # return bion # # # inp_len = int(input()) # # for _ in range(inp_len): # n, l = map(int, input().rstrip().split()) # array = list(map(int, input().rstrip().split())) # # final_list = [0] * 30 # for i in range(n): # num = array[i] # while num: # right_most = num ^ (num & (num - 1)) # num = num & (num - 1) # final_list[int(log2(right_most))] += right_most # # final_list = sorted(final_list, reverse=True) # final_list_len = len(final_list) # # element = final_list[l-1] # count = 0 # index = 0 # if element == 0: # print(-1) # else: # for i in range(final_list_len): # if final_list[i] == element: # count += 1 # if count == 1: # index = l - i # print(bionimial(count, index))
class Action: """A thing that is done. The responsibility of action is to do something that is important in the game. Thus, it has one method, execute(), which should be overridden by derived classes. """ def execute(self, cast, script, callback): """Executes something that is important in the game. This method should be overriden by derived classes. Args: cast: An instance of Cast containing the actors in the game. script: An instance of Script containing the actions in the game. callback: An instance of ActionCallback so we can change the scene. """ raise NotImplementedError("execute not implemented in base class")
""" The core Becca code This package contains all the learning algorithms and heuristics implemented together in a functional learning agent. Most users won't need to modify anything in this package. Only core developers, those who want to experiment with and improve the underlying learning algorithms and their implementations, should need to muck around with it. See the brohrer/becca_test repository for examples of how to implement it with a world. """
# Decision de inversiòn se encuentra las siguientes variables involucradas variable # A que tiene 10,000 # B es menor de 30 # C Tiene educacion de nivel universitario # D tiene inreso anual de almenos 40,000 # E Debe invertir en valores # F Debe invertir en acciones de crecimiento # G invertir en acciones de IBM # Cada una de estas variables puede ser verdadera o falsa los echos son los siguientes supongamos que un inversor tiene 10,000 y tiene 25 años y este le gustaria recibir consejos sobre la inversiòn IBM entonces esto sabe que # A es verdadero y B es verdadero # # 1. Supongamos que nuestra base de conocimiento, si una persona tiene 10,000 y tiene u titulo universitario entonces debería invertir en valores, # 2. SI el ingreso anual de una persona es de almenos 40,000 y tiene un titulo universitario entonces deberia invertir en acciones de crecimiento # 3. SI una persona es menor de 30 años y esta invirtiendo en valores entonces debería de invertir en acciones de crecimiento # 4. SI una persona es menor de 30 años entonces tiene un titulo universitario # 5. SI una persona quiere invertir en acciones de crecimiento entonces deberia inbertir en acciones de IBM # # Entonces estas reglas se pueden escribir de esta manera # # 1. Si A entonces C luego E # 2. Si D y C luego F # 3. Si B y E entonces F # 4. Si B entonces C # 5. Si F entonces G # G, F, (B,E(A,C)) B = int(input('edad: ')) A = int(input('saldo acutual: ')) D = int(input('ingresos anuales: ')) E = 'Debe invertir en valores' F = 'Debe invertir en acciones de crecimiento' G = 'Debe invertir en IBM' if A >= 10000: C = True print('usted tiene un titulo universitario') Ee = True print(E) elif A < 10000: C = False Ee = False if B <= 30: C = True elif B > 30: C = False if B <= 30: if Ee == True: print(F) Ff = True if Ee == False: Ff = False if D >= 40000: if C == True: print(F) Ff = True if Ff == True: print(G)
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Wed Nov 1 10:42:25 2017 @author: wuyiming """ SR = 16000 H = 512 FFT_SIZE = 1024 BATCH_SIZE = 64 PATCH_LENGTH = 128 PATH_FFT = "/media/wuyiming/TOSHIBA EXT/UNetFFT/"
class Solution: def gameOfLife(self, board: List[List[int]]) -> None: """ Do not return anything, modify board in-place instead. """ self.rows, self.cols = len(board), len(board[0]) for row in range(self.rows): for col in range(self.cols): liveNeighborsNum = self.calcLiveNeighborsNum(board, row, col) if board[row][col] == 1 and liveNeighborsNum < 2: board[row][col] = -1 # 过去是活的,现在死了 elif board[row][col] == 1 and 2 <= liveNeighborsNum <= 3: board[row][col] = 1 # 过去是活的,现在还是活的 elif board[row][col] == 1 and liveNeighborsNum > 3: board[row][col] = -1 # 过去是活的,现在死了 elif board[row][col] == 0 and liveNeighborsNum == 3: board[row][col] = 2 # 过去是死的,现在活了 for row in range(self.rows): for col in range(self.cols): if board[row][col] > 0: board[row][col] = 1 else: board[row][col] = 0 def calcLiveNeighborsNum(self, board, row, col): count = 0 neighbors = [[-1, -1], [-1, 0], [-1, 1], [0, -1], [0, 1], [1, -1], [1, 0], [1, 1]] for neighbor in neighbors: newRow, newCol = row + neighbor[0], col + neighbor[1] if self.isValid(newRow, newCol) and abs(board[newRow][newCol]) == 1: count += 1 return count def isValid(self, row, col): return 0 <= row < self.rows and 0 <= col < self.cols
# # PySNMP MIB module MIB-INTEL-IP (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/MIB-INTEL-IP # Produced by pysmi-0.3.4 at Wed May 1 14:12:01 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15) # ObjectIdentifier, OctetString, Integer = mibBuilder.importSymbols("ASN1", "ObjectIdentifier", "OctetString", "Integer") NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") ValueSizeConstraint, ConstraintsIntersection, ConstraintsUnion, SingleValueConstraint, ValueRangeConstraint = mibBuilder.importSymbols("ASN1-REFINEMENT", "ValueSizeConstraint", "ConstraintsIntersection", "ConstraintsUnion", "SingleValueConstraint", "ValueRangeConstraint") mib2ext, = mibBuilder.importSymbols("INTEL-GEN-MIB", "mib2ext") NotificationGroup, ModuleCompliance = mibBuilder.importSymbols("SNMPv2-CONF", "NotificationGroup", "ModuleCompliance") Unsigned32, Counter32, ModuleIdentity, NotificationType, MibScalar, MibTable, MibTableRow, MibTableColumn, iso, TimeTicks, Bits, Gauge32, MibIdentifier, Integer32, IpAddress, ObjectIdentity, Counter64 = mibBuilder.importSymbols("SNMPv2-SMI", "Unsigned32", "Counter32", "ModuleIdentity", "NotificationType", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "iso", "TimeTicks", "Bits", "Gauge32", "MibIdentifier", "Integer32", "IpAddress", "ObjectIdentity", "Counter64") DisplayString, TextualConvention = mibBuilder.importSymbols("SNMPv2-TC", "DisplayString", "TextualConvention") ipr = MibIdentifier((1, 3, 6, 1, 4, 1, 343, 6, 38)) class RowStatus(Integer32): subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6)) namedValues = NamedValues(("active", 1), ("notInService", 2), ("notReady", 3), ("createAndGo", 4), ("createAndWait", 5), ("destroy", 6)) rtIpRouteTable = MibTable((1, 3, 6, 1, 4, 1, 343, 6, 38, 1), ) if mibBuilder.loadTexts: rtIpRouteTable.setStatus('optional') if mibBuilder.loadTexts: rtIpRouteTable.setDescription("This entity's IP Routing table.") rtIpRouteEntry = MibTableRow((1, 3, 6, 1, 4, 1, 343, 6, 38, 1, 1), ).setIndexNames((0, "MIB-INTEL-IP", "rtIpRouteChassis"), (0, "MIB-INTEL-IP", "rtIpRouteModule"), (0, "MIB-INTEL-IP", "rtIpRouteInst"), (0, "MIB-INTEL-IP", "rtIpRouteDest"), (0, "MIB-INTEL-IP", "rtIpRouteMask"), (0, "MIB-INTEL-IP", "rtIpRouteIfIndex"), (0, "MIB-INTEL-IP", "rtIpRouteNextHop")) if mibBuilder.loadTexts: rtIpRouteEntry.setStatus('optional') if mibBuilder.loadTexts: rtIpRouteEntry.setDescription('A route to a particular destination.') rtIpRouteChassis = MibTableColumn((1, 3, 6, 1, 4, 1, 343, 6, 38, 1, 1, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: rtIpRouteChassis.setStatus('optional') if mibBuilder.loadTexts: rtIpRouteChassis.setDescription('Chassis number in stack that contains the module.') rtIpRouteModule = MibTableColumn((1, 3, 6, 1, 4, 1, 343, 6, 38, 1, 1, 2), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: rtIpRouteModule.setStatus('optional') if mibBuilder.loadTexts: rtIpRouteModule.setDescription('Module number in the chassis.') rtIpRouteInst = MibTableColumn((1, 3, 6, 1, 4, 1, 343, 6, 38, 1, 1, 3), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: rtIpRouteInst.setStatus('optional') if mibBuilder.loadTexts: rtIpRouteInst.setDescription('Routing table instance number.') rtIpRouteDest = MibTableColumn((1, 3, 6, 1, 4, 1, 343, 6, 38, 1, 1, 4), IpAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: rtIpRouteDest.setStatus('optional') if mibBuilder.loadTexts: rtIpRouteDest.setDescription('The destination IP address of this route.') rtIpRouteMask = MibTableColumn((1, 3, 6, 1, 4, 1, 343, 6, 38, 1, 1, 5), IpAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: rtIpRouteMask.setStatus('optional') if mibBuilder.loadTexts: rtIpRouteMask.setDescription('Indicate the mask to be logical-ANDed with the destination address before being compared to the value in the rtIpRouteDest field.') rtIpRouteIfIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 343, 6, 38, 1, 1, 6), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: rtIpRouteIfIndex.setStatus('optional') if mibBuilder.loadTexts: rtIpRouteIfIndex.setDescription('The interface that the frame is forwarded on.') rtIpRouteNextHop = MibTableColumn((1, 3, 6, 1, 4, 1, 343, 6, 38, 1, 1, 7), IpAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: rtIpRouteNextHop.setStatus('optional') if mibBuilder.loadTexts: rtIpRouteNextHop.setDescription('The IP address of the next hop of this route.') rtIpRoutePref = MibTableColumn((1, 3, 6, 1, 4, 1, 343, 6, 38, 1, 1, 8), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: rtIpRoutePref.setStatus('optional') if mibBuilder.loadTexts: rtIpRoutePref.setDescription('The preference value for this route.') rtIpRouteMetric = MibTableColumn((1, 3, 6, 1, 4, 1, 343, 6, 38, 1, 1, 9), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: rtIpRouteMetric.setStatus('optional') if mibBuilder.loadTexts: rtIpRouteMetric.setDescription("The routing metric for this route. The semantics of this metric are determined by the routing-protocol specified in the route's rtIpRouteProto value.") rtIpRouteProto = MibTableColumn((1, 3, 6, 1, 4, 1, 343, 6, 38, 1, 1, 10), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6))).clone(namedValues=NamedValues(("direct", 1), ("static", 2), ("ospf", 3), ("rip", 4), ("other", 5), ("all", 6)))).setMaxAccess("readonly") if mibBuilder.loadTexts: rtIpRouteProto.setStatus('optional') if mibBuilder.loadTexts: rtIpRouteProto.setDescription('The routing mechanism via which this route was learned.') rtIpRouteAge = MibTableColumn((1, 3, 6, 1, 4, 1, 343, 6, 38, 1, 1, 11), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: rtIpRouteAge.setStatus('optional') if mibBuilder.loadTexts: rtIpRouteAge.setDescription("The number of seconds since this route was last updated or otherwise detemined to be correct. Note that no semantics of 'too old' can be implied except through knowledge of the routing protocol by which the route was learned.") rtIpRteTable = MibTable((1, 3, 6, 1, 4, 1, 343, 6, 38, 2), ) if mibBuilder.loadTexts: rtIpRteTable.setStatus('optional') if mibBuilder.loadTexts: rtIpRteTable.setDescription('The list of all routing table entries (RTE). There may be several entries describing a route to the same destination (entries with the same IP address and mask but different preference, protocol or metric). Forwarding engine uses only the best one - this one which can be found in the Routing Table. All other entries as well the best one are available in rtIpRteTable. If for some reason the best entry has been lost then the best one will be chosen from other entries to the same destination.') rtIpRteEntry = MibTableRow((1, 3, 6, 1, 4, 1, 343, 6, 38, 2, 1), ).setIndexNames((0, "MIB-INTEL-IP", "rtIpRteChassis"), (0, "MIB-INTEL-IP", "rtIpRteModule"), (0, "MIB-INTEL-IP", "rtIpRteInst"), (0, "MIB-INTEL-IP", "rtIpRteDest"), (0, "MIB-INTEL-IP", "rtIpRteMask"), (0, "MIB-INTEL-IP", "rtIpRtePref"), (0, "MIB-INTEL-IP", "rtIpRteProto"), (0, "MIB-INTEL-IP", "rtIpRteIfIndex"), (0, "MIB-INTEL-IP", "rtIpRteNextHop")) if mibBuilder.loadTexts: rtIpRteEntry.setStatus('optional') if mibBuilder.loadTexts: rtIpRteEntry.setDescription('A route to a particular destination.') rtIpRteChassis = MibTableColumn((1, 3, 6, 1, 4, 1, 343, 6, 38, 2, 1, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: rtIpRteChassis.setStatus('optional') if mibBuilder.loadTexts: rtIpRteChassis.setDescription('Chassis number in stack that contains the module.') rtIpRteModule = MibTableColumn((1, 3, 6, 1, 4, 1, 343, 6, 38, 2, 1, 2), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: rtIpRteModule.setStatus('optional') if mibBuilder.loadTexts: rtIpRteModule.setDescription('Module number in the chassis.') rtIpRteInst = MibTableColumn((1, 3, 6, 1, 4, 1, 343, 6, 38, 2, 1, 3), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: rtIpRteInst.setStatus('optional') if mibBuilder.loadTexts: rtIpRteInst.setDescription('Alternative routing table instance number.') rtIpRteDest = MibTableColumn((1, 3, 6, 1, 4, 1, 343, 6, 38, 2, 1, 4), IpAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: rtIpRteDest.setStatus('optional') if mibBuilder.loadTexts: rtIpRteDest.setDescription('The destination IP address of this route.') rtIpRteMask = MibTableColumn((1, 3, 6, 1, 4, 1, 343, 6, 38, 2, 1, 5), IpAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: rtIpRteMask.setStatus('optional') if mibBuilder.loadTexts: rtIpRteMask.setDescription('Indicate the mask to be logical-ANDed with the destination address before being compared to the value in the rtIpRteDest field.') rtIpRtePref = MibTableColumn((1, 3, 6, 1, 4, 1, 343, 6, 38, 2, 1, 6), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: rtIpRtePref.setStatus('optional') if mibBuilder.loadTexts: rtIpRtePref.setDescription('The preference value for this route.') rtIpRteProto = MibTableColumn((1, 3, 6, 1, 4, 1, 343, 6, 38, 2, 1, 7), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6))).clone(namedValues=NamedValues(("direct", 1), ("static", 2), ("ospf", 3), ("rip", 4), ("other", 5), ("all", 6)))).setMaxAccess("readonly") if mibBuilder.loadTexts: rtIpRteProto.setStatus('optional') if mibBuilder.loadTexts: rtIpRteProto.setDescription('The routing mechanism via which this route was learned.') rtIpRteIfIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 343, 6, 38, 2, 1, 8), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: rtIpRteIfIndex.setStatus('optional') if mibBuilder.loadTexts: rtIpRteIfIndex.setDescription('The interface that the frame is forwarded on.') rtIpRteNextHop = MibTableColumn((1, 3, 6, 1, 4, 1, 343, 6, 38, 2, 1, 9), IpAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: rtIpRteNextHop.setStatus('optional') if mibBuilder.loadTexts: rtIpRteNextHop.setDescription('The IP address of the next hop of this route.') rtIpRteState = MibTableColumn((1, 3, 6, 1, 4, 1, 343, 6, 38, 2, 1, 10), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("active", 1), ("inactive", 2)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: rtIpRteState.setStatus('optional') if mibBuilder.loadTexts: rtIpRteState.setDescription('The state of the route.') rtIpRteAge = MibTableColumn((1, 3, 6, 1, 4, 1, 343, 6, 38, 2, 1, 11), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: rtIpRteAge.setStatus('optional') if mibBuilder.loadTexts: rtIpRteAge.setDescription("The number of seconds since this route was last updated or otherwise detemined to be correct. Note that no semantics of 'too old' can be implied except through knowledge of the routing protocol by which the route was learned.") rtIpRteMetric = MibTableColumn((1, 3, 6, 1, 4, 1, 343, 6, 38, 2, 1, 12), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: rtIpRteMetric.setStatus('optional') if mibBuilder.loadTexts: rtIpRteMetric.setDescription('The metric of the alternative route.') rtIpStaticRouteTable = MibTable((1, 3, 6, 1, 4, 1, 343, 6, 38, 3), ) if mibBuilder.loadTexts: rtIpStaticRouteTable.setStatus('optional') if mibBuilder.loadTexts: rtIpStaticRouteTable.setDescription('A table of all configured static routes.') rtIpStaticRouteEntry = MibTableRow((1, 3, 6, 1, 4, 1, 343, 6, 38, 3, 1), ).setIndexNames((0, "MIB-INTEL-IP", "rtIpStRtChassis"), (0, "MIB-INTEL-IP", "rtIpStRtModule"), (0, "MIB-INTEL-IP", "rtIpStRtInst"), (0, "MIB-INTEL-IP", "rtIpStRtDest"), (0, "MIB-INTEL-IP", "rtIpStRtMask"), (0, "MIB-INTEL-IP", "rtIpStRtPref"), (0, "MIB-INTEL-IP", "rtIpStRtIfIndex"), (0, "MIB-INTEL-IP", "rtIpStRtNextHop")) if mibBuilder.loadTexts: rtIpStaticRouteEntry.setStatus('optional') if mibBuilder.loadTexts: rtIpStaticRouteEntry.setDescription('An entry describing a single static route.') rtIpStRtChassis = MibTableColumn((1, 3, 6, 1, 4, 1, 343, 6, 38, 3, 1, 1), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: rtIpStRtChassis.setStatus('optional') if mibBuilder.loadTexts: rtIpStRtChassis.setDescription('Chassis number in stack that contains the module.') rtIpStRtModule = MibTableColumn((1, 3, 6, 1, 4, 1, 343, 6, 38, 3, 1, 2), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: rtIpStRtModule.setStatus('optional') if mibBuilder.loadTexts: rtIpStRtModule.setDescription('Module number in the chassis.') rtIpStRtInst = MibTableColumn((1, 3, 6, 1, 4, 1, 343, 6, 38, 3, 1, 3), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: rtIpStRtInst.setStatus('optional') if mibBuilder.loadTexts: rtIpStRtInst.setDescription('Static routing table instance number.') rtIpStRtDest = MibTableColumn((1, 3, 6, 1, 4, 1, 343, 6, 38, 3, 1, 4), IpAddress()).setMaxAccess("readwrite") if mibBuilder.loadTexts: rtIpStRtDest.setStatus('optional') if mibBuilder.loadTexts: rtIpStRtDest.setDescription('The destination IP address of this route.') rtIpStRtMask = MibTableColumn((1, 3, 6, 1, 4, 1, 343, 6, 38, 3, 1, 5), IpAddress()).setMaxAccess("readwrite") if mibBuilder.loadTexts: rtIpStRtMask.setStatus('optional') if mibBuilder.loadTexts: rtIpStRtMask.setDescription('The destination IP mask of this route.') rtIpStRtPref = MibTableColumn((1, 3, 6, 1, 4, 1, 343, 6, 38, 3, 1, 6), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: rtIpStRtPref.setStatus('optional') if mibBuilder.loadTexts: rtIpStRtPref.setDescription('The preference value for this route. This value should be unique (neither other static routes to the same destination nor other protocols can use this value).') rtIpStRtIfIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 343, 6, 38, 3, 1, 7), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: rtIpStRtIfIndex.setStatus('optional') if mibBuilder.loadTexts: rtIpStRtIfIndex.setDescription('The interface that the frame is forwarded on.') rtIpStRtNextHop = MibTableColumn((1, 3, 6, 1, 4, 1, 343, 6, 38, 3, 1, 8), IpAddress()).setMaxAccess("readwrite") if mibBuilder.loadTexts: rtIpStRtNextHop.setStatus('optional') if mibBuilder.loadTexts: rtIpStRtNextHop.setDescription('The IP address of the next hop of this route.') rtIpStRtMetric = MibTableColumn((1, 3, 6, 1, 4, 1, 343, 6, 38, 3, 1, 9), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: rtIpStRtMetric.setStatus('optional') if mibBuilder.loadTexts: rtIpStRtMetric.setDescription('The routing metric for this route.') rtIpStRtStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 343, 6, 38, 3, 1, 10), RowStatus()).setMaxAccess("readwrite") if mibBuilder.loadTexts: rtIpStRtStatus.setStatus('optional') if mibBuilder.loadTexts: rtIpStRtStatus.setDescription("The status of the route. Setting it to 'destroy'(6) removes the static route from router's configuration.") rtIpStRtState = MibTableColumn((1, 3, 6, 1, 4, 1, 343, 6, 38, 3, 1, 11), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("active", 1), ("inactive", 2)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: rtIpStRtState.setStatus('optional') if mibBuilder.loadTexts: rtIpStRtState.setDescription('The current state of the route.') mibBuilder.exportSymbols("MIB-INTEL-IP", rtIpRoutePref=rtIpRoutePref, rtIpStRtIfIndex=rtIpStRtIfIndex, rtIpRteEntry=rtIpRteEntry, rtIpRouteInst=rtIpRouteInst, rtIpStRtMask=rtIpStRtMask, rtIpRouteEntry=rtIpRouteEntry, rtIpRteMask=rtIpRteMask, rtIpRteState=rtIpRteState, rtIpRteProto=rtIpRteProto, rtIpRouteMetric=rtIpRouteMetric, rtIpRteDest=rtIpRteDest, rtIpRteInst=rtIpRteInst, ipr=ipr, rtIpRteAge=rtIpRteAge, rtIpRouteProto=rtIpRouteProto, rtIpRouteNextHop=rtIpRouteNextHop, rtIpRouteModule=rtIpRouteModule, rtIpRteNextHop=rtIpRteNextHop, rtIpRteModule=rtIpRteModule, rtIpStRtDest=rtIpStRtDest, rtIpRteIfIndex=rtIpRteIfIndex, rtIpStaticRouteEntry=rtIpStaticRouteEntry, RowStatus=RowStatus, rtIpStRtMetric=rtIpStRtMetric, rtIpRouteDest=rtIpRouteDest, rtIpRouteChassis=rtIpRouteChassis, rtIpRouteMask=rtIpRouteMask, rtIpRteTable=rtIpRteTable, rtIpRouteTable=rtIpRouteTable, rtIpStRtPref=rtIpStRtPref, rtIpStaticRouteTable=rtIpStaticRouteTable, rtIpRteChassis=rtIpRteChassis, rtIpRouteAge=rtIpRouteAge, rtIpRteMetric=rtIpRteMetric, rtIpStRtState=rtIpStRtState, rtIpRtePref=rtIpRtePref, rtIpStRtChassis=rtIpStRtChassis, rtIpStRtStatus=rtIpStRtStatus, rtIpStRtModule=rtIpStRtModule, rtIpStRtNextHop=rtIpStRtNextHop, rtIpStRtInst=rtIpStRtInst, rtIpRouteIfIndex=rtIpRouteIfIndex)
#!/usr/bin/env python while True: pass
"""Mock turtle module. """ def goto(x, y): pass def up(): pass def down(): pass def color(name): pass def begin_fill(): pass def end_fill(): pass def forward(steps): pass def left(degrees): pass
''' Get various integer numbers. In the end, show the average between all values and the lowest and the highest. Asks the user if they want to continue or not. ''' number = int(input('Choose a number: ')) again = input('Do you want to continue? [S/N]').strip().upper() total = 1 minimum = maximum = number while again == 'S': number2 = int(input('Choose another number: ')) total += 1 number += number2 again = input('Do you want to continue? [S/N]').strip().upper() if number2 > maximum: maximum = number2 elif number2 < minimum: minimum = number2 print(f'The average of these \033[34m{total}\033[m number is \033[34m{number / total:.2f}\033[m.') print(f'The highest is \033[34m{maximum}\033[m, and the lowest is \033[34m{minimum}\033[m.')
# -*- coding:utf-8 -*- """ """ class Delegate: daily_forge = 0. gift = property( lambda obj: obj.share*obj.daily_forge/(obj.vote+obj.cumul-obj.exclude), None, None, "" ) @staticmethod def configure(blocktime=8, delegates=51, reward=2): assert isinstance(blocktime, int) assert isinstance(delegates, int) assert isinstance(reward, (float, int)) Delegate.blocktime = blocktime Delegate.delegates = delegates Delegate.reward = float(reward) Delegate.daily_forge = 24 * 3600./(blocktime*delegates) * reward def __init__(self, username, share, vote=0, exclude=0): assert 0. < share < 1. self.username = username self.share = float(share) self.vote = vote self.exclude = exclude self.cumul = 0 def daily(self, vote): return self.share * self.daily_forge * vote/(self.vote+vote-self.exclude) def yir(self, vote): total = 365 * self.daily(vote) return total/vote def best(*delegates): return sorted(delegates, key=lambda d:d.gift, reverse=True)[0] def reset(*delegates): [setattr(d, "cumul", 0) for d in delegates] def solve(vote, delegates, step=1): c = 0 for c in range(step, vote, step): best(*delegates).cumul += step best(*delegates).cumul += (vote-c) return {d.username:d.cumul for d in delegates}
print(3 * 3 == 6) print(50 % 5 == 0) Name = "Sam" print(Name == "SaM") fruits = ["apple", "banana", "cherry", "orange", "kiwi", "melon", "mango"] for fruit in fruits: if fruit == "apple": print("Apple is present") elif "cherry" in fruit: print("Cherry is also present")
#!/usr/bin/python3 ''' helloworld.py Simple Hello world program. This is considered to be the first program that anyone would write when learing a new language. Author: Rich Lynch Created for merit badge college. Released to the public under the MIT license. ''' print ("Hello World")
lista = [] for c in range(0, 5): lista.append(int(input(f'Digite um valor para a posição {c}: '))) print('+_' * 25) print('Você digitou os valores: ', * lista, sep=',') # print(f'O maior valor digitado foi {max(lista)} na posição {lista.index(max(lista))}') # print(f'O menor valor digitado foi {min(lista)} na posição {lista.index(min(lista))}') print(f'O maior valor digitado foi {max(lista)} nas posições', end=' ') for c, v in enumerate(lista): if v == max(lista): print(f'{c}...', end=' ') print(f'\nO menor valor digitado foi {min(lista)} nas posições', end=' ') for c, v in enumerate(lista): if v == min(lista): print(f'{c}...', end=' ')
# -*- coding: utf-8 -*- ''' Configuration of Capsul and external software operated through capsul. '''
version = "0.9.8" _default_base_dir = "./archive" class Options: """Holds Archiver options.""" def __init__(self, base_dir, use_ssl=False, silent=False, verbose=False, delay=2, thread_check_delay=90, dl_threads_per_site=5, dl_thread_wait=1, skip_thumbs=False, thumbs_only=False, skip_js=False, skip_css=False, follow_child_threads=False, follow_to_other_boards=False, run_once=False): self.base_dir = base_dir self.use_ssl = use_ssl self.silent = silent self.verbose = verbose self.delay = float(delay) self.thread_check_delay = float(thread_check_delay) self.dl_threads_per_site = int(dl_threads_per_site) self.dl_thread_wait = float(dl_thread_wait) self.skip_thumbs = skip_thumbs self.thumbs_only = thumbs_only self.skip_js = skip_js self.skip_css = skip_css self.follow_child_threads = follow_child_threads self.follow_to_other_boards = follow_to_other_boards self.run_once = run_once class Archiver: """Archives the given imageboard threads.""" def __init__(self, options=None): if options is None: options = Options(_default_base_dir) self.options = options self.callbacks_lock = threading.Lock() self.callbacks = {"all": []} self.archivers = [] for archiver in default_archivers: self.archivers.append(archiver(self.update_status, self.options)) def shutdown(self): """Shutdown the archiver.""" for archiver in self.archivers: archiver.shutdown() def add_thread(self, url): """Archive the given thread if possible""" url_archived = False for archiver in self.archivers: if archiver.url_valid(url): archiver.add_thread(url) url_archived = True if url_archived: return True else: print("We could not find a valid archiver for:", url) return False @property def existing_threads(self): """Return how many threads exist.""" threads = 0 for archiver in self.archivers: threads += archiver.existing_threads return threads @property def files_to_download(self): """Return whether we still have files to download.""" for archiver in self.archivers: if archiver.files_to_download: return True return False def register_callback(self, cb_type, handler): """Register a callback.""" with self.callbacks_lock: if cb_type not in self.callbacks: self.callbacks[cb_type] = [] if handler not in self.callbacks[cb_type]: self.callbacks[cb_type].append(handler) def unregister_callback(self, cb_type, handler): """Remove a callback.""" with self.callbacks_lock: if cb_type in self.callbacks and handler in self.callbacks[cb_type]: self.callbacks[cb_type].remove(handler) def update_status(self, cb_type, info): """Update thread status, call callbacks where appropriate.""" with self.callbacks_lock: called = [] if cb_type in self.callbacks: for handler in self.callbacks[cb_type]: handler(cb_type, info) called.append(handler) for handler in self.callbacks["all"]: if handler not in called: handler(cb_type, info)
class StepsLoss: def __init__(self, loss): self.steps = None self.loss = loss def set_steps(self, steps): self.steps = steps def __call__(self, y_pred, y_true): if self.steps is not None: y_pred = y_pred[:, :, : self.steps] y_true = y_true[:, :, : self.steps] # print(f"y_pred.shape: {y_pred.shape}, y_true.shape: {y_true.shape}") return self.loss(y_pred, y_true)
class Solution: def spiralOrder(self, matrix: List[List[int]]) -> List[int]: # O(n) time | O(n) space lst = [] startRow, endRow = 0, len(matrix) - 1 startColumn, endColumn = 0, len(matrix[0]) - 1 place = (0, 0) while startRow <= endRow and startColumn <= endColumn: if place == (0, 0): for j in range(startColumn, endColumn + 1): lst.append(matrix[startRow][j]) startRow += 1 place = (0, -1) elif place == (0, -1): for i in range(startRow, endRow + 1): lst.append(matrix[i][endColumn]) endColumn -= 1 place = (-1, -1) elif place == (-1, -1): for j in reversed(range(startColumn, endColumn + 1)): lst.append(matrix[endRow][j]) endRow -= 1 place = (-1, 0) elif place == (-1, 0): for i in reversed(range(startRow, endRow + 1)): lst.append(matrix[i][startColumn]) startColumn += 1 place = (0, 0) return lst
""" https://www.practicepython.org Exercise 13: Fibonacci 2 chilis Write a program that asks the user how many Fibonnaci numbers to generate and then generates them. Take this opportunity to think about how you can use functions. Make sure to ask the user to enter the number of numbers in the sequence to generate.(Hint: The Fibonnaci seqence is a sequence of numbers where the next number in the sequence is the sum of the previous two numbers in the sequence. The sequence looks like this: 1, 1, 2, 3, 5, 8, 13, …) """ def fibn(): count = int(input("How many Fibonacci numbers do you want? (Enter a number > 1): ")) if count <= 1: fibn_list = "Fiboacci sequence always has at least 2 digits." else: fibn_list = [1, 1] for i in range(2, count): fibn_list.append(fibn_list[-2] + fibn_list[-1]) return fibn_list ans = fibn() print(ans)
# -*- coding: utf-8 -*- """ Created on Sat Oct 20 14:15:56 2018 @author: Chris """ path = r'C:\Users\Chris\Desktop\Machine Learning Raw Data\air-quality-madrid\stations.csv' stations = pd.read_csv(path) stations.head() geometry = [Point(xy) for xy in zip(stations['lon'], stations['lat'])] crs = {'init': 'epsg:4326'} geoDF_stations = gpd.GeoDataFrame(stations, crs=crs, geometry=geometry) geoDF_stations_new = geoDF_stations.to_crs({'init': 'epsg:25830'}) #geoDF_stations.head() # Plot all points #geoDF_stations.plot(marker='co', color='r', markersize=10.0) streetsystem = gpd.read_file('C:/Users/Chris/Desktop/Machine Learning Raw Data/900BTQKCJT/call2016.shp') #streetsystem.plot(color='green', markersize=5); #geoDF_stations.crs = {'init' :'epsg:4326'} # you could shorten it to a one-liner, but it's a lot less readable: #streetsystem = LineString(zip(*convert_etrs89_to_lonlat(*zip(*streetsaslinestring.coords)))) base = geoDF_stations_new.plot(color='white', edgecolor='red',markersize=100.0) streetsystem.plot(ax=base, color='blue',markersize=0.1)
def encode(keyword, message, normalize=False): # True - отбрасывать пробелы при шифровании if normalize: message = ''.join(message.split()) rows = len(message) // len(keyword) if len(message) % len(keyword) != 0: rows += 1 indexes = sorted([(index, value) for index, value in enumerate(keyword)], key=lambda item: item[1]) result = '' for row in range(rows): for index in indexes: position = index[0] * rows + row if position < len(message): result += message[position] else: result += ' ' return result def decode(keyword, cipher): rows = len(cipher) // len(keyword) if len(cipher) % len(keyword) != 0: rows += 1 indexes = sorted([(index, value) for index, value in enumerate(keyword)], key=lambda item: item[1]) indexes = sorted([(index, value) for index, value in enumerate(indexes)], key=lambda item: item[1][0]) result = '' for index in indexes: for row in range(rows): position = index[0] + len(keyword) * row if position < len(cipher): result += cipher[position] return result key = 'ПЕЛИКАН' text = 'ГОГУЛОВ ЯРОСЛАВ ВОЛОДИМИРОВИЧ' enc = encode(key, text, True) print('ENCODE:', enc) dec = decode(key, enc) print('DECODE:', dec) print() enc = encode(key, text) print('ENCODE:', enc) dec = decode(key, enc) print('DECODE:', dec)
# network image size IMAGE_WIDTH = 128 IMAGE_HEIGHT = 64 # license number construction DOWNSAMPLE_FACTOR = 2 ** 2 # <= pool size ** number of pool layers MAX_TEXT_LEN = 10
#!/usr/bin/python def readFile(fileName): paramsFile = open(fileName) paramFileLines = paramsFile.readlines() return paramFileLines #number of expected molecular lines def getExpectedLineNum(fileName): lines = readFile(fileName) print(lines[0]) return lines[0] #frequency ranges of all expected molecular lines #NOTE: deprecated in cluster environment def getExpectedLines(fileName): result = [] lines = readFile(fileName) for i in range(1, len(lines)): line = lines[i].split(" ") result.append((line[0], line[1][0:len(line[1]) - 1])) print(result) return result
#!/usr/bin/env python3 # https://abc051.contest.atcoder.jp/tasks/abc051_d INF = 10 ** 9 n, m = map(int, input().split()) a = [[INF] * n for _ in range(n)] e = [None] * m for i in range(n): a[i][i] = 0 for i in range(m): u, v, w = map(int, input().split()) u -= 1 v -= 1 e[i] = (u, v, w) a[u][v] = w a[v][u] = w for k in range(n): for i in range(n): for j in range(n): a[i][j] = min(a[i][j], a[i][k] + a[k][j]) c = 0 for u, v, w in e: if a[u][v] != w: c += 1 print(c)
# Definition for singly-linked list. # class ListNode: # def __init__(self, x): # self.val = x # self.next = None class ListNode: def __init__(self, x, n): self.val = x self.next = n class Solution: def mergeTwoLists(self, l1, l2): pre = tmp = None cur = l1 while cur and cur.next: if cur.val > l2.val: tmp = cur cur = l2 if pre: pre.next = cur cur.next = tmp l2 = l2.next if not l2: break cur = cur.next if l2: cur.next = l2 return l1 def createTestA(self): l1 = ListNode(1, ListNode(2, ListNode(4, None))) l2 = ListNode(1, ListNode(3, ListNode(4, None))) print(self.mergeTwoLists(l1, l2)) t = Solution() t.createTestA()
# -*- coding: utf-8 -*- data_dublin_core = {'msg': 'Retrieved 22 abstracts, starting with number 1.', 'export': '<?xml version=\'1.0\' encoding=\'utf8\'?>\n<records xmlns="http://ads.harvard.edu/schema/abs/1.1/dc" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:dc="http://purl.org/dc/elements/1.1/" xsi:schemaLocation="http://ads.harvard.edu/schema/abs/1.1/dc http://ads.harvard.edu/schema/abs/1.1/dc.xsd" retrieved="22" start="1" selected="22" citations="308">\n<record>\n<dc:identifier>2018Wthr...73Q..35.</dc:identifier>\n<dc:title>Book reviews</dc:title>\n<dc:source>Weather, vol. 73, issue 1, pp. 35-35</dc:source>\n<dc:date>2018-01-01</dc:date>\n<dc:relation>https://ui.adsabs.harvard.edu/abs/2018Wthr...73Q..35.</dc:relation>\n<dc:description>Not Available &lt;P /&gt;</dc:description>\n<dc:identifier>doi:10.1002/wea.3072</dc:identifier>\n</record>\n\n<record>\n<dc:identifier>2018TDM.....5a0201F</dc:identifier>\n<dc:title>2D Materials: maintaining editorial quality</dc:title>\n<dc:creator>Fal\'ko, Vladimir</dc:creator>\n<dc:creator>Thomas, Ceri-Wyn</dc:creator>\n<dc:source>2D Materials, Volume 5, Issue 1, article id. 010201 (2018).</dc:source>\n<dc:date>2018-01-01</dc:date>\n<dc:relation>https://ui.adsabs.harvard.edu/abs/2018TDM.....5a0201F</dc:relation>\n<dc:description>Not Available &lt;P /&gt;</dc:description>\n<dc:identifier>doi:10.1088/2053-1583/aa9403</dc:identifier>\n</record>\n\n<record>\n<dc:identifier>2018Spin....877001P</dc:identifier>\n<dc:title>Obituary: In Memoriam Professor Dr. Shoucheng Zhang, Consulting Editor</dc:title>\n<dc:creator>Parkin, Stuart</dc:creator>\n<dc:creator>Chantrell, Roy</dc:creator>\n<dc:creator>Chang, Ching-Ray</dc:creator>\n<dc:source>Spin, Volume 8, Issue 4, id. 1877001</dc:source>\n<dc:date>2018-01-01</dc:date>\n<dc:rights>(c) 2018: World Scientific Publishing Company</dc:rights>\n<dc:relation>https://ui.adsabs.harvard.edu/abs/2018Spin....877001P</dc:relation>\n<dc:description>Not Available &lt;P /&gt;</dc:description>\n<dc:identifier>doi:10.1142/S2010324718770015</dc:identifier>\n</record>\n\n<record>\n<dc:identifier>2018SAAS...38.....D</dc:identifier>\n<dc:title>Millimeter Astronomy</dc:title>\n<dc:creator>Dessauges-Zavadsky, Miroslava</dc:creator>\n<dc:creator>Pfenniger, Daniel</dc:creator>\n<dc:source>Millimeter Astronomy: Saas-Fee Advanced Course 38. Swiss Society for Astrophysics and Astronomy, Saas-Fee Advanced Course, Volume 38. ISBN 978-3-662-57545-1. Springer-Verlag GmbH Germany, part of Springer Nature, 2018</dc:source>\n<dc:date>2018-01-01</dc:date>\n<dc:subject>Physics</dc:subject>\n<dc:rights>(c) 2018: Springer-Verlag GmbH Germany, part of Springer Nature</dc:rights>\n<dc:relation>https://ui.adsabs.harvard.edu/abs/2018SAAS...38.....D</dc:relation>\n<dc:description>Not Available &lt;P /&gt;</dc:description>\n<dc:identifier>doi:10.1007/978-3-662-57546-8</dc:identifier>\n</record>\n\n<record>\n<dc:identifier>2018PhRvL.120b9901P</dc:identifier>\n<dc:title>Erratum: Quantum Criticality in Resonant Andreev Conduction [Phys. Rev. Lett. 119, 116802 (2017)]</dc:title>\n<dc:creator>Pustilnik, M.</dc:creator>\n<dc:creator>van Heck, B.</dc:creator>\n<dc:creator>Lutchyn, R. M.</dc:creator>\n<dc:creator>Glazman, L. I.</dc:creator>\n<dc:source>Physical Review Letters, Volume 120, Issue 2, id.029901</dc:source>\n<dc:date>2018-01-01</dc:date>\n<dc:relation>https://ui.adsabs.harvard.edu/abs/2018PhRvL.120b9901P</dc:relation>\n<dc:description>Not Available &lt;P /&gt;</dc:description>\n<dc:identifier>doi:10.1103/PhysRevLett.120.029901</dc:identifier>\n</record>\n\n<record>\n<dc:identifier>2017PhDT........14C</dc:identifier>\n<dc:title>Resolving Gas-Phase Metallicity In Galaxies</dc:title>\n<dc:creator>Carton, David</dc:creator>\n<dc:source>PhD Thesis, Leiden University, 2017</dc:source>\n<dc:date>2017-06-01</dc:date>\n<dc:subject>galaxies: evolution, galaxies: abundances, galaxies: ISM</dc:subject>\n<dc:relation>https://ui.adsabs.harvard.edu/abs/2017PhDT........14C</dc:relation>\n<dc:description>Chapter 2: As part of the Bluedisk survey we analyse the radial gas-phase metallicity profiles of 50 late-type galaxies. We compare the metallicity profiles of a sample of HI-rich galaxies against a control sample of HI-\'normal\' galaxies. We find the metallicity gradient of a galaxy to be strongly correlated with its HI mass fraction {M}{HI}) / {M}_{\\ast}). We note that some galaxies exhibit a steeper metallicity profile in the outer disc than in the inner disc. These galaxies are found in both the HI-rich and control samples. This contradicts a previous indication that these outer drops are exclusive to HI-rich galaxies. These effects are not driven by bars, although we do find some indication that barred galaxies have flatter metallicity profiles. By applying a simple analytical model we are able to account for the variety of metallicity profiles that the two samples present. The success of this model implies that the metallicity in these isolated galaxies may be in a local equilibrium, regulated by star formation. This insight could provide an explanation of the observed local mass-metallicity relation. &lt;P /&gt;Chapter 3 We present a method to recover the gas-phase metallicity gradients from integral field spectroscopic (IFS) observations of barely resolved galaxies. We take a forward modelling approach and compare our models to the observed spatial distribution of emission line fluxes, accounting for the degrading effects of seeing and spatial binning. The method is flexible and is not limited to particular emission lines or instruments. We test the model through comparison to synthetic observations and use downgraded observations of nearby galaxies to validate this work. As a proof of concept we also apply the model to real IFS observations of high-redshift galaxies. From our testing we show that the inferred metallicity gradients and central metallicities are fairly insensitive to the assumptions made in the model and that they are reliably recovered for galaxies with sizes approximately equal to the half width at half maximum of the point-spread function. However, we also find that the presence of star forming clumps can significantly complicate the interpretation of metallicity gradients in moderately resolved high-redshift galaxies. Therefore we emphasize that care should be taken when comparing nearby well-resolved observations to high-redshift observations of partially resolved galaxies. &lt;P /&gt;Chapter 4 We present gas-phase metallicity gradients for 94 star-forming galaxies between (0.08 &amp;lt; z &amp;lt; 0.84). We find a negative median metallicity gradient of (-0.043^{+0.009}_{-0.007}, dex/kpc)/span&amp;gt;, i.e. on average we find the centres of these galaxies to be more metal-rich than their outskirts. However, there is significant scatter underlying this and we find that 10% (9) galaxies have significantly positive metallicity gradients, 39% (37) have significantly negative gradients, 28% (26) have gradients consistent with being flat, the remainder 23% (22) are considered to have unreliable gradient estimates. We find a slight trend for a more negative metallicity gradient with both increasing stellar mass and increasing star formation rate (SFR). However, given the potential redshift and size selection effects, we do not consider these trends to be significant. Indeed when we normalize the SFR of our galaxies relative to the main sequence, we do not observe any trend between the metallicity gradient and the normalized SFR. This finding is contrary to other recent studies of galaxies at similar and higher redshifts. We do, however, identify a novel trend between the metallicity gradient of a galaxy and its size. Small galaxies ((r_d &amp;lt; 3 kpc)) present a large spread in observed metallicity gradients (both negative and positive gradients). In contrast, we find no large galaxies (r_d &amp;gt; 3 kpc) with positive metallicity gradients, and overall there is less scatter in the metallicity gradient amongst the large galaxies. We suggest that these large (well-evolved) galaxies may be analogues of galaxies in the present-day Universe, which also present a common negative metallicity gradient. &lt;P /&gt;Chapter 5 The relationship between a galaxy\'s stellar mass and its gas-phase metallicity results from the complex interplay between star formation and the inflow and outflow of gas. Since the gradient of metals in galaxies is also influenced by the same processes, it is therefore natural to contrast the metallicity gradient with the mass-metallicity relation. Here we study the interrelation of the stellar mass, central metallicity and metallicity gradient, using a sample of 72 galaxies spanning (0.13 &amp;lt; z &amp;lt; 0.84) with reliable metallicity gradient estimates. We find that typically the galaxies that fall below the mean mass-metallicity relation have flat or inverted metallicity gradients. We quantify their relationship taking full account of the covariance between the different variables and find that at fixed mass the central metallicity is anti-correlated with the metallicity gradient. We argue that this is consistent with a scenario that suppresses the central metallicity either through the inflow of metal poor gas or outflow of metal enriched gas. &lt;P /&gt;</dc:description>\n<dc:identifier>doi:10.5281/zenodo.581221</dc:identifier>\n</record>\n\n<record>\n<dc:identifier>2017nova.pres.2388K</dc:identifier>\n<dc:title>A 3D View of a Supernova Remnant</dc:title>\n<dc:creator>Kohler, Susanna</dc:creator>\n<dc:source>AAS Nova Highlight, 14 Jun 2017, id.2388</dc:source>\n<dc:date>2017-06-01</dc:date>\n<dc:subject>Features, Highlights, interstellar medium, stellar evolution, supernova remnant, supernovae, white dwarfs</dc:subject>\n<dc:relation>https://ui.adsabs.harvard.edu/abs/2017nova.pres.2388K</dc:relation>\n<dc:description>The outlined regions mark the 57 knots in Tycho selected by the authors for velocity measurements. Magenta regions have redshifted line-of-sight velocities (moving away from us); cyan regions have blueshifted light-of-sight velocities (moving toward us). [Williams et al. 2017]The Tycho supernova remnant was first observed in the year 1572. Nearly 450 years later, astronomers have now used X-ray observations of Tycho to build the first-ever 3D map of a Type Ia supernova remnant.Signs of ExplosionsSupernova remnants are spectacular structures formed by the ejecta of stellar explosions as they expand outwards into the surrounding interstellar medium.One peculiarity of these remnants is that they often exhibit asymmetries in their appearance and motion. Is this because the ejecta are expanding into a nonuniform interstellar medium? Or was the explosion itself asymmetric? The best way we can explore this question is with detailed observations of the remnants.Histograms of the velocity in distribution of the knots in the X (green), Y (blue) and Z (red) directions (+Z is away from the observer). They show no evidence for asymmetric expansion of the knots. [Williams et al. 2017]Enter TychoTo this end, a team of scientists led by Brian Williams (Space Telescope Science Institute and NASA Goddard SFC) has worked to map out the 3D velocities of the ejecta in the Tycho supernova remnant. Tycho is a Type Ia supernova thought to be caused by the thermonuclear explosion of a white dwarf in a binary system that was destabilized by mass transfer from its companion.After 450 years of expansion, the remnant now has the morphological appearance of a roughly circular cloud of clumpy ejecta. The forward shock wave from the supernova, however, is known to have twice the velocity on one side of the shell as on the other.To better understand this asymmetry, Williams and collaborators selected a total of 57 knots in Tychos ejecta, spread out around the remnant. They then used 12 years of Chandra X-ray observations to measure both the knots proper motion in the plane of the sky and their line-of-sight velocity. These two measurements were then combined to build a full 3D map of the motion of the ejecta.3D hydrodynamical simulations of Tycho, stopped at the current epoch. These show that both initially smooth (top) and initially clumpy (bottom) ejecta models are consistent with the current observations of the morphology and dynamics of Tychos ejecta. [Adapted from Williams et al. 2017]Symmetry and ClumpsWilliams and collaborators found that the knots have total velocities that range from 2400 to 6600 km/s. Unlike the forward shock of the supernova, Tychos ejecta display no asymmetries in their motion which suggests that the explosion itself was symmetric. The more likely explanation is a density gradient in the interstellar medium, which could slow the shock wave on one side of the remnant without yet affecting the motion of the clumps of ejecta.As a final exploration, the authors attempt to address the origin of Tychos clumpiness. The fact that some of Tychos ejecta knots precede its outer edge has raised the question of whether the ejecta started out clumpy, or if they began smooth and only clumped during expansion. Williams and collaborators matched the morphological and dynamical data to simulations, demonstrating that neither scenario can be ruled out at this time.This first 3D map of a Type Ia supernova represents an important step in our ability to understand these stellar explosions. The authors suggest that well be able to expand on this map in the future with additional observations from Chandra, as well as with new data from future X-ray observatories that will be able to detect fainter emission.CitationBrian J. Williams et al 2017 ApJ 842 28. doi:10.3847/1538-4357/aa7384 &lt;P /&gt;</dc:description>\n</record>\n\n<record>\n<dc:identifier>2017CBET.4403....2G</dc:identifier>\n<dc:title>Potential New Meteor Shower from Comet C/2015 D4 (Borisov)</dc:title>\n<dc:creator>Green, D. W. E.</dc:creator>\n<dc:source>Central Bureau Electronic Telegrams, 4403, 2 (2017). Edited by Green, D. W. E.</dc:source>\n<dc:date>2017-06-01</dc:date>\n<dc:relation>https://ui.adsabs.harvard.edu/abs/2017CBET.4403....2G</dc:relation>\n<dc:description>A previous good encounter occurred on 2006 July 29d04h11m UT (r - Delta = +0.0003 AU, solar long. = 125.841 deg). Future encounters are predicted on 2029 July 29d01h53m (+0.0007 AU, 125.816 deg), 2042 July 29d10h48m (+0.0006 AU, 125.886 deg), 2053 July 29d05h35m (+0.0001 AU, 125.848 deg), and on 2068 July 29d02h09m UT (-0.0001 AU, 125.863 deg). &lt;P /&gt;</dc:description>\n</record>\n\n<record>\n<dc:identifier>2017ascl.soft06009C</dc:identifier>\n<dc:title>sick: Spectroscopic inference crank</dc:title>\n<dc:creator>Casey, Andrew R.</dc:creator>\n<dc:source>Astrophysics Source Code Library, record ascl:1706.009</dc:source>\n<dc:date>2017-06-01</dc:date>\n<dc:subject>Software</dc:subject>\n<dc:relation>https://ui.adsabs.harvard.edu/abs/2017ascl.soft06009C</dc:relation>\n<dc:description>sick infers astrophysical parameters from noisy observed spectra. Phenomena that can alter the data (e.g., redshift, continuum, instrumental broadening, outlier pixels) are modeled and simultaneously inferred with the astrophysical parameters of interest. This package relies on emcee (ascl:1303.002); it is best suited for situations where a grid of model spectra already exists, and one would like to infer model parameters given some data. &lt;P /&gt;</dc:description>\n</record>\n\n<record>\n<dc:identifier>2017yCat.113380453S</dc:identifier>\n<dc:title>VizieR Online Data Catalog: BM CVn V-band differential light curve (Siltala+, 2017)</dc:title>\n<dc:creator>Siltala, J.</dc:creator>\n<dc:creator>Jetsu, L.</dc:creator>\n<dc:creator>Hackman, T.</dc:creator>\n<dc:creator>Henry, G. W.</dc:creator>\n<dc:creator>Immonen, L.</dc:creator>\n<dc:creator>Kajatkari, P.</dc:creator>\n<dc:creator>Lankinen, J.</dc:creator>\n<dc:creator>Lehtinen, J.</dc:creator>\n<dc:creator>Monira, S.</dc:creator>\n<dc:creator>Nikbakhsh, S.</dc:creator>\n<dc:creator>Viitanen, A.</dc:creator>\n<dc:creator>Viuho, J.</dc:creator>\n<dc:creator>Willamo, T.</dc:creator>\n<dc:source>VizieR On-line Data Catalog: J/AN/338/453. Originally published in: 2017AN....338..453S</dc:source>\n<dc:date>2017-05-01</dc:date>\n<dc:subject>Stars: variable</dc:subject>\n<dc:relation>https://ui.adsabs.harvard.edu/abs/2017yCat.113380453S</dc:relation>\n<dc:description>The included files present the numerical data of our analysis of the BM CVn photometry. The data consists of differential Johnson V-band photometry using the star HD 116010 as the comparison star. &lt;P /&gt;The analysis has been performed using the previously published continuous period search (CPS) method, described in detail in Lehtinen et al., 2011A&amp;amp;A...527A.136L, Cat. J/A+A/527/A136. &lt;P /&gt;(4 data files). &lt;P /&gt;</dc:description>\n</record>\n\n<record>\n<dc:identifier>2017AAVSN.429....1W</dc:identifier>\n<dc:title>V694 Mon (MWC 560) spectroscopy requested</dc:title>\n<dc:creator>Waagen, Elizabeth O.</dc:creator>\n<dc:source>AAVSO Special Notice #429</dc:source>\n<dc:date>2017-05-01</dc:date>\n<dc:subject>astronomical databases: miscellaneous, binaries: symbiotic, stars: individual (V694 Mon, MWC 560)</dc:subject>\n<dc:rights>(C) AAVSO 2017</dc:rights>\n<dc:relation>https://ui.adsabs.harvard.edu/abs/2017AAVSN.429....1W</dc:relation>\n<dc:description>The observing campaign from 2016 on V694 Mon (MWC 560) (AAVSO Alert Notice 538) has been continued, but with different requirements. Photometry is no longer specifically requested on a regular basis (although ongoing observations that do not interfere with other obligations are welcome). Spectroscopy on a cadence of a week or two is requested to monitor changes in the disk outflow. Investigator Adrian Lucy writes: "Adrian Lucy and Dr. Jeno Sokoloski (Columbia University) have requested spectroscopic monitoring of the broad-absorption-line symbiotic star V694 Mon (MWC 560), as a follow-up to coordinated multi-wavelength observations obtained during its recent outburst (ATel #8653, #8832, #8957; #10281). This system is a perfect place in which to study the relationship between an accretion disk and disk winds/jets, and a high-value target for which even low-resolution spectra can be extraordinarily useful...Optical brightening in MWC 560 tends to predict higher-velocity absorption, but sometimes jumps in absorption velocity also appear during optical quiescence (e.g., Iijima 2001, ASPCS, 242, 187). If such a velocity jump occurs during photometric quiescence, it may prompt radio observations to confirm and test the proposed outflow origin for recently-discovered flat-spectrum radio emission (Lucy et al. ATel #10281)...Furthermore, volunteer spectroscopic monitoring of this system has proved useful in unpredictable ways. For example, \'amateur\' spectra obtained by Somogyi Péter in 2015 December demonstrated that the velocity of absorption was very low only a month before an optical outburst peak prompted absorption troughs up to 3000 km/s, which constrains very well the timing of the changes to the outflow to a degree that would not have been otherwise possible. Any resolution can be useful. A wavelength range that can accommodate a blueshift of at least 140 angstroms (6000 km/s) from the rest wavelengths of H-alpha at 6562 angstroms and/or H-beta at 4861 angstroms is ideal, though spectra with a smaller range can still be useful. Photometry could potentially still be useful, but will be supplementary to medium-cadence photometry being collected by the ANS collaboration." "Spectroscopy may be uploaded to the ARAS database (http://www.astrosurf.com/aras/Aras_DataBase/DataBase.htm), or sent to Adrian and Jeno directly at &amp;lt;lucy@astro.columbia.edu&amp;gt;. Finder charts with sequence may be created using the AAVSO Variable Star Plotter (https://www.aavso.org/vsp). Photometry should be submitted to the AAVSO International Database. See full Special Notice for more details. &lt;P /&gt;</dc:description>\n</record>\n\n<record>\n<dc:identifier>2017sptz.prop13168Y</dc:identifier>\n<dc:title>Confirm the Nature of a TDE Candidate in ULIRG F01004-2237 Using Spitzer mid-IR Light Curves</dc:title>\n<dc:creator>Yan, Lin</dc:creator>\n<dc:source>Spitzer Proposal ID 13168</dc:source>\n<dc:date>2017-04-01</dc:date>\n<dc:relation>https://ui.adsabs.harvard.edu/abs/2017sptz.prop13168Y</dc:relation>\n<dc:description>ULIRG F01004-2237 had a strong optical flare, peaked in 2010, and the follow-up optical spectra classified this event as a TDE candidate (Tadhunter et al. 2017, Nature Astronomy). In early 2017, using archival WISE data, we discovered that its 3.4 and 4.6um fluxes have been steadily rising since 2013, increased by a factor of 3.5 and 2.6 respectively. The last epoch data from WISE on 2016-12-12 shows that F01004-2237 has reached 7.5 and 14mJy at 3.4 and 4.6um. We interpret the mid-IR LCs as infrared echoes from the earlier optical flare. We infer a convex, dust ring with a radius of 1 pc from the central heating source. Our model predicts that if this event is indeed a TDE, its mid-IR LCs should start to fade in next 5-12 months because it has already reprocessed most of the UV/optical energy from the tidal disruption. However, if this event is due to activities from an AGN, its mid-IR LCs could last over a much longer time scale. We request a total of 3.2 hours of Spitzer time to monitor the mid-IR variations in next 12 months. This will provide the critical data to confirm the nature of this transient event. &lt;P /&gt;</dc:description>\n</record>\n\n<record>\n<dc:identifier>2017MsT..........2A</dc:identifier>\n<dc:title>Surface Accuracy and Pointing Error Prediction of a 32 m Diameter Class Radio Astronomy Telescope</dc:title>\n<dc:creator>Azankpo, Severin</dc:creator>\n<dc:source>Masters thesis, University of Stellenbosch, March 2017, 120 pages</dc:source>\n<dc:date>2017-03-01</dc:date>\n<dc:relation>https://ui.adsabs.harvard.edu/abs/2017MsT..........2A</dc:relation>\n<dc:description>The African Very-long-baseline interferometry Network (AVN) is a joint project between South Africa and eight partner African countries aimed at establishing a VLBI (Very-Long-Baseline Interferometry) capable network of radio telescopes across the African continent. An existing structure that is earmarked for this project, is a 32 m diameter antenna located in Ghana that has become obsolete due to advances in telecommunication. The first phase of the conversion of this Ghana antenna into a radio astronomy telescope is to upgrade the antenna to observe at 5 GHz to 6.7 GHz frequency and then later to 18 GHz within a required performing tolerance. The surface and pointing accuracies for a radio telescope are much more stringent than that of a telecommunication antenna. The mechanical pointing accuracy of such telescopes is influenced by factors such as mechanical alignment, structural deformation, and servo drive train errors. The current research investigates the numerical simulation of the surface and pointing accuracies of the Ghana 32 m diameter radio astronomy telescope due to its structural deformation mainly influenced by gravity, wind and thermal loads. &lt;P /&gt;</dc:description>\n</record>\n\n<record>\n<dc:identifier>2016emo6.rept.....R</dc:identifier>\n<dc:title>The penumbral Moon\'s eclipse form 16 september 2016</dc:title>\n<dc:creator>Rotaru, Adrian</dc:creator>\n<dc:creator>Pteancu, Mircea</dc:creator>\n<dc:creator>Zaharia, Cristian</dc:creator>\n<dc:source>http://www.astronomy.ro/forum/viewtopic.php?p=159287#159287 (Comments in Romanian)</dc:source>\n<dc:date>2016-10-01</dc:date>\n<dc:subject>THE MOON, ECLIPSES, PARTIAL, PENUMBRAL, ASTROPHOTOGRAPHY</dc:subject>\n<dc:relation>https://ui.adsabs.harvard.edu/abs/2016emo6.rept.....R</dc:relation>\n<dc:description>The web page represents circumstances and photographs from the Moon\'s partial/penumbral eclipse from 16 September 2016 obtained from few various places in Romania (East Europe). A part of photographs give the maximum phase of the Eclipse, while another give the reddened Moon. &lt;P /&gt;</dc:description>\n</record>\n\n<record>\n<dc:identifier>2016iac..talk..872V</dc:identifier>\n<dc:title>Living on the edge: Adaptive Optics+Lucky Imaging</dc:title>\n<dc:creator>Velasco, Sergio</dc:creator>\n<dc:source>IAC Talks, Astronomy and Astrophysics Seminars from the Instituto de Astrofísica de Canarias, 872</dc:source>\n<dc:date>2016-03-01</dc:date>\n<dc:relation>https://ui.adsabs.harvard.edu/abs/2016iac..talk..872V</dc:relation>\n<dc:description>Not Available &lt;P /&gt;</dc:description>\n</record>\n\n<record>\n<dc:identifier>2009bcet.book...65L</dc:identifier>\n<dc:title>The Diversity of Nuclear Magnetic Resonance Spectroscopy</dc:title>\n<dc:creator>Liu, Corey W.</dc:creator>\n<dc:creator>Alekseyev, Viktor Y.</dc:creator>\n<dc:creator>Allwardt, Jeffrey R.</dc:creator>\n<dc:creator>Bankovich, Alexander J.</dc:creator>\n<dc:creator>Cade-Menun, Barbara J.</dc:creator>\n<dc:creator>Davis, Ronald W.</dc:creator>\n<dc:creator>Du, Lin-Shu</dc:creator>\n<dc:creator>Garcia, K. Christopher</dc:creator>\n<dc:creator>Herschlag, Daniel</dc:creator>\n<dc:creator>Khosla, Chaitan</dc:creator>\n<dc:creator>Kraut, Daniel A.</dc:creator>\n<dc:creator>Li, Qing</dc:creator>\n<dc:creator>Null, Brian</dc:creator>\n<dc:creator>Puglisi, Joseph D.</dc:creator>\n<dc:creator>Sigala, Paul A.</dc:creator>\n<dc:creator>Stebbins, Jonathan F.</dc:creator>\n<dc:creator>Varani, Luca</dc:creator>\n<dc:source>Biophysics and the Challenges of Emerging Threats, NATO Science for Peace and Security Series B: Physics and Biophysics. ISBN 978-90-481-2367-4. Springer Netherlands, 2009, p. 65</dc:source>\n<dc:date>2009-01-01</dc:date>\n<dc:subject>Physics</dc:subject>\n<dc:rights>(c) 2009: Springer Netherlands</dc:rights>\n<dc:relation>https://ui.adsabs.harvard.edu/abs/2009bcet.book...65L</dc:relation>\n<dc:description>The discovery of the physical phenomenon of Nuclear Magnetic Resonance (NMR) in 1946 gave rise to the spectroscopic technique that has become a remarkably versatile research tool. One could oversimplify NMR spectros-copy by categorizing it into the two broad applications of structure elucidation of molecules (associated with chemistry and biology) and imaging (associated with medicine). But, this certainly does not do NMR spectroscopy justice in demonstrating its general acceptance and utilization across the sciences. This manuscript is not an effort to present an exhaustive, or even partial review of NMR spectroscopy applications, but rather to provide a glimpse at the wide-ranging uses of NMR spectroscopy found within the confines of a single magnetic resonance research facility, the Stanford Magnetic Resonance Laboratory. Included here are summaries of projects involving protein structure determination, mapping of intermolecular interactions, exploring fundamental biological mechanisms, following compound cycling in the environmental, analysis of synthetic solid compounds, and microimaging of a model organism. &lt;P /&gt;</dc:description>\n<dc:identifier>doi:10.1007/978-90-481-2368-1_5</dc:identifier>\n</record>\n\n<record>\n<dc:identifier>2007AAS...210.2104M</dc:identifier>\n<dc:title>Time Domain Exploration with the Palomar-QUEST Sky Survey</dc:title>\n<dc:creator>Mahabal, Ashish A.</dc:creator>\n<dc:creator>Drake, A. J.</dc:creator>\n<dc:creator>Djorgovski, S. G.</dc:creator>\n<dc:creator>Donalek, C.</dc:creator>\n<dc:creator>Glikman, E.</dc:creator>\n<dc:creator>Graham, M. J.</dc:creator>\n<dc:creator>Williams, R.</dc:creator>\n<dc:creator>Baltay, C.</dc:creator>\n<dc:creator>Rabinowitz, D.</dc:creator>\n<dc:creator>PQ Team Caltech</dc:creator>\n<dc:creator>Yale</dc:creator>\n<dc:creator>NCSA</dc:creator>\n<dc:creator>Indiana</dc:creator>\n<dc:creator>, . . .</dc:creator>\n<dc:source>American Astronomical Society Meeting 210, id.21.04</dc:source>\n<dc:date>2007-05-01</dc:date>\n<dc:relation>https://ui.adsabs.harvard.edu/abs/2007AAS...210.2104M</dc:relation>\n<dc:description>Palomar-QUEST (PQ) synoptic sky survey has now been routinely processing data from driftscans in real-time. As four photometric bandpasses are utilized in nearly simultaneously, PQ is well suited to search for transient and highly variable objects. Using a series of software filters i.e. programs to select/deselect objects based on certain criteria we shorten the list of candidates from the initially flagged candidate transients. Such filters include looking for known asteroids, known variables, as well as moving, but previously uncatalogued objects based on their motion within a scan as well as between successive scans. Some software filters also deal with instrumental artifacts, edge effects, and use clustering of spurious detections around bright stars. During a typical night when we cover about 500 sq. degrees, we detect hundreds of asteroids, the primary contaminants in the search for astrophysical transients beyond our solar system. &lt;P /&gt;Here we describe some statistics based on the software filters we employ and the nature of the objects that seem to survive the process. We also discuss the usefulness of this to amateur astronomers, projects like VOEventNet, and other synoptic sky surveys. &lt;P /&gt;We also present an outline of the work we have started on quantifying the variability of quasars, blazars, as well as various classes of Galactic sources, by combining the large number of PQ scans with other existing data sources federated in the Virtual Observatory environment. &lt;P /&gt;The PQ survey is partially supported by the U.S. National Science Foundation (NSF). &lt;P /&gt;</dc:description>\n</record>\n\n<record>\n<dc:identifier>2007RJPh....1...35.</dc:identifier>\n<dc:title>Analysis of Thermal Losses in the Flat-Plate Collector of a Thermosyphon Solar Water Heater</dc:title>\n<dc:creator>., S. N. Agbo</dc:creator>\n<dc:creator>., E. C. Okoroigwe</dc:creator>\n<dc:source>Research Journal of Physics, vol. 1, issue 1, pp. 35-41</dc:source>\n<dc:date>2007-01-01</dc:date>\n<dc:relation>https://ui.adsabs.harvard.edu/abs/2007RJPh....1...35.</dc:relation>\n<dc:description>Not Available &lt;P /&gt;</dc:description>\n<dc:identifier>doi:10.3923/rjp.2007.35.41</dc:identifier>\n</record>\n\n<record>\n<dc:identifier>1995ans..agar..390M</dc:identifier>\n<dc:title>Spacecraft navigation requirements</dc:title>\n<dc:creator>Miller, Judy L.</dc:creator>\n<dc:source>In AGARD, Aerospace Navigation Systems p 390-405 (SEE N96-13404 02-04)</dc:source>\n<dc:date>1995-06-01</dc:date>\n<dc:subject>Earth Orbits, Navigation Aids, Navigators, Onboard Equipment, Space Navigation, Spacecraft Trajectories, Support Systems, Technology Assessment, Technology Utilization, Ascent Trajectories, Reentry Trajectories, Spacecraft, Spacecraft Performance, Spacecraft Survivability, Tradeoffs, Weight (Mass), Space Communications, Spacecraft Communications, Command and Tracking</dc:subject>\n<dc:relation>https://ui.adsabs.harvard.edu/abs/1995ans..agar..390M</dc:relation>\n<dc:description>Spacecraft operation depends upon knowledge of vehicular position and, consequently, navigational support has been required for all such systems. Technical requirements for different mission trajectories and orbits are addressed with consideration given to the various tradeoffs which may need to be considered. The broad spectrum of spacecraft are considered with emphasis upon those of greater military significance (i.e., near earth orbiting satellites). Technical requirements include, but are not limited to, accuracy; physical characteristics such as weight and volume; support requirements such as electrical power and ground support; and system integrity. Generic navigation suites for spacecraft applications are described. It is shown that operational spacecraft rely primarily upon ground-based tracking and computational centers with little or no navigational function allocated to the vehicle, while technology development efforts have been and continue to be directed primarily toward onboard navigation suites. The military significance of onboard navigators is shown to both improve spacecraft survivability and performance (accuracy). &lt;P /&gt;</dc:description>\n</record>\n\n<record>\n<dc:identifier>1995anda.book.....N</dc:identifier>\n<dc:title>Applied nonlinear dynamics: analytical, computational and experimental methods</dc:title>\n<dc:creator>Nayfeh, Ali H.</dc:creator>\n<dc:creator>Balachandran, Balakumar</dc:creator>\n<dc:source>Wiley series in nonlinear science, New York; Chichester: Wiley, |c1995</dc:source>\n<dc:date>1995-01-01</dc:date>\n<dc:relation>https://ui.adsabs.harvard.edu/abs/1995anda.book.....N</dc:relation>\n<dc:relation>citations:118</dc:relation>\n<dc:description>Not Available &lt;P /&gt;</dc:description>\n</record>\n\n<record>\n<dc:identifier>1991hep.th....8028G</dc:identifier>\n<dc:title>Applied Conformal Field Theory</dc:title>\n<dc:creator>Ginsparg, Paul</dc:creator>\n<dc:source>eprint arXiv:hep-th/9108028</dc:source>\n<dc:date>1988-11-01</dc:date>\n<dc:subject>High Energy Physics - Theory</dc:subject>\n<dc:relation>https://ui.adsabs.harvard.edu/abs/1991hep.th....8028G</dc:relation>\n<dc:relation>citations:190</dc:relation>\n<dc:description>These lectures consisted of an elementary introduction to conformal field theory, with some applications to statistical mechanical systems, and fewer to string theory. Contents: 1. Conformal theories in d dimensions 2. Conformal theories in 2 dimensions 3. The central charge and the Virasoro algebra 4. Kac determinant and unitarity 5. Identication of m = 3 with the critical Ising model 6. Free bosons and fermions 7. Free fermions on a torus 8. Free bosons on a torus 9. Affine Kac-Moody algebras and coset constructions 10. Advanced applications &lt;P /&gt;</dc:description>\n</record>\n\n<record>\n<dc:identifier>1983aiaa.meetY....K</dc:identifier>\n<dc:title>Autonomous navigation using lunar beacons</dc:title>\n<dc:creator>Khatib, A. R.</dc:creator>\n<dc:creator>Ellis, J.</dc:creator>\n<dc:creator>French, J.</dc:creator>\n<dc:creator>Null, G.</dc:creator>\n<dc:creator>Yunck, T.</dc:creator>\n<dc:creator>Wu, S.</dc:creator>\n<dc:source>American Institute of Aeronautics and Astronautics, Aerospace Sciences Meeting, 21st, Reno, NV, Jan. 10-13, 1983. 7 p.</dc:source>\n<dc:date>1983-01-01</dc:date>\n<dc:subject>Artificial Satellites, Autonomous Navigation, Earth-Moon System, Lunar Communication, Radio Beacons, Radio Navigation, Space Navigation, Doppler Navigation, Least Squares Method, Orbit Calculation, Space Communications, Spacecraft Communications, Command and Tracking</dc:subject>\n<dc:relation>https://ui.adsabs.harvard.edu/abs/1983aiaa.meetY....K</dc:relation>\n<dc:description>The concept of using lunar beacon signal transmission for on-board navigation for earth satellites and near-earth spacecraft is described. The system would require powerful transmitters on the earth-side of the moon\'s surface and black box receivers with antennae and microprocessors placed on board spacecraft for autonomous navigation. Spacecraft navigation requires three position and three velocity elements to establish location coordinates. Two beacons could be soft-landed on the lunar surface at the limits of allowable separation and each would transmit a wide-beam signal with cones reaching GEO heights and be strong enough to be received by small antennae in near-earth orbit. The black box processor would perform on-board computation with one-way Doppler/range data and dynamical models. Alternatively, GEO satellites such as the GPS or TDRSS spacecraft can be used with interferometric techniques to provide decimeter-level accuracy for aircraft navigation. &lt;P /&gt;</dc:description>\n</record>\n\n</records>'} data_ref = {'msg': 'Retrieved 22 abstracts, starting with number 1.', 'export': '<?xml version=\'1.0\' encoding=\'utf8\'?>\n<records xmlns="http://ads.harvard.edu/schema/abs/1.1/references" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://ads.harvard.edu/schema/abs/1.1/references http://ads.harvard.edu/schema/abs/1.1/references.xsd" retrieved="22" start="1" selected="22" citations="308">\n<record>\n<bibcode>2018Wthr...73Q..35.</bibcode>\n<title>Book reviews</title>\n<journal>Weather, vol. 73, issue 1, pp. 35-35</journal>\n<pubdate>Jan 2018</pubdate>\n<link type="abstract">\n<name>abstract</name>\n<url>https://ui.adsabs.harvard.edu/link_gateway/2018Wthr...73Q..35./abstract</url>\n</link>\n<link type="PUB_HTML">\n<name>Publisher Article</name>\n<url>https://ui.adsabs.harvard.edu/link_gateway/2018Wthr...73Q..35./PUB_HTML</url>\n</link>\n<url>https://ui.adsabs.harvard.edu/abs/2018Wthr...73Q..35.</url>\n<DOI>10.1002/wea.3072</DOI>\n</record>\n\n<record>\n<bibcode>2018TDM.....5a0201F</bibcode>\n<title>2D Materials: maintaining editorial quality</title>\n<author>Fal\'ko, Vladimir</author>\n<author>Thomas, Ceri-Wyn</author>\n<journal>2D Materials, Volume 5, Issue 1, article id. 010201 (2018).</journal>\n<pubdate>Jan 2018</pubdate>\n<link type="abstract">\n<name>abstract</name>\n<url>https://ui.adsabs.harvard.edu/link_gateway/2018TDM.....5a0201F/abstract</url>\n</link>\n<link type="PUB_HTML">\n<name>Publisher Article</name>\n<url>https://ui.adsabs.harvard.edu/link_gateway/2018TDM.....5a0201F/PUB_HTML</url>\n</link>\n<url>https://ui.adsabs.harvard.edu/abs/2018TDM.....5a0201F</url>\n<DOI>10.1088/2053-1583/aa9403</DOI>\n</record>\n\n<record>\n<bibcode>2018Spin....877001P</bibcode>\n<title>Obituary: In Memoriam Professor Dr. Shoucheng Zhang, Consulting Editor</title>\n<author>Parkin, Stuart</author>\n<author>Chantrell, Roy</author>\n<author>Chang, Ching-Ray</author>\n<journal>Spin, Volume 8, Issue 4, id. 1877001</journal>\n<pubdate>Jan 2018</pubdate>\n<link type="abstract">\n<name>abstract</name>\n<url>https://ui.adsabs.harvard.edu/link_gateway/2018Spin....877001P/abstract</url>\n</link>\n<link type="PUB_HTML">\n<name>Publisher Article</name>\n<url>https://ui.adsabs.harvard.edu/link_gateway/2018Spin....877001P/PUB_HTML</url>\n</link>\n<link type="PUB_PDF">\n<name>Publisher PDF</name>\n<url>https://ui.adsabs.harvard.edu/link_gateway/2018Spin....877001P/PUB_PDF</url>\n</link>\n<url>https://ui.adsabs.harvard.edu/abs/2018Spin....877001P</url>\n<DOI>10.1142/S2010324718770015</DOI>\n</record>\n\n<record>\n<bibcode>2018SAAS...38.....D</bibcode>\n<title>Millimeter Astronomy</title>\n<author>Dessauges-Zavadsky, Miroslava</author>\n<author>Pfenniger, Daniel</author>\n<journal>Millimeter Astronomy: Saas-Fee Advanced Course 38. Swiss Society for Astrophysics and Astronomy, Saas-Fee Advanced Course, Volume 38. ISBN 978-3-662-57545-1. Springer-Verlag GmbH Germany, part of Springer Nature, 2018</journal>\n<pubdate>Jan 2018</pubdate>\n<link type="abstract">\n<name>abstract</name>\n<url>https://ui.adsabs.harvard.edu/link_gateway/2018SAAS...38.....D/abstract</url>\n</link>\n<link type="coreads">\n<name>Co-Reads</name>\n<url>https://ui.adsabs.harvard.edu/link_gateway/2018SAAS...38.....D/coreads</url>\n</link>\n<link type="TOC">\n<name>Table of Contents</name>\n<url>https://ui.adsabs.harvard.edu/link_gateway/2018SAAS...38.....D/toc</url>\n</link>\n<link type="PUB_HTML">\n<name>Publisher Article</name>\n<url>https://ui.adsabs.harvard.edu/link_gateway/2018SAAS...38.....D/PUB_HTML</url>\n</link>\n<url>https://ui.adsabs.harvard.edu/abs/2018SAAS...38.....D</url>\n<DOI>10.1007/978-3-662-57546-8</DOI>\n</record>\n\n<record>\n<bibcode>2018PhRvL.120b9901P</bibcode>\n<title>Erratum: Quantum Criticality in Resonant Andreev Conduction [Phys. Rev. Lett. 119, 116802 (2017)]</title>\n<author>Pustilnik, M.</author>\n<author>van Heck, B.</author>\n<author>Lutchyn, R. M.</author>\n<author>Glazman, L. I.</author>\n<journal>Physical Review Letters, Volume 120, Issue 2, id.029901</journal>\n<pubdate>Jan 2018</pubdate>\n<link type="abstract">\n<name>abstract</name>\n<url>https://ui.adsabs.harvard.edu/link_gateway/2018PhRvL.120b9901P/abstract</url>\n</link>\n<link type="reference">\n<name>References in the Article</name>\n<url>https://ui.adsabs.harvard.edu/link_gateway/2018PhRvL.120b9901P/reference</url>\n<count>4</count>\n</link>\n<link type="PUB_HTML">\n<name>Publisher Article</name>\n<url>https://ui.adsabs.harvard.edu/link_gateway/2018PhRvL.120b9901P/PUB_HTML</url>\n</link>\n<url>https://ui.adsabs.harvard.edu/abs/2018PhRvL.120b9901P</url>\n<DOI>10.1103/PhysRevLett.120.029901</DOI>\n</record>\n\n<record>\n<bibcode>2017PhDT........14C</bibcode>\n<title>Resolving Gas-Phase Metallicity In Galaxies</title>\n<author>Carton, David</author>\n<journal>PhD Thesis, Leiden University, 2017</journal>\n<pubdate>Jun 2017</pubdate>\n<link type="abstract">\n<name>abstract</name>\n<url>https://ui.adsabs.harvard.edu/link_gateway/2017PhDT........14C/abstract</url>\n</link>\n<link type="reference">\n<name>References in the Article</name>\n<url>https://ui.adsabs.harvard.edu/link_gateway/2017PhDT........14C/reference</url>\n<count>1</count>\n</link>\n<link type="PUB_HTML">\n<name>Publisher Article</name>\n<url>https://ui.adsabs.harvard.edu/link_gateway/2017PhDT........14C/PUB_HTML</url>\n</link>\n<url>https://ui.adsabs.harvard.edu/abs/2017PhDT........14C</url>\n<DOI>10.5281/zenodo.581221</DOI>\n</record>\n\n<record>\n<bibcode>2017nova.pres.2388K</bibcode>\n<title>A 3D View of a Supernova Remnant</title>\n<author>Kohler, Susanna</author>\n<journal>AAS Nova Highlight, 14 Jun 2017, id.2388</journal>\n<pubdate>Jun 2017</pubdate>\n<link type="abstract">\n<name>abstract</name>\n<url>https://ui.adsabs.harvard.edu/link_gateway/2017nova.pres.2388K/abstract</url>\n</link>\n<link type="coreads">\n<name>Co-Reads</name>\n<url>https://ui.adsabs.harvard.edu/link_gateway/2017nova.pres.2388K/coreads</url>\n</link>\n<link type="PUB_HTML">\n<name>Publisher Article</name>\n<url>https://ui.adsabs.harvard.edu/link_gateway/2017nova.pres.2388K/PUB_HTML</url>\n</link>\n<link type="Chandra">\n<name>Chandra X-Ray Observatory</name>\n<url>https://ui.adsabs.harvard.edu/link_gateway/2017nova.pres.2388K/Chandra</url>\n<count>1</count>\n</link>\n<url>https://ui.adsabs.harvard.edu/abs/2017nova.pres.2388K</url>\n</record>\n\n<record>\n<bibcode>2017CBET.4403....2G</bibcode>\n<title>Potential New Meteor Shower from Comet C/2015 D4 (Borisov)</title>\n<author>Green, D. W. E.</author>\n<journal>Central Bureau Electronic Telegrams, 4403, 2 (2017). Edited by Green, D. W. E.</journal>\n<pubdate>Jun 2017</pubdate>\n<link type="abstract">\n<name>abstract</name>\n<url>https://ui.adsabs.harvard.edu/link_gateway/2017CBET.4403....2G/abstract</url>\n</link>\n<link type="PUB_HTML">\n<name>Publisher Article</name>\n<url>https://ui.adsabs.harvard.edu/link_gateway/2017CBET.4403....2G/PUB_HTML</url>\n</link>\n<url>https://ui.adsabs.harvard.edu/abs/2017CBET.4403....2G</url>\n</record>\n\n<record>\n<bibcode>2017ascl.soft06009C</bibcode>\n<title>sick: Spectroscopic inference crank</title>\n<author>Casey, Andrew R.</author>\n<journal>Astrophysics Source Code Library, record ascl:1706.009</journal>\n<pubdate>Jun 2017</pubdate>\n<link type="abstract">\n<name>abstract</name>\n<url>https://ui.adsabs.harvard.edu/link_gateway/2017ascl.soft06009C/abstract</url>\n</link>\n<link type="PUB_HTML">\n<name>Publisher Article</name>\n<url>https://ui.adsabs.harvard.edu/link_gateway/2017ascl.soft06009C/PUB_HTML</url>\n</link>\n<url>https://ui.adsabs.harvard.edu/abs/2017ascl.soft06009C</url>\n<eprintid>ascl:1706.009</eprintid>\n</record>\n\n<record>\n<bibcode>2017yCat.113380453S</bibcode>\n<title>VizieR Online Data Catalog: BM CVn V-band differential light curve (Siltala+, 2017)</title>\n<author>Siltala, J.</author>\n<author>Jetsu, L.</author>\n<author>Hackman, T.</author>\n<author>Henry, G. W.</author>\n<author>Immonen, L.</author>\n<author>Kajatkari, P.</author>\n<author>Lankinen, J.</author>\n<author>Lehtinen, J.</author>\n<author>Monira, S.</author>\n<author>Nikbakhsh, S.</author>\n<author>Viitanen, A.</author>\n<author>Viuho, J.</author>\n<author>Willamo, T.</author>\n<journal>VizieR On-line Data Catalog: J/AN/338/453. Originally published in: 2017AN....338..453S</journal>\n<pubdate>May 2017</pubdate>\n<link type="abstract">\n<name>abstract</name>\n<url>https://ui.adsabs.harvard.edu/link_gateway/2017yCat.113380453S/abstract</url>\n</link>\n<link type="Vizier">\n<name>VizieR Catalog Service</name>\n<url>https://ui.adsabs.harvard.edu/link_gateway/2017yCat.113380453S/Vizier</url>\n<count>1</count>\n</link>\n<url>https://ui.adsabs.harvard.edu/abs/2017yCat.113380453S</url>\n</record>\n\n<record>\n<bibcode>2017AAVSN.429....1W</bibcode>\n<title>V694 Mon (MWC 560) spectroscopy requested</title>\n<author>Waagen, Elizabeth O.</author>\n<journal>AAVSO Special Notice #429</journal>\n<pubdate>May 2017</pubdate>\n<link type="abstract">\n<name>abstract</name>\n<url>https://ui.adsabs.harvard.edu/link_gateway/2017AAVSN.429....1W/abstract</url>\n</link>\n<link type="reference">\n<name>References in the Article</name>\n<url>https://ui.adsabs.harvard.edu/link_gateway/2017AAVSN.429....1W/reference</url>\n<count>6</count>\n</link>\n<link type="coreads">\n<name>Co-Reads</name>\n<url>https://ui.adsabs.harvard.edu/link_gateway/2017AAVSN.429....1W/coreads</url>\n</link>\n<link type="PUB_HTML">\n<name>Publisher Article</name>\n<url>https://ui.adsabs.harvard.edu/link_gateway/2017AAVSN.429....1W/PUB_HTML</url>\n</link>\n<url>https://ui.adsabs.harvard.edu/abs/2017AAVSN.429....1W</url>\n</record>\n\n<record>\n<bibcode>2017sptz.prop13168Y</bibcode>\n<title>Confirm the Nature of a TDE Candidate in ULIRG F01004-2237 Using Spitzer mid-IR Light Curves</title>\n<author>Yan, Lin</author>\n<journal>Spitzer Proposal ID 13168</journal>\n<pubdate>Apr 2017</pubdate>\n<link type="abstract">\n<name>abstract</name>\n<url>https://ui.adsabs.harvard.edu/link_gateway/2017sptz.prop13168Y/abstract</url>\n</link>\n<link type="Spitzer">\n<name>Spitzer Space Telescope</name>\n<url>https://ui.adsabs.harvard.edu/link_gateway/2017sptz.prop13168Y/Spitzer</url>\n<count>1</count>\n</link>\n<url>https://ui.adsabs.harvard.edu/abs/2017sptz.prop13168Y</url>\n</record>\n\n<record>\n<bibcode>2017MsT..........2A</bibcode>\n<title>Surface Accuracy and Pointing Error Prediction of a 32 m Diameter Class Radio Astronomy Telescope</title>\n<author>Azankpo, Severin</author>\n<journal>Masters thesis, University of Stellenbosch, March 2017, 120 pages</journal>\n<pubdate>Mar 2017</pubdate>\n<link type="abstract">\n<name>abstract</name>\n<url>https://ui.adsabs.harvard.edu/link_gateway/2017MsT..........2A/abstract</url>\n</link>\n<link type="reference">\n<name>References in the Article</name>\n<url>https://ui.adsabs.harvard.edu/link_gateway/2017MsT..........2A/reference</url>\n<count>4</count>\n</link>\n<link type="PUB_HTML">\n<name>Publisher Article</name>\n<url>https://ui.adsabs.harvard.edu/link_gateway/2017MsT..........2A/PUB_HTML</url>\n</link>\n<link type="AUTHOR_PDF" access="open">\n<name>Author PDF</name>\n<url>https://ui.adsabs.harvard.edu/link_gateway/2017MsT..........2A/AUTHOR_PDF</url>\n</link>\n<link type="PUB_PDF">\n<name>Publisher PDF</name>\n<url>https://ui.adsabs.harvard.edu/link_gateway/2017MsT..........2A/PUB_PDF</url>\n</link>\n<url>https://ui.adsabs.harvard.edu/abs/2017MsT..........2A</url>\n</record>\n\n<record>\n<bibcode>2016emo6.rept.....R</bibcode>\n<title>The penumbral Moon\'s eclipse form 16 september 2016</title>\n<author>Rotaru, Adrian</author>\n<author>Pteancu, Mircea</author>\n<author>Zaharia, Cristian</author>\n<journal>http://www.astronomy.ro/forum/viewtopic.php?p=159287#159287 (Comments in Romanian)</journal>\n<pubdate>Oct 2016</pubdate>\n<link type="abstract">\n<name>abstract</name>\n<url>https://ui.adsabs.harvard.edu/link_gateway/2016emo6.rept.....R/abstract</url>\n</link>\n<link type="coreads">\n<name>Co-Reads</name>\n<url>https://ui.adsabs.harvard.edu/link_gateway/2016emo6.rept.....R/coreads</url>\n</link>\n<url>https://ui.adsabs.harvard.edu/abs/2016emo6.rept.....R</url>\n</record>\n\n<record>\n<bibcode>2016iac..talk..872V</bibcode>\n<title>Living on the edge: Adaptive Optics+Lucky Imaging</title>\n<author>Velasco, Sergio</author>\n<journal>IAC Talks, Astronomy and Astrophysics Seminars from the Instituto de Astrofísica de Canarias, 872</journal>\n<pubdate>Mar 2016</pubdate>\n<link type="abstract">\n<name>abstract</name>\n<url>https://ui.adsabs.harvard.edu/link_gateway/2016iac..talk..872V/abstract</url>\n</link>\n<link type="reference">\n<name>References in the Article</name>\n<url>https://ui.adsabs.harvard.edu/link_gateway/2016iac..talk..872V/reference</url>\n<count>1</count>\n</link>\n<link type="AUTHOR_HTML">\n<name>Author Article</name>\n<url>https://ui.adsabs.harvard.edu/link_gateway/2016iac..talk..872V/AUTHOR_HTML</url>\n</link>\n<link type="PUB_HTML">\n<name>Publisher Article</name>\n<url>https://ui.adsabs.harvard.edu/link_gateway/2016iac..talk..872V/PUB_HTML</url>\n</link>\n<url>https://ui.adsabs.harvard.edu/abs/2016iac..talk..872V</url>\n</record>\n\n<record>\n<bibcode>2009bcet.book...65L</bibcode>\n<title>The Diversity of Nuclear Magnetic Resonance Spectroscopy</title>\n<author>Liu, Corey W.</author>\n<author>Alekseyev, Viktor Y.</author>\n<author>Allwardt, Jeffrey R.</author>\n<author>Bankovich, Alexander J.</author>\n<author>Cade-Menun, Barbara J.</author>\n<author>Davis, Ronald W.</author>\n<author>Du, Lin-Shu</author>\n<author>Garcia, K. Christopher</author>\n<author>Herschlag, Daniel</author>\n<author>Khosla, Chaitan</author>\n<author>Kraut, Daniel A.</author>\n<author>Li, Qing</author>\n<author>Null, Brian</author>\n<author>Puglisi, Joseph D.</author>\n<author>Sigala, Paul A.</author>\n<author>Stebbins, Jonathan F.</author>\n<author>Varani, Luca</author>\n<journal>Biophysics and the Challenges of Emerging Threats, NATO Science for Peace and Security Series B: Physics and Biophysics. ISBN 978-90-481-2367-4. Springer Netherlands, 2009, p. 65</journal>\n<pubdate>Jan 2009</pubdate>\n<link type="abstract">\n<name>abstract</name>\n<url>https://ui.adsabs.harvard.edu/link_gateway/2009bcet.book...65L/abstract</url>\n</link>\n<link type="TOC">\n<name>Table of Contents</name>\n<url>https://ui.adsabs.harvard.edu/link_gateway/2009bcet.book...65L/toc</url>\n</link>\n<link type="PUB_HTML">\n<name>Publisher Article</name>\n<url>https://ui.adsabs.harvard.edu/link_gateway/2009bcet.book...65L/PUB_HTML</url>\n</link>\n<url>https://ui.adsabs.harvard.edu/abs/2009bcet.book...65L</url>\n<DOI>10.1007/978-90-481-2368-1_5</DOI>\n</record>\n\n<record>\n<bibcode>2007AAS...210.2104M</bibcode>\n<title>Time Domain Exploration with the Palomar-QUEST Sky Survey</title>\n<author>Mahabal, Ashish A.</author>\n<author>Drake, A. J.</author>\n<author>Djorgovski, S. G.</author>\n<author>Donalek, C.</author>\n<author>Glikman, E.</author>\n<author>Graham, M. J.</author>\n<author>Williams, R.</author>\n<author>Baltay, C.</author>\n<author>Rabinowitz, D.</author>\n<author>PQ Team Caltech</author>\n<author>Yale</author>\n<author>NCSA</author>\n<author>Indiana</author>\n<author>, . . .</author>\n<journal>American Astronomical Society Meeting 210, id.21.04</journal>\n<pubdate>May 2007</pubdate>\n<link type="abstract">\n<name>abstract</name>\n<url>https://ui.adsabs.harvard.edu/link_gateway/2007AAS...210.2104M/abstract</url>\n</link>\n<link type="TOC">\n<name>Table of Contents</name>\n<url>https://ui.adsabs.harvard.edu/link_gateway/2007AAS...210.2104M/toc</url>\n</link>\n<url>https://ui.adsabs.harvard.edu/abs/2007AAS...210.2104M</url>\n</record>\n\n<record>\n<bibcode>2007RJPh....1...35.</bibcode>\n<title>Analysis of Thermal Losses in the Flat-Plate Collector of a Thermosyphon Solar Water Heater</title>\n<author>., S. N. Agbo</author>\n<author>., E. C. Okoroigwe</author>\n<journal>Research Journal of Physics, vol. 1, issue 1, pp. 35-41</journal>\n<pubdate>Jan 2007</pubdate>\n<link type="abstract">\n<name>abstract</name>\n<url>https://ui.adsabs.harvard.edu/link_gateway/2007RJPh....1...35./abstract</url>\n</link>\n<link type="PUB_HTML">\n<name>Publisher Article</name>\n<url>https://ui.adsabs.harvard.edu/link_gateway/2007RJPh....1...35./PUB_HTML</url>\n</link>\n<url>https://ui.adsabs.harvard.edu/abs/2007RJPh....1...35.</url>\n<DOI>10.3923/rjp.2007.35.41</DOI>\n</record>\n\n<record>\n<bibcode>1995ans..agar..390M</bibcode>\n<title>Spacecraft navigation requirements</title>\n<author>Miller, Judy L.</author>\n<journal>In AGARD, Aerospace Navigation Systems p 390-405 (SEE N96-13404 02-04)</journal>\n<pubdate>Jun 1995</pubdate>\n<link type="abstract">\n<name>abstract</name>\n<url>https://ui.adsabs.harvard.edu/link_gateway/1995ans..agar..390M/abstract</url>\n</link>\n<url>https://ui.adsabs.harvard.edu/abs/1995ans..agar..390M</url>\n</record>\n\n<record>\n<bibcode>1995anda.book.....N</bibcode>\n<title>Applied nonlinear dynamics: analytical, computational and experimental methods</title>\n<author>Nayfeh, Ali H.</author>\n<author>Balachandran, Balakumar</author>\n<journal>Wiley series in nonlinear science, New York; Chichester: Wiley, |c1995</journal>\n<pubdate>Jan 1995</pubdate>\n<link type="abstract">\n<name>abstract</name>\n<url>https://ui.adsabs.harvard.edu/link_gateway/1995anda.book.....N/abstract</url>\n</link>\n<link type="citations">\n<name>Citations to the Article</name>\n<url>https://ui.adsabs.harvard.edu/link_gateway/1995anda.book.....N/citations</url>\n<count>118</count>\n</link>\n<link type="coreads">\n<name>Co-Reads</name>\n<url>https://ui.adsabs.harvard.edu/link_gateway/1995anda.book.....N/coreads</url>\n</link>\n<url>https://ui.adsabs.harvard.edu/abs/1995anda.book.....N</url>\n<citations>118</citations>\n</record>\n\n<record>\n<bibcode>1991hep.th....8028G</bibcode>\n<title>Applied Conformal Field Theory</title>\n<author>Ginsparg, Paul</author>\n<journal>eprint arXiv:hep-th/9108028</journal>\n<pubdate>Nov 1988</pubdate>\n<link type="abstract">\n<name>abstract</name>\n<url>https://ui.adsabs.harvard.edu/link_gateway/1991hep.th....8028G/abstract</url>\n</link>\n<link type="citations">\n<name>Citations to the Article</name>\n<url>https://ui.adsabs.harvard.edu/link_gateway/1991hep.th....8028G/citations</url>\n<count>190</count>\n</link>\n<link type="coreads">\n<name>Co-Reads</name>\n<url>https://ui.adsabs.harvard.edu/link_gateway/1991hep.th....8028G/coreads</url>\n</link>\n<link type="EPRINT_HTML">\n<name>arXiv Article</name>\n<url>https://ui.adsabs.harvard.edu/link_gateway/1991hep.th....8028G/EPRINT_HTML</url>\n</link>\n<link type="EPRINT_PDF" access="open">\n<name>arXiv PDF</name>\n<url>https://ui.adsabs.harvard.edu/link_gateway/1991hep.th....8028G/EPRINT_PDF</url>\n</link>\n<url>https://ui.adsabs.harvard.edu/abs/1991hep.th....8028G</url>\n<citations>190</citations>\n<eprintid>arXiv:hep-th/9108028</eprintid>\n</record>\n\n<record>\n<bibcode>1983aiaa.meetY....K</bibcode>\n<title>Autonomous navigation using lunar beacons</title>\n<author>Khatib, A. R.</author>\n<author>Ellis, J.</author>\n<author>French, J.</author>\n<author>Null, G.</author>\n<author>Yunck, T.</author>\n<author>Wu, S.</author>\n<journal>American Institute of Aeronautics and Astronautics, Aerospace Sciences Meeting, 21st, Reno, NV, Jan. 10-13, 1983. 7 p.</journal>\n<pubdate>Jan 1983</pubdate>\n<link type="abstract">\n<name>abstract</name>\n<url>https://ui.adsabs.harvard.edu/link_gateway/1983aiaa.meetY....K/abstract</url>\n</link>\n<url>https://ui.adsabs.harvard.edu/abs/1983aiaa.meetY....K</url>\n</record>\n\n</records>'} data_ref_with_abs = {'msg': 'Retrieved 22 abstracts, starting with number 1.', 'export': '<?xml version=\'1.0\' encoding=\'utf8\'?>\n<records xmlns="http://ads.harvard.edu/schema/abs/1.1/abstracts" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://ads.harvard.edu/schema/abs/1.1/abstracts http://ads.harvard.edu/schema/abs/1.1/abstracts.xsd" retrieved="22" start="1" selected="22" citations="308">\n<record refereed="true" article="true" type="bookreview">\n<bibcode>2018Wthr...73Q..35.</bibcode>\n<title>Book reviews</title>\n<journal>Weather, vol. 73, issue 1, pp. 35-35</journal>\n<volume>73</volume>\n<pubdate>Jan 2018</pubdate>\n<page>35</page>\n<lastpage>35</lastpage>\n<link type="abstract">\n<name>abstract</name>\n<url>https://ui.adsabs.harvard.edu/link_gateway/2018Wthr...73Q..35./abstract</url>\n</link>\n<link type="PUB_HTML">\n<name>Publisher Article</name>\n<url>https://ui.adsabs.harvard.edu/link_gateway/2018Wthr...73Q..35./PUB_HTML</url>\n</link>\n<url>https://ui.adsabs.harvard.edu/abs/2018Wthr...73Q..35.</url>\n<abstract>Not Available &lt;P /&gt;</abstract>\n<DOI>10.1002/wea.3072</DOI>\n</record>\n\n<record refereed="true" article="true" type="editorial">\n<bibcode>2018TDM.....5a0201F</bibcode>\n<title>2D Materials: maintaining editorial quality</title>\n<author>Fal\'ko, Vladimir</author>\n<author>Thomas, Ceri-Wyn</author>\n<affiliation>AA(Editor in Chief, National Graphene Institute, University of Manchester, United Kingdom), AB(Publisher, IOP Publishing, Bristol, United Kingdom)</affiliation>\n<journal>2D Materials, Volume 5, Issue 1, article id. 010201 (2018).</journal>\n<volume>5</volume>\n<pubdate>Jan 2018</pubdate>\n<link type="abstract">\n<name>abstract</name>\n<url>https://ui.adsabs.harvard.edu/link_gateway/2018TDM.....5a0201F/abstract</url>\n</link>\n<link type="PUB_HTML">\n<name>Publisher Article</name>\n<url>https://ui.adsabs.harvard.edu/link_gateway/2018TDM.....5a0201F/PUB_HTML</url>\n</link>\n<url>https://ui.adsabs.harvard.edu/abs/2018TDM.....5a0201F</url>\n<abstract>Not Available &lt;P /&gt;</abstract>\n<DOI>10.1088/2053-1583/aa9403</DOI>\n</record>\n\n<record refereed="true" article="true" type="obituary">\n<bibcode>2018Spin....877001P</bibcode>\n<title>Obituary: In Memoriam Professor Dr. Shoucheng Zhang, Consulting Editor</title>\n<author>Parkin, Stuart</author>\n<author>Chantrell, Roy</author>\n<author>Chang, Ching-Ray</author>\n<journal>Spin, Volume 8, Issue 4, id. 1877001</journal>\n<volume>8</volume>\n<pubdate>Jan 2018</pubdate>\n<copyright>(c) 2018: World Scientific Publishing Company</copyright>\n<link type="abstract">\n<name>abstract</name>\n<url>https://ui.adsabs.harvard.edu/link_gateway/2018Spin....877001P/abstract</url>\n</link>\n<link type="PUB_HTML">\n<name>Publisher Article</name>\n<url>https://ui.adsabs.harvard.edu/link_gateway/2018Spin....877001P/PUB_HTML</url>\n</link>\n<link type="PUB_PDF">\n<name>Publisher PDF</name>\n<url>https://ui.adsabs.harvard.edu/link_gateway/2018Spin....877001P/PUB_PDF</url>\n</link>\n<url>https://ui.adsabs.harvard.edu/abs/2018Spin....877001P</url>\n<abstract>Not Available &lt;P /&gt;</abstract>\n<DOI>10.1142/S2010324718770015</DOI>\n</record>\n\n<record type="misc">\n<bibcode>2018SAAS...38.....D</bibcode>\n<title>Millimeter Astronomy</title>\n<author>Dessauges-Zavadsky, Miroslava</author>\n<author>Pfenniger, Daniel</author>\n<journal>Millimeter Astronomy: Saas-Fee Advanced Course 38. Swiss Society for Astrophysics and Astronomy, Saas-Fee Advanced Course, Volume 38. ISBN 978-3-662-57545-1. Springer-Verlag GmbH Germany, part of Springer Nature, 2018</journal>\n<volume>38</volume>\n<pubdate>Jan 2018</pubdate>\n<keywords>\n<keyword>Physics</keyword>\n</keywords>\n<copyright>(c) 2018: Springer-Verlag GmbH Germany, part of Springer Nature</copyright>\n<link type="abstract">\n<name>abstract</name>\n<url>https://ui.adsabs.harvard.edu/link_gateway/2018SAAS...38.....D/abstract</url>\n</link>\n<link type="coreads">\n<name>Co-Reads</name>\n<url>https://ui.adsabs.harvard.edu/link_gateway/2018SAAS...38.....D/coreads</url>\n</link>\n<link type="TOC">\n<name>Table of Contents</name>\n<url>https://ui.adsabs.harvard.edu/link_gateway/2018SAAS...38.....D/toc</url>\n</link>\n<link type="PUB_HTML">\n<name>Publisher Article</name>\n<url>https://ui.adsabs.harvard.edu/link_gateway/2018SAAS...38.....D/PUB_HTML</url>\n</link>\n<url>https://ui.adsabs.harvard.edu/abs/2018SAAS...38.....D</url>\n<abstract>Not Available &lt;P /&gt;</abstract>\n<DOI>10.1007/978-3-662-57546-8</DOI>\n</record>\n\n<record refereed="true" article="true" type="erratum">\n<bibcode>2018PhRvL.120b9901P</bibcode>\n<title>Erratum: Quantum Criticality in Resonant Andreev Conduction [Phys. Rev. Lett. 119, 116802 (2017)]</title>\n<author>Pustilnik, M.</author>\n<author>van Heck, B.</author>\n<author>Lutchyn, R. M.</author>\n<author>Glazman, L. I.</author>\n<journal>Physical Review Letters, Volume 120, Issue 2, id.029901</journal>\n<volume>120</volume>\n<pubdate>Jan 2018</pubdate>\n<link type="abstract">\n<name>abstract</name>\n<url>https://ui.adsabs.harvard.edu/link_gateway/2018PhRvL.120b9901P/abstract</url>\n</link>\n<link type="reference">\n<name>References in the Article</name>\n<url>https://ui.adsabs.harvard.edu/link_gateway/2018PhRvL.120b9901P/reference</url>\n<count>4</count>\n</link>\n<link type="PUB_HTML">\n<name>Publisher Article</name>\n<url>https://ui.adsabs.harvard.edu/link_gateway/2018PhRvL.120b9901P/PUB_HTML</url>\n</link>\n<url>https://ui.adsabs.harvard.edu/abs/2018PhRvL.120b9901P</url>\n<abstract>Not Available &lt;P /&gt;</abstract>\n<DOI>10.1103/PhysRevLett.120.029901</DOI>\n</record>\n\n<record refereed="true" type="phdthesis">\n<bibcode>2017PhDT........14C</bibcode>\n<title>Resolving Gas-Phase Metallicity In Galaxies</title>\n<author>Carton, David</author>\n<affiliation>AA(Leiden University)</affiliation>\n<journal>PhD Thesis, Leiden University, 2017</journal>\n<pubdate>Jun 2017</pubdate>\n<keywords>\n<keyword>galaxies: evolution</keyword>\n<keyword>galaxies: abundances</keyword>\n<keyword>galaxies: ISM</keyword>\n</keywords>\n<link type="abstract">\n<name>abstract</name>\n<url>https://ui.adsabs.harvard.edu/link_gateway/2017PhDT........14C/abstract</url>\n</link>\n<link type="reference">\n<name>References in the Article</name>\n<url>https://ui.adsabs.harvard.edu/link_gateway/2017PhDT........14C/reference</url>\n<count>1</count>\n</link>\n<link type="PUB_HTML">\n<name>Publisher Article</name>\n<url>https://ui.adsabs.harvard.edu/link_gateway/2017PhDT........14C/PUB_HTML</url>\n</link>\n<url>https://ui.adsabs.harvard.edu/abs/2017PhDT........14C</url>\n<abstract>Chapter 2: As part of the Bluedisk survey we analyse the radial gas-phase metallicity profiles of 50 late-type galaxies. We compare the metallicity profiles of a sample of HI-rich galaxies against a control sample of HI-\'normal\' galaxies. We find the metallicity gradient of a galaxy to be strongly correlated with its HI mass fraction {M}{HI}) / {M}_{\\ast}). We note that some galaxies exhibit a steeper metallicity profile in the outer disc than in the inner disc. These galaxies are found in both the HI-rich and control samples. This contradicts a previous indication that these outer drops are exclusive to HI-rich galaxies. These effects are not driven by bars, although we do find some indication that barred galaxies have flatter metallicity profiles. By applying a simple analytical model we are able to account for the variety of metallicity profiles that the two samples present. The success of this model implies that the metallicity in these isolated galaxies may be in a local equilibrium, regulated by star formation. This insight could provide an explanation of the observed local mass-metallicity relation. &lt;P /&gt;Chapter 3 We present a method to recover the gas-phase metallicity gradients from integral field spectroscopic (IFS) observations of barely resolved galaxies. We take a forward modelling approach and compare our models to the observed spatial distribution of emission line fluxes, accounting for the degrading effects of seeing and spatial binning. The method is flexible and is not limited to particular emission lines or instruments. We test the model through comparison to synthetic observations and use downgraded observations of nearby galaxies to validate this work. As a proof of concept we also apply the model to real IFS observations of high-redshift galaxies. From our testing we show that the inferred metallicity gradients and central metallicities are fairly insensitive to the assumptions made in the model and that they are reliably recovered for galaxies with sizes approximately equal to the half width at half maximum of the point-spread function. However, we also find that the presence of star forming clumps can significantly complicate the interpretation of metallicity gradients in moderately resolved high-redshift galaxies. Therefore we emphasize that care should be taken when comparing nearby well-resolved observations to high-redshift observations of partially resolved galaxies. &lt;P /&gt;Chapter 4 We present gas-phase metallicity gradients for 94 star-forming galaxies between (0.08 &amp;lt; z &amp;lt; 0.84). We find a negative median metallicity gradient of (-0.043^{+0.009}_{-0.007}, dex/kpc)/span&amp;gt;, i.e. on average we find the centres of these galaxies to be more metal-rich than their outskirts. However, there is significant scatter underlying this and we find that 10% (9) galaxies have significantly positive metallicity gradients, 39% (37) have significantly negative gradients, 28% (26) have gradients consistent with being flat, the remainder 23% (22) are considered to have unreliable gradient estimates. We find a slight trend for a more negative metallicity gradient with both increasing stellar mass and increasing star formation rate (SFR). However, given the potential redshift and size selection effects, we do not consider these trends to be significant. Indeed when we normalize the SFR of our galaxies relative to the main sequence, we do not observe any trend between the metallicity gradient and the normalized SFR. This finding is contrary to other recent studies of galaxies at similar and higher redshifts. We do, however, identify a novel trend between the metallicity gradient of a galaxy and its size. Small galaxies ((r_d &amp;lt; 3 kpc)) present a large spread in observed metallicity gradients (both negative and positive gradients). In contrast, we find no large galaxies (r_d &amp;gt; 3 kpc) with positive metallicity gradients, and overall there is less scatter in the metallicity gradient amongst the large galaxies. We suggest that these large (well-evolved) galaxies may be analogues of galaxies in the present-day Universe, which also present a common negative metallicity gradient. &lt;P /&gt;Chapter 5 The relationship between a galaxy\'s stellar mass and its gas-phase metallicity results from the complex interplay between star formation and the inflow and outflow of gas. Since the gradient of metals in galaxies is also influenced by the same processes, it is therefore natural to contrast the metallicity gradient with the mass-metallicity relation. Here we study the interrelation of the stellar mass, central metallicity and metallicity gradient, using a sample of 72 galaxies spanning (0.13 &amp;lt; z &amp;lt; 0.84) with reliable metallicity gradient estimates. We find that typically the galaxies that fall below the mean mass-metallicity relation have flat or inverted metallicity gradients. We quantify their relationship taking full account of the covariance between the different variables and find that at fixed mass the central metallicity is anti-correlated with the metallicity gradient. We argue that this is consistent with a scenario that suppresses the central metallicity either through the inflow of metal poor gas or outflow of metal enriched gas. &lt;P /&gt;</abstract>\n<DOI>10.5281/zenodo.581221</DOI>\n</record>\n\n<record type="pressrelease">\n<bibcode>2017nova.pres.2388K</bibcode>\n<title>A 3D View of a Supernova Remnant</title>\n<author>Kohler, Susanna</author>\n<journal>AAS Nova Highlight, 14 Jun 2017, id.2388</journal>\n<pubdate>Jun 2017</pubdate>\n<keywords>\n<keyword>Features</keyword>\n<keyword>Highlights</keyword>\n<keyword>interstellar medium</keyword>\n<keyword>stellar evolution</keyword>\n<keyword>supernova remnant</keyword>\n<keyword>supernovae</keyword>\n<keyword>white dwarfs</keyword>\n</keywords>\n<link type="abstract">\n<name>abstract</name>\n<url>https://ui.adsabs.harvard.edu/link_gateway/2017nova.pres.2388K/abstract</url>\n</link>\n<link type="coreads">\n<name>Co-Reads</name>\n<url>https://ui.adsabs.harvard.edu/link_gateway/2017nova.pres.2388K/coreads</url>\n</link>\n<link type="PUB_HTML">\n<name>Publisher Article</name>\n<url>https://ui.adsabs.harvard.edu/link_gateway/2017nova.pres.2388K/PUB_HTML</url>\n</link>\n<link type="Chandra">\n<name>Chandra X-Ray Observatory</name>\n<url>https://ui.adsabs.harvard.edu/link_gateway/2017nova.pres.2388K/Chandra</url>\n<count>1</count>\n</link>\n<url>https://ui.adsabs.harvard.edu/abs/2017nova.pres.2388K</url>\n<abstract>The outlined regions mark the 57 knots in Tycho selected by the authors for velocity measurements. Magenta regions have redshifted line-of-sight velocities (moving away from us); cyan regions have blueshifted light-of-sight velocities (moving toward us). [Williams et al. 2017]The Tycho supernova remnant was first observed in the year 1572. Nearly 450 years later, astronomers have now used X-ray observations of Tycho to build the first-ever 3D map of a Type Ia supernova remnant.Signs of ExplosionsSupernova remnants are spectacular structures formed by the ejecta of stellar explosions as they expand outwards into the surrounding interstellar medium.One peculiarity of these remnants is that they often exhibit asymmetries in their appearance and motion. Is this because the ejecta are expanding into a nonuniform interstellar medium? Or was the explosion itself asymmetric? The best way we can explore this question is with detailed observations of the remnants.Histograms of the velocity in distribution of the knots in the X (green), Y (blue) and Z (red) directions (+Z is away from the observer). They show no evidence for asymmetric expansion of the knots. [Williams et al. 2017]Enter TychoTo this end, a team of scientists led by Brian Williams (Space Telescope Science Institute and NASA Goddard SFC) has worked to map out the 3D velocities of the ejecta in the Tycho supernova remnant. Tycho is a Type Ia supernova thought to be caused by the thermonuclear explosion of a white dwarf in a binary system that was destabilized by mass transfer from its companion.After 450 years of expansion, the remnant now has the morphological appearance of a roughly circular cloud of clumpy ejecta. The forward shock wave from the supernova, however, is known to have twice the velocity on one side of the shell as on the other.To better understand this asymmetry, Williams and collaborators selected a total of 57 knots in Tychos ejecta, spread out around the remnant. They then used 12 years of Chandra X-ray observations to measure both the knots proper motion in the plane of the sky and their line-of-sight velocity. These two measurements were then combined to build a full 3D map of the motion of the ejecta.3D hydrodynamical simulations of Tycho, stopped at the current epoch. These show that both initially smooth (top) and initially clumpy (bottom) ejecta models are consistent with the current observations of the morphology and dynamics of Tychos ejecta. [Adapted from Williams et al. 2017]Symmetry and ClumpsWilliams and collaborators found that the knots have total velocities that range from 2400 to 6600 km/s. Unlike the forward shock of the supernova, Tychos ejecta display no asymmetries in their motion which suggests that the explosion itself was symmetric. The more likely explanation is a density gradient in the interstellar medium, which could slow the shock wave on one side of the remnant without yet affecting the motion of the clumps of ejecta.As a final exploration, the authors attempt to address the origin of Tychos clumpiness. The fact that some of Tychos ejecta knots precede its outer edge has raised the question of whether the ejecta started out clumpy, or if they began smooth and only clumped during expansion. Williams and collaborators matched the morphological and dynamical data to simulations, demonstrating that neither scenario can be ruled out at this time.This first 3D map of a Type Ia supernova represents an important step in our ability to understand these stellar explosions. The authors suggest that well be able to expand on this map in the future with additional observations from Chandra, as well as with new data from future X-ray observatories that will be able to detect fainter emission.CitationBrian J. Williams et al 2017 ApJ 842 28. doi:10.3847/1538-4357/aa7384 &lt;P /&gt;</abstract>\n</record>\n\n<record type="circular">\n<bibcode>2017CBET.4403....2G</bibcode>\n<title>Potential New Meteor Shower from Comet C/2015 D4 (Borisov)</title>\n<author>Green, D. W. E.</author>\n<journal>Central Bureau Electronic Telegrams, 4403, 2 (2017). Edited by Green, D. W. E.</journal>\n<volume>4403</volume>\n<pubdate>Jun 2017</pubdate>\n<page>2</page>\n<link type="abstract">\n<name>abstract</name>\n<url>https://ui.adsabs.harvard.edu/link_gateway/2017CBET.4403....2G/abstract</url>\n</link>\n<link type="PUB_HTML">\n<name>Publisher Article</name>\n<url>https://ui.adsabs.harvard.edu/link_gateway/2017CBET.4403....2G/PUB_HTML</url>\n</link>\n<url>https://ui.adsabs.harvard.edu/abs/2017CBET.4403....2G</url>\n<abstract>A previous good encounter occurred on 2006 July 29d04h11m UT (r - Delta = +0.0003 AU, solar long. = 125.841 deg). Future encounters are predicted on 2029 July 29d01h53m (+0.0007 AU, 125.816 deg), 2042 July 29d10h48m (+0.0006 AU, 125.886 deg), 2053 July 29d05h35m (+0.0001 AU, 125.848 deg), and on 2068 July 29d02h09m UT (-0.0001 AU, 125.863 deg). &lt;P /&gt;</abstract>\n</record>\n\n<record type="software">\n<bibcode>2017ascl.soft06009C</bibcode>\n<title>sick: Spectroscopic inference crank</title>\n<author>Casey, Andrew R.</author>\n<journal>Astrophysics Source Code Library, record ascl:1706.009</journal>\n<pubdate>Jun 2017</pubdate>\n<keywords>\n<keyword>Software</keyword>\n</keywords>\n<link type="abstract">\n<name>abstract</name>\n<url>https://ui.adsabs.harvard.edu/link_gateway/2017ascl.soft06009C/abstract</url>\n</link>\n<link type="PUB_HTML">\n<name>Publisher Article</name>\n<url>https://ui.adsabs.harvard.edu/link_gateway/2017ascl.soft06009C/PUB_HTML</url>\n</link>\n<url>https://ui.adsabs.harvard.edu/abs/2017ascl.soft06009C</url>\n<abstract>sick infers astrophysical parameters from noisy observed spectra. Phenomena that can alter the data (e.g., redshift, continuum, instrumental broadening, outlier pixels) are modeled and simultaneously inferred with the astrophysical parameters of interest. This package relies on emcee (ascl:1303.002); it is best suited for situations where a grid of model spectra already exists, and one would like to infer model parameters given some data. &lt;P /&gt;</abstract>\n<eprintid>ascl:1706.009</eprintid>\n</record>\n\n<record type="catalog">\n<bibcode>2017yCat.113380453S</bibcode>\n<title>VizieR Online Data Catalog: BM CVn V-band differential light curve (Siltala+, 2017)</title>\n<author>Siltala, J.</author>\n<author>Jetsu, L.</author>\n<author>Hackman, T.</author>\n<author>Henry, G. W.</author>\n<author>Immonen, L.</author>\n<author>Kajatkari, P.</author>\n<author>Lankinen, J.</author>\n<author>Lehtinen, J.</author>\n<author>Monira, S.</author>\n<author>Nikbakhsh, S.</author>\n<author>Viitanen, A.</author>\n<author>Viuho, J.</author>\n<author>Willamo, T.</author>\n<journal>VizieR On-line Data Catalog: J/AN/338/453. Originally published in: 2017AN....338..453S</journal>\n<pubdate>May 2017</pubdate>\n<keywords>\n<keyword>Stars: variable</keyword>\n</keywords>\n<link type="abstract">\n<name>abstract</name>\n<url>https://ui.adsabs.harvard.edu/link_gateway/2017yCat.113380453S/abstract</url>\n</link>\n<link type="Vizier">\n<name>VizieR Catalog Service</name>\n<url>https://ui.adsabs.harvard.edu/link_gateway/2017yCat.113380453S/Vizier</url>\n<count>1</count>\n</link>\n<url>https://ui.adsabs.harvard.edu/abs/2017yCat.113380453S</url>\n<abstract>The included files present the numerical data of our analysis of the BM CVn photometry. The data consists of differential Johnson V-band photometry using the star HD 116010 as the comparison star. &lt;P /&gt;The analysis has been performed using the previously published continuous period search (CPS) method, described in detail in Lehtinen et al., 2011A&amp;amp;A...527A.136L, Cat. J/A+A/527/A136. &lt;P /&gt;(4 data files). &lt;P /&gt;</abstract>\n</record>\n\n<record type="newsletter">\n<bibcode>2017AAVSN.429....1W</bibcode>\n<title>V694 Mon (MWC 560) spectroscopy requested</title>\n<author>Waagen, Elizabeth O.</author>\n<affiliation>AA(AAVSO)</affiliation>\n<journal>AAVSO Special Notice #429</journal>\n<volume>429</volume>\n<pubdate>May 2017</pubdate>\n<page>1</page>\n<keywords>\n<keyword>astronomical databases: miscellaneous</keyword>\n<keyword>binaries: symbiotic</keyword>\n<keyword>stars: individual (V694 Mon</keyword>\n<keyword>MWC 560)</keyword>\n</keywords>\n<copyright>(C) AAVSO 2017</copyright>\n<link type="abstract">\n<name>abstract</name>\n<url>https://ui.adsabs.harvard.edu/link_gateway/2017AAVSN.429....1W/abstract</url>\n</link>\n<link type="reference">\n<name>References in the Article</name>\n<url>https://ui.adsabs.harvard.edu/link_gateway/2017AAVSN.429....1W/reference</url>\n<count>6</count>\n</link>\n<link type="coreads">\n<name>Co-Reads</name>\n<url>https://ui.adsabs.harvard.edu/link_gateway/2017AAVSN.429....1W/coreads</url>\n</link>\n<link type="PUB_HTML">\n<name>Publisher Article</name>\n<url>https://ui.adsabs.harvard.edu/link_gateway/2017AAVSN.429....1W/PUB_HTML</url>\n</link>\n<url>https://ui.adsabs.harvard.edu/abs/2017AAVSN.429....1W</url>\n<abstract>The observing campaign from 2016 on V694 Mon (MWC 560) (AAVSO Alert Notice 538) has been continued, but with different requirements. Photometry is no longer specifically requested on a regular basis (although ongoing observations that do not interfere with other obligations are welcome). Spectroscopy on a cadence of a week or two is requested to monitor changes in the disk outflow. Investigator Adrian Lucy writes: "Adrian Lucy and Dr. Jeno Sokoloski (Columbia University) have requested spectroscopic monitoring of the broad-absorption-line symbiotic star V694 Mon (MWC 560), as a follow-up to coordinated multi-wavelength observations obtained during its recent outburst (ATel #8653, #8832, #8957; #10281). This system is a perfect place in which to study the relationship between an accretion disk and disk winds/jets, and a high-value target for which even low-resolution spectra can be extraordinarily useful...Optical brightening in MWC 560 tends to predict higher-velocity absorption, but sometimes jumps in absorption velocity also appear during optical quiescence (e.g., Iijima 2001, ASPCS, 242, 187). If such a velocity jump occurs during photometric quiescence, it may prompt radio observations to confirm and test the proposed outflow origin for recently-discovered flat-spectrum radio emission (Lucy et al. ATel #10281)...Furthermore, volunteer spectroscopic monitoring of this system has proved useful in unpredictable ways. For example, \'amateur\' spectra obtained by Somogyi Péter in 2015 December demonstrated that the velocity of absorption was very low only a month before an optical outburst peak prompted absorption troughs up to 3000 km/s, which constrains very well the timing of the changes to the outflow to a degree that would not have been otherwise possible. Any resolution can be useful. A wavelength range that can accommodate a blueshift of at least 140 angstroms (6000 km/s) from the rest wavelengths of H-alpha at 6562 angstroms and/or H-beta at 4861 angstroms is ideal, though spectra with a smaller range can still be useful. Photometry could potentially still be useful, but will be supplementary to medium-cadence photometry being collected by the ANS collaboration." "Spectroscopy may be uploaded to the ARAS database (http://www.astrosurf.com/aras/Aras_DataBase/DataBase.htm), or sent to Adrian and Jeno directly at &amp;lt;lucy@astro.columbia.edu&amp;gt;. Finder charts with sequence may be created using the AAVSO Variable Star Plotter (https://www.aavso.org/vsp). Photometry should be submitted to the AAVSO International Database. See full Special Notice for more details. &lt;P /&gt;</abstract>\n</record>\n\n<record type="proposal">\n<bibcode>2017sptz.prop13168Y</bibcode>\n<title>Confirm the Nature of a TDE Candidate in ULIRG F01004-2237 Using Spitzer mid-IR Light Curves</title>\n<author>Yan, Lin</author>\n<journal>Spitzer Proposal ID 13168</journal>\n<pubdate>Apr 2017</pubdate>\n<page>13168</page>\n<link type="abstract">\n<name>abstract</name>\n<url>https://ui.adsabs.harvard.edu/link_gateway/2017sptz.prop13168Y/abstract</url>\n</link>\n<link type="Spitzer">\n<name>Spitzer Space Telescope</name>\n<url>https://ui.adsabs.harvard.edu/link_gateway/2017sptz.prop13168Y/Spitzer</url>\n<count>1</count>\n</link>\n<url>https://ui.adsabs.harvard.edu/abs/2017sptz.prop13168Y</url>\n<abstract>ULIRG F01004-2237 had a strong optical flare, peaked in 2010, and the follow-up optical spectra classified this event as a TDE candidate (Tadhunter et al. 2017, Nature Astronomy). In early 2017, using archival WISE data, we discovered that its 3.4 and 4.6um fluxes have been steadily rising since 2013, increased by a factor of 3.5 and 2.6 respectively. The last epoch data from WISE on 2016-12-12 shows that F01004-2237 has reached 7.5 and 14mJy at 3.4 and 4.6um. We interpret the mid-IR LCs as infrared echoes from the earlier optical flare. We infer a convex, dust ring with a radius of 1 pc from the central heating source. Our model predicts that if this event is indeed a TDE, its mid-IR LCs should start to fade in next 5-12 months because it has already reprocessed most of the UV/optical energy from the tidal disruption. However, if this event is due to activities from an AGN, its mid-IR LCs could last over a much longer time scale. We request a total of 3.2 hours of Spitzer time to monitor the mid-IR variations in next 12 months. This will provide the critical data to confirm the nature of this transient event. &lt;P /&gt;</abstract>\n</record>\n\n<record type="mastersthesis">\n<bibcode>2017MsT..........2A</bibcode>\n<title>Surface Accuracy and Pointing Error Prediction of a 32 m Diameter Class Radio Astronomy Telescope</title>\n<author>Azankpo, Severin</author>\n<affiliation>AA(University of Stellenbosch)</affiliation>\n<journal>Masters thesis, University of Stellenbosch, March 2017, 120 pages</journal>\n<pubdate>Mar 2017</pubdate>\n<page>2</page>\n<link type="abstract">\n<name>abstract</name>\n<url>https://ui.adsabs.harvard.edu/link_gateway/2017MsT..........2A/abstract</url>\n</link>\n<link type="reference">\n<name>References in the Article</name>\n<url>https://ui.adsabs.harvard.edu/link_gateway/2017MsT..........2A/reference</url>\n<count>4</count>\n</link>\n<link type="PUB_HTML">\n<name>Publisher Article</name>\n<url>https://ui.adsabs.harvard.edu/link_gateway/2017MsT..........2A/PUB_HTML</url>\n</link>\n<link type="AUTHOR_PDF" access="open">\n<name>Author PDF</name>\n<url>https://ui.adsabs.harvard.edu/link_gateway/2017MsT..........2A/AUTHOR_PDF</url>\n</link>\n<link type="PUB_PDF">\n<name>Publisher PDF</name>\n<url>https://ui.adsabs.harvard.edu/link_gateway/2017MsT..........2A/PUB_PDF</url>\n</link>\n<url>https://ui.adsabs.harvard.edu/abs/2017MsT..........2A</url>\n<abstract>The African Very-long-baseline interferometry Network (AVN) is a joint project between South Africa and eight partner African countries aimed at establishing a VLBI (Very-Long-Baseline Interferometry) capable network of radio telescopes across the African continent. An existing structure that is earmarked for this project, is a 32 m diameter antenna located in Ghana that has become obsolete due to advances in telecommunication. The first phase of the conversion of this Ghana antenna into a radio astronomy telescope is to upgrade the antenna to observe at 5 GHz to 6.7 GHz frequency and then later to 18 GHz within a required performing tolerance. The surface and pointing accuracies for a radio telescope are much more stringent than that of a telecommunication antenna. The mechanical pointing accuracy of such telescopes is influenced by factors such as mechanical alignment, structural deformation, and servo drive train errors. The current research investigates the numerical simulation of the surface and pointing accuracies of the Ghana 32 m diameter radio astronomy telescope due to its structural deformation mainly influenced by gravity, wind and thermal loads. &lt;P /&gt;</abstract>\n</record>\n\n<record type="techreport">\n<bibcode>2016emo6.rept.....R</bibcode>\n<title>The penumbral Moon\'s eclipse form 16 september 2016</title>\n<author>Rotaru, Adrian</author>\n<author>Pteancu, Mircea</author>\n<author>Zaharia, Cristian</author>\n<affiliation>AA(Bragadiru, Romania), AB(Private Astronomical Observatory, Arad, Romania), AC(Private Astronomical Observatory, Ploiesti, Romania)</affiliation>\n<journal>http://www.astronomy.ro/forum/viewtopic.php?p=159287#159287 (Comments in Romanian)</journal>\n<pubdate>Oct 2016</pubdate>\n<keywords>\n<keyword>THE MOON</keyword>\n<keyword>ECLIPSES</keyword>\n<keyword>PARTIAL</keyword>\n<keyword>PENUMBRAL</keyword>\n<keyword>ASTROPHOTOGRAPHY</keyword>\n</keywords>\n<link type="abstract">\n<name>abstract</name>\n<url>https://ui.adsabs.harvard.edu/link_gateway/2016emo6.rept.....R/abstract</url>\n</link>\n<link type="coreads">\n<name>Co-Reads</name>\n<url>https://ui.adsabs.harvard.edu/link_gateway/2016emo6.rept.....R/coreads</url>\n</link>\n<url>https://ui.adsabs.harvard.edu/abs/2016emo6.rept.....R</url>\n<abstract>The web page represents circumstances and photographs from the Moon\'s partial/penumbral eclipse from 16 September 2016 obtained from few various places in Romania (East Europe). A part of photographs give the maximum phase of the Eclipse, while another give the reddened Moon. &lt;P /&gt;</abstract>\n</record>\n\n<record type="talk">\n<bibcode>2016iac..talk..872V</bibcode>\n<title>Living on the edge: Adaptive Optics+Lucky Imaging</title>\n<author>Velasco, Sergio</author>\n<affiliation>AA(Instituto de Astrofísica de Canarias)</affiliation>\n<journal>IAC Talks, Astronomy and Astrophysics Seminars from the Instituto de Astrofísica de Canarias, 872</journal>\n<pubdate>Mar 2016</pubdate>\n<page>872</page>\n<link type="abstract">\n<name>abstract</name>\n<url>https://ui.adsabs.harvard.edu/link_gateway/2016iac..talk..872V/abstract</url>\n</link>\n<link type="reference">\n<name>References in the Article</name>\n<url>https://ui.adsabs.harvard.edu/link_gateway/2016iac..talk..872V/reference</url>\n<count>1</count>\n</link>\n<link type="AUTHOR_HTML">\n<name>Author Article</name>\n<url>https://ui.adsabs.harvard.edu/link_gateway/2016iac..talk..872V/AUTHOR_HTML</url>\n</link>\n<link type="PUB_HTML">\n<name>Publisher Article</name>\n<url>https://ui.adsabs.harvard.edu/link_gateway/2016iac..talk..872V/PUB_HTML</url>\n</link>\n<url>https://ui.adsabs.harvard.edu/abs/2016iac..talk..872V</url>\n<abstract>Not Available &lt;P /&gt;</abstract>\n</record>\n\n<record article="true" type="inbook">\n<bibcode>2009bcet.book...65L</bibcode>\n<title>The Diversity of Nuclear Magnetic Resonance Spectroscopy</title>\n<author>Liu, Corey W.</author>\n<author>Alekseyev, Viktor Y.</author>\n<author>Allwardt, Jeffrey R.</author>\n<author>Bankovich, Alexander J.</author>\n<author>Cade-Menun, Barbara J.</author>\n<author>Davis, Ronald W.</author>\n<author>Du, Lin-Shu</author>\n<author>Garcia, K. Christopher</author>\n<author>Herschlag, Daniel</author>\n<author>Khosla, Chaitan</author>\n<author>Kraut, Daniel A.</author>\n<author>Li, Qing</author>\n<author>Null, Brian</author>\n<author>Puglisi, Joseph D.</author>\n<author>Sigala, Paul A.</author>\n<author>Stebbins, Jonathan F.</author>\n<author>Varani, Luca</author>\n<affiliation>AA(Stanford Magnetic Resonance Laboratory, Stanford University), AB(Department of Chemistry, Stanford University; , Genencor), AC(Department of Geological &amp;amp; Environmental Sciences, Stanford University; , ConocoPhillips Company), AD(Department of Molecular and Cellular Physiology, Stanford University; Department of Structural Biology, Stanford University), AE(Department of Geological &amp;amp; Environmental Sciences, Stanford University; , Agriculture and Agri-Food Canada), AF(Stanford Genome Technology Center, Stanford University; Department of Biochemistry, Stanford University), AG(Department of Geological &amp;amp; Environmental Sciences, Stanford University; Air Products and Chemicals, Inc. Allentown), AH(Department of Molecular and Cellular Physiology, Stanford University; Department of Structural Biology, Stanford University), AI(Department of Biochemistry, Stanford University), AJ(Department of Chemistry, Stanford University; Department of Biochemistry, Stanford University), AK(Department of Biochemistry, Stanford University; Department of Biochemistry, Molecular Biology and Cell Biology, Northwestern University), AL(Department of Chemistry, Stanford University; , Institute for Research in Biomedicine), AM(Stanford Genome Technology Center, Stanford University; Department of Biochemistry, Stanford University), AN(Stanford Magnetic Resonance Laboratory, Stanford University; Department of Structural Biology, Stanford University), AO(Department of Molecular and Cellular Physiology, Stanford University; Department of Structural Biology, Stanford University), AP(Department of Geological &amp;amp; Environmental Sciences, Stanford University), AQ(Department of Molecular and Cellular Physiology, Stanford University; Department of Structural Biology, Stanford University)</affiliation>\n<journal>Biophysics and the Challenges of Emerging Threats, NATO Science for Peace and Security Series B: Physics and Biophysics. ISBN 978-90-481-2367-4. Springer Netherlands, 2009, p. 65</journal>\n<pubdate>Jan 2009</pubdate>\n<page>65</page>\n<keywords>\n<keyword>Physics</keyword>\n</keywords>\n<copyright>(c) 2009: Springer Netherlands</copyright>\n<link type="abstract">\n<name>abstract</name>\n<url>https://ui.adsabs.harvard.edu/link_gateway/2009bcet.book...65L/abstract</url>\n</link>\n<link type="TOC">\n<name>Table of Contents</name>\n<url>https://ui.adsabs.harvard.edu/link_gateway/2009bcet.book...65L/toc</url>\n</link>\n<link type="PUB_HTML">\n<name>Publisher Article</name>\n<url>https://ui.adsabs.harvard.edu/link_gateway/2009bcet.book...65L/PUB_HTML</url>\n</link>\n<url>https://ui.adsabs.harvard.edu/abs/2009bcet.book...65L</url>\n<abstract>The discovery of the physical phenomenon of Nuclear Magnetic Resonance (NMR) in 1946 gave rise to the spectroscopic technique that has become a remarkably versatile research tool. One could oversimplify NMR spectros-copy by categorizing it into the two broad applications of structure elucidation of molecules (associated with chemistry and biology) and imaging (associated with medicine). But, this certainly does not do NMR spectroscopy justice in demonstrating its general acceptance and utilization across the sciences. This manuscript is not an effort to present an exhaustive, or even partial review of NMR spectroscopy applications, but rather to provide a glimpse at the wide-ranging uses of NMR spectroscopy found within the confines of a single magnetic resonance research facility, the Stanford Magnetic Resonance Laboratory. Included here are summaries of projects involving protein structure determination, mapping of intermolecular interactions, exploring fundamental biological mechanisms, following compound cycling in the environmental, analysis of synthetic solid compounds, and microimaging of a model organism. &lt;P /&gt;</abstract>\n<DOI>10.1007/978-90-481-2368-1_5</DOI>\n</record>\n\n<record type="abstract">\n<bibcode>2007AAS...210.2104M</bibcode>\n<title>Time Domain Exploration with the Palomar-QUEST Sky Survey</title>\n<author>Mahabal, Ashish A.</author>\n<author>Drake, A. J.</author>\n<author>Djorgovski, S. G.</author>\n<author>Donalek, C.</author>\n<author>Glikman, E.</author>\n<author>Graham, M. J.</author>\n<author>Williams, R.</author>\n<author>Baltay, C.</author>\n<author>Rabinowitz, D.</author>\n<author>PQ Team Caltech</author>\n<author>Yale</author>\n<author>NCSA</author>\n<author>Indiana</author>\n<author>, . . .</author>\n<affiliation>AA(Caltech), AB(Caltech), AC(Caltech), AD(Caltech), AE(Caltech), AF(Caltech), AG(Caltech), AH(Yale University), AI(Yale University)</affiliation>\n<journal>American Astronomical Society Meeting 210, id.21.04</journal>\n<volume>210</volume>\n<pubdate>May 2007</pubdate>\n<link type="abstract">\n<name>abstract</name>\n<url>https://ui.adsabs.harvard.edu/link_gateway/2007AAS...210.2104M/abstract</url>\n</link>\n<link type="TOC">\n<name>Table of Contents</name>\n<url>https://ui.adsabs.harvard.edu/link_gateway/2007AAS...210.2104M/toc</url>\n</link>\n<url>https://ui.adsabs.harvard.edu/abs/2007AAS...210.2104M</url>\n<abstract>Palomar-QUEST (PQ) synoptic sky survey has now been routinely processing data from driftscans in real-time. As four photometric bandpasses are utilized in nearly simultaneously, PQ is well suited to search for transient and highly variable objects. Using a series of software filters i.e. programs to select/deselect objects based on certain criteria we shorten the list of candidates from the initially flagged candidate transients. Such filters include looking for known asteroids, known variables, as well as moving, but previously uncatalogued objects based on their motion within a scan as well as between successive scans. Some software filters also deal with instrumental artifacts, edge effects, and use clustering of spurious detections around bright stars. During a typical night when we cover about 500 sq. degrees, we detect hundreds of asteroids, the primary contaminants in the search for astrophysical transients beyond our solar system. &lt;P /&gt;Here we describe some statistics based on the software filters we employ and the nature of the objects that seem to survive the process. We also discuss the usefulness of this to amateur astronomers, projects like VOEventNet, and other synoptic sky surveys. &lt;P /&gt;We also present an outline of the work we have started on quantifying the variability of quasars, blazars, as well as various classes of Galactic sources, by combining the large number of PQ scans with other existing data sources federated in the Virtual Observatory environment. &lt;P /&gt;The PQ survey is partially supported by the U.S. National Science Foundation (NSF). &lt;P /&gt;</abstract>\n</record>\n\n<record article="true" type="article">\n<bibcode>2007RJPh....1...35.</bibcode>\n<title>Analysis of Thermal Losses in the Flat-Plate Collector of a Thermosyphon Solar Water Heater</title>\n<author>., S. N. Agbo</author>\n<author>., E. C. Okoroigwe</author>\n<journal>Research Journal of Physics, vol. 1, issue 1, pp. 35-41</journal>\n<volume>1</volume>\n<pubdate>Jan 2007</pubdate>\n<page>35</page>\n<lastpage>41</lastpage>\n<link type="abstract">\n<name>abstract</name>\n<url>https://ui.adsabs.harvard.edu/link_gateway/2007RJPh....1...35./abstract</url>\n</link>\n<link type="PUB_HTML">\n<name>Publisher Article</name>\n<url>https://ui.adsabs.harvard.edu/link_gateway/2007RJPh....1...35./PUB_HTML</url>\n</link>\n<url>https://ui.adsabs.harvard.edu/abs/2007RJPh....1...35.</url>\n<abstract>Not Available &lt;P /&gt;</abstract>\n<DOI>10.3923/rjp.2007.35.41</DOI>\n</record>\n\n<record article="true" type="inproceedings">\n<bibcode>1995ans..agar..390M</bibcode>\n<title>Spacecraft navigation requirements</title>\n<author>Miller, Judy L.</author>\n<affiliation>AA(Draper (Charles Stark) Lab., Inc., Cambridge, MA.)</affiliation>\n<journal>In AGARD, Aerospace Navigation Systems p 390-405 (SEE N96-13404 02-04)</journal>\n<pubdate>Jun 1995</pubdate>\n<page>390</page>\n<lastpage>405</lastpage>\n<keywords>\n<keyword>Earth Orbits</keyword>\n<keyword>Navigation Aids</keyword>\n<keyword>Navigators</keyword>\n<keyword>Onboard Equipment</keyword>\n<keyword>Space Navigation</keyword>\n<keyword>Spacecraft Trajectories</keyword>\n<keyword>Support Systems</keyword>\n<keyword>Technology Assessment</keyword>\n<keyword>Technology Utilization</keyword>\n<keyword>Ascent Trajectories</keyword>\n<keyword>Reentry Trajectories</keyword>\n<keyword>Spacecraft</keyword>\n<keyword>Spacecraft Performance</keyword>\n<keyword>Spacecraft Survivability</keyword>\n<keyword>Tradeoffs</keyword>\n<keyword>Weight (Mass)</keyword>\n<keyword>Space Communications, Spacecraft Communications, Command and Tracking</keyword>\n</keywords>\n<link type="abstract">\n<name>abstract</name>\n<url>https://ui.adsabs.harvard.edu/link_gateway/1995ans..agar..390M/abstract</url>\n</link>\n<url>https://ui.adsabs.harvard.edu/abs/1995ans..agar..390M</url>\n<abstract>Spacecraft operation depends upon knowledge of vehicular position and, consequently, navigational support has been required for all such systems. Technical requirements for different mission trajectories and orbits are addressed with consideration given to the various tradeoffs which may need to be considered. The broad spectrum of spacecraft are considered with emphasis upon those of greater military significance (i.e., near earth orbiting satellites). Technical requirements include, but are not limited to, accuracy; physical characteristics such as weight and volume; support requirements such as electrical power and ground support; and system integrity. Generic navigation suites for spacecraft applications are described. It is shown that operational spacecraft rely primarily upon ground-based tracking and computational centers with little or no navigational function allocated to the vehicle, while technology development efforts have been and continue to be directed primarily toward onboard navigation suites. The military significance of onboard navigators is shown to both improve spacecraft survivability and performance (accuracy). &lt;P /&gt;</abstract>\n</record>\n\n<record type="book">\n<bibcode>1995anda.book.....N</bibcode>\n<title>Applied nonlinear dynamics: analytical, computational and experimental methods</title>\n<author>Nayfeh, Ali H.</author>\n<author>Balachandran, Balakumar</author>\n<journal>Wiley series in nonlinear science, New York; Chichester: Wiley, |c1995</journal>\n<pubdate>Jan 1995</pubdate>\n<link type="abstract">\n<name>abstract</name>\n<url>https://ui.adsabs.harvard.edu/link_gateway/1995anda.book.....N/abstract</url>\n</link>\n<link type="citations">\n<name>Citations to the Article</name>\n<url>https://ui.adsabs.harvard.edu/link_gateway/1995anda.book.....N/citations</url>\n<count>118</count>\n</link>\n<link type="coreads">\n<name>Co-Reads</name>\n<url>https://ui.adsabs.harvard.edu/link_gateway/1995anda.book.....N/coreads</url>\n</link>\n<url>https://ui.adsabs.harvard.edu/abs/1995anda.book.....N</url>\n<citations>118</citations>\n<abstract>Not Available &lt;P /&gt;</abstract>\n</record>\n\n<record article="true" type="eprint">\n<bibcode>1991hep.th....8028G</bibcode>\n<title>Applied Conformal Field Theory</title>\n<author>Ginsparg, Paul</author>\n<journal>eprint arXiv:hep-th/9108028</journal>\n<pubdate>Nov 1988</pubdate>\n<keywords>\n<keyword>High Energy Physics - Theory</keyword>\n</keywords>\n<link type="abstract">\n<name>abstract</name>\n<url>https://ui.adsabs.harvard.edu/link_gateway/1991hep.th....8028G/abstract</url>\n</link>\n<link type="citations">\n<name>Citations to the Article</name>\n<url>https://ui.adsabs.harvard.edu/link_gateway/1991hep.th....8028G/citations</url>\n<count>190</count>\n</link>\n<link type="coreads">\n<name>Co-Reads</name>\n<url>https://ui.adsabs.harvard.edu/link_gateway/1991hep.th....8028G/coreads</url>\n</link>\n<link type="EPRINT_HTML">\n<name>arXiv Article</name>\n<url>https://ui.adsabs.harvard.edu/link_gateway/1991hep.th....8028G/EPRINT_HTML</url>\n</link>\n<link type="EPRINT_PDF" access="open">\n<name>arXiv PDF</name>\n<url>https://ui.adsabs.harvard.edu/link_gateway/1991hep.th....8028G/EPRINT_PDF</url>\n</link>\n<url>https://ui.adsabs.harvard.edu/abs/1991hep.th....8028G</url>\n<citations>190</citations>\n<abstract>These lectures consisted of an elementary introduction to conformal field theory, with some applications to statistical mechanical systems, and fewer to string theory. Contents: 1. Conformal theories in d dimensions 2. Conformal theories in 2 dimensions 3. The central charge and the Virasoro algebra 4. Kac determinant and unitarity 5. Identication of m = 3 with the critical Ising model 6. Free bosons and fermions 7. Free fermions on a torus 8. Free bosons on a torus 9. Affine Kac-Moody algebras and coset constructions 10. Advanced applications &lt;P /&gt;</abstract>\n<eprintid>arXiv:hep-th/9108028</eprintid>\n</record>\n\n<record type="proceedings">\n<bibcode>1983aiaa.meetY....K</bibcode>\n<title>Autonomous navigation using lunar beacons</title>\n<author>Khatib, A. R.</author>\n<author>Ellis, J.</author>\n<author>French, J.</author>\n<author>Null, G.</author>\n<author>Yunck, T.</author>\n<author>Wu, S.</author>\n<affiliation>AA(California Institute of Technology, Jet Propulsion Laboratory, Pasadena, CA), AB(California Institute of Technology, Jet Propulsion Laboratory, Pasadena, CA), AC(California Institute of Technology, Jet Propulsion Laboratory, Pasadena, CA), AD(California Institute of Technology, Jet Propulsion Laboratory, Pasadena, CA), AE(California Institute of Technology, Jet Propulsion Laboratory, Pasadena, CA), AF(California Institute of Technology, Jet Propulsion Laboratory, Pasadena, CA)</affiliation>\n<journal>American Institute of Aeronautics and Astronautics, Aerospace Sciences Meeting, 21st, Reno, NV, Jan. 10-13, 1983. 7 p.</journal>\n<pubdate>Jan 1983</pubdate>\n<keywords>\n<keyword>Artificial Satellites</keyword>\n<keyword>Autonomous Navigation</keyword>\n<keyword>Earth-Moon System</keyword>\n<keyword>Lunar Communication</keyword>\n<keyword>Radio Beacons</keyword>\n<keyword>Radio Navigation</keyword>\n<keyword>Space Navigation</keyword>\n<keyword>Doppler Navigation</keyword>\n<keyword>Least Squares Method</keyword>\n<keyword>Orbit Calculation</keyword>\n<keyword>Space Communications, Spacecraft Communications, Command and Tracking</keyword>\n</keywords>\n<link type="abstract">\n<name>abstract</name>\n<url>https://ui.adsabs.harvard.edu/link_gateway/1983aiaa.meetY....K/abstract</url>\n</link>\n<url>https://ui.adsabs.harvard.edu/abs/1983aiaa.meetY....K</url>\n<abstract>The concept of using lunar beacon signal transmission for on-board navigation for earth satellites and near-earth spacecraft is described. The system would require powerful transmitters on the earth-side of the moon\'s surface and black box receivers with antennae and microprocessors placed on board spacecraft for autonomous navigation. Spacecraft navigation requires three position and three velocity elements to establish location coordinates. Two beacons could be soft-landed on the lunar surface at the limits of allowable separation and each would transmit a wide-beam signal with cones reaching GEO heights and be strong enough to be received by small antennae in near-earth orbit. The black box processor would perform on-board computation with one-way Doppler/range data and dynamical models. Alternatively, GEO satellites such as the GPS or TDRSS spacecraft can be used with interferometric techniques to provide decimeter-level accuracy for aircraft navigation. &lt;P /&gt;</abstract>\n</record>\n\n</records>'}
class AsupDestination(basestring): """ smtp|http|noteto|retransmit Possible values: <ul> <li> "smtp" , <li> "http" , <li> "noteto" , <li> "retransmit" </ul> """ @staticmethod def get_api_name(): return "asup-destination"
numero = float(input('Informe um número e descubra se é inteiro ou decimal: ')) if round(numero) == numero: print(f'O número {round(numero)} é inteiro') else: print(f'O número {numero} é decimal')
def parseRaspFile(filepath): headerpassed = False data = { 'motor name':None, 'motor diameter':None, 'motor length':None, 'motor delay': None, 'propellant weight': None, 'total weight': None, 'manufacturer': None, 'thrust data': {'time':[],'thrust':[]} } with open(filepath) as enginefile: while True: line = enginefile.readline() if not line: break if not headerpassed: if line[0].isalpha(): headerpassed = True name, diam, length, delay, prop_weight, total_weight, manufacturer = parseRaspHeader(line) data['motor name'] = name data['motor diameter'] = diam data['motor length'] = length data['motor delay'] = delay data['propellant weight'] = prop_weight data['total weight'] = total_weight data['manufacturer'] = manufacturer else: try: time, thrust = parseRaspDataLine(line) data['thrust data']['time'].append(time) data['thrust data']['thrust'].append(thrust) except: break enginefile.close() return data def parseRaspDataLine(line): # first float is the time # second is the thrust (N) contents = line.split() time = float(contents[0]) thrust = float(contents[1]) return time, thrust def parseRaspHeader(header): # the content of the header is as follows: # 1. Motor Name # 2. Motor Diameter # 3. Motor Length # 4. Motor Delay # 5. Propellant Weight # 6. Total Weight # 7. Manufacturer # parse by spaces headercontents = header.split() motor_name = headercontents[0] motor_diameter = float(headercontents[1]) motor_length = float(headercontents[2]) motor_delay = float(headercontents[3]) propellant_weight = float(headercontents[4]) total_weight = float(headercontents[5]) manufacturer = headercontents[6] return motor_name, motor_diameter, motor_length, motor_delay, propellant_weight, total_weight, manufacturer
""" Author: Kagaya john Tutorial 9 : Dictionaries """ """ Python Dictionaries Dictionary A dictionary is a collection which is unordered, changeable and indexed. In Python dictionaries are written with curly brackets, and they have keys and values. Example Using the len() method to return the number of items:""" thisdict = { "apple": "green", "banana": "yellow", "cherry": "red" } print(thisdict) #Change the apple color to "red": thisdict = { "apple": "green", "banana": "yellow", "cherry": "red" } thisdict["apple"] = "red" print(thisdict)
"""Guarde en lista `naturales` los primeros 100 números naturales (desde el 1) usando el bucle while """ n=1 naturales=[] while n<=100 : naturales.append(n) n+=1 """Guarde en `acumulado` una lista con el siguiente patrón: ['1','1 2','1 2 3','1 2 3 4','1 2 3 4 5',...,'...47 48 49 50'] Hasta el número 50. """ rango=list(range(2,51)) a=1 conc='1' acumulado=list() acumulado.append(conc) for a in rango: conc= conc+' '+str(a) acumulado.append(conc) a+=1 """Guarde en `suma100` el entero de la suma de todos los números entre 1 y 100: """ n=1 suma100=0 while n<=100: suma100+=n n+=1 """Guarde en `tabla100` un string con los primeros 10 múltiplos del número 134, separados por coma, así: '134,268,...' """ ran=list(range(1,11)) tabla100='' for a in ran: if a==1: tabla100= str(a*134) else: tabla100= tabla100+','+str(a*134) a+=1 print (tabla100) """Guardar en `multiplos3` la cantidad de números que son múltiplos de 3 y menores o iguales a 300 en la lista `lista1` que se define a continuación (la lista está ordenada). """ lista1 = [12, 15, 20, 27, 32, 39, 42, 48, 55, 66, 75, 82, 89, 91, 93, 105, 123, 132, 150, 180, 201, 203, 231, 250, 260, 267, 300, 304, 310, 312, 321, 326] multiplos3=0 for n in lista1: if n<300 and n%3==0: multiplos3+=1 print(n) print(multiplos3) """Guardar en `regresivo50` una lista con la cuenta regresiva desde el número 50 hasta el 1, así: [ '50 49 48 47...', '49 48 47 46...', ... '5 4 3 2 1', '4 3 2 1', '3 2 1', '2 1', '1' ] """ tam=50 nlis=50 ser=0 regresivo50=list() while tam>0: con='' while ser<tam: r2=list(range(1,nlis+1)) if con=='': con=str(r2.pop()) elif len(r2)>0: con=con+' '+str(r2.pop()) nlis-=1 ser+=1 regresivo50.append(con) tam-=1 ser=0 nlis=tam """Invierta la siguiente lista usando el bucle for y guarde el resultado en `invertido` (sin hacer uso de la función `reversed` ni del método `reverse`) """ lista2 = list(range(1, 70, 5)) invertido=list() for a in lista2: invertido.insert(0,a) """Guardar en `primos` una lista con todos los números primos desde el 37 al 300 Nota: Un número primo es un número entero que no se puede calcular multiplicando otros números enteros. """ lprim=list(range(37,300)) primos=list() for a in lprim: num=a sdiv=0 while num>1: if a%num==0: sdiv+=1 num-=1 if sdiv==1: primos.append(a) """Guardar en `fibonacci` una lista con los primeros 60 términos de la serie de Fibonacci. Nota: En la serie de Fibonacci, los 2 primeros términos son 0 y 1, y a partir del segundo cada uno se calcula sumando los dos anteriores términos de la serie. [0, 1, 1, 2, 3, 5, 8, ...] """ fibonacci=[0,1] tam=len(fibonacci) while tam<60: term=fibonacci[len(fibonacci)-1]+fibonacci[len(fibonacci)-2] fibonacci.append(term) tam+=1 """Guardar en `factorial` el factorial de 30 El factorial (símbolo:!) Significa multiplicar todos los números enteros desde el 1 hasta el número elegido. Por ejemplo, el factorial de 5 se calcula así: 5! = 5 × 4 × 3 × 2 × 1 = 120 """ n=list(range(30,0,-1)) factorial=1 while len(n)>0: factorial*=n.pop() """Guarde en lista `pares` los elementos de la siguiente lista que esten presentes en posiciones pares, pero solo hasta la posición 80. """ lista3 = [941, 149, 672, 208, 99, 562, 749, 947, 251, 750, 889, 596, 836, 742, 512, 19, 674, 142, 272, 773, 859, 598, 898, 930, 119, 107, 798, 447, 348, 402, 33, 678, 460, 144, 168, 290, 929, 254, 233, 563, 48, 249, 890, 871, 484, 265, 831, 694, 366, 499, 271, 123, 870, 986, 449, 894, 347, 346, 519, 969, 242, 57, 985, 250, 490, 93, 999, 373, 355, 466, 416, 937, 214, 707, 834, 126, 698, 268, 217, 406, 334, 285, 429, 130, 393, 396, 936, 572, 688, 765, 404, 970, 159, 98, 545, 412, 629, 361, 70, 602] pos=0 pares=list() while pos<81: if pos%2==0: pares.append(lista3[pos]) pos+=1 """Guarde en lista `cubos` el cubo (potencia elevada a la 3) de los números del 1 al 100. """ ncub=list(range(1,101)) cubos=list() for a in ncub: val=a**3 cubos.append(val) """Encuentre la suma de la serie 2 +22 + 222 + 2222 + .. hasta sumar 10 términos y guardar resultado en variable `suma_2s` """ nu='2' tam=1 suma_2s=0 while tam<=10: reg=int(nu*tam) suma_2s+=reg tam+=1 """Guardar en un string llamado `patron` el siguiente patrón llegando a una cantidad máxima de asteriscos de 30. * ** *** **** ***** ****** ******* ******** ********* ******** ******* ****** ***** **** *** ** * """ pat='*' linea=1 longitud=30 patron='' while linea<=longitud: patron+=pat*linea+'\n' linea+=1 while linea>0: if linea==1: patron+=pat linea-=1 elif linea>=longitud: linea-=1 else: patron+=pat*linea+'\n' linea-=1
class Solution: def maxSumDivThree(self, nums: List[int]) -> int: ones = [] twos = [] ans = 0 for num in nums: ans += num if num % 3 == 1: ones.append(num) elif num % 3 == 2: twos.append(num) if ans % 3 == 0: return ans ones.sort() twos.sort() if ans % 3 == 1: best = 0 if ones: best = ans - ones[0] if len(twos) >= 2: best = max(best, ans - twos[0] - twos[1]) else: # ans % 3 == 2: best = 0 if twos: best = ans - twos[0] if len(ones) >= 2: best = max(best, ans - ones[0] - ones[1]) return best
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """Problem 031 The Minion Game Source : https://www.hackerrank.com/challenges/the-minion-game/problem """ def is_vowel(c): return c in ("A","E","I","O","U") def minion_game(word): p1, p2 = 0, 0 nb = len(word) for i in range(nb): if is_vowel(word[i]): p2 += nb - i else: p1 += nb - i if p1 > p2: print("Stuart", p1) elif p1 < p2: print("Kevin", p2) else: print("Draw") if __name__ == '__main__': s = input() minion_game(s)
def evaluate_shard(out_csv_name, pw_ji, labels_x, labels_y, d = 0.00, d_step = 0.005, d_max=1.0): h.save_to_csv(data_rows=[[ "Distance Threshhold", "True Positives", "False Positives", "True Negative", "False Negative", "Num True Same", "Num True Diff", ]], outfile_name=out_csv_name, mode="w") # calculate true accepts / false accepts based on labels n_labels = len(labels_x) tl_row = np.repeat( np.array(labels_x).reshape((n_labels,1)), n_labels, axis=1 ) tl_col = np.repeat( np.array(labels_y).reshape((1,n_labels)), n_labels, axis=0 ) p_same = np.equal(tl_row, tl_col).astype("int8") p_diff = np.not_equal(tl_row, tl_col).astype("int8") num_true_same = p_same.sum() num_true_diff = p_diff.sum() while True: calc_same = np.zeros((n_labels, n_labels)) calc_same[np.where(pw_ji<=d)]=1 tp = np.sum(np.logical_and(calc_same, p_same)) fp = np.sum(np.logical_and(calc_same, np.logical_not(p_same))) tn = np.sum(np.logical_and(np.logical_not(calc_same), np.logical_not(p_same))) fn = np.sum(np.logical_and(np.logical_not(calc_same), p_same)) h.save_to_csv(data_rows=[[d, tp, fp, tn, fn,num_true_same,num_true_diff]], outfile_name=out_csv_name, mode="a") d+=d_step if d>d_max: break def evaluate_all_shards(inputs, labels, shard_size,shard_indizes, results_fn, d_start=0.0, d_step=0.005, d_max=1.0 ): for shard_index in shard_indizes: shard_x, shard_y = shard_index print("Current shard", shard_index) start_index_x = shard_x*shard_size start_index_y = shard_y*shard_size end_index_x = min((shard_x+1)*shard_size, num_test_examples) end_index_y = min((shard_y+1)*shard_size, num_test_examples) # calcualte pairwise distances shard_inputs_x = inputs[start_index_x:end_index_x,:] shard_labels_x = labels[start_index_x:end_index_x] shard_inputs_y = inputs[start_index_y:end_index_y,:] shard_labels_y = labels[start_index_y:end_index_y] pw_ji = pairwise_distances(shard_inputs_x,shard_inputs_y, metric=jaccard_distance, n_jobs=8) # evaluate pairwise distances out_csv_name = results_fn+"_%0.2d-%0.2d"%(shard_x, shard_y) evaluate_shard(out_csv_name, pw_ji, shard_labels_x, shard_labels_y, d=d_start, d_step = d_step, d_max=d_max) def run_evaluation(inputs, labels, shard_size, results_fn, d_start=0.0, d_step=0.005, d_max=1.0): results_fn = results_fn%shard_size num_test_examples = inputs.shape[0] num_x = inputs.shape[0]//shard_size if not num_test_examples%shard_size==0 :# need to be a square matrix print("Allowed shard sizes") for i in range(100, num_test_examples): if num_test_examples%i==0: print(i) 0/0 shard_indizes = list(itertools.product(range(num_x),repeat=2)) num_shards = len(shard_indizes) num_distances = len(list(np.arange(d_start,d_max,d_step))) num_metrics = 7 evaluate_all_shards(inputs, labels, shard_size, shard_indizes, results_fn, d_start, d_step, d_max ) all_data = np.ndarray(shape=(num_shards, num_distances, num_metrics), dtype="float32") for i, shard_index in enumerate(shard_indizes): # load shard shard_x, shard_y = shard_index out_csv_name = results_fn+"_%0.2d-%0.2d"%(shard_x, shard_y) shard_data = h.load_from_csv(out_csv_name) shard_data = shard_data[1:] # cut header row all_data[i] = np.array(shard_data) final_data = np.ndarray(shape=(num_distances, 10), dtype="float32") final_data[:,0] = all_data[0,:,0] # all distances (are same over all shards) final_data[:,1] = all_data.sum(axis=0)[:,1] # True Positives final_data[:,2] = all_data.sum(axis=0)[:,2] # False Positives final_data[:,3] = all_data.sum(axis=0)[:,3] # True Negatives final_data[:,4] = all_data.sum(axis=0)[:,4] # False Negatives final_data[:,5] = all_data.sum(axis=0)[:,5] # Num true same (are same over all shards) final_data[:,6] = all_data.sum(axis=0)[:,6] # Num true diff (are same over all shards) final_data[:,7] = final_data[:,1]/final_data[:,5] # validation rate final_data[:,8] = final_data[:,2]/final_data[:,6] # false acceptance rate final_data[:,9] = (final_data[:,1] + final_data[:,3]) / (final_data[:,1:1+4].sum(axis=1)) h.save_to_csv(data_rows=[[ "Distance Threshhold", "True Positives", "False Positives", "True Negative", "False Negative", "Num true same", "Num true diff", "Validation Rate", "False Acceptance Rate", "Accuracy" ]], outfile_name=results_fn, mode="w", convert_float=False) h.save_to_csv(data_rows=final_data, outfile_name=results_fn, mode="a", convert_float=True) logger.info("Evaluation done, saved to '%s'"%results_fn) return final_data
def kaprekar_10(n): divider = 10 while True: left, right = divmod(n**2, divider) if left == 0: return False if right != 0 and left + right == n: return True divider *= 10 def convert(num, to_base=10, from_base=10): alpha = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ" dec = int(str(num), from_base) ans = '' if dec == 0: return '0' while dec > 0: ans = alpha[dec % to_base] + ans dec = dec // to_base return ans def kaprekar(n, base=10): n = int(str(n), base=base) str_square = convert(n**2, base) for i in range(1, len(str_square)): a, b = int(convert(str_square[:i], from_base=base)), int(convert(str_square[i:], from_base=base)) if a * b and a + b == n : return True return False test_1 = [9, 45, 55, '99', '297', 703, 999, '2223', 2728, '4879'] test_2 = [10, 46, 56, 100, 298, 704, '1000', '2224', '2729', '4880'] test_3 = ['6', 'A', 'F', '33', '55', '5B', '78', '88', 'AB', 'CD', 'FF', '15F', '334', '38E'] print([kaprekar(i) for i in test_1]) # Тест чисел Капрекара из системы с основанием 10 print([kaprekar(i) for i in test_2 ]) # Тест НЕ чисел Капрекара из системы с основанием 10 print([kaprekar(i, base=16) for i in test_3]) #Тест чисел Капрекара из системы с основанием 16
__query_all = { # DO NOT CHANGE THE FIRST KEY VALUE, IT HAS TO BE FIRST. 'question_select_all_desc_by_date': 'SELECT id, submission_time, view_number, vote_number, title, message, image FROM question ORDER BY submission_time DESC', 'question_select_all_asc_by_date': 'SELECT id, submission_time, view_number, vote_number, title, message, image FROM question ORDER BY submission_time ASC', 'question_select_all_desc_by_view': 'SELECT id, submission_time, view_number, vote_number, title, message, image FROM question ORDER BY view_number DESC', 'question_select_all_asc_by_view': 'SELECT id, submission_time, view_number, vote_number, title, message, image FROM question ORDER BY view_number ASC', 'question_select_all_desc_by_vote': 'SELECT id, submission_time, view_number, vote_number, title, message, image FROM question ORDER BY vote_number DESC', 'question_select_all_asc_by_vote': 'SELECT id, submission_time, view_number, vote_number, title, message, image FROM question ORDER BY vote_number ASC', 'question_select_all_desc_by_title': 'SELECT id, submission_time, view_number, vote_number, title, message, image FROM question ORDER BY title DESC', 'question_select_all_asc_by_title': 'SELECT id, submission_time, view_number, vote_number, title, message, image FROM question ORDER BY title ASC', 'question_select_all_desc_by_question': 'SELECT id, submission_time, view_number, vote_number, title, message, image FROM question ORDER BY message DESC', 'question_select_all_asc_by_question': 'SELECT id, submission_time, view_number, vote_number, title, message, image FROM question ORDER BY message ASC', 'question_select_limit_5_desc_by_date': 'SELECT id, submission_time, view_number, vote_number, title, message, image FROM question ORDER BY submission_time DESC LIMIT 5', 'question_select_by_id': """SELECT id, submission_time, view_number, vote_number, title, message, image, user_id FROM question WHERE id = %s""", 'question_update_view_number_by_id': 'UPDATE question SET view_number = view_number + 1 WHERE id = %s', 'answer_select_by_id': """SELECT id, submission_time, vote_number, question_id, message, image, user_id, acceptance FROM answer WHERE question_id = %s ORDER BY submission_time DESC""", 'question_update_vote_number_by_id': 'UPDATE question SET vote_number = vote_number + %s WHERE id = %s', 'answer_update_vote_number_by_id': 'UPDATE answer SET vote_number = vote_number + %s WHERE id = %s', 'question_insert': 'INSERT INTO question (title, message, user_id) VALUES (%s, %s, %s)', 'answer_insert': 'INSERT INTO answer (question_id, message, user_id) VALUES (%s, %s, %s)', 'answer_get_img_path': 'SELECT image FROM answer WHERE question_id = %s', 'question_delete': 'DELETE FROM question WHERE id = %s RETURNING image', 'question_update': 'UPDATE question SET title = %s, message = %s WHERE id = %s', 'question_update_img': 'UPDATE question SET image = %s WHERE id = %s', 'answer_update_img': 'UPDATE answer SET image = %s WHERE id = %s', 'answer_delete': 'DELETE FROM answer WHERE id = %s RETURNING image, question_id', 'answer_count_fk_question_id': 'SELECT COUNT(question_id) FROM answer WHERE question_id = %s', 'comment_insert_to_question': 'INSERT INTO comment (question_id, message, user_id) VALUES (%s, %s, %s)', 'comment_insert_to_answer': 'INSERT INTO comment (question_id, answer_id, message, user_id) VALUES (%s, %s, %s, %s)', 'comment_select_by_question_id': 'SELECT id, question_id, answer_id, message, submission_time, edited_number FROM comment WHERE question_id = %s ORDER BY submission_time DESC', 'comment_select_by_comment_id': 'SELECT id, question_id, answer_id, message, submission_time, edited_number FROM comment WHERE id = %s', 'comment_update_by_id': 'UPDATE comment SET message = %s, submission_time = NOW(), edited_number = edited_number + 1 WHERE id = %s', 'advanced_search': """SELECT question.id, 'Q' || question.id, question.title || ' ' || question.message, question.submission_time AS date FROM question WHERE question.title || ' ' || question.message ILIKE %(search)s UNION SELECT answer.question_id, 'A' || answer.question_id, answer.message, answer.submission_time AS date FROM answer WHERE answer.message ILIKE %(search)s UNION SELECT comment.question_id, 'C' || comment.question_id, comment.message, comment.submission_time AS date FROM comment WHERE comment.message ILIKE %(search)s ORDER BY date DESC""", 'questions_search': """SELECT DISTINCT q.id, q.submission_time, q.view_number, q.vote_number, q.title, q.message, q.image FROM question q INNER JOIN answer a ON q.id = a.question_id WHERE (q.title ILIKE %(search)s OR q.message ILIKE %(search)s) OR a.message ILIKE %(search)s ORDER BY q.submission_time DESC""", 'tag_select': 'SELECT id, title FROM tag ORDER BY title', 'question_tag_insert': 'INSERT INTO question_tag (question_id, tag_id) VALUES (%s, %s)', 'question_tag_select_by_question_id': 'SELECT id, question_id, tag_id FROM question_tag WHERE question_id = %s', 'tag_insert': 'INSERT INTO tag (title) VALUES (%s)', 'tag_question_tag_select_by_question_id': """SELECT question_tag.id, tag.title FROM tag, question_tag WHERE question_tag.tag_id = tag.id AND question_tag.question_id = %s ORDER BY tag.title""", 'question_tag_delete_by_id': 'DELETE FROM question_tag WHERE id = %s', 'comment_delete': 'DELETE FROM comment WHERE id = %s RETURNING question_id', 'answer_update_by_id': 'UPDATE answer SET message = %s WHERE id = %s', 'answer_select_message_by_id': 'SELECT message FROM answer WHERE id = %s', 'users_registration': 'INSERT INTO users (email, pwd) VALUES (%s, %s)', 'users_select_by_email': 'SELECT id, email, pwd FROM users WHERE email = %s', 'users_activation': """SELECT u.id, u.email, u.registration_time, (SELECT COUNT(q.user_id) FROM question AS q WHERE q.user_id = u.id), (SELECT COUNT(a.user_id) FROM answer AS a WHERE a.user_id = u.id), (SELECT COUNT(c.user_id) FROM comment AS c WHERE c.user_id = u.id), u.reputation FROM users AS u GROUP BY u.id ORDER BY u.email""", 'user_activation_page': """SELECT u.id, u.email, u.registration_time, (SELECT COUNT(q.user_id) FROM question AS q WHERE q.user_id = u.id), (SELECT COUNT(a.user_id) FROM answer AS a WHERE a.user_id = u.id), (SELECT COUNT(c.user_id) FROM comment AS c WHERE c.user_id = u.id), u.reputation FROM users AS u WHERE u.id = %s GROUP BY u.id""", 'question_select_by_user_id': """SELECT id, submission_time, view_number, vote_number, title, message FROM question WHERE user_id = %s ORDER BY submission_time DESC""", 'answer_select_by_user_id': """SELECT id, submission_time, vote_number, question_id, message FROM answer WHERE user_id = %s ORDER BY submission_time DESC""", 'comment_select_by_user_id': 'SELECT id, question_id, answer_id, message, submission_time, edited_number FROM comment WHERE user_id = %s', 'answer_update_acceptance_by_id': 'UPDATE answer SET acceptance = %s WHERE id = %s', 'users_gain_lost_reputation': 'UPDATE users SET reputation = reputation + %s WHERE id = %s', 'tag_select_list_count_questions': """SELECT t.id, t.title, COUNT(qt.tag_id) FROM tag AS t LEFT JOIN question_tag AS qt ON t.id = qt.tag_id GROUP BY t.id ORDER BY t.title""", 'question_select_by_tag': """SELECT q.id, q.submission_time, q.view_number, q.vote_number, q.title, q.message FROM question AS q INNER JOIN question_tag AS qt ON qt.question_id = q.id WHERE qt.tag_id = %s ORDER BY q.submission_time DESC""", } class Query: def __init__(self, query_dict): self.__query = query_dict def __getattr__(self, key): try: return self.__query[key] except KeyError as e: raise AttributeError(e) query = Query(__query_all)
class EmptyRainfallError(ValueError): pass class EmptyWaterlevelError(ValueError): pass class NoMethodError(ValueError): pass
""" TOTAL BUTTON COUNT: 26 Buttons GROUP NAMES: Enumerates each of the groups of buttons on controller. BUTTON NAMES: Enumerates each of the names for each button on the controller. GROUP SIZES: Dictionary containing the total number of buttons in each group. BUTTON GROUPS: Dictionary where keys are group names and entries are lists of button names specific to that group. BUTTON LOCATIONS: Dictionary where keys are button names and entries are X,Y tuple center coordinates for a button. """ TOTAL_BUTTON_COUNT = 26 GROUP_NAMES = [ "Top_Left", "Bottom_Left", "Top_Center", "Top_Right", "Bottom_Right", "Left_Side", # Rocker switch and Nunchuk button assignments. ] BUTTON_NAMES = [ # Contains the following button names: Button_1, Button_2, ... BUTTON_TOTAL_BUTTON_COUNT. f"Button_{x}" for x in range(1, TOTAL_BUTTON_COUNT + 1) ] # Number of buttons in each group. GROUP_SIZES = { GROUP_NAMES[0]: 5, # Top Left (1-5) GROUP_NAMES[1]: 4, # Bottom Left (6-9) GROUP_NAMES[2]: 1, # Top Center (10) GROUP_NAMES[3]: 8, # Top Right (11-18) GROUP_NAMES[4]: 5, # Bottom Right (19-23) GROUP_NAMES[5]: 3, # Left Side (24-26) } # Specific buttons assigned to each group. BUTTON_GROUPS = { GROUP_NAMES[0]: BUTTON_NAMES[0:5], GROUP_NAMES[1]: BUTTON_NAMES[5:9], GROUP_NAMES[2]: BUTTON_NAMES[9:10], GROUP_NAMES[3]: BUTTON_NAMES[10:18], GROUP_NAMES[4]: BUTTON_NAMES[18:23], GROUP_NAMES[5]: BUTTON_NAMES[23:], } # Specific tuple assignments representing the default X,Y button coordinates for each button. # a JSON type configuration file can probably be provided that's skin-specific however these are the defaults. BUTTON_LOCATIONS = { "Button_1": (361, 136), "Button_2": (195, 253), "Button_3": (270, 210), "Button_4": (352, 218), "Button_5": (434, 227), "Button_6": (435, 378), "Button_7": (517, 378), "Button_8": (476, 449), "Button_9": (558, 449), "Button_10": (611, 91), "Button_11": (795, 184), "Button_12": (863, 136), "Button_13": (945, 139), "Button_14": (1020, 172), "Button_15": (804, 266), "Button_16": (871, 218), "Button_17": (953, 221), "Button_18": (1029, 254), "Button_19": (706, 378), "Button_20": (789, 378), "Button_21": (664, 449), "Button_22": (747, 449), "Button_23": (706, 520), "Button_24": (0, 41), # Left Side Rocker Toggle in Top Left "Button_25": (976, 492), # Right Nunchuk Top button display in Bottom Right "Button_26": (976, 570), # Right Nunchuk Bottom button display in Bottom Right }
# O(n^2) time | O(1) Space # def twoNumberSum(array, targetSum): # for i in range(len(array)): # firstNum = array[i] # for j in range(i+1, array[j]): # secondNum = array[j] # if firstNum + secondNum == targetSum: # return [firstNum,secondNum] # return [] # O(n) time | O(n) space # def twoNumberSum(array, targetSum): # nums = {} # for num in array: # if targetSum - num in nums: # return [targetSum-num, num] # else: # nums[num] = True # return [] # O(nlog(n)) time | O(1) space def twoNumberSum(array, targetSum): array.sort() left = 0 right = len(array) - 1 while left < right: currentSum = array[left] + array[right] if currentSum == targetSum: return [array[left], array[right]] elif currentSum < targetSum: left += 1 elif currentSum > targetSum: right -= 1 return [] arrays = [6, 5, -1, -4, 8, 6, 11] target = 10 print(twoNumberSum(arrays, target))
class Solution: def isStrobogrammatic(self, num: str) -> bool: # create a hash table for 180 degree rotation mapping helper = {'0':'0','1':'1','6':'9','8':'8','9':'6'} # flip the given string num2 = '' n = len(num) i = n - 1 while i >= 0: if num[i] in helper: num2 += helper[num[i]] else: return False i -= 1 return num2 == num
"""You're a wizard, Harry.""" def register(bot): bot.listen(r'^magic ?(.*)$', magic, require_mention=True) bot.listen(r'\bmystery\b|' r"\bwhy (do(es)?n't .+ work|(is|are)n't .+ working)\b|" r'\bhow do(es)? .+ work\b', mystery) def _magic(thing): return '(ノ゚ο゚)ノミ★゜・。。・゜゜・。{} 。・゜☆゜・。。・゜'.format(thing) def magic(bot, msg): """(ノ゚ο゚)ノミ★゜・。。・゜""" msg.respond(_magic(msg.match.group(1) or 'magic'), ping=False) def mystery(bot, msg): """~it is a mystery~""" msg.respond(_magic('https://mystery.fuqu.jp/'), ping=False)
## floating point class Number(Primitive): def __init__(self, V, prec=4): Primitive.__init__(self, float(V)) ## precision: digits after decimal `.` self.prec = prec
# -*- coding: utf-8 -*- """ Created on Wed Aug 8 19:30:21 2018 @author: lenovo """ def Bsearch(A, key): length = len(A) if length == 0: return -1 A.sort() left = 0 right = length - 1 while left <= right: mid = int((left + right) / 2) if key == A[mid]: return mid elif key < A[mid]: right = mid - 1 else: left = mid + 1 return -1 test = [0, 0] print(Bsearch(test, 0))
#media sources dataurl_src = "'data:audio/wav;base64,UklGRigAAABXQVZFZm10IBAAAAABAAEARKwAAIhYAQACABAAZGF0YQQAAAAAAAAA'" throttler = "'../resources/range-request.php?rate=100000&fileloc="; mp4_src = throttler + "preload.mp4&nocache=' + Math.random()"; ogg_src = throttler + "preload.ogv&nocache=' + Math.random()"; webm_src = throttler + "preload.webm&nocache=' + Math.random()"; #preload="auto" event orders auto_event_order = '/^loadstart (progress )+loadedmetadata (progress )*loadeddata (progress )*canplay (progress )*canplaythrough $/g' auto_event_order_dataurl = '/^loadstart progress loadedmetadata loadeddata canplay canplaythrough $/g' auto_to_none_event_order = '/^loadstart (progress )+loadedmetadata (progress )*loadeddata (progress )*canplay (progress )*canplaythrough $/g' auto_to_none_event_order_dataurl = '/^loadstart progress loadedmetadata loadeddata canplay canplaythrough $/g' #preload="metadata" event/state orders metadata_event_order = '/^loadstart (progress )+loadedmetadata (progress )*loadeddata (progress )*suspend $/g' metadata_event_order_dataurl = '/^loadstart progress loadedmetadata loadeddata suspend $/g' metadata_event_order_play_after_suspend = '/^loadstart (progress )+loadedmetadata (progress )*loadeddata (progress )*suspend (progress )*canplay (progress )*canplaythrough $/g' metadata_event_order_play_after_suspend_dataurl = '/^loadstart progress loadedmetadata loadeddata suspend canplay canplaythrough $/g' metadata_networkstate_after_suspend = "HTMLMediaElement.NETWORK_IDLE" metadata_readystate_after_suspend = "HTMLMediaElement.HAVE_CURRENT_DATA" metadata_readystate_before_src = "HTMLMediaElement.HAVE_NOTHING" metadata_networkstate_order = "eval('/^(' + HTMLMediaElement.NETWORK_LOADING + ' )+(' + HTMLMediaElement.NETWORK_IDLE + ' )+$/g')" metadata_networkstate_order_dataurl = "eval('/^(' + HTMLMediaElement.NETWORK_IDLE + ' )+$/g')" metadata_readystate_order = "eval('/^(' + HTMLMediaElement.HAVE_NOTHING + ' )+' + HTMLMediaElement.HAVE_METADATA + '(' + HTMLMediaElement.HAVE_CURRENT_DATA + ' )+$/g')" metadata_readystate_order_dataurl = "eval('/^(' + HTMLMediaElement.HAVE_NOTHING + ' )+(' + HTMLMediaElement.HAVE_ENOUGH_DATA + ' )+$/g')" #preload="none" event orders none_event_order = '/^loadstart suspend $/g' none_event_order_dataurl = none_event_order none_event_order_play_after_suspend = '/^loadstart suspend (progress )+loadedmetadata (progress )*loadeddata (progress )*canplay (progress )*canplaythrough $/g' none_event_order_play_after_suspend_dataurl = '/^loadstart suspend progress loadedmetadata loadeddata canplay canplaythrough $/g' none_to_metadata_event_order = '/^loadstart suspend (progress )+loadedmetadata (progress )*loadeddata (progress )*suspend $/g' none_to_metadata_event_order_dataurl = '/^loadstart suspend progress loadedmetadata loadeddata suspend $/g' timeout = 10000 timeout_dataurl = 5000 testsuite = { '*' : [ {'test_suffix' : 'dataurl', 'test_mapping' : {'media_type' : 'wave', 'media_src' : dataurl_src, 'timeout' : timeout_dataurl}}, {'test_suffix' : 'mp4', 'test_mapping' : {'media_type' : 'mp4', 'media_src' : mp4_src, 'timeout' : timeout}}, {'test_suffix' : 'ogg', 'test_mapping' : {'media_type' : 'ogg', 'media_src' : ogg_src, 'timeout' : timeout}}, {'test_suffix' : 'webm', 'test_mapping' : {'media_type' : 'webm', 'media_src' : webm_src, 'timeout' : timeout}} ], #preload="auto" '../auto/preload-auto-event-order.tpl' : [ {'test_suffix' : 'dataurl', 'test_mapping' : {'media_type' : 'wave', 'media_src' : dataurl_src, 'events_expected' : auto_event_order_dataurl, 'start_state' : 'auto', 'end_event' : 'canplaythrough', 'timeout' : timeout_dataurl}}, {'test_suffix' : 'mp4', 'test_mapping' : {'media_type' : 'mp4', 'media_src' : mp4_src, 'events_expected' : auto_event_order, 'start_state' : 'auto', 'end_event' : 'canplaythrough', 'timeout' : timeout}}, {'test_suffix' : 'ogg', 'test_mapping' : {'media_type' : 'ogg', 'media_src' : ogg_src, 'events_expected' : auto_event_order, 'start_state' : 'auto', 'end_event' : 'canplaythrough', 'timeout' : timeout}}, {'test_suffix' : 'webm', 'test_mapping' : {'media_type' : 'webm', 'media_src' : webm_src, 'events_expected' : auto_event_order, 'start_state' : 'auto', 'end_event' : 'canplaythrough', 'timeout' : timeout}} ], '../auto/preload-auto-to-none-event-order.tpl' : [ {'test_suffix' : 'dataurl', 'test_mapping' : {'media_type' : 'wave', 'media_src' : dataurl_src, 'events_expected' : auto_to_none_event_order_dataurl, 'start_state' : 'auto', 'end_state' : 'none', 'start_event' : 'loadstart', 'end_event' : 'canplaythrough', 'timeout' : timeout_dataurl}}, {'test_suffix' : 'mp4', 'test_mapping' : {'media_type' : 'mp4', 'media_src' : mp4_src, 'events_expected' : auto_to_none_event_order, 'start_state' : 'auto', 'end_state' : 'none', 'start_event' : 'loadstart', 'end_event' : 'canplaythrough', 'timeout' : timeout}}, {'test_suffix' : 'ogg', 'test_mapping' : {'media_type' : 'ogg', 'media_src' : ogg_src, 'events_expected' : auto_to_none_event_order, 'start_state' : 'auto', 'end_state' : 'none', 'start_event' : 'loadstart', 'end_event' : 'canplaythrough', 'timeout' : timeout}}, {'test_suffix' : 'webm', 'test_mapping' : {'media_type' : 'webm', 'media_src' : webm_src, 'events_expected' : auto_to_none_event_order, 'start_state' : 'auto', 'end_state' : 'none', 'start_event' : 'loadstart', 'end_event' : 'canplaythrough', 'timeout' : timeout}} ], '../auto/preload-auto-to-metadata-event-order.tpl' : [ {'test_suffix' : 'dataurl', 'test_mapping' : {'media_type' : 'wave', 'media_src' : dataurl_src, 'events_expected' : auto_to_none_event_order_dataurl, 'start_state' : 'auto', 'end_state' : 'metadata', 'start_event' : 'loadstart', 'end_event' : 'canplaythrough', 'timeout' : timeout_dataurl}}, {'test_suffix' : 'mp4', 'test_mapping' : {'media_type' : 'mp4', 'media_src' : mp4_src, 'events_expected' : auto_to_none_event_order, 'start_state' : 'auto', 'end_state' : 'metadata', 'start_event' : 'loadstart', 'end_event' : 'canplaythrough', 'timeout' : timeout}}, {'test_suffix' : 'ogg', 'test_mapping' : {'media_type' : 'ogg', 'media_src' : ogg_src, 'events_expected' : auto_to_none_event_order, 'start_state' : 'auto', 'end_state' : 'metadata', 'start_event' : 'loadstart', 'end_event' : 'canplaythrough', 'timeout' : timeout}}, {'test_suffix' : 'webm', 'test_mapping' : {'media_type' : 'webm', 'media_src' : webm_src, 'events_expected' : auto_to_none_event_order, 'start_state' : 'auto', 'end_state' : 'metadata', 'start_event' : 'loadstart', 'end_event' : 'canplaythrough', 'timeout' : timeout}} ], #preload="metadata" '../metadata/preload-metadata-event-order.tpl' : [ {'test_suffix' : 'dataurl', 'test_mapping' : {'media_type' : 'wave', 'media_src' : dataurl_src, 'events_expected' : metadata_event_order_dataurl, 'start_state' : 'metadata', 'end_event' : 'suspend', 'timeout' : timeout_dataurl}}, {'test_suffix' : 'mp4', 'test_mapping' : {'media_type' : 'mp4', 'media_src' : mp4_src, 'events_expected' : metadata_event_order, 'start_state' : 'metadata', 'end_event' : 'suspend', 'timeout' : timeout}}, {'test_suffix' : 'ogg', 'test_mapping' : {'media_type' : 'ogg', 'media_src' : ogg_src, 'events_expected' : metadata_event_order, 'start_state' : 'metadata', 'end_event' : 'suspend', 'timeout' : timeout}}, {'test_suffix' : 'webm', 'test_mapping' : {'media_type' : 'webm', 'media_src' : webm_src, 'events_expected' : metadata_event_order, 'start_state' : 'metadata', 'end_event' : 'suspend', 'timeout' : timeout}} ], '../metadata/preload-metadata-event-order-play-after-suspend.tpl' : [ {'test_suffix' : 'dataurl', 'test_mapping' : {'media_type' : 'wave', 'media_src' : dataurl_src, 'events_expected' : metadata_event_order_play_after_suspend_dataurl, 'start_state' : 'metadata', 'start_event' : 'suspend', 'end_event' : 'canplaythrough', 'timeout' : timeout_dataurl}}, {'test_suffix' : 'mp4', 'test_mapping' : {'media_type' : 'mp4', 'media_src' : mp4_src, 'events_expected' : metadata_event_order_play_after_suspend, 'start_state' : 'metadata', 'start_event' : 'suspend', 'end_event' : 'canplaythrough', 'timeout' : timeout}}, {'test_suffix' : 'ogg', 'test_mapping' : {'media_type' : 'ogg', 'media_src' : ogg_src, 'events_expected' : metadata_event_order_play_after_suspend, 'start_state' : 'metadata', 'start_event' : 'suspend', 'end_event' : 'canplaythrough', 'timeout' : timeout}}, {'test_suffix' : 'webm', 'test_mapping' : {'media_type' : 'webm', 'media_src' : webm_src, 'events_expected' : metadata_event_order_play_after_suspend, 'start_state' : 'metadata', 'start_event' : 'suspend', 'end_event' : 'canplaythrough', 'timeout' : timeout}} ], '../metadata/preload-metadata-networkstate-after-suspend.tpl' : [ {'test_suffix' : 'dataurl', 'test_mapping' : {'media_type' : 'wave', 'media_src' : dataurl_src, 'state_expected' : metadata_networkstate_after_suspend, 'start_state' : 'metadata', 'end_event' : 'suspend', 'test_state_type' : 'networkState', 'timeout' : timeout_dataurl}}, {'test_suffix' : 'mp4', 'test_mapping' : {'media_type' : 'mp4', 'media_src' : mp4_src, 'state_expected' : metadata_networkstate_after_suspend, 'start_state' : 'metadata', 'end_event' : 'suspend', 'test_state_type' : 'networkState', 'timeout' : timeout}}, {'test_suffix' : 'ogg', 'test_mapping' : {'media_type' : 'ogg', 'media_src' : ogg_src, 'state_expected' : metadata_networkstate_after_suspend, 'start_state' : 'metadata', 'end_event' : 'suspend', 'test_state_type' : 'networkState', 'timeout' : timeout}}, {'test_suffix' : 'webm', 'test_mapping' : {'media_type' : 'webm', 'media_src' : webm_src, 'state_expected' : metadata_networkstate_after_suspend, 'start_state' : 'metadata', 'end_event' : 'suspend', 'test_state_type' : 'networkState', 'timeout' : timeout}} ], '../metadata/preload-metadata-readystate-after-suspend.tpl' : [ {'test_suffix' : 'dataurl', 'test_mapping' : {'media_type' : 'wave', 'media_src' : dataurl_src, 'state_expected' : metadata_readystate_after_suspend, 'start_state' : 'metadata', 'end_event' : 'suspend', 'test_state_type' : 'readyState', 'timeout' : timeout_dataurl}}, {'test_suffix' : 'mp4', 'test_mapping' : {'media_type' : 'mp4', 'media_src' : mp4_src, 'state_expected' : metadata_readystate_after_suspend, 'start_state' : 'metadata', 'end_event' : 'suspend', 'test_state_type' : 'readyState', 'timeout' : timeout}}, {'test_suffix' : 'ogg', 'test_mapping' : {'media_type' : 'ogg', 'media_src' : ogg_src, 'state_expected' : metadata_readystate_after_suspend, 'start_state' : 'metadata', 'end_event' : 'suspend', 'test_state_type' : 'readyState', 'timeout' : timeout}}, {'test_suffix' : 'webm', 'test_mapping' : {'media_type' : 'webm', 'media_src' : webm_src, 'state_expected' : metadata_readystate_after_suspend, 'start_state' : 'metadata', 'end_event' : 'suspend', 'test_state_type' : 'readyState', 'timeout' : timeout}} ], 'semantics/events/sync/preload-metadata-networkstate-order.tpl' : [ {'test_suffix' : 'dataurl', 'test_mapping' : {'media_type' : 'wave', 'media_src' : dataurl_src, 'states_expected' : metadata_networkstate_order_dataurl, 'start_state' : 'metadata', 'end_event' : 'suspend', 'test_state_type' : 'networkState', 'timeout' : timeout_dataurl}}, {'test_suffix' : 'mp4', 'test_mapping' : {'media_type' : 'mp4', 'media_src' : mp4_src, 'states_expected' : metadata_networkstate_order, 'start_state' : 'metadata', 'end_event' : 'suspend', 'test_state_type' : 'networkState', 'timeout' : timeout}}, {'test_suffix' : 'ogg', 'test_mapping' : {'media_type' : 'ogg', 'media_src' : ogg_src, 'states_expected' : metadata_networkstate_order, 'start_state' : 'metadata', 'end_event' : 'suspend', 'test_state_type' : 'networkState', 'timeout' : timeout}}, {'test_suffix' : 'webm', 'test_mapping' : {'media_type' : 'webm', 'media_src' : webm_src, 'states_expected' : metadata_networkstate_order, 'start_state' : 'metadata', 'end_event' : 'suspend', 'test_state_type' : 'networkState', 'timeout' : timeout}} ], 'semantics/events/sync/preload-metadata-readystate-order.tpl' : [ {'test_suffix' : 'dataurl', 'test_mapping' : {'media_type' : 'wave', 'media_src' : dataurl_src, 'states_expected' : metadata_readystate_order_dataurl, 'start_state' : 'metadata', 'end_event' : 'suspend', 'test_state_type' : 'readyState', 'timeout' : timeout_dataurl}}, {'test_suffix' : 'mp4', 'test_mapping' : {'media_type' : 'mp4', 'media_src' : mp4_src, 'states_expected' : metadata_readystate_order, 'start_state' : 'metadata', 'end_event' : 'suspend', 'test_state_type' : 'readyState', 'timeout' : timeout}}, {'test_suffix' : 'ogg', 'test_mapping' : {'media_type' : 'ogg', 'media_src' : ogg_src, 'states_expected' : metadata_readystate_order, 'start_state' : 'metadata', 'end_event' : 'suspend', 'test_state_type' : 'readyState', 'timeout' : timeout}}, {'test_suffix' : 'webm', 'test_mapping' : {'media_type' : 'webm', 'media_src' : webm_src, 'states_expected' : metadata_readystate_order, 'start_state' : 'metadata', 'end_event' : 'suspend', 'test_state_type' : 'readyState', 'timeout' : timeout}} ], '../metadata/preload-metadata-buffered.tpl' : [ {'test_suffix' : 'dataurl', 'test_mapping' : {'media_type' : 'wave', 'media_src' : dataurl_src, 'max_buffer' : '0.0001', 'timeout' : timeout_dataurl}}, {'test_suffix' : 'mp4', 'test_mapping' : {'media_type' : 'mp4', 'media_src' : mp4_src, 'max_buffer' : '60', 'timeout' : timeout}}, {'test_suffix' : 'webm', 'test_mapping' : {'media_type' : 'webm', 'media_src' : webm_src, 'max_buffer' : '60', 'timeout' : timeout}} ], '../metadata/preload-metadata-to-auto-event-order.tpl' : [ {'test_suffix' : 'dataurl', 'test_mapping' : {'media_type' : 'wave', 'media_src' : dataurl_src, 'events_expected' : metadata_event_order_play_after_suspend_dataurl, 'start_state' : 'metadata', 'end_state' : 'auto', 'start_event' : 'suspend', 'end_event' : 'canplaythrough', 'timeout' : timeout_dataurl}}, {'test_suffix' : 'mp4', 'test_mapping' : {'media_type' : 'mp4', 'media_src' : mp4_src, 'events_expected' : metadata_event_order_play_after_suspend, 'start_state' : 'metadata', 'end_state' : 'auto', 'start_event' : 'suspend', 'end_event' : 'canplaythrough', 'timeout' : timeout}}, {'test_suffix' : 'ogg', 'test_mapping' : {'media_type' : 'ogg', 'media_src' : ogg_src, 'events_expected' : metadata_event_order_play_after_suspend, 'start_state' : 'metadata', 'end_state' : 'auto', 'start_event' : 'suspend', 'end_event' : 'canplaythrough', 'timeout' : timeout}}, {'test_suffix' : 'webm', 'test_mapping' : {'media_type' : 'webm', 'media_src' : webm_src, 'events_expected' : metadata_event_order_play_after_suspend, 'start_state' : 'metadata', 'end_state' : 'auto', 'start_event' : 'suspend', 'end_event' : 'canplaythrough', 'timeout' : timeout}} ], '../metadata/preload-metadata-to-none-event-order.tpl' : [ {'test_suffix' : 'dataurl', 'test_mapping' : {'media_type' : 'wave', 'media_src' : dataurl_src, 'events_expected' : metadata_event_order_dataurl, 'start_state' : 'metadata', 'end_state' : 'none', 'start_event' : 'loadstart', 'end_event' : 'suspend', 'timeout' : timeout_dataurl}}, {'test_suffix' : 'mp4', 'test_mapping' : {'media_type' : 'mp4', 'media_src' : mp4_src, 'events_expected' : metadata_event_order, 'start_state' : 'metadata', 'end_state' : 'none', 'start_event' : 'loadstart', 'end_event' : 'suspend', 'timeout' : timeout}}, {'test_suffix' : 'ogg', 'test_mapping' : {'media_type' : 'ogg', 'media_src' : ogg_src, 'events_expected' : metadata_event_order, 'start_state' : 'metadata', 'end_state' : 'none', 'start_event' : 'loadstart', 'end_event' : 'suspend', 'timeout' : timeout}}, {'test_suffix' : 'webm', 'test_mapping' : {'media_type' : 'webm', 'media_src' : webm_src, 'events_expected' : metadata_event_order, 'start_state' : 'metadata', 'end_state' : 'none', 'start_event' : 'loadstart', 'end_event' : 'suspend', 'timeout' : timeout}} ], '../metadata/preload-metadata-to-none-after-src-networkstate.tpl' : [ {'test_suffix' : 'dataurl', 'test_mapping' : {'media_type' : 'wave', 'media_src' : dataurl_src, 'state_expected' : metadata_networkstate_after_suspend, 'start_state' : 'metadata', 'end_state' : 'none', 'end_event' : 'suspend', 'test_state_type' : 'networkState', 'timeout' : timeout_dataurl}}, {'test_suffix' : 'mp4', 'test_mapping' : {'media_type' : 'mp4', 'media_src' : mp4_src, 'state_expected' : metadata_networkstate_after_suspend, 'start_state' : 'metadata', 'end_state' : 'none', 'end_event' : 'suspend', 'test_state_type' : 'networkState', 'timeout' : timeout}}, {'test_suffix' : 'ogg', 'test_mapping' : {'media_type' : 'ogg', 'media_src' : ogg_src, 'state_expected' : metadata_networkstate_after_suspend, 'start_state' : 'metadata', 'end_state' : 'none', 'end_event' : 'suspend', 'test_state_type' : 'networkState', 'timeout' : timeout}}, {'test_suffix' : 'webm', 'test_mapping' : {'media_type' : 'webm', 'media_src' : webm_src, 'state_expected' : metadata_networkstate_after_suspend, 'start_state' : 'metadata', 'end_state' : 'none', 'end_event' : 'suspend', 'test_state_type' : 'networkState', 'timeout' : timeout}} ], '../metadata/preload-metadata-to-none-after-src-readystate.tpl' : [ {'test_suffix' : 'dataurl', 'test_mapping' : {'media_type' : 'wave', 'media_src' : dataurl_src, 'state_expected' : metadata_readystate_before_src, 'start_state' : 'metadata', 'end_state' : 'none', 'end_event' : 'suspend', 'test_state_type' : 'readyState', 'timeout' : timeout_dataurl}}, {'test_suffix' : 'mp4', 'test_mapping' : {'media_type' : 'mp4', 'media_src' : mp4_src, 'state_expected' : metadata_readystate_before_src, 'start_state' : 'metadata', 'end_state' : 'none', 'end_event' : 'suspend', 'test_state_type' : 'readyState', 'timeout' : timeout}}, {'test_suffix' : 'ogg', 'test_mapping' : {'media_type' : 'ogg', 'media_src' : ogg_src, 'state_expected' : metadata_readystate_before_src, 'start_state' : 'metadata', 'end_state' : 'none', 'end_event' : 'suspend', 'test_state_type' : 'readyState', 'timeout' : timeout}}, {'test_suffix' : 'webm', 'test_mapping' : {'media_type' : 'webm', 'media_src' : webm_src, 'state_expected' : metadata_readystate_before_src, 'start_state' : 'metadata', 'end_state' : 'none', 'end_event' : 'suspend', 'test_state_type' : 'readyState', 'timeout' : timeout}} ], '../metadata/preload-metadata-to-none-after-source-readystate.tpl' : [ {'test_suffix' : 'dataurl', 'test_mapping' : {'media_type' : 'wave', 'media_src' : dataurl_src, 'state_expected' : metadata_readystate_before_src, 'start_state' : 'metadata', 'end_state' : 'none', 'end_event' : 'suspend', 'test_state_type' : 'readyState', 'timeout' : timeout_dataurl}}, {'test_suffix' : 'mp4', 'test_mapping' : {'media_type' : 'mp4', 'media_src' : mp4_src, 'state_expected' : metadata_readystate_before_src, 'start_state' : 'metadata', 'end_state' : 'none', 'end_event' : 'suspend', 'test_state_type' : 'readyState', 'timeout' : timeout}}, {'test_suffix' : 'ogg', 'test_mapping' : {'media_type' : 'ogg', 'media_src' : ogg_src, 'state_expected' : metadata_readystate_before_src, 'start_state' : 'metadata', 'end_state' : 'none', 'end_event' : 'suspend', 'test_state_type' : 'readyState', 'timeout' : timeout}}, {'test_suffix' : 'webm', 'test_mapping' : {'media_type' : 'webm', 'media_src' : webm_src, 'state_expected' : metadata_readystate_before_src, 'start_state' : 'metadata', 'end_state' : 'none', 'end_event' : 'suspend', 'test_state_type' : 'readyState', 'timeout' : timeout}} ], '../metadata/preload-metadata-to-none-before-src-readystate.tpl' : [ {'test_suffix' : 'dataurl', 'test_mapping' : {'media_type' : 'wave', 'media_src' : dataurl_src, 'state_expected' : metadata_readystate_before_src, 'start_state' : 'metadata', 'end_state' : 'none', 'end_event' : 'suspend', 'test_state_type' : 'readyState', 'timeout' : timeout_dataurl}}, {'test_suffix' : 'mp4', 'test_mapping' : {'media_type' : 'mp4', 'media_src' : mp4_src, 'state_expected' : metadata_readystate_before_src, 'start_state' : 'metadata', 'end_state' : 'none', 'end_event' : 'suspend', 'test_state_type' : 'readyState', 'timeout' : timeout}}, {'test_suffix' : 'ogg', 'test_mapping' : {'media_type' : 'ogg', 'media_src' : ogg_src, 'state_expected' : metadata_readystate_before_src, 'start_state' : 'metadata', 'end_state' : 'none', 'end_event' : 'suspend', 'test_state_type' : 'readyState', 'timeout' : timeout}}, {'test_suffix' : 'webm', 'test_mapping' : {'media_type' : 'webm', 'media_src' : webm_src, 'state_expected' : metadata_readystate_before_src, 'start_state' : 'metadata', 'end_state' : 'none', 'end_event' : 'suspend', 'test_state_type' : 'readyState', 'timeout' : timeout}} ], '../metadata/preload-metadata-to-none-before-source-readystate.tpl' : [ {'test_suffix' : 'dataurl', 'test_mapping' : {'media_type' : 'wave', 'media_src' : dataurl_src, 'state_expected' : metadata_readystate_before_src, 'start_state' : 'metadata', 'end_state' : 'none', 'end_event' : 'suspend', 'test_state_type' : 'readyState', 'timeout' : timeout_dataurl}}, {'test_suffix' : 'mp4', 'test_mapping' : {'media_type' : 'mp4', 'media_src' : mp4_src, 'state_expected' : metadata_readystate_before_src, 'start_state' : 'metadata', 'end_state' : 'none', 'end_event' : 'suspend', 'test_state_type' : 'readyState', 'timeout' : timeout}}, {'test_suffix' : 'ogg', 'test_mapping' : {'media_type' : 'ogg', 'media_src' : ogg_src, 'state_expected' : metadata_readystate_before_src, 'start_state' : 'metadata', 'end_state' : 'none', 'end_event' : 'suspend', 'test_state_type' : 'readyState', 'timeout' : timeout}}, {'test_suffix' : 'webm', 'test_mapping' : {'media_type' : 'webm', 'media_src' : webm_src, 'state_expected' : metadata_readystate_before_src, 'start_state' : 'metadata', 'end_state' : 'none', 'end_event' : 'suspend', 'test_state_type' : 'readyState', 'timeout' : timeout}} ], '../metadata/preload-metadata-to-none-after-loadstart-networkstate.tpl' : [ {'test_suffix' : 'dataurl', 'test_mapping' : {'media_type' : 'wave', 'media_src' : dataurl_src, 'state_expected' : metadata_networkstate_after_suspend, 'start_state' : 'metadata', 'end_state' : 'none', 'start_event' : 'loadstart', 'end_event' : 'suspend', 'test_state_type' : 'networkState', 'timeout' : timeout_dataurl}}, {'test_suffix' : 'mp4', 'test_mapping' : {'media_type' : 'mp4', 'media_src' : mp4_src, 'state_expected' : metadata_networkstate_after_suspend, 'start_state' : 'metadata', 'end_state' : 'none', 'start_event' : 'loadstart', 'end_event' : 'suspend', 'test_state_type' : 'networkState', 'timeout' : timeout}}, {'test_suffix' : 'ogg', 'test_mapping' : {'media_type' : 'ogg', 'media_src' : ogg_src, 'state_expected' : metadata_networkstate_after_suspend, 'start_state' : 'metadata', 'end_state' : 'none', 'start_event' : 'loadstart', 'end_event' : 'suspend', 'test_state_type' : 'networkState', 'timeout' : timeout}}, {'test_suffix' : 'webm', 'test_mapping' : {'media_type' : 'webm', 'media_src' : webm_src, 'state_expected' : metadata_networkstate_after_suspend, 'start_state' : 'metadata', 'end_state' : 'none', 'start_event' : 'loadstart', 'end_event' : 'suspend', 'test_state_type' : 'networkState', 'timeout' : timeout}} ], '../metadata/preload-metadata-to-none-after-loadstart-readystate.tpl' : [ {'test_suffix' : 'dataurl', 'test_mapping' : {'media_type' : 'wave', 'media_src' : dataurl_src, 'state_expected' : metadata_readystate_after_suspend, 'start_state' : 'metadata', 'end_state' : 'none', 'start_event' : 'loadstart', 'end_event' : 'suspend', 'test_state_type' : 'readyState', 'timeout' : timeout_dataurl}}, {'test_suffix' : 'mp4', 'test_mapping' : {'media_type' : 'mp4', 'media_src' : mp4_src, 'state_expected' : metadata_readystate_after_suspend, 'start_state' : 'metadata', 'end_state' : 'none', 'start_event' : 'loadstart', 'end_event' : 'suspend', 'test_state_type' : 'readyState', 'timeout' : timeout}}, {'test_suffix' : 'ogg', 'test_mapping' : {'media_type' : 'ogg', 'media_src' : ogg_src, 'state_expected' : metadata_readystate_after_suspend, 'start_state' : 'metadata', 'end_state' : 'none', 'start_event' : 'loadstart', 'end_event' : 'suspend', 'test_state_type' : 'readyState', 'timeout' : timeout}}, {'test_suffix' : 'webm', 'test_mapping' : {'media_type' : 'webm', 'media_src' : webm_src, 'state_expected' : metadata_readystate_after_suspend, 'start_state' : 'metadata', 'end_state' : 'none', 'start_event' : 'loadstart', 'end_event' : 'suspend', 'test_state_type' : 'readyState', 'timeout' : timeout}} ], #preload="none" '../none/preload-none-event-order.tpl' : [ {'test_suffix' : 'dataurl', 'test_mapping' : {'media_type' : 'wave', 'media_src' : dataurl_src, 'events_expected' : none_event_order_dataurl, 'start_state' : 'none', 'end_event' : 'suspend', 'timeout' : timeout_dataurl}}, {'test_suffix' : 'mp4', 'test_mapping' : {'media_type' : 'mp4', 'media_src' : mp4_src, 'events_expected' : none_event_order, 'start_state' : 'none', 'end_event' : 'suspend', 'timeout' : timeout}}, {'test_suffix' : 'ogg', 'test_mapping' : {'media_type' : 'ogg', 'media_src' : ogg_src, 'events_expected' : none_event_order, 'start_state' : 'none', 'end_event' : 'suspend', 'timeout' : timeout}}, {'test_suffix' : 'webm', 'test_mapping' : {'media_type' : 'webm', 'media_src' : webm_src, 'events_expected' : none_event_order, 'start_state' : 'none', 'end_event' : 'suspend', 'timeout' : timeout}} ], '../none/preload-none-event-order-autoplay.tpl' : [ {'test_suffix' : 'dataurl', 'test_mapping' : {'media_type' : 'wave', 'media_src' : dataurl_src, 'events_expected' : auto_event_order_dataurl, 'start_state' : 'none', 'end_event' : 'canplaythrough', 'timeout' : timeout_dataurl}}, {'test_suffix' : 'mp4', 'test_mapping' : {'media_type' : 'mp4', 'media_src' : mp4_src, 'events_expected' : auto_event_order, 'start_state' : 'none', 'end_event' : 'canplaythrough', 'timeout' : timeout}}, {'test_suffix' : 'ogg', 'test_mapping' : {'media_type' : 'ogg', 'media_src' : ogg_src, 'events_expected' : auto_event_order, 'start_state' : 'none', 'end_event' : 'canplaythrough', 'timeout' : timeout}}, {'test_suffix' : 'webm', 'test_mapping' : {'media_type' : 'webm', 'media_src' : webm_src, 'events_expected' : auto_event_order, 'start_state' : 'none', 'end_event' : 'canplaythrough', 'timeout' : timeout}} ], '../none/preload-none-event-order-autoplay-after-suspend.tpl' : [ {'test_suffix' : 'dataurl', 'test_mapping' : {'media_type' : 'wave', 'media_src' : dataurl_src, 'events_expected' : none_event_order_play_after_suspend_dataurl, 'start_state' : 'none', 'start_event' : 'suspend', 'end_event' : 'canplaythrough', 'timeout' : timeout_dataurl}}, {'test_suffix' : 'mp4', 'test_mapping' : {'media_type' : 'mp4', 'media_src' : mp4_src, 'events_expected' : none_event_order_play_after_suspend, 'start_state' : 'none', 'start_event' : 'suspend', 'end_event' : 'canplaythrough', 'timeout' : timeout}}, {'test_suffix' : 'ogg', 'test_mapping' : {'media_type' : 'ogg', 'media_src' : ogg_src, 'events_expected' : none_event_order_play_after_suspend, 'start_state' : 'none', 'start_event' : 'suspend', 'end_event' : 'canplaythrough', 'timeout' : timeout}}, {'test_suffix' : 'webm', 'test_mapping' : {'media_type' : 'webm', 'media_src' : webm_src, 'events_expected' : none_event_order_play_after_suspend, 'start_state' : 'none', 'start_event' : 'suspend', 'end_event' : 'canplaythrough', 'timeout' : timeout}} ], '../none/preload-none-event-order-play-after-suspend.tpl' : [ {'test_suffix' : 'dataurl', 'test_mapping' : {'media_type' : 'wave', 'media_src' : dataurl_src, 'events_expected' : none_event_order_play_after_suspend_dataurl, 'start_state' : 'none', 'start_event' : 'suspend', 'end_event' : 'canplaythrough', 'timeout' : timeout_dataurl}}, {'test_suffix' : 'mp4', 'test_mapping' : {'media_type' : 'mp4', 'media_src' : mp4_src, 'events_expected' : none_event_order_play_after_suspend, 'start_state' : 'none', 'start_event' : 'suspend', 'end_event' : 'canplaythrough', 'timeout' : timeout}}, {'test_suffix' : 'ogg', 'test_mapping' : {'media_type' : 'ogg', 'media_src' : ogg_src, 'events_expected' : none_event_order_play_after_suspend, 'start_state' : 'none', 'start_event' : 'suspend', 'end_event' : 'canplaythrough', 'timeout' : timeout}}, {'test_suffix' : 'webm', 'test_mapping' : {'media_type' : 'webm', 'media_src' : webm_src, 'events_expected' : none_event_order_play_after_suspend, 'start_state' : 'none', 'start_event' : 'suspend', 'end_event' : 'canplaythrough', 'timeout' : timeout}} ], '../none/preload-none-to-auto-event-order.tpl' : [ {'test_suffix' : 'dataurl', 'test_mapping' : {'media_type' : 'wave', 'media_src' : dataurl_src, 'events_expected' : none_event_order_play_after_suspend_dataurl, 'start_state' : 'none', 'end_state' : 'auto', 'start_event' : 'suspend', 'end_event' : 'canplaythrough', 'timeout' : timeout_dataurl}}, {'test_suffix' : 'mp4', 'test_mapping' : {'media_type' : 'mp4', 'media_src' : mp4_src, 'events_expected' : none_event_order_play_after_suspend, 'start_state' : 'none', 'end_state' : 'auto', 'start_event' : 'suspend', 'end_event' : 'canplaythrough', 'timeout' : timeout}}, {'test_suffix' : 'ogg', 'test_mapping' : {'media_type' : 'ogg', 'media_src' : ogg_src, 'events_expected' : none_event_order_play_after_suspend, 'start_state' : 'none', 'end_state' : 'auto', 'start_event' : 'suspend', 'end_event' : 'canplaythrough', 'timeout' : timeout}}, {'test_suffix' : 'webm', 'test_mapping' : {'media_type' : 'webm', 'media_src' : webm_src, 'events_expected' : none_event_order_play_after_suspend, 'start_state' : 'none', 'end_state' : 'auto', 'start_event' : 'suspend', 'end_event' : 'canplaythrough', 'timeout' : timeout}} ], '../none/preload-none-to-invalid-event-order.tpl' : [ {'test_suffix' : 'dataurl', 'test_mapping' : {'media_type' : 'wave', 'media_src' : dataurl_src, 'events_expected' : none_to_metadata_event_order_dataurl, 'start_state' : 'none', 'end_state' : 'invalid', 'start_event' : 'suspend', 'end_event' : 'suspend', 'timeout' : timeout_dataurl}}, {'test_suffix' : 'mp4', 'test_mapping' : {'media_type' : 'mp4', 'media_src' : mp4_src, 'events_expected' : none_to_metadata_event_order, 'start_state' : 'none', 'end_state' : 'invalid', 'start_event' : 'suspend', 'end_event' : 'suspend', 'timeout' : timeout}}, {'test_suffix' : 'ogg', 'test_mapping' : {'media_type' : 'ogg', 'media_src' : ogg_src, 'events_expected' : none_to_metadata_event_order, 'start_state' : 'none', 'end_state' : 'invalid', 'start_event' : 'suspend', 'end_event' : 'suspend', 'timeout' : timeout}}, {'test_suffix' : 'webm', 'test_mapping' : {'media_type' : 'webm', 'media_src' : webm_src, 'events_expected' : none_to_metadata_event_order, 'start_state' : 'none', 'end_state' : 'invalid', 'start_event' : 'suspend', 'end_event' : 'suspend', 'timeout' : timeout}} ], '../none/preload-none-to-metadata-event-order.tpl' : [ {'test_suffix' : 'dataurl', 'test_mapping' : {'media_type' : 'wave', 'media_src' : dataurl_src, 'events_expected' : none_to_metadata_event_order_dataurl, 'start_state' : 'none', 'end_state' : 'metadata', 'start_event' : 'suspend', 'end_event' : 'suspend', 'timeout' : timeout_dataurl}}, {'test_suffix' : 'mp4', 'test_mapping' : {'media_type' : 'mp4', 'media_src' : mp4_src, 'events_expected' : none_to_metadata_event_order, 'start_state' : 'none', 'end_state' : 'metadata', 'start_event' : 'suspend', 'end_event' : 'suspend', 'timeout' : timeout}}, {'test_suffix' : 'ogg', 'test_mapping' : {'media_type' : 'ogg', 'media_src' : ogg_src, 'events_expected' : none_to_metadata_event_order, 'start_state' : 'none', 'end_state' : 'metadata', 'start_event' : 'suspend', 'end_event' : 'suspend', 'timeout' : timeout}}, {'test_suffix' : 'webm', 'test_mapping' : {'media_type' : 'webm', 'media_src' : webm_src, 'events_expected' : none_to_metadata_event_order, 'start_state' : 'none', 'end_state' : 'metadata', 'start_event' : 'suspend', 'end_event' : 'suspend', 'timeout' : timeout}} ], '../none/preload-none-remove-attribute-event-order.tpl' : [ {'test_suffix' : 'dataurl', 'test_mapping' : {'media_type' : 'wave', 'media_src' : dataurl_src, 'events_expected' : none_to_metadata_event_order_dataurl, 'start_state' : 'none', 'start_event' : 'suspend', 'end_event' : 'suspend', 'timeout' : timeout_dataurl}}, {'test_suffix' : 'mp4', 'test_mapping' : {'media_type' : 'mp4', 'media_src' : mp4_src, 'events_expected' : none_to_metadata_event_order, 'start_state' : 'none', 'start_event' : 'suspend', 'end_event' : 'suspend', 'timeout' : timeout}}, {'test_suffix' : 'ogg', 'test_mapping' : {'media_type' : 'ogg', 'media_src' : ogg_src, 'events_expected' : none_to_metadata_event_order, 'start_state' : 'none', 'start_event' : 'suspend', 'end_event' : 'suspend', 'timeout' : timeout}}, {'test_suffix' : 'webm', 'test_mapping' : {'media_type' : 'webm', 'media_src' : webm_src, 'events_expected' : none_to_metadata_event_order, 'start_state' : 'none', 'start_event' : 'suspend', 'end_event' : 'suspend', 'timeout' : timeout}} ] }
class SecureList(object): def __init__(self, lst): self.lst = list(lst) def __getitem__(self, item): return self.lst.pop(item) def __len__(self): return len(self.lst) def __repr__(self): tmp, self.lst = self.lst, [] return repr(tmp) def __str__(self): tmp, self.lst = self.lst, [] return str(tmp)
first_card = input().strip().upper() second_card = input().strip().upper() third_card = input().strip().upper() total_point = 0 if first_card == 'A': total_point += 1 elif first_card in 'JQK': total_point += 10 else: total_point += int(first_card) if second_card == 'A': total_point += 1 elif second_card in 'JQK': total_point += 10 else: total_point += int(second_card) if third_card == 'A': total_point += 1 elif third_card in 'JQK': total_point += 10 else: total_point += int(third_card) if total_point < 17: print('hit') elif total_point > 21: print('bust') else: print('stand')
class Node: def __init__(self, data, next=None): self.data = data self.next = next class List: def __init__(self): self.head = None self.tail = None self.this = None def add_to_tail(self, val): new_node = Node(val) if self.empty(): self.head = self.tail = new_node else: new_node.prev = self.this if self.this.next: new_node.next = self.this.next new_node.next.prev = new_node else: self.tail = new_node new_node.prev.next = new_node self.this = self.tail # self.size += 1 def empty(self): return self.head is None def _damp(self): nodes = [] current_node = self.head while current_node: nodes.append(current_node.data) current_node = current_node.next return nodes def print(self): print(*self._damp()) def print_reverse(self): print(*(self._damp()[::-1])) n = int(input()) values = list(map(int, input().split())) linked_list = List() for v in values: linked_list.add_to_tail(v) linked_list.print() linked_list.print_reverse()
# Copyright 2016 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, }, 'targets': [ { # GN version: //ui/events/keycodes:xkb 'target_name': 'keycodes_xkb', 'type': 'static_library', 'dependencies': [ '<(DEPTH)/base/base.gyp:base', '<(DEPTH)/ui/events/events.gyp:dom_keycode_converter', ], 'sources': [ 'keyboard_code_conversion_xkb.cc', 'keyboard_code_conversion_xkb.h', 'scoped_xkb.h', 'xkb_keysym.h', ], }, ], 'conditions': [ ['use_x11==1', { 'targets': [ { # GN version: //ui/events/keycodes:x11 'target_name': 'keycodes_x11', 'type': '<(component)', 'dependencies': [ '<(DEPTH)/base/base.gyp:base', '<(DEPTH)/build/linux/system.gyp:x11', '<(DEPTH)/ui/gfx/x/gfx_x11.gyp:gfx_x11', '../events.gyp:dom_keycode_converter', 'keycodes_xkb', ], 'defines': [ 'KEYCODES_X_IMPLEMENTATION', ], 'sources': [ 'keycodes_x_export.h', 'keyboard_code_conversion_x.cc', 'keyboard_code_conversion_x.h', 'keysym_to_unicode.cc', 'keysym_to_unicode.h', ], }, ], }], ], }
# from typing import Any class SensorCache(object): # instance = None soil_moisture: float = 0 temperature: float = 0 humidity: float = 0 # def __init__(self): # if SensorCache.instance: # return # self.soil_moisture: float = 0 # self.temperature: int = 0 # self.humidity: float = 0 # def __get__(key: str): # def __getattribute__(self, name): # if name in attrKeys: # return externalData[name] # return super(Transform, self).__getattribute__(name) # def __setattr__(self, name, value): # if name in attrKeys: # externalData[name] = value # else: # super(Transform, self).__setattr__(name, value) # @classmethod # def __set__(cls, key: str, value: Any): # cls[key] = value
# Crie um programa que leia a idade e o sexo de várias pessoas. A cada pessoa cadastrada o programa deverá perguntar se # o usuário quer ou não continuar. No final mostre: # A) Quantas pessoas tem mais de 18 anos. # B) Quantos homens foram cadastrados. # C) Quantas mulheres tem menos de 20 anos. separador = ('─' * 40) sexo = ("M", "m", "F", "f") resposta = ("S", "s", "N", "n") contadorIdade = contadorHomens = contadorMulheres = 0 while True: print(separador) print(F'{"CADASTRO DE PESSOAS":^40}') print(separador) idade = int(input('Qual a idade? ')) if idade >= 18: contadorIdade += 1 escolhaSexo = str(input('Qual o sexo? [M/F] ')).upper().strip()[0] while escolhaSexo not in sexo: escolhaSexo = str(input('Qual o sexo? [M/F] ')).upper().strip()[0] if escolhaSexo in 'Mm': contadorHomens += 1 if escolhaSexo in 'Ff' and idade < 20: contadorMulheres += 1 print(separador) escolhaResposta = str(input('Quer continuar? [S/N] ')).upper().strip()[0] while escolhaResposta not in resposta: escolhaResposta = str(input('Quer continuar? [S/N] ')).upper().strip()[0] if escolhaResposta in 'Nn': print(separador) print('Programa Encerrado') break print(separador) print(f'Existem {contadorIdade} pessoas com mais de 18 anos.') print(f'Foram cadastrados {contadorHomens} homens.') print(f'Existe {contadorMulheres} mulheres com menos de 20 anos.') print(separador)
# # PySNMP MIB module NMS-ERPS-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/NMS-ERPS-MIB # Produced by pysmi-0.3.4 at Wed May 1 14:22:01 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15) # Integer, ObjectIdentifier, OctetString = mibBuilder.importSymbols("ASN1", "Integer", "ObjectIdentifier", "OctetString") NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") SingleValueConstraint, ValueSizeConstraint, ValueRangeConstraint, ConstraintsIntersection, ConstraintsUnion = mibBuilder.importSymbols("ASN1-REFINEMENT", "SingleValueConstraint", "ValueSizeConstraint", "ValueRangeConstraint", "ConstraintsIntersection", "ConstraintsUnion") nmslocal, = mibBuilder.importSymbols("NMS-SMI", "nmslocal") NotificationGroup, ModuleCompliance = mibBuilder.importSymbols("SNMPv2-CONF", "NotificationGroup", "ModuleCompliance") Counter64, Counter32, NotificationType, Bits, Gauge32, ModuleIdentity, ObjectIdentity, IpAddress, TimeTicks, MibScalar, MibTable, MibTableRow, MibTableColumn, Integer32, MibIdentifier, Unsigned32, iso = mibBuilder.importSymbols("SNMPv2-SMI", "Counter64", "Counter32", "NotificationType", "Bits", "Gauge32", "ModuleIdentity", "ObjectIdentity", "IpAddress", "TimeTicks", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "Integer32", "MibIdentifier", "Unsigned32", "iso") DisplayString, TextualConvention = mibBuilder.importSymbols("SNMPv2-TC", "DisplayString", "TextualConvention") nmsERPS = MibIdentifier((1, 3, 6, 1, 4, 1, 11606, 10, 2, 231)) nmsERPSRings = MibScalar((1, 3, 6, 1, 4, 1, 11606, 10, 2, 231, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: nmsERPSRings.setStatus('mandatory') if mibBuilder.loadTexts: nmsERPSRings.setDescription('The number of ethernet ring instances.') nmsERPSInconsistenceCheck = MibScalar((1, 3, 6, 1, 4, 1, 11606, 10, 2, 231, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("disabled", 0), ("enabled", 1)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: nmsERPSInconsistenceCheck.setStatus('mandatory') if mibBuilder.loadTexts: nmsERPSInconsistenceCheck.setDescription('A value indicates that the ring-port inconsistence check is enabled or disabled.') nmsERPSPduRx = MibScalar((1, 3, 6, 1, 4, 1, 11606, 10, 2, 231, 3), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: nmsERPSPduRx.setStatus('mandatory') if mibBuilder.loadTexts: nmsERPSPduRx.setDescription('The total number of input PDUs.') nmsERPSPduRxDropped = MibScalar((1, 3, 6, 1, 4, 1, 11606, 10, 2, 231, 4), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: nmsERPSPduRxDropped.setStatus('mandatory') if mibBuilder.loadTexts: nmsERPSPduRxDropped.setDescription('The number of input discarded PDUs.') nmsERPSPduTx = MibScalar((1, 3, 6, 1, 4, 1, 11606, 10, 2, 231, 5), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: nmsERPSPduTx.setStatus('mandatory') if mibBuilder.loadTexts: nmsERPSPduTx.setDescription('The total number of output PDUs.') nmsERPSRingTable = MibTable((1, 3, 6, 1, 4, 1, 11606, 10, 2, 231, 6), ) if mibBuilder.loadTexts: nmsERPSRingTable.setStatus('mandatory') if mibBuilder.loadTexts: nmsERPSRingTable.setDescription('A table that contains information of rings.') nmsERPSRingTableEntry = MibTableRow((1, 3, 6, 1, 4, 1, 11606, 10, 2, 231, 6, 1), ).setIndexNames((0, "NMS-ERPS-MIB", "nmsERPSRingID")) if mibBuilder.loadTexts: nmsERPSRingTableEntry.setStatus('mandatory') if mibBuilder.loadTexts: nmsERPSRingTableEntry.setDescription('A table that contains information of rings.') nmsERPSRingID = MibTableColumn((1, 3, 6, 1, 4, 1, 11606, 10, 2, 231, 6, 1, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: nmsERPSRingID.setStatus('mandatory') if mibBuilder.loadTexts: nmsERPSRingID.setDescription('The index of ring instances.') nmsERPSRingNodeID = MibTableColumn((1, 3, 6, 1, 4, 1, 11606, 10, 2, 231, 6, 1, 2), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 32))).setMaxAccess("readonly") if mibBuilder.loadTexts: nmsERPSRingNodeID.setStatus('mandatory') if mibBuilder.loadTexts: nmsERPSRingNodeID.setDescription('The ring node identifier composed of a priority value and the bridge MAC address.') nmsERPSRingPorts = MibTableColumn((1, 3, 6, 1, 4, 1, 11606, 10, 2, 231, 6, 1, 3), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: nmsERPSRingPorts.setStatus('mandatory') if mibBuilder.loadTexts: nmsERPSRingPorts.setDescription('The number of interfaces which are configured in a ring.') nmsERPSRingRole = MibTableColumn((1, 3, 6, 1, 4, 1, 11606, 10, 2, 231, 6, 1, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("notRplOwner", 0), ("rplOwner", 1)))).setMaxAccess("readonly") if mibBuilder.loadTexts: nmsERPSRingRole.setStatus('mandatory') if mibBuilder.loadTexts: nmsERPSRingRole.setDescription('A value indicates whether one port of the ring node is the Ring protection link(RPL).') nmsERPSRingState = MibTableColumn((1, 3, 6, 1, 4, 1, 11606, 10, 2, 231, 6, 1, 5), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("idle", 0), ("protection", 1)))).setMaxAccess("readonly") if mibBuilder.loadTexts: nmsERPSRingState.setStatus('mandatory') if mibBuilder.loadTexts: nmsERPSRingState.setDescription('The ring protection state machine value.') nmsERPSRingWTR = MibTableColumn((1, 3, 6, 1, 4, 1, 11606, 10, 2, 231, 6, 1, 6), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("notWaitToRestore", 0), ("waitToRestore", 1)))).setMaxAccess("readonly") if mibBuilder.loadTexts: nmsERPSRingWTR.setStatus('mandatory') if mibBuilder.loadTexts: nmsERPSRingWTR.setDescription('This value from the RPL-Owner indicates whether it is Waiting to restore.') nmsERPSRingWtrWhile = MibTableColumn((1, 3, 6, 1, 4, 1, 11606, 10, 2, 231, 6, 1, 7), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: nmsERPSRingWtrWhile.setStatus('mandatory') if mibBuilder.loadTexts: nmsERPSRingWtrWhile.setDescription('The Wait-to-restore timer value, in seconds, which is the time left before the RPL-Owner restores from Protection state.') nmsERPSRingSignalFail = MibTableColumn((1, 3, 6, 1, 4, 1, 11606, 10, 2, 231, 6, 1, 8), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("noSignalFail", 0), ("signalFail", 1)))).setMaxAccess("readonly") if mibBuilder.loadTexts: nmsERPSRingSignalFail.setStatus('mandatory') if mibBuilder.loadTexts: nmsERPSRingSignalFail.setDescription('A value indicates if a ring port is failed.') nmsERPSRingSending = MibTableColumn((1, 3, 6, 1, 4, 1, 11606, 10, 2, 231, 6, 1, 9), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 32))).setMaxAccess("readonly") if mibBuilder.loadTexts: nmsERPSRingSending.setStatus('mandatory') if mibBuilder.loadTexts: nmsERPSRingSending.setDescription('The type of PDUs being sent.') nmsERPSRingRplOwnerID = MibTableColumn((1, 3, 6, 1, 4, 1, 11606, 10, 2, 231, 6, 1, 10), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 32))).setMaxAccess("readonly") if mibBuilder.loadTexts: nmsERPSRingRplOwnerID.setStatus('mandatory') if mibBuilder.loadTexts: nmsERPSRingRplOwnerID.setDescription("The RPL-Owner's identifier, recorded from a superior discovery PDU.") nmsERPSRingRplOwnerMAC = MibTableColumn((1, 3, 6, 1, 4, 1, 11606, 10, 2, 231, 6, 1, 11), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 32))).setMaxAccess("readonly") if mibBuilder.loadTexts: nmsERPSRingRplOwnerMAC.setStatus('mandatory') if mibBuilder.loadTexts: nmsERPSRingRplOwnerMAC.setDescription("The RPL-Owner's bridge MAC address, recorded from a NR-RB PDU.") nmsERPSRingDiscovering = MibTableColumn((1, 3, 6, 1, 4, 1, 11606, 10, 2, 231, 6, 1, 12), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3))).clone(namedValues=NamedValues(("notDiscovering", 0), ("discovering", 1), ("disabled", 2), ("enabled", 3)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: nmsERPSRingDiscovering.setStatus('mandatory') if mibBuilder.loadTexts: nmsERPSRingDiscovering.setDescription('A value indicates if the ring discovery process is running.') nmsERPSRingDiscoverWhile = MibTableColumn((1, 3, 6, 1, 4, 1, 11606, 10, 2, 231, 6, 1, 13), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: nmsERPSRingDiscoverWhile.setStatus('mandatory') if mibBuilder.loadTexts: nmsERPSRingDiscoverWhile.setDescription('The discovery timer value, in seconds. Remaining time of the discovery process.') nmsERPSRingPriorityValue = MibTableColumn((1, 3, 6, 1, 4, 1, 11606, 10, 2, 231, 6, 1, 14), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: nmsERPSRingPriorityValue.setStatus('mandatory') if mibBuilder.loadTexts: nmsERPSRingPriorityValue.setDescription('The configured ring node priority value. The lowest priority makes a node RPL-Owner in the ring. Available range is from 0 to 61440, in steps of 4096.') nmsERPSRingWtrTime = MibTableColumn((1, 3, 6, 1, 4, 1, 11606, 10, 2, 231, 6, 1, 15), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: nmsERPSRingWtrTime.setStatus('mandatory') if mibBuilder.loadTexts: nmsERPSRingWtrTime.setDescription('The configured Wait-to-restore time, in seconds.') nmsERPSRingGuardTime = MibTableColumn((1, 3, 6, 1, 4, 1, 11606, 10, 2, 231, 6, 1, 16), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: nmsERPSRingGuardTime.setStatus('mandatory') if mibBuilder.loadTexts: nmsERPSRingGuardTime.setDescription('The configured Guard-time, in 10ms.') nmsERPSRingSendTime = MibTableColumn((1, 3, 6, 1, 4, 1, 11606, 10, 2, 231, 6, 1, 17), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: nmsERPSRingSendTime.setStatus('mandatory') if mibBuilder.loadTexts: nmsERPSRingSendTime.setDescription('The configured interval of ring protection PDUs, in seconds.') nmsERPSRingDiscoveryTime = MibTableColumn((1, 3, 6, 1, 4, 1, 11606, 10, 2, 231, 6, 1, 18), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: nmsERPSRingDiscoveryTime.setStatus('mandatory') if mibBuilder.loadTexts: nmsERPSRingDiscoveryTime.setDescription('The duration configured for discovery process, in seconds.') nmsERPSRingDpduInterval = MibTableColumn((1, 3, 6, 1, 4, 1, 11606, 10, 2, 231, 6, 1, 19), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: nmsERPSRingDpduInterval.setStatus('mandatory') if mibBuilder.loadTexts: nmsERPSRingDpduInterval.setDescription('The configured interval of ring discovery PDUs, in seconds.') nmsERPSRingDiscoveryCount = MibTableColumn((1, 3, 6, 1, 4, 1, 11606, 10, 2, 231, 6, 1, 20), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: nmsERPSRingDiscoveryCount.setStatus('mandatory') if mibBuilder.loadTexts: nmsERPSRingDiscoveryCount.setDescription('The total number of discovery process ever started.') nmsERPSRingDiscoveryLastDuration = MibTableColumn((1, 3, 6, 1, 4, 1, 11606, 10, 2, 231, 6, 1, 21), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: nmsERPSRingDiscoveryLastDuration.setStatus('mandatory') if mibBuilder.loadTexts: nmsERPSRingDiscoveryLastDuration.setDescription('Runtime of the last discovery process, in 10 ms.') nmsERPSRingDiscoveryLastElapsed = MibTableColumn((1, 3, 6, 1, 4, 1, 11606, 10, 2, 231, 6, 1, 22), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: nmsERPSRingDiscoveryLastElapsed.setStatus('mandatory') if mibBuilder.loadTexts: nmsERPSRingDiscoveryLastElapsed.setDescription('Elapsed time since last discovery started, in seconds.') nmsERPSRingAdminStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 11606, 10, 2, 231, 6, 1, 23), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("disabled", 0), ("enabled", 1)))).setMaxAccess("readcreate") if mibBuilder.loadTexts: nmsERPSRingAdminStatus.setStatus('mandatory') if mibBuilder.loadTexts: nmsERPSRingAdminStatus.setDescription("A read-create value that indicates the configuration status of the ring instance. Set this value to 'enabled' to start the ring or 'disabled' to stop it.") nmsERPSRingPort1 = MibTableColumn((1, 3, 6, 1, 4, 1, 11606, 10, 2, 231, 6, 1, 24), Integer32()).setMaxAccess("readcreate") if mibBuilder.loadTexts: nmsERPSRingPort1.setStatus('mandatory') if mibBuilder.loadTexts: nmsERPSRingPort1.setDescription('The interface index of the first ring port. Value 0 indicates that the first port is not configured. This value is read-write.') nmsERPSRingPort1AdminType = MibTableColumn((1, 3, 6, 1, 4, 1, 11606, 10, 2, 231, 6, 1, 25), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("ring-port", 0), ("rpl", 1)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: nmsERPSRingPort1AdminType.setStatus('mandatory') if mibBuilder.loadTexts: nmsERPSRingPort1AdminType.setDescription("The configured type of the first ring port. Set this value to 'rpl' to configure the Ring-Protection-Link.") nmsERPSRingPort1OperType = MibTableColumn((1, 3, 6, 1, 4, 1, 11606, 10, 2, 231, 6, 1, 26), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("ring-port", 0), ("rpl", 1)))).setMaxAccess("readonly") if mibBuilder.loadTexts: nmsERPSRingPort1OperType.setStatus('mandatory') if mibBuilder.loadTexts: nmsERPSRingPort1OperType.setDescription('The running type of the first ring port.') nmsERPSRingPort1State = MibTableColumn((1, 3, 6, 1, 4, 1, 11606, 10, 2, 231, 6, 1, 27), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("blocking", 0), ("forwarding", 1)))).setMaxAccess("readonly") if mibBuilder.loadTexts: nmsERPSRingPort1State.setStatus('mandatory') if mibBuilder.loadTexts: nmsERPSRingPort1State.setDescription('Forwarding state of the first ring port.') nmsERPSRingPort1Status = MibTableColumn((1, 3, 6, 1, 4, 1, 11606, 10, 2, 231, 6, 1, 28), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("link-down", 0), ("link-up", 1)))).setMaxAccess("readonly") if mibBuilder.loadTexts: nmsERPSRingPort1Status.setStatus('mandatory') if mibBuilder.loadTexts: nmsERPSRingPort1Status.setDescription('Link status of the first ring port.') nmsERPSRingPort2 = MibTableColumn((1, 3, 6, 1, 4, 1, 11606, 10, 2, 231, 6, 1, 29), Integer32()).setMaxAccess("readcreate") if mibBuilder.loadTexts: nmsERPSRingPort2.setStatus('mandatory') if mibBuilder.loadTexts: nmsERPSRingPort2.setDescription('The interface index of the second ring port. Value 0 indicates that the second port is not configured. This value is read-write..') nmsERPSRingPort2AdminType = MibTableColumn((1, 3, 6, 1, 4, 1, 11606, 10, 2, 231, 6, 1, 30), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("ring-port", 0), ("rpl", 1)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: nmsERPSRingPort2AdminType.setStatus('mandatory') if mibBuilder.loadTexts: nmsERPSRingPort2AdminType.setDescription("The configured type of the second ring port. Set this value to 'rpl' to configure the Ring-Protection-Link.") nmsERPSRingPort2OperType = MibTableColumn((1, 3, 6, 1, 4, 1, 11606, 10, 2, 231, 6, 1, 31), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("ring-port", 0), ("rpl", 1)))).setMaxAccess("readonly") if mibBuilder.loadTexts: nmsERPSRingPort2OperType.setStatus('mandatory') if mibBuilder.loadTexts: nmsERPSRingPort2OperType.setDescription('The running type of the second ring port.') nmsERPSRingPort2State = MibTableColumn((1, 3, 6, 1, 4, 1, 11606, 10, 2, 231, 6, 1, 32), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("blocking", 0), ("forwarding", 1)))).setMaxAccess("readonly") if mibBuilder.loadTexts: nmsERPSRingPort2State.setStatus('mandatory') if mibBuilder.loadTexts: nmsERPSRingPort2State.setDescription('Forwarding state of the second ring port.') nmsERPSRingPort2Status = MibTableColumn((1, 3, 6, 1, 4, 1, 11606, 10, 2, 231, 6, 1, 33), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("link-down", 0), ("link-up", 1)))).setMaxAccess("readonly") if mibBuilder.loadTexts: nmsERPSRingPort2Status.setStatus('mandatory') if mibBuilder.loadTexts: nmsERPSRingPort2Status.setDescription('Link status of the second ring port.') nmsERPSRingPortTable = MibTable((1, 3, 6, 1, 4, 1, 11606, 10, 2, 231, 7), ) if mibBuilder.loadTexts: nmsERPSRingPortTable.setStatus('mandatory') if mibBuilder.loadTexts: nmsERPSRingPortTable.setDescription('A table that contains informations of ring ports.') nmsERPSRingPortTableEntry = MibTableRow((1, 3, 6, 1, 4, 1, 11606, 10, 2, 231, 7, 1), ).setIndexNames((0, "NMS-ERPS-MIB", "nmsERPSRingPortRingID"), (0, "NMS-ERPS-MIB", "nmsERPSRingPort")) if mibBuilder.loadTexts: nmsERPSRingPortTableEntry.setStatus('mandatory') if mibBuilder.loadTexts: nmsERPSRingPortTableEntry.setDescription('A table that contains informations of ring ports.') nmsERPSRingPortRingID = MibTableColumn((1, 3, 6, 1, 4, 1, 11606, 10, 2, 231, 7, 1, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: nmsERPSRingPortRingID.setStatus('mandatory') if mibBuilder.loadTexts: nmsERPSRingPortRingID.setDescription('The index of ring instance, in which this port is configured.') nmsERPSRingPort = MibTableColumn((1, 3, 6, 1, 4, 1, 11606, 10, 2, 231, 7, 1, 2), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: nmsERPSRingPort.setStatus('mandatory') if mibBuilder.loadTexts: nmsERPSRingPort.setDescription('Interface index of the ring port.') nmsERPSRingPortAdminType = MibTableColumn((1, 3, 6, 1, 4, 1, 11606, 10, 2, 231, 7, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("ring-port", 0), ("rpl", 1)))).setMaxAccess("readonly") if mibBuilder.loadTexts: nmsERPSRingPortAdminType.setStatus('mandatory') if mibBuilder.loadTexts: nmsERPSRingPortAdminType.setDescription('A value indicates that if the port is configured as the Ring Protection Link(RPL).') nmsERPSRingPortOperType = MibTableColumn((1, 3, 6, 1, 4, 1, 11606, 10, 2, 231, 7, 1, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("ring-port", 0), ("rpl", 1)))).setMaxAccess("readonly") if mibBuilder.loadTexts: nmsERPSRingPortOperType.setStatus('mandatory') if mibBuilder.loadTexts: nmsERPSRingPortOperType.setDescription("A value indicates that if the port is running as the Ring Protection Link(RPL). This value may be different with the value of 'nmsERPSRingPortAdminType'") nmsERPSRingPortState = MibTableColumn((1, 3, 6, 1, 4, 1, 11606, 10, 2, 231, 7, 1, 5), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("blocking", 0), ("forwarding", 1)))).setMaxAccess("readonly") if mibBuilder.loadTexts: nmsERPSRingPortState.setStatus('mandatory') if mibBuilder.loadTexts: nmsERPSRingPortState.setDescription('State of a ring port, forwarding or blocking.') nmsERPSRingPortStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 11606, 10, 2, 231, 7, 1, 6), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("link-down", 0), ("link-up", 1)))).setMaxAccess("readonly") if mibBuilder.loadTexts: nmsERPSRingPortStatus.setStatus('mandatory') if mibBuilder.loadTexts: nmsERPSRingPortStatus.setDescription('Link status of a ring port.') nmsERPSRingPortForwards = MibTableColumn((1, 3, 6, 1, 4, 1, 11606, 10, 2, 231, 7, 1, 7), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: nmsERPSRingPortForwards.setStatus('mandatory') if mibBuilder.loadTexts: nmsERPSRingPortForwards.setDescription('The number of times this port transitioned to forwarding state.') nmsERPSRingPortForwardLastElapsed = MibTableColumn((1, 3, 6, 1, 4, 1, 11606, 10, 2, 231, 7, 1, 8), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: nmsERPSRingPortForwardLastElapsed.setStatus('mandatory') if mibBuilder.loadTexts: nmsERPSRingPortForwardLastElapsed.setDescription('Elapsed time since the port became forwarding, in seconds.') nmsERPSRingPortRx = MibTableColumn((1, 3, 6, 1, 4, 1, 11606, 10, 2, 231, 7, 1, 9), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: nmsERPSRingPortRx.setStatus('mandatory') if mibBuilder.loadTexts: nmsERPSRingPortRx.setDescription('The number of received PDUs on this port.') nmsERPSRingPortTx = MibTableColumn((1, 3, 6, 1, 4, 1, 11606, 10, 2, 231, 7, 1, 10), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: nmsERPSRingPortTx.setStatus('mandatory') if mibBuilder.loadTexts: nmsERPSRingPortTx.setDescription('The number of transmitted PDUs on this port.') nmsERPSRingNotifications = MibIdentifier((1, 3, 6, 1, 4, 1, 11606, 10, 2, 231, 8)) nmsERPSRingRoleChange = NotificationType((1, 3, 6, 1, 4, 1, 11606, 10, 2, 231, 8, 1)).setObjects(("NMS-ERPS-MIB", "nmsERPSRingID"), ("NMS-ERPS-MIB", "nmsERPSRingNodeID"), ("NMS-ERPS-MIB", "nmsERPSRingRole")) if mibBuilder.loadTexts: nmsERPSRingRoleChange.setStatus('current') if mibBuilder.loadTexts: nmsERPSRingRoleChange.setDescription('The notification is generated when ring node role changes.') nmsERPSRingStateChange = NotificationType((1, 3, 6, 1, 4, 1, 11606, 10, 2, 231, 8, 2)).setObjects(("NMS-ERPS-MIB", "nmsERPSRingID"), ("NMS-ERPS-MIB", "nmsERPSRingNodeID"), ("NMS-ERPS-MIB", "nmsERPSRingRole"), ("NMS-ERPS-MIB", "nmsERPSRingState")) if mibBuilder.loadTexts: nmsERPSRingStateChange.setStatus('current') if mibBuilder.loadTexts: nmsERPSRingStateChange.setDescription('The notification is generated when a RPL-Owner detects that the state of ring changed.') mibBuilder.exportSymbols("NMS-ERPS-MIB", nmsERPS=nmsERPS, nmsERPSRingPorts=nmsERPSRingPorts, nmsERPSInconsistenceCheck=nmsERPSInconsistenceCheck, nmsERPSRings=nmsERPSRings, nmsERPSPduRx=nmsERPSPduRx, nmsERPSRingSignalFail=nmsERPSRingSignalFail, nmsERPSRingPort1OperType=nmsERPSRingPort1OperType, nmsERPSRingPortOperType=nmsERPSRingPortOperType, nmsERPSRingDiscoverWhile=nmsERPSRingDiscoverWhile, nmsERPSRingDiscoveryTime=nmsERPSRingDiscoveryTime, nmsERPSRingNodeID=nmsERPSRingNodeID, nmsERPSRingDiscoveryCount=nmsERPSRingDiscoveryCount, nmsERPSRingPortForwards=nmsERPSRingPortForwards, nmsERPSRingTableEntry=nmsERPSRingTableEntry, nmsERPSRingTable=nmsERPSRingTable, nmsERPSRingPort=nmsERPSRingPort, nmsERPSRingPort2State=nmsERPSRingPort2State, nmsERPSRingPort2Status=nmsERPSRingPort2Status, nmsERPSRingDiscovering=nmsERPSRingDiscovering, nmsERPSRingDiscoveryLastDuration=nmsERPSRingDiscoveryLastDuration, nmsERPSRingPortAdminType=nmsERPSRingPortAdminType, nmsERPSRingID=nmsERPSRingID, nmsERPSRingNotifications=nmsERPSRingNotifications, nmsERPSRingWTR=nmsERPSRingWTR, nmsERPSRingDpduInterval=nmsERPSRingDpduInterval, nmsERPSRingPort2=nmsERPSRingPort2, nmsERPSRingPort2OperType=nmsERPSRingPort2OperType, nmsERPSRingGuardTime=nmsERPSRingGuardTime, nmsERPSRingPort1AdminType=nmsERPSRingPort1AdminType, nmsERPSRingPort1Status=nmsERPSRingPort1Status, nmsERPSPduRxDropped=nmsERPSPduRxDropped, nmsERPSRingPriorityValue=nmsERPSRingPriorityValue, nmsERPSRingState=nmsERPSRingState, nmsERPSRingSending=nmsERPSRingSending, nmsERPSRingPort1=nmsERPSRingPort1, nmsERPSRingSendTime=nmsERPSRingSendTime, nmsERPSRingPortTx=nmsERPSRingPortTx, nmsERPSRingPortRingID=nmsERPSRingPortRingID, nmsERPSRingRplOwnerID=nmsERPSRingRplOwnerID, nmsERPSRingWtrTime=nmsERPSRingWtrTime, nmsERPSRingPort1State=nmsERPSRingPort1State, nmsERPSRingPortTable=nmsERPSRingPortTable, nmsERPSRingPortState=nmsERPSRingPortState, nmsERPSRingPortForwardLastElapsed=nmsERPSRingPortForwardLastElapsed, nmsERPSRingDiscoveryLastElapsed=nmsERPSRingDiscoveryLastElapsed, nmsERPSRingPortTableEntry=nmsERPSRingPortTableEntry, nmsERPSRingWtrWhile=nmsERPSRingWtrWhile, nmsERPSRingPortStatus=nmsERPSRingPortStatus, nmsERPSRingAdminStatus=nmsERPSRingAdminStatus, nmsERPSRingPortRx=nmsERPSRingPortRx, nmsERPSRingStateChange=nmsERPSRingStateChange, nmsERPSRingPort2AdminType=nmsERPSRingPort2AdminType, nmsERPSRingRoleChange=nmsERPSRingRoleChange, nmsERPSPduTx=nmsERPSPduTx, nmsERPSRingRole=nmsERPSRingRole, nmsERPSRingRplOwnerMAC=nmsERPSRingRplOwnerMAC)
""" 1. The larger the time-step $\Delta t$ the more the estimate $p_1$ deviates from the exact $p(t_1)$. 2. There is a linear relationship between $\Delta t$ and $e_1$: double the time-step double the error. 3. Make more shorter time-steps """
#!/usr/bin/env python cptlet = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890' listtl = '¢—-=@#$%^*' last = 'BoB' lastcheck = '.!?~\n' with open('/Users/bob/ocr.txt', 'r') as f: for i in f.readlines()[:-1]: if i != '\n': i = i[-1:]+i[:-2]+i[-2:-1].replace('-','') if (i[1] not in cptlet or last not in lastcheck) and i[1] not in listtl: i = ' '+i[1:] if last == 'BoB': i = i[1:] last = i[-1] with open('/Users/bob/ocr-new.txt', 'a') as x: x.write(i)
def quote_info(text): return f"<blockquote class=info>{text}</blockquote>" def quote_warning(text): return f"<blockquote class=warning>{text}</blockquote>" def quote_danger(text): return f"<blockquote class=danger>{text}</blockquote>" def code(text): return f"<code>{text}</code>" def html_link(link_text, url): return f"<a href='{url}'>{link_text}</a>"
#!/usr/bin/env python # encoding: utf-8 class postag(object): # ref: http://universaldependencies.org/u/pos/index.html # Open class words ADJ = "ADJ" ADV = "ADV" INTJ = "INTJ" NOUN = "NOUN" PROPN = "PROPN" VERB = "VERB" # Closed class words ADP = "ADP" AUX ="AUX" CCONJ = "CCONJ" DET = "DET" NUM = "NUM" PART = "PART" PRON = "PRON" SCONJ = "SCONJ" # Other PUNCT = "PUNCT" SYM = "SYM" X = "X" class dep_v1(object): # VERSION VERSION = "1.0" # subj relations nsubj = "nsubj" nsubjpass = "nsubjpass" nsubjcop = "nsubj:cop" csubj = "csubj" csubjpass = "csubjpass" # obj relations dobj = "dobj" iobj = "iobj" # copular cop = "cop" # auxiliary aux = "aux" auxpass = "auxpass" # negation neg = "neg" # non-nominal modifier amod = "amod" advmod = "advmod" # nominal modifers nmod = "nmod" nmod_poss = "nmod:poss" nmod_tmod = "nmod:tmod" nmod_npmod = "nmod:npmod" nmod_gobj = "nmod:gobj" obl = "nmod" obl_npmod = "nmod:npmod" # appositional modifier appos = "appos" # cooordination cc = "cc" conj = "conj" cc_preconj = "cc:preconj" # marker mark = "mark" case = "case" # fixed multiword expression mwe = "fixed" # parataxis parataxis = "parataxis" # punctuation punct = "punct" # clausal complement ccomp = "ccomp" xcomp = "xcomp" xcompds = "xcomp:ds" # relative clause advcl = "advcl" acl = "acl" aclrelcl = "acl:relcl" # unknown dep dep = "dep" SUBJ = {nsubj, csubj, nsubjpass, csubjpass} OBJ = {dobj, iobj} NMODS = {nmod, obl, nmod_npmod, nmod_tmod, nmod_gobj} ADJ_LIKE_MODS = {amod, appos, acl, aclrelcl} ARG_LIKE = {nmod, obl, nmod_npmod, nmod_tmod, nmod_gobj, nsubj, csubj, csubjpass, dobj, iobj} # trivial symbols to be stripped out TRIVIALS = {mark, cc, punct} # These dependents of a predicate root shouldn't be included in the # predicate phrase. PRED_DEPS_TO_DROP = {ccomp, csubj, advcl, acl, aclrelcl, nmod_tmod, parataxis, appos, dep} # These dependents of an argument root shouldn't be included in the # argument pharse if the argument root is the gov of the predicate root. SPECIAL_ARG_DEPS_TO_DROP = {nsubj, dobj, iobj, csubj, csubjpass, neg, aux, advcl, auxpass, ccomp, cop, mark, mwe, parataxis} # Predicates of these rels are hard to find arguments. HARD_TO_FIND_ARGS = {amod, dep, conj, acl, aclrelcl, advcl} class dep_v2(object): # VERSION VERSION = "2.0" # subj relations nsubj = "nsubj" nsubjpass = "nsubj:pass" nsubjcop = "nsubj:cop" csubj = "csubj" csubjpass = "csubj:pass" # obj relations dobj = "obj" iobj = "iobj" # auxiliary aux = "aux" auxpass = "aux:pass" # negation neg = "neg" # copular cop = "cop" # non-nominal modifier amod = "amod" advmod = "advmod" # nominal modifers nmod = "nmod" nmod_poss = "nmod:poss" nmod_tmod = "nmod:tmod" nmod_npmod = "nmod:npmod" nmod_gobj = "nmod:gobj" obl = "obl" obl_npmod = "obl:npmod" # appositional modifier appos = "appos" # cooordination cc = "cc" conj = "conj" cc_preconj = "cc:preconj" # marker mark = "mark" case = "case" # fixed multiword expression mwe = "fixed" # parataxis parataxis = "parataxis" # punctuation punct = "punct" # clausal complement ccomp = "ccomp" xcomp = "xcomp" xcompds = "xcomp:ds" # relative clause advcl = "advcl" acl = "acl" aclrelcl = "acl:relcl" # unknown dep dep = "dep" SUBJ = {nsubj, csubj, nsubjpass, csubjpass} OBJ = {dobj, iobj} NMODS = {nmod, obl, nmod_npmod, nmod_tmod, nmod_gobj} ADJ_LIKE_MODS = {amod, appos, acl, aclrelcl} ARG_LIKE = {nmod, obl, nmod_npmod, nmod_tmod, nmod_gobj, nsubj, csubj, csubjpass, dobj, iobj} # trivial symbols to be stripped out TRIVIALS = {mark, cc, punct} # These dependents of a predicate root shouldn't be included in the # predicate phrase. PRED_DEPS_TO_DROP = {ccomp, csubj, advcl, acl, aclrelcl, nmod_tmod, parataxis, appos, dep} # These dependents of an argument root shouldn't be included in the # argument pharse if the argument root is the gov of the predicate root. SPECIAL_ARG_DEPS_TO_DROP = {nsubj, dobj, iobj, csubj, csubjpass, neg, aux, advcl, auxpass, ccomp, cop, mark, mwe, parataxis} # Predicates of these deps are hard to find arguments. HARD_TO_FIND_ARGS = {amod, dep, conj, acl, aclrelcl, advcl}
print("-----------\nOmzetten van lengte-eenheden - Kilometers naar miles.\n") while True: print ("Geef de kilometers in die naar miles moeten omgezet.\nGebruik alleen getallen!") km = str(input("Kilometers: ")) try: km = float(km.replace(",", ".")) # replace comma with dot, if user entered a comma miles = round(km * 0.621371, 2) print ("----> [{0}] kilometers zijn gelijk aan [{1}] miles. ---".format(km, miles)) except Exception as e: print ("Opgelet gebruik enkel getallen! Geen tekst.") choice = input("Wil je nog een omzetting doen? y/n : ") if choice.lower() != "y" and choice.lower() != "yes": break
#!/usr/bin/env python3 """ implementation of recursive hilbert enumeration """ class Point: def __init__(self, x=0, y=0): self.x = x self.y = y def up(point): point.y += 1 def down(point): point.y -= 1 def left(point): point.x -= 1 def right(point): point.x += 1 def hilbert(n, point=Point(), up=up, down=down, left=left, right=right): """ recursive hilbert enumeration """ if n == 0: yield point.x, point.y return yield from hilbert(n - 1, point, right, left, down, up) up(point) yield from hilbert(n - 1, point, up, down, left, right) right(point) yield from hilbert(n - 1, point, up, down, left, right) down(point) yield from hilbert(n - 1, point, left, right, up, down)
class Pair(object): def __init__(self, individual1, individual2): self.ind1 = individual1 self.ind2 = individual2
class atom(object): def __init__(self,atno,x,y,z): self.atno = atno self.position = (x,y,z) # this is constructor def symbol(self): # a class method return atno__to__Symbol[atno] def __repr__(self): # a class method return '%d %10.4f %10.4f %10.4f%' (self.atno, self.position[0], self.position[1], self.position[2]) # toString
class Data: def __init__(self, startingArray): self.dict = { "Category" : 0, "Month" : 1, "Day" : 2, "RepeatType" : 3, "Time" : 4, } self.list = ["Category","Month", "Day", "RepeatMonth", "Time"] self.data = startingArray def setData(self, array): self.data = array def getData(self): return self.data def getDataIndex(self, index): return self.data[index] def getDataLen(self): return len(self.data) def getDataIndexIdentifier(self, index, identifier): return self.data[index][identifier] def getAllDataIdentifier(self, identifier): array = {} for i in self.data: array.append(i[identifier]) return array def getAllDataIDList(self, idList): out = {} for i in self.data: temp = {} for j in idList: temp.append(i[j]) out.append(temp) return out def convertData(self, dict): out = "" counter = 0 for i in dict: counter += 1 print(dict[i]) out = out + str(dict[i]) if(counter != 5): out = out + " ," return out def getDataFiltered(self, filter, filterType, dataType): # print("Filter ", filter) array = [] for i in self.data: # print("Left Side of boolean check",i[self.dict[filterType]],int(i[self.dict[filterType]]) == filter) if(int(i[self.dict[filterType]]) == filter): array.append(int(i[self.dict[dataType]])) # print("array after appending",array) return array
class Solution: def findJudge(self, n: int, trust: List[List[int]]) -> int: if not trust and n == 1: return 1 Trust = defaultdict(list) Trusted = defaultdict(list) for a, b in trust: Trust[a].append(b) Trusted[b].append(a) for i, t in Trusted.items(): if len(t) == n - 1 and Trust[i] == []: return i return -1
HOST = "irc.twitch.tv" PORT = 6667 NICK = "simpleaibot" PASS = "oauth:tldegtq435nf1dgdps8ik9opfw9pin" CHAN = "simpleaibot" OWNER = ["sinstr_syko", "aloeblinka"]
N,K=map(int,input().split()) L=[1]*(N+1) for j in range(2,N+1): if L[j]: key=j for i in range(key,N+1,key): if L[i]: L[i]=0 K-=1 if K==0: print(i) exit()
"""lists""" #import json class Lists: """lists""" def __init__(self, twitter): self.twitter = twitter def list(self, params): """Hello""" pass def members(self, params): """Hello""" pass def memberships(self, params): """Hello""" pass def ownerships(self, params): """Hello""" pass def show(self, params): """Hello""" pass def statuses(self, params): """Hello""" pass def subscribers(self, params): """Hello""" pass def subscriptions(self, params): """Hello""" pass def create(self, params): """Hello""" pass def destory(self, params): """Hello""" pass def update(self, params): """Hello""" pass
def fact(n = 5): if n < 2: return 1 else: return n * fact(n-1) num = input("Enter a number to get its factorial: ") if num == 'None' or num == '' or num == ' ': print("Factorial of default value is: ",fact()) else: print("Factorial of number is: ",fact(int(num)))
SUCCESS_GENERAL = 2000 SUCCESS_USER_REGISTERED = 2001 SUCCESS_USER_LOGGED_IN = 2002 ERROR_USER_ALREADY_REGISTERED = 4000 ERROR_USER_LOGIN = 4001 ERROR_LOGIN_FAILED_SYSTEM_ERROR = 4002
""" Ludolph: Monitoring Jabber Bot Version: 1.0.1 Homepage: https://github.com/erigones/Ludolph Copyright (C) 2012-2017 Erigones, s. r. o. See the LICENSE file for copying permission. """ __version__ = '1.0.1' __author__ = 'Erigones, s. r. o.' __copyright__ = 'Copyright 2012-2017, Erigones, s. r. o.'
# # PySNMP MIB module AVICI-SMI (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/AVICI-SMI # Produced by pysmi-0.3.4 at Wed May 1 11:32:28 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15) # OctetString, Integer, ObjectIdentifier = mibBuilder.importSymbols("ASN1", "OctetString", "Integer", "ObjectIdentifier") NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") ValueSizeConstraint, SingleValueConstraint, ConstraintsUnion, ValueRangeConstraint, ConstraintsIntersection = mibBuilder.importSymbols("ASN1-REFINEMENT", "ValueSizeConstraint", "SingleValueConstraint", "ConstraintsUnion", "ValueRangeConstraint", "ConstraintsIntersection") NotificationGroup, ModuleCompliance = mibBuilder.importSymbols("SNMPv2-CONF", "NotificationGroup", "ModuleCompliance") Unsigned32, enterprises, MibScalar, MibTable, MibTableRow, MibTableColumn, MibIdentifier, Integer32, NotificationType, Counter32, iso, TimeTicks, IpAddress, Bits, ObjectIdentity, Gauge32, ModuleIdentity, Counter64 = mibBuilder.importSymbols("SNMPv2-SMI", "Unsigned32", "enterprises", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "MibIdentifier", "Integer32", "NotificationType", "Counter32", "iso", "TimeTicks", "IpAddress", "Bits", "ObjectIdentity", "Gauge32", "ModuleIdentity", "Counter64") TextualConvention, DisplayString = mibBuilder.importSymbols("SNMPv2-TC", "TextualConvention", "DisplayString") avici = ModuleIdentity((1, 3, 6, 1, 4, 1, 2474)) avici.setRevisions(('1970-01-01 00:00', '1970-01-01 00:00',)) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): if mibBuilder.loadTexts: avici.setRevisionsDescriptions(('Changed arc names, removed unnecessary arcs.', 'Created MIB module.',)) if mibBuilder.loadTexts: avici.setLastUpdated('990330095500Z') if mibBuilder.loadTexts: avici.setOrganization('Avici Systems, Inc.') if mibBuilder.loadTexts: avici.setContactInfo(' Avici Systems, Inc. 101 Billerica Avenue North Billerica, MA 01862-1256 (978) 964-2000 (978) 964-2100 (fax) snmp@avici.com') if mibBuilder.loadTexts: avici.setDescription('This MIB module contains the structure of management information for all vendor-specific MIBs authored by Avici Systems, Inc.') aviciMibs = ObjectIdentity((1, 3, 6, 1, 4, 1, 2474, 1)) if mibBuilder.loadTexts: aviciMibs.setStatus('current') if mibBuilder.loadTexts: aviciMibs.setDescription('aviciMibs is the root where Avici Proprietary MIB modules are defined.') aviciProducts = ObjectIdentity((1, 3, 6, 1, 4, 1, 2474, 2)) if mibBuilder.loadTexts: aviciProducts.setStatus('current') if mibBuilder.loadTexts: aviciProducts.setDescription('aviciProducts contains the sysObjectID values for all Avici products.') aviciExperimental = ObjectIdentity((1, 3, 6, 1, 4, 1, 2474, 3)) if mibBuilder.loadTexts: aviciExperimental.setStatus('current') if mibBuilder.loadTexts: aviciExperimental.setDescription('aviciExperimental is a temporary place for experimental MIBs.') aviciTypes = ObjectIdentity((1, 3, 6, 1, 4, 1, 2474, 4)) if mibBuilder.loadTexts: aviciTypes.setStatus('current') if mibBuilder.loadTexts: aviciTypes.setDescription('aviciTypes is the root where Avici textual convention MIB modules are defined.') mibBuilder.exportSymbols("AVICI-SMI", aviciProducts=aviciProducts, PYSNMP_MODULE_ID=avici, aviciTypes=aviciTypes, aviciExperimental=aviciExperimental, avici=avici, aviciMibs=aviciMibs)
# Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the 'License'); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an 'AS IS' BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # ------------------------------------------------------------------ # GA Details GA_ACCOUNT_ID = "" GA_PROPERTY_ID = "" GA_DATASET_ID = "" # BQML Details - # Ensure that the BQ result headers resemble the data import schema # E.g. If data import schema looks like - ga:clientId, ga:dimension1, etc. # BQ result headers should like ga_clientId, ga_dimension1, etc. BQML_PREDICT_QUERY = """ """ # ------------------------------------------------------------------- # Options for logging & error monitoring # LOGGING: Create BQ Table for logs with schema as follows - # time TIMESTAMP, status STRING, error ERROR ENABLE_BQ_LOGGING = False # ERROR MONITORING: Sign up for the free Sendgrid API. ENABLE_SENDGRID_EMAIL_REPORTING = False # (OPTIONAL) Workflow Logging - BQ details, if enabled GCP_PROJECT_ID = "" BQ_DATASET_NAME = "" BQ_TABLE_NAME = "" # (OPTIONAL) Email Reporting - Sendgrid details, if enabled SENDGRID_API_KEY = "" TO_EMAIL = "" # ------------------------------------------------------------------- # (OPTIONAL) Email Reporting - Additional Parameters FROM_EMAIL = "workflow@example.com" SUBJECT = "FAILED: Audience Upload to GA" HTML_CONTENT = """ <p> Hi WorkflowUser, <br> Your BQML Custom Audience Upload has failed- <br> Time: {0} UTC <br> Reason: {1} </p> """
{ "uidPageJourney": { W3Const.w3PropType: W3Const.w3TypePanel, W3Const.w3PropSubUI: [ "uidJourneyTab" ] }, "uidJourneyTab": { W3Const.w3PropType: W3Const.w3TypeTab, W3Const.w3PropSubUI: [ ["uidJourneyTabJourneyLabel", "uidJourneyTabJourneyPanel"], ["uidJourneyTabMapLabel", "uidJourneyTabMapPanel"] ], W3Const.w3PropCSS: { # CSS for tab only support these format "border-width": "1px", "border-style": "solid", "background-color": "white" } }, "uidJourneyTabJourneyLabel": { W3Const.w3PropType: W3Const.w3TypeLabel, W3Const.w3PropString: "sidJourneyTabJourney", W3Const.w3PropClass: "cidLRPadding" }, "uidJourneyTabMapLabel": { W3Const.w3PropType: W3Const.w3TypeLabel, W3Const.w3PropString: "sidJourneyTabMap", W3Const.w3PropClass: "cidLRPadding" }, "JourneyTab": ImportPartial("EJUIJourneyTab.py"), "MapTab": ImportPartial("EJUIMapTab.py") }
def custom_send(socket): socket.send("message from mod.myfunc()") def custom_recv(socket): socket.recv() def custom_measure(q): return q.measure()
#This one is straight out the standard library. def _default_mime_types(): types_map = { '.cdf' : 'application/x-cdf', '.cdf' : 'application/x-netcdf', '.xls' : 'application/excel', '.xls' : 'application/vnd.ms-excel', }
s = input() ret = 0 for i in range(len(s)//2): if s[i] != s[-(i+1)]: ret += 1 print(ret)
SBOX = ( (0x63, 0x7C, 0x77, 0x7B, 0xF2, 0x6B, 0x6F, 0xC5, 0x30, 0x01, 0x67, 0x2B, 0xFE, 0xD7, 0xAB, 0x76), (0xCA, 0x82, 0xC9, 0x7D, 0xFA, 0x59, 0x47, 0xF0, 0xAD, 0xD4, 0xA2, 0xAF, 0x9C, 0xA4, 0x72, 0xC0), (0xB7, 0xFD, 0x93, 0x26, 0x36, 0x3F, 0xF7, 0xCC, 0x34, 0xA5, 0xE5, 0xF1, 0x71, 0xD8, 0x31, 0x15), (0x04, 0xC7, 0x23, 0xC3, 0x18, 0x96, 0x05, 0x9A, 0x07, 0x12, 0x80, 0xE2, 0xEB, 0x27, 0xB2, 0x75), (0x09, 0x83, 0x2C, 0x1A, 0x1B, 0x6E, 0x5A, 0xA0, 0x52, 0x3B, 0xD6, 0xB3, 0x29, 0xE3, 0x2F, 0x84), (0x53, 0xD1, 0x00, 0xED, 0x20, 0xFC, 0xB1, 0x5B, 0x6A, 0xCB, 0xBE, 0x39, 0x4A, 0x4C, 0x58, 0xCF), (0xD0, 0xEF, 0xAA, 0xFB, 0x43, 0x4D, 0x33, 0x85, 0x45, 0xF9, 0x02, 0x7F, 0x50, 0x3C, 0x9F, 0xA8), (0x51, 0xA3, 0x40, 0x8F, 0x92, 0x9D, 0x38, 0xF5, 0xBC, 0xB6, 0xDA, 0x21, 0x10, 0xFF, 0xF3, 0xD2), (0xCD, 0x0C, 0x13, 0xEC, 0x5F, 0x97, 0x44, 0x17, 0xC4, 0xA7, 0x7E, 0x3D, 0x64, 0x5D, 0x19, 0x73), (0x60, 0x81, 0x4F, 0xDC, 0x22, 0x2A, 0x90, 0x88, 0x46, 0xEE, 0xB8, 0x14, 0xDE, 0x5E, 0x0B, 0xDB), (0xE0, 0x32, 0x3A, 0x0A, 0x49, 0x06, 0x24, 0x5C, 0xC2, 0xD3, 0xAC, 0x62, 0x91, 0x95, 0xE4, 0x79), (0xE7, 0xC8, 0x37, 0x6D, 0x8D, 0xD5, 0x4E, 0xA9, 0x6C, 0x56, 0xF4, 0xEA, 0x65, 0x7A, 0xAE, 0x08), (0xBA, 0x78, 0x25, 0x2E, 0x1C, 0xA6, 0xB4, 0xC6, 0xE8, 0xDD, 0x74, 0x1F, 0x4B, 0xBD, 0x8B, 0x8A), (0x70, 0x3E, 0xB5, 0x66, 0x48, 0x03, 0xF6, 0x0E, 0x61, 0x35, 0x57, 0xB9, 0x86, 0xC1, 0x1D, 0x9E), (0xE1, 0xF8, 0x98, 0x11, 0x69, 0xD9, 0x8E, 0x94, 0x9B, 0x1E, 0x87, 0xE9, 0xCE, 0x55, 0x28, 0xDF), (0x8C, 0xA1, 0x89, 0x0D, 0xBF, 0xE6, 0x42, 0x68, 0x41, 0x99, 0x2D, 0x0F, 0xB0, 0x54, 0xBB, 0x16), ) INV_SBOX = ( (0x52, 0x09, 0x6A, 0xD5, 0x30, 0x36, 0xA5, 0x38, 0xBF, 0x40, 0xA3, 0x9E, 0x81, 0xF3, 0xD7, 0xFB), (0x7C, 0xE3, 0x39, 0x82, 0x9B, 0x2F, 0xFF, 0x87, 0x34, 0x8E, 0x43, 0x44, 0xC4, 0xDE, 0xE9, 0xCB), (0x54, 0x7B, 0x94, 0x32, 0xA6, 0xC2, 0x23, 0x3D, 0xEE, 0x4C, 0x95, 0x0B, 0x42, 0xFA, 0xC3, 0x4E), (0x08, 0x2E, 0xA1, 0x66, 0x28, 0xD9, 0x24, 0xB2, 0x76, 0x5B, 0xA2, 0x49, 0x6D, 0x8B, 0xD1, 0x25), (0x72, 0xF8, 0xF6, 0x64, 0x86, 0x68, 0x98, 0x16, 0xD4, 0xA4, 0x5C, 0xCC, 0x5D, 0x65, 0xB6, 0x92), (0x6C, 0x70, 0x48, 0x50, 0xFD, 0xED, 0xB9, 0xDA, 0x5E, 0x15, 0x46, 0x57, 0xA7, 0x8D, 0x9D, 0x84), (0x90, 0xD8, 0xAB, 0x00, 0x8C, 0xBC, 0xD3, 0x0A, 0xF7, 0xE4, 0x58, 0x05, 0xB8, 0xB3, 0x45, 0x06), (0xD0, 0x2C, 0x1E, 0x8F, 0xCA, 0x3F, 0x0F, 0x02, 0xC1, 0xAF, 0xBD, 0x03, 0x01, 0x13, 0x8A, 0x6B), (0x3A, 0x91, 0x11, 0x41, 0x4F, 0x67, 0xDC, 0xEA, 0x97, 0xF2, 0xCF, 0xCE, 0xF0, 0xB4, 0xE6, 0x73), (0x96, 0xAC, 0x74, 0x22, 0xE7, 0xAD, 0x35, 0x85, 0xE2, 0xF9, 0x37, 0xE8, 0x1C, 0x75, 0xDF, 0x6E), (0x47, 0xF1, 0x1A, 0x71, 0x1D, 0x29, 0xC5, 0x89, 0x6F, 0xB7, 0x62, 0x0E, 0xAA, 0x18, 0xBE, 0x1B), (0xFC, 0x56, 0x3E, 0x4B, 0xC6, 0xD2, 0x79, 0x20, 0x9A, 0xDB, 0xC0, 0xFE, 0x78, 0xCD, 0x5A, 0xF4), (0x1F, 0xDD, 0xA8, 0x33, 0x88, 0x07, 0xC7, 0x31, 0xB1, 0x12, 0x10, 0x59, 0x27, 0x80, 0xEC, 0x5F), (0x60, 0x51, 0x7F, 0xA9, 0x19, 0xB5, 0x4A, 0x0D, 0x2D, 0xE5, 0x7A, 0x9F, 0x93, 0xC9, 0x9C, 0xEF), (0xA0, 0xE0, 0x3B, 0x4D, 0xAE, 0x2A, 0xF5, 0xB0, 0xC8, 0xEB, 0xBB, 0x3C, 0x83, 0x53, 0x99, 0x61), (0x17, 0x2B, 0x04, 0x7E, 0xBA, 0x77, 0xD6, 0x26, 0xE1, 0x69, 0x14, 0x63, 0x55, 0x21, 0x0C, 0x7D), ) RCON = ( (0x01, 0x00, 0x00, 0x00), (0x02, 0x00, 0x00, 0x00), (0x04, 0x00, 0x00, 0x00), (0x08, 0x00, 0x00, 0x00), (0x10, 0x00, 0x00, 0x00), (0x20, 0x00, 0x00, 0x00), (0x40, 0x00, 0x00, 0x00), (0x80, 0x00, 0x00, 0x00), (0x1B, 0x00, 0x00, 0x00), (0x36, 0x00, 0x00, 0x00), ) # ---------------------------------------------------------------------------------------------------------------------- _MULTIPLY_BY_1 = tuple(range(256)) _MULTIPLY_BY_2 = ( 0x00, 0x02, 0x04, 0x06, 0x08, 0x0A, 0x0C, 0x0E, 0x10, 0x12, 0x14, 0x16, 0x18, 0x1A, 0x1C, 0x1E, 0x20, 0x22, 0x24, 0x26, 0x28, 0x2A, 0x2C, 0x2E, 0x30, 0x32, 0x34, 0x36, 0x38, 0x3A, 0x3C, 0x3E, 0x40, 0x42, 0x44, 0x46, 0x48, 0x4A, 0x4C, 0x4E, 0x50, 0x52, 0x54, 0x56, 0x58, 0x5A, 0x5C, 0x5E, 0x60, 0x62, 0x64, 0x66, 0x68, 0x6A, 0x6C, 0x6E, 0x70, 0x72, 0x74, 0x76, 0x78, 0x7A, 0x7C, 0x7E, 0x80, 0x82, 0x84, 0x86, 0x88, 0x8A, 0x8C, 0x8E, 0x90, 0x92, 0x94, 0x96, 0x98, 0x9A, 0x9C, 0x9E, 0xA0, 0xA2, 0xA4, 0xA6, 0xA8, 0xAA, 0xAC, 0xAE, 0xB0, 0xB2, 0xB4, 0xB6, 0xB8, 0xBA, 0xBC, 0xBE, 0xC0, 0xC2, 0xC4, 0xC6, 0xC8, 0xCA, 0xCC, 0xCE, 0xD0, 0xD2, 0xD4, 0xD6, 0xD8, 0xDA, 0xDC, 0xDE, 0xE0, 0xE2, 0xE4, 0xE6, 0xE8, 0xEA, 0xEC, 0xEE, 0xF0, 0xF2, 0xF4, 0xF6, 0xF8, 0xFA, 0xFC, 0xFE, 0x1B, 0x19, 0x1F, 0x1D, 0x13, 0x11, 0x17, 0x15, 0x0B, 0x09, 0x0F, 0x0D, 0x03, 0x01, 0x07, 0x05, 0x3B, 0x39, 0x3F, 0x3D, 0x33, 0x31, 0x37, 0x35, 0x2B, 0x29, 0x2F, 0x2D, 0x23, 0x21, 0x27, 0x25, 0x5B, 0x59, 0x5F, 0x5D, 0x53, 0x51, 0x57, 0x55, 0x4B, 0x49, 0x4F, 0x4D, 0x43, 0x41, 0x47, 0x45, 0x7B, 0x79, 0x7F, 0x7D, 0x73, 0x71, 0x77, 0x75, 0x6B, 0x69, 0x6F, 0x6D, 0x63, 0x61, 0x67, 0x65, 0x9B, 0x99, 0x9F, 0x9D, 0x93, 0x91, 0x97, 0x95, 0x8B, 0x89, 0x8F, 0x8D, 0x83, 0x81, 0x87, 0x85, 0xBB, 0xB9, 0xBF, 0xBD, 0xB3, 0xB1, 0xB7, 0xB5, 0xAB, 0xA9, 0xAF, 0xAD, 0xA3, 0xA1, 0xA7, 0xA5, 0xDB, 0xD9, 0xDF, 0xDD, 0xD3, 0xD1, 0xD7, 0xD5, 0xCB, 0xC9, 0xCF, 0xCD, 0xC3, 0xC1, 0xC7, 0xC5, 0xFB, 0xF9, 0xFF, 0xFD, 0xF3, 0xF1, 0xF7, 0xF5, 0xEB, 0xE9, 0xEF, 0xED, 0xE3, 0xE1, 0xE7, 0xE5, ) _MULTIPLY_BY_3 = ( 0x00, 0x03, 0x06, 0x05, 0x0C, 0x0F, 0x0A, 0x09, 0x18, 0x1B, 0x1E, 0x1D, 0x14, 0x17, 0x12, 0x11, 0x30, 0x33, 0x36, 0x35, 0x3C, 0x3F, 0x3A, 0x39, 0x28, 0x2B, 0x2E, 0x2D, 0x24, 0x27, 0x22, 0x21, 0x60, 0x63, 0x66, 0x65, 0x6C, 0x6F, 0x6A, 0x69, 0x78, 0x7B, 0x7E, 0x7D, 0x74, 0x77, 0x72, 0x71, 0x50, 0x53, 0x56, 0x55, 0x5C, 0x5F, 0x5A, 0x59, 0x48, 0x4B, 0x4E, 0x4D, 0x44, 0x47, 0x42, 0x41, 0xC0, 0xC3, 0xC6, 0xC5, 0xCC, 0xCF, 0xCA, 0xC9, 0xD8, 0xDB, 0xDE, 0xDD, 0xD4, 0xD7, 0xD2, 0xD1, 0xF0, 0xF3, 0xF6, 0xF5, 0xFC, 0xFF, 0xFA, 0xF9, 0xE8, 0xEB, 0xEE, 0xED, 0xE4, 0xE7, 0xE2, 0xE1, 0xA0, 0xA3, 0xA6, 0xA5, 0xAC, 0xAF, 0xAA, 0xA9, 0xB8, 0xBB, 0xBE, 0xBD, 0xB4, 0xB7, 0xB2, 0xB1, 0x90, 0x93, 0x96, 0x95, 0x9C, 0x9F, 0x9A, 0x99, 0x88, 0x8B, 0x8E, 0x8D, 0x84, 0x87, 0x82, 0x81, 0x9B, 0x98, 0x9D, 0x9E, 0x97, 0x94, 0x91, 0x92, 0x83, 0x80, 0x85, 0x86, 0x8F, 0x8C, 0x89, 0x8A, 0xAB, 0xA8, 0xAD, 0xAE, 0xA7, 0xA4, 0xA1, 0xA2, 0xB3, 0xB0, 0xB5, 0xB6, 0xBF, 0xBC, 0xB9, 0xBA, 0xFB, 0xF8, 0xFD, 0xFE, 0xF7, 0xF4, 0xF1, 0xF2, 0xE3, 0xE0, 0xE5, 0xE6, 0xEF, 0xEC, 0xE9, 0xEA, 0xCB, 0xC8, 0xCD, 0xCE, 0xC7, 0xC4, 0xC1, 0xC2, 0xD3, 0xD0, 0xD5, 0xD6, 0xDF, 0xDC, 0xD9, 0xDA, 0x5B, 0x58, 0x5D, 0x5E, 0x57, 0x54, 0x51, 0x52, 0x43, 0x40, 0x45, 0x46, 0x4F, 0x4C, 0x49, 0x4A, 0x6B, 0x68, 0x6D, 0x6E, 0x67, 0x64, 0x61, 0x62, 0x73, 0x70, 0x75, 0x76, 0x7F, 0x7C, 0x79, 0x7A, 0x3B, 0x38, 0x3D, 0x3E, 0x37, 0x34, 0x31, 0x32, 0x23, 0x20, 0x25, 0x26, 0x2F, 0x2C, 0x29, 0x2A, 0x0B, 0x08, 0x0D, 0x0E, 0x07, 0x04, 0x01, 0x02, 0x13, 0x10, 0x15, 0x16, 0x1F, 0x1C, 0x19, 0x1A, ) _MULTIPLY_BY_9 = ( 0x00, 0x09, 0x12, 0x1B, 0x24, 0x2D, 0x36, 0x3F, 0x48, 0x41, 0x5A, 0x53, 0x6C, 0x65, 0x7E, 0x77, 0x90, 0x99, 0x82, 0x8B, 0xB4, 0xBD, 0xA6, 0xAF, 0xD8, 0xD1, 0xCA, 0xC3, 0xFC, 0xF5, 0xEE, 0xE7, 0x3B, 0x32, 0x29, 0x20, 0x1F, 0x16, 0x0D, 0x04, 0x73, 0x7A, 0x61, 0x68, 0x57, 0x5E, 0x45, 0x4C, 0xAB, 0xA2, 0xB9, 0xB0, 0x8F, 0x86, 0x9D, 0x94, 0xE3, 0xEA, 0xF1, 0xF8, 0xC7, 0xCE, 0xD5, 0xDC, 0x76, 0x7F, 0x64, 0x6D, 0x52, 0x5B, 0x40, 0x49, 0x3E, 0x37, 0x2C, 0x25, 0x1A, 0x13, 0x08, 0x01, 0xE6, 0xEF, 0xF4, 0xFD, 0xC2, 0xCB, 0xD0, 0xD9, 0xAE, 0xA7, 0xBC, 0xB5, 0x8A, 0x83, 0x98, 0x91, 0x4D, 0x44, 0x5F, 0x56, 0x69, 0x60, 0x7B, 0x72, 0x05, 0x0C, 0x17, 0x1E, 0x21, 0x28, 0x33, 0x3A, 0xDD, 0xD4, 0xCF, 0xC6, 0xF9, 0xF0, 0xEB, 0xE2, 0x95, 0x9C, 0x87, 0x8E, 0xB1, 0xB8, 0xA3, 0xAA, 0xEC, 0xE5, 0xFE, 0xF7, 0xC8, 0xC1, 0xDA, 0xD3, 0xA4, 0xAD, 0xB6, 0xBF, 0x80, 0x89, 0x92, 0x9B, 0x7C, 0x75, 0x6E, 0x67, 0x58, 0x51, 0x4A, 0x43, 0x34, 0x3D, 0x26, 0x2F, 0x10, 0x19, 0x02, 0x0B, 0xD7, 0xDE, 0xC5, 0xCC, 0xF3, 0xFA, 0xE1, 0xE8, 0x9F, 0x96, 0x8D, 0x84, 0xBB, 0xB2, 0xA9, 0xA0, 0x47, 0x4E, 0x55, 0x5C, 0x63, 0x6A, 0x71, 0x78, 0x0F, 0x06, 0x1D, 0x14, 0x2B, 0x22, 0x39, 0x30, 0x9A, 0x93, 0x88, 0x81, 0xBE, 0xB7, 0xAC, 0xA5, 0xD2, 0xDB, 0xC0, 0xC9, 0xF6, 0xFF, 0xE4, 0xED, 0x0A, 0x03, 0x18, 0x11, 0x2E, 0x27, 0x3C, 0x35, 0x42, 0x4B, 0x50, 0x59, 0x66, 0x6F, 0x74, 0x7D, 0xA1, 0xA8, 0xB3, 0xBA, 0x85, 0x8C, 0x97, 0x9E, 0xE9, 0xE0, 0xFB, 0xF2, 0xCD, 0xC4, 0xDF, 0xD6, 0x31, 0x38, 0x23, 0x2A, 0x15, 0x1C, 0x07, 0x0E, 0x79, 0x70, 0x6B, 0x62, 0x5D, 0x54, 0x4F, 0x46, ) _MULTIPLY_BY_11 = ( 0x00, 0x0B, 0x16, 0x1D, 0x2C, 0x27, 0x3A, 0x31, 0x58, 0x53, 0x4E, 0x45, 0x74, 0x7F, 0x62, 0x69, 0xB0, 0xBB, 0xA6, 0xAD, 0x9C, 0x97, 0x8A, 0x81, 0xE8, 0xE3, 0xFE, 0xF5, 0xC4, 0xCF, 0xD2, 0xD9, 0x7B, 0x70, 0x6D, 0x66, 0x57, 0x5C, 0x41, 0x4A, 0x23, 0x28, 0x35, 0x3E, 0x0F, 0x04, 0x19, 0x12, 0xCB, 0xC0, 0xDD, 0xD6, 0xE7, 0xEC, 0xF1, 0xFA, 0x93, 0x98, 0x85, 0x8E, 0xBF, 0xB4, 0xA9, 0xA2, 0xF6, 0xFD, 0xE0, 0xEB, 0xDA, 0xD1, 0xCC, 0xC7, 0xAE, 0xA5, 0xB8, 0xB3, 0x82, 0x89, 0x94, 0x9F, 0x46, 0x4D, 0x50, 0x5B, 0x6A, 0x61, 0x7C, 0x77, 0x1E, 0x15, 0x08, 0x03, 0x32, 0x39, 0x24, 0x2F, 0x8D, 0x86, 0x9B, 0x90, 0xA1, 0xAA, 0xB7, 0xBC, 0xD5, 0xDE, 0xC3, 0xC8, 0xF9, 0xF2, 0xEF, 0xE4, 0x3D, 0x36, 0x2B, 0x20, 0x11, 0x1A, 0x07, 0x0C, 0x65, 0x6E, 0x73, 0x78, 0x49, 0x42, 0x5F, 0x54, 0xF7, 0xFC, 0xE1, 0xEA, 0xDB, 0xD0, 0xCD, 0xC6, 0xAF, 0xA4, 0xB9, 0xB2, 0x83, 0x88, 0x95, 0x9E, 0x47, 0x4C, 0x51, 0x5A, 0x6B, 0x60, 0x7D, 0x76, 0x1F, 0x14, 0x09, 0x02, 0x33, 0x38, 0x25, 0x2E, 0x8C, 0x87, 0x9A, 0x91, 0xA0, 0xAB, 0xB6, 0xBD, 0xD4, 0xDF, 0xC2, 0xC9, 0xF8, 0xF3, 0xEE, 0xE5, 0x3C, 0x37, 0x2A, 0x21, 0x10, 0x1B, 0x06, 0x0D, 0x64, 0x6F, 0x72, 0x79, 0x48, 0x43, 0x5E, 0x55, 0x01, 0x0A, 0x17, 0x1C, 0x2D, 0x26, 0x3B, 0x30, 0x59, 0x52, 0x4F, 0x44, 0x75, 0x7E, 0x63, 0x68, 0xB1, 0xBA, 0xA7, 0xAC, 0x9D, 0x96, 0x8B, 0x80, 0xE9, 0xE2, 0xFF, 0xF4, 0xC5, 0xCE, 0xD3, 0xD8, 0x7A, 0x71, 0x6C, 0x67, 0x56, 0x5D, 0x40, 0x4B, 0x22, 0x29, 0x34, 0x3F, 0x0E, 0x05, 0x18, 0x13, 0xCA, 0xC1, 0xDC, 0xD7, 0xE6, 0xED, 0xF0, 0xFB, 0x92, 0x99, 0x84, 0x8F, 0xBE, 0xB5, 0xA8, 0xA3, ) _MULTIPLY_BY_13 = ( 0x00, 0x0D, 0x1A, 0x17, 0x34, 0x39, 0x2E, 0x23, 0x68, 0x65, 0x72, 0x7F, 0x5C, 0x51, 0x46, 0x4B, 0xD0, 0xDD, 0xCA, 0xC7, 0xE4, 0xE9, 0xFE, 0xF3, 0xB8, 0xB5, 0xA2, 0xAF, 0x8C, 0x81, 0x96, 0x9B, 0xBB, 0xB6, 0xA1, 0xAC, 0x8F, 0x82, 0x95, 0x98, 0xD3, 0xDE, 0xC9, 0xC4, 0xE7, 0xEA, 0xFD, 0xF0, 0x6B, 0x66, 0x71, 0x7C, 0x5F, 0x52, 0x45, 0x48, 0x03, 0x0E, 0x19, 0x14, 0x37, 0x3A, 0x2D, 0x20, 0x6D, 0x60, 0x77, 0x7A, 0x59, 0x54, 0x43, 0x4E, 0x05, 0x08, 0x1F, 0x12, 0x31, 0x3C, 0x2B, 0x26, 0xBD, 0xB0, 0xA7, 0xAA, 0x89, 0x84, 0x93, 0x9E, 0xD5, 0xD8, 0xCF, 0xC2, 0xE1, 0xEC, 0xFB, 0xF6, 0xD6, 0xDB, 0xCC, 0xC1, 0xE2, 0xEF, 0xF8, 0xF5, 0xBE, 0xB3, 0xA4, 0xA9, 0x8A, 0x87, 0x90, 0x9D, 0x06, 0x0B, 0x1C, 0x11, 0x32, 0x3F, 0x28, 0x25, 0x6E, 0x63, 0x74, 0x79, 0x5A, 0x57, 0x40, 0x4D, 0xDA, 0xD7, 0xC0, 0xCD, 0xEE, 0xE3, 0xF4, 0xF9, 0xB2, 0xBF, 0xA8, 0xA5, 0x86, 0x8B, 0x9C, 0x91, 0x0A, 0x07, 0x10, 0x1D, 0x3E, 0x33, 0x24, 0x29, 0x62, 0x6F, 0x78, 0x75, 0x56, 0x5B, 0x4C, 0x41, 0x61, 0x6C, 0x7B, 0x76, 0x55, 0x58, 0x4F, 0x42, 0x09, 0x04, 0x13, 0x1E, 0x3D, 0x30, 0x27, 0x2A, 0xB1, 0xBC, 0xAB, 0xA6, 0x85, 0x88, 0x9F, 0x92, 0xD9, 0xD4, 0xC3, 0xCE, 0xED, 0xE0, 0xF7, 0xFA, 0xB7, 0xBA, 0xAD, 0xA0, 0x83, 0x8E, 0x99, 0x94, 0xDF, 0xD2, 0xC5, 0xC8, 0xEB, 0xE6, 0xF1, 0xFC, 0x67, 0x6A, 0x7D, 0x70, 0x53, 0x5E, 0x49, 0x44, 0x0F, 0x02, 0x15, 0x18, 0x3B, 0x36, 0x21, 0x2C, 0x0C, 0x01, 0x16, 0x1B, 0x38, 0x35, 0x22, 0x2F, 0x64, 0x69, 0x7E, 0x73, 0x50, 0x5D, 0x4A, 0x47, 0xDC, 0xD1, 0xC6, 0xCB, 0xE8, 0xE5, 0xF2, 0xFF, 0xB4, 0xB9, 0xAE, 0xA3, 0x80, 0x8D, 0x9A, 0x97, ) _MULTIPLY_BY_14 = ( 0x00, 0x0E, 0x1C, 0x12, 0x38, 0x36, 0x24, 0x2A, 0x70, 0x7E, 0x6C, 0x62, 0x48, 0x46, 0x54, 0x5A, 0xE0, 0xEE, 0xFC, 0xF2, 0xD8, 0xD6, 0xC4, 0xCA, 0x90, 0x9E, 0x8C, 0x82, 0xA8, 0xA6, 0xB4, 0xBA, 0xDB, 0xD5, 0xC7, 0xC9, 0xE3, 0xED, 0xFF, 0xF1, 0xAB, 0xA5, 0xB7, 0xB9, 0x93, 0x9D, 0x8F, 0x81, 0x3B, 0x35, 0x27, 0x29, 0x03, 0x0D, 0x1F, 0x11, 0x4B, 0x45, 0x57, 0x59, 0x73, 0x7D, 0x6F, 0x61, 0xAD, 0xA3, 0xB1, 0xBF, 0x95, 0x9B, 0x89, 0x87, 0xDD, 0xD3, 0xC1, 0xCF, 0xE5, 0xEB, 0xF9, 0xF7, 0x4D, 0x43, 0x51, 0x5F, 0x75, 0x7B, 0x69, 0x67, 0x3D, 0x33, 0x21, 0x2F, 0x05, 0x0B, 0x19, 0x17, 0x76, 0x78, 0x6A, 0x64, 0x4E, 0x40, 0x52, 0x5C, 0x06, 0x08, 0x1A, 0x14, 0x3E, 0x30, 0x22, 0x2C, 0x96, 0x98, 0x8A, 0x84, 0xAE, 0xA0, 0xB2, 0xBC, 0xE6, 0xE8, 0xFA, 0xF4, 0xDE, 0xD0, 0xC2, 0xCC, 0x41, 0x4F, 0x5D, 0x53, 0x79, 0x77, 0x65, 0x6B, 0x31, 0x3F, 0x2D, 0x23, 0x09, 0x07, 0x15, 0x1B, 0xA1, 0xAF, 0xBD, 0xB3, 0x99, 0x97, 0x85, 0x8B, 0xD1, 0xDF, 0xCD, 0xC3, 0xE9, 0xE7, 0xF5, 0xFB, 0x9A, 0x94, 0x86, 0x88, 0xA2, 0xAC, 0xBE, 0xB0, 0xEA, 0xE4, 0xF6, 0xF8, 0xD2, 0xDC, 0xCE, 0xC0, 0x7A, 0x74, 0x66, 0x68, 0x42, 0x4C, 0x5E, 0x50, 0x0A, 0x04, 0x16, 0x18, 0x32, 0x3C, 0x2E, 0x20, 0xEC, 0xE2, 0xF0, 0xFE, 0xD4, 0xDA, 0xC8, 0xC6, 0x9C, 0x92, 0x80, 0x8E, 0xA4, 0xAA, 0xB8, 0xB6, 0x0C, 0x02, 0x10, 0x1E, 0x34, 0x3A, 0x28, 0x26, 0x7C, 0x72, 0x60, 0x6E, 0x44, 0x4A, 0x58, 0x56, 0x37, 0x39, 0x2B, 0x25, 0x0F, 0x01, 0x13, 0x1D, 0x47, 0x49, 0x5B, 0x55, 0x7F, 0x71, 0x63, 0x6D, 0xD7, 0xD9, 0xCB, 0xC5, 0xEF, 0xE1, 0xF3, 0xFD, 0xA7, 0xA9, 0xBB, 0xB5, 0x9F, 0x91, 0x83, 0x8D, ) MIX_COLUMNS_MATRIX = ( (_MULTIPLY_BY_2, _MULTIPLY_BY_3, _MULTIPLY_BY_1, _MULTIPLY_BY_1), (_MULTIPLY_BY_1, _MULTIPLY_BY_2, _MULTIPLY_BY_3, _MULTIPLY_BY_1), (_MULTIPLY_BY_1, _MULTIPLY_BY_1, _MULTIPLY_BY_2, _MULTIPLY_BY_3), (_MULTIPLY_BY_3, _MULTIPLY_BY_1, _MULTIPLY_BY_1, _MULTIPLY_BY_2), ) INV_MIX_COLUMNS_MATRIX = ( (_MULTIPLY_BY_14, _MULTIPLY_BY_11, _MULTIPLY_BY_13, _MULTIPLY_BY_9), (_MULTIPLY_BY_9, _MULTIPLY_BY_14, _MULTIPLY_BY_11, _MULTIPLY_BY_13), (_MULTIPLY_BY_13, _MULTIPLY_BY_9, _MULTIPLY_BY_14, _MULTIPLY_BY_11), (_MULTIPLY_BY_11, _MULTIPLY_BY_13, _MULTIPLY_BY_9, _MULTIPLY_BY_14), )
my_list = ['в', '5', 'часов', '17', 'минут', 'температура', 'воздуха', 'была', '+5', 'градусов'] idx = 0 while idx < len(my_list): if my_list[idx].isdigit(): my_list.insert(idx, '"') my_list[idx + 1] = f'{int(my_list[idx + 1]):02}' my_list.insert(idx + 2, '"') idx += 2 elif (my_list[idx].startswith('+') or my_list[idx].startswith('-')) and my_list[idx][1:].isdigit(): my_list.insert(idx, '"') my_list[idx + 1] = f'{my_list[idx + 1][0]}{int(my_list[idx + 1]):02}' my_list.insert(idx + 2, '"') idx += 2 idx += 1 out_info = ' '.join(my_list) print(out_info)
poem = '''There was a young lady named Bright, Whose speed was far faster than light; She started one day In a relative way, And returned on the previous night.''' print(poem) try: fout = open('relativety', 'xt') fout.write(poem) fout.close() except FileExistsError: print('relativety already exists! That was a close one.')
try: with open("input.txt", "r") as fileContent: timers = [int(number) for number in fileContent.readline().split(",")] frequencies = [0] * 9 for timer in timers: frequencies[timer] = timers.count(timer) except FileNotFoundError: print("[!] The input file was not found. The program will not continue.") exit(-1) for _ in range(256): newborns, initialSixes = frequencies[-1], frequencies[6] for index in range(len(frequencies)): if index == 0 and frequencies[index] > 0: frequencies[-1] += frequencies[index] frequencies[6] += frequencies[index] frequencies[index] -= frequencies[index] if index < 8: if frequencies[6] != initialSixes and index == 5: frequencies[index] += initialSixes frequencies[index + 1] -= initialSixes elif frequencies[-1] != newborns and index == 7: frequencies[index] += newborns frequencies[index + 1] -= newborns else: frequencies[index] += frequencies[index + 1] frequencies[index + 1] -= frequencies[index + 1] print(sum(frequencies))
ADMINS = ( ('Admin', 'admin@tvoy_style.com'), ) EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend' DEFAULT_FROM_EMAIL = 'dezigner20@gmail.com' EMAIL_USE_TLS = True EMAIL_HOST = 'smtp.gmail.com' EMAIL_HOST_USER = 'dezigner20@gmail.com' EMAIL_HOST_PASSWORD = 'SSDD24869317SSDD**' SERVER_EMAIL = DEFAULT_FROM_EMAIL EMAIL_PORT = 587
class Solution: # @param {integer[]} nums # @return {integer[]} def productExceptSelf(self, nums): before = [] after = [] product = 1 for num in nums: before.append(product) product = product * num product = 1 for num in reversed(nums): after.append(product) product = product * num after = after[::-1] result = [] for i in range(len(nums)): result.append(before[i] * after[i]) return result
def f(a): global n if n == 0 and a == 0: return True if n == a%10: return True if n == a//10: return True H1,M1=list(map(int,input().split())) H2,M2=list(map(int,input().split())) n=int(input()) S=0 while H1 != H2 or M1 != M2: if f(H1) or f(M1): S+=1 if M1 + 1 == 60: M1=0 H1+=1 else: M1+=1 if f(H2) or f(M2): S+=1 print(S)
def add(x, y): """ Add two number """ return x+y def subtract(x,y): return abs(x-y)
LOCATION_REPLACE = { 'USA': 'United States', 'KSA': 'Kingdom of Saudi Arabia', 'CA': 'Canada', }
def count(index): print(index) if index < 2: count(index + 1) count(0)
class Chessboard: square_not_allowed = ["A1", "C1", "E1", "G1", "B2", "D2", "F2", "H2", "A3", "C3", "E3", "G3", "B4", "D4", "F4", "H4", "A5", "C5", "E5", "G5", "B6", "D6", "F6", "H6", "A7", "C7", "E7", "G7", "B8", "D8", "F8", "H8"] def __init__(self): self.disposition = self.generate_chessboard() def __str__(self): pass @staticmethod def generate_chessboard(): # Static Chessboard square_allowed_map = { "A8": "B", "C8": "B", "E8": "B", "G8": "B", "B7": "B", "D7": "B", "F7": "B", "H7": "B", "A6": "B", "C6": "B", "E6": "B", "G6": "B", "B5": "F", "D5": "F", "F5": "F", "H5": "F", "A4": "F", "C4": "F", "E4": "F", "G4": "F", "B3": "W", "D3": "W", "F3": "W", "H3": "W", "A2": "W", "C2": "W", "E2": "W", "G2": "W", "B1": "W", "D1": "W", "F1": "W", "H1": "W", } return square_allowed_map def check_checkers(self): checkers_w_position = ["A8", "C8", "E8", "G8"] for value in checkers_w_position: if self.disposition[value] == "W": self.disposition[value] = "WWW" checkers_b_position = ["B1", "D1", "F1", "H1"] for value in checkers_b_position: if self.disposition[value] == "B": self.disposition[value] = "BBB" def print_chessboard(self): print("╔{:^53}╗".format("═" * 53)) # ASCII code (201,205,187) rows, cols, i = 8, 8, 0 # constants pieces = list(self.disposition.values()) # from dict to list # print(pieces) for row in range(rows, 0, -1): print("║▓ {} ▓".format(row), end="") # ASCII code if row % 2 == 0: for col in range(1, cols, 2): if pieces[i] != "F": if len(pieces[i]) == 3: print(f"║ {pieces[i]} ", end="") print("║░░░░░", end="") # ASCII code else: print(f"║ {pieces[i]} ", end="") print("║░░░░░", end="") else: print("║ ", end="") print("║░░░░░", end="") i += 1 print("║") else: for col in range(1, cols, 2): print("║░░░░░", end="") if pieces[i] != "F": if len(pieces[i]) == 3: print(f"║ {pieces[i]} ", end="") else: print(f"║ {pieces[i]} ", end="") else: print("║ ", end="") i += 1 print("║") print("╠{:^53}╣".format("═" * 53)) # ASCII code (204,185,205) print("║▓▓▓▓▓║▓ A ▓║▓ B ▓║▓ C ▓║▓ D ▓║▓ E ▓║▓ F ▓║▓ G ▓║▓ H ▓║") print("╚{:^53}╝".format("═" * 53)) # ASCII code (200,188,205) # print(self.disposition)
# Refaça o exercicio 9, mostrando a tabuada de um número que o usuário escolher, só que agora # utilizando o laço for. num = int(input('Digite um número: ')) for n in range(1, 11): print(f'{num} x {n} = {num * n}')
sum = 0 for i in range(1,101): if i%2==0: sum+=i print(i,end=' ') else : continue print(f'\n1~100 사이의 짝수의 총합: {sum}')
def elbow_method(data, clusterer, max_k): """Elbow method function. Takes dataset, "Reason" clusterer class and returns the optimum number of clusters in range of 1 to max_k. Args: data (pandas.DataFrame or list of dict): Data to cluster. clusterer (class): "Reason" clusterer. max_k (int): Maximum k to analysis. Returns: k (int): Optimum number of clusters. """ k = None score = _get_score(data, clusterer, 1) for i in range(2, max_k + 1): current_score = _get_score(data, clusterer, i) if (score - current_score) < (score / 8): k = i - 1 break score = current_score if k is None: return max_k return k def _get_score(data, clusterer, k): model = clusterer() model.fit(data, k=k, verbose=0) return model.inertia()
def main(): def square(n): return n * n if __name__ == '__main__': main()
class Response: def __init__(self, content, private=False, file=False): self.content = content self.private = private self.file = file
def knapsackLight(value1, weight1, value2, weight2, maxW): if weight1 + weight2 <= maxW: return value1 + value2 if weight1 <= maxW and (weight2 > maxW or value1 >= value2): return value1 if weight2 <= maxW and (weight1 > maxW or value2 >= value1): return value2 return 0
# # PySNMP MIB module A3COM0074-SMA-VLAN-SUPPORT (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/A3COM0074-SMA-VLAN-SUPPORT # Produced by pysmi-0.3.4 at Wed May 1 11:09:00 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15) # smaVlanSupport, = mibBuilder.importSymbols("A3COM0004-GENERIC", "smaVlanSupport") OctetString, ObjectIdentifier, Integer = mibBuilder.importSymbols("ASN1", "OctetString", "ObjectIdentifier", "Integer") NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") ConstraintsUnion, SingleValueConstraint, ValueRangeConstraint, ValueSizeConstraint, ConstraintsIntersection = mibBuilder.importSymbols("ASN1-REFINEMENT", "ConstraintsUnion", "SingleValueConstraint", "ValueRangeConstraint", "ValueSizeConstraint", "ConstraintsIntersection") a3ComVlanIfIndex, = mibBuilder.importSymbols("GENERIC-3COM-VLAN-MIB-1-0-7", "a3ComVlanIfIndex") ModuleCompliance, NotificationGroup = mibBuilder.importSymbols("SNMPv2-CONF", "ModuleCompliance", "NotificationGroup") NotificationType, Counter32, Integer32, ObjectIdentity, Counter64, IpAddress, MibIdentifier, iso, ModuleIdentity, Unsigned32, Gauge32, TimeTicks, MibScalar, MibTable, MibTableRow, MibTableColumn, Bits = mibBuilder.importSymbols("SNMPv2-SMI", "NotificationType", "Counter32", "Integer32", "ObjectIdentity", "Counter64", "IpAddress", "MibIdentifier", "iso", "ModuleIdentity", "Unsigned32", "Gauge32", "TimeTicks", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "Bits") TextualConvention, DisplayString = mibBuilder.importSymbols("SNMPv2-TC", "TextualConvention", "DisplayString") a3ComVlanPrivateIfTable = MibTable((1, 3, 6, 1, 4, 1, 43, 10, 35, 1), ) if mibBuilder.loadTexts: a3ComVlanPrivateIfTable.setStatus('mandatory') if mibBuilder.loadTexts: a3ComVlanPrivateIfTable.setDescription('Private VLAN information table for internal agent operations.') a3ComVlanPrivateIfEntry = MibTableRow((1, 3, 6, 1, 4, 1, 43, 10, 35, 1, 1), ).setIndexNames((0, "GENERIC-3COM-VLAN-MIB-1-0-7", "a3ComVlanIfIndex")) if mibBuilder.loadTexts: a3ComVlanPrivateIfEntry.setStatus('mandatory') if mibBuilder.loadTexts: a3ComVlanPrivateIfEntry.setDescription('An individual VLAN interface entry. When an NMS wishes to create a new entry in this table, it must obtain a non-zero index from the a3ComNextAvailableVirtIfIndex object. Row creation in this table will fail if the chosen index value does not match the current value returned from the a3ComNextAvailableVirtIfIndex object.') a3ComVlanCreateType = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 10, 35, 1, 1, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("automatic", 1), ("dynamic", 2), ("manual", 3)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: a3ComVlanCreateType.setStatus('mandatory') if mibBuilder.loadTexts: a3ComVlanCreateType.setDescription('The reason this Vlan has been created. The possible values are: automatic (1) - This VLAN was created on this unit due to replication across a stack of units. dynamic (2) - VLAN created internally by some automatic mechanism, for example GVRP. manual (3) - VLAN created by some external management application. NOTE - This MIB object may only be set by the agent. It is illegal and serves no purpose for this object to be set for some other application.') a3ComVlanMembers = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 10, 35, 1, 1, 2), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: a3ComVlanMembers.setStatus('mandatory') if mibBuilder.loadTexts: a3ComVlanMembers.setDescription('Total number of members of this VLAN across the entire stack. If the value of this MIB object is zero then the VLAN is not currently in use on any device in the stack.') mibBuilder.exportSymbols("A3COM0074-SMA-VLAN-SUPPORT", a3ComVlanPrivateIfEntry=a3ComVlanPrivateIfEntry, a3ComVlanCreateType=a3ComVlanCreateType, a3ComVlanMembers=a3ComVlanMembers, a3ComVlanPrivateIfTable=a3ComVlanPrivateIfTable)
def countConstruct(target, word_bank, memo = None): ''' input: target- String word_bank- array of Strings output: number of ways that the target can be constructed by concatenating elements fo the word_bank array. ''' if memo is None: memo = {} if target in memo: return memo[target] if target == '': return 1 totalCount = 0 for word in word_bank: if target.startswith(word): suffix = target[len(word):] numWaysForRest = countConstruct(suffix, word_bank, memo) totalCount += numWaysForRest memo[target] = totalCount return totalCount print(countConstruct("abcdef", ["ab","abc","cd","def","abcd"])) print(countConstruct("purple",["purp","p","ur","le","purpl"])) print(countConstruct("skateboard", ["bo","rd","ate","t","ska","sk","boar"])) print(countConstruct("enterapotentpot",["a","p","ent","enter","ot","o","t"])) print(countConstruct("eeeeeeeeeeeeeeeeeeeeeeeeeef",[ "e", "ee", "eee", "eeee", "eeeee", "eeeeee"]))
# scenario of runs for MC covering 2012 with three eras, as proposed by ECAL/H2g for 2013 re-digi campaign # for reference see: https://indico.cern.ch/conferenceDisplay.py?confId=243497 runProbabilityDistribution=[(194533,5.3),(200519,7.0),(206859,7.3)]