users package¶
Subpackages¶
Submodules¶
users.admin module¶
-
class
users.admin.
BalanceFilter
(request, params, model, model_admin)¶ Bases :
django.contrib.admin.filters.SimpleListFilter
-
lookups
(request, model_admin)¶ Must be overridden to return a list of tuples (value, verbose value)
-
parameter_name
= 'solde'¶
-
queryset
(request, queryset)¶ Return the filtered queryset.
-
title
= 'Solde'¶
-
-
class
users.admin.
CotisationHistoryAdmin
(model, admin_site)¶ Bases :
simple_history.admin.SimpleHistoryAdmin
-
list_display
= ('user', 'amount', 'duration', 'paymentDate', 'endDate', 'paymentMethod')¶
-
list_filter
= ('paymentMethod',)¶
-
media
¶
-
ordering
= ('user', 'amount', 'duration', 'paymentDate', 'endDate')¶
-
search_fields
= ('user',)¶
-
-
class
users.admin.
ProfileAdmin
(model, admin_site)¶ Bases :
simple_history.admin.SimpleHistoryAdmin
-
list_display
= ('user', 'credit', 'debit', 'balance', 'school', 'cotisationEnd', 'is_adherent')¶
-
list_filter
= ('school', <class 'users.admin.BalanceFilter'>)¶
-
media
¶
-
ordering
= ('user', '-credit', '-debit')¶
-
search_fields
= ('user',)¶
-
users.apps module¶
users.forms module¶
-
class
users.forms.
CreateGroupForm
(data=None, files=None, auto_id='id_%s', prefix=None, initial=None, error_class=<class 'django.forms.utils.ErrorList'>, label_suffix=None, empty_permitted=False, instance=None, use_required_attribute=None, renderer=None)¶ Bases :
django.forms.models.ModelForm
Form to create a new group
-
base_fields
= {'name': <django.forms.fields.CharField object>}¶
-
declared_fields
= {}¶
-
media
¶
-
-
class
users.forms.
CreateUserForm
(data=None, files=None, auto_id='id_%s', prefix=None, initial=None, error_class=<class 'django.forms.utils.ErrorList'>, label_suffix=None, empty_permitted=False, instance=None, use_required_attribute=None, renderer=None)¶ Bases :
django.forms.models.ModelForm
Form to create a new user
-
class
Meta
¶ Bases :
object
-
fields
= ('username', 'last_name', 'first_name', 'email')¶
-
model
¶ alias de
django.contrib.auth.models.User
-
-
base_fields
= {'email': <django.forms.fields.EmailField object>, 'first_name': <django.forms.fields.CharField object>, 'last_name': <django.forms.fields.CharField object>, 'school': <django.forms.models.ModelChoiceField object>, 'username': <django.forms.fields.CharField object>}¶
-
declared_fields
= {'school': <django.forms.models.ModelChoiceField object>}¶
-
media
¶
-
class
-
class
users.forms.
EditGroupForm
(data=None, files=None, auto_id='id_%s', prefix=None, initial=None, error_class=<class 'django.forms.utils.ErrorList'>, label_suffix=None, empty_permitted=False, instance=None, use_required_attribute=None, renderer=None)¶ Bases :
django.forms.models.ModelForm
Form to edit a group
-
base_fields
= {'name': <django.forms.fields.CharField object>, 'permissions': <django.forms.models.ModelMultipleChoiceField object>}¶
-
declared_fields
= {}¶
-
media
¶
-
-
class
users.forms.
EditPasswordForm
(data=None, files=None, auto_id='id_%s', prefix=None, initial=None, error_class=<class 'django.forms.utils.ErrorList'>, label_suffix=None, empty_permitted=False, field_order=None, use_required_attribute=None, renderer=None)¶ Bases :
django.forms.forms.Form
Form to change the password of a user
-
base_fields
= {'password': <django.forms.fields.CharField object>, 'password1': <django.forms.fields.CharField object>, 'password2': <django.forms.fields.CharField object>}¶
-
clean_password2
()¶ Verify if the two new passwords are identical
-
declared_fields
= {'password': <django.forms.fields.CharField object>, 'password1': <django.forms.fields.CharField object>, 'password2': <django.forms.fields.CharField object>}¶
-
media
¶
-
-
class
users.forms.
ExportForm
(data=None, files=None, auto_id='id_%s', prefix=None, initial=None, error_class=<class 'django.forms.utils.ErrorList'>, label_suffix=None, empty_permitted=False, field_order=None, use_required_attribute=None, renderer=None)¶ Bases :
django.forms.forms.Form
-
FIELDS_CHOICES
= (('username', "Nom d'utilisateur"), ('last_name', 'Nom'), ('first_name', 'Prénom'), ('email', 'Adresse mail'), ('school', 'École'), ('balance', 'Solde'), ('credit', 'Crédit'), ('debit', 'Débit'))¶
-
QUERY_TYPE_CHOICES
= (('all', 'Tous les comptes'), ('all_active', 'Tous les comptes actifs'), ('adherent', 'Tous les adhérents'), ('adherent_active', 'Tous les adhérents actifs'))¶
-
base_fields
= {'fields': <django.forms.fields.MultipleChoiceField object>, 'group': <django.forms.models.ModelChoiceField object>, 'query_type': <django.forms.fields.ChoiceField object>}¶
-
declared_fields
= {'fields': <django.forms.fields.MultipleChoiceField object>, 'group': <django.forms.models.ModelChoiceField object>, 'query_type': <django.forms.fields.ChoiceField object>}¶
-
media
¶
-
-
class
users.forms.
GroupsEditForm
(data=None, files=None, auto_id='id_%s', prefix=None, initial=None, error_class=<class 'django.forms.utils.ErrorList'>, label_suffix=None, empty_permitted=False, instance=None, use_required_attribute=None, renderer=None)¶ Bases :
django.forms.models.ModelForm
Form to edit a user’s list of groups
-
base_fields
= {'groups': <django.forms.models.ModelMultipleChoiceField object>}¶
-
declared_fields
= {}¶
-
media
¶
-
-
class
users.forms.
LoginForm
(data=None, files=None, auto_id='id_%s', prefix=None, initial=None, error_class=<class 'django.forms.utils.ErrorList'>, label_suffix=None, empty_permitted=False, field_order=None, use_required_attribute=None, renderer=None)¶ Bases :
django.forms.forms.Form
Form to log in
-
base_fields
= {'password': <django.forms.fields.CharField object>, 'username': <django.forms.fields.CharField object>}¶
-
declared_fields
= {'password': <django.forms.fields.CharField object>, 'username': <django.forms.fields.CharField object>}¶
-
media
¶
-
-
class
users.forms.
SchoolForm
(data=None, files=None, auto_id='id_%s', prefix=None, initial=None, error_class=<class 'django.forms.utils.ErrorList'>, label_suffix=None, empty_permitted=False, instance=None, use_required_attribute=None, renderer=None)¶ Bases :
django.forms.models.ModelForm
Form to add and edit a school
-
class
Meta
¶ Bases :
object
-
fields
= '__all__'¶
-
model
¶ alias de
users.models.School
-
-
base_fields
= {'name': <django.forms.fields.CharField object>}¶
-
declared_fields
= {}¶
-
media
¶
-
class
-
class
users.forms.
SelectNonAdminUserForm
(data=None, files=None, auto_id='id_%s', prefix=None, initial=None, error_class=<class 'django.forms.utils.ErrorList'>, label_suffix=None, empty_permitted=False, field_order=None, use_required_attribute=None, renderer=None)¶ Bases :
django.forms.forms.Form
Form to select a user from all non-staff users
-
base_fields
= {'user': <django.forms.models.ModelChoiceField object>}¶
-
declared_fields
= {'user': <django.forms.models.ModelChoiceField object>}¶
-
media
¶
-
-
class
users.forms.
SelectNonSuperUserForm
(data=None, files=None, auto_id='id_%s', prefix=None, initial=None, error_class=<class 'django.forms.utils.ErrorList'>, label_suffix=None, empty_permitted=False, field_order=None, use_required_attribute=None, renderer=None)¶ Bases :
django.forms.forms.Form
Form to select a user from all non-superuser users
-
base_fields
= {'user': <django.forms.models.ModelChoiceField object>}¶
-
declared_fields
= {'user': <django.forms.models.ModelChoiceField object>}¶
-
media
¶
-
-
class
users.forms.
SelectUserForm
(data=None, files=None, auto_id='id_%s', prefix=None, initial=None, error_class=<class 'django.forms.utils.ErrorList'>, label_suffix=None, empty_permitted=False, field_order=None, use_required_attribute=None, renderer=None)¶ Bases :
django.forms.forms.Form
Form to select a user from all users
-
base_fields
= {'user': <django.forms.models.ModelChoiceField object>}¶
-
declared_fields
= {'user': <django.forms.models.ModelChoiceField object>}¶
-
media
¶
-
-
class
users.forms.
addCotisationHistoryForm
(*args, **kwargs)¶ Bases :
django.forms.models.ModelForm
Form to add a cotisation to user
-
class
Meta
¶ Bases :
object
-
fields
= ('cotisation', 'paymentMethod')¶
-
model
¶ alias de
users.models.CotisationHistory
-
-
base_fields
= {'cotisation': <django.forms.models.ModelChoiceField object>, 'paymentMethod': <django.forms.models.ModelChoiceField object>}¶
-
declared_fields
= {}¶
-
media
¶
-
class
-
class
users.forms.
addWhiteListHistoryForm
(data=None, files=None, auto_id='id_%s', prefix=None, initial=None, error_class=<class 'django.forms.utils.ErrorList'>, label_suffix=None, empty_permitted=False, instance=None, use_required_attribute=None, renderer=None)¶ Bases :
django.forms.models.ModelForm
Form to add a whitelist to user
-
class
Meta
¶ Bases :
object
-
fields
= ('duration',)¶
-
model
¶ alias de
users.models.WhiteListHistory
-
-
base_fields
= {'duration': <django.forms.fields.IntegerField object>}¶
-
declared_fields
= {}¶
-
media
¶
-
class
users.models module¶
-
class
users.models.
CotisationHistory
(*args, **kwargs)¶ Bases :
django.db.models.base.Model
Stores cotisations history, related to Cotisation
-
exception
DoesNotExist
¶ Bases :
django.core.exceptions.ObjectDoesNotExist
-
exception
MultipleObjectsReturned
¶ Bases :
django.core.exceptions.MultipleObjectsReturned
-
amount
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
coopeman
¶ Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
-
coopeman_id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
cotisation
¶ Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
-
cotisation_id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
duration
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
endDate
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
get_next_by_endDate
(*, field=<django.db.models.fields.DateTimeField: endDate>, is_next=True, **kwargs)¶
-
get_next_by_paymentDate
(*, field=<django.db.models.fields.DateTimeField: paymentDate>, is_next=True, **kwargs)¶
-
get_previous_by_endDate
(*, field=<django.db.models.fields.DateTimeField: endDate>, is_next=False, **kwargs)¶
-
get_previous_by_paymentDate
(*, field=<django.db.models.fields.DateTimeField: paymentDate>, is_next=False, **kwargs)¶
-
history
= <simple_history.manager.HistoryManager object>¶
-
id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
objects
= <django.db.models.manager.Manager object>¶
-
paymentDate
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
paymentMethod
¶ Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
-
paymentMethod_id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
save_without_historical_record
(*args, **kwargs)¶ Save model without saving a historical record
Make sure you know what you’re doing before you use this method.
-
user
¶ Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
-
user_id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
exception
-
class
users.models.
HistoricalCotisationHistory
(id, amount, duration, paymentDate, endDate, user, paymentMethod, cotisation, coopeman, history_id, history_change_reason, history_date, history_user, history_type)¶ Bases :
simple_history.models.HistoricalChanges
,django.db.models.base.Model
-
exception
DoesNotExist
¶ Bases :
django.core.exceptions.ObjectDoesNotExist
-
exception
MultipleObjectsReturned
¶ Bases :
django.core.exceptions.MultipleObjectsReturned
-
amount
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
coopeman
¶ Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
-
coopeman_id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
cotisation
¶ Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
-
cotisation_id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
duration
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
endDate
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
get_history_type_display
(*, field=<django.db.models.fields.CharField: history_type>)¶
-
get_next_by_endDate
(*, field=<django.db.models.fields.DateTimeField: endDate>, is_next=True, **kwargs)¶
-
get_next_by_history_date
(*, field=<django.db.models.fields.DateTimeField: history_date>, is_next=True, **kwargs)¶
-
get_next_by_paymentDate
(*, field=<django.db.models.fields.DateTimeField: paymentDate>, is_next=True, **kwargs)¶
-
get_previous_by_endDate
(*, field=<django.db.models.fields.DateTimeField: endDate>, is_next=False, **kwargs)¶
-
get_previous_by_history_date
(*, field=<django.db.models.fields.DateTimeField: history_date>, is_next=False, **kwargs)¶
-
get_previous_by_paymentDate
(*, field=<django.db.models.fields.DateTimeField: paymentDate>, is_next=False, **kwargs)¶
-
history_change_reason
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
history_date
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
history_id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
history_object
¶
-
history_type
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
history_user
¶ Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
-
history_user_id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
instance
¶
-
instance_type
¶ alias de
CotisationHistory
-
next_record
¶ Get the next history record for the instance. None if last.
-
objects
= <django.db.models.manager.Manager object>¶
-
paymentDate
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
paymentMethod
¶ Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
-
paymentMethod_id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
prev_record
¶ Get the previous history record for the instance. None if first.
-
revert_url
()¶ URL for this change in the default admin site.
-
user
¶ Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
-
user_id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
exception
-
class
users.models.
HistoricalProfile
(id, credit, debit, cotisationEnd, user, school, history_id, history_change_reason, history_date, history_user, history_type)¶ Bases :
simple_history.models.HistoricalChanges
,django.db.models.base.Model
-
exception
DoesNotExist
¶ Bases :
django.core.exceptions.ObjectDoesNotExist
-
exception
MultipleObjectsReturned
¶ Bases :
django.core.exceptions.MultipleObjectsReturned
-
cotisationEnd
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
credit
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
debit
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
get_history_type_display
(*, field=<django.db.models.fields.CharField: history_type>)¶
-
get_next_by_history_date
(*, field=<django.db.models.fields.DateTimeField: history_date>, is_next=True, **kwargs)¶
-
get_previous_by_history_date
(*, field=<django.db.models.fields.DateTimeField: history_date>, is_next=False, **kwargs)¶
-
history_change_reason
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
history_date
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
history_id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
history_object
¶
-
history_type
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
history_user
¶ Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
-
history_user_id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
instance
¶
-
next_record
¶ Get the next history record for the instance. None if last.
-
objects
= <django.db.models.manager.Manager object>¶
-
prev_record
¶ Get the previous history record for the instance. None if first.
-
revert_url
()¶ URL for this change in the default admin site.
-
school
¶ Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
-
school_id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
user
¶ Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
-
user_id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
exception
-
class
users.models.
HistoricalSchool
(id, name, history_id, history_change_reason, history_date, history_user, history_type)¶ Bases :
simple_history.models.HistoricalChanges
,django.db.models.base.Model
-
exception
DoesNotExist
¶ Bases :
django.core.exceptions.ObjectDoesNotExist
-
exception
MultipleObjectsReturned
¶ Bases :
django.core.exceptions.MultipleObjectsReturned
-
get_history_type_display
(*, field=<django.db.models.fields.CharField: history_type>)¶
-
get_next_by_history_date
(*, field=<django.db.models.fields.DateTimeField: history_date>, is_next=True, **kwargs)¶
-
get_previous_by_history_date
(*, field=<django.db.models.fields.DateTimeField: history_date>, is_next=False, **kwargs)¶
-
history_change_reason
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
history_date
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
history_id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
history_object
¶
-
history_type
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
history_user
¶ Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
-
history_user_id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
instance
¶
-
name
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
next_record
¶ Get the next history record for the instance. None if last.
-
objects
= <django.db.models.manager.Manager object>¶
-
prev_record
¶ Get the previous history record for the instance. None if first.
-
revert_url
()¶ URL for this change in the default admin site.
-
exception
-
class
users.models.
HistoricalWhiteListHistory
(id, paymentDate, endDate, duration, user, coopeman, history_id, history_change_reason, history_date, history_user, history_type)¶ Bases :
simple_history.models.HistoricalChanges
,django.db.models.base.Model
-
exception
DoesNotExist
¶ Bases :
django.core.exceptions.ObjectDoesNotExist
-
exception
MultipleObjectsReturned
¶ Bases :
django.core.exceptions.MultipleObjectsReturned
-
coopeman
¶ Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
-
coopeman_id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
duration
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
endDate
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
get_history_type_display
(*, field=<django.db.models.fields.CharField: history_type>)¶
-
get_next_by_endDate
(*, field=<django.db.models.fields.DateTimeField: endDate>, is_next=True, **kwargs)¶
-
get_next_by_history_date
(*, field=<django.db.models.fields.DateTimeField: history_date>, is_next=True, **kwargs)¶
-
get_next_by_paymentDate
(*, field=<django.db.models.fields.DateTimeField: paymentDate>, is_next=True, **kwargs)¶
-
get_previous_by_endDate
(*, field=<django.db.models.fields.DateTimeField: endDate>, is_next=False, **kwargs)¶
-
get_previous_by_history_date
(*, field=<django.db.models.fields.DateTimeField: history_date>, is_next=False, **kwargs)¶
-
get_previous_by_paymentDate
(*, field=<django.db.models.fields.DateTimeField: paymentDate>, is_next=False, **kwargs)¶
-
history_change_reason
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
history_date
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
history_id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
history_object
¶
-
history_type
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
history_user
¶ Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
-
history_user_id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
instance
¶
-
instance_type
¶ alias de
WhiteListHistory
-
next_record
¶ Get the next history record for the instance. None if last.
-
objects
= <django.db.models.manager.Manager object>¶
-
paymentDate
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
prev_record
¶ Get the previous history record for the instance. None if first.
-
revert_url
()¶ URL for this change in the default admin site.
-
user
¶ Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
-
user_id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
exception
-
class
users.models.
Profile
(*args, **kwargs)¶ Bases :
django.db.models.base.Model
Stores user profile
-
exception
DoesNotExist
¶ Bases :
django.core.exceptions.ObjectDoesNotExist
-
exception
MultipleObjectsReturned
¶ Bases :
django.core.exceptions.MultipleObjectsReturned
-
alcohol
¶ Computes ingerated alcohol
-
balance
¶ Computes user balance
-
cotisationEnd
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
credit
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
debit
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
history
= <simple_history.manager.HistoryManager object>¶
-
id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
is_adherent
¶ Test if a user is adherent
-
nb_pintes
¶ Return the number of pintes currently owned
-
objects
= <django.db.models.manager.Manager object>¶
-
positiveBalance
()¶ Test if the user balance is positive or null
-
rank
¶ Computes the rank (by debit) of the user
-
save_without_historical_record
(*args, **kwargs)¶ Save model without saving a historical record
Make sure you know what you’re doing before you use this method.
-
school
¶ Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
-
school_id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
user
¶ Accessor to the related object on the forward side of a one-to-one relation.
In the example:
class Restaurant(Model): place = OneToOneField(Place, related_name='restaurant')
Restaurant.place
is aForwardOneToOneDescriptor
instance.
-
user_id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
exception
-
class
users.models.
School
(*args, **kwargs)¶ Bases :
django.db.models.base.Model
Stores school
-
exception
DoesNotExist
¶ Bases :
django.core.exceptions.ObjectDoesNotExist
-
exception
MultipleObjectsReturned
¶ Bases :
django.core.exceptions.MultipleObjectsReturned
-
history
= <simple_history.manager.HistoryManager object>¶
-
id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
name
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
objects
= <django.db.models.manager.Manager object>¶
-
profile_set
¶ Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
save_without_historical_record
(*args, **kwargs)¶ Save model without saving a historical record
Make sure you know what you’re doing before you use this method.
-
exception
-
class
users.models.
WhiteListHistory
(*args, **kwargs)¶ Bases :
django.db.models.base.Model
Stores whitelist history
-
exception
DoesNotExist
¶ Bases :
django.core.exceptions.ObjectDoesNotExist
-
exception
MultipleObjectsReturned
¶ Bases :
django.core.exceptions.MultipleObjectsReturned
-
coopeman
¶ Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
-
coopeman_id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
duration
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
endDate
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
get_next_by_endDate
(*, field=<django.db.models.fields.DateTimeField: endDate>, is_next=True, **kwargs)¶
-
get_next_by_paymentDate
(*, field=<django.db.models.fields.DateTimeField: paymentDate>, is_next=True, **kwargs)¶
-
get_previous_by_endDate
(*, field=<django.db.models.fields.DateTimeField: endDate>, is_next=False, **kwargs)¶
-
get_previous_by_paymentDate
(*, field=<django.db.models.fields.DateTimeField: paymentDate>, is_next=False, **kwargs)¶
-
history
= <simple_history.manager.HistoryManager object>¶
-
id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
objects
= <django.db.models.manager.Manager object>¶
-
paymentDate
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
save_without_historical_record
(*args, **kwargs)¶ Save model without saving a historical record
Make sure you know what you’re doing before you use this method.
-
user
¶ Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
-
user_id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
exception
-
users.models.
create_user_profile
(sender, instance, created, **kwargs)¶ Create profile when user is created
-
users.models.
save_user_profile
(sender, instance, **kwargs)¶ Save profile when user is saved
-
users.models.
str_user
(self)¶ Rewrite str method for user
users.tests module¶
users.urls module¶
-
users.urls.
path
(route, view, kwargs=None, name=None, *, Pattern=<class 'django.urls.resolvers.RoutePattern'>)¶
users.views module¶
-
class
users.views.
ActiveUsersAutocomplete
(**kwargs)¶ Bases :
dal_select2.views.Select2QuerySetView
Autocomplete for active users
-
get_queryset
()¶ Filter the queryset with GET[“q”].
-
-
class
users.views.
AdherentAutocomplete
(**kwargs)¶ Bases :
dal_select2.views.Select2QuerySetView
Autocomplete for adherents
-
get_queryset
()¶ Filter the queryset with GET[“q”].
-
-
class
users.views.
AllUsersAutocomplete
(**kwargs)¶ Bases :
dal_select2.views.Select2QuerySetView
Autcomplete for all users
-
get_queryset
()¶ Filter the queryset with GET[“q”].
-
-
class
users.views.
NonAdminUserAutocomplete
(**kwargs)¶ Bases :
dal_select2.views.Select2QuerySetView
Autocomplete for non-admin users
-
get_queryset
()¶ Filter the queryset with GET[“q”].
-
-
class
users.views.
NonSuperUserAutocomplete
(**kwargs)¶ Bases :
dal_select2.views.Select2QuerySetView
Autocomplete for non-superuser users
-
get_queryset
()¶ Filter the queryset with GET[“q”].
-
-
users.views.
export_csv
(request)¶


