public final class Cubeacon
extends java.lang.Object
CBBootstrapRegion
| Modifier and Type | Field and Description |
|---|---|
static long |
DEFAULT_BACKGROUND_BETWEEN_SCAN_PERIOD
The default duration in milliseconds spent not scanning between each Bluetooth scan cycle
when no ranging/monitoring clients are in the foreground
|
static long |
DEFAULT_BACKGROUND_SCAN_PERIOD
The default duration in milliseconds of the Bluetooth scan cycle when no
ranging/monitoring clients are in the foreground
|
static long |
DEFAULT_EXIT_PERIOD
The default duration in milliseconds of region exit time
|
static long |
DEFAULT_FOREGROUND_BETWEEN_SCAN_PERIOD
The default duration in milliseconds spent not scanning between each Bluetooth scan cycle
|
static long |
DEFAULT_FOREGROUND_SCAN_PERIOD
The default duration in milliseconds of the Bluetooth scan cycle
|
| Modifier and Type | Method and Description |
|---|---|
void |
addMonitoringListener(CBMonitoringListener listener)
Specifies an interface listener that should be called each time the BeaconService
sees or stops seeing a
CBRegion of beacons. |
void |
addRangingListener(CBRangingListener listener)
Specifies an interface that should be called each time the BeaconService
gets ranging data, which is nominally once per second when beacons are detected.
|
void |
connect(CBServiceListener listener)
Connect an Android Activity or Service to the
BeaconService.
|
void |
disconnect(CBServiceListener listener)
Disconnect an Android Activity or Service from the
BeaconService.
|
static Cubeacon |
getInstance()
Gets the instance of Cubeacon SDK.
|
static java.lang.String |
getSDKVersion()
Shows Cubeacon SDK version string.
|
static void |
initialize(android.content.Context context)
Initialize Cubeacon SDK.
|
boolean |
isConnected(CBServiceListener listener)
Check if the passed service listener is bound to the service.
|
static boolean |
isInitialized()
Check whether Cubeacon SDK is initialized.
|
void |
removeMonitoringListener(CBMonitoringListener listener)
Specifies a class to remove from the array of CBMonitoringListener.
|
void |
removeMonitoringListeners()
Remove all registered monitoring listeners.
|
void |
removeRangingListener(CBRangingListener listener)
Specifies an interface to remove from the array of CBRangingListener
|
void |
removeRangingListeners()
Remove all registered ranging listeners.
|
void |
setBackgroundIntervalScanPeriod(long p)
Sets the duration in milliseconds of each Bluetooth LE scan cycle to look for beacons.
|
void |
setBackgroundMode(boolean backgroundMode)
This method notifies the beacon service that the application is either moving to background
mode or foreground mode.
|
static void |
setBackgroundPowerSaver(boolean flag)
Sets background power saver mode.
|
void |
setBackgroundScanPeriod(long p)
Sets the duration in milliseconds of each Bluetooth LE scan cycle to look for beacons.
|
void |
setForegroundIntervalScanPeriod(long p)
Sets the duration in milliseconds between each Bluetooth LE scan cycle to look for beacons.
|
void |
setForegroundScanPeriod(long p)
Sets the duration in milliseconds of each Bluetooth LE scan cycle to look for beacons.
|
static void |
setRegionExitPeriod(long period)
Set region exit period in milliseconds.
|
void |
startMonitoringForRegion(CBRegion region)
Tells the BeaconService to start looking for beacons that match the passed
CBRegion object.
|
void |
startMonitoringForRegions(java.util.List<CBRegion> regions)
Tells the BeaconService to start looking for beacons that match the passed list of
CBRegion object.
|
void |
startRangingBeaconsInRegion(CBRegion region)
Tells the BeaconService to start looking for beacons that match the passed
CBRegion object, and providing updates on the estimated distance every seconds while
beacons in the CBRegion are visible.
|
void |
startRangingBeaconsInRegions(java.util.List<CBRegion> regions)
Tells the BeaconService to start looking for beacons that match the passed
list of CBRegion object, and providing updates on the estimated distance every
seconds while beacons in the CBRegion are visible.
|
void |
stopMonitoringForRegion(CBRegion region)
Tells the BeaconService to stop looking for beacons that match the passed
CBRegion object.
|
void |
stopRangingBeaconsInRegion(CBRegion region)
Tells the BeaconService to stop looking for beacons that match the passed
CBRegion object.
|
void |
updateScanPeriods()
Updates an already running scan with scanPeriod/betweenScanPeriod according to
Background/Foreground state.
|
public static final long DEFAULT_FOREGROUND_SCAN_PERIOD
public static final long DEFAULT_FOREGROUND_BETWEEN_SCAN_PERIOD
public static final long DEFAULT_BACKGROUND_SCAN_PERIOD
public static final long DEFAULT_BACKGROUND_BETWEEN_SCAN_PERIOD
public static final long DEFAULT_EXIT_PERIOD
public static void initialize(android.content.Context context)
context
- The application contextpublic static Cubeacon getInstance()
public static boolean isInitialized()
public static java.lang.String getSDKVersion()
String
of Cubeacon SDK version.public static void setBackgroundPowerSaver(boolean flag)
flag
- true to enable background power savesetBackgroundMode(boolean)
public void setBackgroundMode(boolean backgroundMode)
When ranging in the background, the time between updates will be much less frequent than in the foreground. Updates will come every time interval equal to the sum total of the BackgroundScanPeriod and the BackgroundBetweenScanPeriod.
backgroundMode
- true indicates that app is in the backgroundDEFAULT_FOREGROUND_SCAN_PERIOD
,
DEFAULT_FOREGROUND_BETWEEN_SCAN_PERIOD
,
DEFAULT_BACKGROUND_SCAN_PERIOD
,
DEFAULT_BACKGROUND_BETWEEN_SCAN_PERIOD
,
setForegroundScanPeriod(long)
,
setForegroundIntervalScanPeriod(long)
,
setBackgroundScanPeriod(long)
,
setBackgroundIntervalScanPeriod(long)
public void setForegroundScanPeriod(long p)
connect(CBServiceListener)
or when switching between background/foreground. To have it effect on an already running
scan (when the next cycle starts), call updateScanPeriods()
p
- The foreground period to setpublic void setForegroundIntervalScanPeriod(long p)
connect(CBServiceListener)
or when switching between background/foreground. To have it effect on an already running scan
(when the next cycle starts), call updateScanPeriods()
p
- The foreground interval to setpublic void setBackgroundScanPeriod(long p)
connect(CBServiceListener)
or when switching between background/foreground. To have it effect on an already running scan
(when the next cycle starts), call updateScanPeriods()
p
- The background period to setpublic void setBackgroundIntervalScanPeriod(long p)
connect(CBServiceListener)
or when switching between background/foreground. To have it effect on an already running scan
(when the next cycle starts), call updateScanPeriods()
p
- The background interval to setpublic void updateScanPeriods() throws android.os.RemoteException
android.os.RemoteException
- If the Cubeacon is not connected to the service.public static void setRegionExitPeriod(long period)
period
- The period when region exitpublic void addMonitoringListener(CBMonitoringListener listener)
Specifies an interface listener that should be called each time the BeaconService
sees or stops seeing a CBRegion
of beacons.
Permits to register severals CBMonitoringListener objects.
Unregister the listener usingremoveMonitoringListener(CBMonitoringListener)
listener
- The monitoring listener interface to addCBMonitoringListener
,
startMonitoringForRegion(CBRegion)
,
CBRegion
public void removeMonitoringListener(CBMonitoringListener listener)
listener
- The monitoring interface listener to removeCBMonitoringListener
,
startMonitoringForRegion(CBRegion)
,
CBRegion
public void removeMonitoringListeners()
public void addRangingListener(CBRangingListener listener)
Specifies an interface that should be called each time the BeaconService gets ranging data, which is nominally once per second when beacons are detected.
Permits to register several CBRangingListener objects.
The listener must be unregistered usingremoveRangingListener(CBRangingListener)
listener
- The ranging interface listener to addCBRangingListener
,
startRangingBeaconsInRegion(CBRegion)
,
CBRegion
public void removeRangingListener(CBRangingListener listener)
listener
- The ranging interface listener to removeCBRangingListener
public void removeRangingListeners()
public void connect(CBServiceListener listener)
listener
- the Activity or Service that will receive
the callback when the service is ready.public void disconnect(CBServiceListener listener)
listener
- the Activity or Service that no longer needs
to use the service.connect(CBServiceListener)
public boolean isConnected(CBServiceListener listener)
listener
- The service listener to checkconnect(CBServiceListener)
,
disconnect(CBServiceListener)
public void startRangingBeaconsInRegion(CBRegion region) throws android.os.RemoteException
stopRangingBeaconsInRegion(CBRegion)
method.region
- The region to start rangingandroid.os.RemoteException
- If the Cubeacon is not connected to the service.addRangingListener(CBRangingListener)
,
stopRangingBeaconsInRegion(CBRegion)
,
CBRangingListener
,
CBRegion
public void stopRangingBeaconsInRegion(CBRegion region) throws android.os.RemoteException
region
- The region to stop rangingandroid.os.RemoteException
- If the Cubeacon is not connected to the service.addRangingListener(CBRangingListener)
,
startRangingBeaconsInRegion(CBRegion)
,
CBRangingListener
,
CBRegion
public void startRangingBeaconsInRegions(java.util.List<CBRegion> regions) throws android.os.RemoteException
stopRangingBeaconsInRegion(CBRegion)
method.regions
- The list of region to start rangingandroid.os.RemoteException
- If the Cubeacon is not connected to the service.addRangingListener(CBRangingListener)
,
stopRangingBeaconsInRegion(CBRegion)
,
CBRangingListener
,
CBRegion
public void startMonitoringForRegion(CBRegion region) throws android.os.RemoteException
stopMonitoringForRegion(CBRegion)
method.region
- The region to start monitoringandroid.os.RemoteException
- If the Cubeacon is not connected to the service.addMonitoringListener(CBMonitoringListener)
,
stopMonitoringForRegion(CBRegion)
,
CBMonitoringListener
,
CBRegion
public void stopMonitoringForRegion(CBRegion region) throws android.os.RemoteException
region
- The region to stop monitoringandroid.os.RemoteException
- If the Cubeacon is not connected to the service.addMonitoringListener(CBMonitoringListener)
,
startMonitoringForRegion(CBRegion)
,
CBMonitoringListener
,
CBRegion
public void startMonitoringForRegions(java.util.List<CBRegion> regions) throws android.os.RemoteException
stopMonitoringForRegion(CBRegion)
method.regions
- The list of region to start monitoringandroid.os.RemoteException
- If the Cubeacon is not connected to the service.addMonitoringListener(CBMonitoringListener)
,
stopMonitoringForRegion(CBRegion)
,
CBMonitoringListener
,
CBRegion


