All functions
|
|
casetrim()
|
Standardize letter case and trim whitespace for dataframes |
|
combinecols()
|
Combine two or more columns into one |
|
evalparse()
|
Wrapper for eval and parse text |
|
excelpmt()
|
R analog port of Excel's PMT function |
|
fibonacci()
|
Calculate a fibonacci sequence |
|
grepdf()
|
Grep a data frame: many synergy, much useful, wow |
|
hashcol()
|
Create a grouped hash table instead of using split() |
|
left()
|
R Analog to SQL's LEFT() function |
|
makepath()
|
Create a pathway variable |
|
messagef()
|
Chainable, Sprintf-able messages |
|
mylib()
|
Easily load multiple libraries without many library calls |
|
`%nin%`
|
Not in (opposite to %in%) |
|
pft()
|
Print the full time |
|
pjames
|
pjames package
|
|
pp()
|
Wrapper for paste and print |
|
right()
|
R Analog to SQL's RIGHT() function |
|
tocamel()
|
Convert character vectors to camelcase (ie PaulJames) |
|
tocapital()
|
Convert character vectors to capitalcase (ie Paul James) |
|
tourney()
|
Tournament seeding |
|
view()
|
Chainable View |


{% extends 'base.html' %} {% block content %}
1. Upload your book index file (.txt)
2. Click on the fat orange arrow
3. Download your new, shiny index from below!
For a complete list of rules for an index file, look here.


CAN I TRUST YOU FOR THIS TRANSACTION? Attn: The President/MD. Sir, My name is Mr. James Smith. I trained and work as an external auditor for Abbey national bank - London, working as part of a bigger team that covers the entire Uk region. I had taken pains to find your contact through personal endeavors. On routine audit check last month, I discovered some US$ investment accounts that had been dormant for the least twelve years. All the accounts belong to a single holder with monies totaling a little above $25.5 million United States Dollars plus interest. Banking regulation/legislation in the Uk demands that I notify the fiscal authorities after a statutory time period of twelve years when dormant accounts of this type are called in by the monetary regulatory bodies. The above set of facts underscores my reason of writing and making the following proposals. My investigations of the said account reveals that the investor died in 1994 and the exact time the account was last operated. I can confirm with certainty that the said investor died and no next of kin to his estate has been found or has come forward all these years. I am of the settled conviction that using my insider leverage, I, working with you can secure the funds in the account for us instead of allowing it pass as unclaimed funds into the coffers of the Government of Great Britain,this is very possible. I want your participation and co-operation. I have seized all relevant documents (legal and Banking) that will facilitate our putting you forward as the claimant/beneficiary of the funds and ultimately transfer the money to any account nominated by you. Of course you shall be handsomely rewarded for your part in this transaction as the people I am working with are prepared to allocate a 20% slice of the total funds for your efforts, less any expenses. I shall however leave out the finer details of this transaction till I receive an affirmation of your desire to participate. Be assured that my colleagues and I are on top of the situation all the time and there will be no risk whatsoever if you agree to come on board. Needless to say, UTMOST CONFIDENTIALITY is of vital importance if we are to successfully reap the immense benefits of this transaction. To maintain the level of security required to see this transaction come to a successful conclusion, I have intentionally left out the finer details. To affirm your willingness and cooperation to my proposal please do so by email<EMAIL_ADDRESS>or<EMAIL_ADDRESS>stating your full name, date of birth, direct mobile telephone number, fax number and email address. I do expect you prompt response. Thank you, Mr. James Smith. Note: Please send your response only through my direct email<EMAIL_ADDRESS>or jamessmith1952@yahoo.co.uk


For this example, we have merged and compiled Pico design system with the Bootstrap grid system (Source code here).
This allows to use the powerful Boostrap grid system to build layouts with: Auto-columns, Responsive classes, Alignment, Reordering and Nesting.
1
2
3
4
5
6
7
8
9
10
11
12
This grid example displays:
- 1 column on extra small devices
<576px
- 2 columns on small devices
≥576px
- 3 columns on medium devices
≥768px
- 4 columns on large devices
≥992px
- 6 columns on extra large devices
≥1200px


{% extends "base.html" %} {% block stuff %}
The number of basepairs sequenced over time since January 1st 2012.
For produced data, the numbers comes from counting the number of read pairs during the demultiplexing step for each sample run. These numbers are then converted to basepairs by assuming the sample runs to be 2x101bp reads.
The timed used is the flowcell date.
For delivered data, the basepair counts are based on the number of reads considered to be sequenced. The timestamps used are the creation of the project document in the database, due to now having any appropriate timestamp for delivery.
The date range slider can be used to limit the interval of months from which to generate the plots.
{% end %}


Header
Welcome to AISP Wealth Manager!
This is an AISP demo application, part of the ForgeRock Open Banking Sandbox.


Tinkerer
There is a Tinkerer's Lab at IIT Bombay. Somewhere on its walls you will find written "Ideas are for dime a dozen, people who implement them are priceless." I invite you to take a look at some of my tinkerventures.
My magical staff is called an undergraduate degree in Physics. It is embedded with various power gems; I am a part of the National Astronomy Olympiad programme, and have worked on a few astronomy projects. I have done freelance web development and undergraduate research in computer graphics. Additionally, I managed the Web and Coding Club at IIT Bombay. These days I am an everyday data scientist.
Oh but there's more to say...
There is a Tinkerer's Lab at IIT Bombay. Somewhere on its walls you will find written "Ideas are for dime a dozen, people who implement them are priceless." I invite you to take a look at some of my tinkerventures.
Prose and music and games. All works unpublished. I am shy about this, but am working on it.
I like to fix things, and it is incredibly thrilling to do so under heavy pressure. No medical or doctorate degree though.
There are two kinds of people: those who love the mountains and those who love the beaches.
Always the road less travelled.
Each project a forge for a great friendship, and a result of collaboration.
"I have been a collaborator on his adventures for the past 6 years. 50% Iron Man, 50% Sherlock. He gets things done, in most creative and original ways!"
"Kumar Ayush was definitely the most passionate person I met at IIT Bombay, and I wish more IITB undergrads were like him!"
"Has his own weird ways of tackling problems. By hook or by crook will get the job done for you. Definitely adds a new dimension to the group he's a part of, social or professional."
"Ayush has always been a pleasure to work with. He's quite insightful and brings a unique perspective to everything he tries."