Include in Results
The query Duplicate rows
Output size limit
None Lines MB
Format and Destination
Browser HTML CSV ( ) Text (tab delimited) XML
File CSV ( ) Text (tab delimited)
Excel
Include in output
Sort Criteria
Subject ID starts with MNI JHU UCLA UT Others:
Title: Filter on: Field: attribute.attribute_id attribute.name attribute.description attribute.entity_id attribute.units Operator: = Not equal (!=) < > <= >= Contains Starts With IS NULL IS NOT NULL Values from: Table: Field: Label: Show me a list of all tables and columns
Speaks none English Spanish Danish Japenese Other


Welcome to Pat's Salmon Cookies Confectionery
Home
Sales
About Us
These are the images we need to use. Added a li style for the salmon.


Red Player
Human
Random
Custom
Stats
Played
0
Wins
0
Win Rate
0%
Losses
0
Draws
0
Avg Time
0ms
Max Time
0ms
Waiting for red
Restart
Yellow Player
Human
Random
Custom
Stats
Played
0
Wins
0
Win Rate
0%
Losses
0
Draws
0
Avg Time
0ms
Max Time
0ms


Component: tos.sensorboards.mts300.MagReadP
configuration MagReadP
- Author:
-
Hu Siquan<EMAIL_ADDRESS>Revision: $Revision: 1.4 $
Provides
interface
Read<uint16_t> as
MagX[uint8_t]
interface
Read<uint16_t> as
MagY[uint8_t]
Uses
interface
Read<uint16_t> as
ActualX[uint8_t]
interface
Read<uint16_t> as
ActualY[uint8_t]
Wiring