DfE enquiries
Central newsdesk 020 7783 8300
General enquiries 0370 000 2288
Press release
Schools Minister Nick Gibb announces a new reading competition designed to inspire children to become voracious readers and boost literacy standards.
The competition is open to all seven- to 12-year-olds at schools in England. It will launch in the autumn.
The Department for Education is considering bids to design and co-deliver the competition and will choose a preferred partner in the coming weeks.
The competition will:
Nick Gibb said:
I am passionate about wanting all children to develop a real love of books and of reading for pleasure.
Children should always have a book on the go. The difference in achievement between children who read for half an hour a day in their spare time and those who do not is huge - as much as a year’s education by the time they are 15.
A new national reading competition is designed to give a competitive spur to those reluctant readers who are missing out on the vast world of literature.
The Government is committed to driving up reading standards of young people because:
Evidence shows that the regular enjoyment of reading leads to higher achievement at school.
The Government wants every child to leave school with a lifelong love of reading and the necessary literacy skills to succeed in life. The Department’s phonics evidence paper shows that the teaching of systematic synthetic phonics is proven to be the best method of teaching early reading. Once a child has mastered the mechanics of reading, building on it in a literacy-rich environment will enable them to become accomplished readers. Only then will they find it easier to read a wider range of literature for their own enjoyment.
The Department announced a scheme to help primary schools teach systematic synthetic phonics and drive up reading standards by offering them up to £3,000 match funding to spend on materials and training. Since the launch of the scheme in September 2011, more than 4,200 schools have signed up to spend more than £10 million on approved products and training.
The Department invited bids to design, develop and co-deliver the competition from interested parties. The Department is currently considering all bids and will announce its preferred partner in the coming weeks. The Department and its partner will then further develop the proposals with the intention of launching the competition in the autumn.
The National Literacy Trust’s first annual survey into young people’s reading - 2010 .
Children’s and Young People’s Reading Habits and Preferences
The DfE analysis of the OECD PISA 2009 study can be found in the publications section.
The full OECD PISA 2009 study, including a UK note, can be found on the OECD website.
The Department for Education phonics evidence paper is available on the Department for Education’s website .
Central newsdesk 020 7783 8300
General enquiries 0370 000 2288
Published: 7 February 2012


BACKGROUND
DHL was launching new paid search campaigns across multiple regions. They wanted landing pages that reflected their brand guidelines and used data from their previous campaigns to inform strategy on new pages.
GOAL
Each of these pages were A/B tested against a landing page in ion already running. The goal was a lift in conversions (form completion) and reduction in bounce rate when compared to the competitor.
TIMELINE
These projects were strategized, protyped, designed/developed, and launched in just over 45 days.


Codahale Metrics is integrated into the framework.
http://host:port/restsql/monitoring
http://host:port/restsql/monitoring/healthcheck
http://host:port/restsql/monitoring/threads
http://host:port/restsql/monitoring/ping
The following interfaces are available to access the metrics:
http://host:port/restsql/monitoring/metrics
org.restsql.service
.
Out of the box the metrics are available to the HTTP/JSON and JMX interfaces.
Reporting to Ganglia is configured in the restsql.properties as follows:
# Ganglia monitoring configuration monitoring.ganglia.host=hostName or ipAddress monitoring.ganglia.port=portNumber monitoring.ganglia.ttl=numberOfRouterHops monitoring.ganglia.udpMode=[unicast,multicast] monitoring.ganglia.frequency=seconds
Reporting to Graphite is configured in the restsql.properties as follows:
# Graphite monitoring configuration monitoring.graphite.host=hostName or ipAddress monitoring.graphite.port=portNumber monitoring.graphite.frequency=seconds
Customization if availble via the MonitoringManager interface. The framework will use the default implementation if your restsql.properties file excludes the definition. The default in the restsql.properties is as follows:
# Implementation classes - use these to customize the framework ... org.restsql.service.monitoring.MonitoringManager=org.restsql.service.monitoring.MonitoringManagerImpl


We will {{ data['how_to_notify'] }} you when your information is checked.
{% endif %} {% if data.how_to_share=="email" %}What happens next
The person you've emailed the code to has 21 days to check it.
You can have up to 15 active codes at any given time.
{% else %}What to do with your code
To share your identity information you need to provide the check code and your full name to the person you want to share it with.
You code will be valid for 21 days
You can have up to 15 active codes at any given time.
{% endif %} Get another codeActive codes
| Code | Details | Expiry date | Cancel |
|---|---|---|---|
| hlq9zzfq | view | 14 6 2017 | cancel |
Used and expired codes
There are no used or expired code(s) to view.


Sochi 2014 Winter Olympics Opinion Board
Enter Your Full Name
Submit
Select Who you Think will Have the Highest Medal Count
USA
Canada
Norway
Netherlands
Russian Federation
Germany
How Many Total Gold Medals will the USA Have?
Less than or Equal to 5
Greater than 5
Display how much Debt Sochi will be in After the Games


Francomobile
My Profile
(current)
Need Help?
Log Out
Review
Saved Words
Review The Words Often
So you will remember them better!
Choose a wordlist
essential_french
A very very long list
Good luck!
© 2020 Francomobile
Pick one study mode
Flash Cards
Picture Challenges


Score :
Time :
Rules:
Fruit Slicing is a game of showing your ninja cutting skills.
- To cut a Fruit, click on it and you will score points.
- If you cut a bomb, you will lose points.
- Try to cut as many fruits as possible with the limited time.
It's just that simple.


--- layout: archive title: Zulip Chat Archive permalink: /stream/113488-general/topic/solve.20each.20goal.20in.20.22by.22.20mode.html ---
In by
mode, i.e. by xxx; yyy; zzz
, is there a way to not apply the tactics to every goal?
you can use seq_focus, i.e. xxx; [yyy, zzz]
, or use a big tactic block by { xxx, yyy, zzz }
aha
I was trying focus [yyy, zzz]
but it failed
turns out you don't say focus
how would you write this?
by simp [reduce.step, h] at H; cases L; injections; [cc, { rw ← h_2, from list.suffix_append _ _ } ]
begin simp [reduce.step, h] at H, cases L; injections, {cc}, rw ← h_2, exact list.suffix_append _ _ end
but it's three lines longer, lol
four lines longer. i can't count
If you have to represent complicated control flow, you probably shouldn't be using by
at some point it's saving lines by just deleting newlines
{% endraw %}Last updated: Apr 24 2020 at 19:02 UTC


Blog
Home
About Me
Projects
Blog
Contact
Week-9 Blog
Blogging
Week-8 Blog
Rails
Week-7 Blog
JavaScript
Week-6 Blog
Ruby Classes
Week-5 Blog
Enumerate Methods
Week-4 Blog
Arrays and Hashes
Week-3 Blog
CSS Reflection
Week-2 Blog
git and Github


On smaller devices, material-sidenav will be hidden by default.
On larger, it will be shown by default.


