Number of Geolocated Results
| POSITIVE | NEUTRAL | NEGATIVE |
-
equalizerFilter ▽
-
settingsSearch Settings ▽
-
gradeDemo ▽
@import model.Tweet @(tweets: List[Tweet], searchForm: Form[String], userQuery: String, tweetsAsJson: String, sentimentCountAsJson: String, selectedFilter: String)(implicit messages: Messages) @main("Sentitweet") {
Hey there!
Welcome to Sentitweet, a website that allows you to find out the sentiment of tweets! Let's take a look at the features its offers.
You can use this search bar to search for tweets. You can use keywords or hashtags (#).
You can view your results here. Sentitweet has a table view, a map view and a timeline view.
Want to see only the positive results from your search? You can do that and more here in the filter section.
With the advanced search settings you can change how you search for tweets.
You can set return only verified tweets or even set the geolocations to be random.
Play around with the settings to find which is the best for you!
The Demo section contains sample data and the button to turn me (your friendly tour guide) off.
That's all there is to Sentitweet!
 You could search for "coffee" for example :)
| POSITIVE | NEUTRAL | NEGATIVE |


Hyperloop Operations
Operations encapsulate business logic. In a traditional MVC architecture, Operations end up either in Controllers, Models or some other secondary construct such as service objects, helpers, or concerns. Here they are first class objects. Their job is to mutate state in the Stores and Models.
Hyperloop::Operation
is the base class for Operations.- An Operation orchestrates the updating of the state of your system.
- Operations also wrap asynchronous operations such as HTTP API requests.
- Operations serve the role of both Action Creators and Dispatchers described in the Flux architecture.
- Operations also serve as the bridge between client and server. An operation can run on the client or the server, and can be invoked remotely.
Here is the simplest Operation:
class Reset < Hyperloop::Operation
end
To 'Reset' the system you would say
ruby
Reset() # short for Reset.run
Elsewhere your HyperStores can receive the Reset Dispatch using the receives
macro:
class Cart < Hyperloop::Store
receives Reset do
mutate.items Hash.new { |h, k| h[k] = 0 }
end
end
Note that multiple stores can receive the same Dispatch.
Operation Structure
An operation does the following things:
- receives incoming parameters, and does basic validations
- performs any further validations
- executes the operation
- dispatches to any listeners
- returns the value of the execution (step 3)
These are defined by series of class methods described below.
Parameters
Operations can take parameters when they are run. Parameters are described and accessed with the same syntax as HyperReact components.
class AddItemToCart < Hyperloop::Operation
param :sku, type: String
param qty: 1, type: Integer, min: 1
end
class Cart < Hyperloop::Store
receives AddItemToCart do
mutate.items[params.sku] += params.qty
end
end
In addition unlike Hyperloop::Component params, Operation params are not reactive, and so you can assign to them as well:
ruby
params.some_value = 12
The parameter filter types and options are taken from the Mutations gem with the following changes:
- In Hyperloop::Operations all params are declared with the param macro.
- The type can be specified using the
type:
option. - Array and hash types can be shortened to
[]
and{}
- Optional params either have the default value associated with the param name, or by having the
default
option present. - All other Mutation filter options (such as
:min
) will work the same.
# required param (does not have a default value)
param :sku, type: String
# equivalent Mutation syntax
# required { string :sku }
# optional params (does have a default value)
param qty: 1, min: 1
# alternative syntax
param :qty, default: 1, min: 1
# equivalent Mutation syntax
# optional { integer :qty, default: 1, min: 1 }
All incoming params are validated against the param declarations, and any errors are posted to the @errors
instance variable. Extra params are ignored, but missing params unless they have a default value will cause a validation error.
Flux and Operations
Hyperloop is a merger of the concepts of the Flux pattern, the Mutation Gem, and Trailblazer Operations.
We chose the name Operation
rather than Action
or Mutation
because we feel it best captures all the capabilities of a Hyperloop::Operation
. Nevertheless Operations are fully compatible with the Flux Pattern.
| Flux | HyperLoop |
|---|---|
| Action | Hyperloop::Operation subclass |
| ActionCreator | Hyperloop::Operation.step/failed/async methods |
| Action Data | Hyperloop::Operation parameters |
| Dispatcher | Hyperloop::Operation#dispatch method |
| Registering a Store | Store.receives |
In addition Operations have the following capabilities:
- Can easily be chained because they always return promises.
- Clearly declare both their parameters, and what they will dispatch.
- Parameters can be validated and type checked.
- Can run remotely on the server.
- Can be dispatched from the server to all authorized clients.
- Can hold their own state data when appropriate.
Defining Execution Steps
Operations may define a sequence of steps to be executed when the operation is run, using the step
, failed
and async
callback macros.
class Reset < Hyperloop::Operation
step { HTTP.post('/logout') }
end
step
: runs a callback - each step is run in order.failed
: runs a callback if a previousstep
or validation has failed.async
: will be explained below.
step { } # do something
step { } # do something else once above step is done
failed { } # do this if anything above has failed
step { } # do a third thing, unless we are on the failed track
failed { } # do this if anything above has failed
Together step
and failed
form two railway tracks. Initially execution proceeds down the success track until something goes wrong, then
execution switches to the failure track starting at the next failed
statement. Once on the failed track execution continues performing each
failed
callback and skipping any step
callbacks.
Failure occurs when either an exception is raised or a promise fails (more on this in the next section.) The Ruby fail
keyword can be used as a simple way to switch to the failed track.
Both step
and failed
can receive any results delivered by the previous step. If the previous step raised an exception (outside a promise) the failure track will receive the exception object.
The callback may be provided to step
and failed
either as a block, a symbol (which will name a method), a proc, a lambda, or an Operation.
step { puts 'hello' }
step :say_hello
step -> () { puts 'hello' }
step Proc.new { puts 'hello' }
step SayHello # your params will be passed along to SayHello
FYI: You can also use the Ruby next
keyword as expected to leave the current step and move to the next one.
Promises and Operations
Within the browser, code does not wait for asynchronous methods (such as HTTP requests or timers) to complete. Operations use Opal's Promise library to deal with these situations cleanly. A Promise is an object that has three states: It is either still pending, or has been rejected (i.e. failed), or has been successfully resolved. A promise can have callbacks attached to either the failed or resolved state, and these callbacks will be executed once the promise is resolved or rejected.
If a step
or failed
callback returns a pending promise then the execution of the operation is suspended, and the Operation will return the promise to the caller. If there is more track ahead, then execution will resume on the next step when the promise is resolved. Likewise if the pending promise is rejected execution will resume on the next failed
callback. Because of the way promises work, the operation steps will all be completed before the resolved state is passed along to caller, so everything will execute in its original order.
Likewise the Operation's dispatch occurs when the promise resolves as well.
The async
method can be used to override the waiting behavior. If a step
returns a promise, and there is an async
callback farther down the track, execution will immediately pick up at the async
. Any steps in between will still be run when the promise resolves, but their results will not be passed outside of the operation.
These features make it easy to organize, understand and compose asynchronous code:
class AddItemToCart < Hyperloop::Operation
step { HTTP.get('/inventory/#{params.sku}/qty') }
# previous step returned a promise so next step
# will execute when that promise resolves
step { |response| fail if params.qty > response.to_i }
# once we are sure we have inventory we will dispatch
# to any listening stores.
end
Operations will always return a Promise. If an Operation has no steps that return a promise the value of the last step will be wrapped in a resolved promise. This lets you easily chain Operations, regardless of their internal implementation:
class QuickCheckout < Hyperloop::Operation
param :sku, type: String
param qty: 1, type: Integer, minimum: 1
step { AddItemToCart(params) }
step ValidateUserDefaultCC
step Checkout
end
You can also use Promise#when
if you don't care about the order of Operations
class DoABunchOStuff < Hyperloop::Operation
step { Promise.when(SomeOperation.run, SomeOtherOperation.run) }
# dispatch when both operations complete
end
Early Exits
In any step
or failed
callback, you may do an immediate exit from the Operation using the abort!
and succeed!
methods. The abort!
method returns a failed Promise with any supplied parameters. The succeed!
method does an immediate dispatch, and returns a resolved Promise with any supplied parameters. If succeed!
is used in a failed
callback, it will override the failed status of the Operation. This is especially useful if you want to dispatch in spite of failures:
class Pointless < Hyperloop::Operation
step { fail } # go to failure track
failed { succeed! } # dispatch and exit
end
Validation
An Operation can also have a number of validate
callbacks which will run before the first step. This is a handy place to put any additional validations. In the validate method you can add validation type messages using the add_error
method, and these will be passed along like any other param validation failures.
class UpdateProfile < Hyperloop::Operation
param :first_name, type: String
param :last_name, type: String
param :password, type: String, nils: true
param :password_confirmation, type: String, nils: true
validate do
add_error(
:password_confirmation,
:doesnt_match,
"Your new password and confirmation do not match"
) unless params.password == params.confirmation
end
# or more simply:
add_error :password_confirmation, :doesnt_match, "Your new password and confirmation do not match" do
params.password != params.confirmation
end
...
end
If the validate method returns a promise, then execution will wait until the promise resolves. If the promise fails, then the current validation fails.
You may also call abort!
from within validate
or add_error
to immediately exit the Operation. Otherwise all validations will be run and collected together and the Operation will move onto the failed
track. If abort!
is called within an add_error
callback the error will be added before aborting.
You can also raise an exception directly in validate if appropriate. If a Hyperloop::AccessViolation
exception is raised the Operation will immediately abort, otherwise just the current validation fails.
If you want to avoid further validations if there are any failures in the basic parameter validations you can add do add this
ruby
validate { abort! if has_errors? }
before the first validate
or add_error
call.
Handling Failed Operations
Because Operations always return a promise, you can use the Promise's fail
method on the Operation's result to detect failures.
QuickCheckout(sku: selected_item, qty: selected_qty)
.then do
# show confirmation
end
.fail do |exception|
# whatever exception was raised is passed to the fail block
end
Failures to validate params result in Hyperloop::ValidationException
which contains a Mutations error object.
ruby
MyOperation.run.fail do |e|
if e.is_a? Hyperloop::ValidationException
e.errors.symbolic # hash: each key is a parameter that failed validation,
# value is a symbol representing the reason
e.errors.message # same as symbolic but message is in English
e.errors.message_list # array of messages where failed parameter is
# combined with the message
end
end
Running Operations
You can run an Operation by using ...
the Operation class name as a method:
ruby MyOperation(...params...)
the
run
method:
ruby MyOperation.run ...params...
the
then
andfail
methods, which will dispatch the operation and attach a promise handler:
ruby MyOperation.then(...params...) { alert 'operation completed' }
Server Operations
Operations will run on the client or the server. Some Operations like ValidateUserDefaultCC
probably need to check information server side, and make secure API calls to our credit card processor. Rather than build an API and controller to "validate the user credentials" you simply specify that the operation must run on the server by using the Hyperloop::ServerOp
class.
class ValidateUserCredentials < Hyperloop::ServerOp
param :acting_user
add_error :acting_user, :no_valid_default_cc, "No valid default credit card" do
!params.acting_user.has_default_cc?
end
end
A Server Operation will always run on the server even if invoked on the client. When invoked from the client Server Operations will receive the acting_user
param with the current value that your ApplicationController's acting_user
method returns. Typically the acting_user
method will return either some User model, or nil (if there is no logged in user.) Its up to you to define how acting_user
is computed, but this is easily done with any of the popular authentication gems. Note that unless you explicitly add nils: true
to the param declaration, nil will not be accepted.
Note regarding Rails Controllers: Hyperloop is quite flexible and rides along side Rails, without interfering. So you could still have your old controllers, and invoke them the "non-hyperloop" way by doing say an HTTP.post from the client, etc. Hyperloop adds a new mechanism for communicating between client and server called the Server Operation (which is a subclass of Operation.) A ServerOp has no implication on your existing controllers or code, and if used replaces controllers, and client side API calls. HyperModel is built on top of Rails ActiveRecord models, and Server Operations, to keep models in sync across the application. ActiveRecord models that are made public (by moving them to the hyperloop/models folder) will automatically be syncronized across the clients and the server (subject to permissions given in the Policy classes.) Like Server Operations, HyperModel completely removes the need to build controllers, and client side API code. However all of your current active record models, controllers will continue to work unaffected.
As shown above you can also define a validation to further insure that the acting user (with perhaps other parameters) is allowed to perform the operation. In the above case that is the only purpose of the Operation. Another typical use would be to make sure the current acting user has the correct role to perform the operation:
...
validate { raise Hyperloop::AccessViolation unless params.acting_user.admin? }
...
You can bake this kind logic into a superclass:
class AdminOnlyOp < Hyperloop::ServerOp
param :acting_user
validate { raise Hyperloop::AccessViolation unless params.acting_user.admin? }
end
class DeleteUser < AdminOnlyOp
param :user
add_error :user, :cant_delete_user, "Can't delete yourself, or the last admin user" do
params.user == params.acting_user || (params.user.admin? && AdminUsers.count == 1)
end
end
Because Operations always return a promise, there is nothing to change on the client to call a Server Operation. A Server Operation will return a promise that will be resolved (or rejected) when the Operation completes (or fails) on the server.
Keeping server code on the server
There are valid cases where you will not want your ServerOp's code to be on the client yet still be able to invoke a ServerOp from client or server code. Good reasons for this would include:
- Security concerns where you would not want some part of your code on the client
- Size of code, where there will be unnecessary code downloaded to the client
- Server code using backticks (`) or the %x{ ... } sequence, both of which are interpreted on the client as escape to generate JS code.
To accomplish this, you wrap the server side implementation of the ServerOp in a RUBY_ENGINE == 'opal'
test which acts as a compiler directive so that this code is not compiled by Opal.
There are several strategies you can use to apply the RUBY_ENGINE == 'opal' guard to your code.
# strategy 1: guard blocks of code and declarations that you don't want to compile to the client
class MyServerOp < Hyperloop::ServerOp
# stuff that is okay to compile on the client
# ... etc
unless RUBY_ENGINE == 'opal'
# other code that should not be compiled to the client...
end
end
# strategy 2: guard individual methods
class MyServerOp < Hyperloop::ServerOp
# stuff that is okay to compile on the client
# ... etc
def my_secret_method
# do something we don't want shown on the client
end unless RUBY_ENGINE == 'opal'
end
# strategy 3: describe class in two pieces
class MyServerOp < Hyperloop::ServerOp; end # publically declare the operation
# provide the private implementation only on the server
class MyServerOp < Hyperloop::ServerOp
#
end unless RUBY_ENGINE == 'opal'
Here is a fuller example:
# app/hyperloop/operations/list_files.rb
class ListFiles < Hyperloop::ServerOp
param :acting_user, nils: true
param pattern: '*'
step { run_ls }
# because backticks are interpreted by the Opal compiler as escape to JS, we
# have to make sure this does not compile on the client
def run_ls
`ls -l #{params.pattern}`
end unless RUBY_ENGINE == 'opal'
end
# app/hyperloop/components/app.rb
class App < Hyperloop::Component
state files: []
after_mount do
@pattern = ''
every(1) { ListFiles.run(pattern: @pattern).then { |files| mutate.files files.split("\n") } }
end
render(DIV) do
INPUT(defaultValue: '')
.on(:change) { |evt| @pattern = evt.target.value }
DIV(style: {fontFamily: 'Courier'}) do
state.files.each do |file|
DIV { file }
end
end
end
end
Dispatching From Server Operations
You can also broadcast the dispatch from Server Operations to all authorized clients. The dispatch_to
will determine a list of channels to broadcast the dispatch to:
class Announcement < Hyperloop::ServerOp
# no acting_user because we don't want clients to invoke the Operation
param :message
param :duration, type: Float, nils: true
# dispatch to the builtin Hyperloop::Application Channel
dispatch_to Hyperloop::Application
end
class CurrentAnnouncements < Hyperloop::Store
state_reader all: [], scope: :class
receives Announcement do
mutate.all << params.message
after(params.duration) { delete params.message } if params.duration
end
def self.delete(message)
mutate.all.delete message
end
end
Channels
As seen above broadcasting is done over a Channel. Any Ruby class (including Operations) can be used as class channel. Any Ruby class that responds to the id
method can be used as an instance channel.
For example the User
active record model could be a used as channel to broadcast to all users. Each user instance could also be a separate instance channel that would be used to broadcast to a specific user.
The purpose of having channels is to restrict what gets broadcast to who, therefore typically channels represent connections to
- the application (represented by the
Hyperloop::Application
class) - or some function within the application (like an Operation)
- or some class which is authenticated like a User or Administrator,
- instances of those classes,
- or instances of classes in some relationship - like a
team
that auser
belongs to.
You create a channel by including the Hyperloop::Policy::Mixin
,
which gives you three class methods: regulate_class_connection
always_allow_connection
and regulate_instance_connections
. For example:
class User < ActiveRecord::Base
include Hyperloop::Policy::Mixin
regulate_class_connection { self }
regulate_instance_connection { self }
end
will attach the current acting user to the User
channel (which is shared with all users) and to that user's private channel.
Both blocks execute with self
set to the current acting user, but the return value has a different meaning. If regulate_class_connection
returns any truthy value, then the class level connection will be made on behalf of the acting user. On the other hand if regulate_instance_connection
returns an array (possibly nested) or Active Record relationship then an instance connection is made with each object in the list. So for example you could add:
class User < ActiveRecord::Base
has_many chat_rooms
regulate_instance_connection { chat_rooms }
# we will connect to all the chat room channels we are members of
end
Now if we want to broadcast to all users our Operation would have
dispatch_to { User } # dispatch to the User class channel
or to send an announcement to a specific user
class PrivateAnnouncement < Hyperloop::ServerOp
param :receiver
param :message
# dispatch_to can take a block if we need to
# dynamically compute the channels
dispatch_to { params.receiver }
end
...
# somewhere else in the server
PrivateAnnouncement(receiver: User.find_by_login(login), message: 'log off now!')
The above will work if PrivateAnnouncement
is invoked from the server, but usually some other client would be sending the message so the operation could look like this:
class PrivateAnnouncement < Hyperloop::ServerOp
param :acting_user
param :receiver
param :message
validate { raise Hyperloop::AccessViolation unless params.acting_user.admin? }
validate { params.receiver = User.find_by_login(receiver) }
dispatch_to { params.receiver }
end
Now on the client we can say:
PrivateAnnouncement(receiver: login_name, message: 'log off now!').fail do
alert('message could not be sent')
end
and elsewhere in the client code we would have a component like this:
class Alerts < Hyperloop::Component
include Hyperloop::Store::Mixin
# for simplicity we are going to merge our store with the component
state alert_messages: [] scope: :class
receives PrivateAnnouncement { |params| mutate.alert_messages << params.message }
render(DIV, class: :alerts) do
UL do
state.alert_messages.each do |message|
LI do
SPAN { message }
BUTTON { 'dismiss' }.on(:click) { mutate.alert_messages.delete(message) }
end
end
end
end
end
This will (in only 28 lines of code) + associate a channel with each logged in user + invoke the PrivateAnnouncement Operation on the server (remotely from the client) + validate that there is a logged in user at that client + validate that we have a non-nil, non-blank receiver and message + validate that the actinguser is an admin + lookup the receiver in the database under their login name + dispatch the parameters back to any clients where the receiver is logged in + those clients will update their alertmessages state and + display the message
The dispatch_to
callback takes a list of classes, representing Channels. The Operation will be dispatched to all clients connected on those Channels. Alternatively dispatch_to
can take a block, a symbol (indicating a method to call) or a proc. The block, proc or method should return a single Channel, or an array of Channels, which the Operation will be dispatched to. The dispatch_to callback has access to the params object. For example we can add an optional to
param to our Operation, and use this to select which Channel we will broadcast to.
class Announcement < Hyperloop::Operation
param :message
param :duration
param to: nil, type: User
# dispatch to the Users channel only if specified otherwise announcement is application wide
dispatch_to { params.to || Hyperloop::Application }
end
Defining Connections in ServerOps
The policy methods always_allow_connection
and regulate_class_connection
may be used directly in a ServerOp class. This will define a channel dedicated to that class, and will also dispatch to that channel when the Operation completes.
class Announcement < HyperLoop::ServerOp
# all clients will have a Announcement Channel which will
# receive all dispatches from the Annoucement Operation
always_allow_connection
end
class AdminOps < HyperLoop::ServerOp
# subclasses can be invoked from the client if an admin is logged in
# and all other clients that have a logged in admin will receive the dispatch
regulate_class_connection { acting_user.admin? }
param :acting_user
validate { param.acting_user.admin? }
end
Regulating Dispatches in Policy Classes
Regulations and dispatch lists can be grouped and specified in Policy files, which are by convention kept in the Rails app/policies
directory.
# app/policies/announcement_policy.rb
class AnnouncementPolicy
always_allow_connection
dispatch_to { params.acting_user }
end
# app/policies/user_policy.rb
class UserPolicy
regulate_instance_connection { self }
end
Serialization
If you need to control serialization and deserialization across the wire you can define the following class methods:
def self.serialize_params(hash)
# receives param_name -> value pairs
# return an object ready for to_json
# default is just return the input hash
end
def self.deserialize_params(object)
# recieves whatever was returned from serialize_to_server
# (param_name => value pairs by default)
# must return a hash of param_name => value pairs
# by default this returns object
end
def self.serialize_response(object)
# receives the object ready for to_json
# by default this returns object
end
def self.deserialize_response(object)
# receives whatever was returned from serialize_response
# by default this returns object
end
def self.serialize_dispatch(hash)
# input is always key - value pairs
# return an object ready for to_json
# default is just return the input hash
end
def self.deserialize_dispatch(object)
# recieves whatever was returned from serialize_to_server
# (param_name => value pairs by default)
# must return a hash of param_name => value pairs
# by default this returns object
end
Isomorphic Operations
Unless the Operation is a Server Operation it will run where it was invoked. This can be handy if you have an Operation that needs to run on both the server and the client. For example an Operation that calculates the customers discount, will want to run on the client so the user gets immediate feedback, and then will be run again on the server when the order is submitted as a double check.
Dispatching With New Parameters
The dispatch
method sends the params
object on to any registered receivers. Sometimes it's useful to add additional outbound params before dispatching. Additional params can be declared using the outbound
macro:
class AddItemToCart < Hyperloop::Operation
param :sku, type: String
param qty: 1, type: Integer, minimum: 1
outbound :available
step { HTTP.get('/inventory/#{params.sku}/qty') }
step { |response| params.available = response.to_i }
step { fail if params.qty > params.available }
dispatch
end
Instance Versus Class Execution Context
Normally the Operation's steps are declared and run in the context of an instance of the Operation. An instance of the Operation is created, runs and is thrown away.
Sometimes it's useful to run a step (or other macro such as validate
) in the context of the class. This is useful especially for caching values between calls to the Operation. You can do this by defining the steps in the class context, or by providing the option scope: :class
to the step.
Note that the primary use should be in interfacing to outside APIs. Don't hide your application state inside an Operation - Move it to a Store.
class GetRandomGithubUser < Hyperloop::Operation
def self.reload_users
@promise = HTTP.get("https://api.github.com/users?since=#{rand(500)}").then do |response|
@users = response.json.collect do |user|
{ name: user[:login], website: user[:html_url], avatar: user[:avatar_url] }
end
end
end
self.class.step do # as one big step
return @users.delete_at(rand(@users.length)) unless @users.blank?
reload_users unless @promise && @promise.pending?
@promise.then { run }
end
end
# or
class GetRandomGithubUser < Hyperloop::Operation
class << self # as 4 steps - whatever you like
step { succeed! @users.delete_at(rand(@users.length)) unless @users.blank? }
step { succeed! @promise.then { run } if @promise && @promise.pending? }
step { self.class.reload_users }
async { @promise.then { run } }
end
end
An instance of the operation is always created to hold the current parameter values, dispatcher, etc. The first parameter to a class level step
block or method (if it takes parameters) will always be the instance.
class Interesting < Hyperloop::Operation
param :increment
param :multiply
outbound :result
outbound :total
step scope: :class { @total ||= 0 }
step scope: :class { |op| op.params.result = op.params.increment * op.params.multiply }
step scope: :class { |op| op.params.total = (@total += op.params.result) }
dispatch
end
The Boot Operation
Hyperloop includes one predefined Operation, Hyperloop::Application::Boot
, that runs at system initialization. Stores can receive Hyperloop::Application::Boot
to initialize their state. To reset the state of the application you can simply execute Hyperloop::Application::Boot


For this project we had used a lot of different materials. Most of what you see on the robot is extra things that were need to be ordered online via Amazon. The budget that we had was of $100 that Girls Who Code was providing.
This the list of items that Girls Who Code provided:
Two Ardino Boards
Two Circuit Boards
A LOT OF WIRES
Two breadboards
Multiple Sharpies
LOTS OF TAPE
Pieces of cardboard
Wheels
Chop-Sticks
Metal Structure of Robot
This is the list of items that were needed to be bought or borrowed:


2019's Hollywood Movies That Did Exceedingly Well At The Indian Box-office
by Yash TripathiBollywood News
2019 Hollywood movies that were loved by the Indian audience. Here is a list of top Hollywood movies that earned a lot on the Indian box office. Find out.
Written By Yash Tripathi | Mumbai | Updated On: December 09, 2019 17:47 IST
Indian audience has always had a special appreciation for certain types of Hollywood films. They have never failed to shower their love for epic Hollywood dramas that take their hearts. 2019 has been a year of great films, be it Bollywood or foreign cinema. Here is a list of top-grossing Hollywood movies that worked exceptionally well at the box-office.
Avengers: Endgame
Avengers: Endgame is the highest-grossing film in the world, leaving behind Avatar. This movie is also Marvel's biggest hit to date. The superhero action film grossed over ₹373.22 Cr on the Indian box office.
The Lion King
The popular kiddie film earned ₹158.71 Cr at the Indian box office. The movie was dubbed in Hindi by King Khan and his son Aryan Khan for the animated characters of Mufasa and Simba respectively. The movie is a recreated version of Disney's original 1994 animated movie of the same name.
Also Read | Here are some stunning and gorgeous Hollywood-inspired Christmas outfits!
Spiderman: Far from home
Sony and Marvel's classic superhero, Spiderman, impressed the audience with a distinctive storyline and eye-pleasing VFX. The movie is compared with the VFX of Doctor Strange. This superhero drama starring Tom Holland and Zendaya grossed around 86.11 Cr on the Indian box office.
Also Read | Hollywood classics that never get old no matter how many times one watches them
Captain Marvel
Marvel's first women based movie starring Brie Larson impressed the audience with its space adventure and unique storyline. The superhero movie earned around ₹84.36 Cr at the Indian box office. This is Marvel's yet another successful venture for the year besides Avengers: End Game
Fast and Furious Presents: Hobbs and Shaw
Fast and Furious became even more interesting with the sequel starring Dwayne Johnson aka The Rock and Jason Statham as Hobbs and Shaw respectively. The movie earned around approximately ₹75 Cr in India and was loved massively by the Indian fans. The action film is the part of the original F&F series.
Also Read | Star Trek's most revered writer and Hollywood trailblazer D.C. Fontana has passed away
Also Read | Kim Kardashian & Kanye West's wardrobe proves they are the most stylish Hollywood couple
Get the latest entertainment news from India & around the world. Now follow your favourite television celebs and telly updates. Republic World is your one-stop destination for trending Bollywood news. Tune in today to stay updated with all the latest news and headlines from the world of entertainment.


Opiates had been a problem in my life for over a year, and I had used and abused them for many more years before. My poison of choice was oxycontin (heroin was too unreliable and fentanyl, my favorite, was never around).  I always broke promises to myself about my use.
Then, back in December after getting over a three week withdrawal from heavy oxycodone (100mg to get me high) and methadone (50mg to keep me nice and level), I discovered Kratom. I learned that it was no ordinary legal high, and this stuff was actually like an opiate. I start taking it 2-3 times a day and my tolerance skyrockets; at first I only required 3 grams of leaf, now I was using up to 10 grams here in March. Kratom was being used on top of occasional oxycodone, which my tolerance was quite high for, so there is without question cross-tolerance between Kratom and opioids.
I started having side effects from my use, like depression. I figured it was time to quit, for real, and I was really scared. Withdrawal has given me days of hell on earth, pure torture of the mind and soul. A week earlier I had stopped my use for almost two days, in a failed attempt to quit. The withdrawal set in in about 20 hours and was absolutely hell, so I eagerly ate more Kratom.
So, I go through the horrible process again, my final time, like I always said.  Pure anxiety hits me after a day, along with stomach problems, twitching, and horrible insomnia. On the second night, I decide to inject some pure ketamine I had. It was powdered, and I don’t like snorting the stuff, so I decided to do my favorite old IM injection. I have a lot of experience with ketamine. I’ve always shot for the out of body experiences, as I didn’t much like its effects at the “club drug” level. So, I weigh out 110mg of K, put in about 1.3mL of saline into the spoon, heat, dissolve, run through cotton filter and inject into my leg.
My expectations were to leave this reality, perhaps to find some peace and wonder. I remember pondering the idea of trying to reprogram my brain on K to avoid withdrawal a few days earlier, but this wasn’t my goal, as I truly didn’t believe that to be possible. I had used ketamine IM injections during withdrawal before, only to find a very temporary, partial relief. My mood was dull but sort of hopeful. I had just got done watching “What the bleep do we know?” which seemed to expand my mind a little. I find that what I do or watch in the hours before doing a large K dose greatly effects the visions.
12:15am- I inject the solution. I keep a journal open on the computer to write about my experience.
12:20am- I feel “fuzzy”, “staticy”, and a little floaty. I also still feel withdrawal but I feel my conscious perception slowly shifting away. I put on Pink Floyd- Animals (my favorite K-hole CD) and lay back.
I remember a minute later the bed starts swaying up and down, back and forth, as if I was on a raft floating in a mildly rough ocean.  Random concepts, mostly about my life are floating through my head. My perception of my consciousness is extremely altered but very “real” feeling. I think in an almost emotionless way, but I remember being amused and amazed by the new realities I was experiencing. What I see I cannot describe, as I don’t remember most of the trip, but they weren’t very solid or bright visual forms, they were fuzzy and faint mostly.
Then comes the true magic. I appear surrounded by a gray mass, which is my brain I somehow know. Blue electricity flows through it. I see part of it suffering, and I know its all my fault. But I don’t feel guilty… I know this can be solved. The skeptical part of my brain was gone, and I knew I could change my brain, I just needed to tell it what to do. And I did. I don’t know exactly what I “told” my brain to do, as I wasn’t using words, but I communicated with it with complete 100% confidence, and I believe this was the key.
I woke up at 6am. I couldn’t immediately remember what had happened in the K-hole the night before; it took a few minutes. My computer was still on and the last thing I wrote was before going down the K-hole. I did immediately notice something was wrong, but so right… I wasn’t experiencing any withdrawal. I then remembered parts of the K-hole, like what I did to my brain.
After accepting I just communicated successfully to my brain causing it to physically change to adapt back to normal, tears rolled down my face. It was a miracle. I almost expected to go back into withdrawal the next day, but I didn’t.
Here I am on day 8 clean, and I feel normal. Ketamine saved me great suffering. But then I start to wonder, how much was this miracle the drug? I don’t really know. But I know it helped me get to the place I needed to be. A place to open a communication within my brain, with no skepticism or doubt.
I still get tears in my eyes when I think about what happened, and what this really means is possible. I would have read something like this last week and not completely believed it. I would think “logically” like “the ketamine must have binded partly to the mu-opiate receptors or maybe they are highly exaggerating the story.”
I would not want to risk saying that ketamine is a cure for opiate-dependency. It takes something within the self for such great change. But believe me, it is possible.
Experience Reports are the writings and opinions of the individual authors who submit them.
Some of the activities described are dangerous and/or illegal and none are recommended by Erowid.


| Modifier and Type | Class and Description |
|---|---|
class |
ConfigurationSettingsBase
Represents the base class for configuration settings.
|
| Modifier and Type | Class and Description |
|---|---|
(package private) class |
OutlookAccount
Represents an Outlook configuration settings account.
|
(package private) class |
OutlookProtocol
Represents a supported Outlook protocol in an Outlook configurations settings
account.
|
(package private) class |
OutlookUser
Represents the user Outlook configuration settings apply to.
|
| Modifier and Type | Class and Description |
|---|---|
class |
AutodiscoverError
Defines the AutodiscoverError class.
|
| Modifier and Type | Class and Description |
|---|---|
(package private) class |
CreateItemResponseBase
Represents the base response class for item creation operations.
|
class |
CreateResponseObjectResponse
Represents response to generic Create request.
|
class |
SyncResponse<TServiceObject extends ServiceObject,TChange extends Change>
Represents the base response class for synchronuization operations.
|
| Modifier and Type | Class and Description |
|---|---|
class |
MeetingMessage
Represents a meeting-related message.
|
| Modifier and Type | Class and Description |
|---|---|
class |
CalendarResponseMessage<TMessage extends EmailMessage>
Represents the base class for accept, tentatively accept and decline response
messages.
|
class |
CalendarResponseMessageBase<TMessage extends EmailMessage>
Represents the base class for all calendar-related response messages.
|
class |
ResponseObject<TMessage extends EmailMessage>
The Class ResponseObject.
|
| Modifier and Type | Class and Description |
|---|---|
class |
ServiceObjectSchema
Represents the base class for all item and folder schema.
|
| Modifier and Type | Class and Description |
|---|---|
class |
SubscriptionBase
Represents the base class for event subscriptions.
|
| Modifier and Type | Class and Description |
|---|---|
class |
AttachmentCollection
Represents an item's attachment collection.
|
class |
AttendeeCollection
Represents a collection of attendees.
|
class |
ComplexProperty
Represents a property that can be sent to or retrieved from EWS.
|
class |
ComplexPropertyCollection<TComplexProperty extends ComplexProperty>
Represents a collection of property that can be sent to and retrieved from
EWS.
|
class |
DeletedOccurrenceInfoCollection
Represents a collection of deleted occurrence objects.
|
class |
DictionaryEntryProperty<TKey>
Represents an entry of a DictionaryProperty object.
|
class |
DictionaryProperty<TKey,TEntry extends DictionaryEntryProperty<TKey>>
Represents a generic dictionary that can be sent to or retrieved from EWS.
|
class |
EmailAddressDictionary
Represents a dictionary of e-mail addresses.
|
class |
EmailAddressEntry
Represents an entry of an EmailAddressDictionary.
|
class |
ExtendedPropertyCollection
Represents a collection of extended property.
|
class |
FolderIdCollection
Represents a collection of folder Ids.
|
class |
ImAddressDictionary
Represents a dictionary of Instant Messaging addresses.
|
class |
ImAddressEntry
Represents an entry of an ImAddressDictionary.
|
class |
InternetMessageHeaderCollection
Represents a collection of Internet message headers.
|
class |
ItemCollection<TItem extends Item>
Represents a collection of item.
|
class |
OccurrenceInfoCollection
Represents a collection of OccurrenceInfo objects.
|
class |
PhoneNumberDictionary
Represents a dictionary of phone numbers.
|
class |
PhoneNumberEntry
Represents an entry of a PhoneNumberDictionary.
|
class |
PhysicalAddressDictionary
Represents a dictionary of physical addresses.
|
class |
UserConfigurationDictionary
Represents a user configuration's Dictionary property.
|
| Modifier and Type | Class and Description |
|---|---|
static class |
Recurrence.IntervalPattern
Represents a recurrence pattern where each occurrence happens at a
specific interval after the previous one.
|
| Modifier and Type | Class and Description |
|---|---|
class |
PagedView
Represents a view settings that support paging in a search operation.
|
class |
ViewBase
Represents the base view class for search operations.
|
| Modifier and Type | Class and Description |
|---|---|
static class |
SearchFilter.PropertyBasedFilter
Represents a search filter where an item or folder property is involved.
|
static class |
SearchFilter.RelationalFilter
Represents the base class for relational filter (for example, IsEqualTo,
IsGreaterThan or IsLessThanOrEqualTo).
|
| Modifier and Type | Class and Description |
|---|---|
class |
Change
Represents a change as returned by a synchronization operation.
|


Contact
Please direct all enquiries to
<EMAIL_ADDRESS>.
Home
Background
Programme
Registration
Location
Contact
Top


Panorama Stitching
Table of Contents:
- Deadline
- Introduction
- System Overview
- Problem Statement
- Submission Guidelines
- Collaboration Policy
## Deadline
10:59AM, Tuesday, October 09, 2018
The aim of this project is to implement an end-to-end pipeline for panorama stitching. We all use the panorama mode on our smart-phones– you’ll implement a pipeline which does the same basic thing!
This document just provides an overview of what you need to do. For a full breakdown of how each step in the pipeline works, see the course notes for this project.
Here’s a system diagram, showing each step in your panorama-stitching pipeline:
A brief description of each step (you’ll implement the steps in bold):
- Cylinder Projection: Project images onto a cylinder, to reduce distortion at the panorama’s edges. For this project, it’s optional.
- Detect Corners: identify corner points in your images. (You can just use Matlab’s
cornermetric
.) - ANMS: pick out the stronger corner points.
- Feature Descriptors: create descriptors for the corner points, so they can be matched between images (in the next step).
- Feature Matching: Match feature descriptors from different images, to find possible point correspondences.
- RANSAC and Homography Estimation: refine the feature point matches, and use the correspondences to estimate homographies between images.
- Image Warping (and Blending): Use the estimated homographies to warp the images onto one another, and apply blending to reduce the appearance of seams where they fit together.
- For blending in this project, you can simply average the pixel values of overlapping images.
Point Distribution:
- ANMS: 25 pts
- Feature Descriptors: 15pts
- Feature Matching: 15pts
- RANSAC and Homography Estimation: 20pts
- Image Warping (and Blending): 25pts
Project Files and Starter Code
Please find the starter code at this link.
This also includes three sets of “training
images”. Twenty-four hours before the due date, we’ll distribute a “test set” of two more sets of images (look out for an announcement on Piazza).
When writing your program, you can assume that input images will always follow the filename convention “1.jpg”, “2.jpg”, etc.
Functions Allowed
For this project, imfilter, conv2, imrotate, im2double, rgb2gray, fspecial, imtransform, imwarp (and imref2d), meshgrid, sub2ind, ind2sub and all other plotting and matrix operation/manipulation functions are allowed.
We will deduct points if your submission does not comply with the following guidelines.
File tree and naming
Your submission on Canvas must be a zip file, following the naming convention YourDirectoryID_proj2.zip. For example, xyz123_proj2.zip. The file must have the following directory structure:
- YourDirectoryID_proj2.zip/
- Code/
- MyPanorama.m
- *(any dependencies of MyPanorama.m)
- train_images/
- test_images/
- input/
- report.pdf
- Code/
When run, MyPanorama.m must load a set of images from Images/input/, and return
the resulting panorama.
Report
You will be graded primarily based on your report. We want
you to demonstrate an understanding of the concepts involved in the project, and to show the output
produced by your code.
Include visualizations of the output of each stage in your pipeline (as shown in the system diagram
on page 2), and a description of what you did for each step. Assume that we’re familiar with the
project, so you don’t need to spend time repeating what’s already in the course notes. Instead, focus on any interesting problems you encountered and/or solutions you implemented.
Be sure to include the output panoramas for all five image sets (from the training and test sets). Because you have limited time in which to access the “test set” images, we won’t expect in-depth analysis of your results for them.
As usual, your report must be full English sentences, not commented code. There is a word limit of 1500 words and no minimum length requirement.
## Collaboration Policy
We encourage you to work closely with your groupmates, including collaborating on writing code. With students outside your group, you may discuss methods and ideas but may not share code.
For the full collaboration policy, including guidelines on citations and limitations on using online resources, see the course website.
Acknowledgements
This fun project was inspired by a similar project in UPenn’s CIS581 (Computer Vision & Computational Photography).


lclpy.evaluation package¶
Subpackages¶
Submodules¶
lclpy.evaluation.abstract_evaluation_function module¶
-
class
lclpy.evaluation.abstract_evaluation_function.
AbstractEvaluationFunction
¶ Bases:
abc.ABC
A template to create evaluation functions.
Evaluationfunctions are used to determine the quality of a problem.
-
delta_evaluate
(current_data, move)¶ Evaluates the difference in quality between two solutions.
The two compared solutions are the current problem and the problem if the move was performed. The move is not actually performed.
For this function to work, get_problem_type needs to be implemented, the move-object(s) need to have get_move_type implemented and the delta evaluate methods need to be properly implemented in the deltaeval package.
- Parameters
current_data – A datastructure that contains information about the current state of an AbstractLocalSearchSolution.
move – Represents a move. The potential result of this move is evaluated against the current state (current_data contains information about the current state.).
- Returns
the difference in quality between the current state and the potential next state.
- Return type
int or float
-
abstract
evaluate
(current_data)¶ Evaluates current_solution
- Parameters
current_data – A datastructure that contains information about the current state of an AbstractLocalSearchSolution.
- Returns
an indication of the quality of current_data
- Return type
int or float
-
get_problem_type
()¶ Returns the problem type.
- Returns
The problem type.
- Return type
str
-
lclpy.evaluation.quadratic_assignment_evaluation_function module¶
-
class
lclpy.evaluation.quadratic_assignment_evaluation_function.
QuadraticAssignmentEvaluationFunction
(distance_matrix, flow_matrix, move_function=None)¶ Bases:
lclpy.evaluation.abstract_evaluation_function.AbstractEvaluationFunction
A class to evaluate QAP problems.
This class contains the methods to evaluate the quality of a solution for a quadratic assignment problem (QAP). In the implementation, it was assumed that both the distance and the flow matrix are symmetric.
- Parameters
distance_matrix (numpy.ndarray) – The distance matrix of the problem. Should be symmetric.
flow_matrix (numpy.ndarray) – The flow matrix for the problem. Should be symmetric.
move_function (AbstractMove, optional) – Only needs to be passed if one wishes to use delta evaluation.
-
_distance_matrix
¶ The distance matrix of the problem.
- Type
numpy.ndarray
-
_flow_matrix
¶ The flow matrix of the problem.
- Type
numpy.ndarray
-
_size
¶ The amount of locations, derived from the distance matrix.
- Type
int
Examples
A simple example:
-
delta_evaluate
(current_order, move)¶ Evaluates the difference in quality between two solutions.
The two compared solutions are the current solution and the solution if the move was performed. The move is not actually performed.
This function does not need to be implemented. One should only consider to implement and use it if a delta evaluation is faster than the regular evaluate function or if it needs to be implemented to work with existing code.
- Parameters
current_order (numpy.ndarray) – A 1 dimensional array that maps facilities on locations. The index respresents a location, the corresponding value represents a facility.
move (tuple of int) – Contains the move one wishes to know the effects on the quality of.
- Returns
The difference in quality if the move would be performed.
- Return type
int or float
- Raises
NotImplementedError – If no move_function was given in the constructor.
Examples
A simple example to demonstrate the working of delta_evaluate. Note that other move types than array_swap can be used:
-
evaluate
(order)¶ Calculates an evaluation value for the function.
- Parameters
order (numpy.ndarray) – A 1 dimensional array that maps facilities on locations. The index respresents a location, the corresponding value represents a facility.
- Returns
an indication of the quality of current_data
- Return type
int or float
-
get_problem_type
()¶ Returns the problem type.
- Returns
The problem type.
- Return type
str
lclpy.evaluation.tsp_evaluation_function module¶
-
class
lclpy.evaluation.tsp_evaluation_function.
TspEvaluationFunction
(distance_matrix, move_function=None)¶ Bases:
lclpy.evaluation.abstract_evaluation_function.AbstractEvaluationFunction
A class to evaluate TSP problems.
This class contains the methods to evaluate the quality of a solution for a travelling salesman problem (TSP). The distance matrix is allowed to be asymmetric.
- Parameters
distance_matrix (numpy.ndarray) – The distance matrix of the tsp-problem. The weight from A to B does not need to be equal to the weight from B to A.
move_function (AbstractMove, optional) – Only needs to be passed if one wishes to use delta evaluation.
-
_distance_matrix
¶ The distance matrix of the tsp-problem.
- Type
numpy.ndarray
-
_size
¶ the amount of points to visit, is derived from the distance matrix.
- Type
int
Examples
A simple example:
-
delta_evaluate
(current_order, move)¶ Calculates the difference in quality if the move would be performed.
Note that a move function needs to be passed to the constructor of evaluation function for the delta_evaluate to work. The move function also needs to have changed_distances and transform_next_index_to_current_index properly implemented:
- Parameters
current_order (numpy.ndarray) – A 1 dimensional array that contains the order of the points to visit. All values are unique and are within the interval [0,size[. This is the current order.
move (tuple of int) – Contains the move one wishes to know the effects on the quality of.
- Returns
The difference in quality if the move would be performed.
- Return type
int or float
- Raises
NotImplementedError – If no move_function was given in the constructor.
Examples
A simple example to demonstrate the working of delta_evaluate. Note that other move types than array_swap can be used:
A more elaborate example:
-
evaluate
(order)¶ Calculates an evaluation value for the function.
- Parameters
order (numpy.ndarray) – A 1 dimensional array that contains the order of the points to visit. All values are unique and are within the interval [0,size[.
- Returns
An indication of the quality of the solution, the lower this value, the better the quality.
- Return type
int, float
-
get_problem_type
()¶ Returns the problem type.
- Returns
The problem type.
- Return type
str
Module contents¶
This package contains the classes and functions used to evaluate the state of a solution.
Note that the classes and functions to make delta-evaluation possible are in submodule deltaeval.


Freelance writer striving for personal development in a professional context. High academic qualifications. Volunteer for non-profits; led student publishing society.
Controlled use of language and academic rigour in analysis, research gained from a first-class honours degree in English. Trained in core TEFL skills. Familiar with integrating SEO and keyword planning techniques in written content, especially for social media.
Qualification in digital marketing skills. Conversational in written and spoken French; translated novels at university. Multiple years experience in reading, writing Japanese, approx. N3 grade. Currently learning German. Rudimentary Polish experience.
Cafe Indie (Copywriter)
Mar. 2019 - Jan. 2020
Wrote newsletters, advertisements, and blogposts for a local independentcafe. Content produced to a regular biweekly schedule, distributed in print andon web (newsletters, Facebook groups, local community hubs). Organised email campaigns that utilised A/B testing and conversion tracking.
University of York Publishing Society (Co-Head)
Sep. 2015 - 2018
Oversaw submissions, editing, proofreading, typesetting, design for a 2018 for-profit anthology of student fiction. Organised live readings and meetings with local publishers that opened career paths for society members.
Aug. 2020 - Present
Strategic Allies (Freelance Copywriter)
Copywriter and proofreader for an innovation scouting firm in the food & beverage sector. Wrote, edited technical press releases for FTFE 100 innovation directors. Performed independent research on scientific, technical topics for accuracy. Ongoing freelance relationship. Avg. turnaround of ~1k words per hour.
Sep. 2020 - Present
Bytez (Freelance Copywriter)
Content creation for Canadian digital media start-up. Wrote lightweight SEO-focused articles that condensed long conversations into focused, punchy prose. Communicated with podcasts on marketing opportunities, licensing. Ongoing freelance relationship. Avg. turnaround of over 1k words per hour.
Apr. 2016 - Sep. 2016
Lindsey Lodge Hospice (Social Media Intern)
Managed social media and wrote for the in-house newsletter, including a brochure for Hospice donors. Conducted telephone and in-person interviews with general public. Extensive use of Microsoft Excel and Publisher, plus HTML and CSS.
July 2020
Digital Marketing (Google Digital Garage)
40-hour course in digital marketing accredited by Google, the Open University and the Interactive Advertising Bureau of Europe. Topics included SEO, SEM, pay-per-click, display advertising, campaign management, mobile design, A/B testing, unique characteristics of social media platforms. Verification on request.
Sep. 2015 - 2018
The University of York
1st-class honours degree in English (Q300). Assessed via essays, exams, group projects. Trained in MLA, Chicago style. Noted for original research and clarity of language. Full course on reading, analysing, translating French novels.


Money Play. How should Red play (a) 31; (b) 42; (c) 53 and (d) 64?
pips Red=160 White=160
(CorrectAnswer= 0/0, ErrorScore= 0)
31 and 42 are easy, making the 5-pt and 4-pt respectively. Those points are too good to pass up.
With 53 it is a different matter. The 3-pt is too deep too early to be worth giving up the 8-pt and 24/21, 13/8 is correct. Anything else is at least an error.
With 64 making the 2-pt is a double blunder and 13/9, 13/7 is a single (and big blunder), stripping the mid-point and not activating the back checkers when your opponent has started building a prime.
There is no equity difference between 24/14 and 24/20, 13/7 – take your pick.
With 53 it is a different matter. The 3-pt is too deep too early to be worth giving up the 8-pt and 24/21, 13/8 is correct. Anything else is at least an error.
With 64 making the 2-pt is a double blunder and 13/9, 13/7 is a single (and big blunder), stripping the mid-point and not activating the back checkers when your opponent has started building a prime.
There is no equity difference between 24/14 and 24/20, 13/7 – take your pick.
1. Cubeful 2-ply 24/15 Eq.: +0.038 0.516 0.071 0.001 - 0.484 0.070 0.001 2. Cubeful 2-ply 24/21 13/7 Eq.: +0.006 (-0.032) 0.507 0.090 0.002 - 0.493 0.096 0.003 3. Cubeful 2-ply 13/7 6/3 Eq.: -0.040 (-0.078) 0.485 0.112 0.003 - 0.515 0.101 0.003 4. Cubeful 2-ply 13/4* Eq.: -0.051 (-0.089) 0.485 0.123 0.003 - 0.515 0.121 0.005 5. Cubeful 0-ply 14/11 14/8 Eq.: -0.132 (-0.170) 0.456 0.094 0.001 - 0.544 0.098 0.003


--- layout: default title: About me container_class: mw-md ---
My name is Mathieu GUÉRIN. I'm {{ site.data.about.age }}-years-old and currently in my final year as an IT engineer student. I'm studying Data Science and Artificial Intelligence in a Master's degree at EPITA. I'm also skilled as a back-end developer, leaning full-stack in web development.
I first got into IT technologies in 2010, approximately, by learning programming with the C language. I wrote some basic console programs and tried to fiddle with the SDL library. Later on, I started to learn web development with HTML, CSS, PHP and JavaScript. Since 2012, I created many projects for my own account and a few more for others. I also explored and fiddled a bit with Arduino projects. As years passed, I kept learning about more tech tools and concepts, programming languages and paradigms, and machine learning.
Today, I'm able to work with a variety of technologies and languages. I find myself comfortable working with web apps and much more. I have experience with many back-end languages such as PHP, JavaScript, Python, Java, C#, C++. I'm also familiar with some front-end languages and frameworks for the web. Of course, I know how to work with databases and ORMs.
I'm an open-source enthusiast and some of my projects are available on my Github account. Since 2018 after high school, I focus more on my studies and my work, but I still keep some time for my personal projects.
If you want to know more about me and my projects, please see my detailed Curriculum Vitae, my Work Timeline.
Want to contact me? Here's how:
Personal Email
Professional Email
Telegram
Discord ({{ site.data.about.social.discord.handle }})
LinkedIn


HackYourFuture was founded in
when it was founded
HackYourFuture was founded in 2015 in Amsterdam,
with the aim to enable refugees to build digital skills for a career in web development,
facilitate the integration of newcomers,
and address the shortage of qualified workforce in the IT sector. Since 2015,
HackYourFuture coding schools have also opened in Copenhagen and Malmö.
HackYourFuture was founded in
Refugees often experience challenges in finding a suitable job to apply and further develop their skills. Yet, the number of unfilled vacancies in the IT sector is increasing at a fast pace.
HackYourFuture was founded in 2015 in Amsterdam, with the aim to enable refugees to build digital skills for a career in web development, facilitate the integration of newcomers, and address the shortage of qualified workforce in the IT sector. Since 2015, HackYourFuture coding schools have also opened in Copenhagen and Malmö.
On 20 May 2018, HackYourFuture Belgium launched its first class in Belgium with 13 highly motivated students at BeCentral, the digital campus in Brussels. Next class start on 10 May 2020 (postponed due to Covid19-virus measures) and applications are now closed.
HackYourFuture was founded in
Often experience challenges in finding a suitable job to apply and further develop their skills. Yet, the number of unfilled vacancies in the IT sector is increasing at a fast pace.
HackYourFuture was founded in 2015 in Amsterdam, with the aim to enable refugees to build digital skills for a career in web development, facilitate the integration of newcomers, and address the shortage of qualified workforce in the IT sector. Since 2015, HackYourFuture coding schools have also opened in Copenhagen and Malmö.
On 20 May 2018, HackYourFuture Belgium launched its first class in Belgium with 13 highly motivated students at BeCentral, the digital campus in Brussels. Next class start on 10 May 2020 (postponed due to Covid19-virus measures) and applications are now closed.


- PacketAccessor - Class in org.cantaloupe.protocol
-
- PacketAccessor() - Constructor for class org.cantaloupe.protocol.PacketAccessor
-
- PacketHandler - Class in org.cantaloupe.network.packet
-
A class used to handle packets.
- PacketService - Class in org.cantaloupe.service.services
-
A service used to manage packets.
- PacketService() - Constructor for class org.cantaloupe.service.services.PacketService
-
- PacketVerifier - Class in org.cantaloupe.protocol
-
- PacketVerifier() - Constructor for class org.cantaloupe.protocol.PacketVerifier
-
- Page - Class in org.cantaloupe.inventory.menu
-
A class used to create a page.
- parse(CommandSource, CommandArgs, CommandContext) - Method in class org.cantaloupe.command.args.CommandElement
-
- ParticleData(Material, byte) - Constructor for class org.cantaloupe.service.services.ParticleService.ParticleData
-
- ParticleService - Class in org.cantaloupe.service.services
-
- ParticleService() - Constructor for class org.cantaloupe.service.services.ParticleService
-
- ParticleService.BlockData - Class in org.cantaloupe.service.services
-
- ParticleService.ItemData - Class in org.cantaloupe.service.services
-
- ParticleService.ParticleData - Class in org.cantaloupe.service.services
-
- ParticleService.ParticleProperty - Enum in org.cantaloupe.service.services
-
- ParticleService.ParticleType - Enum in org.cantaloupe.service.services
-
- pause() - Method in class org.cantaloupe.audio.source.WorldSource
-
Pauses the source.
- pause(Player) - Method in class org.cantaloupe.audio.sources.LocalSource
-
Pauses the source for the player.
- pause() - Method in class org.cantaloupe.audio.sources.SharedLocalSource
-
Pauses the source.
- peek() - Method in class org.cantaloupe.command.args.CommandArgs
-
- permission(String) - Method in class org.cantaloupe.command.CommandSpec.Builder
-
Sets the permission node of the builder.
- PickupListenerNew - Class in org.cantaloupe.wrapper.listeners
-
- PickupListenerNew() - Constructor for class org.cantaloupe.wrapper.listeners.PickupListenerNew
-
- PickupListenerOld - Class in org.cantaloupe.wrapper.listeners
-
- PickupListenerOld() - Constructor for class org.cantaloupe.wrapper.listeners.PickupListenerOld
-
- place() - Method in class org.cantaloupe.hologram.Hologram
-
Places the hologram.
- place() - Method in class org.cantaloupe.statue.ArmorStandStatue
-
- place() - Method in class org.cantaloupe.statue.PlayerStatue
-
- place() - Method in class org.cantaloupe.statue.Statue
-
- place(WorldObject) - Method in class org.cantaloupe.world.World
-
- place(WorldObject, boolean) - Method in class org.cantaloupe.world.World
-
- place() - Method in class org.cantaloupe.world.WorldObject
-
- placeFor(Player) - Method in class org.cantaloupe.hologram.Hologram
-
Places the hologram for a player.
- placeFor(Player) - Method in class org.cantaloupe.statue.ArmorStandStatue
-
- placeFor(Player) - Method in class org.cantaloupe.statue.PlayerStatue
-
- placeFor(Player) - Method in class org.cantaloupe.statue.Statue
-
- play(Player) - Method in class org.cantaloupe.audio.sources.LocalSource
-
Plays the source for the player.
- playBounds(Player, int, int) - Method in class org.cantaloupe.audio.sources.LocalSource
-
Plays the source for the player within bounds.
- player(String) - Static method in class org.cantaloupe.command.args.GeneralArguments
-
Creates and returns a "player" command element.
- Player - Class in org.cantaloupe.player
-
A class containing the methods for a player.
- PlayerAttackFakeEntityEvent - Class in org.cantaloupe.events
-
- PlayerAttackFakeEntityEvent(Player, FakeEntity) - Constructor for class org.cantaloupe.events.PlayerAttackFakeEntityEvent
-
- PlayerInteractAtFakeEntityEvent - Class in org.cantaloupe.events
-
- PlayerInteractAtFakeEntityEvent(Player, FakeEntity, Vector3d) - Constructor for class org.cantaloupe.events.PlayerInteractAtFakeEntityEvent
-
- PlayerInteractFakeEntityEvent - Class in org.cantaloupe.events
-
- PlayerInteractFakeEntityEvent(Player, FakeEntity) - Constructor for class org.cantaloupe.events.PlayerInteractFakeEntityEvent
-
- PlayerListener - Class in org.cantaloupe.wrapper.listeners
-
- PlayerListener() - Constructor for class org.cantaloupe.wrapper.listeners.PlayerListener
-
- PlayerManager - Class in org.cantaloupe.player
-
A class used to manage players.
- PlayerManager.Scopes - Class in org.cantaloupe.player
-
A class containing the possible player-related scopes.
- playerOrSource(String) - Static method in class org.cantaloupe.command.args.GeneralArguments
-
Creates and returns a "player" or "source" command element depending on
the source type.
- PlayerStatue - Class in org.cantaloupe.statue
-
- PlayerStatue.Builder - Class in org.cantaloupe.statue
-
- PlayerWrapper - Class in org.cantaloupe.player
-
An abstract class containing methods for player wrappers.
- playSound(Location, Sound, float, float) - Method in class org.cantaloupe.player.Player
-
Plays a sound for the player.
- playSound(Location, Sound, float) - Method in class org.cantaloupe.player.Player
-
Plays a sound for the player.
- playSound(Location, Sound) - Method in class org.cantaloupe.player.Player
-
Plays a sound for the player.
- playSound(Sound, float, float) - Method in class org.cantaloupe.player.Player
-
Plays a sound for the player.
- playSound(Sound, float) - Method in class org.cantaloupe.player.Player
-
Plays a sound for the player.
- playSound(Sound) - Method in class org.cantaloupe.player.Player
-
Plays a sound for the player.
- position(Vector3d) - Method in class org.cantaloupe.entity.FakeArmorStand.Builder
-
Sets the position of the builder.
- position(Vector3d) - Method in class org.cantaloupe.entity.FakeEntity.Builder
-
Sets the position of the builder.
- position(Vector3d) - Method in class org.cantaloupe.entity.FakePlayer.Builder
-
Sets the position of the builder.
- position(Vector3d) - Method in class org.cantaloupe.hologram.Hologram.Builder
-
Sets the position of the builder.
- position(Vector3d) - Method in class org.cantaloupe.statue.ArmorStandStatue.Builder
-
- position(Vector3d) - Method in class org.cantaloupe.statue.PlayerStatue.Builder
-
- position(Vector3d) - Method in class org.cantaloupe.statue.Statue.Builder
-
- PositionedSource - Class in org.cantaloupe.audio.sources
-
A physical source placed in a world.
- provide(CantaloupePlugin, String) - Method in class org.cantaloupe.service.ServiceManager
-
Returns a service from the service manager by provider.
- provide(CantaloupePlugin, Class<T>) - Method in class org.cantaloupe.service.ServiceManager
-
Returns a service from the service manager by provider.
- provide(String, String) - Method in class org.cantaloupe.service.ServiceManager
-
Returns a service from the service manager by plugin.
- provide(String, Class<T>) - Method in class org.cantaloupe.service.ServiceManager
-
Returns a service from the service manager by plugin.
- provide(String) - Method in class org.cantaloupe.service.ServiceManager
-
Returns a service from the service manager.
- provide(Class<T>) - Method in class org.cantaloupe.service.ServiceManager
-
Returns a service from the service manager.
- put(Object, Object) - Method in class org.cantaloupe.config.JSONConfig
-
Stores a value in the config.
- put(String, Object) - Method in class org.cantaloupe.config.YMLConfig
-
Stores a value in the config
- put(K, V) - Method in class org.cantaloupe.data.DataContainer
-
Stores an entry in the container.
- put(Map<K, V>) - Method in class org.cantaloupe.data.DataContainer
-
Stores the entries of a map in the container.
- put(DataContainer<K, V>) - Method in class org.cantaloupe.data.DataContainer
-
Stores the entries of another container in the container.
- putArg(String, Object) - Method in class org.cantaloupe.command.args.CommandContext
-
- putArray(Object, Object[]) - Method in class org.cantaloupe.config.JSONConfig
-
Stores an array in the config.
- putCollection(Object, Collection<Object>) - Method in class org.cantaloupe.config.JSONConfig
-
Stores a collection in the config.
- putCollection(Object, Collection<Object>, int) - Method in class org.cantaloupe.config.JSONConfig
-
Stores a collection in the config at a specified index.


We're sorry but Komga doesn't work properly without JavaScript enabled. Please enable it to continue.


| Interface | Description |
|---|---|
| CSession.ExecutionHandler |
Exception handler.
|
| Class | Description |
|---|---|
| ACustomYieldPoint |
Abstract aspect for generic yield points.
|
| CConfiguration |
Configuration object defined by annotations.
|
| CCoverageLog |
Coverage log.
|
| CEngine |
Cooperative execution engine.
|
| COperation<T> |
Base class for cooperative operations.
|
| CRuntime |
Cooperari runtime.
|
| CSession |
Test session executor.
|
| CThread |
Cooperative thread.
|
| CThreadMappings | |
| CTrace |
Cooperative execution trace.
|
| CUncaughtExceptionHandler |
Handler for uncaught thread exceptions.
|
| CustomYieldPoint |
Custom yield point definition.
|
| CustomYieldPointOperation |
Method call operation.
|
| CYieldPointImpl |
Yield point implementation.
|
| Enum | Description |
|---|---|
| CBlockingOperationEvent |
An enumeration of common operation outcomes used by several primitives.
|
| CThreadState |
Cooperative thread state.
|
| CTrace.EventType |
Event types.
|
| CWorkspace |
Keeps a record of the Cooperari workspace directory and
global configurations, and provides associated utility methods.
|
| CWorkspace.Option |
Workspace options.
|
Copyright © 2021 Cooperari. All rights reserved.


Use Docassemble to automate documents.
Creating a Docassmeble interview that generates a document can seem daunting at first. This video walks you through the process of creating a template in Microsoft Word, writing questions in Docassemble's playground, and then testing your interview to make sure it works.
The code for this video can be found here


kooo architects adds wooden finish to exposed concrete interiors in chinese guesthouse
by www.ko-oo.jpafter remodelling their first chinese guesthouse, kooo architects designed a second hotel far&near in xinyuqingli st in guangzhou, china. the existing four-story guesthouse became to small to host the increasing number of guests. so the architects kept some aesthetically appealing elements and reconstructed the rest to maximize the use of the space.
kooo architects modified the initial 411 sqm area guest house and created 11 guest rooms, including seven double rooms and four single rooms. aiming to preserve the beauty of the exposed concrete structures, the architects incorporated the existing beams and columns into the new design. the guest rooms are furnished with warm basswood plywood, while the public area use meranti plywood in contrast with the exposed concrete structures.
with this design, kooo architects preserved both nature and the particular industrial aesthetic as well as the original architecture, and at the same time meeting the low budget. in order to resonate with its local environment and its surrounding traditional residences, the architects intentionally kept the historical gray bricks on the existing façade. additionally, they adjusted the windows and doors in increments of several centimeters considering the overall proportion of the building and interior layout, letting more light and views in the revision to metal frames and increased depth of the sill added more spatial immersion.
project info:
project name: hotel far&near xinyuqingli st.
architecture firm: kooo architects
completion year: 2019
gross built area: 411sqm
project location: xinyuqingli #11, guangzhou, china
design team: kojima shinya, kojima ayaka , hongdi lin, han wang
signage design: ayana sano
photo credits: keishin horikoshi /ss
clients: hotel far&near
designboom has received this project from our ‘ DIY submissions ‘ feature, where we welcome our readers to submit their own work for publication. see more project submissions from our readers here.
edited by: cristina gomez| designboom


Access
Java Programming Resources for CSC 120 via this link.
CSC 120 Lab 10
In this lab we will practice using methods of the String class, as well as JLabels, JButtons,
JTextFields and JTextAreas.
- Get the beginning version of the program up and running.
- Create a new Netbeans project called Lab10.
Make sure the Location is in your CSC120\Java folder.
- In your web browser, right click on
MUFrame.java
and choose Save Target As... (or Save Link As...)
and save the files in the src folder of your project.
- Compile and run the program to see how the interface looks. Then
type some text in the
input field and click the button to see the output. Then edit the
value you typed in the input field, and click the button again.
Notice that the output JTextArea displays the results of
our processing, which is only one operation at this time.
- Add more code to the program to produce more kinds of output.
- Click HERE
to see a sample finished version of this lab.
- When a user types something in the input field, then clicks the button,
the program should produce all of the output shown in the example.
- Complete each of the other kinds of output ONE AT A TIME.
Finish getting one working before you start working on the next one.
For each of the other kinds of output shown in the sample output:
- Add a method in the MUFrame class that will display output
in the JTextArea. Use the
capitalizeInputText
method
as a pattern for your new methods.
Try to figure out by yourself which method(s) from the String class
you'll need to use to produce a new String for the desired output.
If you get stuck, ask for help but only after looking at the
String class methods.
Hint: you may find it helpful to focus on these specific methods and operators of the String class
when working on code to generate the sample output produced in this lab assignment:
Operators:
+
Methods:
toUpperCase
toLowerCase
charAt
substring
length
indexOf
- Add a line of code in the
processInputButtonActionPerformed
method of the MUFrame class to call the new method.
- Run your program and fix any problems.
Only add one new kind of output, then
test & fix, then add another, then test & fix, etc.
- Submit your Lab10 project as a .zip file along with a screen capture of the output window to the
D2L dropbox for grading, as usual.
Grading Rubric:
Lab10 Grading Rubric


A unit can be decomposed into its irreducible parts using the decompose method:
>>> from astropy import units as u
>>> u.Ry
Unit("Ry")
>>> u.Ry.decompose()
Unit("2.18e-18 m2 kg / (s2)")
You can limit the selection of units that you want to decompose to using the bases keyword argument:
>>> u.Ry.decompose(bases=[u.m, u.N])
Unit("2.179872e-18 m N")
This is also useful to decompose to a particular system. For example, to decompose the Rydberg unit in terms of CGS units:
>>> u.Ry.decompose(bases=u.cgs.bases)
Unit("2.179872e-11 cm2 g / (s2)")
Conversely, a unit may be recomposed back into more complex units using the compose method. Since there may be multiple equally good results, a list is always returned:
>>> x = u.Ry.decompose()
>>> x.compose()
[Unit("1.000000e+00 Ry"),
Unit("5.210019e-22 kcal"),
Unit("5.210019e-19 cal"),
Unit("2.066120e-21 BTU"),
Unit("1.360569e+01 eV"),
Unit("2.179872e-18 J"),
Unit("2.179872e-11 erg")]
Some other interesting examples:
>>> (u.s ** -1).compose()
[Unit("Hz"),
Unit("1 / (s)"),
Unit("3.155693e+07 / (yr)"),
Unit("8.640000e+04 / (d)"),
Unit("6.000000e+01 / (min)"),
Unit("3.600000e+03 / (h)"),
Unit("6.048000e+05 / (wk)"),
Unit("3.155693e+07 / (a)"),
Unit("8.616409e+04 / (sday)"),
Unit("1.209600e+06 / (fortnight)")]
Composition can be combined with Equivalencies:
>>> (u.s ** -1).compose(equivalencies=u.spectral())
[Unit("Hz"),
Unit("J"),
Unit("m"),
Unit("1 / (s)"),
Unit("2.390057e-01 cal"),
Unit("1.057001e-16 lyr"),
Unit("1.093613e+00 yd"),
Unit("3.240779e-17 pc"),
Unit("4.587425e+17 Ry"),
Unit("1.000000e+06 micron"),
Unit("3.937008e+01 inch"),
Unit("6.684587e-12 AU"),
Unit("1.000000e+02 cm"),
Unit("1.437798e-09 solRad"),
Unit("6.241509e+18 eV"),
Unit("3.280840e+00 ft"),
Unit("2.390057e-04 kcal"),
Unit("1.000000e+10 Angstrom"),
Unit("1.000000e+07 erg"),
Unit("9.478171e-04 BTU"),
Unit("6.213712e-04 mi"),
Unit("6.000000e+01 / (min)"),
Unit("3.600000e+03 / (h)"),
Unit("6.048000e+05 / (wk)"),
Unit("8.616409e+04 / (sday)"),
Unit("1.209600e+06 / (fortnight)"),
Unit("8.640000e+04 / (d)"),
Unit("3.155693e+07 / (yr)"),
Unit("3.155693e+07 / (a)")]
Obviously a name doesn’t exist for every arbitrary derived unit imaginable. In that case, the system will do its best to reduce the unit to the fewest possible symbols:
>>> (u.cd * u.sr * u.V * u.s).compose()
[Unit("lm Wb")]
Built on top of this functionality is a convenience method to convert between unit systems.
>>> u.Pa.to_system(u.cgs)
[Unit("1.000000e+01 Ba")]
This is equivalent to decomposing into the new system and then composing into the most complex units possible, though to_system adds some extra logic to return the results sorted in the most useful order:
>>> u.Pa.decompose(bases=u.cgs.bases)
Unit("1.000000e+01 g / (cm s2)")
>>> _.compose(units=u.cgs)
[Unit("1.000000e+01 Ba")]


Tom O'Donnell's Site
Home
My GitHub
My Cydia Repo
Tom O'Donnell
About me
Web Design, App Design, iOS Jailbreak Tweaks
Batch/Bash Scripting
Plays with Custom Firmwares/Legacy iOS Devices
iOS 6 FTW


class LQModel(object):
Up to a full quadratic model using the pseudo inverse to compute the model coefficients.
The full model has 1 + 2n + n(n-1)/2 = n(n+3) + 1 parameters. Model building "works" with any number of data.
Model size 1.0 doesn't work well on bbob-f10, 1.1 however works fine.
TODO: change self.types: List[str] to self.type: str with only one entry
>>> import numpy as np >>> import cma >>> import cma.fitness_models as fm >>> # fm.Logger, Logger = fm.LoggerDummy, fm.Logger >>> m = fm.LQModel() >>> for i in range(30): ... x = np.random.randn(3) ... y = cma.ff.elli(x - 1.2) ... _ = m.add_data_row(x, y) >>> assert np.allclose(m.coefficients, [ ... 1.44144144e+06, ... -2.40000000e+00, -2.40000000e+03, -2.40000000e+06, ... 1.00000000e+00, 1.00000000e+03, 1.00000000e+06, ... -4.65661287e-10, -6.98491931e-10, 1.97906047e-09, ... ], atol=1e-5) >>> assert np.allclose(m.xopt, [ 1.2, 1.2, 1.2]) >>> assert np.allclose(m.xopt, [ 1.2, 1.2, 1.2])
Check the same before the full model is build:
>>> m = fm.LQModel() >>> m.settings.min_relative_size = 3 * m.settings.truncation_ratio >>> for i in range(30): ... x = np.random.randn(4) ... y = cma.ff.elli(x - 1.2) ... _ = m.add_data_row(x, y) >>> print(m.types) ['quadratic'] >>> assert np.allclose(m.coefficients, [ ... 1.45454544e+06, ... -2.40000000e+00, -2.40000000e+02, -2.40000000e+04, -2.40000000e+06, ... 1.00000000e+00, 1.00000000e+02, 1.00000000e+04, 1.00000000e+06, ... ]) >>> assert np.allclose(m.xopt, [ 1.2, 1.2, 1.2, 1.2]) >>> assert np.allclose(m.xopt, [ 1.2, 1.2, 1.2, 1.2])
Check the Hessian in the rotated case:
>>> fitness = cma.fitness_transformations.Rotated(cma.ff.elli) >>> m = fm.LQModel(2, 2) >>> for i in range(30): ... x = np.random.randn(4) - 5 ... y = fitness(x - 2.2) ... _ = m.add_data_row(x, y) >>> R = fitness[1].dicMatrices[4] >>> H = np.dot(np.dot(R.T, np.diag([1, 1e2, 1e4, 1e6])), R) >>> assert np.all(np.isclose(H, m.hessian)) >>> assert np.allclose(m.xopt, 4 * [2.2]) >>> m.set_xoffset([2.335, 1.2, 2, 4]) >>> assert np.all(np.isclose(H, m.hessian)) >>> assert np.allclose(m.xopt, 4 * [2.2])
Check a simple linear case, the optimum is not necessarily at the expected position (the Hessian matrix is chosen somewhat arbitrarily)
>>> m = fm.LQModel() >>> m.settings.min_relative_size = 4 >>> _ = m.add_data_row([1, 1, 1], 220 + 10) >>> _ = m.add_data_row([2, 1, 1], 220) >>> print(m.types) [] >>> assert np.allclose(m.coefficients, [80, -10, 80, 80]) >>> assert np.allclose(m.xopt, [22, -159, -159]) # [ 50, -400, -400]) # depends on Hessian >>> # fm.Logger = Logger
For results see:
Hansen (2019). A Global Surrogate Model for CMA-ES. In Genetic and Evolutionary Computation Conference (GECCO 2019), Proceedings, ACM.
lq-CMA-ES at http://lq-cma.gforge.inria.fr/ppdata-archives/pap-gecco2019/figure5/
| Method | __init__ |
Increase model complexity if the number of data exceeds max(min_relative_size * df_biggest_model_type, self.min_absolute_size). |
| Method | adapt |
Undocumented |
| Method | add |
add a sequence of x- and y-data, sorted by y-data (best last) |
| Method | add |
add x to self if `force` or x not in self |
| Method | eval |
return Model value of x |
| Method | evalpop |
never used, return Model values of x for x in X |
| Method | expand |
Undocumented |
| Method | index |
Undocumented |
| Method | isin |
return False if x is not (anymore) in the model archive |
| Method | kendall |
return Kendall tau between true F-values (Y) and model values. |
| Method | mahalanobis |
caveat: this can be negative because hessian is not guarantied to be pos def. |
| Method | old |
return weighted Z, worst entries are clipped if possible. |
| Method | optimize |
this works very poorly e.g. on Rosenbrock |
| Method | prune |
prune data depending on size parameters |
| Method | reset |
Undocumented |
| Method | reset_ |
set x-values Z attribute |
| Method | set |
Undocumented |
| Method | sort |
sort last number entries |
| Method | sorted |
regression weights in decreasing order |
| Method | type |
one of the model known_types , depending on self.size. |
| Method | update |
model type/size depends on the number of observed data |
| Method | weighted |
return weighted Z, worst entries are clipped if possible. |
| Method | xmean |
Undocumented |
| Class Variable | complexity |
Undocumented |
| Class Variable | known |
Undocumented |
| Instance Variable | count |
Undocumented |
| Instance Variable | counts |
Undocumented |
| Instance Variable | F |
Undocumented |
| Instance Variable | hashes |
Undocumented |
| Instance Variable | log |
Undocumented |
| Instance Variable | logger |
Undocumented |
| Instance Variable | max |
Undocumented |
| Instance Variable | number |
Undocumented |
| Instance Variable | settings |
Undocumented |
| Instance Variable | tau |
Undocumented |
| Instance Variable | type |
Undocumented |
| Instance Variable | types |
Undocumented |
| Instance Variable | X |
Undocumented |
| Instance Variable | Y |
Undocumented |
| Instance Variable | Z |
Undocumented |
| Property | b |
Undocumented |
| Property | coefficients |
model coefficients that are linear in self.expand(.) |
| Property | current |
degrees of freedom (nb of parameters) of the current model |
| Property | dim |
Undocumented |
| Property | eigenvalues |
eigenvalues of the Hessian of the model |
| Property | hessian |
Undocumented |
| Property | logging |
some data of the current state which may be interesting to display |
| Property | max |
Undocumented |
| Property | max |
Undocumented |
| Property | min |
smallest f-values in data queue |
| Property | pinv |
return Pseudoinverse, computed unconditionally (not lazy). |
| Property | size |
number of data available to build the model |
| Property | xopt |
Undocumented |
| Method | _hash |
Undocumented |
| Method | _prune |
deprecated |
| Method | _sort |
old? sort last number entries TODO: for some reason this seems not to pass the doctest |
| Class Variable | _complexities |
Undocumented |
| Instance Variable | _coefficients |
Undocumented |
| Instance Variable | _current |
Undocumented |
| Instance Variable | _fieldnames |
Undocumented |
| Instance Variable | _type |
the model can have several types, for the time being |
| Instance Variable | _xoffset |
Undocumented |
| Instance Variable | _xopt |
Undocumented |
Increase model complexity if the number of data exceeds max(min_relative_size * df_biggest_model_type, self.min_absolute_size).
Limit the number of kept data max(max_absolute_size, max_relative_size * max_df).
this works very poorly e.g. on Rosenbrock
x, m = Model().optimize(cma.ff.rosen, [0.1, -0.1], 13)
TODO (implemented, next: test): account for xopt not changing.
one of the model known_types
, depending on self.size.
This may replace types
, but is not in use yet.
return Pseudoinverse, computed unconditionally (not lazy).
pinv
is usually not used directly but via the coefficients
property.
Should this depend on something and/or become lazy?


{% extends 'your_files/create-table-base.html' %} {% load explorer_tags %} {% block page_title %}Table created - {{ block.super }}{% endblock page_title %} {% block content %}
You can immediately access your data in tools at "{{ schema }}"."{{ table_name }}".
Open in Data Explorer


---
layout: talk_reveal3
title: Evolutionary dynamics of SARS-CoV-2
venue: Pew Annual Meeting
author: Trevor Bedford
widescreen: true
---
Trevor Bedford (@trvrb)
{{ page.title }}
Associate Professor, Fred Hutchinson Cancer Research Center
{{ page.date | date: "%-d %b %Y" }}
{{ page.venue }}
Slides at: bedford.io/talks
Over 800k SARS-CoV-2 genomes shared to GISAID and evolution tracked in real-time at nextstrain.org
SARS-CoV-2 lineages establish globally in February and March
Spike protein is critical for cell invasion by the virus and is the primary target for human immune response
Spike mutations 484K and 501Y appearing repeatedly
Emergence of 501Y.V1 (B.1.1.7) in the UK
Emergence of 501Y.V2 (B.1.351) in the South Africa
Emergence of 501Y.V3 (P.1) in the Brazil
Repeated convergent evolution across sites in spike
Up to December, my expectation was evolution as seen in seasonal coronaviruses with flu B-like rates of evolution
Rapid spike S1 amino acid evolution in SARS-CoV-2
SARS-COV-2 spike S1 evolution similar to evolution of flu H3N2
501Y.V2 shows an ~8-fold drop in neutralization titer, equivalent to ~3 years of H3N2 evolution
Generally, I suspect we're looking at a data-rich version of the influenza strain selection process
SARS-CoV-2 genomic epi: Data producers from all over the world, GISAID and the Nextstrain team
Bedford Lab: Alli Black, John Huddleston, James Hadfield, Katie Kistler, Louise Moncla, Maya Lewinsohn, Thomas Sibley, Jover Lee, Kairsten Fay, Misja Ilcisin, Cassia Wagner, Miguel Paredes, Nicola Müller, Marlin Figgins, Eli Harkins


--- layout: page title: "Bangalore Average Temperature Heatmap" permalink: /maps/bangalore-temperatures/ js: - /assets/js/d3.v3.min.js author_profile: true ---


Guided navigation creates a back/next format with a convention-based next route automatically determined by the router.
Learn more.You can create smart guided navigation using simple conventions, visit-tracking and data-expressions to guide users through workflows or navigation.
By convention, routes are given an order based on how they are declared.
Using just static HTML, this page was able to create a rich navigation system that walks a user through content in a personalized, conversational format.


The Surprise — Apple's 2019 holiday ad will punch you in your feels gut
I'm not a fan of anything that shows kids being given gadgets just to keep them quiet. So, when I first started watching Apple's latest holiday ad, The Surprise, I was genuinely not fond of the direction it was going. But then, something flipped.
Bit by bit, you see the family isn't being dysfunctional. They're literally not functional. Something has happened that has all the adults reeling. At their limits. Unable to cope. Even with each other. And that sucks for the kids.But, as they're being silenced with gadgets, they don't just join in the dysfunction. They push back against it. Using the very gadget they were given.
No spoilers, but the end result is heart-achingly terrific.
Sure, it's an ad. It's scripted. It's not real and should never be taken as such.  And this totally does.
I still really dislike the parent's misuse of technology as wall in the beginning, but I straight-up love the children's use of technology as an instrument of healing at the end.
Would that it can always be so.
Song: "Married Life" by Michael Giacchino
We may earn a commission for purchases using our links. Learn more.


Common combinators for Elixir
| Maintainer Message |Build Status | Doc Coverage | Documentation | Hosted Package |
|--------------|--------------------|---------------|---------------|-----------------|
| ![built with humanity](https://cloud.githubusercontent.com/assets/1052016/11023213/66d837a4-8627-11e5-9e3b-b295fafb1450.png) | [![Circle CI](https://circleci.com/gh/robot-overlord/quark/tree/master.svg?style=svg)](https://circleci.com/gh/robot-overlord/quark/tree/master) | [![Inline docs](http://inch-ci.org/github/robot-overlord/quark.svg?branch=master)](http://inch-ci.org/github/robot-overlord/quark) | [robotoverlord.io/quark](http://www.robotoverlord.io/quark/api-reference.html) | [Hex](https://hex.pm/packages/quark) |
# Table of Contents
- [Quick Start](#quick-start)
- [Summary](#summary)
- [Includes](#includes)
- [Functional Overview](#functional-overview)
- [Curry](#curry)
- [Functions](#functions)
- [Macros](#macros-defcurry-and-defcurryp)
- [Partial](#partial)
- [Macros](##macros-defpartial-and-defpartialp)
- [Compose](#compose)
- [Common Combinators](#common-combinators)
- [Classics](#classics)
- [SKI System](#ski-system)
- [BCKW System](#bckw-system)
- [Fixed Point](#fixed-point)
- [Sequence](#sequence)
# Quick Start
```elixir
def deps do
[{:quark, "~> 1.0"}]
end
```
# Summary
[Elixir](http://elixir-lang.org) is a functional programming language,
but it lacks some of the common built-in constructs that many other functional
languages provide. This is not all-together surprising, as Elixir has a strong
focus on handling the complexities of concurrency and fault-tolerance, rather than
deeper functional composition on functions for reuse.
Includes
- A series of classic combinators (SKI, BCKW, and fixed-points), along with friendlier aliases
- Fully-curried and partially applied functions
- Macros for defining curried and partially applied functions
- Composition helpers
- Composition operator: `<|>`
- A plethora of common functional programming primitives, including:
- `id`
- `flip`
- `const`
- `pred`
- `succ`
- `fix`
- `self_apply`
# Functional Overview
Curry
### Functions
`curry` creates a 0-arity function that curries an existing function. `uncurry` applies arguments to curried functions, or if passed a function creates a function on pairs.
### Macros: `defcurry` and `defcurryp`
Why define the function before currying it? `defcurry` and `defcurryp` return
fully-curried 0-arity functions.
```elixir
defmodule Foo do
use Quark.Curry
defcurry div(a, b), do: a / b
defcurryp minus(a, b), do: a - b
end
# Regular
div(10, 2)
# => 5
# Curried
div.(10).(5)
# => 2
# Partially applied
div_ten = div.(10)
div_ten.(2)
# => 5
```
Partial
:crown: We think that this is really the crowning jewel of [`Quark`](Quark.html).
`defpartial` and `defpartialp` create all arities possible for the defined
function, bare, partially applied, and fully curried.
This does use up all the full arity-space for that function name, however.
### Macros: `defpartial` and `defpartialp`
```elixir
defmodule Foo do
use Quark.Partial
defpartial one(), do: 1
defpartial minus(a, b, c), do: a - b - c
defpartialp plus(a, b, c), do: a + b + c
end
# Normal zero-arity
one
# => 1
# Normal n-arity
minus(4, 2, 1)
# => 1
# Partially-applied first two arguments
minus(100, 5).(10)
# => 85
# Partially-applied first argument
minus(100).(10).(50)
# => 40
# Fully-curried
minus.(10).(2).(1)
# => 7
```
## Compose
Compose functions to do convenient partial applications.
Versions for composing left-to-right and right-to-left are provided, but the
operator `<|>` is done "the math way" (right-to-left).
Versions on lists also available.
## Common Combinators
A number of basic, general functions, including `id`, `flip`, `const`, `pred`, `succ`, `fix`, and `self_apply`.
Classics
### SKI System
The SKI system combinators. `s` and `k` alone can be combined to express any
algorithm, but not usually with much efficiency.
We've aliased the names at the top-level ([`Quark`](Quark.html)), so you can use `const`
rather than having to remember what `k` means.
### BCKW System
The classic `b`, `c`, `k`, and `w` combinators. A similar "full system" as SKI,
but with some some different functionality out of the box.
As usual, we've aliased the names at the top-level ([`Quark`](Quark.html)).
### Fixed Point
Several fixed point combinators, for helping with recursion. Several formulations are provided,
but if in doubt, use `fix`. Fix is going to be kept as an alias to the most efficient
formulation at any given time, and thus reasonably future-proof.
### Sequence
Really here for `pred` and `succ` on integers, by why stop there?
This works with any ordered collection via the [`Quark.Sequence`](Quark.Sequence.html) protocol.