Rails <IP_ADDRESS> (July 12, 2022)
- No changes.
Rails 5.2.8 (May 09, 2022)
- No changes.
Rails <IP_ADDRESS> (April 26, 2022)
-
Fix and add protections for XSS in
::ActionView::Helpers
and::ERB::Util
.Add the method ERB::Util.xml_name_escape to escape dangerous characters in names of tags and names of attributes, following the specification of XML.
Álvaro Martín Fraguas
Rails 5.2.7 (March 10, 2022)
-
Restore support to Ruby 2.2.
ojab
Rails <IP_ADDRESS> (March 08, 2022)
- No changes.
Rails <IP_ADDRESS> (February 11, 2022)
- Fix Reloader method signature to work with the new Executor signature
Rails <IP_ADDRESS> (February 11, 2022)
- No changes.
Rails 5.2.6 (May 05, 2021)
- No changes.
Rails 5.2.5 (March 26, 2021)
- No changes.
Rails <IP_ADDRESS> (May 05, 2021)
- No changes.
Rails <IP_ADDRESS> (February 10, 2021)
- No changes.
Rails <IP_ADDRESS> (September 09, 2020)
- No changes.
Rails <IP_ADDRESS> (May 18, 2020)
-
[CVE-2020-8165] Deprecate Marshal.load on raw cache read in RedisCacheStore
-
[CVE-2020-8165] Avoid Marshal.load on raw cache value in MemCacheStore
Rails <IP_ADDRESS> (March 19, 2020)
- No changes.
Rails <IP_ADDRESS> (December 18, 2019)
- No changes.
Rails 5.2.4 (November 27, 2019)
-
Make ActiveSupport::Logger Fiber-safe. Fixes #36752.
Use
Fiber.current.id
inActiveSupport::Logger#local_level=
in order to make log level local to Ruby Fibers in addition to Threads.Example:
logger = ActiveSupport::Logger.new(STDOUT) logger.level = 1 p "Main is debug? #{logger.debug?}" Fiber.new { logger.local_level = 0 p "Thread is debug? #{logger.debug?}" }.resume p "Main is debug? #{logger.debug?}"
Before:
Main is debug? false Thread is debug? true Main is debug? true
After:
Main is debug? false Thread is debug? true Main is debug? false
Alexander Varnin
Rails 5.2.3 (March 27, 2019)
-
Add ActiveSupport::HashWithIndifferentAccess#assoc.
assoc
can now be called with either a string or a symbol.Stefan Schüßler
-
Fix String#safe_constantize throwing a
LoadError
for incorrectly cased constant references.Keenan Brock
-
Allow Range#=== and Range#cover? on
Range
Range#cover?
can now accept a range argument likeRange#include?
andRange#===
.Range#===
works correctly on Ruby 2.6.Range#include?
is moved into a new file, with these two methods.utilum
-
If the same block is
included
multiple times for a Concern, an exception is no longer raised.Mark J. Titorenko, Vlad Bokov
Rails <IP_ADDRESS> (March 11, 2019)
- No changes.
Rails 5.2.2 (December 04, 2018)
-
Fix bug where
#to_options
for::ActiveSupport::HashWithIndifferentAccess
would not act as alias for#symbolize_keys
.Nick Weiland
-
Improve the logic that detects non-autoloaded constants.
Jan Habermann, Xavier Noria
-
Fix bug where
URI.unescape
would fail with mixed Unicode/escaped character input:URI.unescape("\xe3\x83\x90") # => "バ" URI.unescape("%E3%83%90") # => "バ" URI.unescape("\xe3\x83\x90%E3%83%90") # => Encoding::CompatibilityError
Ashe Connor, Aaron Patterson
Rails <IP_ADDRESS> (November 27, 2018)
- No changes.
Rails 5.2.1 (August 07, 2018)
-
Redis cache store:
delete_matched
no longer blocks the Redis server. (Switches from evaled Lua to a batched SCAN + DEL loop.)Gleb Mazovetskiy
-
Fix bug where
ActiveSupport::Timezone.all
would fail when tzinfo data for any timezone defined in ActiveSupport::TimeZone::MAPPING is missing.Dominik Sander
-
Fix bug where
::ActiveSupport::Cache
will massively inflate the storage size when compression is enabled (which is true by default). This patch does not attempt to repair existing data: please manually flush the cache to clear out the problematic entries.Godfrey Chan
-
Fix
ActiveSupport::Cache#read_multi
bug with local cache enabled that was returning instances of::ActiveSupport::Cache::Entry
instead of the raw values.Jason Lee
Rails 5.2.0 (April 09, 2018)
-
Caching: MemCache and Redis
read_multi
andfetch_multi
speedup. Read from the local in-memory cache before consulting the backend.Gabriel Sobrinho
-
Return all mappings for a timezone identifier in
country_zones
.Some timezones like
Europe/London
have multiple mappings in ActiveSupport::TimeZone::MAPPING so return all of them instead of the first one found by usingHash#value
. e.g:# Before ActiveSupport::TimeZone.country_zones("GB") # => ["Edinburgh"] # After ActiveSupport::TimeZone.country_zones("GB") # => ["Edinburgh", "London"]
Fixes #31668.
Andrew White
-
Add support for connection pooling on RedisCacheStore.
fatkodima
-
Support hash as first argument in
assert_difference
. This allows to specify multiple numeric differences in the same assertion.assert_difference ->{ Article.count } => 1, ->{ Post.count } => 2
Julien Meichelbeck
-
Add missing instrumentation for
read_multi
in::ActiveSupport::Cache::Store
.Ignatius Reza Lesmana
-
assert_changes
will always assert that the expression changes, regardless offrom:
andto:
argument combinations.Daniel Ma
-
Use SHA-1 to generate non-sensitive digests, such as the ETag header.
Enabled by default for new apps; upgrading apps can opt in by setting
config.active_support.use_sha1_digests = true
.Dmitri Dolguikh, Eugene Kenny
-
Changed default behaviour of ActiveSupport::SecurityUtils.secure_compare, to make it not leak length information even for variable length string.
Renamed old ActiveSupport::SecurityUtils.secure_compare to
fixed_length_secure_compare
, and started raisingArgumentError
in case of length mismatch of passed strings.Vipul A M
-
Make ActiveSupport::TimeZone.all return only time zones that are in ActiveSupport::TimeZone::MAPPING.
Fixes #7245.
Chris LaRose
-
MemCacheStore: Support expiring counters.
Pass
expires_in: [seconds]
to#increment
and#decrement
options to set the Memcached TTL (time-to-live) if the counter doesn't exist. If the counter exists, Memcached doesn't extend its expiry when it's incremented or decremented.Rails.cache.increment("my_counter", 1, expires_in: 2.minutes)
Takumasa Ochi
-
Handle
TZInfo::AmbiguousTime
errors.Make
::ActiveSupport::TimeWithZone
match Ruby's handling of ambiguous times by choosing the later period, e.g.Ruby:
ENV["TZ"] = "Europe/Moscow" Time.local(2014, 10, 26, 1, 0, 0) # => 2014-10-26 01:00:00 +0300
Before:
>> "2014-10-26 01:00:00".in_time_zone("Moscow") TZInfo::AmbiguousTime: 26/10/2014 01:00 is an ambiguous local time.
After:
>> "2014-10-26 01:00:00".in_time_zone("Moscow") #=> Sun, 26 Oct 2014 01:00:00 MSK +03:00
Fixes #17395.
Andrew White
-
Redis cache store.
# Defaults to `redis://localhost:6379/0`. Only use for dev/test. config.cache_store = :redis_cache_store # Supports all common cache store options (:namespace, :compress, # :compress_threshold, :expires_in, :race_condition_ttl) and all # Redis options. cache_password = Rails.application.secrets.redis_cache_password config.cache_store = :redis_cache_store, driver: :hiredis, namespace: 'myapp-cache', compress: true, timeout: 1, url: "redis://:#{cache_password}@myapp-cache-1:6379/0" # Supports Redis::Distributed with multiple hosts config.cache_store = :redis_cache_store, driver: :hiredis namespace: 'myapp-cache', compress: true, url: %w[ redis://myapp-cache-1:6379/0 redis://myapp-cache-1:6380/0 redis://myapp-cache-2:6379/0 redis://myapp-cache-2:6380/0 redis://myapp-cache-3:6379/0 redis://myapp-cache-3:6380/0 ] # Or pass a builder block config.cache_store = :redis_cache_store, namespace: 'myapp-cache', compress: true, redis: -> { Redis.new … }
Deployment note: Take care to use a dedicated Redis cache rather than pointing this at your existing Redis server. It won't cope well with mixed usage patterns and it won't expire cache entries by default.
Redis cache server setup guide: https://redis.io/topics/lru-cache
Jeremy Daer
-
Cache: Enable compression by default for values > 1kB.
Compression has long been available, but opt-in and at a 16kB threshold. It wasn't enabled by default due to CPU cost. Today it's cheap and typical cache data is eminently compressible, such as HTML or JSON fragments. Compression dramatically reduces Memcached/Redis mem usage, which means the same cache servers can store more data, which means higher hit rates.
To disable compression, pass
compress: false
to the initializer.Jeremy Daer
-
Allow
Range#include?
on TWZ ranges.In #11474 we prevented TWZ ranges being iterated over which matched Ruby's handling of Time ranges and as a consequence
include?
stopped working with both Time ranges and TWZ ranges. However in ruby/ruby@b061634 support was added forinclude?
to usecover?
for 'linear' objects. Since we have no way of making Ruby consider TWZ instances as 'linear' we have to overrideRange#include?
.Fixes #30799.
Andrew White
-
Fix acronym support in
humanize
.Acronym inflections are stored with lowercase keys in the hash but the match wasn't being lowercased before being looked up in the hash. This shouldn't have any performance impact because before it would fail to find the acronym and perform the
downcase
operation anyway.Fixes #31052.
Andrew White
-
Add same method signature for
Time#prev_year
andTime#next_year
in accordance withDate#prev_year
,Date#next_year
.Allows pass argument for
Time#prev_year
andTime#next_year
.Before:
Time.new(2017, 9, 16, 17, 0).prev_year # => 2016-09-16 17:00:00 +0300 Time.new(2017, 9, 16, 17, 0).prev_year(1) # => ArgumentError: wrong number of arguments (given 1, expected 0) Time.new(2017, 9, 16, 17, 0).next_year # => 2018-09-16 17:00:00 +0300 Time.new(2017, 9, 16, 17, 0).next_year(1) # => ArgumentError: wrong number of arguments (given 1, expected 0)
After:
Time.new(2017, 9, 16, 17, 0).prev_year # => 2016-09-16 17:00:00 +0300 Time.new(2017, 9, 16, 17, 0).prev_year(1) # => 2016-09-16 17:00:00 +0300 Time.new(2017, 9, 16, 17, 0).next_year # => 2018-09-16 17:00:00 +0300 Time.new(2017, 9, 16, 17, 0).next_year(1) # => 2018-09-16 17:00:00 +0300
bogdanvlviv
-
Add same method signature for
Time#prev_month
andTime#next_month
in accordance withDate#prev_month
,Date#next_month
.Allows pass argument for
Time#prev_month
andTime#next_month
.Before:
Time.new(2017, 9, 16, 17, 0).prev_month # => 2017-08-16 17:00:00 +0300 Time.new(2017, 9, 16, 17, 0).prev_month(1) # => ArgumentError: wrong number of arguments (given 1, expected 0) Time.new(2017, 9, 16, 17, 0).next_month # => 2017-10-16 17:00:00 +0300 Time.new(2017, 9, 16, 17, 0).next_month(1) # => ArgumentError: wrong number of arguments (given 1, expected 0)
After:
Time.new(2017, 9, 16, 17, 0).prev_month # => 2017-08-16 17:00:00 +0300 Time.new(2017, 9, 16, 17, 0).prev_month(1) # => 2017-08-16 17:00:00 +0300 Time.new(2017, 9, 16, 17, 0).next_month # => 2017-10-16 17:00:00 +0300 Time.new(2017, 9, 16, 17, 0).next_month(1) # => 2017-10-16 17:00:00 +0300
bogdanvlviv
-
Add same method signature for
Time#prev_day
andTime#next_day
in accordance withDate#prev_day
,Date#next_day
.Allows pass argument for
Time#prev_day
andTime#next_day
.Before:
Time.new(2017, 9, 16, 17, 0).prev_day # => 2017-09-15 17:00:00 +0300 Time.new(2017, 9, 16, 17, 0).prev_day(1) # => ArgumentError: wrong number of arguments (given 1, expected 0) Time.new(2017, 9, 16, 17, 0).next_day # => 2017-09-17 17:00:00 +0300 Time.new(2017, 9, 16, 17, 0).next_day(1) # => ArgumentError: wrong number of arguments (given 1, expected 0)
After:
Time.new(2017, 9, 16, 17, 0).prev_day # => 2017-09-15 17:00:00 +0300 Time.new(2017, 9, 16, 17, 0).prev_day(1) # => 2017-09-15 17:00:00 +0300 Time.new(2017, 9, 16, 17, 0).next_day # => 2017-09-17 17:00:00 +0300 Time.new(2017, 9, 16, 17, 0).next_day(1) # => 2017-09-17 17:00:00 +0300
bogdanvlviv
-
IO#to_json
now returns theto_s
representation, rather than attempting to convert to an array. This fixes a bug whereIO#to_json
would raise anIOError
when called on an unreadable object.Fixes #26132.
Paul Kuruvilla
-
Remove deprecated
halt_callback_chains_on_return_false
option.Rafael Mendonça França
-
Remove deprecated
:if
and:unless
string filter for callbacks.Rafael Mendonça França
-
Hash#slice now falls back to Ruby 2.5+'s built-in definition if defined.
Akira Matsuda
-
Deprecate
secrets.secret_token
.The architecture for secrets had a big upgrade between Rails 3 and Rails 4, when the default changed from using
secret_token
tosecret_key_base
.secret_token
has been soft deprecated in documentation for four years but is still in place to support apps created before Rails 4. Deprecation warnings have been added to help developers upgrade their applications tosecret_key_base
.claudiob, Kasper Timm Hansen
-
Return an instance of HashWithIndifferentAccess from
HashWithIndifferentAccess#transform_keys
.Yuji Yaginuma
-
Add key rotation support to
MessageEncryptor
andMessageVerifier
.This change introduces a
rotate
method to both theMessageEncryptor
andMessageVerifier
classes. This method accepts the same arguments and options as the given classes' constructor. Theencrypt_and_verify
method forMessageEncryptor
and theverified
method forMessageVerifier
also accept an optional keyword argument:on_rotation
block which is called when a rotated instance is used to decrypt or verify the message.Michael J Coyne
-
Deprecate Module#reachable? method.
bogdanvlviv
-
Add
config/credentials.yml.enc
to store production app secrets.Allows saving any authentication credentials for third party services directly in repo encrypted with
config/master.key
orENV["RAILS_MASTER_KEY"]
.This will eventually replace
Rails.application.secrets
and the encrypted secrets introduced in Rails 5.1.DHH, Kasper Timm Hansen
-
Add
::ActiveSupport::EncryptedFile
and::ActiveSupport::EncryptedConfiguration
.Allows for stashing encrypted files or configuration directly in repo by encrypting it with a key.
Backs the new credentials setup above, but can also be used independently.
DHH, Kasper Timm Hansen
-
Module#delegate_missing_to now raises
DelegationError
if target is nil, similar to Module#delegate.Anton Khamets
-
Update String#camelize to provide feedback when wrong option is passed.
String#camelize was returning nil without any feedback when an invalid option was passed as a parameter.
Previously:
'one_two'.camelize(true) # => nil
Now:
'one_two'.camelize(true) # => ArgumentError: Invalid option, use either :upper or :lower.
Ricardo Díaz
-
Fix modulo operations involving durations.
Rails 5.1 introduced
::ActiveSupport::Duration::Scalar
as a wrapper around numeric values as a way of ensuring a duration was the outcome of an expression. However, the implementation was missing support for modulo operations. This support has now been added and should result in a duration being returned from expressions involving modulo operations.Prior to Rails 5.1:
5.minutes % 2.minutes # => 60
Now:
5.minutes % 2.minutes # => 1 minute
Fixes #29603 and #29743.
Sayan Chakraborty, Andrew White
-
Fix division where a duration is the denominator.
PR #29163 introduced a change in behavior when a duration was the denominator in a calculation - this was incorrect as dividing by a duration should always return a
Numeric
. The behavior of previous versions of Rails has been restored.Fixes #29592.
Andrew White
-
Add purpose and expiry support to
::ActiveSupport::MessageVerifier
and::ActiveSupport::MessageEncryptor
.For instance, to ensure a message is only usable for one intended purpose:
token = @verifier.generate("x", purpose: :shipping) @verifier.verified(token, purpose: :shipping) # => "x" @verifier.verified(token) # => nil
Or make it expire after a set time:
@verifier.generate("x", expires_in: 1.month) @verifier.generate("y", expires_at: Time.now.end_of_year)
Showcased with
::ActiveSupport::MessageVerifier
, but works the same for::ActiveSupport::MessageEncryptor
'sencrypt_and_sign
anddecrypt_and_verify
.Pull requests: #29599, #29854
Assain Jaleel
-
Make the order of Hash#reverse_merge! consistent with HashWithIndifferentAccess.
Erol Fornoles
-
Add
freeze_time
helper which freezes time toTime.now
in tests.Prathamesh Sonpatki
-
Default
::ActiveSupport::MessageEncryptor
to use AES 256 GCM encryption.On for new Rails 5.2 apps. Upgrading apps can find the config as a new framework default.
Assain Jaleel
-
Cache:
write_multi
.Rails.cache.write_multi foo: 'bar', baz: 'qux'
Plus faster fetch_multi with stores that implement
write_multi_entries
. Keys that aren't found may be written to the cache store in one shot instead of separate writes.The default implementation simply calls
write_entry
for each entry. Stores may override if they're capable of one-shot bulk writes, like RedisMSET
.Jeremy Daer
-
Add default option to module and class attribute accessors.
mattr_accessor :settings, default: {}
Works for
mattr_reader
,mattr_writer
,cattr_accessor
,cattr_reader
, andcattr_writer
as well.Genadi Samokovarov
-
Add
Date#prev_occurring
andDate#next_occurring
to return specified next/previous occurring day of week.Shota Iguchi
-
Add default option to
class_attribute
.Before:
class_attribute :settings self.settings = {}
Now:
class_attribute :settings, default: {}
DHH
-
#singularize
and#pluralize
now respect uncountables for the specified locale.Eilis Hamilton
-
Add
::ActiveSupport::CurrentAttributes
to provide a thread-isolated attributes singleton. Primary use case is keeping all the per-request attributes easily available to the whole system.DHH
-
Fix implicit coercion calculations with scalars and durations.
Previously, calculations where the scalar is first would be converted to a duration of seconds, but this causes issues with dates being converted to times, e.g:
Time.zone = "Beijing" # => Asia/Shanghai date = Date.civil(2017, 5, 20) # => Mon, 20 May 2017 2 * 1.day # => 172800 seconds date + 2 * 1.day # => Mon, 22 May 2017 00:00:00 CST +08:00
Now, the
::ActiveSupport::Duration::Scalar
calculation methods will try to maintain the part structure of the duration where possible, e.g:Time.zone = "Beijing" # => Asia/Shanghai date = Date.civil(2017, 5, 20) # => Mon, 20 May 2017 2 * 1.day # => 2 days date + 2 * 1.day # => Mon, 22 May 2017
Fixes #29160, #28970.
Andrew White
-
Add support for versioned cache entries. This enables the cache stores to recycle cache keys, greatly saving on storage in cases with frequent churn. Works together with the separation of
#cache_key
and#cache_version
in Active Record and its use in Action Pack's fragment caching.DHH
-
Pass gem name and deprecation horizon to deprecation notifications.
Willem van Bergen
-
Add support for
:offset
and:zone
to ActiveSupport::TimeWithZone#change.Andrew White
-
Add support for
:offset
to Time#change.Fixes #28723.
Andrew White
-
Add
fetch_values
for HashWithIndifferentAccess.The method was originally added to
Hash
in Ruby 2.3.0.Josh Pencheon
Please check 5-1-stable for previous changes.