class Shell
Shell
implements an idiomatic Ruby interface for common UNIX shell commands.
It provides users the ability to execute commands with filters and pipes, like sh
/csh
by using native facilities of Ruby.
Examples¶ ↑
Temp file creation¶ ↑
In this example we will create three tmpFile
's in three different folders under the /tmp
directory.
sh = Shell.cd("/tmp") # Change to the /tmp directory sh.mkdir "shell-test-1" unless sh.exists?("shell-test-1") # make the 'shell-test-1' directory if it doesn't already exist sh.cd("shell-test-1") # Change to the /tmp/shell-test-1 directory for dir in ["dir1", "dir3", "dir5"] if !sh.exists?(dir) sh.mkdir dir # make dir if it doesn't already exist sh.cd(dir) do # change to the `dir` directory f = sh.open("tmpFile", "w") # open a new file in write mode f.print "TEST\n" # write to the file f.close # close the file handler end print sh.pwd # output the process working directory end end
Temp file creation with self¶ ↑
This example is identical to the first, except we're using CommandProcessor#transact
.
CommandProcessor#transact
executes the given block against self, in this case sh
; our Shell
object. Within the block we can substitute sh.cd
to cd
, because the scope within the block uses sh
already.
sh = Shell.cd("/tmp") sh.transact do mkdir "shell-test-1" unless exists?("shell-test-1") cd("shell-test-1") for dir in ["dir1", "dir3", "dir5"] if !exists?(dir) mkdir dir cd(dir) do f = open("tmpFile", "w") f.print "TEST\n" f.close end print pwd end end end
Pipe /etc/printcap into a file¶ ↑
In this example we will read the operating system file /etc/printcap
, generated by cupsd
, and then output it to a new file relative to the pwd
of sh
.
sh = Shell.new sh.cat("/etc/printcap") | sh.tee("tee1") > "tee2" (sh.cat < "/etc/printcap") | sh.tee("tee11") > "tee12" sh.cat("/etc/printcap") | sh.tee("tee1") >> "tee2" (sh.cat < "/etc/printcap") | sh.tee("tee11") >> "tee12"
Attributes
Returns the current working directory.
Returns the current working directory.
Returns the current working directory.
Returns the current working directory.
Returns the command search path in an array
Returns the umask
Public Class Methods
Convenience method for Shell::CommandProcessor.alias_command
. Defines an instance method which will execute a command under an alternative name.
Shell.def_system_command('date') Shell.alias_command('date_in_utc', 'date', '-u') Shell.new.date_in_utc # => Sat Jan 25 16:59:57 UTC 2014
# File lib/shell.rb, line 395 def Shell.alias_command(ali, command, *opts, &block) CommandProcessor.alias_command(ali, command, *opts, &block) end
Creates a new Shell
instance with the current working directory set to path
.
# File lib/shell.rb, line 127 def cd(path) new(path) end
# File lib/shell.rb, line 116 def debug=(val) @debug = val @verbose = val if val end
Convenience method for Shell::CommandProcessor.def_system_command
. Defines an instance method which will execute the given shell command. If the executable is not in Shell.default_system_path
, you must supply the path to it.
Shell.def_system_command('hostname') Shell.new.hostname # => localhost # How to use an executable that's not in the default path Shell.def_system_command('run_my_program', "~/hello") Shell.new.run_my_program # prints "Hello from a C program!"
# File lib/shell.rb, line 375 def Shell.def_system_command(command, path = command) CommandProcessor.def_system_command(command, path) end
# File lib/shell.rb, line 160 def default_record_separator if @default_record_separator @default_record_separator else $/ end end
# File lib/shell.rb, line 168 def default_record_separator=(rs) @default_record_separator = rs end
Returns the directories in the current shell's PATH environment variable as an array of directory names. This sets the system_path
for all instances of Shell
.
Example: If in your current shell, you did:
$ echo $PATH /usr/bin:/bin:/usr/local/bin
Running this method in the above shell would then return:
["/usr/bin", "/bin", "/usr/local/bin"]
# File lib/shell.rb, line 144 def default_system_path if @default_system_path @default_system_path else ENV["PATH"].split(":") end end
Sets the system_path
that new instances of Shell
should have as their initial system_path.
path
should be an array of directory name strings.
# File lib/shell.rb, line 156 def default_system_path=(path) @default_system_path = path end
Convenience method for Shell::CommandProcessor.install_system_commands. Defines instance methods representing all the executable files found in Shell.default_system_path
, with the given prefix prepended to their names.
Shell.install_system_commands Shell.new.sys_echo("hello") # => hello
# File lib/shell.rb, line 415 def Shell.install_system_commands(pre = "sys_") CommandProcessor.install_system_commands(pre) end
Creates a Shell
object which current directory is set to the process current directory, unless otherwise specified by the pwd
argument.
# File lib/shell.rb, line 185 def initialize(pwd = Dir.pwd, umask = nil) @cwd = File.expand_path(pwd) @dir_stack = [] @umask = umask @system_path = Shell.default_system_path @record_separator = Shell.default_record_separator @command_processor = CommandProcessor.new(self) @process_controller = ProcessController.new(self) @verbose = Shell.verbose @debug = Shell.debug end
# File lib/shell.rb, line 428 def self.notify(*opts) Shell::debug_output_synchronize do if opts[-1].kind_of?(String) yorn = verbose? else yorn = opts.pop end return unless yorn if @debug_display_thread_id if @debug_display_process_id prefix = "shell(##{Process.pid}:#{Thread.current.to_s.sub("Thread", "Th")}): " else prefix = "shell(#{Thread.current.to_s.sub("Thread", "Th")}): " end else prefix = "shell: " end _head = true STDERR.print opts.collect{|mes| mes = mes.dup yield mes if block_given? if _head _head = false prefix + mes else " "* prefix.size + mes end }.join("\n")+"\n" end end
Convenience method for Shell::CommandProcessor.unalias_command
# File lib/shell.rb, line 400 def Shell.unalias_command(ali) CommandProcessor.unalias_command(ali) end
Convenience method for Shell::CommandProcessor.undef_system_command
# File lib/shell.rb, line 380 def Shell.undef_system_command(command) CommandProcessor.undef_system_command(command) end
Public Instance Methods
Creates a Shell
object which current directory is set to path
.
If a block is given, it restores the current directory when the block ends.
If called as iterator, it restores the current directory when the block ends.
# File lib/shell.rb, line 263 def chdir(path = nil, verbose = @verbose) check_point if block_given? notify("chdir(with block) #{path}") if verbose cwd_old = @cwd begin chdir(path, nil) yield ensure chdir(cwd_old, nil) end else notify("chdir #{path}") if verbose path = "~" unless path @cwd = expand_path(path) notify "current dir: #{@cwd}" rehash Void.new(self) end end
# File lib/shell.rb, line 218 def debug=(val) @debug = val @verbose = val if val end
# File lib/shell.rb, line 229 def expand_path(path) File.expand_path(path, @cwd) end
# File lib/shell.rb, line 420 def inspect if debug.kind_of?(Integer) && debug > 2 super else to_s end end
Returns a list of scheduled jobs.
# File lib/shell.rb, line 347 def jobs @process_controller.jobs end
Sends the given signal
to the given job
# File lib/shell.rb, line 355 def kill(sig, command) @process_controller.kill_job(sig, command) end
Pops a directory from the directory stack, and sets the current directory to it.
# File lib/shell.rb, line 331 def popdir check_point notify("popdir") if pop = @dir_stack.pop chdir pop notify "dir stack<EMAIL_ADDRESS>', '}]" self else Shell.Fail DirStackEmpty end Void.new(self) end
Pushes the current directory to the directory stack, changing the current directory to path
.
If path
is omitted, it exchanges its current directory and the top of its directory stack.
If a block is given, it restores the current directory when the block ends.
# File lib/shell.rb, line 297 def pushdir(path = nil, verbose = @verbose) check_point if block_given? notify("pushdir(with block) #{path}") if verbose pushdir(path, nil) begin yield ensure popdir end elsif path notify("pushdir #{path}") if verbose @dir_stack.push @cwd chdir(path, nil) notify "dir stack<EMAIL_ADDRESS>', '}]" self else notify("pushdir") if verbose if pop = @dir_stack.pop @dir_stack.push @cwd chdir pop notify "dir stack<EMAIL_ADDRESS>', '}]" self else Shell.Fail DirStackEmpty end end Void.new(self) end
Sets the system path (the Shell
instance's PATH environment variable).
path
should be an array of directory name strings.
# File lib/shell.rb, line 206 def system_path=(path) @system_path = path rehash end


new Messages()
Messages class contains messages for the shown to the end user.
- Source:
Returns:
Messages object
Members
-
affiliationHint
-
Hint message for entering a valid user's affiliation.
- Source:
Example
"The affiliation should be between 2 and 20 digits, underscore, hyphen, apostrophe and dots are allowed. First letter can be only a character."
-
clickToChangeKeyDescription
-
Hint message for informing the end user, to click on this field in order to change a public key description value
- Source:
Example
"Click to change the public key description."
-
confirmKeyDeletionQuestion
-
Confirmation question that asks the end user to delete a public key.
- Source:
Example
"Are you sure you want to delete this public key ?"
-
confirmPasswordHint
-
Hint message for entering a valid user's password confirmation.
- Source:
Example
"Please enter password confirmation. The password has to be exactly the same you've entered in the field above."
-
confirmUserDeletionQuestion
-
Confirmation question that asks the end user to delete the current user profile.
- Source:
Example
"Are you sure you want to delete your user profile?"
-
emailHint
-
Hint message for entering a valid user's email.
- Source:
Example
"Please enter a valid email address."
-
emptyAffiliation
-
Warning message after submitting an empty user's affiliation value.
- Source:
Example
"Affiliation is empty."
-
emptyConfirmPassword
-
Warning message after submitting an empty user's password confirmation value.
- Source:
Example
"Confirm password is empty."
-
emptyEmailAddress
-
Warning message after submitting an empty user's email value.
- Source:
Example
"Email address is empty."
-
emptyFirstName
-
Warning message after submitting an empty user's first name value.
- Source:
Example
"User's first name is empty."
-
emptyKeyDescription
-
Warning message after submitting an empty public key description.
- Source:
Example
"Public key description is empty."
-
emptyKeyValue
-
Warning message for submitting a public key with the empty value.
- Source:
Example
"Public key value is empty"
-
emptyLastName
-
Warning message after submitting an empty user's last name value.
- Source:
Example
"User's last name is empty."
-
emptyPassphrase
-
Warning message that the given pass-phrase for a private key has an empty value.
- Source:
Example
"The pass-phrase is empty."
-
emptyPassword
-
Warning message after submitting an empty user's password value.
- Source:
Example
"Password is empty."
-
emptyUsername
-
Warning message after submitting an empty username value.
- Source:
Example
"Username is empty."
-
failToLoadFile
-
Warning message for informing the end user that an error occurs while loading a file from a system.
- Source:
Example
"Failed to load file"
-
fileSelectionNotSupported
-
Hint message for informing the end user that the file selection is not supported on his/her system.
- Source:
Example
"Upload New User Keys is disabled because file selection is not supported on your system."
-
firstNameHint
-
Hint message for entering a valid user's first name.
- Source:
Example
"Acceptable first names include compound names with a hyphen or a space in them."
-
generateCertificateFromKey
-
Hint message for informing the end user about the starting of a process of the certificate generation from an existing public key.
- Source:
Example
"Generate certificate from the selected public key"
-
generateKeyPairAndCertificate
-
Hint message for informing the end user about the starting of a process of the new ssh key and certificate creation.
- Source:
Example
"Generate new key pair and a certificate for it"
-
generateNewKeyAndCertificate
-
Hint message that informs the end user about the right private key pass-phrase syntax.
- Source:
Example
"Please wait until new key pair and certificate are being generated."
-
keyDescription
-
Hint message for submitting a public key description value.
- Source:
Example
"The public key description should be from 3 to 15 digits long. The first letter has to be a character. Only alphanumeric characters are allowed."
-
keyValueHint
-
Hint message for entering a valid user's public key value.
- Source:
Example
"The public key length should be between 100 and 500 digits."
-
lastNameHint
-
Hint message for entering a valid user's last name.
- Source:
Example
"Acceptable last names include compound names with a hyphen or a space in them."
-
newKeyDescription
-
Hint message for submitting a public key description value.
- Source:
Example
"The public key description should be from 3 to 15 digits long. The first letter has to be a character. Only alphanumeric characters are allowed."
-
noPublicKeys
-
Hint message that no public keys are available for the given user profile.
- Source:
Example
"No public keys are available"
-
passphraseHint
-
Hint message that informs the end user about the right private key pass-phrase syntax.
- Source:
Example
"Password must be at least 4 characters, no more than 8 characters, and must include at least one lower case letter, and one numeric digit."
-
passwordHint
-
Hint message for entering a valid user's password.
- Source:
Example
"Password must be between 4 and 8 digits long and include at least one numeric digit."
-
passwordsAreInconsistent
-
Warning message after submitting a password and the password confirmation that aren't consistent.
- Source:
Example
"Passwords are inconsistent."
-
signOutConfirm
-
Confirmation question that asks the end user about signing out.
- Source:
Example
"Are you sure you want to sign out ?"
-
uploadNewPublicKey
-
Hint message for uploading new public key button.
- Source:
Example
"Click to upload the new public key."
-
userDeleted
-
Information message about the successful user profile deletion.
- Source:
Example
"Current user profile has been successfully deleted"
-
usernameHint
-
Hint message for entering a valid username.
- Source:
Example
"The username must be between 5 and 15 characters, dot and underscore are allowed, the first letter should be a number or a character"
-
userNotFound
-
Warning message informing that the user with given username has not been found on the server.
- Source:
Example
"Current user isn't found."
-
wrongAffiliation
-
Warning message after submitting a user's affiliation value with a wrong syntax.
- Source:
Example
"Wrong Affiliation syntax."
-
wrongConfirmPassword
-
Warning message after submitting a user's password confirmation value with a wrong syntax.
- Source:
Example
"Confirm password has a wrong syntax."
-
wrongEmailAddress
-
Warning message after submitting a user's email address value with a wrong syntax.
- Source:
Example
"Wrong email address."
-
wrongFirstName
-
Warning message after submitting a user's first name value with a wrong syntax.
- Source:
Example
"Wrong first name syntax."
-
wrongFirstName
-
Warning message after submitting a user's last name value with a wrong syntax.
- Source:
Example
"Wrong last name syntax."
-
wrongKeyDescription
-
Hint message for informing the end user, to click on this field in order to change a public key description value
- Source:
Example
"The given key description is wrong."
-
wrongKeyValue
-
Warning message for submitting a public key with the wrong syntax.
- Source:
Example
"The given key value syntax is wrong."
-
wrongPassphrase
-
Warning message that the given pass-phrase for a private key has a wrong syntax.
- Source:
Example
"The given pass-phrase syntax is invalid."
-
wrongPassword
-
Warning message after submitting a user's password value with a wrong syntax.
- Source:
Example
"The given password syntax is invalid."
-
wrongPasswordKey
-
Warning message after submitting a password with a wrong key value.
- Source:
Example
"Wrong password."
-
wrongPublicKeyFileExt
-
Warning message that informs the end user about the wrong public key file extension.
- Source:
Example
"Wrong public key file extension. The valid public key extension is 'pub'."
-
wrongPublicKeyFileSize
-
Warning message that informs the end user about the wrong public key file size.
- Source:
Example
"Wrong file size. Please select another public key file."
-
wrongUsername
-
Warning message after submitting a username value with a wrong syntax.
- Source:
Example
"Wrong username syntax."


PMM-Connect Mission:
Extend PMM's reach in the Indo-American community beyond current PMM members by active participation and collaboration with other community organizations.
Provide a common platform for the community to share & enjoy similar interests:
- Health (Yoga, Meditation, Blood Donation drive etc..)
- Networking Opportunities for entrepreneurs, Business Summit etc..
- Sports (Cricket, Hiking, Bowling, Tennis, Badminton)
- Entertainment Events (Movie night, Dinner Cruise etc..)
Make new connections/friends of similar interests.


Akka Typed
Warning
This module is currently experimental in the sense of being the subject of active research. This means that API or semantics can change without warning or deprecation period and it is not recommended to use this module in production just yet—you have been warned.
As discussed in Actor Systems (and following chapters) Actors are about sending messages between independent units of computation, but how does that look like? In all of the following these imports are assumed:
import akka.typed._
import akka.typed.ScalaDSL._
import akka.typed.AskPattern._
import scala.concurrent.Future
import scala.concurrent.duration._
import scala.concurrent.Await
With these in place we can define our first Actor, and of course it will say hello!
object HelloWorld {
final case class Greet(whom: String, replyTo: ActorRef[Greeted])
final case class Greeted(whom: String)
val greeter = Static[Greet] { msg =>
println(s"Hello ${msg.whom}!")
msg.replyTo ! Greeted(msg.whom)
}
}
This small piece of code defines two message types, one for commanding the Actor to greet someone and one that the Actor will use to confirm that it has done so. The Greet type contains not only the information of whom to greet, it also holds an ActorRef that the sender of the message supplies so that the HelloWorld Actor can send back the confirmation message.
The behavior of the Actor is defined as the greeter value with the help of the Static behavior constructor—there are many different ways of formulating behaviors as we shall see in the following. The “static” behavior is not capable of changing in response to a message, it will stay the same until the Actor is stopped by its parent.
The type of the messages handled by this behavior is declared to be of class Greet, which implies that the supplied function’s msg argument is also typed as such. This is why we can access the whom and replyTo members without needing to use a pattern match.
On the last line we see the HelloWorld Actor send a message to another Actor, which is done using the ! operator (pronounced “tell”). Since the replyTo address is declared to be of type ActorRef[Greeted] the compiler will only permit us to send messages of this type, other usage will not be accepted.
The accepted message types of an Actor together with all reply types defines the protocol spoken by this Actor; in this case it is a simple request–reply protocol but Actors can model arbitrarily complex protocols when needed. The protocol is bundled together with the behavior that implements it in a nicely wrapped scope—the HelloWorld object.
Now we want to try out this Actor, so we must start an ActorSystem to host it:
import HelloWorld._
// using global pool since we want to run tasks after system.terminate
import scala.concurrent.ExecutionContext.Implicits.global
val system: ActorSystem[Greet] = ActorSystem("hello", greeter)
val future: Future[Greeted] = system ? (Greet("world", _))
for {
greeting <- future.recover { case ex => ex.getMessage }
done <- { println(s"result: $greeting"); system.terminate() }
} println("system terminated")
After importing the Actor’s protocol definition we start an Actor system from the defined behavior.
As Carl Hewitt said, one Actor is no Actor—it would be quite lonely with nobody to talk to. In this sense the example is a little cruel because we only give the HelloWorld Actor a fake person to talk to—the “ask” pattern (represented by the ? operator) can be used to send a message such that the reply fulfills a Promise to which we get back the corresponding Future.
Note that the Future that is returned by the “ask” operation is properly typed already, no type checks or casts needed. This is possible due to the type information that is part of the message protocol: the ? operator takes as argument a function that accepts an ActorRef[U] (which explains the _ hole in the expression on line 7 above) and the replyTo parameter which we fill in is of type ActorRef[Greeted], which means that the value that fulfills the Promise can only be of type Greeted.
We use this here to send the Greet command to the Actor and when the reply comes back we will print it out and tell the actor system to shut down. Once that is done as well we print the "system terminated" messages and the program ends. The recovery combinator on the original Future is needed in order to ensure proper system shutdown even in case something went wrong; the flatMap and map combinators that the for expression gets turned into care only about the “happy path” and if the future failed with a timeout then no greeting would be extracted and nothing would happen.
This shows that there are aspects of Actor messaging that can be type-checked by the compiler, but this ability is not unlimited, there are bounds to what we can statically express. Before we go on with a more complex (and realistic) example we make a small detour to highlight some of the theory behind this.
A Little Bit of Theory
The Actor Model as defined by Hewitt, Bishop and Steiger in 1973 is a computational model that expresses exactly what it means for computation to be distributed. The processing units—Actors—can only communicate by exchanging messages and upon reception of a message an Actor can do the following three fundamental actions:
- send a finite number of messages to Actors it knows
- create a finite number of new Actors
- designate the behavior to be applied to the next message
The Akka Typed project expresses these actions using behaviors and addresses. Messages can be sent to an address and behind this façade there is a behavior that receives the message and acts upon it. The binding between address and behavior can change over time as per the third point above, but that is not visible on the outside.
With this preamble we can get to the unique property of this project, namely that it introduces static type checking to Actor interactions: addresses are parameterized and only messages that are of the specified type can be sent to them. The association between an address and its type parameter must be made when the address (and its Actor) is created. For this purpose each behavior is also parameterized with the type of messages it is able to process. Since the behavior can change behind the address façade, designating the next behavior is a constrained operation: the successor must handle the same type of messages as its predecessor. This is necessary in order to not invalidate the addresses that refer to this Actor.
What this enables is that whenever a message is sent to an Actor we can statically ensure that the type of the message is one that the Actor declares to handle—we can avoid the mistake of sending completely pointless messages. What we cannot statically ensure, though, is that the behavior behind the address will be in a given state when our message is received. The fundamental reason is that the association between address and behavior is a dynamic runtime property, the compiler cannot know it while it translates the source code.
This is the same as for normal Java objects with internal variables: when compiling the program we cannot know what their value will be, and if the result of a method call depends on those variables then the outcome is uncertain to a degree—we can only be certain that the returned value is of a given type.
We have seen above that the return type of an Actor command is described by the type of reply-to address that is contained within the message. This allows a conversation to be described in terms of its types: the reply will be of type A, but it might also contain an address of type B, which then allows the other Actor to continue the conversation by sending a message of type B to this new address. While we cannot statically express the “current” state of an Actor, we can express the current state of a protocol between two Actors, since that is just given by the last message type that was received or sent.
In the next section we demonstrate this on a more realistic example.
A More Complex Example
Consider an Actor that runs a chat room: client Actors may connect by sending a message that contains their screen name and then they can post messages. The chat room Actor will disseminate all posted messages to all currently connected client Actors. The protocol definition could look like the following:
sealed trait Command
final case class GetSession(screenName: String, replyTo: ActorRef[SessionEvent])
extends Command
sealed trait SessionEvent
final case class SessionGranted(handle: ActorRef[PostMessage]) extends SessionEvent
final case class SessionDenied(reason: String) extends SessionEvent
final case class MessagePosted(screenName: String, message: String) extends SessionEvent
final case class PostMessage(message: String)
Initially the client Actors only get access to an ActorRef[GetSession] which allows them to make the first step. Once a client’s session has been established it gets a SessionGranted message that contains a handle to unlock the next protocol step, posting messages. The PostMessage command will need to be sent to this particular address that represents the session that has been added to the chat room. The other aspect of a session is that the client has revealed its own address, via the replyTo argument, so that subsequent MessagePosted events can be sent to it.
This illustrates how Actors can express more than just the equivalent of method calls on Java objects. The declared message types and their contents describe a full protocol that can involve multiple Actors and that can evolve over multiple steps. The implementation of the chat room protocol would be as simple as the following:
private final case class PostSessionMessage(screenName: String, message: String)
extends Command
val behavior: Behavior[GetSession] =
ContextAware[Command] { ctx =>
var sessions = List.empty[ActorRef[SessionEvent]]
Static {
case GetSession(screenName, client) =>
sessions ::= client
val wrapper = ctx.spawnAdapter {
p: PostMessage => PostSessionMessage(screenName, p.message)
}
client ! SessionGranted(wrapper)
case PostSessionMessage(screenName, message) =>
val mp = MessagePosted(screenName, message)
sessions foreach (_ ! mp)
}
}.narrow // only expose GetSession to the outside
The core of this behavior is again static, the chat room itself does not change into something else when sessions are established, but we introduce a variable that tracks the opened sessions. When a new GetSession command comes in we add that client to the list and then we need to create the session’s ActorRef that will be used to post messages. In this case we want to create a very simple Actor that just repackages the PostMessage command into a PostSessionMessage command which also includes the screen name. Such a wrapper Actor can be created by using the spawnAdapter method on the ActorContext, so that we can then go on to reply to the client with the SessionGranted result.
The behavior that we declare here can handle both subtypes of Command. GetSession has been explained already and the PostSessionMessage commands coming from the wrapper Actors will trigger the dissemination of the contained chat room message to all connected clients. But we do not want to give the ability to send PostSessionMessage commands to arbitrary clients, we reserve that right to the wrappers we create—otherwise clients could pose as completely different screen names (imagine the GetSession protocol to include authentication information to further secure this). Therefore we narrow the behavior down to only accepting GetSession commands before exposing it to the world, hence the type of the behavior value is Behavior[GetSession] instead of Behavior[Command].
Narrowing the type of a behavior is always a safe operation since it only restricts what clients can do. If we were to widen the type then clients could send other messages that were not foreseen while writing the source code for the behavior.
If we did not care about securing the correspondence between a session and a screen name then we could change the protocol such that PostMessage is removed and all clients just get an ActorRef[PostSessionMessage] to send to. In this case no wrapper would be needed and we could just use ctx.self. The type-checks work out in that case because ActorRef[-T] is contravariant in its type parameter, meaning that we can use a ActorRef[Command] wherever an ActorRef[PostSessionMessage] is needed—this makes sense because the former simply speaks more languages than the latter. The opposite would be problematic, so passing an ActorRef[PostSessionMessage] where ActorRef[Command] is required will lead to a type error.
The final piece of this behavior definition is the ContextAware decorator that we use in order to obtain access to the ActorContext within the Static behavior definition. This decorator invokes the provided function when the first message is received and thereby creates the real behavior that will be used going forward—the decorator is discarded after it has done its job.
Trying it out
In order to see this chat room in action we need to write a client Actor that can use it:
import ChatRoom._
val gabbler: Behavior[SessionEvent] =
Total {
case SessionDenied(reason) =>
println(s"cannot start chat room session: $reason")
Stopped
case SessionGranted(handle) =>
handle ! PostMessage("Hello World!")
Same
case MessagePosted(screenName, message) =>
println(s"message has been posted by '$screenName': $message")
Stopped
}
From this behavior we can create an Actor that will accept a chat room session, post a message, wait to see it published, and then terminate. The last step requires the ability to change behavior, we need to transition from the normal running behavior into the terminated state. This is why this Actor uses a different behavior constructor named Total. This constructor takes as argument a function from the handled message type, in this case SessionEvent, to the next behavior. That next behavior must again be of the same type as we discussed in the theory section above. Here we either stay in the very same behavior or we terminate, and both of these cases are so common that there are special values Same and Stopped that can be used. The behavior is named “total” (as opposed to “partial”) because the declared function must handle all values of its input type. Since SessionEvent is a sealed trait the Scala compiler will warn us if we forget to handle one of the subtypes; in this case it reminded us that alternatively to SessionGranted we may also receive a SessionDenied event.
Now to try things out we must start both a chat room and a gabbler and of course we do this inside an Actor system. Since there can be only one guardian supervisor we could either start the chat room from the gabbler (which we don’t want—it complicates its logic) or the gabbler from the chat room (which is nonsensical) or we start both of them from a third Actor—our only sensible choice:
val main: Behavior[akka.NotUsed] =
Full {
case Sig(ctx, PreStart) =>
val chatRoom = ctx.spawn(ChatRoom.behavior, "chatroom")
val gabblerRef = ctx.spawn(gabbler, "gabbler")
ctx.watch(gabblerRef)
chatRoom ! GetSession("ol’ Gabbler", gabblerRef)
Same
case Sig(_, Terminated(ref)) =>
Stopped
}
val system = ActorSystem("ChatRoomDemo", main)
Await.result(system.whenTerminated, 1.second)
In good tradition we call the main Actor what it is, it directly corresponds to the main method in a traditional Java application. This Actor will perform its job on its own accord, we do not need to send messages from the outside, so we declare it to be of type NotUsed. Actors receive not only external messages, they also are notified of certain system events, so-called Signals. In order to get access to those we choose to implement this particular one using the Full behavior decorator. The name stems from the fact that within this we have full access to all aspects of the Actor. The provided function will be invoked for signals (wrapped in Sig) or user messages (wrapped in Msg) and the wrapper also contains a reference to the ActorContext.
This particular main Actor reacts to two signals: when it is started it will first receive the PreStart signal, upon which the chat room and the gabbler are created and the session between them is initiated, and when the gabbler is finished we will receive the Terminated event due to having called ctx.watch for it. This allows us to shut down the Actor system: when the main Actor terminates there is nothing more to do.
Therefore after creating the Actor system with the main Actor’s Props we just await its termination.
Status of this Project and Relation to Akka Actors
Akka Typed is the result of many years of research and previous attempts (including Typed Channels in the 2.2.x series) and it is on its way to stabilization, but maturing such a profound change to the core concept of Akka will take a long time. We expect that this module will stay experimental for multiple major releases of Akka and the plain akka.actor.Actor will not be deprecated or go away anytime soon.
Being a research project also entails that the reference documentation is not as detailed as it will be for a final version, please refer to the API documentation for greater depth and finer detail.
Main Differences
The most prominent difference is the removal of the sender() functionality. This turned out to be the Achilles heel of the Typed Channels project, it is the feature that makes its type signatures and macros too complex to be viable. The solution chosen in Akka Typed is to explicitly include the properly typed reply-to address in the message, which both burdens the user with this task but also places this aspect of protocol design where it belongs.
The other prominent difference is the removal of the Actor trait. In order to avoid closing over unstable references from different execution contexts (e.g. Future transformations) we turned all remaining methods that were on this trait into messages: the behavior receives the ActorContext as an argument during processing and the lifecycle hooks have been converted into Signals.
A side-effect of this is that behaviors can now be tested in isolation without having to be packaged into an Actor, tests can run fully synchronously without having to worry about timeouts and spurious failures. Another side-effect is that behaviors can nicely be composed and decorated, see the And, Or, Widened, ContextAware combinators; nothing about these is special or internal, new combinators can be written as external libraries or tailor-made for each project.
Contents


Description
In order to discover more about the the top-down vision of feminism we searched for the platforms used to gather informations about it and we found out that Youtube was the biggest platform used to treat the topic as it’s shown by the Hypertree.
The comparative visualization highlights the number of videos, the total number of views and the reactions of the most influential speakers sensitizing about feminism. We notice Emma Watson’s hegemony over the topic with the higher number of videos (19) and total viualizations (16.775K), followed by Oprah Winfrey’s videos, 11.649K views with just three videos, and Michelle Obama’s speeches with a total of 6.322K views for 9 videos. This shows that the resonance of each actor does not always corresponds to the number of videos. It was interesting to notice that, searching for “feminism speech”, two different videos of Milo Yiannopoulos, a British journalist known for his aversion to feminism, came up too.
The second visualization’s aim is to bring up the themes of the mainstream speeches about feminism. The dot plot is built by the number of words of text of the speeches from the Youtube’s “transcript” section. We divided the speeches into sections based on the treated topics, then we added the number of words represented by dots each dot is equivalent to 10 words, when the number wasn’t a multiple of ten it was rounded . By comparing the different speeches we can see how some themes are recurrent: for example each speech contains the section “sexual harassment”, “it’s a men’s problem too”, “experience”, “standing together”, and a final section of the “call to action”. Despite these similarities, a great number of original themes characterize each speech, meaning that feminism is facing a great variety of different problems.
Protocol
In order to find the speeches about feminism we searched on Youtube “sexual assault speech”, “sexism speech”, “feminist speech” and extracted the first 100 result per research cleaning the results considering just the speeches concerning the topic. For each video the name of the speaker was extracted and the number of visualizations of the same speaker were additioned. Then we considered only the speakers with more than 1 million views on the total of their views and visualized them by taking into consideration the total number of views and videos.
The stacked bar chart was obtained by extracting the transcription of the most viewed video of the top three speakers of feminism. We extracted it from the specific section of Youtube and divided it according to the themes treated and counting the number of words for each and the corrisponding timing of the video.


{% csrf_token %}
players separated by commas
friend pairs separated by commas and newlines
enemy pairs separated by commas and newlines


6 instantiations of JobStateEventArgs
System.Management.Automation (6)
engine\remoting\client\Job.cs (2)
934
stateChangedEventHandler(null, new
JobStateEventArgs
(this.JobStateInfo));
1439
StateChanged.SafeInvoke(this, new
JobStateEventArgs
(JobStateInfo.Clone(), previousState));
engine\remoting\client\Job2.cs (1)
727
ParentJobStateCalculation(new
JobStateEventArgs
(childJobStateInfo, new JobStateInfo(JobState.NotStarted)));
engine\remoting\commands\ReceiveJob.cs (1)
1520
JobStateEventArgs eventArgs = args ?? new
JobStateEventArgs
(job.JobStateInfo);
engine\remoting\commands\WaitJob.cs (1)
216
this.HandleJobStateChangedEvent(job, new
JobStateEventArgs
(job.JobStateInfo));
engine\serialization.cs (1)
7043
return new
JobStateEventArgs
(jobStateInfo, previousJobStateInfo);
23 references to JobStateEventArgs
System.Management.Automation (23)
engine\debugger\debugger.cs (1)
3506
private void HandleJobStateChanged(object sender,
JobStateEventArgs
args)
engine\hostifaces\LocalConnection.cs (1)
1341
private void HandleJobStateChanged(object sender,
JobStateEventArgs
eventArgs)
engine\remoting\client\Job.cs (5)
917
EventHandler<
JobStateEventArgs
> stateChangedEventHandler =
918
(object sender,
JobStateEventArgs
eventArgs) =>
1360
public event EventHandler<
JobStateEventArgs
> StateChanged;
2098
private void ChildJobStateChangedHandler(object sender,
JobStateEventArgs
eArgs)
2383
private void HandleChildJobStateChanged(object sender,
JobStateEventArgs
e)
engine\remoting\client\Job2.cs (4)
1721
private void HandleMyStateChanged(object sender,
JobStateEventArgs
e)
1777
private void HandleChildJobStateChanged(object sender,
JobStateEventArgs
e)
1782
private void ParentJobStateCalculation(
JobStateEventArgs
e)
1824
internal static bool ComputeJobStateFromChildJobStates(string traceClassName,
JobStateEventArgs
e,
engine\remoting\client\ThrottlingJob.cs (3)
683
private void childJob_StateChanged(object sender,
JobStateEventArgs
e)
1031
private void MonitoredJob_StateChanged(object sender,
JobStateEventArgs
e)
1042
private void ThrottlingJob_StateChanged(object sender,
JobStateEventArgs
e)
engine\remoting\commands\DebugJob.cs (1)
286
private void HandleJobStateChangedEvent(object sender,
JobStateEventArgs
stateChangedArgs)
engine\remoting\commands\InvokeCommandCommand.cs (1)
1453
private void HandleJobStateChanged(object sender,
JobStateEventArgs
e)
engine\remoting\commands\ReceiveJob.cs (4)
1102
private void HandleJobStateChanged(object sender,
JobStateEventArgs
e)
1503
private void WriteJobStateInformation(Job job,
JobStateEventArgs
args = null)
1520
JobStateEventArgs
eventArgs = args ?? new JobStateEventArgs(job.JobStateInfo);
1529
private void WriteJobStateInformationIfRequired(Job job,
JobStateEventArgs
args = null)
engine\remoting\commands\WaitJob.cs (1)
125
private void HandleJobStateChangedEvent(object source,
JobStateEventArgs
eventArgs)
engine\serialization.cs (2)
6646
s_converter.Add(typeof(
JobStateEventArgs
), RehydrateJobStateEventArgs);
7032
internal static
JobStateEventArgs
RehydrateJobStateEventArgs(PSObject pso)


Version 2.0.7 6/17 2012
Maintenance release with added features
- Based on not-yet released ĐTools 1.5.4.
- Fix: Multiple items in rating dropdown
- Remembering of exported data
- Fix of export of GPS Exif data
- Added culture selector for export
- Date/time and GPS Exif values are now exported in selected language and human-readable.


Home
Add new User
View All User
Dashboard | Admin
All Users
FirstName
LastName
Gender
Date of Birth
Date Created
Last Updated
36
total
Users


This page contains an index of all the families/ relationships in the database, sorted by their family name/ surname. Clicking on a person’s name will take you to their family/ relationship’s page.
| Letter |
Person |
Family |
Marriage |
Divorce |
|
B
|
Bubel, Mark
|
Family of Bubel, Mark and Thomas - Bubel, Ann Kathryn
|
|
|
|
H
|
Hajduk, Bartlomiej
|
Family of Hajduk, Bartlomiej and Trygar, Teresa
|
|
|
|
|
Hajduk, Pauline
|
Family of Hajduk, Thomas and Hajduk, Pauline
|
|
|
|
|
Hajduk, Thomas
|
Family of Hajduk, Thomas and Hajduk, Pauline
|
|
|
|
K
|
Kwasnieska, Stephen
|
Family of Kwasnieska, Stephen
|
|
|
|
M
|
Marcus, Lawrence
|
Family of Marcus, Lawrence and Thomas, Elizabeth Claire
|
|
|
|
|
Martinho, Isabella Jesus
|
Family of Reiger, Paul and Martinho, Isabella Jesus
|
|
|
|
N
|
Naber, Angela Pauline
|
Family of Naber, Raymond Edwin and Naber, Angela Pauline
|
|
|
|
|
Naber, Raymond Edwin
|
Family of Naber, Raymond Edwin and Naber, Angela Pauline
|
|
|
|
|
Naberezny, Andrew
|
Family of Naberezny, Andrew and Naberezny, Mary
|
|
|
|
|
Naberezny, John
|
Family of Naberezny, John and Naberezny, Mary
|
|
|
|
|
Naberezny, Mary
|
Family of Naberezny, John and Naberezny, Mary
|
|
|
|
|
Naberezny, Mary
|
Family of Naberezny, Andrew and Naberezny, Mary
|
|
|
|
R
|
Reiger, Arthur Cleveland
|
Family of Reiger, Arthur Cleveland
|
|
|
|
|
Reiger, Paul
|
Family of Reiger, Paul and Martinho, Isabella Jesus
|
|
|
|
S
|
Siuda, Frances
|
Family of Siuda, Francis and Siuda, Frances
|
|
|
|
|
Siuda, Francis
|
Family of Siuda, Francis and Siuda, Frances
|
|
|
|
T
|
Thomas - Bubel, Ann Kathryn
|
Family of Bubel, Mark and Thomas - Bubel, Ann Kathryn
|
|
|
|
|
Thomas, Daniel Patrick
|
Family of Thomas, Daniel Patrick and Thomas, Marian Joan
|
|
|
|
|
Thomas, Edward
|
Family of Thomas, Edward
|
|
|
|
|
Thomas, Elizabeth Claire
|
Family of Marcus, Lawrence and Thomas, Elizabeth Claire
|
|
|
|
|
Thomas, Joseph Edward
|
Family of Thomas, Joseph Edward and Thomas, Rebekah Leigh
|
|
|
|
|
Thomas, Lorraine Jean
|
Family of Thomas, Peter Sullivan and Thomas, Lorraine Jean
|
|
|
|
|
Thomas, Marian Joan
|
Family of Thomas, Daniel Patrick and Thomas, Marian Joan
|
|
|
|
|
Thomas, Mary Pauline
|
Family of Wysocki, Anthony and Thomas, Mary Pauline
|
|
|
|
|
Thomas, Peter Sullivan
|
Family of Thomas, Peter Sullivan and Thomas, Lorraine Jean
|
|
|
|
|
Thomas, Rebekah Leigh
|
Family of Thomas, Joseph Edward and Thomas, Rebekah Leigh
|
|
|
|
|
Trygar, Teresa
|
Family of Hajduk, Bartlomiej and Trygar, Teresa
|
|
|
|
W
|
Wolanski, Agatha
|
Family of Wolanski, Michal and Wolanski, Agatha
|
|
|
|
|
Wolanski, Michal
|
Family of Wolanski, Michal and Wolanski, Agatha
|
|
|
|
|
Wysocki, Anthony
|
Family of Wysocki, Anthony and Thomas, Mary Pauline
|
|
|


| Package | Description |
|---|---|
| ca.ualberta.cs.adapters | |
| ca.ualberta.cs.controllers | |
| ca.ualberta.cs.models | |
| ca.ualberta.cs.providers | |
| ca.ualberta.cs.views |
| Class and Description |
|---|
| CommentModel |
| PostModel |
| PostModelList |
| TopicModel |
| Class and Description |
|---|
| CommentModel |
| PostModel |
| PostModelList |
| TopicModel |
| Class and Description |
|---|
| ActiveUserModel |
| CommentModel |
| CommentModelList |
| EditPostModel |
| ElasticSearchMgetDoc |
| ElasticSearchMgetResponse |
| ElasticSearchOperation |
| ElasticSearchOperationRequest
Contains information relevant to making a request against the ElasticSearch
service
|
| ElasticSearchOperationResponse |
| ElasticSearchResponse |
| ElasticSearchSearchResponse |
| FavoriteCommentModelList |
| FavoriteTopicModelList |
| FollowingPostModelList |
| NetworkModel |
| PostModel |
| PostModelComparator |
| PostModelList |
| ReadLaterCommentModelList |
| ReadLaterTopicModelList |
| SelectedCommentModelList |
| SelectedPostModelList |
| SelectedTopicModelList |
| TopicModel |
| TopicModelList |
| UpdateableListInterface |
| UpdatePackage |
| UserModel |
| Class and Description |
|---|
| CommentModel |
| ElasticSearchOperationRequest
Contains information relevant to making a request against the ElasticSearch
service
|
| ElasticSearchOperationResponse |
| FollowingPostModelList |
| PostModelList |
| TopicModel |
| UpdatePackage |
| Class and Description |
|---|
| PostModel |


Comparator
The LogSeverity.Comparator
is used to compare LogSeverity
values.
-
Executes the function represented by the comparator using the specified
lVal
andrVal
arguments.Declaration
Swift
public func compare(lVal: LogSeverity, against rVal: LogSeverity) -> Bool
Parameters
lVal
The lefthand value for the comparison
rVal
The righthand value for the comparison
Return Value
The result of the comparison given the values
lVal
andrVal
. -
Represents a comparator whose
compare()
function will returntrue
when the value of thelVal
argument is as or less severe than that of therVal
argument.Declaration
Swift
case AsOrLessSevereThan
-
Represents a comparator whose
compare()
function will returntrue
when the value of thelVal
argument is less severe than that of therVal
argument.Declaration
Swift
case LessSevereThan
-
Represents a comparator whose
compare()
function will returntrue
when the value of thelVal
argument is more severe than that of therVal
argument.Declaration
Swift
case MoreSevereThan
-
Represents a comparator whose
compare()
function will returntrue
when the value of thelVal
argument is as or more severe than that of therVal
argument.Declaration
Swift
case AsOrMoreSevereThan
-
Represents a comparator whose
compare()
function will returntrue
when the value of thelVal
argument is equal to that of therVal
argument.Declaration
Swift
case EqualToSeverityOf


Course
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras sodales felis sit amet lobortis consequat. Aliquam vel consequat lectus, et dapibus ipsum.
When browsing courses, you now can quickly view trailers to get a quick look into what this course covers.
Course
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras sodales felis sit amet lobortis consequat. Aliquam vel consequat lectus, et dapibus ipsum.
When browsing courses, you now can quickly view trailers to get a quick look into what this course covers.
Course
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras sodales felis sit amet lobortis consequat. Aliquam vel consequat lectus, et dapibus ipsum.
When browsing courses, you now can quickly view trailers to get a quick look into what this course covers.
Course
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras sodales felis sit amet lobortis consequat. Aliquam vel consequat lectus, et dapibus ipsum.
When browsing courses, you now can quickly view trailers to get a quick look into what this course covers.


Welcome to theLab.ms. Please select a device to continue. Badger 1 FlashForge in Lobby Badger 2 FlashForge in Lobby Vinyl Cutter in Triangle Room If this page needs mantinence, please contact glNeo, Somo, or SBrunt.


Clone the GitHub Repository
First clone the GitHub repository from:
https://github.com/Project15Invictus/MicrosoftProject15_Invictus.git
DownloadData deployment
(Users can choose to view the deployment by finding Deployment of UrlToAzureStorage.pdf under the doc folder after the code is cloned).
Once the GitHub repository is cloned, navigate to the same folder of a file called UrlToAzureStorage.py. Add a .env file, inside this file write (AZURE_CONNECTION_STRING = "your_connection_string" AZURE_CONTAINER_NAME = "your_container_name"). Then users are set to use the code to download data from given urls to the azure blob storage.
Azure Function deployment
(Users can choose to view the deployment by finding Deployment of Azure Function.pdf under the doc folder after the code is cloned).
Open the EventGridTriggerAzureFunction folder, under it create a local.settings.json file. Inside the file, add credentials like this:
Right click on the folder (EventGridTriggerAzureFunction) and select Deploy to Function App. Select the same subscription as users' storage account -> Create new Function App in Azure (Advanced) -> enter a unique name for the azure function -> select Python 3.8 -> Select Consumption -> Select the resource group that has users' storage account -> Select the storage account -> Create new Application Insights resource
After deployment is finished. Go to Azure portal and find the azure function just created. Select Configuration under Settings. Add the application settings as local.settings.json to azure service. Create an Event Grid System Topic in Azure.
Find storage account, select Events -> +Event Subscription. Give a name of subscription, Event Schema as Event Grid Schema. Select storage account and the Event Grid System Topic created. Select Event Types as Blob Created. Select Endpoint Types as Azure Function, and select the Endpoint.
Then azure function is successfully deployed.
Use the exported CI/CD pipelines
Once the gitHub repository is cloned, the pwa can either be deployed from Visual Studio Code, or using our build and release pipelines exported as JSON. For both files, replace the occurrences of "YOUR-PROJECT-ID" with the id of your Azure DevOps your project id, and "YOUR-ACCOUNT-NAME" with the username of your Azure account. To use the pipelines, navigate to the Builds or Releases page in your Azure DevOps project.
Configure the build pipeline
For the build pipeline, navigate to Builds, choose +New and select the corresponding import pipeline option.
Select the FADAppCI.json file from pwa/FADapp/CICD_pipelines. After the import is complete, you will be shown the new pipeline that is created. Exporting a pipeline strips any project specific data like agent pools and service connections, thus this settings should be configured.
First, in order to connect to the GitHub repository, you need to authorize a service connection, by selecting it from the Authorized using connection: button under the "Get sources tab". Similarly, to create a new service connection, click on New Service Connection, as shown in the image below.
For the Agent pool, select "Azure Pipelines" and for the Agent Service, select the "windows 2019" machine.
For changing the API key of the Azure Maps account, go to the pipeline Variables tab, and change the value for "AzureMapsAPIKey" to your key value.
Now you can run the build pipeline as shown below.
Configure the release pipeline
For the release pipeline, navigate to Releases, choose +New and select the corresponding import pipeline option.
Select the FADAppCD.json file from pwa/FADapp/CICD_pipelines. After the import is complete, you will be shown the new pipeline that is created. To configure the deployment, click on the "Deploy FAD app" stage.
Similarly to the previous pipeline, the release needs configurations. More specifically, you will be prompted to select your Azure Subscription, and the name of the Azure App Service you want your app to be deployed to.
As for the build pipeline, for the Agent pool, select "Azure Pipelines" and for the Agent Service, select the "windows 2019" machine.


Sweet Free Stuff
///////////////////////////////////////////
Free Salonpas Pain Relieving Patch 2ct Sample
Posted: 27 Feb 2016 03:01 AM PST
http://feedproxy.google.com/&edburner&utm_medium=email
Free Salonpas Pain Relieving Patch 2ct Sample
The post Free Salonpas Pain Relieving Patch 2ct Sample appeared first on
SweetFreeStuff.com.
///////////////////////////////////////////
Free Mazie For Hawaii Bumper Stickers
Posted: 26 Feb 2016 11:13 PM PST
http://feedproxy.google.com/&edburner&utm_medium=email
Free Mazie For Hawaii Bumper Stickers
The post Free Mazie For Hawaii Bumper Stickers appeared first on
SweetFreeStuff.com.
///////////////////////////////////////////
Free Bronco Graveyard Decal
Posted: 26 Feb 2016 09:11 PM PST
http://feedproxy.google.com/&edburner&utm_medium=email
Add to cart and checkout. Free Bronco Graveyard Decal
The post Free Bronco Graveyard Decal appeared first on SweetFreeStuff.com.


bnlearn
contains several examples within the library that can be used to practice with the functionalities of bnlearn.structure_learning()
, bnlearn.parameter_learning()
and bnlearn.inference()
.
Start with RAW data
Lets demonstrate by example how to process your own dataset containing mixed variables. I will demonstrate this by the titanic case. This dataset contains both continues as well as categorical variables and can easily imported using bnlearn.bnlearn.import_example()
.
With the function bnlearn.bnlearn.df2onehot()
it can help to convert the mixed dataset towards a one-hot matrix. The settings are adjustable, but by default the unique non-zero values must be above 80% per variable, and the minimal number of samples must be at least 10 per variable.
import bnlearn as bn
# Load titanic dataset containing mixed variables
df_raw = bn.import_example(data='titanic')
# Pre-processing of the input dataset
dfhot, dfnum = bn.df2onehot(df_raw)
# Structure learning
DAG = bn.structure_learning.fit(dfnum)
# Plot
G = bn.plot(DAG)
From this point we can learn the parameters using the DAG and input dataframe.
# Parameter learning
model = bn.parameter_learning.fit(DAG, dfnum)
Finally, we can start making inferences. Note that the variable and evidence names should exactly match the input data (case sensitive).
# Print CPDs
CPDs = bn.print_CPD(model)
# Make inference
q = bn.inference.fit(model, variables=['Survived'], evidence={'Sex':0, 'Pclass':1})
print(q.df)
print(q._str())
Survived |
phi(Survived) |
|---|---|
Survived(0) |
0.3312 |
Survived(1) |
0.6688 |
Structure learning
A different, but quite straightforward approach to build a DAG from data is to identify independencies in the data set using hypothesis tests, such as chi2 test statistic. The p_value of the test, and a heuristic flag that indicates if the sample size was sufficient. The p_value is the probability of observing the computed chi2 statistic (or an even higher chi2 value), given the null hypothesis that X and Y are independent given Zs. This can be used to make independence judgements, at a given level of significance.
Example (1)
import bnlearn as bn
# Load dataframe
df = bn.import_example()
# Learn structure
model = bn.structure_learning.fit(df)
# adjacency matrix:
model['adjmat']
# print
print(model['adjmat'])
Reading the table from left to right we see that Cloudy is connected to Sprinkler and also to Rain in a directed manner. Sprinkler is connect to Wet_grass. Rain is connected to Wet_grass. Wet_grass is connected to nothing.
Cloudy |
Sprinkler |
Rain |
Wet_Grass |
|
|---|---|---|---|---|
Cloudy |
False |
True |
True |
False |
Sprinkler |
False |
False |
False |
True |
Rain |
False |
False |
False |
True |
Wet_Grass |
False |
False |
False |
False |
Example (2)
For this example, we will be investigating the sprinkler data set. This is a very simple data set with 4 variables and each variable can contain value [1] or [0]. The question we can ask: What are the relationships and dependencies across the variables? Note that his data set is already pre-processed and no missing values are present.
Let’s bring in our dataset.
import bnlearn as bn
df = bn.import_example()
df.head()
Cloudy |
Sprinkler |
Rain |
Wet_Grass |
|---|---|---|---|
0 |
1 |
0 |
1 |
1 |
1 |
1 |
1 |
1 |
0 |
1 |
1 |
… |
… |
… |
… |
0 |
0 |
0 |
0 |
1 |
0 |
0 |
0 |
1 |
0 |
1 |
1 |
From the bnlearn
library, we’ll need the fit
for this exercise:
import bnlearn as bn
model = bn.structure_learning.fit(df)
G = bn.plot(model)
We can specificy the method and scoring type. As described previously, some methods are more expensive to run then others. Make the decision on the number of variables, hardware in your machine, time you are willing to wait etc
Method types:
hillclimbsearch or hc (greedy local search if many more nodes are involved)
exhaustivesearch or ex (exhaustive search for very small networks)
constraintsearch or cs (Constraint-based Structure Learning by first identifing independencies in the data set using hypothesis test, chi2)
Scoring types:
bic
k2
bdeu
import bnlearn as bn
model_hc_bic = bn.structure_learning.fit(df, methodtype='hc', scoretype='bic')
model_hc_k2 = bn.structure_learning.fit(df, methodtype='hc', scoretype='k2')
model_hc_bdeu = bn.structure_learning.fit(df, methodtype='hc', scoretype='bdeu')
model_ex_bic = bn.structure_learning.fit(df, methodtype='ex', scoretype='bic')
model_ex_k2 = bn.structure_learning.fit(df, methodtype='ex', scoretype='k2')
model_ex_bdeu = bn.structure_learning.fit(df, methodtype='ex', scoretype='bdeu')
Example (3)
Lets learn the structure of a more complex data set and compare it to another one.
import bnlearn as bn
# Load asia DAG
model_true = bn.import_DAG('asia')
# plot ground truth
G = bn.plot(model_true)
# Sampling
df = bn.sampling(model_true, n=10000)
# Structure learning of sampled dataset
model_learned = bn.structure_learning.fit(df, methodtype='hc', scoretype='bic')
# Plot based on structure learning of sampled data
bn.plot(model_learned, pos=G['pos'])
# Compare networks and make plot
bn.compare_networks(model_true, model_learned, pos=G['pos'])
Parameter learning
Extracting adjacency matrix after Parameter learning:
import bnlearn as bn
# Load dataframe
df = bnlearn.import_example()
# Import DAG
DAG = bnlearn.import_DAG('sprinkler', CPD=False)
# Learn parameters
model = bnlearn.parameter_learning.fit(DAG, df)
# adjacency matrix:
model['adjmat']
# print
print(model['adjmat'])
Cloudy |
Sprinkler |
Rain |
Wet_Grass |
|
|---|---|---|---|---|
Cloudy |
False |
True |
True |
False |
Sprinkler |
False |
False |
False |
True |
Rain |
False |
False |
False |
True |
Wet_Grass |
False |
False |
False |
False |
Create a Bayesian Network, learn its parameters from data and perform the inference
Lets make an example were we have data with many measurements, and we have expert information of the relations between nodes. Our goal is to create DAG on the expert knowledge and learn the CPDs. To showcase this, I will use the sprinkler example.
Import example dataset of the sprinkler dataset.
import bnlearn as bn
df = bn.import_example('sprinkler')
print(tabulate(df.head(), tablefmt="grid", headers="keys"))
Cloudy |
Sprinkler |
Rain |
Wet_Grass |
|
|---|---|---|---|---|
0 |
0 |
0 |
0 |
0 |
1 |
1 |
0 |
1 |
1 |
2 |
0 |
1 |
0 |
1 |
3 |
1 |
1 |
1 |
1 |
4 |
1 |
1 |
1 |
1 |
… |
… |
… |
… |
Define the network structure. This can be based on expert knowledge.
edges = [('Cloudy', 'Sprinkler'),
('Cloudy', 'Rain'),
('Sprinkler', 'Wet_Grass'),
('Rain', 'Wet_Grass')]
Make the actual Bayesian DAG
import bnlearn as bn
DAG = bn.make_DAG(edges)
# [BNLEARN] Bayesian DAG created.
# Print the CPDs
CPDs = bn.print_CPD(DAG)
# [BNLEARN.print_CPD] No CPDs to print. Use bnlearn.plot(DAG) to make a plot.
Plot the DAG
bnlearn.plot(DAG)
Parameter learning on the user-defined DAG and input data using maximumlikelihood.
DAG = bn.parameter_learning.fit(DAG, df, methodtype='maximumlikelihood')
Lets print the learned CPDs:
CPDs = bn.print_CPD(DAG)
# [BNLEARN.print_CPD] Independencies:
# (Cloudy _|_ Wet_Grass | Rain, Sprinkler)
# (Sprinkler _|_ Rain | Cloudy)
# (Rain _|_ Sprinkler | Cloudy)
# (Wet_Grass _|_ Cloudy | Rain, Sprinkler)
# [BNLEARN.print_CPD] Nodes: ['Cloudy', 'Sprinkler', 'Rain', 'Wet_Grass']
# [BNLEARN.print_CPD] Edges: [('Cloudy', 'Sprinkler'), ('Cloudy', 'Rain'), ('Sprinkler', 'Wet_Grass'), ('Rain', 'Wet_Grass')]
- CPD of Cloudy:
Cloudy(0)
0.494
Cloudy(1)
0.506
- CPD of Sprinkler:
Cloudy
Cloudy(0)
Cloudy(1)
Sprinkler(0)
0.4807692307692308
0.7075098814229249
Sprinkler(1)
0.5192307692307693
0.2924901185770751
- CPD of Rain:
Cloudy
Cloudy(0)
Cloudy(1)
Rain(0)
0.6518218623481782
0.33695652173913043
Rain(1)
0.3481781376518219
0.6630434782608695
- CPD of Wet_Grass:
Rain
Rain(0)
Rain(0)
Rain(1)
Rain(1)
Sprinkler
Sprinkler(0)
Sprinkler(1)
Sprinkler(0)
Sprinkler(1)
Wet_Grass(0)
0.7553816046966731
0.33755274261603374
0.25588235294117645
0.37910447761194027
Wet_Grass(1)
0.2446183953033268
0.6624472573839663
0.7441176470588236
0.6208955223880597
Lets make an inference:
q1 = bn.inference.fit(DAG, variables=['Wet_Grass'], evidence={'Rain':1, 'Sprinkler':0, 'Cloudy':1})
+--------------+------------------+
| Wet_Grass | phi(Wet_Grass) |
+==============+==================+
| Wet_Grass(0) | 0.2559 |
+--------------+------------------+
| Wet_Grass(1) | 0.7441 |
+--------------+------------------+
Print the values:
print(q1.df)
# array([0.25588235, 0.74411765])