text
stringlengths
0
828
fajr_time = zuhr_time - time_at_sun_angle(angle=parameters['fajr_angle'])
#
# Most methods define Isha as a certain angle the sun has to be below
# the horizon, but some methods define it as a certain number of minutes
# after Maghrib
#
if parameters.get('isha_delay', None):
isha_time = maghrib_time + parameters['isha_delay']
else:
isha_time = (
zuhr_time +
time_at_sun_angle(angle=parameters['isha_angle'])
)
#
# Default to standard Asr method if not specified
#
asr_multiplier = parameters.get('asr_multiplier', ASR_STANDARD)
asr_time = zuhr_time + time_at_shadow_length(
day=day, latitude=latitude, multiplier=asr_multiplier
)
offset = timedelta(minutes=60 * timezone_offset)
return {
'fajr': floating_point_to_datetime(day, fajr_time) + offset,
'zuhr': floating_point_to_datetime(day, zuhr_time) + offset,
'shuruq': floating_point_to_datetime(day, shuruq_time) + offset,
'asr': floating_point_to_datetime(day, asr_time) + offset,
'maghrib': floating_point_to_datetime(day, maghrib_time) + offset,
'isha': floating_point_to_datetime(day, isha_time) + offset,
}"
4054,"def _make_fn_text(self):
""""""Makes filename text""""""
if not self._f:
text = ""(not loaded)""
elif self._f.filename:
text = os.path.relpath(self._f.filename, ""."")
else:
text = ""(filename not set)""
return text"
4055,"def format_BLB():
""""""Sets some formatting options in Matplotlib.""""""
rc(""figure"", facecolor=""white"")
rc('font', family = 'serif', size=10) #, serif = 'cmr10')
rc('xtick', labelsize=10)
rc('ytick', labelsize=10)
rc('axes', linewidth=1)
rc('xtick.major', size=4, width=1)
rc('xtick.minor', size=2, width=1)
rc('ytick.major', size=4, width=1)
rc('ytick.minor', size=2, width=1)"
4056,"def set_figure_size(fig, width, height):
""""""Sets MatPlotLib figure width and height in pixels
Reference: https://github.com/matplotlib/matplotlib/issues/2305/
""""""
dpi = float(fig.get_dpi())
fig.set_size_inches(float(width) / dpi, float(height) / dpi)"
4057,"def create_zip_codes_geo_zone(cls, zip_codes_geo_zone, **kwargs):
""""""Create ZipCodesGeoZone
Create a new ZipCodesGeoZone
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async=True
>>> thread = api.create_zip_codes_geo_zone(zip_codes_geo_zone, async=True)
>>> result = thread.get()
:param async bool
:param ZipCodesGeoZone zip_codes_geo_zone: Attributes of zipCodesGeoZone to create (required)
:return: ZipCodesGeoZone
If the method is called asynchronously,
returns the request thread.
""""""
kwargs['_return_http_data_only'] = True
if kwargs.get('async'):
return cls._create_zip_codes_geo_zone_with_http_info(zip_codes_geo_zone, **kwargs)
else:
(data) = cls._create_zip_codes_geo_zone_with_http_info(zip_codes_geo_zone, **kwargs)
return data"
4058,"def delete_zip_codes_geo_zone_by_id(cls, zip_codes_geo_zone_id, **kwargs):
""""""Delete ZipCodesGeoZone
Delete an instance of ZipCodesGeoZone by its ID.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async=True
>>> thread = api.delete_zip_codes_geo_zone_by_id(zip_codes_geo_zone_id, async=True)
>>> result = thread.get()
:param async bool
:param str zip_codes_geo_zone_id: ID of zipCodesGeoZone to delete. (required)
:return: None
If the method is called asynchronously,
returns the request thread.
""""""
kwargs['_return_http_data_only'] = True
if kwargs.get('async'):
return cls._delete_zip_codes_geo_zone_by_id_with_http_info(zip_codes_geo_zone_id, **kwargs)
else:
(data) = cls._delete_zip_codes_geo_zone_by_id_with_http_info(zip_codes_geo_zone_id, **kwargs)