1.
Diagram of GusRecog Gustatory Recognition Mind-Module
Taste Smell Vision Concepts Free Will Motorium
/#######\ /iiiiiii\ /!i!i!i!\ ________ /YYYYYYYYY\
| || ||||||| || ||||||| | | | | / \ | ||||||||| |
| sweet || ||||||| || | ___ | | | | |( Volition )|---*|||||| |
| || | ||||| || / \ | | | | \________/-|-------*|| |
| sour || |f |||| || (image)-|--+ | | | | ||||||||| |
| || | r ||| || \___/ | f|r|h| | | ||S|||E|| |
| || || u || || | o|e|u| | | ||P|||A|| |
| || ||| i | || | o|d|n| | | ||I|||T|| |
| || |||| t|-||---------| d| |g| __V____ | ||T||| || |
| salt || ||||| |||| | | |e| / \ | || |||||| |
| || |||||||||| | | |r| / Emotion \| ||||||||| |
| bitter || |||||||||| | | | | \_________/| ||||||||| |
| || |||||||||| | | | | | ||||||||| |
The GusRecog module for gustatory recognition will integrate a robotic taste system with the thinking structures of the AI Mind.
Most likely the GusRecog module will receive and process data from industrial sensors of taste.
4. Code of GusRecog() needed for
ghost.pl First Working AGI in Perl
sub GusRecog() { # 2016may01: stub for gustatory recognition of taste # http://mind.sourceforge.net/gusrecog.html } # 2016may01: GusRecog() will return to the Sensorium() module.
5.
Variables for GusRecog Module
$bitter -- variable to represent intensity of bitter taste.
$salt -- variable to represent intensity of salty taste.
$sour -- variable to represent intensity of sour taste.
$sweet -- variable to represent intensity of sweet taste.
6. Troubleshooting and Debugging for
AI Mind Maintainers
6.1.a. Symptom: (Something goes wrong.)
6.1.b. Solution: (AI Mind
Maintainer devises solution.)
AI Minds need to be installed in robots with artificial taste sensors.
Roadmap to Artificial Intelligence
http://github.com/kernc/mindforth/blob/master/wiki/GusRecog.wiki
https://en.wikipedia.org/wiki/Category:Sensory_systems
https://en.wikipedia.org/wiki/Category:Gustation
https://en.wikipedia.org/wiki/Category:Gustatory_system
https://en.wikipedia.org/wiki/Taste
Aromyx Corporation – the EssenceChip™
9.
AiTree of Mind-Modules for
Natural Language Understanding


[Backdoorme](
https://github.com/Kkevsterrr/backdoorme
) | After SSH obtained, can easily persist through numerous methods
[tsh](
https://github.com/creaktive/tsh
) | TinySHell: Unix backdoor listener


You borrow $500 and pay it back after 2 months. Calculate how much you would pay total in each of these scenarios. All interest rates are given as Annual Percentage Rates (APR) so be sure to use time in years!
You borrow the money from a friend who charges you 7% simple interest.
You put the purchase on a credit card that charges 21% compounded daily.
You put the purchase on a credit card that charges 21% compounded daily, plus a late fee of $10 for not paying the debt off after the first month.
You borrow the money from a payday lender that charges you a fee of $10 each week that you don't repay the loan.


Enter your zipcode below to find out how many complaints your neighbors file, relative to the rest of NYC. [view map]
(A is the "best" and F is the "worst")
Made with ❤ in NYC by b__d055 TOS / Privacy


If you want to perform a operation on two fractions, enter them in the input fields above (numerator on
top, denominator on bottom) and choose a operation (add, subtract, multiply or divide).
When you click calculate, the fraction calculator will perform the operation and show the result on the
right of the equal-sign.
This calculator handles simple operations for adding, subtracting, dividing or multiplying fractions and returns an answer in a reduced fraction and a mixed number, if it exists.
The algebraic formula for addition of fractions is a/b + c/d = (ad + bc) / bd. For example: 2/6 + 1/4 = (2*4 + 1*6) / 6*4 = 14 / 24.
Reducing this fraction we get 7/12.
The formula for subtracting fractions is a/b - c/d = (ad - bc) / bd. For example: 2/6 - 1/4 = (2*4 - 1*6) / 6*4 = 2 / 24.
Reducing this fraction we get 1/12.
The algebraic formula for multiplying fractions is a/b * c/d = ac / bd. For example: 2/6 * 1/4 = 2*1 / 6*4 = 2 / 24.
Reducing this fraction we get 1/12.
The algebraic formula for dividing fractions is a/b / c/d = ad / bc. For example: 2/6 * 1/4 = 2*4 / 6*1 = 8 / 6.
Reducing this fraction we get 4/3 or 1-1/3.
If you want to convert a mixed fraction to a fraction and vice-versa, a decimal to a fraction and vice-versa or a mixed fraction to a decimal and vice-versa, you can do so by filling out one of the inputs above (mixed fraction, decimal or fraction) and click convert to get the other two. Decimals and fractions represent the same thing: a number that is not exactly a whole number. This page will show you how to convert a decimal into its equivalent fraction. Convert a Fraction to a Decimal Number. Convert a Decimal Number to a Fraction. Convert a Decimal Number to a Mixed Fraction. Convert a Mixed Fraction to a Decimal Number. Convert a Fraction to a Mixed Fraction. Convert a Mixed Fraction to a Fraction.
A fraction (from Latin: fractus, "broken") represents a part of a whole or, more generally, any number
of equal parts.
When spoken in everyday English, a fraction describes how many parts of a certain size there are, for
example, one-half, eight-fifths, three-quarters.
A common, vulgar, or simple fraction (examples: 1/2 and 24/7)
consists of an integer numerator, displayed above a line (or before a slash), and a non-zero integer
denominator, displayed below (or after) that line.
Numerators and denominators are also used in fractions that are not common, including compound
fractions, complex fractions, and mixed numerals.
Source: Wikipedia
The numerator represents a number of equal parts, and the denominator, which cannot be zero, indicates
how many of those parts make up a unit or a whole. For example, in the fraction 3/4, the numerator, 3,
tells us that the fraction represents 3 equal parts, and the denominator, 4, tells us that 4 parts make
up a whole. The picture to the right illustrates 3/4 or 6/8 of a cake.
Fractional numbers can also be written without using explicit numerators or denominators, by using
decimals, percent signs, or negative exponents (as in 0.01, 1%, and 10?2 respectively, all of which are
equivalent to 1/100). An integer such as the number 7 can be thought of as having an implicit
denominator of one: 7 equals 7/1.
Other uses for fractions are to represent ratios and to represent division.[1] Thus the fraction 3/4 is
also used to represent the ratio 3:4 (the ratio of the part to the whole) and the division 3 / 4 (three
divided by four).


 Since I have been doing almost everything new in the sphere of technology, might as well start a new experience with desktop environment.
Setting up Xmonad was a breeze with apt-get but the next step of setting
up GDM to use xmonad for my session turned out to be more fun then I had
imagined. When you start your Ubuntu you are presented with the login
screen by GNOME. At this time, you can select various session/profile
that you would like to use with the login. This information comes from
files at /usr/share/xession
. One sample:
[Desktop Entry]
Encoding=UTF-8
Name=XMonad
Comment=Lightweight tiling window manager
Exec=xmonad
Icon=xmonad.png
Type=XSession
The above one is installed with xmonad and selecting the session while
logging gives you the simplest xmonad
installation. Though this works,
I wanted to configure something extra to my needs e.g. gnome-session
as it some of the window drawing look nicer (specifically Firefox,
Chrome). So thinking that just like back in the days, I have to setup
.xinitrc
file and it will work, I went ahead and created one with the
details I needed. Logout and login and nothing happens. Figuring, I did
something wrong I spent sometime making sure the config was correct to
the best of my knowledge. Eventually, after much hassles and Googling,
figured out Ubuntu uses $HOME/.xsession
file. With the knowledge, just
doing:
cp .xinitrc .xsession
and selecting User Defined Session
in the login window and everybody
is happy. In my last 30hours or about of using
http://www.xmonad.org, I am already loving it. No more time
spent on resizing and moving around windows on my big monitor. Terminal
is just mod+space+return
away and xterm with Droid Sans Mono is
simmply gorgeous.


three.js
- multiple views - webgl
Man view's controllers
Fov
x
y
z
near
far
light (click)
Man view's up controllers
theta
God view's controllers
x
y
z


Tags:
{% for tag in post.tags.all %}
{{ tag.name }}
{% if not forloop.last %}, {% endif %}
{% endfor %}
Published {{ post.publish }} by {{ post.author.username }}
{% endfor %}
{% else %}
There is no posts yet.
{% endif %}
{% if request.user.is_authenticated and request.user.is_admin %}
In this course you'll learn how to build a simple blog with user registration and blog CRUD functionality. Django is a powerful
framework and you'll see why in this course.


To view this video please enable JavaScript, and consider upgrading to a web browser that supports HTML5 video


The front-end gets just as much consideration as the back-end
Mostly because of mobile
Did somebody say me first?
Understand the problems and come up with an approach.
This was mostly due to the progressive enhancement
(enhancing pages with AJAX and other performance optimizations.)(client vs. server)
detectCanvas() ? showGraph() : showTable();
function detectCanvas() {
var canvas = document.createElement("canvas"); return canvas.getContext ? true : false;
}
...return canvas.getContext...
Modernizr.canvas ? showGraph() : showTable();
document.cookie = "device_dimensions=" + screen.width + "x" + screen.height;
How do you choose a minifier?
gruntjs basics
By Steve Souders
By Me
What makes sites feel slow?
Non-gzipped or non-cached resources
Too much concatenation
Script block (downloading and rendering)
Figure out what's needed to render the page and defer everything else
Avoid CSS expressions?
CSS DemoUse defer - Introduced over 12 years ago with IE4
<script src="file.js" defer></script>
Download in background and execute in order
With HTML5 - Use async
<script src="file.js" async></script>
Execute when downloaded but no order preservation
Only Needed after page load...
var se = document.createElement(‘script’);
se.src = ‘http://mydomain.com/script.js’
//append to head
Used by Google Analytics - May not preserve order
Only Needed after page load...(cont)
<script type=“text/javascript”>
/*var …*/
</script>
Gmail Mobile - remove comment delimiters eval when needed
ControlJS
<script type="text/cjs" data-cjssrc="main.js"></script>
Used By Washington Post - Crawls DOM, Loads scripts asyn
If you want to optimize something you need to be able to measure it.
80ms is the average response time noticed by the human eye
Adding share buttons from Facebook, LinkedIn, Google, and Twitter come with a heavy cost
Facebook share button comes with 11 HTTP requests and a 135KB download (after gzip)
Alternatives
We are faced with a potential list of social networks and options that our users may not even use or care about (the “share bar”)
We don’t have any way of receiving a callback on whether the post/share was successful or not
(We must use async analytics by embedding a unique identifier in the URL)


Center For Glial-Neuronal Interactions
The Center for Glial-Neuronal Interactions (CGNI) in UCR's School of Medicine brings together researchers with very diverse expertise. Together, they seek to define neuronal-glial interactions required for optimal brain and spinal cord function as well as for prevention and therapeutic intervention of neurodevelopmental, neurologic and neurodegenerative diseases.
Why focus on Glial-Neuronal Interactions in CNS health and disease?
Brain and spinal cord function depends not only on neurons, but on glia. Glia are the non-neuronal elements of the central nervous system (CNS) and comprise approximately 90 percent of the cells within the CNS.
The advent of high resolution in vivo imaging has revealed that glia are constantly active in the healthy CNS. Genetic, molecular and epidemiologic studies have also revealed the prominent and often causative roles these cells can play in the pathogenesis of many common neurodegenerative and neurodevelopmental disorders including:
- Alzheimer's disease
- Autism-spectrum disorders
- Epilepsy
- Huntington's disease
- Ischemia (stroke)
- Multiple sclerosis
- Parkinson's disease
- Schizophrenia
- Traumatic Brain Injury (concussions)
Glial interactions with neurons also play critical roles in loss of function caused by spinal cord injury and traumatic brain injury. CGNI investigators are revealing routes and consequences of glial-neuronal interactions aimed at identifying risk factors as well as therapies for CNS disease and dysfunction.


The 2018 Komodo Notary Node Elections are rapidly approaching and we here at Komodo are pleased to be holding our second annual election. We thought now would be the perfect time for an in-depth look at what the Notary Node Elections are and how exactly they work. Whether you...


gochat Live Room
Project： gochat Online User Count： - https://github.com/LockGit/gochat
Play Some Video
gochat it's a lightweight im server write by go , Author by Lock.


List of Speakers
Cleve Gibbon
Cleve Gibbon is chief technology officer at Wunderman Thompson in North America. In his new role, Gibbon will continue to serve as chief marketing technology officer at Cognifide, a mar tech consultancy that WPP’s digital investment arm and Wunderman bought a stake in five years ago.
Alan Zwiebel
Zweibel delivers a charming and candid look at his career journey as a comedy writer. He describes the experience of writing for some of television’s most beloved comedies and discusses how his career success has transcended television to film, theater, and literature.
Liz Willits
Liz is a content marketing expert who teaches more than 100,000 businesses and entrepreneurs how to successfully power their email marketing on a daily basis.
Marin Perez
Marin has spent more than a decade creating high-performing content for businesses of all sizes. A recovering journalist, he’s worked on content marketing programs for small startups and now, for Microsoft.
Wendy Richardson
Wendy leads the Mastercard Global Technical Services team, with the charter of delivering quality customer support and “voice of the customer” intelligence to Mastercard Product and Services teams.


Title: Opening the Oracle JDK
TODO: Add Safe Harbor slide
Who are you and why are you talking about this?
Opening the Oracle JDK: What, Why, When?
Image of JDK release timelines
Build
Build up
Build up the
Build up the diagram
Tonga, Vulnerability tests.
Packaging and tooling
Font rendering, ZGC, DetGC
JFR & JMC
Application CDS
Thanks for your time


bot_ai.py¶
This basic bot class contains a few helper functions, basic properties and variables to get a simple bot started.
How to use this information is shown in the bot examples (with comments).
-
class
sc2.bot_ai.
BotAI
¶ Base class for bots.
-
alert
(alert_code)¶ Check if alert is triggered in the current step. Possible alerts are listed here https://github.com/Blizzard/s2client-proto/blob/e38efed74c03bec90f74b330ea1adda9215e655f/s2clientprotocol/sc2api.proto#L679-L702
Example use:
from sc2.data import Alert if self.alert(Alert.AddOnComplete):
print(“Addon Complete”)
Alert codes:
AlertError AddOnComplete BuildingComplete BuildingUnderAttack LarvaHatched MergeComplete MineralsExhausted MorphComplete MothershipComplete MULEExpired NuclearLaunchDetected NukeComplete NydusWormDetected ResearchComplete TrainError TrainUnitComplete TrainWorkerComplete TransformationComplete UnitUnderAttack UpgradeComplete VespeneExhausted WarpInComplete
- Parameters
alert_code (
Alert
) –- Return type
bool
-
already_pending
(unit_type)¶ Returns a number of buildings or units already in progress, or if a worker is en route to build it. This also includes queued orders for workers and build queues of buildings.
Example:
amount_of_scv_in_production: int = self.already_pending(UnitTypeId.SCV) amount_of_CCs_in_queue_and_production: int = self.already_pending(UnitTypeId.COMMANDCENTER) amount_of_lairs_morphing: int = self.already_pending(UnitTypeId.LAIR)
- Parameters
unit_type (
Union
[UpgradeId
,UnitTypeId
]) –- Return type
float
-
already_pending_upgrade
(upgrade_type)¶ Check if an upgrade is being researched
Returns values are:
0 # not started 0 < x < 1 # researching 1 # completed
Example:
stim_completion_percentage = self.already_pending_upgrade(UpgradeId.STIMPACK)
- Parameters
upgrade_type (
UpgradeId
) –- Return type
float
-
async
build
(building, near, max_distance=20, build_worker=None, random_alternative=True, placement_step=2)¶ Not recommended as this function checks many positions if it “can place” on them until it found a valid position. Also if the given position is not placeable, this function tries to find a nearby position to place the structure. Then uses ‘self.do’ to give the worker the order to start the construction.
- Parameters
building (
UnitTypeId
) –max_distance (
int
) –unit –
random_alternative (
bool
) –placement_step (
int
) –
- Return type
bool
-
calculate_cost
(item_id)¶ Calculate the required build, train or morph cost of a unit. It is recommended to use the UnitTypeId instead of the ability to create the unit. The total cost to create a ravager is 100/100, but the actual morph cost from roach to ravager is only 25/75, so this function returns 25/75.
It is adviced to use the UnitTypeId instead of the AbilityId.  The total supply of a baneling is 0.5, but a zergling already uses up 0.5 supply, so the morph supply cost is 0. The total supply of a ravager is 3, but a roach already uses up 2 supply, so the morph supply cost is 1. The required supply to build zerglings is 1 because they pop in pairs, so this function returns 1 because the larva morph command requires 1 free supply.
Example:
roach_supply_cost = self.calculate_supply_cost(UnitTypeId.ROACH) # Is 2 ravager_supply_cost = self.calculate_supply_cost(UnitTypeId.RAVAGER) # Is 1 baneling_supply_cost = self.calculate_supply_cost(UnitTypeId.BANELING) # Is 0
- Parameters
unit_type (
UnitTypeId
) –- Return type
float
-
calculate_unit_value
(unit_type)¶ Unlike the function below, this function returns the value of a unit given by the API (e.g. the resources lost value on kill).
Examples:
self.calculate_value(UnitTypeId.ORBITALCOMMAND) == Cost(550, 0) self.calculate_value(UnitTypeId.RAVAGER) == Cost(100, 100) self.calculate_value(UnitTypeId.ARCHON) == Cost(175, 275)
- Parameters
unit_type (
UnitTypeId
) –- Return type
-
can_afford
(item_id, check_supply_cost=True)¶ Tests if the player has enough resources to build a unit or structure.
Example:
cc = self.townhalls.idle.random_or(None) # self.townhalls can be empty or there are no idle townhalls if cc and self.can_afford(UnitTypeId.SCV): self.do(cc.train(UnitTypeId.SCV))
Example:
# Current state: we have 150 minerals and one command center and a barracks can_afford_morph = self.can_afford(UnitTypeId.ORBITALCOMMAND, check_supply_cost=False) # Will be 'True' although the API reports that an orbital is worth 550 minerals, but the morph cost is only 150 minerals
- Parameters
item_id (
Union
[UnitTypeId
,UpgradeId
,AbilityId
]) –check_supply_cost (
bool
) –
- Return type
bool
-
async
can_cast
(unit, ability_id, target=None, only_check_energy_and_cooldown=False, cached_abilities_of_unit=None)¶ Tests if a unit has an ability available and enough energy to cast it.
Example:
stalkers = self.units(UnitTypeId.STALKER) stalkers_that_can_blink = stalkers.filter(lambda unit: unit.type_id == UnitTypeId.STALKER and (await self.can_cast(unit, AbilityId.EFFECT_BLINK_STALKER, only_check_energy_and_cooldown=True)))
See data_pb2.py (line 161) for the numbers 1-5 to make sense
-
can_feed
(unit_type)¶ Checks if you have enough free supply to build the unit
Example:
cc = self.townhalls.idle.random_or(None) # self.townhalls can be empty or there are no idle townhalls if cc and self.can_feed(UnitTypeId.SCV): self.do(cc.train(UnitTypeId.SCV))
- Parameters
unit_type (
UnitTypeId
) –- Return type
bool
-
async
can_place
(building, position)¶ Tests if a building can be placed in the given location.
Example:
barracks_placement_position = self.main_base_ramp.barracks_correct_placement worker = self.select_build_worker(barracks_placement_position) # Can return None if worker and (await self.can_place(UnitTypeId.BARRACKS, barracks_placement_position): self.do(worker.build(UnitTypeId.BARRACKS, barracks_placement_position))
- Parameters
building (
Union
[AbilityData
,AbilityId
,UnitTypeId
]) –position (
Point2
) –
- Return type
bool
-
async
chat_send
(message)¶ Send a chat message to the SC2 Client.
Example:
await self.chat_send("Hello, this is a message from my bot!")
- Parameters
message (
str
) –
-
async
distribute_workers
(resource_ratio=2)¶ Distributes workers across all the bases taken. Keyword resource_ratio takes a float. If the current minerals to gas ratio is bigger than resource_ratio, this function prefer filling gas_buildings first, if it is lower, it will prefer sending workers to minerals first.
NOTE: This function is far from optimal, if you really want to have refined worker control, you should write your own distribution function. For example long distance mining control and moving workers if a base was killed are not being handled.
WARNING: This is quite slow when there are lots of workers or multiple bases.
- Parameters
resource_ratio (
float
) –
-
do
(action, subtract_cost=False, subtract_supply=False, can_afford_check=False)¶ Adds a unit action to the ‘self.actions’ list which is then executed at the end of the frame.
Training a unit:
# Train an SCV from a random idle command center cc = self.townhalls.idle.random_or(None) # self.townhalls can be empty or there are no idle townhalls if cc and self.can_afford(UnitTypeId.SCV): self.do(cc.train(UnitTypeId.SCV), subtract_cost=True, subtract_supply=True)
Building a building:
# Building a barracks at the main ramp, requires 150 minerals and a depot worker = self.workers.random_or(None) barracks_placement_position = self.main_base_ramp.barracks_correct_placement if worker and self.can_afford(UnitTypeId.BARRACKS): self.do(worker.build(UnitTypeId.BARRACKS, barracks_placement_position), subtract_cost=True)
Moving a unit:
# Move a random worker to the center of the map worker = self.workers.random_or(None) # worker can be None if all are dead if worker: self.do(worker.move(self.game_info.map_center))
- Parameters
action (
UnitCommand
) –subtract_cost (
bool
) –subtract_supply (
bool
) –can_afford_check (
bool
) –
- Return type
bool
-
async
expand_now
(building=None, max_distance=10, location=None)¶ Finds the next possible expansion via ‘self.get_next_expansion()’. If the target expansion is blocked (e.g. an enemy unit), it will misplace the expansion.
- Parameters
building (
Optional
[UnitTypeId
]) –max_distance (
float
) –location (
Optional
[Point2
]) –
-
property
expansion_locations
¶ Returns dict with the correct expansion position Point2 object as key, resources (mineral field and vespene geyser) as value.
-
async
find_placement
(building, near, max_distance=20, random_alternative=True, placement_step=2)¶ Finds a placement location for building.
Example:
if self.townahlls: cc = self.townhalls[0] depot_position = await self.find_placement(UnitTypeId.SUPPLYDEPOT, near=cc)
- Parameters
building (
UnitTypeId
) –max_distance (
int
) –random_alternative (
bool
) –placement_step (
int
) –
- Return type
Optional
[Point2
]
-
async
get_available_abilities
(units, ignore_resource_requirements=False)¶ Returns available abilities of one or more units. Right now only checks cooldown, energy cost, and whether the ability has been researched.
Examples:
units_abilities = await self.get_available_abilities(self.units)
or:
units_abilities = await self.get_available_abilities([self.units.random])
-
get_terrain_height
(pos)¶ Returns terrain height at a position. Caution: terrain height is different from a unit’s z-coordinate.
-
get_terrain_z_height
(pos)¶ Returns terrain z-height at a position.
-
has_creep
(pos)¶ Returns True if there is creep on the grid point.
-
in_map_bounds
(pos)¶ Tests if a 2 dimensional point is within the map boundaries of the pixelmaps. :type pos:
Union
[Point2
,tuple
] :param pos:- Return type
bool
-
in_pathing_grid
(pos)¶ Returns True if a ground unit can pass through a grid point.
-
in_placement_grid
(pos)¶ Returns True if you can place something at a position. Remember, buildings usually use 2x2, 3x3 or 5x5 of these grid points. Caution: some x and y offset might be required, see ramp code in game_info.py
-
is_visible
(pos)¶ Returns True if you have vision on a grid point.
-
async
issue_events
()¶ This function will be automatically run from main.py and triggers the following functions: - on_unit_created - on_unit_destroyed - on_building_construction_started - on_building_construction_complete - on_upgrade_complete
-
property
main_base_ramp
¶ Returns the Ramp instance of the closest main-ramp to start location. Look in game_info.py for more information about the Ramp class
Example: See terran ramp wall bot
- Return type
-
async
on_before_start
()¶ Override this in your bot class. This function is called before “on_start” and before “prepare_first_step” that calculates expansion locations. Not all data is available yet. This function is useful in realtime=True mode to split your workers or start producing the first worker.
-
async
on_building_construction_complete
(unit)¶ Override this in your bot class. This function is called when a building construction is completed.
- Parameters
unit (
Unit
) –
-
async
on_building_construction_started
(unit)¶ Override this in your bot class. This function is called when a building construction has started.
- Parameters
unit (
Unit
) –
-
async
on_end
(game_result)¶ Override this in your bot class. This function is called at the end of a game. Unsure if this function will be called on the laddermanager client as the bot process may forcefully be terminated.
- Parameters
game_result (
Result
) –
-
async
on_enemy_unit_entered_vision
(unit)¶ Override this in your bot class. This function is called when an enemy unit (unit or structure) entered vision (which was not visible last frame).
- Parameters
unit (
Unit
) –
-
async
on_enemy_unit_left_vision
(unit_tag)¶ Override this in your bot class. This function is called when an enemy unit (unit or structure) left vision (which was visible last frame). Same as the self.on_unit_destroyed event, this function is called with the unit’s tag because the unit is no longer visible anymore. If you want to store a snapshot of the unit, use self._enemy_units_previous_map[unit_tag] for units or self._enemy_structures_previous_map[unit_tag] for structures.
Examples:
last_known_unit = self._enemy_units_previous_map.get(unit_tag, None) or self._enemy_structures_previous_map[unit_tag] print(f"Enemy unit left vision, last known location: {last_known_unit.position}")
- Parameters
unit_tag (
int
) –
-
async
on_start
()¶ Override this in your bot class. At this point, game_data, game_info and the first iteration of game_state (self.state) are available.
-
async
on_step
(iteration)¶ You need to implement this function! Override this in your bot class. This function is called on every game step (looped in realtime mode).
- Parameters
iteration (
int
) –
-
async
on_unit_created
(unit)¶ Override this in your bot class. This function is called when a unit is created.
- Parameters
unit (
Unit
) –
-
async
on_unit_destroyed
(unit_tag)¶ Override this in your bot class. Note that this function uses unit tags and not the unit objects because the unit does not exist any more.
- Parameters
unit_tag (
int
) –
-
async
on_unit_took_damage
(unit, amount_damage_taken)¶ Override this in your bot class. This function is called when your own unit (unit or structure) took damage. It will not be called if the unit died this frame.
This may be called frequently for terran structures that are burning down, or zerg buildings that are off creep, or terran bio units that just used stimpack ability. TODO: If there is a demand for it, then I can add a similar event for when enemy units took damage
Examples:
print(f"My unit took damage: {unit} took {amount_damage_taken} damage")
- Parameters
unit (
Unit
) –
-
async
on_unit_type_changed
(unit, previous_type)¶ Override this in your bot class. This function is called when a unit type has changed. To get the current UnitTypeId of the unit, use ‘unit.type_id’
This may happen when a larva morphed to an egg, siege tank sieged, a zerg unit burrowed, a hatchery morphed to lair, a corruptor morphed to broodlordcocoon, etc..
Examples:
print(f"My unit changed type: {unit} from {previous_type} to {unit.type_id}")
- Parameters
unit (
Unit
) –previous_type (
UnitTypeId
) –
-
async
on_upgrade_complete
(upgrade)¶ Override this in your bot class. This function is called with the upgrade id of an upgrade that was not finished last step and is now.
- Parameters
upgrade (
UpgradeId
) –
-
prevent_double_actions
(action)¶ - Parameters
action –
- Return type
bool
-
research
(upgrade_type)¶ Researches an upgrade from a structure that can research it, if it is idle and powered (protoss). Returns True if the research was started. Return False if the requirement was not met, or the bot did not have enough resources to start the upgrade, or the building to research the upgrade was missing or not idle.
New function. Please report any bugs!
Example:
# Try to research zergling movement speed if we can afford it # and if at least one pool is at build_progress == 1 # and we are not researching it yet if self.already_pending_upgrade(UpgradeId.ZERGLINGMOVEMENTSPEED) == 0 and self.can_afford(UpgradeId.ZERGLINGMOVEMENTSPEED): spawning_pools_ready = self.structures(UnitTypeId.SPAWNINGPOOL).ready if spawning_pools_ready: self.research(UpgradeId.ZERGLINGMOVEMENTSPEED)
- Parameters
upgrade_type (
UpgradeId
) –- Return type
bool
-
select_build_worker
(pos, force=False)¶ Select a worker to build a building with.
Example:
barracks_placement_position = self.main_base_ramp.barracks_correct_placement worker = self.select_build_worker(barracks_placement_position) # Can return None if worker: self.do(worker.build(UnitTypeId.BARRACKS, barracks_placement_position))
-
property
start_location
¶ Returns the spawn location of the bot, using the position of the first created townhall. This will be None if the bot is run on an arcade or custom map that does not feature townhalls at game start.
- Return type
-
property
step_time
¶ Returns a tuple of step duration in milliseconds. First value is the minimum step duration - the shortest the bot ever took Second value is the average step duration Third value is the maximum step duration - the longest the bot ever took (including on_start()) Fourth value is the step duration the bot took last iteration If called in the first iteration, it returns (inf, 0, 0, 0)
- Return type
Tuple
[float
,float
,float
,float
]
-
structure_type_build_progress
(structure_type)¶ Returns the build progress of a structure type.
- Return range: 0 <= x <= 1 where
0: no such structure exists 0 < x < 1: at least one structure is under construction, returns the progress of the one with the highest progress 1: we have at least one such structure complete
Example:
# Assuming you have one barracks building at 0.5 build progress: progress = self.structure_type_build_progress(UnitTypeId.BARRACKS) print(progress) # This prints out 0.5 # If you want to save up money for mutalisks, you can now save up once the spire is nearly completed: spire_almost_completed: bool = self.structure_type_build_progress(UnitTypeId.SPIRE) > 0.75 # Assume you have 2 command centers in production, one has 0.5 build_progress and the other 0.2, the following returns 0.5 highest_progress_of_command_center: float = self.structure_type_build_progress(UnitTypeId.COMMANDCENTER)
- Parameters
structure_type (
Union
[UnitTypeId
,int
]) –- Return type
float
-
property
structures_without_construction_SCVs
¶ Returns all structures that do not have an SCV constructing it. Warning: this function may move to become a Units filter. New function. Please report any bugs!
- Return type
-
async
synchronous_do
(action)¶ Not recommended. Use self.do instead to reduce lag. This function is only useful for realtime=True in the first frame of the game to instantly produce a worker and split workers on the mineral patches.
-
tech_requirement_progress
(structure_type)¶ Returns the tech requirement progress for a specific building
Example:
# Current state: supply depot is at 50% completion tech_requirement = self.tech_requirement_progress(UnitTypeId.BARRACKS) print(tech_requirement) # Prints 0.5 because supply depot is half way done
Example:
# Current state: your bot has one hive, no lair tech_requirement = self.tech_requirement_progress(UnitTypeId.HYDRALISKDEN) print(tech_requirement) # Prints 1 because a hive exists even though only a lair is required
Example:
# Current state: One factory is flying and one is half way done tech_requirement = self.tech_requirement_progress(UnitTypeId.STARPORT) print(tech_requirement) # Prints 1 because even though the type id of the flying factory is different, it still has build progress of 1 and thus tech requirement is completed
- Parameters
structure_type (
UnitTypeId
) –- Return type
float
-
property
time
¶ Returns time in seconds, assumes the game is played on ‘faster’
- Return type
float
-
property
time_formatted
¶ Returns time as string in min:sec format
- Return type
str
-
train
(unit_type, amount=1, closest_to=None, train_only_idle_buildings=True)¶ Trains a specified number of units. Trains only one if amount is not specified. Warning: currently has issues with warp gate warp ins
New function. Please report any bugs!
Example Zerg:
self.train(UnitTypeId.QUEEN, 5) # This should queue 5 queens in 5 different townhalls if you have enough townhalls, enough minerals and enough free supply left
Example Terran:
# Assuming you have 2 idle barracks with reactors, one barracks without addon and one with techlab # It should only queue 4 marines in the 2 idle barracks with reactors self.train(UnitTypeId.MARINE, 4)
Example distance to:
# If you want to train based on distance to a certain point, you can use "closest_to" self.train(UnitTypeId.MARINE, 4, closest_to = self.game_info.map_center)
- Parameters
unit_type (
UnitTypeId
) –amount (
int
) –closest_to (
Optional
[Point2
]) –train_only_idle_buildings (
bool
) –
- Return type
int
-
property
units_created
¶ Returns a Counter for all your units and buildings you have created so far.
This may be used for statistics (at the end of the game) or for strategic decision making.
CAUTION: This does not properly work at the moment for morphing units and structures. Please use the ‘on_unit_type_changed’ event to add these morphing unit types manually to ‘self._units_created’. Issues would arrise in e.g. siege tank morphing to sieged tank, and then morphing back (suddenly the counter counts 2 tanks have been created).
Examples:
# Give attack command to enemy base every time 10 marines have been trained async def on_unit_created(self, unit: Unit): if unit.type_id == UnitTypeId.MARINE: if self.units_created[MARINE] % 10 == 0: for marine in self.units(UnitTypeId.MARINE): self.do(marine.attack(self.enemy_start_locations[0]))
- Return type
Counter
-
worker_en_route_to_build
(unit_type)¶ This function counts how many workers are on the way to start the construction a building. Warning: this function may change its name in the future! New function. Please report any bugs!
- Parameters
unit_type (
UnitTypeId
) –- Return type
float
-


const ( // ApplicationV1_1 is the capabilties string for standard new non-backwards compatible fabric v1.1 application capabilities. ApplicationV1_1 = "V1_1" // ApplicationV1_2 is the capabilties string for standard new non-backwards compatible fabric v1.2 application capabilities. ApplicationV1_2 = "V1_2" // ApplicationV1_3 is the capabilties string for standard new non-backwards compatible fabric v1.3 application capabilities. ApplicationV1_3 = "V1_3" // ApplicationV1_4_2 is the capabilties string for standard new non-backwards compatible fabric v1.4.2 application capabilities. ApplicationV1_4_2 = "V1_4_2" // ApplicationPvtDataExperimental is the capabilties string for private data using the experimental feature of collections/sideDB. ApplicationPvtDataExperimental = "V1_1_PVTDATA_EXPERIMENTAL" // ApplicationResourcesTreeExperimental is the capabilties string for private data using the experimental feature of collections/sideDB. ApplicationResourcesTreeExperimental = "V1_1_RESOURCETREE_EXPERIMENTAL" )
const ( // ChannelV1_1 is the capabilities string for standard new non-backwards compatible fabric v1.1 channel capabilities. ChannelV1_1 = "V1_1" // ChannelV1_3 is the capabilities string for standard new non-backwards compatible fabric v1.3 channel capabilities. ChannelV1_3 = "V1_3" // ChannelV1_4_2 is the capabilities string for standard new non-backwards compatible fabric v1.4.2 channel capabilities. ChannelV1_4_2 = "V1_4_2" // ChannelV1_4_3 is the capabilities string for standard new non-backwards compatible fabric v1.4.3 channel capabilities. ChannelV1_4_3 = "V1_4_3" )
const ( // OrdererV1_1 is the capabilities string for standard new non-backwards compatible Fabric v1.1 orderer capabilities. OrdererV1_1 = "V1_1" // OrdererV1_4_2 is the capabilities string for standard new non-backwards compatible Fabric v1.4.2 orderer capabilities. OrdererV1_4_2 = "V1_4_2" )
ApplicationProvider provides capabilities information for application level config.
type ApplicationProvider struct {
// contains filtered or unexported fields
}
func NewApplicationProvider(capabilities map[string]*cb.Capability) *ApplicationProvider
NewApplicationProvider creates a application capabilities provider.
func (ap *ApplicationProvider) ACLs() bool
ACLs returns whether ACLs may be specified in the channel application config
func (ap ApplicationProvider) CollectionUpgrade() bool
CollectionUpgrade returns true if this channel is configured to allow updates to existing collection or add new collections through chaincode upgrade (as introduced in v1.2)
func (ap *ApplicationProvider) FabToken() bool
There is no fabtoken support in v1.4, so always return false
func (ap *ApplicationProvider) ForbidDuplicateTXIdInBlock() bool
ForbidDuplicateTXIdInBlock specifies whether two transactions with the same TXId are permitted in the same block or whether we mark the second one as TxValidationCode_DUPLICATE_TXID
func (ap *ApplicationProvider) HasCapability(capability string) bool
HasCapability returns true if the capability is supported by this binary.
func (ap *ApplicationProvider) KeyLevelEndorsement() bool
KeyLevelEndorsement returns true if this channel supports endorsement policies expressible at a ledger key granularity, as described in FAB-8812
func (ap *ApplicationProvider) MetadataLifecycle() bool
MetadataLifecycle indicates whether the peer should use the deprecated and problematic v1.0/v1.1/v1.2 lifecycle, or whether it should use the newer per channel peer local chaincode metadata package approach planned for release with Fabric v1.3
func (ap *ApplicationProvider) PrivateChannelData() bool
PrivateChannelData returns true if support for private channel data (a.k.a. collections) is enabled. In v1.1, the private channel data is experimental and has to be enabled explicitly. In v1.2, the private channel data is enabled by default.
func (ap *ApplicationProvider) StorePvtDataOfInvalidTx() bool
StorePvtDataOfInvalidTx returns true if the peer needs to store the pvtData of invalid transactions.
func (r ApplicationProvider) Supported() error
Supported checks that all of the required capabilities are supported by this binary.
func (ap *ApplicationProvider) Type() string
Type returns a descriptive string for logging purposes.
func (ap *ApplicationProvider) V1_1Validation() bool
V1_1Validation returns true is this channel is configured to perform stricter validation of transactions (as introduced in v1.1).
func (ap *ApplicationProvider) V1_2Validation() bool
V1_2Validation returns true if this channel is configured to perform stricter validation of transactions (as introduced in v1.2).
func (ap *ApplicationProvider) V1_3Validation() bool
V1_3Validation returns true if this channel is configured to perform stricter validation of transactions (as introduced in v1.3).
ChannelProvider provides capabilities information for channel level config.
type ChannelProvider struct {
// contains filtered or unexported fields
}
func NewChannelProvider(capabilities map[string]*cb.Capability) *ChannelProvider
NewChannelProvider creates a channel capabilities provider.
func (cp *ChannelProvider) ConsensusTypeMigration() bool
ConsensusTypeMigration return true if consensus-type migration is supported and permitted in both orderer and peer.
func (cp *ChannelProvider) HasCapability(capability string) bool
HasCapability returns true if the capability is supported by this binary.
func (cp *ChannelProvider) MSPVersion() msp.MSPVersion
MSPVersion returns the level of MSP support required by this channel.
func (cp *ChannelProvider) OrgSpecificOrdererEndpoints() bool
OrgSpecificOrdererEndpoints allows for individual orderer orgs to specify their external addresses for their OSNs.
func (r ChannelProvider) Supported() error
Supported checks that all of the required capabilities are supported by this binary.
func (cp *ChannelProvider) Type() string
Type returns a descriptive string for logging purposes.
OrdererProvider provides capabilities information for orderer level config.
type OrdererProvider struct {
// contains filtered or unexported fields
}
func NewOrdererProvider(capabilities map[string]*cb.Capability) *OrdererProvider
NewOrdererProvider creates an orderer capabilities provider.
func (cp *OrdererProvider) ConsensusTypeMigration() bool
ConsensusTypeMigration checks whether the orderer permits a consensus-type migration.
A Kafka-based Ordering Service Node requires these capabilities in order to receive and process a config update with consensus-type migration change. Migration is supported from Kafka to Raft only. If not present, these config updates will be rejected.
func (cp *OrdererProvider) ExpirationCheck() bool
ExpirationCheck specifies whether the orderer checks for identity expiration checks when validating messages
func (cp *OrdererProvider) HasCapability(capability string) bool
HasCapability returns true if the capability is supported by this binary.
func (cp *OrdererProvider) PredictableChannelTemplate() bool
PredictableChannelTemplate specifies whether the v1.0 undesirable behavior of setting the /Channel group's mod_policy to "" and copying versions from the channel config should be fixed or not.
func (cp *OrdererProvider) Resubmission() bool
Resubmission specifies whether the v1.0 non-deterministic commitment of tx should be fixed by re-submitting the re-validated tx.
func (r OrdererProvider) Supported() error
Supported checks that all of the required capabilities are supported by this binary.
func (cp *OrdererProvider) Type() string
Type returns a descriptive string for logging purposes.


Dashboard
2344
Unique Views$ 2,69,344
Month Sales2,34,402
Page Views2344
Returns-
Income
$5600 -
Salaries
$2000 -
Expenditure
$3000 -
Extra income
$600
-
Income
$5600 -
Salaries
$2000 -
Expenditure
$3000 -
Extra income
$600
-
Income
$5600 -
Salaries
$2000 -
Expenditure
$3000 -
Extra income
$600
| # | Avatar | First Name | Last Name | Username | ||
|---|---|---|---|---|---|---|
| 1 | John | Deo |<EMAIL_ADDRESS>| @johndeo | ||
| 2 | Jane | Doe |<EMAIL_ADDRESS>| @johndeo | ||
| 3 | Jump | Deo |<EMAIL_ADDRESS>| @johndeo | ||
| 4 | Jump | Doe |<EMAIL_ADDRESS>| @johndeo | ||
| 5 | John | Deo |<EMAIL_ADDRESS>| @johndeo | ||
| 6 | Jane | Doe |<EMAIL_ADDRESS>| @johndeo | ||
| 7 | Jump | Deo |<EMAIL_ADDRESS>| @johndeo | ||
| 8 | Jump | Doe |<EMAIL_ADDRESS>| @johndeo | ||
| 9 | John | Deo |<EMAIL_ADDRESS>| @johndeo | ||
| 10 | Jane | Doe |<EMAIL_ADDRESS>| @johndeo | ||
| 11 | Jump | Deo |<EMAIL_ADDRESS>| @johndeo | ||
| 12 | Jump | Doe |<EMAIL_ADDRESS>| @johndeo |
- Click and drag to sort Tomorrow
- Pick up granny on the airport Evening
- Feed the dog with milk Night
- Body workout for 2 hours Evening
- Meeting with Charlie about his new idea Saturday
- Watch Cricket match Team A vs Team B Morning
- Collect the mobile from repair shop 2 days later
- Dinner with my Girl friend tonight 12/25/2013
- Install more plugins later
- Indentation with 2 spaces now
- Clean up clode Next hour
- Call with a customer for resolution Afternoon
- Visit Doc for dental check up when possible
- One more todo Today
- Nothing else for now ok
-
content goes here for small description of the latest activity activity ... 10/09/2013
-
content goes here for small description of the latest activity activity ... 10/09/2013
-
content goes here for small description of the latest activity activity ... 10/09/2013
-
content goes here for small description of the latest activity activity ... 10/09/2013
-
content goes here for small description of the latest activity activity ... 10/09/2013
-
content goes here for small description of the latest activity activity ... 10/09/2013
-
content goes here for small description of the latest activity activity ... 10/09/2013
-
content goes here for small description of the latest activity activity ... 10/09/2013
-
content goes here for small description of the latest activity activity ... 10/09/2013
-
content goes here for small description of the latest activity activity ... 10/09/2013


Enjoy the widest variety of products at the best prices in Nepal
Rs {{product.Price}}
{{product.Description}}


--- layout: archive title: Zulip Chat Archive permalink: /stream/113488-general/topic/bilinear.20maps.html ---
Hello everybody,
Is there a definition of bilinear maps in mathlib? More specifically, I am looking for bilinear forms over the reals.
I saw in a thread called "module refactoring" that there was a definition of bilinear maps before, but it seems to have disappeared. Maybe you know where this went, @Kenny Lau ?
I have tried to chain linear maps like this:
[add_comm_group α] [vector_space ℝ α] (f : α →ₗ[ℝ] α →ₗ[ℝ] ℝ)
but then I get the error:
failed to synthesize type class instance for α : Type u_1, _inst_1 : add_comm_group α, _inst_2 : vector_space ℝ α ⊢ add_comm_group (α →ₗ[ℝ] ℝ)
Any ideas?
works on my end:
import linear_algebra.tensor_product data.real.basic universes u v variables {α : Type u} [add_comm_group α] [vector_space ℝ α] (f : α →ₗ[ℝ] α →ₗ[ℝ] ℝ)
Thank you! I hadn't imported linear_algebra.tensor_product
. There must be some instantiation in there that I need. Do you know which one? I don't see it.
you can use:
#check (by apply_instance : add_comm_group (α →ₗ[ℝ] ℝ)) #check (by apply_instance : module ℝ (α →ₗ[ℝ] ℝ))
to see that the instantiations are linear_map.add_comm_group
and linear_map.module
: both are in linear_algebra/basic.lean
Last updated: Apr 24 2020 at 19:02 UTC


Microservices are a powerful and popular architectural pattern for modern cloud-based development and deployment. However, some activities are rendered more complex with microservices than under previous paradigms, such as announcement, discovery, instrumentation, logging, tracing, troubleshooting, encryption, and access control. The purpose of a “service mesh” is therefore to realize the promise of microservices by abstracting any extra complexity away from individual service developers, and into a “sidecar” proxy that can be paired with each service. The sidecar then provides the service with the common functionality required to behave as a good citizen of a microservice architecture, while the service performs the business-specific tasks for which it was written.
Automatic service discovery and load balancing for ephemeral service instances
Support for mTLS, OAuth/OIDC, and JWT-based user authentication and authorization, with support for impersonation by NPE whitelist
Automatic mTLS between meshed services (with FIPS 140-2 compliance mode), point-to-point RBAC policy enforcement (with SPIFFE-compliant ephemeral and auto-rotating service certificates for complete “zero-trust” coming)
Telemetry, monitoring, statistics, SLOs, and mesh state visualization, access logging, deep auditing, and observables
HTTP, HTTP/2, and gRPC proxying, (TCP, UDP, QUIC, and Kafka support coming)
Retries, timeouts, circuit-breakers, canary deployments, A/B testing, etc.
Active and passive health checks
Compatibility and interoperability with many third-party tools and platforms
OpenShift/Kubernetes, Consul, AWS, and flat-file for service discovery (with DC/OS Marathon in alpha)
Istio and Consul integration in the “other-service-mesh” category
Prometheus, Kafka/ElasticSearch/Kibana, CloudWatch, etc. for telemetry, observability, metrics aggregation, and event triggering
Proxying to external services such as legacy APIs, external services, off-cloud services, and Lambda services
Multi-mesh self-interoperability with encryption, access control policy enforcement, data consistency, sharing, and communication between meshes
Distributed, immutable, timestamped data storage with fine-grained access control, AES256 encryption for stored content, lineage tracking, file expiration, CDN features, and offline/rejoin/merge support with strong eventual consistency


{{ sourcelink( 'okio' ) }} is an {{ names.abbr( 'io' ) }} library by square which is also a part of the famous OkHttp library. Depending on Okio causes {{ names.name( 'proguard' ) }} to fail which may look similar to the log output below.
{{ code( 'page/proguard/proguard-error.txt.html', null ) }}{{ names.name( 'proguard' ) }} prevents compilation as long as there are warnings. To solve those you need to stick to the information about the affected classes at the top of the log (e.g. {{ command( 'Warning: okio.Okio: can\'t find referenced class java.nio.file.Files', null ) }}). In your {{ names.abbr( 'sbt' ) }} build configuration, you can now use the {{ command( 'proguardOptions in Android', 'scala' ) }} key to add {{ names.name( 'proguard' ) }} rules that instruct it to keep certain packages, classes, fields or methods. This is a trial and error process. To exemplarily solve the {{ command( 'Okio' ) }} warning you would first naively try to keep the {{ command( 'java.nio.file.Files' ) }} class.
{{ code( 'page/proguard/example-configuration-1.scala', 'scala' ) }}This is usually the first attempt to tackle {{ names.name( 'proguard' ) }} warnings that occur after adding a new dependency. In most cases this is also a sufficient solution. Not in this one, though. Okio is a {{ names.name( 'java' ) }} {{ names.abbr( 'io' ) }} library that also works with {{ names.name( 'android' ) }}. The affected class {{ command( 'java.nio.file.Files' ) }} is part of the {{ names.name( 'java' ) }} {{ names.abbr( 'sdk' ) }}, but does not exist on {{ names.name( 'android' ) }}. Forcing {{ names.name( 'proguard' ) }} to keep the class is therefore not a valid solution because the class does not exist in the first place. Instead we have to rely on Okio to know how to properly handle the {{ names.name( 'android' ) }} environment and instead instruct {{ names.name( 'proguard' ) }} to ignore the issue.
{{ code( 'page/proguard/example-configuration-2.scala', 'scala' ) }}Suppressing warnings is a dangerous undertaking because it may cause runtime errors if your app (or some underlying library) tries to call a class that does not exist. It also hides all further issues related to the {{ command( 'okio.Okio' ) }} class. Only use it as a last resort to handle {{ names.name( 'proguard' ) }} warnings.
{% call alert( 'warning' ) %}This example should make it obvious that configuring {{ names.name( 'proguard' ) }} is not a trivial task. You are forced to learn and understand its options. Getting it right is time consuming because every change forces you to rerun the costly {{ names.name( 'proguard' ) }} process. Furthermore, solving problems does usually force you to drill down on implementation details of foreign code.
{% endcall %}


[gecode-users] under windows xp...
Mikael Zayenz Lagerkvist
zayenz at gmail.com
Mon Oct 20 15:56:35 CEST 2008
Hi,
The basic information we need to help anybody is Gecode version
(check), platform (half check, XP or Vista?), and compiler. Using my
magic deduction-capabilities I see that you are using gcc, which is
not the compiler we use for the pre-compiled Windows packages (as
stated on http://www.gecode.org/download.html).
In general we recommend the use of the Visual Studio C++ compiler on
Windows. See the mailing list-archives for more information.
Cheers,
Mikael
On Mon, Oct 20, 2008 at 3:29 PM, matt <slaash19 at free.fr> wrote:
> Hi, i have some problems to use gecode under windows...
> So first i have download the package for windows
> (Gecode-2.2.0-Qt-x86.msi (32-bit)
> <http://www.gecode.org/download/Gecode-2.2.0-Qt-x86.msi>) and installed
> it under "C:\Gecode", i set the variable path "C:\Gecode\bin" and i use
> cygwin, and when i try to compile the example like "baseline.cc" it
> doesn't work, i have the following errors:
> " In file included from c:/Gecode/gecode/support.hh:89, from
> baselinde.cc:38:
> c:/Gecode/gecode/support/memory.icc:80: error: expected constructor,
> destruct or type conversion before 'void' "
> and so many errors like this...
> Maybe someone can tell me what's wrong or tell me exactly how to install
> and an example of "how to compile..."
> Thanks! =)
>
> _______________________________________________
> Gecode users mailing list
> users at gecode.org
> https://www.gecode.org/mailman/listinfo/gecode-users
>
--
Mikael Zayenz Lagerkvist, http://www.ict.kth.se/~zayenz/
More information about the gecode-users
mailing list


--- layout: article title: Peter's Minis permalink: mini.html comments: true image: teaser: felsity400.jpg ---
Peter has more than a passing interest in these little cars. First there was Alfalfa, followed by Small (short for Very Small Car). Eric the Half a Mini joined Small as did Alexander Mini and Augustus Mini. Next came Viessy who was named after Very Small Car since he used much of the internals from Small. Some of the other internals came from Augustus and Alexander. Small had BOUNCE numberplates, which Viessy inherited. The BOUNCE numberplates had to go when Peter and Viessy moved up to Queensland. All these were clubman minis. Alfalfa and Small had Tiggers painted on them.
In 2007 he acquired his second 1275LS
Here's a theme for xpenguins : Minis.tar.gz a cute desktop toy for Linux.


The estimation problems considered here are parametric problems where a user model depends on initially unknown scalar parameters and several measurements made on values that depend on the model are available. As an example, one can consider the flow rate of a river given rain data on its vicinity, or the center and radius of a circle given points on a ring.
One important class of estimation problems is weighted least squares problems. They basically consist in finding the values for some parameters pk such that a cost function J = sum(wi ri2) is minimized. The various ri terms represent the deviation ri = mesi - modi between the measurements and the parameterized models. The wi factors are the measurements weights, they are often chosen either all equal to 1.0 or proportional to the inverse of the variance of the measurement type. The solver adjusts the values of the estimated parameters pk which are not bound. It does not touch the parameters which have been put in a bound state by the user.
This package provides the {@link org.apache.commons.math.estimation.EstimatedParameter EstimatedParameter} class to represent each estimated parameter, and the {@link org.apache.commons.math.estimation.WeightedMeasurement WeightedMeasurement} abstract class the user can extend to define its measurements. All parameters and measurements are then provided to some {@link org.apache.commons.math.estimation.Estimator Estimator} packed together in an {@link org.apache.commons.math.estimation.EstimationProblem EstimationProblem} instance which acts only as a container. The package provides two common estimators for weighted least squares problems, one based on the {@link org.apache.commons.math.estimation.GaussNewtonEstimator Gauss-Newton} method and the other one based on the {@link org.apache.commons.math.estimation.LevenbergMarquardtEstimator Levenberg-Marquardt} method.


VR
Home
Registration
Order Tracking
About-Us
Covid-19 Vaccine Registration
Here You Can Register
Name
Your Age
Phone Number
Vaccine Type
Sputnik V
AstraZeneca
mRNA-1273
BNT162b2
Do you have an allergy ?
yes
no
Vaccine Appointment Date


unipy.utils.generator module¶
Docstring for generator
.
Versatile Generators¶
| Productivity | |
|---|---|
| ReusableGenerator | Reusable Generator. |
| re_generator | Functional API for ReusableGenerator . |
| Lazy Evaluation | |
|---|---|
| split_generator | Split data by given size. |
| Range Generator | |
|---|---|
| num_fromto_generator | Range number string pairs by given term. |
| dt_fromto_generator | Range date format string pairs by given term. |
| tm_fromto_generator | Range datetime format string pairs by given term. |
| timestamp_generator | Range timestamp string pairs by given term. |
-
class
unipy.utils.generator.
ReusableGenerator
(generator)[source]¶ Bases:
object
Temporary Interface to re-use generator for convenience.
Once assigned, It can be infinitely consumed **as long as an input generator remains un-exhausted.
-
_source
¶ generator – A source generator.
See also
generator
itertools.tee
Examples
>>> from unipy.utils.generator import ReusableGenerator >>> gen = (i for i in range(10)) >>> gen <generator object <genexpr> at 0x11120ebf8> >>> regen = ReusableGenerator(gen) >>> regen <unipy.utils.generator.ReusableGenerator object at 0x1061a97f0> >>> list(regen) [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] >>> list(regen) [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] >>> list(gen) # If the source is used, copied one will be exhausted too. [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] >>> list(gen) [] >>> list(regen) []
-
-
unipy.utils.generator.
re_generator
(generator)[source]¶ A functional API for unipy.ReusableGenerator.
Once assigned, It can be infinitely consumed **as long as an output generator is called at least one time.
Parameters: generator (generator) – An generator to copy. This original generator should not be used anywhere else, until the copied one consumed at least once. Returns: A generator to be used infinitely. Return type: generator See also
generator
itertools.tee
Examples
>>> from unipy.utils.generator import re_generator >>> gen = (i for i in range(10)) >>> gen <generator object <genexpr> at 0x11120ebf8> >>> regen = copy_generator(gen) >>> regen <unipy.utils.generator.ReusableGenerator object at 0x1061a97f0> >>> list(regen) [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] >>> list(regen) [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] >>> list(gen) # Once the copied one is used, the source will be exhausted. [] >>> list(gen) [] >>> list(regen) [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] >>> list(regen) [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
-
unipy.utils.generator.
num_fromto_generator
(start, end, term)[source]¶ A range function yields pair chunks.
It had made for time-formatting query. It yields a tuple of (start, start+(term-1)) pair, until start > end.
Parameters: *args (int) – end or start, end[, term] It works like range function. Yields: tuple – A tuple of (start, start+(term-1)) pair, until start > end. See also
yield
Examples
>>> from unipy.utils.generator import num_fromto_generator >>> >>> query = 'BETWEEN {pre} AND {nxt};' >>> >>> q_list = [query.format(pre=item[0], nxt=item[1]) ... for item in num_fromto_generator(1, 100, 10)] >>> print(q_list[0]) BETWEEN 1 AND 10; >>> print(q_list[1]) BETWEEN 11 AND 20;
-
unipy.utils.generator.
dt_fromto_generator
(start, end, day_term, tm_format='%Y%m%d')[source]¶ A range function yields datetime formats by pair.
It had made for time-formatting query. It yields a tuple of (start, start+(term-1)) pair, until start > end.
Parameters: Yields: tuple – A tuple of (start, start+(term-1)) pair, until start > end.
See also
yield
Examples
>>> from unipy.utils.generator import dt_fromto_generator >>> dt_list = [item for item in ... dt_fromto_generator('20170101','20170331', 10)] >>> dt_list[:3] [('20170101', '20170110'), ('20170111', '20170120'), ('20170121', '20170130')]
-
unipy.utils.generator.
tm_fromto_generator
(start, end, day_term, tm_string=['000000', '235959'], tm_format='%Y%m%d')[source]¶ A range function yields datetime formats by pair.
It had made for time-formatting query. It yields a tuple of (start, start+(term-1)) pair, until start > end.
Parameters: Yields: tuple – A tuple of (start, start+(term-1)) pair, until start > end.
See also
yield
Examples
>>> from unipy.utils.generator import tm_fromto_generator >>> tm_list = [item for item in ... tm_fromto_generator('20170101','20170331', 10)] >>> tm_list[:3] [('20170101000000', '20170110235959'), ('20170111000000', '20170120235959'), ('20170121000000', '20170130235959')]
-
unipy.utils.generator.
timestamp_generator
(*args)[source]¶ A range function yields pair timestep strings.
It had made for time-formatting query. It yields a tuple of (start, start+(term-1)) pair, until start > end.
Parameters: *args (int) – end or start, end[, term] It works like range function. Yields: tuple – A tuple of (start, start+(term-1)) pair, until start > end. See also
yield
Examples
>>> from unipy.utils.generator import timestamp_generator >>> timestamp_generator(1, 10, 2) <generator object timestamp_generator at 0x10f519678> >>> list(timestamp_generator(1, 14, 5)) [(1, 5), (6, 10), (11, 15)] >>> begin, fin, period = 1, 10, 3 >>> list(timestamp_generator(begin, fin, period)) [(1, 3), (4, 6), (7, 9), (10, 12)] >>> time_sequence = timestamp_generator(begin, fin, period) >>> time_msg = "{start:2} to {end:2}, {term:2} days." >>> for time in time_sequence: ... b, f = time ... print(time_msg.format(start=b, end=f, term=period)) ... 1 to 3, 3 days. 4 to 6, 3 days. 7 to 9, 3 days. 10 to 12, 3 days.


| DOSE: |
7.0 mg |
smoked |
5-MeO-DMT |
(powder / crystals) |
This was my very first time using this substance, and would say its definitly not my last time. I have spent many months researching this drug and its affects, and would reccomend doing so before trying it. I recieved a gram finally today after waiting a couple of weeks for it and had to try it out.
I meditated before trying this to lower my pulse and breathing pattern. After making a CD to trip out to (I reccomend something your familiar with, that has a slow calm tune to it, like Jefferson Airplane's White Rabbit, Beatles or PINK FLOYD!) I sat back in my water bed, listened to the music quitely for about 50 minutes, breathing slowly, almost in a sleepy state. I tried about 4 mg in a glass pipe with a butane lighter, but it dissolved into liquid and smoked for about 2 seconds, which wasn't enough to enhale, so i tried it again with about 5 mg., and the same result happened, so them i got out the candle and lit it, and put in about 12 mg. and put over the candle. Soon it began to make a little smoke, when i bent over to inhale, all of a sudden i could see the pipe fill up as i inhaled to my lungs, and just like everyone says, it hit me the second it was in my lungs.
I started feeling like i was seeing stars, just like when you hold your breath too long. As soon as i exhaled, it was over from there, gone to a different world, left earth, into a blackness as i closed my eyes. One thing I must really focus on when tripping is the breathing, at first it was a little hard to keep it slow and thats when i felt a little fear and regret from smoking it, but when i calmed down again, it wasa good trip from there.
Now i normally don't have too many visuals when using other psycidellics like mushrooms, except when i eat about 7 grams and have PINK FLOYD in the backround, but i was seeing swirls of blue and white as i was listening to Wheat Kings by the HIP. After six-seven mins. of intense tripping, i was back to reality, and as happy as a clam, it has now been about 25 minutes since my comeback, and its was great!!!
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.


Contingency risk means that the risk is linked to a certain trigger. Options do fit here, as you could sell the option to give something in case something else happens. Financial options are also linked to an underlying transaction that triggers changes in the option value, which is why options and futures are called derivatives.
<!– more –>
Options

Options as financial instruments, allow for contingent risk to be traded. They started in 1973 when the Chicago Board Options Exchange was born. 1977 put options (the right to sell a security) were introduced. Within 10 years the value of options traded exceeded that of the underlying shares. Then more underlying were added and more financial centers. There are four main types of options: on shares, on interest rates, on currencies and on commodities.

A call options allows you to buy x shares at price y at date z. A put option allows you to sell x shares at price y at date z. American options can be exercised on or before expiry and european options on the expiry date.

Quotations telll you for example:

C&W 460 Jan/50 this would mean that for 500 pounds, you can buy an options for 1000 C&W shares for a price of 460p up till the third wednesday in January. If at that time, or before, the C&W share price is at 510p a share, then buying them for 460p will give you a profit of 50px1000= 500 pounds, meaning that you came out even. Above that price you made a profit.

There is always a buyer and a seller/writer wiith options. Writers could be pension funds or asset management companies that want to hedge.

A call option with the exercise price below the current share price is called in the money, with the money gained being the intrinsic value. With the EP below the share price, it is called out of the money. With EP=SP it is called at the money. If the option price is above the intrinsic value of the option, this difference is called the time value, meaning what one would pay because of belief that the shares could rise. With the time to expiry shrinking, time value also shrinks.

As options give you the right but no obligation to excercise that very option, the loss is limited to the price of the option, making them important for portfolio insurance and guaranteed funds. If the share price goes up, then the % return is much greater with options than with the underlying.

Analysing Options

Writing call options is extremely risky as the potential for losses are unlimited. This changes when the writer own the shares on which the call is written (a covered call in relation to a naked call). Page 15 of the book includes a few nice pay-off diagrams that are normally used when looking at option returns. If you start looking at these charts you can imagine that almost everything is possible with mixing different kinds of options. When looking at a portfolio of options, the best way to draw a pay-off diagram is by first using a table with values for the different options at different share prices, allowing your to find the sum of their values and to draw the pay-off diagram.

When writing a covered call, the only downside is loosing the share when the option is excercised, otherwise, there will be a profit because the share pay-off will run contra the option pay-off when the share price rises.

Call option prices decrease as exercise price increases and the other way arround. All this flexibility might allow for arbitrage, risk-free profits with options through differences in pricing on the same product. Due to liquid markets, any such situations are traded away swiftly.

There are several propositions in relation to options: 1. Share Price >= Call Price >= max (0, Share - excercise price) 2. Price of a call option increases as the time to expiry increases 3. Price of call options decrease as they exercise price increases 4. Value of American call options = value of European call option 5. Put = Call - Share price + PV(exercise price)

Option valuation

1973 Fischer Black and Myron Scholes introduced a new model to value options and it only needed readily observable values. The Black-Scholes model has since retained its position as the most popular option valuation tool. Another method is the binominal method by Cox, Ross and Rubinstein (1979), which might be simpler to understand, is more flexible but is very difficult to compute. The Black-Scholes formula looks difficult but is easy to use within spreadsheets.

There are different variables in the formula that have an effect on option prices: 1. Current Share Price - Excercise Price 2. Volatility is good, as we just let it expire if it is down, but higher volatility makes it more likely to be high 3. time to expiry means that when the time increases, the price increases too 4. the risk-free interest rate, included for the time value, the higher this is, the higher the option value

The underlying idea is that you can always reproduce an option performance with a portfolio of the underlying shares and cash. The thing you can argue about though is number 2, being volatility, which is talking about the future until expiry, but is measured with a past value, something that can be different dependent on how you look at it. So you can also look at the market value at the moment and then work out the volatility that was used to calculate the market value by the market maker.

Currency options are frequently used in treasury management. Graman and Kohlhagen (1983) developed an adapted Black-Scholes for currency options. There is an important difference between options and forwards, because options are only the right to do something but forwards are a contract, meaning that you will have to e.g. exchange money at the time the contract states. Options are good because they limit downside risk, without taking away upside potential and can be used when you are not even shure if a cash flow will occur. Sometimes they also do not require daily margins as the forward market does. The rise of OTC currency options gave rise to a market for traded options.

Risk and Policy

This is more about a financial risk management rather than general risk, but again, risk mapping can be helpful. In general, the methods used need to fit the market and business as well as the size of a company. Not everybody needs or can finance a treasury function for example. You should actually take a look at the entire organisation and beyond financial risks.


Man escapes uninjured after arson attack on west Belfast home
by CLAIRE SIMPSONA man has escaped uninjured following an arson attack on his west Belfast home early today.
A wheelie bin was set alight at the front door of the man's house at Aitnamona Crescent off the Glen Road at around 7.20am.
The fire damaged the front door and caused smoke damage inside the house.
Firefighters put out the blaze.
Police appealed to anyone with information to contact them on 101.


Visualization of US Congressional Districts Data from
Swethepeople
Pie-Chart visualization of party control per state.
US congressional districts map visualization.


My Node ID
My Call Price
Set Price
Active Call
No calls at the moment.
Mute
Disconnect
Start Call
Target Node ID
Call Node
Check Price
Call History
No previous calls.


Introduction to OpenCV
OpenCV is the huge open-source library for computer vision, machine learning, and image processing and now it plays a major role in real-time operation which is very important in today’s systems. By using it, one can process images and videos to identify objects, faces, or even the handwriting of a human.
OpenCV is one of the most popular computer vision libraries. If you want to start your journey in the field of computer vision, then a thorough understanding of the concepts of OpenCV is of paramount importance. We will cover the following topics:
- Reading an image
- Extracting the RGB values of a pixel
- Extracting the Region of Interest (ROI)
- Resizing the Image
- Rotating the Image
- Drawing a Rectangle
- Displaying text
Reading an image
Use the below mentioned code to import and use OpenCv
import cv2
Reading the image using imread() function
image = cv2.imread('image.png')
Extracting the height and width of an image
h, w = image.shape[:2]
Displaying the height and width
print("Height = {}, Width = {}".format(h, w))
Now we will focus on extracting the RGB values of an individual pixel. Note – OpenCV arranges the channels in BGR order. So the 0th value will correspond to Blue pixel and not Red.
Extracting the RGB values of a pixel
-
Extracting RGB values.
-
Here we have randomly chosen a pixel
-
by passing in 100, 100 for height and width. (B, G, R) = image[100, 100]
-
Displaying the pixel values print("R = {}, G = {}, B = {}".format(R, G, B))
-
We can also pass the channel to extract
-
the value for a specific channel B = image[100, 100, 0] print("B = {}".format(B))
Extracting the Region of Interest (ROI)
- We will calculate the region of interest
- by slicing the pixels of the image roi = image[100 : 500, 200 : 700]
Resizing the Image
- resize() function takes 2 parameters,
- the image and the dimensions resize = cv2.resize(image, (800, 800))
Calculating the ratio
ratio = 800 / w
Creating a tuple containing width and height
dim = (800, int(h * ratio))
Resizing the image
resize_aspect = cv2.resize(image, dim)
Rotating the Image
-
Calculating the center of the image center = (w // 2, h // 2)
-
Generating a rotation matrix matrix = cv2.getRotationMatrix2D(center, -45, 1.0)
-
Performing the affine transformation rotated = cv2.warpAffine(image, matrix, (w, h))
There are a lot of steps involved in rotating an image. So, let me explain each of them in detail.
The 2 main functions used here are –
getRotationMatrix2D()
warpAffine()
getRotationMatrix2D() It takes 3 arguments –
center – The center coordinates of the image
Angle – The angle (in degrees) by which the image should be rotated
Scale – The scaling factor
It returns a 2*3 matrix consisting of values derived from alpha and beta
alpha = scale * cos(angle)
beta = scale * sine(angle)
Rotation Matrix
warpAffine()
The function warpAffine transforms the source image using the rotation matrix:
dst(x, y) = src(M11X + M12Y + M13, M21X + M22Y + M23)
Here M is the rotation matrix, described above.
It calculates new x, y co-ordinates of the image and transforms it.
Drawing a Rectangle
It is an in-place operation.
-
We are copying the original image,
-
as it is an in-place operation. output = image.copy()
-
Using the rectangle() function to create a rectangle. rectangle = cv2.rectangle(output, (1500, 900), (600, 400), (255, 0, 0), 2)
It takes in 5 arguments –
- Image
- Top-left corner co-ordinates
- Bottom-right corner co-ordinates
- Color (in BGR format)
- Line width
Displaying text
It is also an in-place operation
-
Copying the original image output = image.copy()
-
Adding the text using putText() function text = cv2.putText(output, 'OpenCV Demo', (500, 550), cv2.FONT_HERSHEY_SIMPLEX, 4, (255, 0, 0), 2)
It takes in 7 arguments –
- Image
- Text to be displayed
- Bottom-left corner co-ordinates, from where the text should start
- Font
- Font size
- Color (BGR format)
- Line width
Object Detection
Object Detection is a computer technology related to computer vision, image processing, and deep learning that deals with detecting instances of objects in images and videos By applying object detection, you’ll not only be able to determine what is in an image, but also where a given object resides! In this section we will understand a variety of object detection methods:
Template Matching
- Simply looking for an exact copy of an image in another larger image.
- It simply scans a larger image for a provided template by sliding the template target image across the larger image.
- The main option that can be adjusted is the comparison method used as the target template is slid across the larger image.
- The methods are all some source of correlation base metric.
- So we can see the different methods that opencv has available
Corner Detection
- A corner is a point whose local neighbourhood stands in two dominant and different edge directions.
- Or simply a corner can be interpreted as the junction of two edges or an edge is a sudden change in brightness.
- There are various corner detection algorithms
- We will take look at some of the most popular algorithms:
- Harris Corner Detection
- Shi-Tomasi Corner Detection
- Harris Corner Detection
- Shi-Tomasi Corner Detection
- Published in 1994 by J. Shi and C. Tomasi in their paper Good Features to Track.
- It made a small change to the Harris Corner Detector which ended up with better results
- It changes the scoring function selection criteria that Harris uses for corner detection.
- Harris Corner Detection uses:
- R = λ1λ2 – k( λ1 + λ2)
- Shi-Tomasi uses:
- R = min(λ1, λ2)
- Harris Corner Detection uses:
Edge Detection
- Expanding to find general edges of objects
- Canny Edge Detection Method
- Apply Gaussian filter to smooth the image in order to remove the noise.
- Find the intensity gradients of the image.
- Apply non-maximum suppression to get rid of spurious response to edge detection.
- Apply double threshold to determine possible edges.
- Track edge by hysteresis: Finalize the detection of edges by supressing all other edges that are weak and not connected to strong edges.
Grid Detection
- Combining both concepts to find grid in images (useful for applications).
- Often cameras can create distortion in an image such as radial distortion and tangential distortion
- A good way to account for these distortions when performing like object tracking is to have a recognizable pattern attached to the object being tracked.
- Grid patterns are often used to calibrate cameras and track motion.
Contour Detection
- Contours are defined simply as a curve joining all the continuous points having same colour or intensity.
- Contours are a useful tool for shape analysis and object detection and recognition
- OpenCV has a built in Counter finder function that can also help us differentiate between internal and external contours (eg – grabbing the eyes and smile from a cartoon face).
- Allows us to detect foreground vs background.
Feature Matching
- Feature matching extracts defining key features from an input image (using ideas from corner, edge and contour detection).
- Then using a distance calculation, finds all the matches in a secondary image.
- More advanced methods of detecting matching object in another image, even if the target image is not shown exactly the same image we are searching.
- Feature Matching results:
- Notice how the input image is not exactly what is shown in the secondary image
- 3 methods of feature matching are:
- Brute-Force Matching with ORB Descriptors
- Brute-Force Matching with SIFT Descriptors and Ratio Test
- FLANN based Matcher
Watershed Algorithm
-
Metaphorically, Watershed Algorithm transformation treats the image it operates upon like a topographic map, with the brightness of each point representing it’s height, and finds the line that runs along the tops of ridges.
-
Any grayscale image can be viewed as a topographic surface where high intensity denotes peaks and hills while low intensity denotes valleys
-
As the “water” rises, depending on the peaks (gradient) nearby, “water” from different valleys (different segments of the image), with different colors could start merge.
-
To avoid this merging, the algorithm creates barrier (segment edge boundaries) in locations where “water” merges.
-
The algorithm can then fill every isolated valley(local minima) with different colored water(labels).
-
Advances algorithm that allows us to segment images into foreground and background
-
Also allows us to manually set seeds to choose segments of an image.
- A common example is the use of coins next to each other on a table
- Attempting to segment these coins can be difficult:
- It may be unclear to the algorithm if it should be treated as one large object or many small objects.
- The watershed algorithm can be very effective for these sort of problems
- A common example is the use of coins next to each other on a table
Facial and Eye Detection
- Haar Cascades to identify faces in images
- We will be able to very quickly detect if a face is in an image and locate
- However we won’t know who’s face it belongs to.
- We would need a really large dataset and deep learning for facial recognition.
- Main feature types:
- Each feature is a single value obtained by subtracting sum of pixels under white rectangle from sum of pixels under black rectangle.
- Realistically, our images won’t be perfect lines and edges.
- These features are calculated by:
- mean(dark region) – mean(light region)
- A perfect edge would result in a value of one.
- The closer the result is to one, the better the feature.
- The Voila-Jones algorithm solves this by using the integral image.
- Resulting in an O(1) running time of the algorithm
- The algo also saves time by going through a cascade of classifiers.
- This means we will treat the image to a series(cascade)of classifiers based on the simple feature .
- Once an image fails a classifier, we can stop attempting to detect a face.
Implementation in Jupyter Notebooks
Connecting to Camera for video input
Custom Seed with Watershed algorithm
So you have completed this topic. Congratulations
Hope you learnt something new
Happy Learning!! 📚