code
stringlengths
3
6.57k
len(b)
TestEndOther(unittest.TestCase)
test_case_00(self)
self.assertEqual(end_other('Hiabc', 'abc')
test_case_01(self)
self.assertEqual(end_other('AbC', 'HiaBc')
test_case_02(self)
self.assertEqual(end_other('abc', 'abXabc')
test_case_03(self)
self.assertEqual(end_other('Hiabc', 'abcd')
test_case_04(self)
self.assertEqual(end_other('Hiabc', 'bc')
test_case_05(self)
self.assertEqual(end_other('Hiabcx', 'bc')
test_case_06(self)
self.assertEqual(end_other('abc', 'abc')
test_case_07(self)
self.assertEqual(end_other('xyz', '12xyz')
test_case_08(self)
self.assertEqual(end_other('yz', '12xz')
test_case_09(self)
self.assertEqual(end_other('Z', '12xz')
test_case_10(self)
self.assertEqual(end_other('12', '12')
test_case_11(self)
self.assertEqual(end_other('abcXYZ', 'abcDEF')
test_case_12(self)
self.assertEqual(end_other('ab', 'ab12')
test_case_13(self)
self.assertEqual(end_other('ab', '12ab')
unittest.main()
Copyright (c)
TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
load_dotenv()
os.environ.get('SECRET_KEY')
os.environ.get("MAIL_USERNAME")
os.environ.get("MAIL_PASSWORD")
ProdConfig(Config)
os.environ.get('DATABASE_URL')
DevConfig(Config)
_get_env_var_with_default(repository_ctx, env_var)
fail("Environment variable '%s' was not set." % env_var)
_get_tf_conf(repository_ctx)
_get_env_var_with_default(repository_ctx, _TF_INCLUDE_PATH)
_get_env_var_with_default(repository_ctx, _TF_LIB_PATH)
_tensorflow_autoconf_impl(repository_ctx)
_get_tf_conf(repository_ctx)
print("Using %s=%s" % (_TF_INCLUDE_PATH, tf_conf.include_path)
print("Using %s=%s" % (_TF_LIB_PATH, tf_conf.lib_path)
repository_ctx.symlink(tf_conf.include_path, 'include')
repository_ctx.symlink(tf_conf.lib_path, 'lib')
repository_ctx.template('BUILD', Label("//third_party/tensorflow:tensorflow.BUILD")
path.expanduser("~")
path.join(home_dir, ".netmiko.yml")
open(filename)
yaml.safe_load(f)
ConnectHandler(**cisco3)
print()
print(net_connect.find_prompt()
print()
Trade(base.Base)
logging.getLogger(__name__)
vol.Optional(CONF_CALENDARS, default=[])
vol.Required(CONF_URL)
vol.Url()
vol.Required(CONF_NAME)
vol.Optional(CONF_USERNAME, default="")
vol.Optional(CONF_PASSWORD, default="")
vol.Optional(CONF_PARSER, default="icalevents")
timedelta(minutes=15)
timedelta(minutes=10)
setup_platform(hass, config, add_entities, _=None)
_LOGGER.debug("Setting up ics calendars")
config.get(CONF_CALENDARS)
calendar.get(CONF_NAME)
calendar.get(CONF_URL)
calendar.get(CONF_INCLUDE_ALL_DAY)
calendar.get(CONF_USERNAME)
calendar.get(CONF_PASSWORD)
calendar.get(CONF_PARSER)
format(device_data[CONF_NAME])
generate_entity_id(ENTITY_ID_FORMAT, device_id, hass=hass)
calendar_devices.append(ICSCalendarEventDevice(entity_id, device_data)
add_entities(calendar_devices)
ICSCalendarEventDevice(CalendarEventDevice)
__init__(self, entity_id, device_data)
_LOGGER.debug("Initializing calendar: %s", device_data[CONF_NAME])
ICSCalendarData(device_data)
device_state_attributes(self)
event(self)
name(self)
async_get_events(self, hass, start_date, end_date)
or (datetime.now()
datetime.now()
update(self)
self.data.update()
copy.deepcopy(self.data.event)
calculate_offset(event, OFFSET)
is_offset_reached(event)
__init__(self, device_data)