{% extends 'home/base.html' %} {% load humanize %} {% load staticfiles %} {% load performance_extras %} {% block content %}
| {{ COMMUNITY_HEALTH_WORKER_LABEL }} | Number of days worked |
Found | Residential | Average structures found per day |
Average start time | Average end time | Duration in field | ||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Residential | Non-Residential | All Received | Some Received | None Received | |||||||
| {{ row.name }} | {% else %}{{ row.name }} | {% endif %}{{ row.no_of_days_worked|intcomma }} | {{ row.sprayable|intcomma }} | {{ row.not_eligible|intcomma }} | {{ row.custom.all_received }} | {{ row.custom.some_received }} | {{ row.custom.none_received }} | {{row.avg_structures_per_so|floatformat:"0" }} | {{ row.avg_start_time|format_avg_time }} | {{ row.avg_end_time|format_avg_time }} | {% avg_time_interval row.avg_end_time row.avg_start_time %} |
| Totals | {{ totals.no_of_days_worked|intcomma }} | {{ totals.sprayable|intcomma }} | {{ totals.not_eligible|intcomma }} | {{ totals.custom.all_received }} | {{ totals.custom.some_received }} | {{ totals.custom.none_received }} | {{ totals.avg_structures_per_so|floatformat:"0" }} | {{ totals.avg_start_time|format_avg_time }} | {{ totals.avg_end_time|format_avg_time }} | {% avg_time_interval totals.avg_end_time totals.avg_start_time %} |


Introduction to Vector Calculus
In vector calculus, there are three important operations that are related to $\nabla$, the vector differential operator.
$\nabla$ can be operated on both scalar and vector fields.
Scalar Field $\Omega( \mathbf{r} )$
A scalar field is a function that outputs a scalar value, given $n$ independent variables in $\mathbb{R}^n$.
It assigns a scalar value to every point in space. A nice example of a scalar field is an elevation map as seen on the right.
The elevation value, which is a scalar value, depends on the $x$ and $y$ coordinate values on the map.
Countour lines or colours are usually used to represent the "height" of the function value, as seen in the map.
Some other examples of scalar fields are temperature of a room, pressure distribution in a fluid etc.
Vector Field $\mathbf{f}( \mathbf{r} )$
A vector field is very similar to a scalar field, except that the function outputs a vector, given $n$ independent variables in $\mathbb{R}^n$.
It is used to represent vectorial information.
For example, the ocean current map on the right is an example of a vector field that depends on the $x$ and $y$ coordinates.
At any position, the function assigns a vector that indicates the speed and direction of the ocean current.
Other examples of vector fields are electric and magnetic fields.
$\nabla \Omega,$ $\nabla \cdot \mathbf{f},$ $\nabla \times \mathbf{f}$
In 3D Cartesian coordinates, $\nabla$ is given by
$$ \nabla = \mathbf{\hat{i}} \frac {\partial}{\partial x} + \mathbf{\hat{j}} \frac {\partial}{\partial y} + \mathbf{\hat{k}} \frac {\partial}{\partial z} .$$
$\nabla$ operates on a scalar field $\Omega$ in one way, that is:
$$\nabla \Omega .$$
This returns a vector field, which is the gradient field of $\Omega$.
On the other hand, $\nabla$ can operate on a vector field $\mathbf{f}$ in two ways, namely
$$\nabla \cdot \mathbf{f}$$ and $$\nabla \times \mathbf{f},$$
which give the divergence (scalar) and the curl (vector) of a vector field respectively.
In this visualisation suite, we will be placing our focus on the meaning of grad, divergence and curl
instead of their mathematical derivations in the following sections,
in order to provide a physical intuition to what $\nabla$ means, both microscopically and macroscopically.