Make my
Resume
Home
Search
First name
Looks good!
Last name
Looks good!
Father`s name
Looks good!
Education Details
Looks good!
Address
Please fill the address
City
Please provide a valid city.
State
Choose...
Andhra Pradesh
Assam
Arunachal Pradesh
Bihar
Chhattisgarh
Delhi
Goa
Gujarat
Jammu and Kashmir
Jharkhand
West Bengal
Karnataka
Kerala
Madhya Pradesh
Maharashtra
Manipur
Meghalaya
Mizoram
Nagaland
Orissa
Punjab
Rajasthan
Sikkim
Tamil Nadu
Tripura
Uttaranchal
Uttar Pradesh
Haryana
Himachal Pradesh
Please select a valid state.
Zip
Please provide a valid zip.
Email
Please provide a valid Email.
Date Of Birth
Please provide a D.O.B.
Skills
Please provide a valid Address.
Choose image (name cannot be seen due to security)
Image invalid custom file
I Agree That All Informations are correct..
You must agree before submitting.
Submit form
Reset


HttpRpcClientDurableStreamContext |
A sibling of net.corda.internal.base.stream.DurableStreamContext but for HTTP RPC Client module Once Artemis RPC elimination is complete those two classes might be merged into one, destination module TBD. data class HttpRpcClientDurableStreamContext |


R Documentation | Release Notes | FAQ | Multilingual pretrained models
R wrapper for fastText C++ code from Facebook.
FastText is an open-source, free, lightweight library that allows users to learn text representations and text classifiers. It works on standard, generic hardware. Models can later be reduced in size to even fit on mobile devices.
All the updated documentation can be reached at this address.
API documentation can be reached at this address.
In particular, command line options are listed there.
Data for a multi-class task are embedded in this package.
Follow this link to learn a model and then measure the accuracy in 5 minutes.
Data for a word representation learning task are embedded in this package.
Following this link will route you to a 5mn tutorial to learn vectorial representation of words (aka word embeddings):
Why not use the command line client?
system("fasttext ...")
;fastrtext
makes your life easier by making all these operations in memory ;Why not use fastTextR ?
fastrtext
implements both supervised and unsupervised parts of fastText
(fastTextR
implements only the unsupervised part) ;fastrtext
, predictions can be done in memory (fastTextR
requires to write the sentence on hard drive and requires you to read the predictions after) ;Please cite 1 if using this code for learning word representations or 2 if using for text classification.
[1] P. Bojanowski*, E. Grave*, A. Joulin, T. Mikolov, Enriching Word Vectors with Subword Information
@article{bojanowski2016enriching,
title={Enriching Word Vectors with Subword Information},
author={Bojanowski, Piotr and Grave, Edouard and Joulin, Armand and Mikolov, Tomas},
journal={arXiv preprint arXiv:1607.04606},
year={2016}
}
[2] A. Joulin, E. Grave, P. Bojanowski, T. Mikolov, Bag of Tricks for Efficient Text Classification
@article{joulin2016bag,
title={Bag of Tricks for Efficient Text Classification},
author={Joulin, Armand and Grave, Edouard and Bojanowski, Piotr and Mikolov, Tomas},
journal={arXiv preprint arXiv:1607.01759},
year={2016}
}
[3] A. Joulin, E. Grave, P. Bojanowski, M. Douze, H. Jégou, T. Mikolov, FastText.zip: Compressing text classification models
@article{joulin2016fasttext,
title={FastText.zip: Compressing text classification models},
author={Joulin, Armand and Grave, Edouard and Bojanowski, Piotr and Douze, Matthijs and J{\'e}gou, H{\'e}rve and Mikolov, Tomas},
journal={arXiv preprint arXiv:1612.03651},
year={2016}
}
(* These authors contributed equally.)


WITNESS LIST Veteran Affairs & Military Installations Committee February 23, 2005 - 1:30P Adjutant General's Department ON: Dehnert, Brig. Gen. Allen Assistant Adjutant General (Adjutant General's Department), Austin, TX Family Readiness Program ON: Marty, Janie (Adjutant General's Department), Austin, TX Scotti, LTC Sharon (Adjutant General's Department), Austin, TX Texas Military Facilities Commission ON: Paret, Sandra M. Chair (Texas Military Facilities Commission), Austin, TX Wells, John Executive Director (Texas Military Facilities Commission), Austin, TX Registering, but not testifying: On: Giesbers, Lydia Deputy Director (Texas Military Facilities Commission), Austin, TX


?
Run
print solutions
Show VM code
Solutions
Prolog source
VM code (Readable NL)
VM code (Readable binary dump)


vignettes/blocks.Rmd
blocks.Rmd
Once we are familiar with the basics, there are some more advanced drjacoby techniques that can be useful when running computationally intensive likelihoods, or when fitting multi-level models. These rely on the fact that drjacoby works by breaking the likelihood down into a series of independent blocks, which are combined to produce the overall likelihood.
This vignette demonstrates the use of likelihood blocks to fit a simple random-effects model.
For this example we will work with the chickwts
dataset (one of the datasets that comes with R), which lists the weights of various chicks broken down by the feed they were given.
head(chickwts, 12)
#> weight feed
#> 1 179 horsebean
#> 2 160 horsebean
#> 3 136 horsebean
#> 4 227 horsebean
#> 5 217 horsebean
#> 6 168 horsebean
#> 7 108 horsebean
#> 8 124 horsebean
#> 9 143 horsebean
#> 10 140 horsebean
#> 11 309 linseed
#> 12 229 linseed
We will pass this into drjacoby as a list over groups:
data_list <- split(chickwts$weight, f = chickwts$feed)
data_list
#> $casein
#> [1] 368 390 379 260 404 318 352 359 216 222 283 332
#>
#> $horsebean
#> [1] 179 160 136 227 217 168 108 124 143 140
#>
#> $linseed
#> [1] 309 229 181 141 260 203 148 169 213 257 244 271
#>
#> $meatmeal
#> [1] 325 257 303 315 380 153 263 242 206 344 258
#>
#> $soybean
#> [1] 243 230 248 327 329 250 193 271 316 267 199 171 158 248
#>
#> $sunflower
#> [1] 423 340 392 339 341 226 320 295 334 322 297 318
There are 6 feed groups in total, and we will assume that values within a group are normally distributed each with a distinct unknown mean, leading to 6 parameters \(\mu_1\) to \(\mu_6\). For simplicity we will assume the same standard deviation \(\sigma\) in all groups. To make this a random effects framework, we will assume that \(\mu_1\) to \(\mu_6\) are themselves random draws from a normal distribution with mean \(\phi\) and standard deviation \(\tau\). Finally, we will put diffuse priors on \(\sigma\), \(\phi\) and \(\tau\) so that the data can “speak for itself”. For the more mathematically minded, the complete model can be written as follows:
\[ \begin{aligned} x_{i,j} &\sim Normal(\mu_i, \sigma^2) \hspace{5mm} \textrm{for } i \in 1:6, \\ \mu_i &\sim Normal(\phi, \tau^2) \hspace{5mm} \textrm{for } i \in 1:6, \\ \sigma &\sim Gamma(0.01, 100), \\ \phi &\sim Normal(0, 1000), \\ \tau &\sim Gamma(0.01, 100) \end{aligned} \] One way to fit this model in drjacoby is to write a likelihood function that simply loops through all the data and calculates the probability as a function of the parameters. However, this is very wasteful - if we are updating the parameter \(\mu_1\) then we only need to know the observed chick weights in feed group 1, along with the current estimates of \(\sigma\), \(\phi\) and \(\tau\). The same is true for all other \(\mu_i\) values, which only depend on a small subset of the data. In this example the inefficiency probably doesn’t matter too much, because the dataset is small and our likelihood is fast enough that we can brute force the problem, but it’s easy to imagine situations where this wouldn’t be the case. A better way to approach this problem is through likelihood blocks.
You can imagine likelihood blocks as a vector of values, each of which gives the log-likelihood of one small part of the model. The overall log-likelihood is simply the sum over this vector. We are free to define as many blocks as we like, and the exact number we need will depend on the model design. A good way of figuring out how many blocks you need is to sketch out a “conditional dependence” table like the one shown below.
In the first column we list all the data and free parameters of our model, and in the second column we list every parameter on which the first column depends (“depends” in this context means we need to know this parameter value in order to write down the probability). Don’t put data or fixed values in the second column, only free parameters, i.e. those we are trying to infer. We need one block for every unique combination of parameters in the second column. For example, \(\mu_1\) and \(\mu_2\) depend on the same combination of parameters (\(\phi\) and \(\tau\)) therefore they belong in the same block. We find that we need seven blocks in this example.
We define blocks in drjacoby using the optional “block” column of the parameters dataframe. For each parameter you should list all the blocks in which it can be found - for example \(\mu_1\) can be found in blocks 1 and 7 in the table above:
# define parameters dataframe
df_params <- define_params(name = "mu1", min = 0, max = Inf, init = 1, block = c(1, 7),
name = "mu2", min = 0, max = Inf, init = 1, block = c(2, 7),
name = "mu3", min = 0, max = Inf, init = 1, block = c(3, 7),
name = "mu4", min = 0, max = Inf, init = 1, block = c(4, 7),
name = "mu5", min = 0, max = Inf, init = 1, block = c(5, 7),
name = "mu6", min = 0, max = Inf, init = 1, block = c(6, 7),
name = "sigma", min = 0, max = Inf, init = 1, block = 1:6,
name = "phi", min = -Inf, max = Inf, init = 0, block = 7,
name = "tau", min = 0, max = Inf, init = 1, block = 7)
df_params
#> name min max init block
#> 1 mu1 0 Inf 1 1, 7
#> 2 mu2 0 Inf 1 2, 7
#> 3 mu3 0 Inf 1 3, 7
#> 4 mu4 0 Inf 1 4, 7
#> 5 mu5 0 Inf 1 5, 7
#> 6 mu6 0 Inf 1 6, 7
#> 7 sigma 0 Inf 1 1, 2, 3, 4, 5, 6
#> 8 phi -Inf Inf 0 7
#> 9 tau 0 Inf 1 7
Next we need to access these blocks inside the likelihood function. The current block is stored within the misc
object, inside an element called “block”. We can access this value in a C++ function using misc["block"]
, or in an R function using misc$block
. Once we know the current block we can vary the likelihood accordingly. Our objective is to calculate and return just the log-likelihood of this block.
Take a look at the following likelihood function, which takes this approach:
params
objectmisc["block"]
mu
parameters#include <Rcpp.h>
using namespace Rcpp;
// [[Rcpp::export]]
SEXP loglike(Rcpp::NumericVector params, Rcpp::List data, Rcpp::List misc) {
// unpack parameters
int pi = 0;
std::vector<double> mu(6);
for (int i = 0; i < 6; ++i) {
mu[i] = params[pi++];
}
double sigma = params["sigma"];
double phi = params["phi"];
double tau = params["tau"];
// get current update block
int block = misc["block"];
// distinct method for first 6 blocks, vs 7th
double ret = 0.0;
if (block == 7) { // likelihood for the global parameters
// calculate likelihood component
for (int i = 0; i < 6; ++i) {
ret += R::dnorm(mu[i], phi, tau, true);
}
} else { // likelihood for each of the 6 data groups
// get data for this group
NumericVector x = data[block - 1];
// calculate likelihood component
for (int i = 0; i < x.size(); ++i) {
ret += R::dnorm(x[i], mu[block - 1], sigma, true);
}
}
return Rcpp::wrap(ret);
}
// [[Rcpp::export]]
SEXP logprior(Rcpp::NumericVector params, Rcpp::List misc) {
// unpack parameters
double sigma = params["sigma"];
double phi = params["phi"];
double tau = params["tau"];
// apply priors
double ret = R::dgamma(sigma, 0.01, 100.0, true) +
R::dnorm(phi, 0, 1000, true) +
R::dgamma(tau, 0.01, 100.0, true);
return Rcpp::wrap(ret);
}
// [[Rcpp::export]]
SEXP create_xptr(std::string function_name) {
typedef SEXP (*funcPtr_likelihood)(Rcpp::NumericVector params, Rcpp::List data, Rcpp::List misc);
typedef SEXP (*funcPtr_prior)(Rcpp::NumericVector params, Rcpp::List misc);
if (function_name == "loglike"){
return(Rcpp::XPtr<funcPtr_likelihood>(new funcPtr_likelihood(&loglike)));
}
if (function_name == "logprior"){
return(Rcpp::XPtr<funcPtr_prior>(new funcPtr_prior(&logprior)));
}
stop("cpp function %i not found", function_name);
}
If we were to run this likelihood for blocks 1 through 7 and sum the values, we would obtain the full model log-likelihood.
For the prior function we don’t need to worry about blocks, we just need to apply the appropriate distributions:
We can then run the MCMC as normal:
# run MCMC
mcmc <- run_mcmc(data = data_list,
df_params = df_params,
loglike = "loglike",
logprior = "logprior",
burnin = 1e3,
samples = 1e4,
chains = 5,
silent = TRUE)
Assuming we are happy with MCMC performance (convergence, ESS etc.), we can explore the posterior credible intervals of all parameters:
plot_credible(mcmc)
Here we obtain a different mean estimate for each group, with the global mean (phi
) being somewhere near the centre. If you compare the mu
estimates to the raw mean of the data in each group you will find that they are “shrunk” towards the global mean. This is the impact of the random effects model - by sharing information between groups we end up pulling everything towards the centre.
Likelihood blocks take some getting used to, but for complex models they can make life much easier and be much more efficient. In reality drjacoby always uses blocks internally, it just places all parameters into block 1 if not specified by the user. There are no checks performed on the blocks that you define, so make sure your blocks are independent and cover the complete likelihood of the model.


You want to speak about Rust? We would like to support you! This is both the regular resource of conferences you can submit to as well as a guide to get effective help by the Rust community.
We highly recommend signing up for the talk help section of the user forums where others can help at all stages of the conference.


This video will start to play after 10 seconds. See the source code on how to start a video programatically.


{{ c.date | date:'MMMM yyyy' }}
{{ c.week }}
{{ (viewScale === 'hour' || viewScale === 'minute') && (c.date | date:'dd EEEE, yyyy/MM') || (c.date | date:'dd') }}
{{ (viewScale === 'threehours' || viewScale === 'sixhours' || viewScale === 'eighthours' || viewScale === 'twevelhours') && ((c.date | date:'HH') + ' - ' + (c.nexthour | date:'HH')) || (c.date | date:'HH')}}
{{ c.date | date:'mm' }}


Geany Cosmetics online
This little tool help you to create Geany themes the easy way. Choose the colors you want and when you are satisfied with the look, press the 'edit' button. It will fill the textarea with the rendered script. Save the content in a file (.conf) and copy this file in your theme directory. It may vary depending on the system.
You may help yourself with this online tool paletton.com.
How to use: By clicking on an element, a color selector will appear. It will let you select a color. Validating the selection will automatically implement the color.


Corporate Events The Corporate Event Planner
We strive to organize a hassle=free and mesmerising ambience to sooth all the work- load, we all face in our daily corporate routine. Our initiative and objective revolves around the satisfaction to be served to the people involved. We are here to serve you with the much-awaited experiences, that you wait for after a tiring work schedule.
Corporate Events
We strive to organize a hassle-free and mesmerising ambience to sooth all the work- load, we all face in our daily corporate routine. Our initiative and objective revolves around the satisfaction to be served to the people involved. We are here to serve you with the much-awaited experiences, that you wait for after a tiring work schedule.
Product Launches
Viirtuos events has a core team that is dedicated enough to serve you with the best practices available in the market. The foundation level I.e. planning is what we work on to its minute detail. Any particulars or personalized details to be added is something we specialise in. Get in touch with our team and make your event worthwhile.
Networking & Dealer
When its about getting them all together at one place and make it a memorable event, CMM events will make extra efforts to make it a happening event. We are competent to rope in the required resources within a given time frame. And the best part is, once you are associated with us, all the arrangements and adjustments are managed by our professional team members.


This application is designed to aid people with understanding nearest neighbour searches with K-D trees, Octrees and random projection trees in 3D. Your browser needs to support WebGL for the 3D rendering to work (supported on most modern browsers).
K-D tree is an algorithm that splits the data into 2 on one axis at each level. At each level, an axis is chosen, for example usingg the formula "axis = depth % 3". Then a random point in the current partition is taken and the partition is divided into 2 on the given axis. If the number of points in a partition is below a treshold, no more splits will occur. Nearest neighbour search works very similarly to octree's NN search.
Meaning of colours:
Green - searched area
Blue - currently processed area
Purple - node's residing area
Purple sphere - current search radius
Yellow node on the edge of the sphere - current nearest neighbor
Octree is a 3D version of quadtrees. The tree is built by checking the number of points in the current octant (a cube) and if it's bigger than a treshold, the octant will be split into 8 equal octants and the process is repeated recursively. For nearest neighbour search, the octant closest to searchable point is found. If it contains any points, it is set as current best. Then the algorithm recursively backtracks up the tree and checks other octants to see if they are in the radius to possibly contain closer neighbours. If so, the neighbouring octants are also checked. Once there are no octants that haven't been checked and could potentitally contain the nearest neighbour, the algorithm finishes.
Meaning of colours:
Green - searched octant
Blue - currently processed octant
Purple - node's residing octant
Purple sphere - current search radius
Yellow node on the edge of the sphere - current nearest neighbor
Random Projection tree is built by picking 2 random points and building a perpendicular plane right between them. Then all points are split into 2 partitions depending on which side of the plane they are. This is repeated until each partition contains less than a given treshold number of points. Nearest neighbour search works by recursing down the stree to the partition containing the point. Then the point in that partition is set as current best and the algorithm goes back up the tree while checking at each level if any other partitions are in the radius to possibly contain better candidates. If so, those partitions are also checked. When there are no partitions left to check, the algorithm finishes with current best being the nearest neighbour.
Max number of points in a space partition - All 3 algorithms split the space into subpartitions. This is the maximum number of points that are allowed in any one smallest leaf partition, otherwise the partition will be split into more subpartitions.
Do steps automatically - When ticked, after pressing generate the algorithm will do the visualization steps automatically at the given interval.
Automatic step interval - Time between automatic steps when "do steps automatically" is ticked.
Do next step - Can be used to do the next step in the algorithm if "do steps automatically" is unticked.


New parent leave
All full-time employees, regardless of gender, can opt to take up to 12 weeks of unpaid new parent leave. This time is typically used for the new parent to welcome the new child or children into their home, but can also be used near the end of pregnancy for medical reasons.
How it works
An employee is considered a new parent four weeks before the birth of a biological child, upon adoption of a child, or upon receiving a foster child. The 12 weeks must be used within 1 year of the birth, adoption, or placement (respectively) of the new child. The leave can be taken consecutively or intermittently as needed. During the 12 weeks, you will not receive your usual salary, but health benefits will continue. Here’s how missed benefit deductions are caught-up.
How to use
New parent leave can be used by notifying the person you report to as early as reasonably possible and gaining approval. Under normal circumstances, at least several weeks notice is expected. New parent leave can be taken in whole-day increments.


Public key
Alice
Wallet
DLC
Bob
Wallet
DLC
Preparation
UTXOs of Alice and Bob
txid
idx
Alice
Bob
Fund Transaction (no signature)
txid :
Alice/Bob send signature of CETs to Bob/Alice.
Fund Transaction (with signature)
Which user and message are you sending?
User
Message
Alice
Fine
Bob
Rain
txid :
txid :


SURETY, BAIL BOND--REPEALED
§§445-201 to 445-203 REPEALED. L 1990, c 164, §26.
Cross References
For present provision, see §804-62.


34th All New England Choral Festival
Plymouth State University
Dr. Dan Perkins, Conductor
The registration deadline has passed. Thank you for your interest. Please consider participating in next year's festival.


How does JavaScript compare to HTML and CSS?
JavaScript is similar to HTML and CSS because you follow the same structure of giving commands and getting resluts. However, JavaScript is based more on equations, which enables you to perform more detailed commands, and get a more complex result.
Explain control flow and loops using an example process from everyday life, for example 'waking up' or 'brushing your teeth'.
Control flow is like an algorthym for figuring out what should be the next step: For example; Waking up at 9am; if you wake up at 9am - you begin the process of getting ready, if you wake before 9am - you can do what you like until 9am, if you wake up after 9am - then you are late and its time to panic. Loops are used to excute a command a specific number of times.
Explain the difference between accessing data from arrays and objects.
Arrays use numbers to access its elements, and objects use names.
Explain what functions are and why they are useful.


I'm Laude Francois Espiritu
Making something useful and beautiful for the world to see.
About Me
Hello there! I'm Laude Francois Espiritu and I do software development and front end design-focused on delivering quality user interfaces and experiences. After graduating at AMA Computer Learning Center, I got into Yokohama Tire Philippines Inc. and have been a part of their MIS Team for over three years. Now, I do software development as a freelancer. Creating products that are useful, great visual design and representations, and with the best user experience is my career goal.
Work Experience
Having more than two years of experience in software development, I still want learning more and grow in this industry.
Junior Software Developer
Yokohama Tire Phils. Inc.
June 2017 - September 2020
Software design and development using .NET Framework (C# and ASP.NET) and Oracle Database. Conducting technical analysis and planning for client’s software requirements. Creation of project’s software documentations. Providing support for in-house, outsourced, and production related software applications.
Mockups
Here are a few sample mockups that I have designed. The following are: an account management, e-newsletter, and a marketing ad HTML email.
Click on the image's title on hover to view the HTML template online.
Need a design or an HTML email?
I got you covered. Markups for these HTML emails were already been created, they're just waiting to be adopted.
Technologies I'm working with
Lists of programming languages, frameworks, libraries, and tools that I have used throughout my career.
See more?
View my resume and learn more about my professional loadout.
Reach out!
Got an idea for a project and you are interested in working with me? Or just want to chat and hangout? Feel free to reach out!


Header 1
Cur luba manducare? Pol, a bene ionicis tormento. Warm, sichuan-style pudding is best garnished with aged BBQ sauce.
Header 2
Wildly open a starship. Belay, ye small wench- set sails for hunger! Springy, juicy pudding is best blended with whole ice water.
Header 3
Bitter turkey can be made tasty by brushing with sweet chili sauce. Popcorn combines greatly with grey peanut butter.
Header 1
Cur luba manducare? Pol, a bene ionicis tormento. Warm, sichuan-style pudding is best garnished with aged BBQ sauce.
Header 2
Wildly open a starship. Belay, ye small wench- set sails for hunger! Springy, juicy pudding is best blended with whole ice water.
Header 3
Bitter turkey can be made tasty by brushing with sweet chili sauce. Popcorn combines greatly with grey peanut butter.


Uninhabited mansions of London's "Billionaires' Row"
by Mark FrauenfelderLondon real estate has been a favorite place for oligarchs and thugs to safely park their ill-gotten money. This 9-minute documentary takes you on a tour of North London's Billionaires' Row of uninhabited mansions. The structures are decaying, but the owners don't care, because the real value are the lots themselves.
From Amusing Planet:
The entire neighbourhood is owned by the super-rich, ranging from Saudi princes to East European arms dealers to Indian business magnates. Yet, no one ever lives here for more than a few weeks each year. Most have been left to the staff who looks after the properties while the owners are away. Others have never been occupied. Several huge properties have fallen into ruins after lying vacant for more than 25 years. These once expensive homes are in a terribly bad shape with peeling paint, rotting carpets, water streaming down bedroom walls, collapsed ceilings, and ferns growing between broken floor tiles.
The person who made this video said in the YouTube description, "We rarely explore alone but this documentary was filmed single-handedly, with a sharp ear, eye, a suppression of urgent tension, and a constant readiness to run! Hope you find it interesting."


TITUS (Fox Searchlight) Starring: Anthony Hopkins, Jessica Lange, Alan Cumming, Angus Macfayden, Laura Fraser, Colm Feore, Harry Lennix, Matthew Rhys, Jonathan Rhys-Meyers, James Frain, Osheen Jones. Screenplay: Julie Taymor, based on TITUS ANDRONICUS by William Shakespeare. Producers: Conchita Airoldi, Julie Taymor and Jody Patton. Director: Julie Taymor.  Reviewed by Scott Renshaw.
I'm not saying that there's absolutely nothing Julie Taymor isn't willing to try in her feature film debut TITUS, but at some point during the production I'm fairly certain I saw a kitchen sink fly through the frame. It came somewhere between the Roman soldiers marching in traditional costume and political rivals riding in motorcades, between the swing band playing at an emperor's wedding feast and the swing of a camera around a freeze-frame tableau of death a la THE MATRIX. There's no telling from one minute to the next where or when we are, or what cinematic device will make a cameo appearance. Virtually from the first frame, TITUS unfolds as over two and a half hours of blood, bombast and auteurial audacity.
I'm having a hard time putting my finger on exactly why TITUS actually left me marginally impressed instead of bored by the director's "hey, check out what I can do" style. Sure, it's Shakespeare; it's also the play T. S. Eliot called "one of the stupidest and most uninspired plays ever written." The main narrative follows the tragedies that befall a successful Roman general named Titus Andronicus (Anthony Hopkins) after his return from a campaign against the Goths. Though the people want Titus to become emperor after the death of the latest Caesar, the warrior instead supports the late emperor's eldest son Saturninus (Alan Cumming). Big mistake. Soon Saturninus is married to Tamora (Jessica Lange), a Goth queen with a grudge against Titus, and Titus' family begins meeting with cruel fates -- many of them orchestrated by Tamora's Moorish lover Aaron (Harry Lennix).
TITUS' odd prologue finds a young boy (Osheen Jones) in a contemporary kitchen playing violently with his toys before being spirited away to the locations of the play. Initially, I suspected that Taymor was preparing to put together an attack on the glorification and sanitization of violence, with the boy as silent observer to the story's many murders, sacrifices, dismemberments and throat-slashings. Indeed, the acts of violence and vengeance are many and frequent, but the sub-text of the boy as observer eventually vanishes as he is abruptly absorbed into the narrative as Titus' grandson. Without a sense that there's some sort of cultural lesson to be taken away from the gruesome events, they simply become gruesome events. I'd never read TITUS ANDRONICUS nor seen any production before this one, and I can't say I'm terribly eager to see it again. T. S. Eliot wasn't being very hyperbolic in his assessment.
Yet while TITUS is far from a gripping story, it's still a pretty decent piece of theater. Taymor's roots are on Broadway (she directed the stage production of THE LION KING), but that doesn't mean she can't make use of a camera. At times, TITUS almost seems to be the work of a director who isn't sure if she'll ever get the chance to make a film again, so she leaves everything she's got on the screen. There are a couple of shots that ended up lodged in my head -- a horrifying vision of Titus' daughter Lavinia (Laura Fraser) discovered by Titus' brother Marcus (Colm Feore) after she has been raped and mutilated, and a truck carrying some grisly artifacts of the Andronici's conflict with the emperor. Dante Ferretti's production design and Elliot Goldenthal's score must have driven each man mad, so many variations does Taymor ask of them. It's hard to imagine so grim a tale given more energy through sheer force of a director's imagination.
It would be a cruel misuse of the word "entertaining" to say that TITUS qualifies. It's well-acted enough -- Cumming in particular is a delight as the foppish Saturninus -- but not a showcase for master thespianism. In fact, Anthony Hopkins' best moment may be a ghoulish reference to his renown as cinema's most famous cannibal. I didn't enjoy all that much of TITUS, but I found myself admiring Taymor's choices even when I didn't understand them, or even agree with them. Simply put, TITUS is a display of film-making nerve -- the spectacle of a novice movie director deciding to pick Shakespeare for her first work, and one of Shakespeare's least respected works at that, then molding it into something consistently watchable. Taymor gets her hands dirty the hard way ... and, fortunately for her, there's a kitchen sink lying around to wash them in.
On the Renshaw scale of 0 to 10 severence packages: 6.
Visit Scott Renshaw's Screening Room http://www.inconnect.com/~renshaw/ *** Subscribe to receive new reviews directly by email! See the Screening Room for details, or reply to this message with subject "Subscribe".
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


Table Of Contents
In this series, we’re instrumenting a Phoenix app and sending metrics to StatsD with the help of Elixir and Erlang’s Telemetry offerings.
- Part I: Telemetry Under The Hood
- Part II: Handling Telemetry Events with
TelemetryMetrics
+TelemetryMetricsStatsd
- Part III: Observing Phoenix + Ecto Telemetry Events
- Part IV: Erlang VM Measurements with
telemetry_poller
,TelemetryMetrics
+TelemetryMetricsStatsd
Intro
In Part I of this series, we learned why observability is important and introduced Erlang’s Telemetry library. We used it to hand-roll some instrumentation for our Phoenix app, but it left us with some additional problems to solve. In this post, we’ll use Elixir’s Telemetry.Metrics
and TelemetryMetricsStatsd
libraries to define and send metrics to StatsD for a given Telemetry event.
Recap
In our previous post, we added some Telemetry instrumentation to our Phoenix app, Quantum. You can review the final code from our previous article here. To recap, we established a Telemetry event, [:phoenix, :request]
, that we attached to a handler module, Quantum.Telemetry.Metrics
. We executed this event from just one controller action–the new
action of the UserController
.
From that controller action, we execute the Telemetry event with a measurement map that includes the duration of the web request along with the request conn
:
# lib/quantum_web/controllers/user_controller.ex
def new(conn, _params) do
start = System.monotonic_time()
changeset = Accounts.change_user(%User{})
:telemetry.execute([:phoenix, :request], %{duration: System.monotonic_time() - start}, conn)
render(conn, "new.html", changeset: changeset)
end
We handle this event in our handler module, Quantum.Telemetry.Metric
, with the handle_event/4
callback function. In this function we use the event data, including the duration and information in the conn
to, send a set of metrics to StatsD with the help of the Statix
Elixir StatsD client library:
# lib/quantum/telemetry/metrics.ex
defmodule Quantum.Telemetry.Metrics do
require Logger
alias Quantum.Telemetry.StatsdReporter
def handle_event([:phoenix, :request], %{duration: dur}, metadata, _config) do
StatsdReporter.increment("phoenix.request.success", 1)
StatsdReporter.timing("phoenix.request.success", dur)
end
end
What’s Wrong With This?
Telemetry made it easy for us to emit an event and operate on it, but our current usage of the Telemetry library leaves a lot to be desired.
One drawback of our current approach is that it leaves us on the hook for Telemetry event handling and metrics reporting. We had to define our own custom event handling module, manually attach that module to the given Telemetry event and define the handler’s callback function.
In order for that callback function to report metrics to StatsD for a given event, we had to create our own custom module that uses the Statix
library and write code that formats the metric to send to StatsD for a given Telemetry event. The mental overhead of translating Telemetry event data into the appropriate StatsD metric is costly, and that effort will have to be undertaken for every new Telemetry event we execute and handle.
We Need Help
Wouldn’t it be great if we didn’t have to define our own handler modules or metric reporting logic? If only there was some way to simply list the Telemetry events we care about and have them automatically reported to StatsD as the correctly formatted metric…
This is exactly where the Telemetry.Metrics
and TelemetryMetricsStatsd
libraries come in!
Introducing Telemetry.Metrics
and TelemetryMetricsStatsd
The Telemetry.Metrics
library provides a common interface for defining metrics based on Telemetry events. It allows us declare the set of Telemetry events that we want to handle and specify which metrics to construct for these events. It also allows us to specify an out-of-the-box reporter with which to handle and report our events to third-parties.
This means we don’t have to define our own handler modules and functions and we don’t have to write any code responsible for reporting metrics for events to common third-party tools like StatsD. We’ll report our metrics to StatsD with the TelemetryMetricsStatsd
reporting library, but Elixir’s Telemetry family of libraries also includes a reporter for Prometheus, or you can roll your own.
In the previous post, we added code to execute the following Telemetry event from the new
action of our UserController
:
:telemetry.execute([:phoenix, :request], %{duration: System.monotonic_time() - start}, conn)
Now, instead of handling this event with our custom handler and Statix
reporter, will use Telemetry.Metrics
and the TelemetryMetricsStatsd
reporter to do all of the work for us!
How It Works
Before we start writing code, let’s walk through how Telemetry.Metrics
and the TelemetryMetricsStatsd
reporter work together with Erlang’s Telemetry library to handle Telemetry events.
The Telemetry.Metrics
library is responsible for specifying which Telemetry events we want to handle as metrics. It defines the list of events we care about and specifies which events should be sent to StatsD as which type of metric (for example, counter, timing, gauge etc.). It gives this list of events-as-metrics to the Telemetry reporting client, TelemetryMetricsStatsd
.
The TelemetryMetricsStatsd
library is responsible for taking that list of events and attaching its own event handler module, TelemetryMetricsStatsd.EventHandler
to each event via a call to :telemetry.attach/4
. Recall from our first post that :telemetry/attach/4
stores events and their associated handlers in an ETS table.
Later, when a Telemetry event is executed via a call to :telemetry.execute/3
, Telemetry looks up the event handler, TelemetryMetricsStatsd.EventHandler
, for the given event in the ETS table and invokes it. The event handler module will format the event, metadata and any associated tags as the appropriate StatsD metric and send the resulting metric to StatsD over UDP.
Most of this happens under the hood. We are only on the hook for defining a Telemetry.Metrics
module and listing the Telemetry events we want to handle as which type of metric. That’s it!
Getting Started
You can follow along with this tutorial by cloning down the repo here.
- Checking out the starting state of our code on the branch part-2-start
- Find the solution code on the branch part-2-solution
Overview
In order to get this Telemetry pipeline up and running, we don’t have to write too much code.
We will:
- Define a supervisor module that imports
Telemetry.Metrics
- Define a set of metrics for the Telemetry events we want to observe using the
Telemetry.Metrics
metrics definition functions - Tell the supervisor to run the
TelemetryMetricsStatsd
GenServer with the list of metrics we defined in the previous step
Let’s do it!
Setting Up Telemetry.Metrics
First, we’ll add the Telemetry.Metrics
library and the TelemetryMetricsStatsd
reporter library to our application’s dependencies and run mix deps.get
:
# mix.exs
defp deps do
[
{:telemetry_metrics, "~> 0.4"},
{:telemetry_metrics_statsd, "~> 0.3.0"}
]
end
Now we’re ready to define a module that imports Telemetry.Metrics
.
Step 1: Defining a Metrics Module
We’ll define a module that imports the Telemetry.Metrics
library and acts as a Supervisor. Our Supervisor will start up the child GenServer provided by the TelemetryMetricsStatsd
reporter. It will start that GenServer along with an argument of the list of Telemetry events to listen for, structured as metrics, via the :metrics
option.
We’ll place our metrics module in lib/quantum/telemetry.ex
defmodule Quantum.Telemetry do
use Supervisor
import Telemetry.Metrics
def start_link(arg) do
Supervisor.start_link(__MODULE__, arg, name: __MODULE__)
end
def init(_arg) do
children = [
{TelemetryMetricsStatsd, metrics: metrics()}
]
Supervisor.init(children, strategy: :one_for_one)
end
defp metrics do
[
# coming soon!
]
end
end
We’ll come back to the metrics list in a bit. First, let’s teach our application to start this Supervisor when the app starts up but adding it to our application’s supervision tree in the Quantum.Application.start/2
function:
# lib/quantum/application.ex
def start(_type, _args) do
children = [
Quantum.Repo,
QuantumWeb.Endpoint,
Quantum.Telemetry
]
opts = [strategy: :one_for_one, name: Quantum.Supervisor]
Supervisor.start_link(children, opts)
end
Now we’re ready to specify which Telemetry events to handle as metrics.
Step 2: Specifying Events As Metrics
Our Telemetry.Metrics
module, Quantum.Telemetry
, is responsible for telling the TelemetryMetricsStatsd
GenServer which Telemetry events to respond to and how to treat each event as a specific type of metric.
We want to handle the [:phoenix, :request]
event described above. First, let’s consider what type of metrics we want to report for this event. Let’s say we want to increment a counter for each such event, thereby keeping track of the number of requests our app receives to the endpoint. Let’s also send a timing metric to report the duration of a given web request.
Now that we have a basic idea of what kind of metrics we want to construct and send to StatsD for our event, let’s take a look at how Telemetry.Metrics
allows us to define these metrics.
Defining Our Metrics
The Telemetry.Metrics
module provides a set of five metrics functions. These functions are responsible for formatting Telemetry event data as a given metric.
We’ll use the Telemetry.Metrics.counter/2
and the Telemetry.Metrics.summary/2
functions to define our metrics for the given event.
In our Quantum.Telemetry
module, which imports Telemetry.Metrics
, we’ll add the following to the metrics
function:
# lib/quantum/telemetry.ex
defp metrics do
[
summary(
"phoenix.request.duration",
unit: {:native, :millisecond},
tags: [:request_path]
),
counter(
"phoenix.request.count",
tags: [:request_path]
)
]
end
Each metric function takes in two arguments:
- The event name
- A list of options
And returns a struct that describes the given metric type. For example, the counter/2
function returns a %Telemetry.Metrics.Counter{}
struct that looks like this:
%Telemetry.Metrics.Counter{
description: Telemetry.Metrics.description(),
event_name: :telemetry.event_name(),
measurement: Telemetry.Metrics.measurement(),
name: Telemetry.Metrics.normalized_metric_name(),
reporter_options: Telemetry.Metrics.reporter_options(),
tag_values: (:telemetry.event_metadata() -> :telemetry.event_metadata()),
tags: Telemetry.Metrics.tags(),
unit: Telemetry.Metrics.unit()
}
Now that we’ve defined our metrics list, we’re ready for the next step.
Step 3: Start The TelemetryMetricsStatsd
GenServer with the Metrics List
The list of metrics structs gets passed to the TelemetryMetricsStatsd
GenServer when it gets started up:
defmodule Quantum.Telemetry do
use Supervisor
import Telemetry.Metrics
def start_link(arg) do
Supervisor.start_link(__MODULE__, arg, name: __MODULE__)
end
def init(_arg) do
children = [
{TelemetryMetricsStatsd, metrics: metrics()} # here!
]
Supervisor.init(children, strategy: :one_for_one)
end
defp metrics do
[
summary(
"phoenix.request.duration",
unit: {:native, :millisecond},
tags: [:request_path]
),
counter(
"phoenix.request.count",
tags: [:request_path]
)
]
end
end
This kicks off the following process:
- When the
TelemetryMetricsStatsd
starts, it stores events in ETS along with their handler and a config map including this list of metric structs - Later, when
TelemetryMetricsStatsd
is responding to executed events, it looks up the event in ETS and uses the metrics structs stored in that config map to format the appropriate metrics for sending to StatsD
Seeing It In Action
Note that in our call to counter/2
and summary/2
, we’re using the :tag
option to specify which tags will be applied to the metric when it gets sent to StatsD. The TelemetryMetricsStatsD
reporter will, when it receives our [:phoenix, :request]
event, grab any values for the tag keys that are present in the event metadata and use them to construct the metric.
So, when we execute our Telemetry with the conn
passed in as the metadata argument:
# lib/quantum_web/controllers/user_controller.ex
def new(conn, _params) do
:telemetry.execute([:phoenix, :request], %{duration: System.monotonic_time() - start}, conn)
end
The TelemetryMetricsStatsD
will format a counter and summary metric tagged with the value of the :request_path
key found in the conn
.
So, if we run our app and send some web requests, we’ll see the following metrics reported to StatsD:
{
counters: {
'phoenix.request.count.-register-new': 2,
},
timers: {
'phoenix.request.count.-register-new': [ 0, 0 ],
},
timer_data: {
'phoenix.request.duration.-register-new': {
count_90: 2,
mean_90: 0,
upper_90: 0,
sum_90: 0,
sum_squares_90: 0,
std: 0,
upper: 0,
lower: 0,
count: 2,
count_ps: 0.2,
sum: 0,
sum_squares: 0,
mean: 0,
median: 0
}
}
}
Under The Hood
The Quantum.Telemetry
module is, believe it or not, the only code we have to write in order to send these metrics to StatsD for the "phoenix.router_dispatch.stop"
event. The Telemetry libraries take care of everything else for us under the hood.
Let’s take a closer look at how it all works.
- The
Telemetry.Metrics
supervisor that we defined inQuantum.Telemetry
defines a list of metrics that we want to emit to StatsD for a given Telemetry event - When the supervisor starts, it starts the
TelemetryMetricsStatsd
GenServer and gives it this list - When the
TelemetryMetricsStatsd
GenServer starts, it calls:telemetry.attach/4
for each listed event, storing it in an ETS table along with the handler callback and a config map that includes the metrics definitions. The handler callback it gives to:telemetry.attach/4
is its ownTelemetryMetricsStatsd.EventHandler.handle_event/4
function. - Later, when a Telemetry event is executed via a call to
:telemetry.execute/3
, Telemetry looks up the handler callback and config (including metrics definitions) for the given event in ETS - The
:telemetry.execute/3
function then calls this handler callback,TelemetryMetricsStatsd.EventHandler.handle_event/4
, with the event name, event measurement map, event metadata and metrics config - The
TelemetryMetricsStatsd.EventHandler.handle_event/4
function formats the appropriate metric using all of this information and sends it to StatsD over UDP
Phew!
Let’s take a deeper dive into this process by taking a look at some source code.
TelemetryMetricsStatsd
Attaches Events to Handlers and Config Data
When our supervisor starts the TelemetryMetricsStatsd
GenServer, the GenServer’s init/1
function calls on TelemetryMetricsStatsd.EventHandler.attach/7
with a set of arguments that includes the metrics list we provided. This in turn executes a call to :telemetry.attach/4
:
# telemetry_metrics_statsd/lib/telemetry_metrics_statsd/event_handler.ex
def attach(metrics, reporter, mtu, prefix, formatter, global_tags) do
metrics_by_event = Enum.group_by(metrics, & &1.event_name)
for {event_name, metrics} <- metrics_by_event do
handler_id = handler_id(event_name, reporter)
:ok =
:telemetry.attach(handler_id, event_name, &__MODULE__.handle_event/4, %{
reporter: reporter,
metrics: metrics,
mtu: mtu,
prefix: prefix,
formatter: formatter,
global_tags: global_tags
})
end
end
The call to :telemetry.attach/4
will create an ETS entry that stores the event name along with the handler callback function,&TelemetryMetricsStatsd.EventHandler.handle_event/4
, and a config map that contains the metrics definitions for the event.
TelemetryMetricsStatsd.EventHandler
Handles Executed Events
Later, the [:phoenix, :request]
event is executed in our UserController
:
# lib/quantum_web/controllers/user_controller.ex
def new(conn, _params) do
:telemetry.execute([:phoenix, :request], %{duration: System.monotonic_time() - start}, conn)
end
The :telemetry.execute/3
function looks up the event in ETS. It fetches the handler callback function, along with the config that was stored for that event, including the list of metric definitions.
Telemetry will then call the callback function, TelemetryMetricsStatsd.EventHandler.handle_event/4
, with the provided measurement map and metadata, along with stored config it looked up for the event in ETS.
TelemetryMetricsStatsd.EventHandler.handle_event/4
will format the metric according to the metrics definitions stored in ETS for the event and send the resulting metric to StatsD.
Here we can see that the TelemetryMetricsStatsd.EventHandler.handle_event/4
iterates over the metric definitions for the event and constructs the appropriate metric from the event data using the given measurement and metadata maps along with the metric struct from the list of metrics stored in the config. It then publishes the metric to StatsD over UDP via the call to publish_metrics/2
# telemetry_metrics_statsd/lib/telemetry_metrics_statsd/event_handler.ex
def handle_event(_event, measurements, metadata, %{
reporter: reporter,
metrics: metrics,
mtu: mtu,
prefix: prefix,
formatter: formatter_mod,
global_tags: global_tags
}) do
packets =
# iterate over the stored metric definitions
for metric <- metrics do
# get the measurement for the metric type from the measurements map
case fetch_measurement(metric, measurements) do
{:ok, value} ->
# collect metric tags specified in the metric struct
tag_values =
global_tags
|> Map.new()
|> Map.merge(metric.tag_values.(metadata))
tags = Enum.map(metric.tags, &{&1, Map.fetch!(tag_values, &1)})
# format the metric given the metric type, value and tags
Formatter.format(formatter_mod, metric, prefix, value, tags)
:error ->
:nopublish
end
end
|> Enum.filter(fn l -> l != :nopublish end)
case packets do
[] ->
:ok
packets ->
# publish metrics to StatsD
publish_metrics(reporter, Packet.build_packets(packets, mtu, "\n"))
end
end
Conclusion
The Telemetry.Metrics
and TelemetryMetricsStatsd
libraries make it even easier for us to handle Telemetry events and report metrics based on those events. All we have to do is define a Supervisor that uses Telemetry.Metrics
and tell that Supervisor to start the TelemetryMetricsStatsd
GenServer with a list of metric definitions.
That’s it! The TelemetryMetricsStatsd
library will take care of calling :telemetry.attach/3
to store events in ETS along with a handler callback function and the metrics list for that event. Later, when a Telemetry event is executed, Telemetry will lookup the event and its associated handler function and metrics list and invoke the handler function with this data. The handler function, TelemetryMetricsStatsd.EventHandler.handle_event/4
, will iterate over the list of metric structs that was stored for the event in ETS and construct the appropriate StatsD metric given the metric type and tags, the event measurement map and metadata. All for free!
Next Up
In this post, we saw how Telemetry.Metrics
and TelemetryMetricsStatsd
abstracted away the need to define custom handlers and callback functions, attach those handlers to events and implement our own metric reporting logic. But our Telemetry pipeline still needs a little work.
We’re still on the hook for emitting all of our own Telemetry events.
In order to really be able to observe the state of our production Phoenix app, we need to be reporting on much more than just one endpoint’s request duration and count. We want to be able to handle information-rich events describing web requests across the app, database queries, the behavior and state of the Erlang VM, the behavior and state of any workers in our app, and more.
Instrumenting all of that by hand, by executing custom Telemetry events wherever we need, them will be tedious and time-consuming. On top of that, it will be a challenge to standardize event naming conventions, measurements and metadata across the app.
In next week’s post, we’ll examine Phoenix and Ecto’s out-of-the-box Telemetry events and use Telemetry.Metrics
to observe a wide-range of such events, thus eliminating the need for us to execute our own custom events for most of our observability use-cases.
Caught a mistake or want to contribute to the article? Edit this page on GitHub!


Vendor Name:
XEROX CANADA LTD.
Reference Number:
8029699
Contract Date:
2015-01-05
Description of Work:
0533 Rental of Machinery, Office Furniture and Fixtures and Other Equipment
Contract Period:
2015-01-05 to 2019-30-04
Delivery Date:
2019-30-04
Original Contract Value:
$33,986.92
Current Contract Value:
$33,986.92
Comments:
This contract was competitively sourced using a Public Works and Government Services Canada procurement tool. This contract is a multi-year contract.
Additional Comments:
ADP input-output and storage devices imaging hardware, printers, photocopiers
Former Public Servant in Receipt of a Pension under the Public Service Superannuation Act:
No


pySpacell package¶
pySpacell module¶
-
class
pySpacell.pySpacell.
Spacell
(feature_file, image_label_file, column_objectnumber='ObjectNumber', column_x_y=['x', 'y'])¶ -
compute_per_image_analysis
(feature_columns, method, neighborhood_matrix_type, neighborhood_p0, neighborhood_p1, **kwargs)¶ Computes per image spatial analysis tests for the provided features for one neighborhood matrix.
- Feature_columns
list of str features’ names from feature_table. All features will be tested on the same neighborhood matrix and with the same analysis method.
- Method
str can be - ‘assortativity’ or ‘ripley’ (for categorical features), - ‘moran’, ‘geary’, ‘getisord’ (global spatial autocorrelation for continuous features)
- Neighborhood_matrix_type
str should be ‘k’, ‘radius’, or ‘network’
- Neighborhood_min_p0
int or float minimum bound for the neighborhood. should be int for ‘k’ or ‘network’. Can be int or float for ‘radius’
- Neighborhood_min_p1
int or float maximum bound for the neighborhood. should be int for ‘k’ or ‘network’. Can be int or float for ‘radius’
-
compute_per_object_analysis
(feature_columns, method, neighborhood_matrix_type, neighborhood_p0, neighborhood_p1, **kwargs)¶ Computes per object spatial analysis tests for the provided features for one neighborhood matrix.
- Feature_columns
list of str features’ names from feature_table. All features will be tested on the same neighborhood matrices and with the same analysis method
- Method
str can be ‘moran’ or’getisord’ (local spatial autocorrelation for continuous features)
- Neighborhood_matrix_type
str should be ‘k’, ‘radius’, or ‘network’
- Neighborhood_min_p0
int or float minimum bound for the neighborhood. should be int for ‘k’ or ‘network’. Can be int or float for ‘radius’
- Neighborhood_min_p1
int or float maximum bound for the neighborhood. should be int for ‘k’ or ‘network’. Can be int or float for ‘radius’
-
correlogram
(feature_columns, method, neighborhood_matrix_type, neighborhood_min_p0, neighborhood_max_p1, **kwargs)¶ Computes a serie of spatial analysis tests for the provided features. Gives one value for the image. The starting and ending neighborhood parameters, neighborhood_p0 and neighborhood_p1, are to be set. 3 modes are available to define the intermediary neighborhood parameters.
- Feature_columns
list of str features’ names from feature_table. All features will be tested on the same neighborhood matrices and with the same analysis method
- Method
str can be - ‘assortativity’ or ‘ripley’ (for categorical features), - ‘moran’, ‘geary’, ‘getisord’ (global spatial autocorrelation for continuous features)
- Neighborhood_matrix_type
str should be ‘k’, ‘radius’, or ‘network’ Same ‘neighborhood_matrix_type’ for all the points in the correlogram.
- Neighborhood_min_p0
int or float minimum bound for the neighborhood. should be int for ‘k’ or ‘network’. Can be int or float for ‘radius’
- Neighborhood_min_p1
int or float maximum bound for the neighborhood. should be int for ‘k’ or ‘network’. Can be int or float for ‘radius’
- Neighborhood_step
int or float a step in terms of parameters ([p0, p0+step, p0+2step, …p1]) should be int for ‘k’ or ‘network’. Can be int or float for ‘radius’ one of neighborhood_step, nb_pairs_step or nb_test_points should be defined.
- Nb_pairs_step
int a step in terms of number of pairs for each test. Overlooked if neighborhood_step is provided.
- Nb_test_points
int a number of test points. Overlooked if neighborhood_step or nb_pairs_step are provided.
-
get_neighborhood_matrix
(neighborhood_matrix_type, neighborhood_p0, neighborhood_p1, iterations='None', pysal_object=False, **kwargs)¶ Return the neighborhood matrix for specified parameters if already computed, thraw a ValueError otherwise. 3 modes are available:
‘k’ for k-nearest neighbors;
‘radius’ for neighbors at an euclidean distance;
‘network’ for neighbors from the object graph (touching objects are neighbors)
For each mode, an interval is requested to know which neighbors to include.
Examples:
‘k’, 2, 4 -> 2nd, 3rd, and 4th-nearest neighbors
‘radius’, 50.75, 100.85 -> neighbors at an euclidean distance falling between 50.75 pixels and 100.85 pixels
‘network’, 0, 1 -> neighbors having boundaries touching
- Neighborhood_matrix_type
str should be ‘k’, ‘radius’, or ‘network’
- Neighborhood_p0
int or float minimum bound for the neighborhood. should be int for ‘k’ or ‘network’. Can be int or float for ‘radius’
- Neighborhood_p1
int or float maximum bound for the neighborhood. should be int for ‘k’ or ‘network’. Can be int or float for ‘radius’
- Pysal_object
bool if True, return a pysal.lib.weights object if False, return a tuple (W, L) with W full numpy neighborhood matrix and L list of vertices’ ids
-
get_suffix
(neighborhood_matrix_type, neighborhood_p0, neighborhood_p1, **kwargs)¶ Returns the suffix for the additionally computed features in the feature_table: local spatial-autocorrelation statistical tests’ outputs, and neighborhood computation’s number of neighbors for each object (‘radius’ or ‘network’ neighborhood matrix type) or distance of last neighbor (‘k’ neighborhood matrix type).
- Neighborhood_matrix_type
str should be ‘k’, ‘radius’, or ‘network’
- Neighborhood_p0
int or float minimum bound for the neighborhood. should be int for ‘k’ or ‘network’. Can be int or float for ‘radius’
- Neighborhood_p1
int or float maximum bound for the neighborhood. should be int for ‘k’ or ‘network’. Can be int or float for ‘radius’
-
matrix_types
= ['k', 'radius', 'network']¶
-
precision_float_radius
= 3¶
-
-
class
pySpacell._neighborhood_matrix.
NeighborhoodMatrixComputation
¶ -
compute_neighborhood_matrix
(neighborhood_matrix_type, neighborhood_p0, neighborhood_p1, **kwargs)¶ Computes the neighborhood matrix from the label image as a pysal object. Stores it in the dataframe neighborhood_matrix_df.
- Neighborhood_matrix_type
str should be ‘k’, ‘radius’, or ‘network’
- Neighborhood_min_p0
int or float minimum bound for the neighborhood. should be int for ‘k’ or ‘network’. Can be int or float for ‘radius’
- Neighborhood_min_p1
int or float maximum bound for the neighborhood. should be int for ‘k’ or ‘network’. Can be int or float for ‘radius’
- Iterations
int. Optional Only used for ‘network’ neighborhood computation mode. Number of iterations of dilation to select the object neighbors from the label image. Default value: 1
- Kd_tree_approx
boolean. Optional Used for ‘radius’ and ‘k’. If set to True, then use a kd-tree to find kNN. Else compute all pair distances.
- Save_neighbors
bool if True, will add a column to feature_table with the ids of neighbors if False, do not keep the ids of neighbors
-
-
class
pySpacell._assortativity.
Assortativity
¶ -
_compute_assortativity
(feature_column, neighborhood_matrix_type, neighborhood_p0, neighborhood_p1, *args, iterations='None', permutations=0, quantiles=[2.5, 97.5], **kwargs)¶ Computes Newman’s assortativity function. one-sided test: only look at larger assortativity than random. Stores the results in the dataframe perimage_results_table.
- Feature_column
str features’ name from feature_table.
- Neighborhood_matrix_type
str should be ‘k’, ‘radius’, or ‘network’
- Neighborhood_min_p0
int or float minimum bound for the neighborhood. should be int for ‘k’ or ‘network’. Can be int or float for ‘radius’
- Neighborhood_min_p1
int or float maximum bound for the neighborhood. should be int for ‘k’ or ‘network’. Can be int or float for ‘radius’
- Permutations
int number of random permutations to compute the quantiles and p-value
- Quantiles
list of 2 float quantiles, 2 numbers between 0 and 100
-
-
class
pySpacell._ripley.
Ripley
¶ -
_compute_ripley
(feature_column, radius, permutations=999, quantiles=[2.5, 97.5], **kwargs)¶ Computes Ripley’s K cross-function. Only works with ‘radius’ neighborhood matrix type. Stores results in the dataframe perimage_results_table.
- Feature_column
str features’ name from feature_table.
- Radius
int or float maximum distance at which objects are considered save_neighbors
- Permutations
int number of random permutations to compute the quantiles and p-value
- Quantiles
list of 2 float quantiles, 2 numbers between 0 and 100
-
_get_edge_correction_area
(radius)¶ Corrects the estimation for the cases where the disc is not completely inside the image. cf Protazio
-
-
class
pySpacell._spatial_autocorrelation.
SpatialAutocorrelation
¶ -
_test_SA
(feature_column, method, neighborhood_matrix_type, neighborhood_p0, neighborhood_p1, permutations=999, quantiles=[2.5, 97.5], **kwargs)¶ Test spatial-autocorrelation with the selected method on the selected feature from feature_table. Computes one test (per feature per image). Stores the result in the dataframe perimage_results_table. Is computed on one neighborhood matrix.
- Method
str test method. Should be moran, geary or getisord
- Feature_column
str features’ name from feature_table.
- Neighborhood_matrix_type
str should be ‘k’, ‘radius’, or ‘network’
- Neighborhood_min_p0
int or float minimum bound for the neighborhood. should be int for ‘k’ or ‘network’. Can be int or float for ‘radius’
- Neighborhood_min_p1
int or float maximum bound for the neighborhood. should be int for ‘k’ or ‘network’. Can be int or float for ‘radius’
- Permutations
int number of random permutations to compute the quantiles and p-value
- Quantiles
list of 2 float quantiles, 2 numbers between 0 and 100
-
_test_local_SA
(feature_column, method, neighborhood_matrix_type, neighborhood_p0, neighborhood_p1, permutations=999, star=False, quantiles=[2.5, 97.5], **kwargs)¶ Tests feature for LOCAL/SINGLE-CELL spatial autocorrelation with the specified method. Computes one test per object. Stores the test results in the dataframe feature_table. Is computed for a given neighborhood matrix.
- Method
str test method. Should be moran or getisord
- Feature_column
str features’ name from feature_table.
- Neighborhood_matrix_type
str should be ‘k’, ‘radius’, or ‘network’
- Neighborhood_min_p0
int or float minimum bound for the neighborhood. should be int for ‘k’ or ‘network’. Can be int or float for ‘radius’
- Neighborhood_min_p1
int or float maximum bound for the neighborhood. should be int for ‘k’ or ‘network’. Can be int or float for ‘radius’
- Permutations
int number of random permutations to compute the quantiles and p-value
- Quantiles
list of 2 float quantiles, 2 numbers between 0 and 100
- Star
bool Used only if method is ‘getisord’ if star=True, includes the central object in the statistics. Hot spot analysis if star=False, does not include the central object in the statistics. Outlier analysis.
-
-
class
pySpacell._visualization.
Visualization
¶ -
get_feature_filled_image
(column_to_display, with_border=True, voronoi_bool=False, **kwargs)¶ Fills the image with values from column_to_display.
- Column_to_display
str column name from feature table with values you want to display
- With_border
bool if True, will add a border of background-colored pixels between each object if False, objects will touch each other like in provided label image_label
- Voronoi_bool
bool if True, computes the voronoi tessalation from the object centers if False, will color only the delimited object area provided by label image
-
get_hot_spots_image
(feature_column, method, neighborhood_matrix_type, neighborhood_p0, neighborhood_p1, image=None, hot=True, cold=True, contours=False, **kwargs)¶ Plots the hot and cold spots image
- Feature_column
str features’ name from feature_table.
- Method
str can be - ‘assortativity’ or ‘ripley’ (for categorical features), - ‘moran’, ‘geary’, ‘getisord’ (global spatial autocorrelation for continuous features)
- Neighborhood_matrix_type
str should be ‘k’, ‘radius’, or ‘network’ Same ‘neighborhood_matrix_type’ for all the points in the correlogram.
- Neighborhood_min_p0
int or float minimum bound for the neighborhood. should be int for ‘k’ or ‘network’. Can be int or float for ‘radius’
- Neighborhood_min_p1
int or float maximum bound for the neighborhood. should be int for ‘k’ or ‘network’. Can be int or float for ‘radius’
- Image
None or numpy array. Optional if provided, hot/cold spots will be displayed on this image. If not, they will be displayed on the label ones. Default value: None
-
plot_2im
(input1, input2, cmap1='plasma', cmap2='plasma', **kwargs)¶ Plots 2 filled images side by side.
- Column_name1
str column name from feature table which contains values for the left plot
- Column_name2
str column name from feature table which contains values for the right plot
- Title1
str, optional title for the left plot
- Title2
str, optional title for the right plot
- Cmap1
str name of a matplotlib cmap, for the left plot
- Cmap2
str name of a matplotlib cmap, for the right plot
- Min_value1
float minimum value of the colormap for the left plot
- Min_value2
float minimum value of the colormap for the right plot
- Max_value1
float maximum value of the colormap for the left plot
- Max_value2
float maximum value of the colormap for the right plot
-
plot_correlogram
(feature_column, method, neighborhood_matrix_type, neighborhood_min_p0, neighborhood_max_p1, quantiles=[2.5, 97.5], **kwargs)¶ Plots one feature at a time. Checks if the computing has been done. Retrieves info from perimage_results_table.
- Feature_column
str features’ name from feature_table.
- Method
str can be - ‘assortativity’ or ‘ripley’ (for categorical features), - ‘moran’, ‘geary’, ‘getisord’ (global spatial autocorrelation for continuous features)
- Neighborhood_matrix_type
str should be ‘k’, ‘radius’, or ‘network’ Same ‘neighborhood_matrix_type’ for all the points in the correlogram.
- Neighborhood_min_p0
int or float minimum bound for the neighborhood. should be int for ‘k’ or ‘network’. Can be int or float for ‘radius’
- Neighborhood_min_p1
int or float maximum bound for the neighborhood. should be int for ‘k’ or ‘network’. Can be int or float for ‘radius’
- Neighborhood_step
int or float a step in terms of parameters ([p0, p0+step, p0+2step, …p1]) should be int for ‘k’ or ‘network’. Can be int or float for ‘radius’ one of neighborhood_step, nb_pairs_step or nb_test_points should be defined.
- Nb_pairs_step
int a step in terms of number of pairs for each test. Overlooked if neighborhood_step is provided.
- Nb_test_points
int a number of test points. Overlooked if neighborhood_step or nb_pairs_step are provided.
-
plot_neighborhood
(neighborhood_matrix_type, neighborhood_p0, neighborhood_p1, image=None, with_border=True, voronoi_bool=False, **kwargs)¶ Visualize neighbors on the label image (default) or on a provided image.
- Neighborhood_matrix_type
str should be ‘k’, ‘radius’, or ‘network’
- Neighborhood_min_p0
int or float minimum bound for the neighborhood. should be int for ‘k’ or ‘network’. Can be int or float for ‘radius’
- Neighborhood_min_p1
int or float maximum bound for the neighborhood. should be int for ‘k’ or ‘network’. Can be int or float for ‘radius’
- Image
None or numpy array. Optional if provided, neighbors will be displayed on this image Default value: None
- With_border
bool. Optional Default value: True if image not provided and if True, then display image will be label image with two pixels of background between each object if image not provided and if False, then display image will be label image
- Voronoi_bool
bool. Optional. Default value: False if image not provided and if True, then display image will be the voronoi tessalation computed from label image if image not provided and if False, then display image will be the label image
-
plot_ripley_cross
(feature_column, neighborhood_min_p0, neighborhood_max_p1, class0, class1, quantiles=[2.5, 97.5], **kwargs)¶ Plots one feature at a time. Checks if the computing has been done. Retrieves info from perimage_results_table.
- Feature_column
str features’ name from feature_table.
- Method
str can be - ‘assortativity’ or ‘ripley’ (for categorical features), - ‘moran’, ‘geary’, ‘getisord’ (global spatial autocorrelation for continuous features)
- Neighborhood_matrix_type
str should be ‘k’, ‘radius’, or ‘network’ Same ‘neighborhood_matrix_type’ for all the points in the correlogram.
- Neighborhood_min_p0
int or float minimum bound for the neighborhood. should be int for ‘k’ or ‘network’. Can be int or float for ‘radius’
- Neighborhood_min_p1
int or float maximum bound for the neighborhood. should be int for ‘k’ or ‘network’. Can be int or float for ‘radius’
- Neighborhood_step
int or float a step in terms of parameters ([p0, p0+step, p0+2step, …p1]) should be int for ‘k’ or ‘network’. Can be int or float for ‘radius’ one of neighborhood_step, nb_pairs_step or nb_test_points should be defined.
- Nb_pairs_step
int a step in terms of number of pairs for each test. Overlooked if neighborhood_step is provided.
- Nb_test_points
int a number of test points. Overlooked if neighborhood_step or nb_pairs_step are provided.
-
plot_ripley_diff
(feature_column, neighborhood_min_p0, neighborhood_max_p1, class0, class1, class2, class3, **kwargs)¶ Plots one feature at a time. Checks if the computing has been done. Retrieves info from perimage_results_table.
- Feature_column
str features’ name from feature_table.
- Method
str can be - ‘assortativity’ or ‘ripley’ (for categorical features), - ‘moran’, ‘geary’, ‘getisord’ (global spatial autocorrelation for continuous features)
- Neighborhood_matrix_type
str should be ‘k’, ‘radius’, or ‘network’ Same ‘neighborhood_matrix_type’ for all the points in the correlogram.
- Neighborhood_min_p0
int or float minimum bound for the neighborhood. should be int for ‘k’ or ‘network’. Can be int or float for ‘radius’
- Neighborhood_min_p1
int or float maximum bound for the neighborhood. should be int for ‘k’ or ‘network’. Can be int or float for ‘radius’
- Neighborhood_step
int or float a step in terms of parameters ([p0, p0+step, p0+2step, …p1]) should be int for ‘k’ or ‘network’. Can be int or float for ‘radius’ one of neighborhood_step, nb_pairs_step or nb_test_points should be defined.
- Nb_pairs_step
int a step in terms of number of pairs for each test. Overlooked if neighborhood_step is provided.
- Nb_test_points
int a number of test points. Overlooked if neighborhood_step or nb_pairs_step are provided.
-
Submodule¶
-
class
pySpacell._ripley.
RipleyObject
(classes, count_classes, K, K_cross, K_cross_star, permutations, lambda_i)¶ -
get_cross_function
(class1, class2, star=True, variance_stabilization=True, **kwargs)¶
-
get_diff_cross_function
(class11, class12, class21, class22, **kwargs)¶
-
get_diff_pval
(class11, class12, class21, class22, star=True, **kwargs)¶
-
get_diff_quantiles
(class11, class12, class21, class22, star=True, quantiles=[2.5, 97.5], variance_stabilization=True, **kwargs)¶
-
get_pval
(class1, class2, star=True, **kwargs)¶
-
get_quantiles
(class1, class2, star=True, quantiles=[2.5, 97.5], variance_stabilization=True, **kwargs)¶
-


Primary Sjögren’s syndrome (pSS) is a systemic autoimmune disease, where patients often suffer from fatigue. Biological pathways underlying this fatigue are unknown. In this study aptamer-based SOMAscan technology is used to identify biomarkers and possible treatment targets for fatigue in pSS.
Serum concentrations of over 1300 proteins were compared between 63 pSS and 20 HCs resulting in 58 upregulated and 46 downregulated proteins. Additionally, serum concentrations of 30 interferon positive and 30 negative pSS patients were compared resulting in 25 upregulated and 13 downregulated proteins. ELISAs were performed for several DEPs between pSS patients and HCs or IFNpos and IFNneg all showing a good correlation between protein levels measured by ELISA and relative fluorescence units (RFU) measured by the SOMAscan. Comparing 22 fatigued and 23 non-fatigued pSS patients, 16 serum proteins were differentially expressed between, of which 14 were upregulated and 2 were downregulated. DEPs showed good capacity to discriminate fatigued and non-fatigued pSS patients.
In this study we validated the use of aptamer-based proteomics and were able to identify several proteins which were able to distinguish fatigued from non-fatigued pSS patients.


A script on this page starts this clock:
Click "Try it". Wait 3 seconds, and the page will alert "Hello".