🏳️⚧️
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class Solution: | |
| # @param A : list of list of integers | |
| # @return an integer | |
| def edge(self, A, x, first=None): | |
| left = first or 0 | |
| right = len(A)-1 | |
| found = False | |
| if x < A[0]: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import requests | |
| import logging | |
| import os.path | |
| class Graphite(object): | |
| def __init__(self, url): | |
| self.url = url | |
| self.session = requests.Session() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package main | |
| import ( | |
| "fmt" | |
| "flag" | |
| "strings" | |
| "os" | |
| "strconv" | |
| "log" | |
| "math/rand" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| __author__ = 'yottatsa' | |
| import uuid | |
| import random | |
| MEASUREMENTS = 'Memory_used;Memory_free;Memory_cached;Net_tx;Net_rx;Net_recv;Net_send;Disk_read;Disk_write;CPU_user;CPU_system;CPU_iowait'.lower().split( | |
| ';') | |
| def host(i): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class ConfigOpts(collections.Mapping): | |
| """Config options which may be set on the command line or in config files. | |
| ConfigOpts is a configuration option manager with APIs for registering | |
| option schemas, grouping options, parsing option values and retrieving | |
| the values of options. | |
| """ | |
| def __init__(self): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --- router_info.py 2015-10-12 15:56:54.571650341 +0000 | |
| +++ /usr/lib/python2.7/dist-packages/neutron/agent/l3/router_info.py 2015-10-12 15:28:24.090577334 +0000 | |
| @@ -361,7 +361,9 @@ | |
| LOG.debug('Spawning radvd daemon in router device: %s', self.router_id) | |
| if not internal_ports: | |
| internal_ports = self.internal_ports | |
| - self.radvd.enable(internal_ports) | |
| + ex_gw_port = self.get_ex_gw_port() | |
| + ext_interface = self.get_external_device_interface_name(ex_gw_port) | |
| + self.radvd.enable(internal_ports, ext_interface) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def validate_token(self, token): | |
| """Validates a Fernet token and returns the payload attributes.""" | |
| # Convert v2 unicode token to a string | |
| if not isinstance(token, six.binary_type): | |
| token = token.encode('ascii') | |
| #to | |
| def validate_token(self, token): | |
| """Validates a Fernet token and returns the payload attributes.""" |
NewerOlder