What's New in LSDK 19.06
Highlights
-
Support of the dual kernel, LTS 4.14.122 and LTS 4.19.46
- U-boot v2019.04 uprev
- The distribution of NXP LSDK Userland including Ubuntu main packages and NXP packages
- Integration of LS1046A FRWY
- Base platform boot with ACPI on LX2160A RDB. Refer to Chapter 5.4 UEFI for the list of supported features
- No formal support of 32-bit kernel space on 64-bit devices
- Removal of Linux backplane driver, which will be releases separately
- Support of DPDK 18.11, OVS 2.11, Pktgen 3.6.6 and VPP 19.01
- Flexbuild: support of new layout of SD partitions and auto deployment, support of automatic download and deployment of distro images and more than 5 partitions based on 4KiB limitation of partition table for SD boot MC 10.16.2 update
- Inclusion of fixes for Linux TCP DoS Attack - SACK CVE 2019-11477
- Inclusion of several software fixes. Refer to Fixed, Open, and Closed Issues which has a list of all fixed issues
- Inclusion of additional workarounds for Chip Errata: A-008098, A-009460, A-010131, A-010635, A-011270, A-050106
List of changes:
Processor and Board Support
NXP LSDK Userland
- The distribution of NXP LSDK Userland including Ubuntu main packages and NXP packages
Linux Kernel Core, Virtualization
- LTS kernel 4.14.122 update
- LTS kernel 4.19.46 update
Linux Kernel Drivers
- DPAA1.x QBMan kexec support
- IEEE1588: linuxptp replacing ptpd2 for testing
- Inclusion of fixes for Linux TCP DoS Attack - SACK CVE 2019-11477
- LX2160A: CEETM, CPU idle
- LS1046A FRWY: Clock, eDMA, Ethernet, GIC, I2C, micro-SD, NAND, OCRAM, PCIe-Gen3 RC, QSPI access to NOR flash, QDMA, SEC, UART, USB
Data Plane Development Kit (DPDK)
- Support of DPDK 18.11
- Support of LS1046A FRWY
- Support of Pktgen 3.6.6
- Support of VPP 19.01
Virtualization - OVS-DPDK
- Support for LS1046A FRWY
- Support for OVS 2.11
Trust Firmware - A (TF-A)
U-Boot Boot Loader
- U-boot v2019.04 update
- LS1046A FRWY: Boot from QSPI NOR flash and micro-SD, clock, DDR4, Ethernet, GIC, I2C, NAND, OCRAM, PCIe-Gen3, USB, UART
- LX2160A: Negate IRQ signal in GIC for AQR107 interrupt pins
Unified Extensible Firmware Interface (UEFI)
- LX2160A: Base platform boot with ACPI on RDB. Refer to Chapter 5.4 UEFI for the list of supported features
EdgeScale - Edge Compute
- Support of LS1046A FRWY
- Secure Manufacturing
- Key and fuse config management
- Device enrollment with fused device identity
- EgdeScale Device Agent Enhancement
- Reconnecting cloud when network is down and up
- Keeping docker images during OTA updates
Other Tools and Utilities
- Flexbuild
- Flex-builder
- Support of new layout of SD partitions and auto deployment
- Support of docker-ce arm32 and arm64 built from source instead of apt installation
- Support of the uprev of dpdk, ovs-dpdk, pktgen_dpdk and vpp
- Support of multiple scales of LSDK userland (main, edgescale, etc.)
- Optimization of building for secure boot Chain of Trust with confidentiality Removal of ARMv8 32bit
- Flex-installer
- Support of automatic download and deployment of distro images
- Support of more than 5 partitions based on 4KiB limitation of partition table for SD boot
- Support of configurable multiple partitions with '-p ' option in
- flex-installer cmdline
- Support of dual system boot on single storage device
- MC upgrade to 10.16.2
- Soft Parser Configuration Tool
- Support of 'load-on-parser' and 'load-protocol' option


Admin panel
All
Outgoing
Incoming
Sort
Sort by Amount - Ascending
Sort by Amount - Descending
Sort by Date - Ascending
Sort by Date - Descending
FILTER
DATE
TYPE
SENDER
RECEIVER
AMOUNT
$


Grace Canyon Resort |
||
|---|---|---|
| Page Titles | ||
| Address | Title | |
| https://c0r8s03.github.io/Grace-Canyon-resort/ | Grand Canyon Resort | |
| https://c0r8s03.github.io/Grace-Canyon-resort/faqs.html | Grand Canyon Resort FAQs. | |
| https://c0r8s03.github.io/Grace-Canyon-resort/Sitemap.html | Grand Canyon Resort Sitemap. | |
| https://c0r8s03.github.io/Grace-Canyon-resort/contact.html | Grand Canyon Resort Contact. | |
| https://c0r8s03.github.io/Grace-Canyon-resort/policy.html | Grand Canyon Resort Privacy Policy. |


DEFAULT
BIG
DIRECTION
KEEPOPEN
LEVEL
-15
-10
-5
0
5
10
12
Dot
-15
-10
-5
0
5
10
12
Band
VERTICAL
OPACITY


I tried to parse both strings calling the parser directly from komodod
std::string str1 = "{\"method\": \"cclib\", \"params\": [\"func0\", \"17\", \"{\"key\": \"striiiiiing\"}\"]}";
std::string str2 = "{\"method\": \"cclib\", \"params\": [\"func0\", \"17\", {\"key\": \"striiiiiing\"}]}";
so the str1 could not be parsed and str2 was parsed okay. Seems the parser works correctly. It is somewhere else that requires quotes for objects


Module Isaac
General API for interacting with the game.
Functions
| Vector (x, y) | 2D Vector object table. |
| GetFrameCount () | Number of frames passed since the game started. |
| Spawn (type, id, UNKNOWN, position, UNKNOWN) | Spawn an entity. |
| GetPlayerTypeByName (name) | Get the type of the current player (character) by its name. |
| RenderText (text, x, y) | Render text on the screen. |
Functions
- Vector (x, y)
-
2D Vector object table.
Parameters:
- x X coordinate.
- y Y coordinate.
Returns:
-
UNKNOWN, probably userdata or table
- GetFrameCount ()
-
Number of frames passed since the game started.
Returns:
-
number
- Spawn (type, id, UNKNOWN, position, UNKNOWN)
-
Spawn an entity.
Parameters:
- type Type of the entity (EntityType).
- id Numerical ID of the entity.
- UNKNOWN Unknown argument (no context to confirm).
- position Vector of position.
- UNKNOWN Unknown argument (no context to confirm).
Returns:
-
UNKNOWN, suspected nil
- GetPlayerTypeByName (name)
-
Get the type of the current player (character) by its name.
Parameters:
- name Name of the player (character).
Returns:
-
number
- RenderText (text, x, y)
-
Render text on the screen.
Parameters:
- text Text to render.
- x X position of the text.
- y Y position of the text.
Returns:
-
UNKNOWN, suspected nil


This time the challenge proposed is a Match 3 game, like Bejeweled made by PopCap, Candy Crush Saga from King, or Frozen Free Fall developed by Genera Interactive who proposed me this challenge.
The objective of the game is quite simple, you have to change a tile by an adjacent (up,down,right or left) in order to get 3 (or more) tiles in a row or column, if there isn't a match of 3, tiles will swap back to their position, else if the match exists, all the tiles in the match will disapear. Then the above tiles will fall to fill the blanks and new ones will be created to fill in the blanks at the top of the board.
Click on the image below to play it. To swap the tiles, click on the two tiles.


SUBMITTED BY: Rachael Ray A tasty apple gravy perks up chicken breasts. Complete the meal with cheesy rice pilaf and peas and green beans Serves 4
Buy Green Apple 16-pc Round & Square Dinnerware Set by Rachael Ray at Cooking. com Get Tableware and Rachael Ray, along with reviews, home
Buy Rachael Ray 'Round and Square' 4-piece Green Apple Pasta Bowl Set at an everyday discount price on Overstock com! Get everyday free. shipping over Buy Rachael Ray 'Round and Square' 4-piece Green Apple Mug Set at an everyday discount price on Overstock com! Get everyday free shipping over $50*. Sometime things that look like a curse, bump us to beautiful areas in our lives. Linda Evans Life is a gift Appreciate it and offer your gift to others Linda
Curious about how many calories are in Instant Oatmeal, Apple Cranberry? Get nutrition information and sign up for a free online diet program at CalorieCount Curious about how many calories are in Apple Cinnamon Instant Oatmeal? Get nutrition information and sign up for a free online diet program at CalorieCount
Oct 7, 2013 THREE years ago, cooking diva RACHAEL RAY was a svelte hot tamale, but now she looks more like an overstuffed couch potato! Ray is more than just a TV host, she's a lifestyle brand Her cookbooks, like the recent My Year In Meals become best sellers, her magazine is thriving and her According to Rachael, she grew up in food "e;My first vivid memory is watching. my mom in a restaurant kitchen She was flipping something. with a spatula Get the latest Rachael Ray News, Bio, Photos, Credits and More for Rachael Ray on TVGuide com The latest from rachael. ray (@rachael_ray) TV Personality, author and cook Rachael. Ray's official Twitter Feed New York, NY USA
Get everything Rachael Ray straight from America's #1 celebrity brand, PEOPLE The latest Rachael Ray news, a full collection. of photos, fun facts and her
Celebrity chef Rachael Ray is the master of the 30 Minute Meals and a beloved TV personality. Learn more at Biography com Rachael Ray, Self: Rachael Ray. Lives in the Adirondacks with her husband, mother, a cat and two fishes. Has a younger brother named. Emmanuel (Manny) The Official Rachael Ray Store carrying all of Rachael Ray's Bakeware, Rachael Ray's Cookware and more at Rachael Ray Store. According to Rachael Ray, she grew up in food My first vivid memory is watching my mom in a restaurant kitchen She was flipping something with a spatula. According to Rachael Ray, she grew up in food My first vivid memory is watching my mom in a restaurant kitchen. She was flipping something with a spatula every day with rachael ray, rachael ray, parties, entertaining, appetizers, bite size. food, party ideas, easy parties, easy entertaining, party decorations, party


