R/ft.R
, R/modern.r
, R/roboto-condensed.r
theme_ipsum_rc.Rd
You should import_roboto_condensed first and also install the fonts on your system before trying to use this theme.
theme_ft_rc(base_family = "Roboto Condensed", base_size = 11.5, plot_title_family = base_family, plot_title_size = 18, plot_title_face = "bold", plot_title_margin = 10, subtitle_family = if (.Platform$OS.type == "windows") "Roboto Condensed" else "Roboto Condensed Light", subtitle_size = 13, subtitle_face = "plain", subtitle_margin = 15, strip_text_family = base_family, strip_text_size = 12, strip_text_face = "plain", caption_family = if (.Platform$OS.type == "windows") "Roboto Condensed" else "Roboto Condensed Light", caption_size = 9, caption_face = "plain", caption_margin = 10, axis_text_size = base_size, axis_title_family = base_family, axis_title_size = 9, axis_title_face = "plain", axis_title_just = "rt", plot_margin = margin(30, 30, 30, 30), grid = TRUE, axis = FALSE, ticks = FALSE) theme_modern_rc(base_family = "Roboto Condensed", base_size = 11.5, plot_title_family = base_family, plot_title_size = 18, plot_title_face = "bold", plot_title_margin = 10, subtitle_family = if (.Platform$OS.type == "windows") "Roboto Condensed" else "Roboto Condensed Light", subtitle_size = 13, subtitle_face = "plain", subtitle_margin = 15, strip_text_family = base_family, strip_text_size = 12, strip_text_face = "plain", caption_family = if (.Platform$OS.type == "windows") "Roboto Condensed" else "Roboto Condensed Light", caption_size = 9, caption_face = "plain", caption_margin = 10, axis_text_size = base_size, axis_title_family = base_family, axis_title_size = 9, axis_title_face = "plain", axis_title_just = "rt", plot_margin = margin(30, 30, 30, 30), grid = TRUE, axis = FALSE, ticks = FALSE) theme_ipsum_rc(base_family = "Roboto Condensed", base_size = 11.5, plot_title_family = base_family, plot_title_size = 18, plot_title_face = "bold", plot_title_margin = 10, subtitle_family = if (.Platform$OS.type == "windows") "Roboto Condensed" else "Roboto Condensed Light", subtitle_size = 13, subtitle_face = "plain", subtitle_margin = 15, strip_text_family = base_family, strip_text_size = 12, strip_text_face = "plain", caption_family = if (.Platform$OS.type == "windows") "Roboto Condensed" else "Roboto Condensed Light", caption_size = 9, caption_face = "plain", caption_margin = 10, axis_text_size = base_size, axis_title_family = base_family, axis_title_size = 9, axis_title_face = "plain", axis_title_just = "rt", plot_margin = margin(30, 30, 30, 30), grid_col = "#cccccc", grid = TRUE, axis_col = "#cccccc", axis = FALSE, ticks = FALSE)
| base_family, base_size | base font family and size |
|---|---|
| plot_title_family, plot_title_face, plot_title_size, plot_title_margin | plot tilte family, face, size and margin |
| subtitle_family, subtitle_face, subtitle_size | plot subtitle family, face and size |
| subtitle_margin | plot subtitle margin bottom (single numeric value) |
| strip_text_family, strip_text_face, strip_text_size | facet label font family, face and size |
| caption_family, caption_face, caption_size, caption_margin | plot caption family, face, size and margin |
| axis_text_size | font size of axis text |
| axis_title_family, axis_title_face, axis_title_size | axis title font family, face and size |
| axis_title_just | axis title font justificationk one of |
| plot_margin | plot margin (specify with ggplot2::margin) |
| grid | panel grid ( |
| axis | add x or y axes? |
| ticks | ticks if |
| grid_col | grid color |
| axis_col | axis color |
There is an option hrbrthemes.loadfonts
which -- if set to TRUE
-- will
call extrafont::loadfonts()
to register non-core fonts with R PDF & PostScript
devices. If you are running under Windows, the package calls the same function
to register non-core fonts with the Windows graphics device.
It's free, has tolerable kerning pairs and multiple weights. It's also different than Arial Narrow and the fonts most folks use in ggplot2 charts.
# NOT RUN { library(ggplot2) library(dplyr) # seminal scatterplot ggplot(mtcars, aes(mpg, wt)) + geom_point() + labs(x="Fuel effiiency (mpg)", y="Weight (tons)", title="Seminal ggplot2 scatterplot example", subtitle="A plot that is only useful for demonstration purposes", caption="Brought to you by the letter 'g'") + theme_ipsum_rc() # seminal bar chart # note: make this font_rc on Windows update_geom_font_defaults(family=font_rc_light) count(mpg, class) %>% ggplot(aes(class, n)) + geom_col() + geom_text(aes(label=n), nudge_y=3) + labs(x="Fuel effiiency (mpg)", y="Weight (tons)", title="Seminal ggplot2 bar chart example", subtitle="A plot that is only useful for demonstration purposes", caption="Brought to you by the letter 'g'") + theme_ipsum_rc(grid="Y") + theme(axis.text.y=element_blank()) # }


---
layout: raw_sb
---
{{> sb_subemail_header}}
{{{{raw}}}}{% block body %}{{{{/raw}}}}
{{> sb_user}}
|
{{{{raw}}}}{% trans 'We just wanted to let you know that the following items have been dispatched' %}{{{{/raw}}}}
|
{{> sb_order_no}}
{{> sb_product}}
{{> sb_delivery_address}}
{{> sb_order_foot}}
|
{{{{raw}}}}{% endblock %}{{{{/raw}}}}


{% trans "Sign Up" %}
{% blocktrans with provider_name=account.get_provider.name %}You are about to use your {{provider_name}} account to login to Rapid Results. As a final step, please complete the following form:{% endblocktrans %}
{% extends "socialaccount/base.html" %} {% load i18n %} {% block head_title %}{% trans "Signup" %}{% endblock %} {% block content %} {%comment%}
{% blocktrans with provider_name=account.get_provider.name site_name=site.name %}You are about to use your {{provider_name}} account to login to Rapid Results. As a final step, please complete the following form:{% endblocktrans %}
{% endcomment %}{% blocktrans with provider_name=account.get_provider.name %}You are about to use your {{provider_name}} account to login to Rapid Results. As a final step, please complete the following form:{% endblocktrans %}


Construction - For Building Company
Educomp - Multipurpose Education Template
Produk - Responsive Showcase Landing Page
Light Blue - HTML5, Angular, React Admin
Bemat - Material Design Admin Template
LawBiz - Lawyer Attorney Html Template
Color Admin - Admin Template + Front End
Mash Able - Bootstrap 4 + Angular 4 Admin
Trust - Modern Lawyer Attorney Theme
Blankon - Fullpack Admin Theme
AppStrap - Multipurpose Bootstrap 4 Theme
Dee Admin Template
Guru Able - Bootstrap 4 + Angular 4 Admin
Velonic - Bootstrap 4 Admin & Frontend
BigBag Store - Elegant Ecommerce Theme
Calypso - MultiPurpose Theme
Minton - Bootstrap 4 Admin + Frontend
Gradient Able - BS4 & Angular 5 Dashboard
REEN - Made for Designers One/Multi Page
Infinite Admin - Responsive App Template
MacBeath - 3 in 1 Admin, Front End, E-Com
TheOne - Landing Page Template
Bodeo - Bootstrap 4 Multipurpose Theme
Monarch - Bootstrap 4 Admin + AngularJS
Canvas Admin - Responsive Admin Theme
Source Admin - Angular JS + HTML Apps
SmartAdmin - Responsive WebApp
Star Travel - Tour Booking Theme + Admin
BeyondAdmin - Responsive Admin App
Previous
Next


城市摄影
City Photographing
-
"Parental love is the greatest.And in the disaster, our soldiers are like our parents, give our boundless love."
-
"It used to be a small town, where people made a living by fishing."
-
"People love this city, and they will make it a better place."
-
"It has developed very fast in the past years,more and more people come here to seek opportunities."
-
"There are many tourist attractions here,lots of people come here for holidays."
-
"Parental love is the greatest.And in the disaster, our soldiers are like our parents, give our boundless love."


Watch only wallets allows you to keep an eye on your cold storage or paper wallet without touching your private key. Easily import your public address, xpub or ypub and watch it from your app without ever touching it.
a x/y/zpub or master public key address can be passed to generate receiving addresses
Monitor any public address that you may have
Generate adresses and QR codes for receiving
Send transactions by signing them offline or with another wallet
Use your wallets with ease on your mobile app while leaving your keys cold. Ability to create, send and receive transactions.
Recommended last generation hardware wallet
Tap on add wallet icon
Go to the option import wallet
Import with text or by QR code


The majority of the chrome.tabs API can be used without declaring any permission. However, the "tabs" permission is required in order to populate the url, title, and favIconUrl properties of Tab.
chrome.tabs
"tabs"
url
title
favIconUrl
Tab


Mask.Wizard Class
Represents a tutorial
Item Index
Methods
getStepPosition
(
-
step
Returns the position of the step passed as argument or (by default) the current step
Parameters:
-
step
ObjectThe step object to get position
hideStep
(
-
callback
Hides the step
Parameters:
-
callback
FunctionA callback function to be called in the ending of the hiding process
isAlreadyWatched
()
Boolean
Checks if the current user already watched this wizard
Returns:
Boolean:
A boolean indicating if the user watched this wizard
isEligible
()
Boolean
Checks if a wizard should be shown in the current context (running each evaluator defined for this wizard)
Returns:
Boolean:
A boolean indicating if this wizard should be available in the current context
next
(
-
callback
Shows the next step of the wizard
Parameters:
-
callback
FunctionA callback function to be called
play
()
Runs the wizard
pollForCheckCompletedStep
()
A Polling function to check if the current step is completed
showStep
(
-
step
-
callback
Shows a specific step
storyLine
()
Sets the storyline for the wizard


| Question | {{ state.question }} |
|---|---|
| Type | {{ state.type }} |
| Choices | [{{ state.choices }}] |
| Tolerance | [{{ state.tolerance }}] |
| Answer | {{ state.answer }} ({{ state.choices[$any(state.answer)] }}) |
| Status | {{ QuestionState[state.status] }} |
| Submission | {{ state.submission }} |


BC_MINISAT_ALL: A Blocking AllSAT Solver
A blocking clause-based AllSAT solver (a blocking solver for short), implemented on top of MiniSat-C v1.14.1, is presented.
Input boolean formula should be in DIMACS CNF format.
For details of DIMACS CNF format and benchmark problems, see SATLIB.
If no option is given, standard mode is selected.
$ tar zxvf bc_minisat_all-1.0.0.tar.gz
$ cd bc_minisat_all-1.0.0
$ make [options]
list of options
s standard: debug information used by debugger is generated at compilation time, and detailed solver status is reported at runtime.
p profile: in addition to standard setting, profile information used by gprof is generated at compilation time and several tests are performed at runtime.
d debug: in addition to standard setting, several tests are performed at runtime and no optimization is applied.
r release: release version, compiled with dynamic link
rs static: release version, compiled with static link
clean executable files, object files, etc are removed.
Program behavior can be controlled by defining or not defining the following macros in
Makefile
.
-
SIMPLIFY: Simplification of assignments is enabled. If this is not defined, simplification is not performed, and blocking clauses consisting of decision literals are used instead.
-
NONDISJOINT: Nondisjoint partial assignments are computed (see Yu et al. 2014). If this is not defined, computed partial assignments are pairwise disjoint: in other words, different partial assignments do not share common total assignments. This macro makes sense only when SIMPLIFICATION is defined too.
-
CONTINUE: Search is continued at the point where a solutions is found. If this is not defined, solver starts from scratch.
-
FIXEDORDER: Variable selection heuristic is disabled and variables are selected in increasing order of variable indices. If this is not defined, variable selection heuristic is used. This functionality is added to evaluate efficiency of variable selection heuristics.
-
GMP: GNU MP bignum library is used to count solutions.
If an output file is specified, all satisfying assignments to a CNF are generated in DIMACS CNF format without problem line.
Notice: there may be as many number of assignments as can not be stored in a disk space.
If simplification is performed, computed assingments are partial, which means some variables may not appear.
Usage: ./bc_minisat_all [options] input-file [output-file]
bc_minisat_all is implemented by modifying MiniSat-C_v1.14.1. Please confirm the license file included in this software.
A huge number of assignments may be generated and disk space may be exhausted. To avoid disk overflow, take measure such as using ulimit command.
-
N. Eén, N. Sörensson : MiniSat Page: MiniSat-C_v1.14.1, accessed on 15 Dec. 2014.
-
N. Eén, N. Sörensson : An Extensible SAT-solver, In Proceedings of the 6th international conference of Theory and Applications of Satisfiability Testing, pages 502--518, 2004.
-
Morgado, A. and Marques-Silva, J.: Good learning and implicit model enumeration, In Proceedings of 17th IEEE International Conference on Tools with Artificial Intelligence, 2005. ICTAI 05.
-
Yinlei Yu and Subramanyan, P. and Tsiskaridze, N. and Malik, S.: All-SAT Using Minimal Blocking Clauses, In Proceedings of 27th International Conference on VLSI Design and 2014 13th International Conference on Embedded Systems, 2014, pp.86-91.
-
McMillan, KenL.: Applying SAT Methods in Unbounded Symbolic Model Checking, Computer Aided Verification, LNCS Vol.2404, pp.250-264. 2002.
-
Jin, HoonSang and Han, HyoJung and Somenzi, Fabio: Efficient Conflict Analysis for Finding All Satisfying Assignments of a Boolean Circuit, Tools and Algorithms for the Construction and Analysis of Systems, LNCS Vol.3440, pp.287-300, 2005.
-
Weinan Zhao and Weimin Wu: ASIG: An all-solution SAT solver for CNF formulas, In Proceedings of 11th IEEE International Conference on Computer-Aided Design and Computer Graphics, 2009. CAD/Graphics '09, pp. 508-513, 2009.


MSI
Home
About
facilities
brochure
login
SUBMIT
Error
Sorry there was an error sending your form.
Success! Your Message was Sent Successfully.


pendulum
Installing pendulum
is quite simple:
$ pip install pendulum
or, if you are using poetry:
$ poetry add pendulum
Introduction
Pendulum is a Python package to ease datetimes manipulation.
It provides classes that are drop-in replacements for the native ones (they inherit from them).
Special care has been taken to ensure timezones are handled correctly, and are based on the underlying tzinfo
implementation. For example all comparisons are done in UTC
or in the timezone of the datetime being used.
import pendulum
dt_toronto = pendulum.datetime(2012, 1, 1, tz='America/Toronto')
dt_vancouver = pendulum.datetime(2012, 1, 1, tz='America/Vancouver')
print(dt_vancouver.diff(dt_toronto).in_hours())
#3
The default timezone, except when using the now()
, method will always be UTC
.
Instantiation
There are several different methods available to create a new DateTime
instance.
First there is the main datetime()
helper.
import pendulum
dt = pendulum.datetime(2015, 2, 5)
isinstance(dt, datetime)
#True
dt.timezone.name
#'UTC'
datetime()
sets the time to 00:00:00
if it’s not specified, and the timezone (the tz
keyword argument) to UTC
. It otherwise can be a Timezone
instance or simply a string timezone value.
import pendulum
pendulum.datetime(2015, 2, 5, tz='Europe/Paris')
tz = pendulum.timezone('Europe/Paris')
pendulum.datetime(2015, 2, 5, tz=tz)
Supported strings for timezones are the one provided by the IANA time zone database.
The special local
string is also supported and will return your current timezone.
The tz
argument is keyword-only, unlike in version 1.x
The local()
helper is similar to datetime()
but automatically sets the timezone to the local timezone.
import pendulum
dt = pendulum.local(2015, 2, 5)
print(dt.timezone.name)
#'America/Toronto'
local()
is just an alias for datetime(..., tz='local')
.
There is also the now()
method.
import pendulum
now = pendulum.now()
now_in_london_tz = pendulum.now('Europe/London')
now_in_london_tz.timezone_name
#'Europe/London'
To accompany now()
, a few other static instantiation helpers exist to create known instances. The only thing to really notice here is that today()
, tomorrow()
and yesterday()
, besides behaving as expected, all accept a timezone parameter and each has their time value set to 00:00:00
.
now = pendulum.now()
print(now)
#2016-06-28T16:51:45.978473-05:00
today = pendulum.today()
print(today)
#'2016-06-28T00:00:00-05:00'
tomorrow = pendulum.tomorrow('Europe/London')
print(tomorrow)
#'2016-06-29T00:00:00+01:00'
yesterday = pendulum.yesterday()
print(yesterday)
#'2016-06-27T00:00:00-05:00'
Pendulum enforces timezone aware datetimes, and using them is the preferred and recommended way of using the library, however is you really need a naive DateTime
object, the naive()
helper is there for you.
import pendulum
naive = pendulum.naive(2015, 2, 5)
naive.timezone
#None
The next helper, from_format()
, is similar to the native datetime.strptime()
function but uses custom tokens to create a DateTime
instance.
dt = pendulum.from_format('1975-05-21 22', 'YYYY-MM-DD HH')
print(dt)
#'1975-05-21T22:00:00+00:00'
To see all the available tokens, you can check the Formatter section.
It also accepts a tz
keyword argument to specify the timezone:
dt = pendulum.from_format('1975-05-21 22', 'YYYY-MM-DD HH', tz='Europe/London')
#'1975-05-21T22:00:00+01:00'
The final helper is for working with unix timestamps. from_timestamp()
will create a DateTime
instance equal to the given timestamp and will set the timezone as well or default it to UTC
.
dt = pendulum.from_timestamp(-1)
print(dt)
#'1969-12-31T23:59:59+00:00'
dt = pendulum.from_timestamp(-1, tz='Europe/London')
print(dt)
#'1970-01-01T00:59:59+01:00'
Finally, if you find yourself inheriting a DateTime
instance, you can create a DateTime
instance via the instance()
function.
dt = datetime(2008, 1, 1)
p = pendulum.instance(dt)
print(p)
#'2008-01-01T00:00:00+00:00'
Parsing
The library natively supports the RFC 3339 format, most ISO 8601 formats and some other common formats.
import pendulum
dt = pendulum.parse('1975-05-21T22:00:00')
print(dt)
#'1975-05-21T22:00:00+00:00
# You can pass a tz keyword to specify the timezone
dt = pendulum.parse('1975-05-21T22:00:00', tz='Europe/Paris')
print(dt)
#'1975-05-21T22:00:00+01:00'
# Not ISO 8601 compliant but common
dt = pendulum.parse('1975-05-21 22:00:00')
If you pass a non-standard or more complicated string, it will raise an exception so it is advised to use the from_format()
helper instead.
However, if you want the library to fallback on the dateutil parser, you have to pass strict=False
.
import pendulum
dt = pendulum.parse('31-01-01')
Traceback (most recent call last):
...
#ParserError: Unable to parse string [31-01-01]
dt = pendulum.parse('31-01-01', strict=False)
print(dt)
#'2031-01-01T00:00:00+00:00'
RFC 3339
STRING
OUTPUT
1996-12-19T16:39:57-08:00
1996-12-19T16:39:57-08:00
1990-12-31T23:59:59Z
1990-12-31T23:59:59+00:00
ISO 8601
Datetime
STRING
OUTPUT
20161001T143028+0530
2016-10-01T14:30:28+05:30
20161001T14
2016-10-01T14:00:00+00:00
Date
STRING
OUTPUT
2012
2012-01-01T00:00:00+00:00
2012-05-03
2012-05-03T00:00:00+00:00
20120503
2012-05-03T00:00:00+00:00
2012-05
2012-05-01T00:00:00+00:00
Ordinal day
STRING
OUTPUT
2012-007
2012-01-07T00:00:00+00:00
2012007
2012-01-07T00:00:00+00:00
Week number
STRING
OUTPUT
2012-W05
2012-01-30T00:00:00+00:00
2012W05
2012-01-30T00:00:00+00:00
2012-W05-5
2012-02-03T00:00:00+00:00
2012W055
2012-02-03T00:00:00+00:00
Time
When passing only time information the date will default to today.
STRING
OUTPUT
00:00
2016-12-17T00:00:00+00:00
12:04:23
2016-12-17T12:04:23+00:00
120423
2016-12-17T12:04:23+00:00
12:04:23.45
2016-12-17T12:04:23.450000+00:00
Intervals
STRING
OUTPUT
2007-03-01T13:00:00Z/2008-05-11T15:30:00Z
2007-03-01T13:00:00+00:00 -> 2008-05-11T15:30:00+00:00
2008-05-11T15:30:00Z/P1Y2M10DT2H30M
2008-05-11T15:30:00+00:00 -> 2009-07-21T18:00:00+00:00
P1Y2M10DT2H30M/2008-05-11T15:30:00Z
2007-03-01T13:00:00+00:00 -> 2008-05-11T15:30:00+00:00
You can pass the exact
keyword argument to parse()
to get the exact type that the string represents:
import pendulum
pendulum.parse(‘2012-05-03’, exact=True) Date(2012, 05, 03)
pendulum.parse(‘12:04:23’, exact=True) Time(12, 04, 23)
Localization
Localization occurs when using the format()
method which accepts a locale
keyword.
import pendulum
dt = pendulum.datetime(1975, 5, 21)
dt.format('dddd DD MMMM YYYY', locale='de')
#'Mittwoch 21 Mai 1975'
dt.format('dddd DD MMMM YYYY')
#'Wednesday 21 May 1975'
diff_for_humans()
is also localized, you can set the locale by using pendulum.set_locale()
.
import pendulum
pendulum.set_locale('de')
pendulum.now().add(years=1).diff_for_humans()
#'in 1 Jahr'
pendulum.set_locale('en')
However, you might not want to set the locale globally. The diff_for_humans()
method accept a locale
keyword argument to use a locale for a specific call.
pendulum.set_locale('de')
dt = pendulum.now().add(years=1)
dt.diff_for_humans(locale='fr')
#'dans 1 an'
Attributes and Properties
Pendulum gives access to more attributes and properties than the default datetime
class.
import pendulum
dt = pendulum.parse('2012-09-05T23:26:11.123789')
# These properties specifically return integers
```py
dt.year
2012
dt.month
9
dt.day
5
dt.hour
23
dt.minute
26
dt.second
11
dt.microsecond
123789
dt.day_of_week
3
dt.day_of_year
248
dt.week_of_month
1
dt.week_of_year
36
dt.days_in_month
30
dt.timestamp()
1346887571.123789
dt.float_timestamp
1346887571.123789
dt.int_timestamp
1346887571
pendulum.datetime(1975, 5, 21).age
41 # calculated vs now in the same tz
dt.quarter
3
# Returns an int of seconds difference from UTC (+/- sign included)
pendulum.from_timestamp(0).offset
0
pendulum.from_timestamp(0, 'America/Toronto').offset
-18000
# Returns a float of hours difference from UTC (+/- sign included)
pendulum.from_timestamp(0, 'America/Toronto').offset_hours
-5.0
pendulum.from_timestamp(0, 'Australia/Adelaide').offset_hours
9.5
# Gets the timezone instance
pendulum.now().timezone
pendulum.now().tz
# Gets the timezone name
pendulum.now().timezone_name
# Indicates if daylight savings time is on
dt = pendulum.datetime(2012, 1, 1, tz='America/Toronto')
dt.is_dst()
False
dt = pendulum.datetime(2012, 9, 1, tz='America/Toronto')
dt.is_dst()
True
# Indicates if the instance is in the same timezone as the local timezone
pendulum.now().is_local()
True
pendulum.now('Europe/London').is_local()
False
# Indicates if the instance is in the UTC timezone
pendulum.now().is_utc()
False
pendulum.now('Europe/London').is_local()
False
pendulum.now('UTC').is_utc()
True
Fluent helpers
Pendulum provides helpers that returns a new instance with some attributes modified compared to the original instance. However, none of these helpers, with the exception of explicitely setting the timezone, will change the timezone of the instance. Specifically, setting the timestamp will not set the corresponding timezone to UTC.
import pendulum
dt = pendulum.now()
dt.set(year=1975, month=5, day=21).to_datetime_string()
'1975-05-21 13:45:18'
dt.set(hour=22, minute=32, second=5).to_datetime_string()
'2016-11-16 22:32:05'
You can also use the `on()` and `at()` methods to change the date and the time respectively
dt.on(1975, 5, 21).at(22, 32, 5).to_datetime_string()
'1975-05-21 22:32:05'
dt.at(10).to_datetime_string()
'2016-11-16 10:00:00'
dt.at(10, 30).to_datetime_string()
'2016-11-16 10:30:00'
You can also modify the timezone.
dt.set(tz='Europe/London')
Setting the timezone just modify the timezone information without making any conversion while in_timezone()
(or in_tz()
) converts the time in the appropriate timezone.
import pendulum
dt = pendulum.datetime(2013, 3, 31, 2, 30)
print(dt)
'2013-03-31T02:30:00+00:00'
dt = dt.set(tz='Europe/Paris')
print(dt)
'2013-03-31T03:30:00+02:00'
dt = dt.in_tz('Europe/Paris')
print(dt)
'2013-03-31T04:30:00+02:00'
dt = dt.set(tz='Europe/Paris').set(tz='UTC')
print(dt)
'2013-03-31T03:30:00+00:00'
dt = dt.in_tz('Europe/Paris').in_tz('UTC')
print(dt)
'2013-03-31T02:30:00+00:00'
String formatting
The __str__
magic method is defined which allows DateTime
instances to be printed as a pretty date string when used in a string context.
The default string representation is the same as the one returned by the isoformat()
method.
import pendulum
dt = pendulum.datetime(1975, 12, 25, 14, 15, 16)
print(dt)
'1975-12-25T14:15:16+00:00'
dt.to_date_string()
'1975-12-25'
dt.to_formatted_date_string()
'Dec 25, 1975'
dt.to_time_string()
'14:15:16'
dt.to_datetime_string()
'1975-12-25 14:15:16'
dt.to_day_datetime_string()
'Thu, Dec 25, 1975 2:15 PM'
# You can also use the format() method
dt.format('dddd Do [of] MMMM YYYY HH:mm:ss A')
'Thursday 25th of December 1975 02:15:16 PM'
# Of course, the strftime method is still available
dt.strftime('%A %-d%t of %B %Y %I:%M:%S %p')
'Thursday 25th of December 1975 02:15:16 PM'
For localization support see the Localization section.
Common Formats
The following are methods to display a DateTime
instance as a common format:
import pendulum
dt = pendulum.now()
dt.to_atom_string()
'1975-12-25T14:15:16-05:00'
dt.to_cookie_string()
'Thursday, 25-Dec-1975 14:15:16 EST'
dt.to_iso8601_string()
'1975-12-25T14:15:16-0500'
dt.to_rfc822_string()
'Thu, 25 Dec 75 14:15:16 -0500'
dt.to_rfc850_string()
'Thursday, 25-Dec-75 14:15:16 EST'
dt.to_rfc1036_string()
'Thu, 25 Dec 75 14:15:16 -0500'
dt.to_rfc1123_string()
'Thu, 25 Dec 1975 14:15:16 -0500'
dt.to_rfc2822_string()
'Thu, 25 Dec 1975 14:15:16 -0500'
dt.to_rfc3339_string()
'1975-12-25T14:15:16-05:00'
dt.to_rss_string()
'Thu, 25 Dec 1975 14:15:16 -0500'
dt.to_w3c_string()
'1975-12-25T14:15:16-05:00'
Formatter
Pendulum uses its own formatter when using the format()
method.
This format is more intuitive to use than the one used with strftime()
and supports more directives.
import pendulum
dt = pendulum.datetime(1975, 12, 25, 14, 15, 16)
dt.format('YYYY-MM-DD HH:mm:ss')
'1975-12-25 14:15:16'
Tokens
The following tokens are currently supported:
TOKEN
OUTPUT
YEAR
YYYY
2000, 2001, 2002 … 2012, 2013
YY
00, 01, 02 … 12, 13
QUARTER
Q
1 2 3 4
Qo
1st 2nd 3rd 4th
MONTH
MMMM
January, February, March …
MMM
Jan, Feb, Mar …
MM
01, 02, 03 … 11, 12
M
1, 2, 3 … 11, 12
Mo
1st 2nd … 11th 12th
DAY OF YEAR
DDDD
001, 002, 003 … 364, 365
DDD
1, 2, 3 … 4, 5
DAY OF MONTH
DD
01, 02, 03 … 30, 31
D
1, 2, 3 … 30, 31
Do
1st, 2nd, 3rd … 30th, 31st
DAY OF WEEK
dddd
Monday, Tuesday, Wednesday …
ddd
Mon, Tue, Wed …
dd
Mo, Tu, We …
d
0, 1, 2 … 6
DAYS OF ISO WEEK
E
1, 2, 3 … 7
HOUR
HH
00, 01, 02 … 23, 24
H
0, 1, 2 … 23, 24
hh
01, 02, 03 … 11, 12
h
1, 2, 3 … 11, 12
MINUTE
mm
00, 01, 02 … 58, 59
m
0, 1, 2 … 58, 59
SECOND
ss
00, 01, 02 … 58, 59
s
0, 1, 2 … 58, 59
FRACTIONAL SECOND
S
0 1 … 8 9
SS
00, 01, 02 … 98, 99
SSS
000 001 … 998 999
SSSS …
000[0..] 001[0..] … 998[0..] 999[0..]
SSSSSS
AM / PM
A
AM, PM
TIMEZONE
Z
-07:00, -06:00 … +06:00, +07:00
ZZ
-0700, -0600 … +0600, +0700
z
Asia/Baku, Europe/Warsaw, GMT …
zz
EST CST … MST PST
SECONDS TIMESTAMP
X
1381685817,<PHONE_NUMBER>.123
MICROSECONDS TIMESTAMP
x
1234567890123
Localized Formats
Because preferred formatting differs based on locale, there are a few tokens that can be used to format an instance based on its locale.
TIME
LT
8:30 PM
TIME WITH SECONDS
LTS
8:30:25 PM
MONTH NUMERAL, DAY OF MONTH, YEAR
L
09/04/1986
MONTH NAME, DAY OF MONTH, YEAR
LL
September 4 1986
MONTH NAME, DAY OF MONTH, YEAR, TIME
LLL
September 4 1986 8:30 PM
MONTH NAME, DAY OF MONTH, DAY OF WEEK, YEAR, TIME
LLLL
Thursday, September 4 1986 8:30 PM
Escaping Characters
To escape characters in format strings, you can wrap the characters in square brackets.
import pendulum
dt = pendulum.now() dt.format('[today] dddd’, formatter='alternative’) ‘today Sunday’
Comparison
Simple comparison is offered up via the basic operators. Remember that the comparison is done in the UTC timezone so things aren’t always as they seem.
import pendulum
first = pendulum.datetime(2012, 9, 5, 23, 26, 11, 0, tz='America/Toronto')
second = pendulum.datetime(2012, 9, 5, 20, 26, 11, 0, tz='America/Vancouver')
first.to_datetime_string()
'2012-09-05 23:26:11'
first.timezone_name
'America/Toronto'
second.to_datetime_string()
'2012-09-05 20:26:11'
second.timezone_name
'America/Vancouver'
first == second
True
first != second
False
first > second
False
first >= second
True
first < second
False
first <= second
True
first = first.on(2012, 1, 1).at(0, 0, 0)
second = second.on(2012, 1, 1).at(0, 0, 0)
# tz is still America/Vancouver for second
first == second
False
first != second
True
first > second
False
first >= second
False
first < second
True
first <= second
True
To handle the most used cases there are some simple helper functions. For the methods that compare to now()
(ex. is_today()
) in some manner the now()
is created in the same timezone as the instance.
import pendulum
dt = pendulum.now()
dt.is_past()
dt.is_leap_year()
born = pendulum.datetime(1987, 4, 23)
not_birthday = pendulum.datetime(2014, 9, 26)
birthday = pendulum.datetime(2014, 2, 23)
past_birthday = pendulum.now().subtract(years=50)
born.is_birthday(not_birthday)
False
born.is_birthday(birthday)
True
past_birthday.is_birthday()
# Compares to now by default
True
# Addition and Subtraction[](https://pendulum.eustace.io/docs/#addition-and-subtraction "Permanent link")
To easily adding and subtracting time, you can use the add()
and subtract()
methods. Each method returns a new DateTime
instance.
import pendulum
dt = pendulum.datetime(2012, 1, 31)
dt.to_datetime_string()
'2012-01-31 00:00:00'
dt = dt.add(years=5)
'2017-01-31 00:00:00'
dt = dt.add(years=1)
'2018-01-31 00:00:00'
dt = dt.subtract(years=1)
'2017-01-31 00:00:00'
dt = dt.subtract(years=5)
'2012-01-31 00:00:00'
dt = dt.add(months=60)
'2017-01-31 00:00:00'
dt = dt.add(months=1)
'2017-02-28 00:00:00'
dt = dt.subtract(months=1)
'2017-01-28 00:00:00'
dt = dt.subtract(months=60)
'2012-01-28 00:00:00'
dt = dt.add(days=29)
'2012-02-26 00:00:00'
dt = dt.add(days=1)
'2012-02-27 00:00:00'
dt = dt.subtract(days=1)
'2012-02-26 00:00:00'
dt = dt.subtract(days=29)
'2012-01-28 00:00:00'
dt = dt.add(weeks=3)
'2012-02-18 00:00:00'
dt = dt.add(weeks=1)
'2012-02-25 00:00:00'
dt = dt.subtract(weeks=1)
'2012-02-18 00:00:00'
dt = dt.subtract(weeks=3)
'2012-01-28 00:00:00'
dt = dt.add(hours=24)
'2012-01-29 00:00:00'
dt = dt.add(hours=1)
'2012-02-25 01:00:00'
dt = dt.subtract(hours=1)
'2012-02-29 00:00:00'
dt = dt.subtract(hours=24)
'2012-01-28 00:00:00'
dt = dt.add(minutes=61)
'2012-01-28 01:01:00'
dt = dt.add(minutes=1)
'2012-01-28 01:02:00'
dt = dt.subtract(minutes=1)
'2012-01-28 01:01:00'
dt = dt.subtract(minutes=24)
'2012-01-28 00:00:00'
dt = dt.add(seconds=61)
'2012-01-28 00:01:01'
dt = dt.add(seconds=1)
'2012-01-28 00:01:02'
dt = dt.subtract(seconds=1)
'2012-01-28 00:01:01'
dt = dt.subtract(seconds=61)
'2012-01-28 00:00:00'
dt = dt.add(years=3, months=2, days=6, hours=12, minutes=31, seconds=43)
'2015-04-03 12:31:43'
dt = dt.subtract(years=3, months=2, days=6, hours=12, minutes=31, seconds=43)
'2012-01-28 00:00:00'
# You can also add or remove a timedelta
dt.add_timedelta(timedelta(hours=3, minutes=4, seconds=5))
'2012-01-28 03:04:05'
dt.sub_timedelta(timedelta(hours=3, minutes=4, seconds=5))
'2012-01-28 00:00:00'
Passing negative values to add()
is also possible and will act exactly like subtract()
Difference
The diff()
method returns a Period instance that represents the total duration between two DateTime
instances. This interval can be then expressed in various units. These interval methods always return the total difference expressed in the specified time requested. All values are truncated and not rounded.
The diff()
method has a default first parameter which is the DateTime
instance to compare to, or None
if you want to use now()
. The 2nd parameter is optional and indicates if you want the return value to be the absolute value or a relative value that might have a -
(negative) sign if the passed in date is less than the current instance. This will default to True
, return the absolute value.
import pendulum
dt_ottawa = pendulum.datetime(2000, 1, 1, tz='America/Toronto')
dt_vancouver = pendulum.datetime(2000, 1, 1, tz='America/Vancouver')
dt_ottawa.diff(dt_vancouver).in_hours()
3
dt_ottawa.diff(dt_vancouver, False).in_hours()
3
dt_vancouver.diff(dt_ottawa, False).in_hours()
-3
dt = pendulum.datetime(2012, 1, 31, 0)
dt.diff(dt.add(months=1)).in_days()
29
dt.diff(dt.subtract(months=1), False).in_days()
-31
dt = pendulum.datetime(2012, 4, 30, 0)
dt.diff(dt.add(months=1)).in_days()
30
dt.diff(dt.add(weeks=1)).in_days()
7
dt = pendulum.datetime(2012, 1, 1, 0)
dt.diff(dt.add(seconds=59)).in_minutes()
0
dt.diff(dt.add(seconds=60)).in_minutes()
1
dt.diff(dt.add(seconds=119)).in_minutes()
1
dt.diff(dt.add(seconds=120)).in_minutes()
2
Difference for Humans
The diff_for_humans()
method will add a phrase after the difference value relative to the instance and the passed in instance. There are 4 possibilities:
-
When comparing a value in the past to default now:
- 1 hour ago
- 5 months ago
-
When comparing a value in the future to default now:
- 1 hour from now
- 5 months from now
-
When comparing a value in the past to another value:
- 1 hour before
- 5 months before
-
When comparing a value in the future to another value:
- 1 hour after
- 5 months after
You may also pass True
as a 2nd parameter to remove the modifiers ago
, from now
, etc.
import pendulum
# The most typical usage is for comments
# The instance is the date the comment was created
# and its being compared to default now()
pendulum.now().subtract(days=1).diff_for_humans()
'5 days ago'
pendulum.now().diff_for_humans(pendulum.now().subtract(years=1))
'1 year after'
dt = pendulum.datetime(2011, 8, 1)
dt.diff_for_humans(dt.add(months=1))
'1 month before'
dt.diff_for_humans(dt.subtract(months=1))
'1 month after'
pendulum.now().add(seconds=5).diff_for_humans()
'5 seconds from now'
pendulum.now().subtract(days=24).diff_for_humans()
'3 weeks ago'
pendulum.now().subtract(days=24).diff_for_humans(absolute=True)
'3 weeks'
You can also change the locale of the string either globally by using pendulum.set_locale('fr')
before the diff_for_humans()
call or specifically for the call by passing the locale
keyword argument. See the Localization section for more detail.
import pendulum
pendulum.set_locale('de')
pendulum.now().add(years=1).diff_for_humans()
'in 1 Jahr'
pendulum.now().add(years=1).diff_for_humans(locale='fr')
'dans 1 an'
Modifiers
These group of methods perform helpful modifications to a copy of the current instance. You’ll notice that the start_of()
, next()
and previous()
methods set the time to 00:00:00
and the end_of()
methods set the time to 23:59:59.999999
.
The only one slightly different is the average()
method. It returns the middle date between itself and the provided DateTime
argument.
import pendulum
dt = pendulum.datetime(2012, 1, 31, 12, 0, 0)
dt.start_of('day')
'2012-01-31 00:00:00'
dt.end_of('day')
'2012-01-31 23:59:59'
dt.start_of('month')
'2012-01-01 00:00:00'
dt.end_of('month')
'2012-01-31 23:59:59'
dt.start_of('year')
'2012-01-01 00:00:00'
dt.end_of('year')
'2012-01-31 23:59:59'
dt.start_of('decade')
'2010-01-01 00:00:00'
dt.end_of('decade')
'2019-01-31 23:59:59'
dt.start_of('century')
'2000-01-01 00:00:00'
dt.end_of('century')
'2099-12-31 23:59:59'
dt.start_of('week')
'2012-01-30 00:00:00'
dt.day_of_week == pendulum.MONDAY
True # ISO8601 week starts on Monday
dt.end_of('week')
'2012-02-05 23:59:59'
dt.day_of_week == pendulum.SUNDAY
True # ISO8601 week ends on SUNDAY
dt.next(pendulum.WEDNESDAY)
'2012-02-01 00:00:00'
dt.day_of_week == pendulum.WEDNESDAY
True
dt = pendulum.datetime(2012, 1, 1, 12, 0, 0)
dt.next()
'2012-01-08 00:00:00'
dt.next(keep_time=True)
'2012-01-08T12:00:00+00:00'
dt = pendulum.datetime(2012, 1, 31, 12, 0, 0)
dt.previous(pendulum.WEDNESDAY)
'2012-01-25 00:00:00'
dt.day_of_week == pendulum.WEDNESDAY
True
dt = pendulum.datetime(2012, 1, 1, 12, 0, 0)
dt.previous()
'2011-12-25 00:00:00'
dt.previous(keep_time=True)
'2011-12-25 12:00:00'
start = pendulum.datetime(2014, 1, 1)
end = pendulum.datetime(2014, 1, 30)
start.average(end)
'2014-01-15 12:00:00'
# others that are defined that are similar
# and tha accept month, quarter and year units
# first_of(), last_of(), nth_of()
Timezones
Timezones are an important part of every datetime library and pendulum
tries to provide an easy and accurate system to handle them properly.
The timezone system works best inside the pendulum
ecosystem but can also be used with the standard datetime
library with a few limitations. See Using the timezone library directly.
Normalization
When you create a DateTime
instance, the library will normalize it for the given timezone to properly handle any transition that might have occurred.
import pendulum
pendulum.datetime(2013, 3, 31, 2, 30, tz='Europe/Paris')
# 2:30 for the 31th of March 2013 does not exist
# so pendulum will return the actual time which is 3:30+02:00
'2013-03-31T03:30:00+02:00'
pendulum.datetime(2013, 10, 27, 2, 30, tz='Europe/Paris')
# Here, 2:30 exists twice in the day so pendulum will
# assume that the transition already occurred
'2013-10-27T02:30:00+01:00'
You can, however, control the normalization behavior:
import pendulum
pendulum.datetime(2013, 3, 31, 2, 30, 0, 0, tz='Europe/Paris',
dst_rule=pendulum.PRE_TRANSITION)
'2013-03-31T01:30:00+01:00'
pendulum.datetime(2013, 10, 27, 2, 30, 0, 0, tz='Europe/Paris',
dst_rule=pendulum.PRE_TRANSITION)
'2013-10-27T02:30:00+02:00'
pendulum.datetime(2013, 3, 31, 2, 30, 0, 0, tz='Europe/Paris',
dst_rule=pendulum.TRANSITION_ERROR)
# NonExistingTime: The datetime 2013-03-31 02:30:00 does not exist
pendulum.datetime(2013, 10, 27, 2, 30, 0, 0, tz='Europe/Paris',
dst_rule=pendulum.TRANSITION_ERROR)
# AmbiguousTime: The datetime 2013-10-27 02:30:00 is ambiguous.
Note that it only affects instances at creation time. Shifting time around transition times still behaves the same.
Shifting time to transition
So, what happens when you add time to a DateTime
instance and stumble upon a transition time? Well pendulum
, provided with the context of the previous instance, will adopt the proper behavior and apply the transition accordingly.
import pendulum
dt = pendulum.datetime(2013, 3, 31, 1, 59, 59, 999999,
tz='Europe/Paris')
'2013-03-31T01:59:59.999999+01:00'
dt = dt.add(microseconds=1)
'2013-03-31T03:00:00+02:00'
dt.subtract(microseconds=1)
'2013-03-31T01:59:59.999998+01:00'
dt = pendulum.datetime(2013, 10, 27, 2, 59, 59, 999999,
tz='Europe/Paris',
dst_rule=pendulum.PRE_TRANSITION)
'2013-10-27T02:59:59.999999+02:00'
dt = dt.add(microseconds=1)
'2013-10-27T02:00:00+01:00'
dt = dt.subtract(microseconds=1)
'2013-10-27T02:59:59.999999+02:00'
Switching timezones
You can easily change the timezone of a DateTime
instance with the in_timezone()
method.
You can also use the more concise in_tz()
in_paris = pendulum.datetime(2016, 8, 7, 22, 24, 30, tz='Europe/Paris')
'2016-08-07T22:24:30+02:00'
in_paris.in_timezone('America/New_York')
'2016-08-07T16:24:30-04:00'
in_paris.in_tz('Asia/Tokyo')
'2016-08-08T05:24:30+09:00'
Using the timezone library directly
You should avoid using the timezone library in Python < 3.6.
This is due to the fact that Pendulum relies heavily on the presence of the fold
attribute which was introduced in Python 3.6.
The reason it works inside the Pendulum ecosystem is that it backported the fold
attribute in the DateTime
class.
Like said in the introduction, you can use the timezone library directly with standard datetime
objects but with limitations, especially when adding and subtracting time around transition times.
The value of the fold
attribute will be used by default to determine the transition rule.
from datetime import datetime
from pendulum import timezone
paris = timezone('Europe/Paris')
dt = datetime(2013, 3, 31, 2, 30)
# By default, fold is set to 0
dt = paris.convert(dt)
dt.isoformat()
'2013-03-31T01:30:00+01:00'
dt = datetime(2013, 3, 31, 2, 30, fold=1)
dt = paris.convert(dt)
dt.isoformat()
'2013-03-31T03:30:00+02:00'
Instead of relying on the fold
attribute, you can use the dst_rule
keyword argument, this is especially useful if you want to raise errors on non-existing and ambiguous times.
import pendulum
dt = datetime(2013, 3, 31, 2, 30)
# By default, fold is set to 0
dt = paris.convert(dt, dst_rule=pendulum.PRE_TRANSITION)
dt.isoformat()
'2013-03-31T01:30:00+01:00'
dt = paris.convert(dt, dst_rule=pendulum.POST_TRANSITION)
dt.isoformat()
'2013-03-31T03:30:00+02:00'
paris.convert(dt, dst_rule=pendulum.TRANSITION_ERROR)
# NonExistingTime: The datetime 2013-03-31 02:30:00 does not exist
This works as expected. However, whenever we add or subtract a timedelta
object, things get tricky.
from datetime import datetime, timedelta
from pendulum import timezone
dt = datetime(2013, 3, 31, 1, 59, 59, 999999)
dt = paris.convert(dt)
dt.isoformat()
'2013-03-31T01:59:59.999999+01:00'
dt = dt + timedelta(microseconds=1)
dt.isoformat()
'2013-03-31T02:00:00+01:00'
This is not what we expect, it should be 2013-03-31T03:00:00+02:00
. This is actually easy to retrieve the proper datetime by using convert()
again.
dt = tz.convert(dt)
dt.isoformat()
'2013-03-31T03:00:00+02:00'
You can also get a normalized datetime
object from a Timezone
by using the datetime()
method:
import pendulum
tz = pendulum.timezone('Europe/Paris')
dt = tz.datetime(2013, 3, 31, 2, 30)
dt.isoformat()
'2013-03-31T03:30:00+02:00'
Duration
The Duration
class is inherited from the native timedelta
class. It has many improvements over the base class.
Even though, it inherits from the timedelta
class, its behavior is slightly different. The more important to notice is that the native normalization does not happen, this is so that it feels more intuitive.
import pendulum
from datetime import datetime
d1 = datetime(2012, 1, 1, 1, 2, 3, tzinfo=pytz.UTC)
d2 = datetime(2011, 12, 31, 22, 2, 3, tzinfo=pytz.UTC)
delta = d2 - d1
delta.days
-1
delta.seconds
75600
d1 = pendulum.datetime(2012, 1, 1, 1, 2, 3)
d2 = pendulum.datetime(2011, 12, 31, 22, 2, 3)
delta = d2 - d1
delta.days
0
delta.hours
-3
Instantiation
To create a Duration
instance, you can use the duration()
helper:
import pendulum
it = pendulum.duration(days=1177, seconds=7284, microseconds=1234)
Unlike the native timedelta
class, durations support specifying years and months.
import pendulum
it = pendulum.duration(years=2, months=3)
However, to maintain compatibility, native methods and properties will make approximations:
it.days
#820
it.total_seconds()
#70848000.0
Properties and Duration Methods
The Duration
class brings more properties than the default days
, seconds
and microseconds
.
import pendulum
it = pendulum.duration(
... years=2, months=3,
... days=1177, seconds=7284, microseconds=1234
... )
it.years
2
it.months
3
# Weeks are based on the total of days
# It does not take into account years and months
it.weeks
168
# Days, just like in timedelta, represents the total of days
# in the duration. If years and/or months are specified
# it will use an approximation
it.days
1997
# If you want the remaining days not included in full weeks
it.remaining_days
1
# The remaining number in each unit
it.hours
2
it.minutes
1
# Seconds are, like days, a special case and the default
# property will return the whole value of remaining
# seconds just like the timedelta class for compatibility
it.seconds
7284
# If you want the number of seconds not included
# in hours and minutes
it.remaining_seconds
24
it.microseconds
1234
If you want to get the duration in each supported unit you can use the appropriate methods.
# Each method returns a float like the native
# total_seconds() method
it.total_weeks()
168.15490079569113
it.total_days()
1177.0843055698379
it.total_hours()
28250.02333367611
it.total_minutes()
1695001.4000205665
it.total_seconds()
101700084.001234
Similarly, the in_xxx()
methods return the total duration in each supported unit as a truncated integer.
it.in_weeks()
168
it.in_days()
1997
it.in_hours()
28250
it.in_minutes()
1695001
it.in_seconds()
101700084
It also has a handy `in_words()` method, which determines the duration representation when printed.
import pendulum
pendulum.set_locale('fr')
it = pendulum.duration(days=1177, seconds=7284, microseconds=1234)
it.in_words()
'168 semaines 1 jour 2 heures 1 minute 24 secondes'
print(it)
'168 semaines 1 jour 2 heures 1 minute 24 secondes'
it.in_words(locale='de')
'168 Wochen 1 Tag 2 Stunden 1 Minute 24 Sekunden'
Period
When you subtract a DateTime
instance to another, or use the diff()
method, it will return a Period
instance. It inherits from the Duration class with the added benefit that it is aware of the instances that generated it, so that it can give access to more methods and properties:
import pendulum
start = pendulum.datetime(2000, 11, 20)
end = pendulum.datetime(2016, 11, 5)
period = end - start
period.years
15
period.months
11
period.in_years()
15
period.in_months()
191
# Note that the weeks property
# will change compared to the Duration class
period.weeks
2 # 832 for the duration
# However the days property will still remain the same
# to keep the compatiblity with the timedelta class
period.days
5829
Be aware that a period, just like an interval, is compatible with the timedelta
class regarding its attributes. However, its custom attributes (like remaining_days
) will be aware of any DST transitions that might have occurred and adjust accordingly. Let’s take an example:
import pendulum
start = pendulum.datetime(2017, 3, 7, tz='America/Toronto')
end = start.add(days=6)
period = end - start
# timedelta properties
period.days
5
period.seconds
82800
# period properties
period.remaining_days
6
period.hours
0
period.remaining_seconds
0
Due to its nature (fixed duration between two datetimes), most arithmetic operations will return a Duration
instead of a Period
.
import pendulum
dt1 = pendulum.datetime(2016, 8, 7, 12, 34, 56)
dt2 = dt1.add(days=6, seconds=34)
period = pendulum.period(dt1, dt2)
period * 2
Duration(weeks=1, days=5, minutes=1, seconds=8)
Instantiation
You can create an instance by using the period()
helper:
import pendulum
start = pendulum.datetime(2000, 1, 1)
end = pendulum.datetime(2000, 1, 31)
period = pendulum.period(start, end)
You can also make an inverted period:
period = pendulum.period(end, start)
period.remaining_days
-2
If you have inverted dates but want to make sure that the period is positive, you set the absolute
keyword argument to True
:
period = pendulum.period(end, start, absolute=True) period.remaining_days 2
Range
If you want to iterate over a period, you can use the range()
method:
import pendulum
start = pendulum.datetime(2000, 1, 1)
end = pendulum.datetime(2000, 1, 10)
period = pendulum.period(start, end)
for dt in period.range('days'):
print(dt)
'2000-01-01T00:00:00+00:00'
'2000-01-02T00:00:00+00:00'
'2000-01-03T00:00:00+00:00'
'2000-01-04T00:00:00+00:00'
'2000-01-05T00:00:00+00:00'
'2000-01-06T00:00:00+00:00'
'2000-01-07T00:00:00+00:00'
'2000-01-08T00:00:00+00:00'
'2000-01-09T00:00:00+00:00'
'2000-01-10T00:00:00+00:00'
Supported units for range()
are: years
, months
, weeks
, days
, hours
, minutes
and seconds
You can pass an amount for the passed unit to control the length of the gap:
for dt in period.range('days', 2):
print(dt)
'2000-01-01T00:00:00+00:00'
'2000-01-03T00:00:00+00:00'
'2000-01-05T00:00:00+00:00'
'2000-01-07T00:00:00+00:00'
'2000-01-09T00:00:00+00:00'
You can also directly iterate over the Period
instance, the unit will be days
in this case:
for dt in period:
print(dt)
You can check if a DateTime
instance is inside a period using the in
keyword:
dt = pendulum.datetime(2000, 1, 4)
dt in period
#True
Testing
The testing methods allow you to set a DateTime
instance (real or mock) to be returned when a “now” instance is created. The provided instance will be returned specifically under the following conditions:
- A call to the
now()
method, ex.pendulum.now()
. - When the string “now” is passed to the
parse()
method, ex.pendulum.parse('now')
import pendulum
# Create testing datetime
known = pendulum.datetime(2001, 5, 21, 12)
# Set the mock
pendulum.set_test_now(known)
print(pendulum.now())
'2001-05-21T12:00:00+00:00'
print(pendulum.parse('now'))
'2001-05-21T12:00:00+00:00'
# Clear the mock
pendulum.set_test_now()
print(pendulum.now())
'2016-07-10T22:10:33.954851-05:00'
Related methods will also returned values mocked according to the **now** instance.
```python
print(pendulum.today())
'2001-05-21T00:00:00+00:00'
print(pendulum.tomorrow())
'2001-05-22T00:00:00+00:00'
print(pendulum.yesterday())
'2001-05-20T00:00:00+00:00'
If you don’t want to manually clear the mock (or you are afraid of forgetting), you can use the provided test()
contextmanager.
import pendulum
known = pendulum.datetime(2001, 5, 21, 12)
with pendulum.test(known):
print(pendulum.now())
'2001-05-21T12:00:00+00:00'
print(pendulum.now())
'2016-07-10T22:10:33.954851-05:00'
Limitations
Even though the DateTime
class is a subclass of datetime
, there are some rare cases where it can’t replace the native class directly. Here is a list (non-exhaustive) of the reported cases with a possible solution, if any:
sqlite3
will use the thetype()
function to determine the type of the object by default. To work around it you can register a new adapter:import pendulum from sqlite3 import register_adapter register_adapter(pendulum.DateTime, lambda val: val.isoformat(' '))
mysqlclient
(formerMySQLdb
) andPyMySQL
will use the thetype()
function to determine the type of the object by default. To work around it you can register a new adapter:import pendulum import MySQLdb.converters import pymysql.converters MySQLdb.converters.conversions[pendulum.DateTime] = MySQLdb.converters.DateTime2literal pymysql.converters.conversions[pendulum.DateTime] = pymysql.converters.escape_datetime
django
will use theisoformat()
method to store datetimes in the database. However sincependulum
is always timezone aware the offset information will always be returned byisoformat()
raising an error, at least for MySQL databases. To work around it you can either create your ownDateTimeField
or use the previous workaround forMySQLdb
:import pendulum from django.db.models import DateTimeField as BaseDateTimeField class DateTimeField(BaseDateTimeField): def value_to_string(self, obj): val = self.value_from_object(obj) if isinstance(value, pendulum.DateTime): return value.format('YYYY-MM-DD HH:mm:ss') return '' if val is None else val.isoformat()
> [Source : ](https://pendulum.eustace.io/docs/.)
<!--stackedit_data:
eyJoaXN0b3J5IjpbOTU5MTkyMDZdfQ==
-->


%@ taglib prefix="sec" uri="http://www.springframework.org/security/tags" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
<%@ taglib uri="http://www.springframework.org/tags" prefix="spring" %>
<%@ taglib uri="http://www.springframework.org/tags/form" prefix="form" %>
View Invoice
${msg}
Back to Event
| Invoice Number |
|
| Revision |
|
| Active |
|
| Quotation Number |
|
|
| Invoice Date |
|
| Bill To |
|
| Event Details |
|
| Payment Terms |
|
| Client Ref |
|
| Modified Date |
|
| Modified User |
|
| # |
Description |
Amount |
| 1 |
|
|
| 2 |
|
|
| 3 |
|
|
| 4 |
|
|
| 5 |
|
|


I am an IT Master's Graduate with extensive experience developing bespoke software solutions for unique problems. I develop mobile, web, and desktop applications alongside training and mentoring others.
I'm greatly interested in Artificial intelligence and web development, though other areas like networking, system administration, and IoT appeal to me too.
Led the development and maintenance of the centennial celebration platform for Makerere University, serving over 12,000 unique users.
Led the development of a bi-lingual mobile application for the Great Lakes Youth Network for Dialogue and Peace project on Android and iOS using Flutter.
Oversaw the development and maintenance of each feature from inception to implementation, including a user forum, network caching, and more. The app serves 3 countries and thousands of trainees.
Led the development of Uchaguzi – A mobile app, chatbot, and website that engaged over 10,000 users during Uganda's general elections in 2021. Flutter, Drupal, PHP and Python were used for this.
The platform includes a website, Whatsapp chatbot, and phone app running on Android and iOS.
Member of the 4IR Task force appointed by H.E. Yoweri Kaguta Museveni.
The task force is in charge of studying 4IR technologies and advising Government on policy interventions, possible implementation areas and the ecosystem for the adoption and promotion of the Revolution including human capital development, infrastructure and technological environment.
In charge of maintaining the centre's server, software, and websites
Built and maintained the focal Uganda government news site using Drupal and PHP.
Trained numerous District Technical Officers on IT & social media use, leading to a 30% increase in the number of districts with active websites.
In charge of maintaining the centre's server, software, and websites
Built the Africa Now Website and the Africa Now Conference App
Set up and managed the online ticketing system for the Africa Now Conference held in March 2019
Used multiple frameworks to develop and maintain websites for various organisations
Partnered with Rootless Technologies Limited for some of the projects.
A few of the projects I've worked on include:
Used PL/SQL and JavaScript to build a human resource management system on Oracle Application Express, reducing the leave approval process from multiple days to under an hour.
Used Java Enterprise Edition for maintaining and updating USSD applications.
Set up and managed a server with RHEL OS
Editor of Airtern Magazine 2017.
- Worked within the accounts department and learned how to set up and use QuickBooks.
- Worked as a Sales Supervisor at multiple branches and learnt how to sell and manage people.
Uchaguzi is a mobile and web-based application that is designed to ease access to information on Uganda’s general elections. This civic education platform is a project of the Ministry of ICT and National Guidance under the Government Citizen’s Interaction Centre (GCIC), in collaboration with Konrad Adenauer Stiftung Uganda & South Sudan.
I led a team that utilised Drupal, Firebase, Swift, Python, Java, Dart, Flutter, and other tools to develop a chatbot, Android app, Website, and an iOS App for this.
The Amagara platform is an easy-to-use interactive checklist based out of the World Health Organization’s (WHO) guidelines that helps you along every step of the surgery. We are incentivizing surgeons to become the best they can be by providing a tool that works for them.
I've helped build a tablet-based solution for this so far, and plans for a full blown application are underway.
We built a low budget Foot Traffic Counter for Spot Chek, a sports goods retail store operating throughout Canada. It is used to easily keep track of how many people are inside the store at a particular time. This helps stores avoid bypassing a limit and thus ensure proper social distancing within.
This was built for use on iPads within the stores reporting to a central server.
While at Airtel, Ogwang Olwe, Morris Mugisha and I built a Leave Management System. We used Oracle Apex and PL/SQL on Oracle 11g to create a platform that could be used to manage leave. It supports applying for leave, granting it, generation of multiple reports, request escalation, amongst many other features. The exported application and screenshots of the interfaces are available here.
View Project detailsValuation of land is a tricky endeavour in Uganda. However, looking at thousands of previous land sales in an area can help predict the price of a plot in that area. Our aim with this project was seeing how Artificial intelligence can help us estimate the price of land in Ntinda using particular information
This project was done using python.
The Africa Now mobile phone app is a companion application for people attending the Africa Now Conference 2019. Details of the Conference can be found here
View ProjectFor my final year school project, I built a system for school shuttle tracking. It tracked the location, speed, and staff aboard each shuttle so as to avail this information to parents and administrators. Once logged in, a parent can view the details of the shuttle that his/her child is aboard.
I used mostly PHP and JS to build it, with Java being used for a simple Mobile application. An online demo of the web app is available at gps.kirungi.co.ug. Guardian Login (h@o.com), Admin login (j@f.com)Password for these accounts is p.
View Project
Kanyesigye Akbr
Novel Centrepoint,
Ismet Inonu Blv,
Famagusta, North Cyprus
+256 776 734 087
kanye@rtl.ug


Co-founded technology help company, providing tech tutoring and support to 20+ customers in the first 3 months of operation across the Greater Toronto Area
Company was able to turn a profit in first month of operation
EDUCATION
Queen's University Bachelor of Computing in Computer Science September 2017-April 2021
Relevant courses include: Data Structures, Algorithms, Software Architecture, Software Development, Databases, and more.


Past netizen account of BTS leader RM purchasing secondhand pants online garners attention
by beansssA past netizen-account from 2018 regarding BTS leader RM is garnering attention on online communities!
According to netizens, the story is from some time in 2018, when an individual who happened to be selling used 'Visvim' brand pants via Naver's online sell & trade platform 'Joongonara' came across a buyer interested in purchasing his pair of used camo pants. (RM was known for wearing 'Visvim' brands for his casual clothes until recently, when he chose to stop wearing the brand after worsening Japan-Korea relations.)
Check out the conversations below:
RM: I'm looking to buy the camos.
Seller: It's the person who purchased the hakama before! You should be good on the size then ^^.
RM: I'll send you the money some time around 3 o'clock. Please wait a moment hehe.
Seller: Yes, please let me know when you send it over~
Seller: Were you able to send the money over? Hehe
RM: Yes, I sent it over. Does the price include shipping? Hehe.
RM: The address is Kim Nam Joon, Seoul Yongsan-gu Dokseodang road 111 (hidden content)
Seller: Yes, I will send it to you with shipping included in the payment. I've already left home for work today so I won't be able to do it today; I will send it early morning tomorrow via the post office. Thank you.
Seller: I've sent the package! Please use them well!
Seller: I know this may be disrespectful, but are you BTS's Rap Monster-nim? I didn't know before, but seeing the address and the name, it seemed so.. I knew that you liked 'Visvim' brand clothes but still, if you are, I'm honored.. Hehe. If my question was too personal TT, feel free to ignore it. Have a nice day!
RM: Thank you (emoji)(emoji)
Afterward, the seller from 'Joongonara' was seen sharing on an online community, "Some time ago, I posted here that I happened to sell pants to BTS's RM-nim, but then I was informed that my post was garnering a lot of attention from fans so I deleted it. Today, while searching up 'Visvim' on Naver, I found photos from stars on their way to 'Music Bank' recently. He wore the pants I sold him hehe. Even seeing it now, it's cool and surprising hehe. They fit him so gracefully hehe."
Seeing the old post coming to light again, netizens commented, "Kekekekeke the person who bought them and the person who sold the mare cute", "Heol, Nam Joon used to use 'Joongonara' too.. You'd think he could buy out an entire 'Visvim' store", "Wow Joonie bought used items online in person!", "How cute, I mean you could have used a fake name or something but kekekeke", "Hahahaha is shipping included he said", "This is the first time I'm seeing this! Stop being so cute Nam Joon!", "It's good to see him doing business with a really nice seller", "Wow he got to sell stuff to Kim Nam Joon twice?? So jealous TT", and more!


EU countries call for release of Libyan politician Siham Sergiwa
Diplomatic missions express concern over welfare of MP who disappeared after July interview critical of Khalifa Haftar.
European diplomatic missions in Libya have called for the "immediate release" of a politician and prominent women's rights activist who was kidnapped in Benghazi four months ago.
Siham Sergiwa disappeared on July 17 following an attack on her home by an armed group in the coastal city, which is controlled by eastern forces loyal to renegade General Khalifa Haftar. Relatives say the 56-year-old may have been kidnapped by the commander's forces after a critical interview with a pro-Haftar television station.
More:
In a statement on Sunday, the European missions expressed deep concern over the welfare of Sergiwa, who is a member of the Tobruk-based House of Representatives.
"We continue to call on relevant Libyan authorities to conduct urgent investigations into her disappearance, and provide an update on her whereabouts," said the statement signed by the European Union's delegation and the embassies of Austria, Belgium, Bulgaria, Finland, France, Germany, Italy, the Netherlands, Portugal, Spain, Sweden and the United Kingdom.
The signatories also warned that violations of international humanitarian and human rights laws in Libya will not go unnoticed and perpetrators will be held accountable.
"The trend of attacks against politicians, political activists and members of civil society, and in particular women, is unacceptable," it said.
The United Nations has also called for an investigation into Sergiwa's disappearance and for her immediate release.
The raid that resulted in her kidnapping also reportedly saw her husband shot in the leg and came shortly after she spoke on Al Hadath television, an outlet that backs Haftar.
During the broadcast she had called for "an end to the bloodshed", referring to an offensive launched in April by Haftar's self-styled Libyan National Army to wrest control of the capital, Tripoli, from rival fighters loyal to the internationally-recognised Government of National Accord (GNA).
Al Jazeera's Mahmoud Abdelwahed, reporting from Tripoli, said such incidents involving public figures have increased in Libya in recent years.
"There have been a lot of attacks on politicians and political activists, including opponents of the operation led by the forces loyal to Haftar," he said.
Haftar's fighters and the pro-GNA forces are currently embroiled in a stalemate in Tripoli's southern outskirts.
The fighting has killed more than 1,000 people, according to the World Health Organization. Some 300,000 people have been displaced.
Libya has been split between rival camps based in Tripoli and the east since 2014, a result of the divisions that surfaced following the NATO-backed overthrow of longtime ruler Muammar Gaddafi three years earlier.


SQL Server Hashing
SQL Server passwords are hashed
Sniff the network to obtain SQL traffic (non-SSL of course!)
Gain access to the machine and steal the hashes
Decrypting these the hard way:


index
|
up
|
prev
|
next
IdContParser Class
Definition at line
431
of
Primitive.hpp
Constructors
IdContParser
()
Member Functions
void
Accept
(
Visitor
& visitor)
override
Match
Parse
(
Scanner
& scanner,
ObjectStack
& stack,
ParsingData
* parsingData)
override
Constructor Details
IdContParser Constructor
cmajor::parsing::IdContParser::IdContParser()
Definition at line
1140
of
Primitive.cpp
:
1140
:
Parser
(
U"idcont"
,
U"idcont"
)
1141
{
1142
}
Declaration at line
434
of
Primitive.hpp
Member Function Details
Accept Member Function
void
cmajor::parsing::IdContParser::Accept(
Visitor
& visitor)
override
Definition at line
1157
of
Primitive.cpp
:
1158
{
1159
visitor
.
Visit
(
*
this
)
;
1160
}
Declaration at line
436
of
Primitive.hpp
Base class overridden functions:
cmajor::parsing::ParsingObject::Accept
Calls:
cmajor::parsing::Visitor::Visit
Parse Member Function
Match
cmajor::parsing::IdContParser::Parse(
Scanner
& scanner,
ObjectStack
& stack,
ParsingData
* parsingData)
override
Definition at line
1144
of
Primitive.cpp
Declaration at line
435
of
Primitive.hpp
Base class overridden functions:
cmajor::parsing::Parser::Parse
Calls:
cmajor::parsing::Match::Nothing
,
cmajor::parsing::Match::One
,
cmajor::parsing::Scanner::AtEnd
,
cmajor::parsing::Scanner::GetChar
,
cmajor::unicode::IsIdCont
index
|
up
|
prev
|
next


The day to day operations of the PF HOA are run by an all-volunteer Board
of Directors, along with help from many other committee volunteers. The
Board establishes the annual dues assessment and is responsible for using
the money assessed to maintain and improve HOA property and offer programs
which are of value to Prairie Fields residents, thereby increasing the
value of the neighborhood.
Welcome new board members Brian Kesler and Kyle Kirchhoefer and returning board
members Greg Sopa, and Tim Yardley.
For more information, please email<EMAIL_ADDRESS>HOA goals:
Establish measureable annual and long term goals for Prairies Fields
Increase participation on Nextdoor.com to benefit neighborhood safety,
communication, and a greater sense of community. Also to increase PFHOA
education and participation in future association decisions
HOA goals:
Continue preserving and maintaining the overall appeal and desirability
of Prairie Fields, while being vigilant of issues or conditions that may
affect the quality of living. Maintain a healthy reserve in the Prairie
Fields operations account, and collaborate on new ideas to improve our
community, and increase property values. See a permanent solution to the
drainage field on the East end of Prairie Fields Park, along First St;
perhaps a fish-stocked retention pond, for fishing derbies, paddle boating,
and ice skating (in approved safety conditions).
HOA goals:
Establish a neighborhood watch and increased transparency of fund use
HOA goals:
Offer residents discounted lawn care, weed control, etc. by making group agreements
and discounts with local companies, enforce current rules and regulations
Establish lawn care bags pickup and lower HOA dues.


This package wraps IATI Datastore Query Builder. For more info on the query builder, consult the dedicated user guide. The IATI Datastore provides access to development and humanitarian data that complies with the most up-to-date rules of the IATI Standard.
Launched in Accra in 2008, the International Aid Transparency Initiative (IATI) is a multi-stakeholder initiative and international open data standard that aims to improve the transparency and openness of both development and humanitarian activities. In the 2016 Humanitarian grand Bargain, multiple organisations also committed to _“Publish timely, transparent, harmonised and open high-quality data on humanitarian funding within two years of the World Humanitarian Summit in Istanbul” noting that parties “consider IATI to provide a basis for the purpose of a common standard.”__
IATI provides a mechanism for the regular, automated publication of open data on financial flows and also enables organizations to publish information on their project or programming activities, including information on monitoring, evaluation and results. Overall, 1000+ humanitarian and development organisations, including government donors, multilateral and UN agencies and international and local NGOs currently use the IATI Standard to publish information on who funds them, where the money goes and the impact or outcome of their activities. The use of IATI for Humanitarian actors is among the commitment from the grand bargain as presented in the dedicated portal.
The International Aid Transparency Initiative (IATI) data to trace aid flows from donor treasuries to their final end use. IATI is designed so that people can trace development spending flows through the development implementation chain, from one organization to other organizations, right down to the final stage in the chain: spending on goods and services. Traceability in IATI works by following the money as it flows from organization to organization through the development implementation chain. Provided that all organizations publish their information, it is possible to assess how much of the total funding at the beginning of the implementation chain is spent on goods and services, and where the money is spent.
Data published to IATI is published in activity
units, the core building blocks of the data. Activities are usually projects, but they can be any unit of development cooperation as defined by the publisher, such as a program or a contract. Typically,an entire donor country program is made up of a number of activities. Each activity is given a unique identifier and contains details of all incoming and outgoing transactions. Each transaction also has a unique identifier and contains data covering,among other things,the date, the value, a description, and details about the provider and receivers of the funds. It is classified into one of three categories.
Disbursement: Outgoing funds placed at the disposal of a recipient government or organization, or funds transferred between two separately reported activities. Under IATI traceability standards the recipient of a disbursement should also be required to report their activities to IATI.
Expenditure: Outgoing funds spent directly on goods and services for the activity. The recipients of expenditures fall outside of IATI traceability standards and are considered to be the end of the implementation chain. Therefore, an expenditure provided to a non-country-based organization is considered to be funds `not reaching the country.
Incoming fund: Funds received for an activity, which can be from an external or internal source.
Organisations can have different roles in IATI (each of them being segregated into different “Organisation Types”): * Reporting Organisations, i.e. organisations voluntarily reporting about their aid projects * Implementations organisations, that actually implements the activity.
The main concept are nicely summarised in the table below from IFRC IATI Feasibility Study
A summary of the potential flows, from the 2018 OXFAM report: Follow the Money is presented below:
Overview of traceability in IATI
Details on How IATI Fields link across activities
Rather than presenting the profile of a specific organization (as already do-able through numerous other tools) through a detailed query, the objective of this package is to extract data to perform summary analysis as below:
What are the most funded sectors per country?
What’s the share of ODA (Official Development Assistance) among the total flow of foreign aid per country?
What’s the share of ODA going to benefit of refugees? (this can complement the measurement of Global Refugee Compact Indicators related to ODA)
What is the share of ODA allocated to national actors?
What’s the share of Humanitarian assistance within the total ODA?
Who are the main donors by country in terms of number of projects and/or total budget?
What’s the breakdown of Earmarking Type (Unearmarked, Tightly earmarked, etc.) from Donor Funds by Year?
What’s the relationship between when a project was planned to start (proxy for when a project was conceived) and the amount of USD committed. We would know if there is a trend in terms of the project size?
What’s the relationship between the amount of time by which start was delayed and the amount of time by which the end of the project was delayed?
The package goal is to conveniently:
Pull data from the API by country(ies) and date
Tidy the results in a simple data frame by flattening lists within query results
Re-encode the data with labels from the IATI code set
Generate predefined charts
The package is developed in the context of UNHCR Protection Monitoring activities in the Americas. A vignette is available to display how it can be used.
There are issues with the published data. Several corrections have been made in the raw IATI data to get the current analysis. However there are still issues with the data, some of which will require manual intervention. A lis of specific issues in Humanitarian context is available here
You can install IatiTidy
from GitHub with:
# install.packages("devtools")
devtools::install_github("unhcr-americas/IatiTidy")
Users are welcome to flag bugs and or submit feature request here


ArcGIS Feature Service with Databinding.
Zero-Coding linked HTML interface with interactive map
San-Francisco 311 Incidents
ArcGIS Feature Service Layer Showing San-Francisco 311 Incidents on Stamen.Toner basemap
Incident Type


You previously selected "{layout}" as backend layout, which is not supported by the currently selected theme.
Please select another one in the properties of your page. If you use your own backend-layout, please make sure that you have selected the correct one. Verify that the identifier in your backend-configuration matches the filename of your theme-template. (case sensitive).
You have not selected a backend layout in your page properties, please do so in the properties of your page.


|
Drago - Release Notes
|
Version 4.32 2021/09/28
|
New
- Update Korean translation (thanks a lot to Jaeho Choi).
Fix
- Fix interface translation on extended character configuration (thanks a lot
to Jaeho Choi and Shaurong for reporting this).
|
  |
Version 4.31 2021/05/24
|
New
- Add KataGo to predefined engine settings.
Fix
- Fix shortcut translation in pop-up menus. Thanks to Robert Pauli for reporting.
|
  |
Version 4.30 2021/05/21
|
Change
- Italian translations of interface and help file are included in installers.
- When installing with the standard installer, application settings are stored
in user local data. This is more standard and avoid problems when not running
as administrator. When installing with the portable installer, application
settings remain in the install directory.
Fix
- The layout of Print preview and RTF preview is fixed.
- Lot of problems when using data or resources from unicode directories are fixed.
|
  |
Version 4.23 2017/07/22
|
New
- Finnish translation. Thanks a lot to Mika Kaakinen.
|
Finnish translation |
Version 4.22.03 2016/08/07
|
Fix
- Set three stone handicap in correct position. Thanks to Kan Yabumoto.
- Fix move numbering at end of engine game. Move numbers were incremented by 1. Thanks to Gerhard Suttner.
- Fix window drifting when repeating starting and closing program. Thanks to Marcel Vanthoor.
- Fix typo in help file. Thanks to Xinming Simon Guo.
- Improve Spanish translation. Thanks to S. C. Chase.
|
  |
Version 4.22.02 2015/08/01
|
Fix
- Fix crash on make main branch command.
|
  |
Version 4.22.01 2015/06/18
|
Fix
- Translation and texture files were not found when opening a sgf file with double
click from Windows explorer.
|
  |
Version 4.22 2015/04/22
|
New
- Option to display several move numbers on board.
- Command to delete a game in a multi game sgf file.
- Commands to move variations forward or backward in the variation list.
Change
- Coordinates are updated with view transform commands.
Fix
- Fix error when changing size in ExportPosition dialog.
- Avoid dragging setup stones and creating unexpected behavior.
- Display correct node properties (including goban size if lower than 19)
when moves are mixed with setup stones at root node.
- It is now possible to edit comments with extended character sets.
|
  |
Version 4.21 2012/05/19
|
New
- Full screen mode.
- Empty node creation.
- Engine only timing mode.
Change
- Change default board background.
- When starting a game, entering komi may use '.' or ',' as decimal separator.
Fix
- It was not possible to disable some warnings.
- Game tree pane was not updated when inserting pass move.
|
  |
Version 4.20 2012/03/04
|
New
- One click patterndisplay of stones.
- User defined stones (PNG format, sente.goban stones included).
- Advanced option added to store paths relatively to install folder.
- Arabic translation.
- Support for pachi game engine.
Change
- Remove board thumbnail in pattern search mode.
- Keeps sizes of side bar panes proportional when closing one of them.
- Removes support for old PDF lib (PowerPDF).
Fix
- Avoid truncating some strings in Game information search box.
- Fix read only mode.
- Territory marks not displayed when exporting to PDF.
|
  |
Version 4.12 2011/01/09
|
Fix
- After loading a folder, editing and saving a file is incorrectly handled.
|
  |
Version 4.11 2010/11/07
|
Change
- Update Hungarian translation.
- Command line handles multi parameters and accepts database and folder parameters.
- Explorer drag-and-drop handles multi parameters and accepts database and folder parameters.
- Opening a file by clicking in Explorer opens also latest files.
Fix
- Display glitch in remove property window when using 120 dpi fonts (evgeny).
- Scoring does not work after opening and closing several instances.
- Group status messages are incorrectly displayed in utf-8.
|
  |
Version 4.10 2010/09/19
|
New
- Generation of move trees (fuseki trees).
- Clipboard open and save commands.
- Option to replay game from current position.
- Option to minimize to tray.
- Folders and databases are handled in favorites.
- Color dialogs save custom colors.
Change
- Better handling of read errors when loading folder.
- Increase speed when showing game information search panel in database search window.
- Slight changes in database search window display.
Fix
- Error with figure property on last move of variant (Fabian).
- Handling of loadsgf existence for SuggestMove. Led to error with MoGo (Peter).
- Crash on last move in autoreplay mode (Danut).
- In database search mode, the pattern rectangle is sometimes not erased.
- Better working with Fuego in some cases has been reported.
- Time selection boxes (total time and time per move) may be hidden by a scrollbar with some screen settings (Vladimir).
- Database search window is incorrecly resized with some screen settings.
- In game information pane in sidebar: strings are not displayed on maximum size, focus rectangle is drawn when pane is clicked.
Note
- For those who have downloaded the last beta release (beta 3): the only difference with the final release is that some translation
files are updated. Thanks for testing the beta.
|
  |
Version 4.01 2010/01/04
|
Change
- Small change when saving to avoid separating a property name and a long property value by a carriage return.
Fix
- Crash when using the delete branch command on starting position (thanks Jacques).
|
  |
Version 4.00 2009/12/29
|
New
- Dockable, floatable, configurable sidebar.
- Game information panel in sidebar (with player images).
- Several game engines may be configured.
- Game engines are predefined.
- Engine games use timing.
- Guess mode may have unlimited number of attempts.
- Problem mode may specify a ratio of previously incorrectly solved problems.
- Make main branch command in edit menu.
- Remove properties command in edit menu.
- Reload current file command added to tab popup menu.
- Properties for byo-yomi stones are handled in display mode.
Change
- Text panel color setting removed.
- "Use old lib" removed from PDF advanced options, but still available in inifile.
- Sequence of clicks in edit mode option goes to advanced settings.
- Warnings reset go to advanced settings.
- In game tree, ellipsis are no more displayed if there is only a timing property at node.
Fix
- Updown in replay dialog does not work.
- Move numbers are not erased after hint in problem mode (thanks to Fabian).
- Tabs are close on mouse down, not on mouse up.
- Strange behavior when more than 32 tabs opened (thanks to Danut).
- After merging files, the name of the temporary files appears after moving to next game (thanks to Danut).
- After merging files and moving to next game, it is impossible to Save as collection (thanks to Danut).
- Switching between tabs when the export position window is open may cause an error (thanks to Danut).
- When running just after installation, the install window is still visible in task bar (thanks to Tim and Danut).
|
  |
|
2009...
|
  |
  |


--- prev_page: '/examples/examples_sampling_from_a_population.html' next_page: '/examples/examples_correlation.html' --- {% raw %}
# HIDDEN
# Clear previously defined variables
%reset -f
# HIDDEN
from datascience import *
import numpy as np
%matplotlib inline
import matplotlib.pyplot as plots
plots.style.use('fivethirtyeight')
from ipywidgets import interact, interactive, fixed, interact_manual
import ipywidgets as widgets
import nbinteract as nbi
By the Central Limit Theorem, the probability distribution of the mean of a large random sample is roughly normal. The bell curve is centered at the population mean. Some of the sample means are higher, and some lower, but the deviations from the population mean are roughly symmetric on either side, as we have seen repeatedly. Formally, probability theory shows that the sample mean is an unbiased estimate of the population mean.
In our simulations, we also noticed that the means of larger samples tend to be more tightly clustered around the population mean than means of smaller samples. In this section, we will quantify the variability of the sample mean and develop a relation between the variability and the sample size.
Let's start with our table of flight delays. The mean delay is about 16.7 minutes, and the distribution of delays is skewed to the right.
united = Table.read_table('http://inferentialthinking.com/notebooks/united_summer2015.csv')
delay = united.select('Delay')
pop_mean = np.mean(delay.column('Delay'))
pop_mean
delay_opts = {
'xlabel': 'Delay (minute)',
'ylabel': 'Percent per minute',
'xlim': (-20, 200),
'ylim': (0, 0.037),
'bins': 22,
}
nbi.hist(united.column('Delay'), options=delay_opts)
Now let's take random samples and look at the probability distribution of the sample mean. As usual, we will use simulation to get an empirical approximation to this distribution.
We will define a function simulate_sample_mean
to do this, because we are going to vary the sample size later. The arguments are the name of the table, the label of the column containing the variable, the sample size, and the number of simulations.
"""Empirical distribution of random sample means"""
def simulate_sample_mean(table, label, sample_size, repetitions=1000):
means = make_array()
for i in range(repetitions):
new_sample = table.sample(sample_size)
new_sample_mean = np.mean(new_sample.column(label))
means = np.append(means, new_sample_mean)
# Print all relevant quantities
print("Sample size: ", sample_size)
print("Population mean:", np.mean(table.column(label)))
print("Average of sample means: ", np.mean(means))
print("Population SD:", np.std(table.column(label)))
print("SD of sample means:", np.std(means))
return means
Let us simulate the mean of a random sample of 100 delays, then of 400 delays, and finally of 625 delays. We will perform 1000 repetitions of each of these process.
You can interact with the buttons below to show the distribution of sample means for different sample sizes.
means_opts = {
'xlabel': 'Sample Means',
'ylabel': 'Percent per unit',
'xlim': (5, 35),
'ylim': (0, 0.25),
'bins': 30,
}
nbi.hist(simulate_sample_mean, table=fixed(delay), label=fixed('Delay'),
sample_size=widgets.ToggleButtons(options=[100, 400, 625]),
options=means_opts)
You can see the Central Limit Theorem in action – the histograms of the sample means are roughly normal, even though the histogram of the delays themselves is far from normal.
You can also see that each of the three histograms of the sample means is centered very close to the population mean. In each case, the "average of sample means" is very close to 16.66 minutes, the population mean. Both values are provided in the printout above each histogram. As expected, the sample mean is an unbiased estimate of the population mean.
You can also see that the histograms get narrower, and hence taller, as the sample size increases. We have seen that before, but now we will pay closer attention to the measure of spread.
The SD of the population of all delays is about 40 minutes.
pop_sd = np.std(delay.column('Delay'))
pop_sd
Take a look at the SDs in the sample mean histograms above. In all three of them, the SD of the population of delays is about 40 minutes, because all the samples were taken from the same population.
Now look at the SD of all 10,000 sample means, when the sample size is 100. That SD is about one-tenth of the population SD. When the sample size is 400, the SD of all the sample means is about one-twentieth of the population SD. When the sample size is 625, the SD of the sample means is about one-twentyfifth of the population SD.
It seems like a good idea to compare the SD of the empirical distribution of the sample means to the quantity "population SD divided by the square root of the sample size."
Here are the numerical values. For each sample size in the first column, 10,000 random samples of that size were drawn, and the 10,000 sample means were calculated. The second column contains the SD of those 10,000 sample means. The third column contains the result of the calculation "population SD divided by the square root of the sample size."
sd_comparison
The values in the second and third columns are very close. If we plot each of those columns with the sample size on the horizontal axis, the two graphs are essentially indistinguishable.
sd_comparison.plot('Sample Size n')
There really are two curves there. But they are so close to each other that it looks as though there is just one.
What we are seeing is an instance of a general result. Remember that the graph above is based on 10,000 replications for each sample size. But there are many more than 10,000 samples of each size. The probability distribution of the sample mean is based on the means of all possible samples of a fixed size.
Fix a sample size. If the samples are drawn at random with replacement from the population, then $$ {\mbox{SD of all possible sample means}} ~=~ \frac{\mbox{Population SD}}{\sqrt{\mbox{sample size}}} $$
This is the standard deviation of the averages of all the possible samples that could be drawn. *It measures roughly how far off the sample means are from the population mean.
If you draw a large random sample with replacement from a population, then, regardless of the distribution of the population, the probability distribution of the sample mean is roughly normal, centered at the population mean, with an SD equal to the population SD divided by the square root of the sample size.
The SD of all possible sample means measures how variable the sample mean can be. As such, it is taken as a measure of the accuracy of the sample mean as an estimate of the population mean. The smaller the SD, the more accurate the estimate.
The formula shows that:
From the table of SD comparisons, you can see that the SD of the means of random samples of 25 flight delays is about 8 minutes. If you multiply the sample size by 4, you'll get samples of size 100. The SD of the means of all of those samples is about 4 minutes. That's smaller than 8 minutes, but it's not 4 times as small; it's only 2 times as small. That's because the sample size in the denominator has a square root over it. The sample size increased by a factor of 4, but the SD went down by a factor of $2 = \sqrt{4}$. In other words, the accuracy went up by a factor of $2 = \sqrt{4}$.
In general, when you multiply the sample size by a factor, the accuracy of the sample mean goes up by the square root of that factor.
So to increase accuracy by a factor of 10, you have to multiply sample size by a factor of 100. Accuracy doesn't come cheap!


#include <filter.h>
Public Types | |
| enum | Status { kStopped = 0, kRunning } |
| enum | QueueType { kNone = 0, kWait, kLockFree } |
| typedef std::multimap< std::string, std::string > | input_streams_t |
| typedef std::map< std::string, std::shared_ptr< Stream > > | output_streams_t |
| typedef std::shared_ptr< Image > | ImagePtr |
Public Member Functions | |
| Filter (bool threaded=false, QueueType queue_type=kNone, size_t max_queue_size=8) | |
| virtual | ~Filter () |
| void | setThreaded (bool threaded) |
| Make the filter threaded. More... | |
| void | setQueueType (QueueType type, size_t max_queue_size) |
| Set the queue type. More... | |
| void | setName (const std::string &name) |
| Set the name of the filter. More... | |
| const std::string & | name () const |
| Get the name of the filter. More... | |
| Status | status () const |
| virtual void | connect (Filter *f) |
| Connect another filter to receive containers. More... | |
| virtual void | start () |
| Start the filter. More... | |
| virtual void | stop () |
| Stop the filter. More... | |
| virtual void | send (ContainerPtr c) |
| Send a container to the child filters. More... | |
| virtual void | push (ContainerPtr c) |
| Push a container onto the queue. More... | |
| virtual void | flush () |
| Flush all data from filter. More... | |
| virtual void | receive (ContainerPtr c) throw (artvision::Exception) |
| Receive a container. More... | |
| virtual void | process () throw (artvision::Exception) |
| Call by the filter thread loop when there is no container. More... | |
| const std::vector< Filter * > & | filters () const |
| void | addInputStream (const std::string &typeId, const std::string &name) |
| Add an input stream. More... | |
| void | addOutputStream (const std::string &typeId, std::shared_ptr< Stream > stream) |
| Add an output stream. More... | |
| std::string | inputStream (const std::string &typeId) const |
| Get an input stream id with a type id. More... | |
| std::pair< input_streams_t::const_iterator, input_streams_t::const_iterator > | inputStreams (const std::string &typeId) const |
| Get input streams with a type id. More... | |
| const std::shared_ptr< Stream > | outputStream (const std::string &typeId) const |
| Get an output stream with a stream Id. More... | |
| const input_streams_t & | inputStreams () const |
| Get map of input streams. More... | |
| IQueue< ContainerPtr > * | inputQueue () |
| Get the input queue. More... | |
| const IQueue< ContainerPtr > * | inputQueue () const |
| Public Member Functions inherited from artvision_instanton::Task | |
| Task () | |
| ~Task () | |
| void | cancel () |
| Cancel the thread. More... | |
| void | join () |
| Join the thread task. More... | |
| Public Member Functions inherited from artvision_instanton::Runnable | |
| virtual | ~Runnable () |
Protected Member Functions | |
| virtual void | svc () |
| Entry point. More... | |
| Protected Member Functions inherited from artvision_instanton::Task | |
| virtual void | run () |
| Run method for thread. More... | |
| virtual void | svcSetUp () |
| set_up: a place for resource allocation for/in the svc() thread after its starting point More... | |
| virtual void | svcCleanUp () |
| clean_up: a place for resource management to do clean up in the svc() thread before its exit More... | |
Protected Attributes | |
| std::string | mName |
| QueueType | mQueueType |
| input_streams_t | mInputStreams |
| output_streams_t | mOutputStreams |
| Status | mStatus |
| bool | mThreaded |
| std::unique_ptr< IQueue< ContainerPtr > > | mInputQueue |
| std::vector< Filter * > | mFilters |
| Protected Attributes inherited from artvision_instanton::Task | |
| std::atomic_bool | mCancel |
Member Typedef Documentation
| typedef std::shared_ptr<Image> artvision_instanton::Filter::ImagePtr |
| typedef std::multimap<std::string, std::string> artvision_instanton::Filter::input_streams_t |
| typedef std::map<std::string, std::shared_ptr<Stream> > artvision_instanton::Filter::output_streams_t |
Member Enumeration Documentation
Constructor & Destructor Documentation
|
virtual |
Member Function Documentation
|
inline |
Add an input stream.
|
inline |
Add an output stream.
|
virtual |
Connect another filter to receive containers.
|
inline |
- Returns
- Reference to filter vector.
|
virtual |
Flush all data from filter.
Reimplemented in artvision_instanton::AttitudeSyncFilter, and artvision_instanton::HomographyTrackerFilter.
|
inline |
Get the input queue.
|
inline |
|
inline |
Get an input stream id with a type id.
when multiple streams of the same type id exist, the first one is retureed
|
inline |
Get input streams with a type id.
the return value ii is a pair of iterators pointing to the beginning and end iterator of the streams with the type id that can be iteratored over from ii->first to ii->second (excluding the second itself)
|
inline |
Get map of input streams.
|
inline |
Get the name of the filter.
|
inline |
Get an output stream with a stream Id.
|
virtual |
Call by the filter thread loop when there is no container.
Reimplemented in artvision_instanton::AttitudeSyncFilter.
|
virtual |
Push a container onto the queue.
|
virtual |
|
virtual |
Send a container to the child filters.
|
inline |
Set the name of the filter.
| void Filter::setQueueType | ( | QueueType | type, |
| size_t | max_queue_size | ||
| ) |
Set the queue type.
|
inline |
Make the filter threaded.
Must be set before the filter is started.
|
virtual |
Start the filter.
Reimplemented from artvision_instanton::Task.
Reimplemented in artvision_instanton::AttitudeSyncFilter, artvision_instanton::HomographyTrackerFilter, and artvision_instanton::CameraFilter.
|
inline |
- Returns
- Status of filter
|
virtual |
Stop the filter.
Reimplemented from artvision_instanton::Task.
Reimplemented in artvision_instanton::AttitudeSyncFilter, artvision_instanton::HomographyTrackerFilter, and artvision_instanton::CameraFilter.
|
protectedvirtual |
Entry point.
Implements artvision_instanton::Task.
Reimplemented in artvision_instanton::CameraFilter, and artvision_instanton::SourceFilter.
Member Data Documentation
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
The documentation for this class was generated from the following files:
- /bitrise/src/Source/AR6/InstantOn/include/AR6/InstantOn/framework/filter.h
- /bitrise/src/Source/AR6/InstantOn/framework/filter.cpp


report_status¶
-
support.git.
report_status
(show_all=False)¶ Does ‘git status’ for all the sandboxes.
Prints the status report, if there is any, for each sandbox. There is a priority to what is reported, according to the severity of the status:
work - changes need to be committed untracked - there are untracked files which might need to be added behind - a pull is required to bring the repo up to date ahead - a push is required to update the remote
:param show_all : show full report for each non-clean repo :type show_all : bool
- Returns
None


--- name: grid url: /grid ---
Block
Block
Block
You can create [Item] with this basic HTML
[html]
You can create advanced versions of [Item] with this HTML
[html]
You can customize with...
[Sass]


Customer to be provided the CA variant calculator to check the best fit product . Charges and benefits will be displayed as per the product variant.
Also Charges and benefits for ME services will be displayed if the customer has opted for ME


--- title: Profiles ---
Profiles are small configuration units which can be merged into the overall configuration.
The following is an example of starting heroic with an in-memory configuration
using the shell, and the memory
profile:
$> tools/heroic-shell --server -P memory
A list of all available profiles and their options can be seen with the
--help
switch.
Note: -X elasticsearch.configure
will cause the temporary
elasticsearch instances to be automatically configured.
memory
profile
Using the load-generated
command, you can generate some random
data for the last week to play around with.
heroic> load-generated
...
You can also manually write some data into the the local instance:
heroic> write --series '{"key": "test", "tags": {"host": "a", "what": "foo"}}' -p 00:00=1 -p 00:01=2
heroic> write --series '{"key": "test", "tags": {"host": "a", "what": "bar"}}' -p 00:00=3 -p 00:01=4
We can fetch the data back out:
heroic> fetch --series '{"key": "test", "tags": {"host": "a", "what": "bar"}}' --start 00:00 --end 00:02
We can also query the data:
heroic> query average from points(1d) where $key = test;
heroic> query average from points(1d) where $key = test and what=bar;


On the day before Christmas eve I walked into the natural products shop and purchased 40 passionflower extract pills. =) It said on the box that the recommended dose is 1-4 pills a day. So i decided to give 4 pills a try. It also said on the box that the effect would be stronger if the pills were kept in your mouth until they'd melt.
I put the pills in my mouth at around 17 pm and waited for them to melt. The taste wasn't pleasant, but not too bad either. My mouth looked disgusting, because the melting pills coloured my saliva brownish yellow... :(
I did various things and didn't feel any effects. Until when I went to a nearby shop to meet my girlfriend. I ran almost the whole way to the shop, but it's hard to say whether the passionflower played a part in this, because I sometimes have this kind of outbursts of energy. This was around 18:45.
I arrived at the shop maybe 5 minutes earlier than my girlfriend. I was being very restless. I had something that one might perhaps call a minor panic attack... Once when i was on a train i started pondering if i was on a wrong train... I felt my pulse rise, i started sweating and got REALLY nervous. That day i had had a lot of coffee though... =)
Eventually my girlfriend arrived and we bought what she wanted and left off to my home. When we got to my home we started watching this show on the tube that we thought would be good and I layed down on the floor. I noticed that sound and vision were enhanced. Especially sound. I felt calm and good. There was some kind of nausea/dizziness present, but it wasn't bad. I felt like smiling =).
When going to bed I remember pointing my hand and saying something like: 'Isn't it amazing that my hand is here, and this is my hand, a part of me' to my girlfriend. It felt pretty amazing then... =)
The next day i wasn't in quite a normal state, but calling it a hangover, would give it a bad name. I was feeling kind of lifted.
I have tried it a couple of times later, but it is quite problematic to use because you have to watch your diet. I even tried to smoke it, and remembered afterwards that high temperatures destroy the MAOI molecules. It did produce some effects... walking became fun and everything was 'kinda weird' =)
If you plan on trying it, do some research, because doing wrong drugs, or even eating wrong foods with it, or after or before it can be dangerous.
Experience Reports are the writings and opinions of the individual authors who submit them.
Some of the activities described are dangerous and/or illegal and none are recommended by Erowid.