Loading...
The grading for this student has been finalised.
I hereby finalise the grading of this student. I understand no further changes can be made after this.


isEnabled
enable
disable
start advertising
discover devices
connect
send message
read incoming message
disconnect


Home
About Our Team
Map
Translate
Translation
Type a message and select a language, then click submit to translate it.
English
Chinese
Spanish
Hindi
Arabic
Translate


BLACK CAT (director/writer: Edgar G. Ulmer; screenwriter: from an Edgar Allan Poe story/Peter Ruric; cinematographer: John Mescall; cast: Boris Karloff (Hjalmar Poelzig), Bela Lugosi (Dr. Vitus Werdegast), David Manners (Peter Alison), Henry Armetta (Sergeant), Jacqueline Wells [later known as Julie Bishop] (Joan Allison), Lucille Lund (Karen Werdegast Poelzig), Albert Conti (Lieutenant), Egon Brecher (Majordomo), Harry Cording (Thamal), John Carradine (Cult Organist), George Davis (Bus Driver), Andre Cheron (Train Conductor), 1934)
Reviewed by Dennis Schwartz
Edgar G. Ulmer (Detour/Strange Illusion/The Naked Dawn), the German émigré to America, reportedly said that he directed 128 films in various countries such as the U.S., Italy, Mexico, Spain, and Germany. Coming to the States with Murnau, Ulmer worked on Sunrise (27) and Tabu (29), before directing his first talkie, Damaged Lives, which told about the early treatments for venereal disease. The 30-year-old director became friends with Carl Laemmle, Jr., the Universal producer who thought of him as an intellectual. He was the producer of the Black Cat and liked Ulmer's idea of teaming up Karloff and Lugosi for the first time in a film, and therefore encouraged him to make the film. Those two great legends in the horror field went on from here to make a total of seven films together, but none as co-stars with equal parts, or in a feature that was as good as this one was. In most of their films together, Lugosi, who was the poorer actor of the two because of his limited English, was always cast in the lesser role.
Even though this film was supposed to be based on an Edgar Allen Poe story, the Poe story was replaced by the work Ulmer collaborated with George Sims, who wrote books as Paul Cain and film scripts as Peter Ruric. Sim's fame rests on his articles for Black Mask magazine writing as Paul Cain. His novel Fast One is considered by many as the best hard-boiled novel ever. The script for this film was altered so much, that the only thing remaining from Poe's story, is the brief appearance of the black cat in the film. Though the film does evoke the mood of a Poe story and the feelings of Kafka.
What influenced this film most, was the sensational trial of Aleister Crowley, a Satanist who thought of himself as a personification of evil, who took artist Nina Hammett to court because she ratted him out about his devil-cult worship seances in her autobiography. The Crowley characterization was by Boris Karloff, who played the role of Hjalmar Poelzig.
The film begins with a journey for a young American couple on a honeymoon to Hungary on the Orient Express, wishing to go to a honeymoon resort in Gombos to consumate their marriage. Peter Allison (David Manners) and his bride Joan (Jacqueline Wells), are a pair of bland innocents, just having left their wedding reception to board the train. The conductor tells them there has been a slight mixup regarding tickets and that this strange, aristocratic fellow standing there, Dr. Vitus Werdegast (Bela Lugosi), has been given the same train compartment as they have and could they accomodate him. He is a noted Hungarian psychiatrist recently released from serving fifteen years in a Russian prison, a horrible place called Kurgaal, where one's soul is slowly being robbed and few men return from there alive. He hasn't been home for eighteen years since he joined the army.
When a traveling bag from the rack above almost falls on Joan, Vitus muses philosophically in his heavy Hungarian accent, as he catches the bag before it hits the startled girl, "It is better to be scared than to be crushed."
When the trio's bus from the train station goes over an area the bus driver tells them was one of the greatest battlefields of the war and is now "the greatest graveyard in the world," Vitus winces at the memories. That there were ten thousand deaths here, and that on that hill over there, the architect Hjalmar Poelzig (Boris Karloff) now lives, which was the site of Fort Marmaros and then made into a concentration camp. That we learn from the bus driver that he built the ultra-modern Bauhaus styled mansion on the very spot that was the bloodiest one in the battle, which adds to the dark mood of the night. Vitus will later on mention that Hjalmar was the commander of that fort and sold out his own men to the Russians so that he could spare his life. He has since become the leader of a satanic cult. And, that he has been tracking him down ever since he learned that he took his wife to America and other places in Europe, before coming back here.
Due to the heavy rain, the bus looses control and goes over the side of the road and Joan gets knocked slightly unconscious, so Vitus takes them to Poelzig's mansion, where he bandages her superficial shoulder wound and he also gives her a narcotic injection so she can sleep. Poelzig is asleep with his wife, when his servant, the mute Majordomo (Egon Brecher), awakens him and he arises in a stiff-manner with his silhouette on the wall panel, and he walks trance-like in his pajamas to greet his guests, not saying anything, but the relationship between the two so-called friends is cordial but strained. While greeting his guests, Poelzig seems to look at Joan in a lustful way, as the innocent Peter has no idea of what he got himself into. He will mention that he is a writer of mystery books, and he quickly adds, books that are unimportant, and that if he had any sense he would be honeymooning in Niagara Falls. He is a characterization of the screenwriter, Peter Ruric.
The theme of good versus evil unfolds as the men of science are locked in a life-and-death conflict, as Vitus, along with his loyal mute servant Thamal (Harry Cording), have come here for only one purpose, to kill their evil Austrian host.  When Vitus confronts him about where she is and where his 18-year-old daughter is, he is told that his wife is dead, that she died of pneumonia two years after the war and that his daughter is also dead.
A very bizarre scene takes place when the black cat of the host appears and Vitus becomes terribly agitated and throws a knife instantly killing the cat with the glowing eyes. But Poelzig is not upset, as he says the cat is deathless, "Deathless as Evil." He goes on to say, "It is the origin of the common superstition. You know, the cat with nine lives." He then offers an excuse for Vitus's action, saying he has a common phobia, but in an extreme form. That the result is an intense horror of cats. Vitus, visibly shaken, states that the black cat is a symbol of evil. Also present in the room are Peter and his wife; she enters the room in a sleepwalking state, moving as gracefully as a feline.
Vitus confronts Poelzig when the host visits his bedroom later on at night by asking, "Where is my wife?" Poelzig then takes him to her, as they both descend a staircase to arrive at the iron door of the dank cellar and then go down a second flight of spiraling stairs into the former old Ft. Marmaros, now a tomb-like mausoleum that houses the underground vaults and they come upon a glass casement with Vitus's beautiful wife preserved in it. There's not much action, but it is very eerie to watch this strange scene.
 He proposes that they play a little game of death. But he says, we shall have to wait until these people have gone and we are alone.
Poelzig when he is back in his room tells his young bride not to leave her room while the guests are here, and he reads in bed a book describing the Rites of Lucifer: it demands that a virgin be sacrificed in its satanic ritual. This ceremony is to take place tomorrow night, and Poelzig has his eye on Joan as his human sacrifice.
The next day Joan is fully recovered and the couple is ready to leave this hideous place, while Vitus and Poelzig play a game of chess to see if she is to be the sacrifice in the Black Mass ritual. Poelzig wins the game, as he knew he would. But they are interrupted by two comical policemen on bicycles, who question the guests about the accident last night. When the American couple asks the policemen to give them a ride to the train station, the police say it is not possible on their bikes. Poelzig pretends to have his servant give them a ride in his car, but he comes back to say the car is broken. The couple also find that all the telephones are dead.
While trying to get out of the house with his wife, even to walk to town if necessary, Peter gets knocked out by Thamal (he has been ordered by Vitus to follow Poelzig's instructions), and he is locked in a room downstairs, while she returns to the bedroom.
When Joan goes back to her room Poelzig's wife Karen (also played by Lunt) accidently comes into the room, and as they start talking, it is determined that her name is Karen Werdegast, and it is revealed to her that her father is alive; and, to Joan, it becomes clear that Vitus's daughter is not dead, but has married Poelzig. Angrily Poelzig comes into the room, and ushers his wife out.

In the evening, the satanic cult ceremony takes place, with Vitus there as one of the invited guests. The men are in black tuxedos and the women are dressed in white for the ceremony. Poelzig leads the devil-worshipping cult into the main hall of his house, and starts chanting in Latin. Joan is tied up on a crucifix, as Poelzig chants a litany over her body, offering her soul and body to Satan.
When one of the cultists faints, Vitus takes advantage of the confusion and has his servant help him free Joan, and they quickly get her out of the room. Peter has also freed himself from the locked room but gets knocked out by the Majordomo. When the escapees meet the Majordome there is shoot-out and the Majordomo is killed and Thamal is severely wounded.
Joan blurts out to Vitus the news about his daughter being alive and married to Poelzig. In a crazed daze Vitus goes searching the house for her, he eventually finds her dead on the table of the embalming room.
Peter having regained consciousness hears Joan's screams and asks her to get the key to the room from the dead Thamal's hands that are clutching it. But she isn't strong enough to, so Vitus takes time out from his flailing and tries to help her, but Peter misunderstands Vitus's gesture, thinking he is an enemy, and severely wounds him with a gun shot.
Vitus tells the couple to get out of there fast, and they run out of the house, as Vitus finds the switch for the house to be dynamited and sets the timer for five minutes. He thereby blows all the cultist up as well as himself and Poelzig.
The last shot in the film is of the relieved couple on a train to Budapest, and Peter laughing about the mixed review his mystery novel about a triple murder received from a critic, as the critic says that he overstepped the bounds of credibility. Peter just stares incredulously at his wife and they both chuckle.
The film is very strong on atmosphere, shot in the style of German expressionism. It is not as strong on plot development or of the story making complete sense. There are a number things that are left unexplained, such as how did Vitus know about the dynamite and why did Vitus order his servant to obey his enemy. But as a film shot originally as a programmer for Universal, this horror film turns out to be a work of true art, and is still one of the best horror films ever made. It is a film of subtle and subversive gestures and one that sets a disquieting mood. It scans the gamut in the field of the bizarre, from necromancy to devil-worship. This is Ulmer's masterpiece, his defining work.
REVIEWED ON 1/4/99 GRADE: A
Dennis Schwartz: "Ozus' World Movie Reviews"
http://www.sover.net/~ozus
<EMAIL_ADDRESS>© ALL RIGHTS RESERVED DENNIS SCHWARTZ
The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews


- monitor wages
- track hours worked
- know average income
- hourly rate
- total income
- taxable income
- total orders completed
- average orders a day
- busy times to work based on order numbers completed
Weather Information
- weather alerts
- windy website data
Equipment Manager
- upload information on your bicycle
- get alerts for when to service or repair
Schedular Manager
- sync with googgle calander for when your working
- set reminders when to take break or book shifts based on forcasted busy periods
Social
- connect with other ryders
- talk and share info with ryders


This inspection only reports if the language level of the project or module is 7 or higher
Quick fix: adds underscores into numeric literals. E.g. 1000000 will be converted to 1_000_000.
New in 2020.2


Traffic * * * * (out of * * * * )
Directed by Steven Soderbergh. Cast: Benicio Del Toro, Michael Douglas, Don Cheadle, Catherine Zeta-Jones, Erika Christensen, Luis Guzman, Jacob Vargas, Dennis Quaid, Amy Irving, Topher Grace, Miguel Ferrer, Steven Bauer, Clifton Collins Jr., James Brolin, Benjamin Bratt, Majandra Delfino, Corey Spears, Peter Reigert, Marisol Pedilla Sanchez, Tomas Milian, Albert Finney, D.W. Moffett, Joel Torres. 2000 - 147 minutes Rated R (for profanity, violence, extreme drug use, sex, and nudity). Reviewed by Dustin Putman, January 6, 2001.
A sprawling, candid mosaic of the controversial, bitter war on drugs in the United States, Steven Soderbergh's "Traffic," loosely based on the 1989 BBC miniseries, "Traffik," offers no easy answers, nor does he attempt to sugarcoat the bleak topic into something that can ever change in today's society. Presenting a wide array of characters from different social standings, and showing how drugs have the power to impact everyone's life in one way or another, the film is truly spellbinding and often thought-provoking from its beginning to the end, 2 1/2-hours later.
Filmed in alternate, cleverly chosen hues, depending on where the scene is set and which storyline we are involved in, director Soderbergh (who also acted as the cameraman, under the pseudonym Peter Andrews) adapts a "you-are-there" style of filmmaking, with shaky, hand-held shots, and a screenplay, expertly developed by Stephen Gaghan, that is never anything less than convincing. The enormous, flawlessly-chosen cast, with each performance pitch-perfect, work as a unit in order to bring their roles to life, aiding in the entire picture's almost frightening, harsh realism. And Steven Soderbergh (who had great luck earlier in the year with the more mainstream, yet inferior, "Erin Brockovich") joins Robert Altman (1975's "Nashville") and Paul Thomas Anderson (1999's "Magnolia") as one of the only contemporary filmmakers to successfully make an ensemble film with such an ambitious, epic scope.
The first subplot is set in Tijuana, with Javier Rodriguez (Benecio Del Toro) and Manolo Sanchez (Jacob Vargas) two cops out to bust a planned cocaine transfer in the middle of the desert. Their plan goes awry when Army General Salazar (Tomas Milian) intercepts, later employing Javier and Manolo to find and capture hired assassin Francisco Flores (Clifton Collins Jr.), who is, in turn, linked to wealthy drug dealer Carlos Ayala (Steven Bauer).
Living in San Diego, California, Carlos is arrested and handcuffed, much to the dismay of his pampered wife, Helena (Catherine Zeta-Jones). Helena, who is six months pregnant with her second child, is clueless as to why her husband has been taken to prison until she is clued in by her defense lawyer Arnie Metzger (Dennis Quaid) on why they, in fact, have so much money. Desperate to get Carlos off the hook, and with her son in danger if she doesn't come up with $3-million, Helena finds herself taking over her husband's illegal business in an attempt to return everything to the way it was.
Meanwhile, Ohio Supreme Court Justice Robert Wakefield (Michael Douglas) is appointed Drug Czar for Washington, D.C., which takes him away from his Cincinatti-based family for long stretches of time. As Robert prepares to grasp the U.S.'s drug problems by the throat, he has no idea that his 16-year-old daughter, Caroline (Erika Christensen), a straight-A honor student, has been introduced by her prep school friends to freebasing heroin, and is slowly wavering out of control.
In the style of the aforementioned "Nashville" and "Magnolia," there are no main characters in "Traffic," nor are there any outright heroes or villains. The movie features, not one, but many different plotlines, each of which evolves as things do in real life, rather than the way they are expected to by the viewer. And every actor stunningly supports the next as they portray flawed individuals who have, in some way, become involved with today's distressing drug culture.
The performances are first-rate across the board, any one of which is more than worthy of notice. Benicio Del Toro (2000's "The Way of the Gun") is almost always the standout feature of any movie in which his presence graces, and he is no exception here. As the inherently honest Javier, Del Toro steals the show whenever he appears, and proves what an extraordinary physical aura he gives off, reminiscent of Russell Crowe or Brad Pitt. It seems Del Toro is almost too big of a star to even fit on camera, let alone in any movie that is nothing less than equal to his talents.
As DEA agents Montel Gordon and Ray Castro, whose sting operation of drug dealer Eduardo Ruiz (Miguel Ferrer) leads them to the arrest of Carlos Ayala, Don Cheadle (1997's "Boogie Nights") and Luis Guzman ("Magnolia") develop a close-relationed camaraderie that acts as one of the major emotional centers of the whole picture. Cheadle is especially outstanding in a truly likable turn.

In the most effective of the subplots, Michael Douglas (2000's "Wonder Boys") underplays to ultimate perfection his role as Robert Wakefield, a man passionate about making a difference concerning today's drug problems, yet too naive and focused on his work to realize he has an addict living within the walls of his own house. Lending fine support in one of the strongest minor roles, Amy Irving (1976's "Carrie") is quietly effective as Robert's lonely wife, Barbara, who blames herself when their daughter's life spins out of control.
Finally, newcomer Erika Christensen, as Robert's teenage daughter, Caroline, makes an unforgettable debut with the most heartbreaking character in the film. In the early scenes, which show Caroline recreationally taking drugs with her pals from school, including Topher Grace (TV's "That '70s Show") and Majandra Delfino (TV's "Roswell"), there is an accuracy present that rarely is achieved in the world of film. The sequence where Caroline is first introduced to heroin, which is followed by a single tear dropping down her cheek as she exhales from freebasing for the first time, is one of the most haunting images I've ever seen depicted on film. Christensen, like Soderbergh's treatment of this portion of the film, injects Caroline with such a tragic, raw power that it is often almost too difficult to watch.
Director Soderbergh has made his share of fine films in the past, not the least of being his acclaimed 1989 breakthrough, "Sex, Lies & Videotape," but "Traffic" is the very first of his efforts that could easily be considered a masterpiece. Always involving, always intelligent, and never coy about its high aspirations, Soderbergh wants each viewer to take something a little different away from the film, not necessarily caring what that one thing might be as long as he's sure it won't soon be forgotten. A grand entertainment, "Traffic" is one of the best Hollywood productions to come out of the pipeline in years, and its final statement is one of unshakable and disturbing finality. The drug culture in the United States, states Soderbergh, is a war that can most certainly be fought, but one that is never likely to be won.
- Copyright 2001 by Dustin Putman Http://us.imdb.com/ReviewsBy?Dustin+Putman ( Reviews by Dustin Putman ) Http://www.atnzone.com ( NZone Magazine )
The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews


[1]:
# Copyright 2020 NVIDIA Corporation. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ==============================================================================
Object Detection with TRTorch (SSD) ¶
Overview ¶
In PyTorch 1.0, TorchScript was introduced as a method to separate your PyTorch model from Python, make it portable and optimizable.
TRTorch is a compiler that uses TensorRT (NVIDIA’s Deep Learning Optimization SDK and Runtime) to optimize TorchScript code. It compiles standard TorchScript modules into ones that internally run with TensorRT optimizations.
TensorRT can take models from any major framework and specifically tune them to perform better on specific target hardware in the NVIDIA family, and TRTorch enables us to continue to remain in the PyTorch ecosystem whilst doing so. This allows us to leverage the great features in PyTorch, including module composability, its flexible tensor implementation, data loaders and more. TRTorch is available to use with both PyTorch and LibTorch.
To get more background information on this, we suggest the lenet-getting-started notebook as a primer for getting started with TRTorch.
Learning objectives ¶
This notebook demonstrates the steps for compiling a TorchScript module with TRTorch on a pretrained SSD network, and running it to test the speedup obtained.
Contents ¶
## 1. Requirements
Follow the steps in
notebooks/README
to prepare a Docker container, within which you can run this demo notebook.
In addition to that, run the following cell to obtain additional libraries specific to this demo.
[2]:
%%capture
%%bash
# Known working versions
pip install numpy==1.19 scipy==1.5.2 Pillow==6.2.0 scikit-image==0.17.2 matplotlib==3.3.0
## 2. SSD
Single Shot MultiBox Detector model for object detection ¶
|
_ |
_ |
|---|---|
|
|
|
PyTorch has a model repository called the PyTorch Hub, which is a source for high quality implementations of common models. We can get our SSD model pretrained on COCO from there.
Model Description ¶
This SSD300 model is based on the SSD: Single Shot MultiBox Detector paper, which describes SSD as “a method for detecting objects in images using a single deep neural network”. The input size is fixed to 300x300.
The main difference between this model and the one described in the paper is in the backbone. Specifically, the VGG model is obsolete and is replaced by the ResNet-50 model.
From the Speed/accuracy trade-offs for modern convolutional object detectors paper, the following enhancements were made to the backbone: * The conv5_x, avgpool, fc and softmax layers were removed from the original classification model. * All strides in conv4_x are set to 1x1.
The backbone is followed by 5 additional convolutional layers. In addition to the convolutional layers, we attached 6 detection heads: * The first detection head is attached to the last conv4_x layer. * The other five detection heads are attached to the corresponding 5 additional layers.
Detector heads are similar to the ones referenced in the paper, however, they are enhanced by additional BatchNorm layers after each convolution.
More information about this SSD model is available at Nvidia’s “DeepLearningExamples” Github here .
[3]:
import torch
# List of available models in PyTorch Hub from Nvidia/DeepLearningExamples
torch.hub.list('NVIDIA/DeepLearningExamples:torchhub')
Using cache found in /root/.cache/torch/hub/NVIDIA_DeepLearningExamples_torchhub
[3]:
['checkpoint_from_distributed',
'nvidia_ncf',
'nvidia_ssd',
'nvidia_ssd_processing_utils',
'nvidia_tacotron2',
'nvidia_waveglow',
'unwrap_distributed']
[4]:
# load SSD model pretrained on COCO from Torch Hub
precision = 'fp32'
ssd300 = torch.hub.load('NVIDIA/DeepLearningExamples:torchhub', 'nvidia_ssd', model_math=precision);
Using cache found in /root/.cache/torch/hub/NVIDIA_DeepLearningExamples_torchhub
Setting
precision="fp16"
will load a checkpoint trained with mixed precision into architecture enabling execution on Tensor Cores. Handling mixed precision data requires the Apex library.
Sample Inference ¶
We can now run inference on the model. This is demonstrated below using sample images from the COCO 2017 Validation set.
[5]:
# Sample images from the COCO validation set
uris = [
'http://images.cocodataset.org/val2017/000000397133.jpg',
'http://images.cocodataset.org/val2017/000000037777.jpg',
'http://images.cocodataset.org/val2017/000000252219.jpg'
]
# For convenient and comprehensive formatting of input and output of the model, load a set of utility methods.
utils = torch.hub.load('NVIDIA/DeepLearningExamples:torchhub', 'nvidia_ssd_processing_utils')
# Format images to comply with the network input
inputs = [utils.prepare_input(uri) for uri in uris]
tensor = utils.prepare_tensor(inputs, False)
# The model was trained on COCO dataset, which we need to access in order to
# translate class IDs into object names.
classes_to_labels = utils.get_coco_object_dictionary()
Using cache found in /root/.cache/torch/hub/NVIDIA_DeepLearningExamples_torchhub
Downloading COCO annotations.
Downloading finished.
[6]:
# Next, we run object detection
model = ssd300.eval().to("cuda")
detections_batch = model(tensor)
# By default, raw output from SSD network per input image contains 8732 boxes with
# localization and class probability distribution.
# Let’s filter this output to only get reasonable detections (confidence>40%) in a more comprehensive format.
results_per_input = utils.decode_results(detections_batch)
best_results_per_input = [utils.pick_best(results, 0.40) for results in results_per_input]
Visualize results ¶
[7]:
from matplotlib import pyplot as plt
import matplotlib.patches as patches
# The utility plots the images and predicted bounding boxes (with confidence scores).
def plot_results(best_results):
for image_idx in range(len(best_results)):
fig, ax = plt.subplots(1)
# Show original, denormalized image...
image = inputs[image_idx] / 2 + 0.5
ax.imshow(image)
# ...with detections
bboxes, classes, confidences = best_results[image_idx]
for idx in range(len(bboxes)):
left, bot, right, top = bboxes[idx]
x, y, w, h = [val * 300 for val in [left, bot, right - left, top - bot]]
rect = patches.Rectangle((x, y), w, h, linewidth=1, edgecolor='r', facecolor='none')
ax.add_patch(rect)
ax.text(x, y, "{} {:.0f}%".format(classes_to_labels[classes[idx] - 1], confidences[idx]*100), bbox=dict(facecolor='white', alpha=0.5))
plt.show()
[8]:
# Visualize results without TRTorch/TensorRT
plot_results(best_results_per_input)
Benchmark utility ¶
[9]:
import time
import numpy as np
import torch.backends.cudnn as cudnn
cudnn.benchmark = True
# Helper function to benchmark the model
def benchmark(model, input_shape=(1024, 1, 32, 32), dtype='fp32', nwarmup=50, nruns=1000):
input_data = torch.randn(input_shape)
input_data = input_data.to("cuda")
if dtype=='fp16':
input_data = input_data.half()
print("Warm up ...")
with torch.no_grad():
for _ in range(nwarmup):
features = model(input_data)
torch.cuda.synchronize()
print("Start timing ...")
timings = []
with torch.no_grad():
for i in range(1, nruns+1):
start_time = time.time()
pred_loc, pred_label = model(input_data)
torch.cuda.synchronize()
end_time = time.time()
timings.append(end_time - start_time)
if i%100==0:
print('Iteration %d/%d, avg batch time %.2f ms'%(i, nruns, np.mean(timings)*1000))
print("Input shape:", input_data.size())
print("Output location prediction size:", pred_loc.size())
print("Output label prediction size:", pred_label.size())
print('Average batch time: %.2f ms'%(np.mean(timings)*1000))
We check how well the model performs before we use TRTorch/TensorRT
[10]:
# Model benchmark without TRTorch/TensorRT
model = ssd300.eval().to("cuda")
benchmark(model, input_shape=(128, 3, 300, 300), nruns=1000)
Warm up ...
Start timing ...
 Creating TorchScript modules
To compile with TRTorch, the model must first be in TorchScript . TorchScript is a programming language included in PyTorch which removes the Python dependency normal PyTorch models have. This conversion is done via a JIT compiler which given a PyTorch Module will generate an equivalent TorchScript Module. There are two paths that can be used to generate TorchScript: Tracing and Scripting . - Tracing follows execution of PyTorch generating ops in TorchScript corresponding to what it sees. - Scripting does an analysis of the Python code and generates TorchScript, this allows the resulting graph to include control flow which tracing cannot do.
Tracing however due to its simplicity is more likely to compile successfully with TRTorch (though both systems are supported).
[11]:
model = ssd300.eval().to("cuda")
traced_model = torch.jit.trace(model, [torch.randn((1,3,300,300)).to("cuda")])
If required, we can also save this model and use it independently of Python.
[12]:
# This is just an example, and not required for the purposes of this demo
torch.jit.save(traced_model, "ssd_300_traced.jit.pt")
[13]:
# Obtain the average time taken by a batch of input with Torchscript compiled modules
benchmark(traced_model, input_shape=(128, 3, 300, 300), nruns=1000)
Warm up ...
Start timing ...
 Compiling with TRTorch TorchScript modules behave just like normal PyTorch modules and are intercompatible. From TorchScript we can now compile a TensorRT based module. This module will still be implemented in TorchScript but all the computation will be done in TensorRT.
[14]:
import trtorch
# The compiled module will have precision as specified by "op_precision".
# Here, it will have FP16 precision.
trt_model = trtorch.compile(traced_model, {
"input_shapes": [(3, 3, 300, 300)],
"op_precision": torch.half, # Run with FP16
"workspace_size": 1 << 20
})
## 5. Running Inference
Next, we run object detection
[15]:
# using a TRTorch module is exactly the same as how we usually do inference in PyTorch i.e. model(inputs)
detections_batch = trt_model(tensor.to(torch.half)) # convert the input to half precision
# By default, raw output from SSD network per input image contains 8732 boxes with
# localization and class probability distribution.
# Let’s filter this output to only get reasonable detections (confidence>40%) in a more comprehensive format.
results_per_input = utils.decode_results(detections_batch)
best_results_per_input_trt = [utils.pick_best(results, 0.40) for results in results_per_input]
Now, let’s visualize our predictions!
[16]:
# Visualize results with TRTorch/TensorRT
plot_results(best_results_per_input_trt)
We get similar results as before!
6. Measuring Speedup ¶
We can run the benchmark function again to see the speedup gained! Compare this result with the same batch-size of input in the case without TRTorch/TensorRT above.
[17]:
batch_size = 128
# Recompiling with batch_size we use for evaluating performance
trt_model = trtorch.compile(traced_model, {
"input_shapes": [(batch_size, 3, 300, 300)],
"op_precision": torch.half, # Run with FP16
"workspace_size": 1 << 20
})
benchmark(trt_model, input_shape=(batch_size, 3, 300, 300), nruns=1000, dtype="fp16")
Warm up ...
Start timing ...
 Conclusion ¶
In this notebook, we have walked through the complete process of compiling a TorchScript SSD300 model with TRTorch, and tested the performance impact of the optimization. We find that using the TRTorch compiled model, we gain significant speedup in inference without any noticeable drop in performance!
Details ¶
For detailed information on model input and output, training recipies, inference and performance visit: github and/or NGC


{% extends 'base.html' %} {% block content %}
Do you really want to delete the printer {{ object }} in the manifest {{ manifest }} ?


Ensure that your STOMP broker supports STOMP over WebSockets. Some messaging brokers supports it out of the box while some may need special configuration or activating plugins.
bundles/
folder.StompJs
object will now be available. Read along to learn how to use it.npm
package es6-object-assign
. A simple approach: <script<EMAIL_ADDRESS>npm
package text-encoding
. A simple approach: <script<EMAIL_ADDRESS>Add npm modules @stomp/stompjs
, websocket
and text-encoding
to your project.
$ npm install @stomp/stompjs websocket text-encoding
Require the module
// This is simplest way to get going
WebSocket = require('websocket').w3cwebsocket;
// There is a proposal to add these by default in NodeJS, so good idea is to check first
if (typeof TextEncoder !== 'function') {
const TextEncodingPolyfill = require('text-encoding');
TextEncoder = TextEncodingPolyfill.TextEncoder;
TextDecoder = TextEncodingPolyfill.TextDecoder;
}
StompJs = require('@stomp/stompjs/esm5/');
StompJs
object.All options can be set/get by directly operating on the client instance:
const client = new StompJs.Client();
client.brokerURL = "ws://localhost:15674/ws";
console.log(client.brokerURL);
These can also be set passing key/value pairs to Client constructor or to Client#configure.
STOMP JavaScript clients will communicate to a STOMP server using a ws://
or wss://
URL.
const client = new StompJs.Client({
brokerURL: "ws://localhost:15674/ws",
connectHeaders: {
login: "user",
passcode: "password"
},
debug: function (str) {
console.log(str);
},
reconnectDelay: 5000,
heartbeatIncoming: 4000,
heartbeatOutgoing: 4000
});
client.onConnect = function(frame) {
// Do something, all subscribes must be done is this callback
// This is needed because this will be executed after a (re)connect
};
client.onStompError = function (frame) {
// Will be invoked in case of error encountered at Broker
// Bad login/passcode typically will cause an error
// Complaint brokers will set `message` header with a brief message. Body may contain details.
// Compliant brokers will terminate the connection after any error
console.log('Broker reported error: ' + frame.headers['message']);
console.log('Additional details: ' + frame.body);
};
client.activate();
To deactivate a client call Client#deactivate. It will stop sttempting to reconnect and disconnect if there is an active connection.
client.deactivate();
When the client is connected to the server, it can send STOMP messages using the Client#publish method.
client.publish({destination: '/topic/general', body: 'Hello world'});
// There is an option to skip content length header
client.publish({destination: '/topic/general', body: 'Hello world', skipContentLengthHeader: true});
// Additional headers
client.publish({destination: '/topic/general', body: 'Hello world', headers: {'priority': '9'}});
Starting version 5, sending binary messages is supported. To send a binary message body use binaryBody parameter. It should be a Uint8Array.
var binaryData = generateBinaryData(); // This need to be of type Uint8Array
// setting content-type header is not mandatory, however a good practice
client.publish({destination: '/topic/special', binaryBody: binaryData,
headers: {'content-type': 'application/octet-stream'}});
To receive messages in the browser, the STOMP client must first subscribe to a destination.
You can use the Client#subscribe method to subscribe to a destination. The method
takes 2 mandatory arguments: destination
, a String corresponding to the
destination and callback
, a function with one message argument and an optional
argument headers
, a JavaScript object for additional headers.
var subscription = client.subscribe("/queue/test", callback);
The subscribe() methods returns a JavaScript object with one attribute, id
,
that correspond to the client subscription ID and one method unsubscribe()
that can be used later on to unsubscribe the client from this destination.
Every time the server sends a message to the client, the client will in turn invoke the callback with a Message object.
callback = function(message) {
// called when the client receives a STOMP message from the server
if (message.body) {
alert("got message with body " + message.body)
} else {
alert("got empty message");
}
};
The subscribe()
method takes an optional headers argument to specify
additional headers
when subscribing to a destination:
var headers = {ack: 'client'};
client.subscribe("/queue/test", message_callback, headers);
The client specifies that it will handle the message acknowledgement.
To stop receiving messages, the client can use the unsubscribe method on the object returned by the Client#subscribe method.
var subscription = client.subscribe("queue/test", onmessage);
// ... use the subscription ...
subscription.unsubscribe();
Not every broker will support binary messages out of the box. For example RabbitMQ (see: https://www.rabbitmq.com/web-stomp.html) will need following to be added to the server configuration:
web_stomp.ws_frame = binary
Use parameter binaryBody
of Client#publish to send binary data of type
Uint8Array.
See Send messages for an example.
The library does not try to guess whether the incoming data is text/binary. When you access Message#body the message will be returned as string. To access the message body as binary please call Message#binaryBody.
There is no generally accepted convention in STOMP (actually messaging in general) to indicate that a message is binary. The message senders and receivers will need to agree on required convention.
You may choose to set content-type
header to indicate binary message.
// within message callback
if (message.headers['content-type'] === 'application/octet-stream') {
// message is binary
// call message.binaryBody
} else {
// message is text
// call message.body
}
The body of a STOMP message must be a String. If you want to send and receive
JSON objects, you can use JSON.stringify()
and
JSON.parse()
to transform the JSON object to a String and vice versa.
var quote = {symbol: 'APPL', value: 195.46};
client.send("/topic/stocks", {}, JSON.stringify(quote));
client.subcribe("/topic/stocks", function(message) {
var quote = JSON.parse(message.body);
alert(quote.symbol + " is at " + quote.value);
});
By default, STOMP messages will be automatically acknowledged by the server before the message is delivered to the client.
The client can choose instead to handle message
acknowledgement by subscribing
to a destination and specify a ack
header set to client
or
client-individual
.
In that case, the client must use the Message#ack method to inform the server that it has processed the message.
var subscription = client.subscribe("/queue/test",
function(message) {
// do something with the message
// ...
// and acknowledge it
message.ack();
},
{ack: 'client'}
);
The Message#ack method accepts headers
argument for additional headers.
For example, it is possible to acknowledge a
message as part of a transaction and ask for a receipt when the ACK
has effectively been processed by the broker:
var tx = client.begin();
message.ack({ transaction: tx.id, receipt: 'my-receipt' });
tx.commit();
The Message#nack method can also be used to inform STOMP 1.1 or higher brokers that the client did not consume the message. It takes the same arguments than the Message#ack method.
Messages can be sent and acknowledged in a transaction.
A transaction is started by the client using its Client#begin method which
takes an optional transaction_id
.
This methods returns a JavaScript object with an id
attribute corresponding
to the transaction ID and two methods:
The client can then send and/or acknowledge messages in the transaction
by specifying a transaction
set with the transaction id
.
// start the transaction
var tx = client.begin();
// send the message in a transaction
client.publish({destination: "/queue/test", headers: {transaction: tx.id}, body: "message in a transaction"});
// commit the transaction to effectively send the message
tx.commit();
If you forget to add the transaction
header when calling Client#publish the message
will not be part of the transaction and will be sent directly without waiting
for the completion of the transaction.
// start the transaction
var tx = client.begin();
// oops! send the message outside the transaction
client.publish({destination: "/queue/test", body: "message in a transaction"});
tx.abort(); // Too late! the message has been sent
If the STOMP broker accepts STOMP 1.1 or higher frames, heart-beating is enabled by default. Options Client#heartbeatIncoming and Client#heartbeatOutgoing can be used to control heart-beating (default value for both is 10,000ms). These can be disabled by setting to 0.
client.heartbeatOutgoing = 20000; // client will send heartbeats every 20000ms
client.heartbeatIncoming = 0; // client does not want to receive heartbeats
// from the server
The client
supports automatic reconnecting in case of a connection failure. It is
controlled by a option Client#reconnectDelay.
Default value is 5000ms, which indicates that
a attempt to connect will be made after 5000ms of a connection drop.
// Add the following if you need automatic reconnect (delay is in milli seconds)
client.reconnectDelay = 300;
This can be set quite small.
The client can set its Client#debug property to a function with takes a String
argument to see all the debug statements of the library:
client.debug = function(str) {
console.log(str);
};
By default, the debug messages are ignored. On a busy system the logs can be overwhelming.
false
.The version 5 of this library has taken significant variation from previous syntax. This version allows all of the options and callbacks to be altered. New values will take effect as soon as possible. For example:
The callback sequences are arranged in a way that most expected operations should work. For example it is possible to call Client#deactivate within Client#onStompError or Client#onWebSocketClose. This is useful if we determine that we have incorrect credentials and no point keep on trying to connect.
The above also allows readjusting Client#reconnectDelay in Client#onWebSocketClose. This can be used to implement exponential back-off before each successive reconnect attempt.
Even Client#brokerURL or Client#connectHeaders can be altered which would get used in a subsequent reconnect. However, I will suggest creating a new instance of the STOMP client in this scenario.


{% include 'keyform/includes/header_link.html' with codename='created_timestamp' title='Date Submitted' %}
{% include 'keyform/includes/header_link.html' with codename='building__name' title='Residence Hall' %}
{% include 'keyform/includes/header_link.html' with codename='keydata__room_number' title='Room #' %}
{% include 'keyform/includes/header_link.html' with codename='keydata__core_number' title='Core #' %}
{% include 'keyform/includes/header_link.html' with codename='num_comments' title='Comments' %}
{% include 'keyform/includes/header_link.html' with codename='status' title='Status' %}