Chapter 2 Conditional Probability and Bayes’ Rule
Let’s recall some probability concepts.
- Probability is the quantification of uncertainty. For instance in a coin toss, \(P(H) = 1/2\).
- Set of the union of all possible events is the sample space. For instance single coin toss sample space is \(S = \{H,T\}\).
- Probability of an event is actually the relative “size” of the event to the sample space.
- In an experiment, that has equally likely outcomes, number of potential outcomes in an event relative to the total number of outcomes in the sample space corresponds to the probability of that event.
- Some events are mutually exclusive and some events are dependent.
- Sample space is not always easy to measure and is not always finite. Counting is one way of estimating a sample space (especially discrete ones).
- Estimation of probability of events is not always easy. One way to estimate is to repeat the experiment for a number of times. As we increase the number of repetitions, the probability will become more stable. For instance suppose we don’t know the probability of getting (H)eads in a coin toss and we repeat coin tossing for a number of times.
set.seed(231)
coin_toss_probability<-function(repetitions){
experiment<-sample(c("H","T"),size=repetitions,replace=TRUE)
return(round(sum(experiment=="H")/repetitions,4))
}
#Do the experiment with increasing repetitions
coin_toss_probability(repetitions=10)
## [1] 0.6
## [1] 0.57
## [1] 0.505
## [1] 0.4989
2.1 Some Examples
In a sports bar, there are 10 football fans, 15 basketball fans, 12 tennis fans and 6 curling fans. Suppose there is a single TV and there are matches of football, basketball, tennis and curling at the same time. If the TV remote is handed to one of them randomly, what is the probability that curling will be the show on TV?
Answer: There are a total of 43 fans in the sports bar and 6 curling fans. P(Curling) = 6/43.
Suppose there is a group of 20 people; 10 from Ankara, 10 from Istanbul. Suppose we randomly choose 5 people from that group.
What is the probability that all of this subgroup is from Ankara?
Answer: (# of combinations including people only from Ankara) / (# of total combinations)
\[\dfrac{\binom{10}{5}}{\binom{20}{5}} = 0.01625387\]
Alternative answer is: \((10/20)*(9/19)\dots * (6/16) = 0.01625387\).
What is the probability that at least two from Ankara and at least two from Istanbul?
Answer: P(Ankara = 2, Istanbul = 3 OR Ankara = 3, Istanbul = 2) = (P(Ankara = 2, Istanbul = 3) + P(Ankara = 3, Istanbul = 2)) = ((# of comb. Ank 2, Ist 3) + (# of comb. Ank 3, Ist 2))/(# of total combinations)
\[\dfrac{\binom{10}{2}*\binom{10}{3} + \binom{10}{3}*\binom{10}{2}}{\binom{20}{5}} = 0.6965944\]
(“Blackjack”) Suppose you are drawing two cards from the deck. Assume all number rank cards (2-10) are points, Ace (A) is 11 points and (J)ack, (Q)ueen and (K)ing are 10 points. What is the probability that total points of these two cards exceed 20.
Answer: Max score for two cards is 22 (two Aces). To exceed 20, one needs Ace-9 pairs or any pair of 10-Ace-J-Q-K cards. We know that there are 4 of each rank. So \(P(Score \ge 20) = P(A and 9) + P(any\ two\ of\ 10-Ace-J-Q-K)\). We know that total number of hands is \(\binom{52}{2} = 1326\). So # of combinations with either A-9 or 9-A is \(4*4 = 16\). # of combinations of getting two cards from 10-Ace-J-Q-K ranks is \(\binom{20}{2} = 190\). So \(P(Score \ge 20) = \dfrac{190 + 16}{1326} = 0.1553544\)
Alternative answer: \(P(A-9 or 9-A) = 4/52*4/51 + 4/52*4/51 = 0.01206637\) and \(P(any two of 10-Ace-J-Q-K) = 20/52 * 19/51 = 0.1432881\). Total probability is \(P(Score \ge 20) = 0.01206637 + 0.1432881 = 0.1553545\)
Suppose you are the gatekeeper of a playing ground for 10 year old boys and try to assess their age by their height. Height of 90% of boys aged 10 falls between 130 and 150 cms. It is equally likely that a boy aged 10 has the height lower than 130 cm or higher than 150 cm. What is the probability of rejecting a child because he’s too long?
Answer: \(P(130 \le X \le 150) = 0.9\) and \(P(X \le 130) = P(X \ge 150)\). So \(P(X \ge 150) = 1 - P(130 \le X \le 150) - P(X \le 130)\). \(2.P(X \ge 150) = 0.1\) and \(P(X \ge 150) = 0.05\).
2.2 Conditional Probability
Definition: \(P(A|B)\) means that probability of event A given that event B already occured or probability of A conditional on B.
Example: What is the probability of getting two heads (HH) if we know that the first coin is H? (1/2)
Example: Suppose we are rolling two dice.
What is the probability of getting the sum equal to 8?
\(P(Sum = 8) = P(D_1 = 2, D_2 = 6) + P({3,5}) + P({4,4})*2 + P({5,3}) + P({6,2}) = 6/36 = 1/6\)
What is the probability of getting the sum more than or equal to 8 given the first roll is 3?
\(P(Sum \ge 8 | D_1 = 3) = P({3,5}) + P({3,6}) = 2/6 = 1/3\)
Conditional probability of event A given B, can be defined as \(P(A|B)=\dfrac{P(A \cap B)}{P(B)}\) if \(P(B) > 0\).
Example: We asked 1000 people, 400 men and 600 women: ‘Where do you want to visit this summer? Amsterdam or London?’. The answers are as follows.
## Amsterdam London
## Men 150 250
## Women 450 150
What is the probability of a randomly chosen person is a woman?
Answer: \(P(W) = (n(W|L) + n(W|P))/n(S) = (150 + 450)/1000 = 0.6\)
What is the probability of a randomly chosen person chooses to to visit Amsterdam?
Answer: \(P(A) = (n(A|W) + n(A|M))/n(S) = (450 + 150)/1000 = 0.6\)
What is the probability of a London visitor is a man?
Answer: \(P(M|L) = \dfrac{P(M\cap L)}{P(L)} = \dfrac{n(M\cap L)/n(S)}{n(L)/n(S)} = 250/400 = 0.625\)
2.3 Independence
Two events can be independent. It means \(P(A|B) = P(A)\) or \(P(B|A) = P(B)\).
If the events (\(A_i\)) are independent then \(P(A_1 \cap A_2 \dots A_k) = P(A_1)P(A_2)\dots P(A_k)\).
 What is the probability that, at the 6th time, the die will get 4 again?
Solution: Die rolls are independent events. So outcome of a roll does not affect the outcome of the other rolls. It is 1/6.
2.4 Product rule
If both \(P(A)>0\) and \(P(B)>0\), then \(P(A\cap B) = P(A)P(B|A)\). We can also say \(P(A\cap B) = P(B\cap A) = P(B)P(A|B)\)
Example: You draw two cards from a deck. What is the probability that you get two (A)ces?
Solution: \(P(A \cap B) = 4/52 * 3/52 = 0.00443787\)
Example: You are at a tea shop. There are 10 (W)hite teas, 12 (B)lack teas and 8 (G)reen teas on the menu. According to the waiter all teas are equally tasty. You ask the waiter bring a tea but it should not be green tea. What is the probability that you will get a white tea?
Solution: \(P(W|G^{\prime}) = P(W \cap G^{\prime})/P(G^{\prime}) = P(W) / P(G^{\prime}) = \dfrac{10/30}{22/30} = 10/22\)
2.5 Bayes’ Rule
Theorem of total probability: Given the events \(B_i\) are collective parts of the sample space and \(P(B_i) > 0\), then for any event \(A\), \(P(A) > 0\)
\[P(A) = \sum_i^k P(B_i \cap A) = \sum_i^k P(B_i)P(A|B_i)\]
Bayes’rule: Given the events \(B_i\) are collective parts of the sample space and \(P(B_i) > 0\), then for any event \(A\), \(P(A) > 0\)
\[P(B_r|A) = \dfrac{P(B_r|A)}{\sum_i^k P(B_i \cap A)} = \dfrac{P(B_r)P(A|B_r)}{\sum_i^k P(B_i)P(A|B_i)}\]
Example 2.41 from the book: In an assembly plant, there are three machines \(B_1\), \(B_2\) and \(B_3\). These machines make the 30%, 45% and 25% of the products. 2%, 3% and 2% of their output is known to be defective. So, what is the probability of getting a defective product at a random time?
Solution:
Say, event of getting a defective item is A and we want to know \(P(A)\). \(P(B_i)\) is the probability of a product being manufactured by machine \(i\). \(P(B_1) = 0.3\), \(P(B_2) = 0.45\), \(P(B_3) = 0.25\). The defect probabilities given the machine are \(P(A|B_1) = 0.02\), \(P(A|B_1) = 0.03\), \(P(A|B_1) = 0.02\).
So, \(P(A) = \sum_{i=1}^3 P(B_i)P(A|B_i) = 0.3*0.02 + 0.45*0.03 + 0.25*0.02 = 0.0245\).
Example 2.42: If the product is defective, what is the probability that it came from machine 3?
\[P(B_3|A) = \dfrac{P(B_3 \cap A)}{\sum_{i=1}^3 P(B_i)P(A|B_i)} = \dfrac{P(B_3)P(A|B_3)}{\sum_{i=1}^3 P(B_i)P(A|B_i)} = \dfrac{0.25 * 0.02}{0.0245} = 10/49\]


Privacy and Logging Policy
TL;DR - we only have one bit of data about you (which we don't keep for long*)
Your trust is critical to us and we understand that earning and keeping your trust is a daily endevor. We commit to discussing any changes to this privacy policy with you, our user community.
If you have ANY questions about our privacy and logging policies, please contact us through the channels mentioned in the Contact page.
To verify that our DNS servers return the same results as a better known DNS server such as Google's DNS server, run the following code on the command line on a Mac or a Linux machine.
For Windows, follow these instructions from Microsoft
First, let us make sure our server recognizes your IP by clicking the Try Now button below. Clicking the button does not make any changes on your network, device, or computer. We clear the list of recognized IPs at 12:01 AM Eastern on the 1st of every month.
$host citibank.com <IP_ADDRESS> (# Results in ...)
Using domain server:
Name: <IP_ADDRESS>
Address: <IP_ADDRESS>#53
Aliases:
citibank.com has address <IP_ADDRESS>
citibank.com has address <IP_ADDRESS>
citibank.com mail is handled by 5 mx-a.mail.citi.com.
citibank.com mail is handled by 5 mx-b.mail.citi.com.
AND
$host citibank.com <IP_ADDRESS> (# Results in ...)
Using domain server:
Name: <IP_ADDRESS>
Address: <IP_ADDRESS>#53
Aliases:
citibank.com has address <IP_ADDRESS>
citibank.com has address <IP_ADDRESS>
citibank.com mail is handled by 5 mx-a.mail.citi.com.
citibank.com mail is handled by 5 mx-b.mail.citi.com.
Notice that the results are the same as they should be.
Replace citibank.com with any other URL to verify other results
All product names, logos, and brand names are property of their respective owners. Use of these names, logos, and brands does not imply endorsement
We are not affiliated to, compensated by, or endorsed by DNS Override™ or DNS Changer™. All registered trademarks belong to their owners
Backend license and source code
Ooops!1!!
We are not ready to accept log files yet. Sign up for our Mailing List - you'll be the first to know when we are ready!


--- extends: base.j2 title: 404 - Page not found description: 404 - Page not found --- {% block main %}
Sorry, the page you were looking for doesn't exist. Head back home to try again.


Gym Buddy
menu
logout
arrow_back
Home
fitness_center
Logout
eject
login
sign up
First Name
Last Name
username
email
Password
8-16 characters long
Confirm Password
username
Password
8-16 characters
editProfile
Add New Routine
add
chevron_left
create
clear
arrow_downward
Add Exercise
Title
Type
Weight
Sets
Reps
Duration (mins)
Cardio
Distance


Filevine Tech Talk
May 25th, 2023
Docker is a tool that allows developers to package their applications into containers.
A container is a standard unit of software that packages up code and all its dependencies so the application runs reliably from one computing environment to another.
A layer is a read-only file along with metadata that is stacked on top of another. When you make a change to a file or metadata, a new layer is created (copy-on-write).
OCI layers follow the OCI specification for storing and identifying layers and images.
https://github.com/opencontainers/image-spec/blob/main/spec.md
If it's been done before, do it no more
Demo


Enq. Mec
tA it
MODAL ANALYSIS AND CONTROL OF FLEXIBLE MANIPULATOR ARMS by
Nctavio Maizza Neto
., Escola Politécnica da U. S. P., S80 Paulo, Rrazil
(1968)
.S.M.E., Massachusetts Institute of Technology
(1973)
Mech. E., Massachusetts Institute of Technology
(1973)
SUBMITTED IN PARTIAL FULFILLMENT OF THE REQUIREMENTS FOR THE DEGREE OF DOCTOR OF PHILOSOPHY
at the
MASSACHUSETTS INSTITUTE OF TECHNOLOGY
September, 1974 . — ao dike Fo Fob Fk te peu
Signature Of Author. 2... 00 ee fe Milo Fe cn cen e cence nea nee teens reeueecens
Certified Dy... cee ee ee eee WT been w canes Meee eon scans ccnsncasnccee
Accepted by
ane nero eee seaosene en eee ee ere eo este ese re eam eee reerceem ene eeoeeeeoceses
Chairman, vepartmental Committee on Graduate Students
a Beads thal FRY TEN,
MAR 3 19753 Lenawee!


Direction and Atmospheric Weather (DAW)
This is main page which displays weather and directions of two cities
Get Direction
Home
Searching the forecasts for: {{zipcode}}
Forecast For {{ place.location.city }}
Current: {{ place.item.condition.temp }}F
Forecast For {{ place.location.city }}
Current:{{ place.item.condition.temp }}F


Kyle sent out this amazing tool for testing and debugging at the HTTP level. This would've been a lifesaver a few weeks ago when I was working on RESTful API stuff for work, but better late than never.
The idea of the app is amazingly simple. It lets you specify the type of http request you want to make, the header options, and the body. The beauty of doing it in a GUI instead of from the command line with curl is that there are dropdowns for the hard to remember header options, and that you can paste fat hunks of XML into the body field. It's also awesome because you can open multiple windows and have each of those be a re-runnable http client.
HTTP Client is 99% perfect app for my uses. The single feature that would push it to being a perfect app would be a cookie-jar so that sessions can be saved.


ObsEva IVF nolasiban drug flops in key European trial
ZURICH (Reuters) - Swiss-listed drugmaker ObsEva said on Thursday it is abandoning the current program for its drug prospect nolasiban after the agent aimed at boosting pregnancy following in-vitro fertilization (IVF) failed a late-stage study in Europe.
Nolasiban did not meet the primary endpoint of an increase in ongoing pregnancy at 10 weeks, with 39.1% of women who got the placebo experiencing an ongoing pregnancy, compared with 40.5% of women who got nolasiban, the company said in a statement.
This proposed use of nolasiban, an oral oxytocin receptor antagonist licensed from Merck KGaA to help women getting IVF therapy, had been a central part of ObsEva’s plans. The trial failure leaves the company with drug candidates for endometriosis and potentially dangerous pre-term labor.
“We are extremely disappointed with these unexpected results, not in the least for the millions of women hoping to have a baby through IVF,” said Ernest Loumaye, a gynaecologist and former Serono drug developer who founded ObsEva.
“We have decided to discontinue the current nolasiban IVF program and will explore potential repositioning of the product candidate.”
ObsEva added a share listing in Switzerland last year, in addition to trading on the Nasdaq in the United States starting in 2017. The shares are down 36% this year.


Sparky Jr.
Menu
Sparky Jr.
Welcome
Getting Started
Arduino
Structure
Configurating
Uploading
Arduino
Download IDE
Processing
Download IDE
Welcome
hi
Getting Started
Arduino
Structure
Configurating
Uploading


Hi! I'm Laura K. Smith
Cartographer & Icon Enthusiast
Hi! I'm Laura and I am a cartographer. While creating maps I have often found myself creating custom icons to give my projects a cohesive look. Visit my portfolio if you want to see the ways some of these icons have been utilized!
Many of my icons are centered around topics I work on often. This is why you'll see a large selection of botanic and emergency managment icons in my portfolio.


These are the publicly facing forms and documents related to the Meadowside HOA. If you are looking for a form that is not here, you can try looking for it in NextDoor or contact us.
These are the publicly facing forms and documents related to the Meadowside HOA. If you are looking for a form that is not here, you can try looking for it in NextDoor or contact us.


Environmental campaigners call for end to overfishing
by Maggie Doyle, https://www.facebook.com/rtenews/Campaigners from Extinction Rebellion and the Irish Wildlife Trust have gathered at the gates of Leinster House calling for an end to overfishing.
With two "mermaids" listing out the fish stocks that have depleted in Ireland's waters, they led a chant of "hey hey, ho ho, overfishing has to go".
Campaigners say the Government has failed to ensure sustainable fishing levels and that the inaction will lead to significant cuts in quotas.
They said the closure of fisheries must be considered in order to meet the EU's 2020 deadline to end overfishing.
The campaigners say Minister for Agriculture Michael Creed must start making difficult decisions to rebuild stocks, instead of fighting to maintain the status quo.
They said they hope he takes on board what they have called for today ahead of next week's EU Agriculture and Fisheries Council.
Pádraic Fogarty from the Irish Wildlife Trust said the fishing industry should not be concerned about losing business because if there was an end to over fishing, there would be more fish in the sea.
He described the situation as dire and said "we are looking at the total collapse of the ocean eco-system from over exploitation of fish and marine life as well as climate change and pollution".
Mr Fogarty said the prime responsibility for this was with the Minister and the Government and it was not fair for consumers to decide in supermarkets whether produce was ethical or contributing to the collapse of the oceans.


--- layout: page title: About header-img: "img/about-bg.png" ---
After many years in software development, primarily working with high performance databases and real-time market data, I'm finally adding web technologies to my toolbox.


Jamestown High School
"TODO" -Ms. McDowel
Many kids find, when they are younger, that they learn math best from games found across the internet, but as they get older the focus of their learning moves away from the games, into worksheets and lectures. They then learn to associated these things with work not fun and have trouble understanding the concepts without good graphical representations of them. The games we create focus on high school kids to provide them a fun and interactive way to learn the complex concepts taught in high school math classes.
We began when our high school math teacher, Jonathan Upperman, inspired Brandon Rozek to create new games for high school math classes. He started working on what is now Darts, but he realized that he could not finish the game on his own, so he asked David Thames to help him on the project. Over the following months, they continued to search for more coders to recruit. By the next year they had gained eight other people and were quickly and efficiently developing more games to prepare for their December release.
We are a small, but quicly expanding, group of programmers, designers, and mathmeticians that develop fun, educational games. These games give students a deeper understanding of topics by visualizing them through the game's graphics and interactive elements.
Co-Founder
Co-Founder
Worked together with Brandon to create Math I/O. He is also the webmaster and a lead programmer
Co-Founder
Co-Founder
Started Math I/O. He is also a lead programmer in the development of new games.
Lead Programmer
Lead Programmer
Joined the Math I/O team shortly after it began and continues to lead the development of new games.
Programmer
Programmer
Joined the Math I/O team shortly after it began and continues to develop new games.
Game Developer
Game Developer
Creates and develops new ideas for Games and helps program them.
Programmer
Programmer
Plays a major part in the development of new Games.
Lead Programmer
Lead Programmer
Lead progammer on the development of new games.
Physicist
Physicist
Assists with the physics of games and helps to develop them.
Graphics Designer
Graphic Designer
Photography and Graphic Design.
Jamestown High School
"TODO" -Ms. McDowel
School
"TODO" -Teacher
Williamsburg Yorktown Daily | Get Schooled: Jamestown High Math Students Program Video Games to Teach Math Skills
"A group of Jamestown High students are helping their peers strengthen their mathematics skills, but instead of using flash cards and worksheets, they use computer games..." -Ian Bricky


As a student, I want to create an About Me page as a demonstration of my skills with HTML, CSS, and JAVASCRIPT
Work Experiences:
- Veteran's Affairs Dentistry 2013
- Apex Dental Care 2014-2017
- University of Washington DECOD Dental Clinic 2016-2017
- Odessa Brown Dental Clinic 2016-2017
- Neighborcare Dental Clinic 2016-2017
- Modern Ballard Dentistry 2017-2018
- Puget Sound Periodontics 2018-Current
Top Ten Favorite Movies:
- All Marvel Movies!
- Avatar 2009
- Inception
- All Harry Potter Series
- All X-Men Movies
- All Rush Hour Movies
- All Bourne Movies
- All 007 Movies
- All Star Wars Movies
- Jumper


| Method | Currencies | Min-Max Deposit | Min-Max Withdrawal | Processing Time* |
| USD GBP EUR AUD | 10 - 10,000 | 10 - 10,000 | Deposit: Instant Withdraw: 1 working day |
|
| USD GBP EUR AUD | 10 - 10,000 | 10 - 10,000 | Deposit: Instant Withdraw: 1 working day |
| Method | Currencies | Min-Max Deposit | Min-Max Withdrawal | Processing Time* |
| USD GBP EUR AUD | 5 - 10,000 | 5 - 10,000 | Deposit: Instant Withdraw: 1 working day |
|
| USD GBP EUR AUD | 5 - 10,000 | 5 - 10,000 | Deposit: Instant Withdraw: 1 working day |
|
| USD GBP EUR AUD | 5 - 10,000 | 5 - 10,000 | Deposit: Instant Withdraw: 1 working day |
*All your deposits and withdrawals are processed by ChampionFX within 24 hours. However, there may be additional processing time required by your bank or money transfer service.


We have all the documents necessary to service your shipping needs, from start to finish.
At Summit Logistics Group we pride ourselves on offering rates that are not generally obtainable directly to shippers.
Quickly complete our online bill of lading form and submit to us instantly, without the need to print or fax anything.


Provides a threads-type programming environment for R. The package gives the R programmer the clearer, more concise shared memory world view, and in some cases gives superior performance as well. In addition, it enables parallel processing on very large, out-of-core matrices.
| Version: | 2.1.1 |
| Imports: | bigmemory (≥ 4.0.0), parallel |
| Suggests: | synchronicity |
| OS_type: | unix |
| Published: | 2014-10-08 |
| Author: | Norm Matloff |
| Maintainer: | Norm Matloff <normmatloff at gmail.com> |
| License: | GPL-2 | GPL-3 [expanded from: GPL (≥ 2)] |
| NeedsCompilation: | no |
| In views: | HighPerformanceComputing |
| CRAN checks: | Rdsm results |
| Reference manual: | Rdsm.pdf |
| Package source: | Rdsm_2.1.1.tar.gz |
| Windows binaries: | r-devel: not available, r-release: not available, r-oldrel: not available |
| OS X binaries: | r-release: Rdsm_2.1.1.tgz, r-oldrel: Rdsm_2.1.1.tgz |
| Old sources: | Rdsm archive |
Please use the canonical form https://CRAN.R-project.org/package=Rdsm to link to this page.


Python Documentation¶
:phrase:`Application Program Interface` (:abbrev:`API`) documentation is absolutely essential. The easiest and most reliable way to produce this documentation is by using a tool that examines the source itself and develops the document directly from the programs. By using cleverly formatted Python docstrings, we can augment that analysis with easy-to-understand descriptions.
In the case of Python, there are several tools for extracting documentation from the source. The most popular one is :application:`Sphinx` http://sphinx.pocoo.org/.
We can use some others, also:
:application:`pydoc` This is part of Python. It doesn’t cope well with files in UTF-8 encoding. You need to include the following comment in any files that have Unicode characters.
# -*- coding: utf-8 -*-
In Documentation Development we’ll look at how we can use Sphinx to create complete, accurate, and nice-looking documentation for our applicaiton.
In Using Sphinx we’ll look at a aspects of using Sphinx. In Using Epydoc we’ll look at how we can use epydoc to create documentation.
In order to use either tool, we’ll need to write using ReStructuredText (:abbrev:`RST`.) In Basic RST Markup we’ll look at the foundations of using RST.
In Interpreted Text, or Inline Markup we’ll look at inline markup that produces things like emphasis and strong text.
We’ll look at how we can provide details of function arguments and return values in RST Field Markup. This is primarily focused on Sphinx.
We’ll look at more complex RST markup in Directives
In Standard Paragraphs we’ll look at boilerplate like “see also”, and “warning” sections that are often marked with special icons aor distinctive layout.
We’ll show a large example in Class Example.
Documentation Development¶
Generally, the workflow has the following outline.
Develop the skeleton class.
Develop unit tests for most features.
Rework the class until it passes the unit tests. This may involve adding or modifying tests as we understand the class better. This also involves writing docstrings for modules, classes and methods.
Revisit the modules, classes and methods, finishing each description using the ReStructured Text (:abbrev:`RST`) markup language. We won’t cover all of this language, just enough to provide a sense of how the tool is used to make clean, professional API documentation.
Run the documentation tool (i.e. sphinx-build) to create the documentation. Fix any errors in your docstring markup. Also, rework the documentation as necessary to be sure that you’ve capture important information about the class, the methods, the design decisions.
Using Sphinx¶
When you install Sphinx, it creates a script that you can use.
Generally, you’ll run the $ sphinx-quickstart script to create an empty documentation directory.
$ sphinx-quickstart
This interactive script will ask a number of questions, allowing you to pick sensible directories and file names.
You’ll need to include two extensions to enable Sphinx to create your API documentation.
autodoc
will create module documents based on the RST markup in the docstrings.autosummary
will create summaries of packages and modules.
You’ll then add content to your index.rst
file. This file is the root for
the documentation. It can be very simple, or or it can do include other files
to break a large document into manageable pieces.
The most important commands are the following.
To run Sphinx, you’ll use a command similar to the following.
$ sphinx-build -b html sourcedir builddir
Using Epydoc¶
When you install Epydoc, it creates a script that you can use. To run Epydoc, you’ll use a command similar to the following.
epydoc -v --docformat restructuredtext --output apidoc blackjack.py
The -v
option provides detailed debugging information for
incorrectly formatted docstrings. The --docformat
option
specifies that the various docstrings use RST markup. The --output
option defines the
directory to which the documentation is written. The arguments (in this case,
blackjack.py
) is a list of package directories or module files
to be documented.
Note that RST is not the default markup language for Epydoc. You must either
specify this on the command line or in the module source.
To identify the formatting in each module you must provide the
format as the value of a __docformat__
module global variable.
#!/usr/bin/env python
"""
Some docstring for a module.
"""
__docformat__ = "restructuredtext en"
Basic RST Markup¶
We write our module, class and method docstrings using the RST markup language. RST is one of many :firstterm:`structured text` markup languages, where simple indentation and formatting rules are used to interpret your documetation. These formatting rules help the tools deduces the structure of your document (sections, list, etc.) and the presentation (bold, italic, or font changes.) These rules are – generally – pretty simple rules that plain text documents have been using since documents were first stored on computers.
Fundamentally, the RST formatting rules are implemented by a module named :application:`docutils`. For additional documentation on RST, see the Sphinx web site (http://sphinx.pocoo.org) and the Docutils web site (http://docutils.sourceforge.net/).
In addition to document structure, deduced from the layout, RST also uses explicit directives and interpreted text (or “inline”) markup.
Document Structure. Generally, you must write in paragraphs. A blank line is the end of one paragraph and the beginning of another. Also, different indentation will signal paragaph changes. The indent rule is handy for making bullet lists or numbered lists.
A line that is indented and begins with -
is a bulleted list.
A line that starts with digits and periods is a numbered list. Lists can nest within each other.
If you need to have sections and subsections (you’ll almost always do
this in the docstring for a module or package), you “underline” the
title with lines of ===
, ---
or ~~~
.
To include code code samples and doctest, you’ll use either the simple ::
marker. Or the explicit .. code-block::
directive.
Generally, the first paragraph must be a pithy summary of the material to follow. This paragraph will often be used in overviews and index pages.
Example testCard Module. For example, our module document might look like this.
#!/usr/bin/env python
"""The testCard module includes a number of unit tests for the Card
and Deck classes in the card module.
Overview
========
This module tests the following classes:
- Card
- Deck
Card Tests
----------
.. autoclass:: TestCards
Deck Tests
----------
.. autoclass:: TestDeck
Usage
=====
This module uses the standard text runner, so it can be executed
from the command line as follows::
python testcard.py
"""
We started with an overview paragraph. It summarizes the module in a single sentence.
We have an underlined section heading. In this document, the highest level of the outline is underlined with
=
’s. The second level is underlined with-
.RST is very flexible with the underlining rules.
We have a bullet list. Simply indent, and begin the paragraph with
-
. Lists can be nested, the RST processor will work this out based on the indentation of the various sublists.We used the
.. autoclass::
directive to gather docstring documentation from the class docstring and include it in the overall module docstring.We included a literal block of code after a paragraph which ends with
::
. The following material is indented to show what should be formatted specially.
Interpreted Text, or Inline Markup¶
In addition to basic document structure rules, RST includes a way to show that a span of characters should be interpreted specially. This is sometimes called Inline Markup because it is within the structural markup.
*words*
will render the words in italic. This can also be done with:emphasis:`words`
.**words**
will render the words in bold. This can also be done with:strong:`words`
.``words``
will render the words in afixed
font to indicate that it is a code sample. Literal programming text can also use:literal:`words`
.Code samples can also be done with
:samp:`word {replaceable}`
. In this case, the material enclosed in{}
is displayed in italics:word replaceable
.
Additionally, there are several cross-reference inline markup formats available for code elements.
Here’s an example of a paragraph using some inline markup to make some characters italic, other bold, and still others a fixed-width find that makes them looke like code.
This method computes the square root of a number, *n*.
It returns a value, *r*, such that :samp:`r**2 == n`.
**Note**. Square root of a negative number will raise a ``TypeError`` exception.
RST Field Markup¶
RST Field markup is primarily used to tie your documentation directly
to Python language structures. Field markup is a separate paragraph of the form
:tag arg: body
. We won’t cover all of the tags, just
enough to produce basic documentation.
Field markup also provides several standard kinds of standard “formal paragraphs” within your document. We’ll look at these separately.
The following tags are used to define detailed features of a method function.
:param p: description
A description of the parameter, p, for a function or method.:return: description
A description of the return value from the function or method.:keyword k: description
A description of the keyword parameter, k, for a function or method.
Here’s an example of a method function docstring that uses @param
tags.
def __init__( self, rank, suit ):
"""Build a card with a given rank and suit.
:param rank: numeric rank, ace is 1, 2-13 for 2 though King.
:param suit: String suit, use one of the module constants.
"""
self.rank= 14 if rank == 1 else rank
self.suit= suit
The following tags are used to define specific variables in a module or class.
:ivar v: description
A description of the an instance variable of a class. Generally, this will be in the class level docstring, and will refer to one of the class’sself.
variables.:var v: description
A global variable of a module. Generally, this will be in the module docstring, and will refer to one of the global variables created by the module.
Here’s an example of a class definition docstring that uses :ivar:
tags.
class Card( object ):
"""A single playing card, suitable for Blackjack or
Poker. While a suit is retained, it doesn't figure into
the ordering of cards, as it would in Bridge.
**Reminder**. The internal rank of an Ace is 14. The constructor,
however, expects a value of 1.
:ivar rank: the numeric rank of the card. 2-13, with ace as 14.
:ivar suit: the string suit of the card.
"""
Directives¶
RST has a number of useful directives available for structuring the documentation. Sphinx uses all of the basic RST directives and adds a large number of additional directives.
A directive is an RST markup command starts with a special ..
line,
and may include a number of lines indented within the directive. One of the
common ones is the .. code-block::
directive. The ::
is
an essential part of the directive syntax.
It looks like this.
Example. .. code-block:: python def fact(n): if n == 0: return 1 return n*fact(n-1) More Text.
The directive starts with the ..
line and continues through the
indented section. The directive content ends with the end of the indentation.
Epydoc uses the :tag:
syntax; it doesn’t define new RST directives.
Because of this, there are two styles for
some of the more advanced markup: an Epydoc tag style and a Sphinx directive
style.
Standard Paragraphs¶
There are several kinds of standard paragraphs that are part of any well-written document set. These include things like
Related Topics.
Epydoc usess the
:seealso:
tag to generate a “Related Topics” paragaph with references to other documents.Sphinx uses the
.. seealso::
directive line to generate additional references.Admonitions (Notes, Warnings, etc).
Epydoc uses tags like
:note:
,:attention:
,:bug:
, and:warning:
tags to generate standard types of admonition paragraphs.Sphinx uses directives like
.. note::
,.. attention::
, and.. warning::
directives to generate standard types of admonition paragraphs. Other adminitions include “caution”, “danger”, “error”, “hint”, “important”, “tip”.Status. You can track the development and deployment status of your programs. Tags like
:version:
,:todo:
,:deprecated:
,:since:
,:status:
, andchange:
are used by both Epydoc and Sphinx.Bibliographic Information. You can provide standard publication information. Tags like
:author:
,:organization:
,:copyright:
,:license:
and:contact:
can be used.
Class Example¶
Here’s an example of a module with detailed class documentation.
blackjack.py
We’ve included a module-level docstring, class-level docstings, and even some method-level docstrings. The idea is to provide enough information so that the automatic documentation produced by Sphnix is complete and useful.


{% extends "base.html" %} {% load staticfiles %} {% load crispy_forms_tags %} {% block title %}{{ block.super }}Home{% endblock %} {% block navbar-left %} {% include "_navbar.html" with active_link="home" %} {% endblock %} {% block navbar-right %} {% if not user.is_authenticated %} Log in Sign up {% else %} {{ block.super }} {% endif %} {% endblock %} {% block splash %}
A reporting and rating service to assist HR departments, Organizations, businesses, and individuals with obtaining, understanding, and managing digital profiles on the Internet.
Sign up for Free!Profiling is the process of building a profile using information collected from available data. In general terms, a profile is a description of characteristics of a
person or entity. A digital profile extends the latter term to include a digital representation, of a person or entity, which considers the characteristics and
preferences of their online activity.
Digital footprints are a unique set of online activities, actions, and communications that leave a data trace on the Internet, computers, and other devices. It
includes activities such as websites you visit, emails you send, and information you submit to online services.
Create a positive digital footprint. The data you create online tells others such as Employers, Universities, Law Enforcement, Teachers, and Parents what you have said, what others have said about you, images of you tagged online, browsing habits, personal information, and the most important, social media profiles. What does your digital footprint reveal?
Just as a person or entity manages their credit reports and scores via Experian or Moody’s for example, it is now necessary in the world we live in today to know
if our digital profiles are positive, average, or negative.
Why? Because our reports and ratings help entities and individuals to understand the consequences of desired or undesired behavior that may be revealed. For
example, our reports and ratings can help HR or Talent Management select the appropriate candidate for a job (keep in mind that some entities are looking for
candidates with undesirable behavior because that is their brand). Or they can inform job applicants what potential employers may learn about their online
activities and provide them the opportunity to clean up their digital if applicable. Further, this service will help entities maintain sustainable reputations and
guard against negative impressions.


Organisation_1
- CreateTimestamp : String
Creation Timestamp
- EmailAddresses : List
Email addresses associated with the organisation
- ModifyTimestamp : String
Modification Timestamp
- OBAuthorisationState : String
OB Participant Authorisation State
- OBOrganisationId : String
Open Banking Organisation Identifier
- OrganisationCommonName : String
The common name of the organisation
- PersonalAccountRoles : List
Individuals who have authorised access to the organisation
- PhoneNumbers : List
Phone numbers by which an organisation can be contacted
- PostalAddresses : List
Organisations's Postal Addresses
- StatusDescription : String
Organisation status description
- status : String
Organisation status


Event Manager
Home
(current)
Manage Services
Manage Events
Help
Contact Us
Add Service
×
Title
Price
Description
Catering
Decoration
Add service
Service type
Title
Price
{% for service, details in services.items()%}
{{ service }}
{{ details["description"] }}
{{ details["price"] }}
Remove


{% extends "web_app/base.html" %} {% load staticfiles %} {% block nav_block %}
a software engineer.
I'm a cyber security engineer by major, a software developer/engineer by profession and an AWS associate by choice.
I'm a developer, so I know how to create back-end applications using the latest technologies available. I'm most comfortable with Python & Django, while having a strong grasp with NodeJS & many npm modules.
I'm familiar with microservice architectures & containerization. I've been exposed to Docker and its entirety, while managing its containers with Kubernetes.
But my best skill is deploying applications to the cloud. I'm capable of building cloud infrastructure to deploy any application or service in a cost-effective and performance-driven way.


Welcome to a recount of my trip to San Fransisco!
We spent 10 amazing days in San Fransisco and this website is to share our experience with you!
If you have any questions you can contact me at<EMAIL_ADDRESS>We spent 10 amazing days in San Fransisco and this website is to share our experience with you!
If you have any questions you can contact me at rodrigjg@ucalgary.ca


Artistree
Home
About Us
Welcome to Artistree
Log in with Spotify
Obtain new token using the refresh token
Oh noes, we messed up!
Artistree
Explore
Questions, Comments, Suggestions?
Submit


Instances of this class can be used to authenticate and query the Frankly REST APIs.
# File lib/frankly-ruby.rb, line 301 def initialize(address = 'https:') @base_url = URI(Util.make_base_address(address)) @headers = {} end
Discards all internal state maintained by this client.
# File lib/frankly-ruby.rb, line 338 def close @headers = nil end
This method exposes a generic interface for creating objects through the Frankly API. Every create_* method is implemented on top of this one.
@param path [Array]
An Array of strings representing the collection to create an object in.
@param params [Hash]
Parameters passed as part of the request.
@param payload [Hash]
Dict-like object representing the object to create.
@return [Hash/Array]
Either a hash, or an array of hashes representing the object or objects that were created.
# File lib/frankly-ruby.rb, line 420 def create(path, params = {}, payload = {}) JSON.parse Generic.create(@base_url, @headers, path, params, payload) end
Creates a new announcement object in the app. The properties of that new announcement are given as hash to the method.
@param payload [Hash]
A hash containing the properties of the new announcement. See the Announcement section above to see how properly format this argument
@return [Hash]
A hash that represents the newly created announcement.
# File lib/frankly-ruby.rb, line 578 def create_announcement(payload) JSON.parse Announcement.create_announcement(@base_url, @headers, payload.to_json) end
Creates a new file object on Frankly servers and returns that object. The properties of that new file are given as a hash to the method.
@param payload [Hash]
A hash containing the properties of the new file. See the Files section above to see how properly format this argument.
@return [Hash]
A hash that represents the newly created file.
# File lib/frankly-ruby.rb, line 682 def create_file(payload) JSON.parse Files.create_file(@base_url, @headers, payload.to_json) end
Creates a new room object in the app. The properties of that new room are given as hash to the method.
@param payload [Hash]
A hash containing the properties of the new room. See the Rooms section above to see how properly format this argument
@return [Hash]
A hash that represents the newly created room.
# File lib/frankly-ruby.rb, line 351 def create_room(payload) JSON.parse Rooms.create_room(@base_url, @headers, payload.to_json) end
This method gives the user with id user_id the role of announcer in the room with id room_id
@param room_id [Int]
The identifier of the room in which the user will have the role of announcer.
@param user_id [Int]
The identifier of the user that will have the role of announcer.
@return [nil]
This method does not return anything and throws an exception on failure
# File lib/frankly-ruby.rb, line 917 def create_room_announcer(room_id, user_id) Rooms.create_room_announcer(@base_url, @headers, room_id, user_id) end
This method gives the user with id user_id the role of member in the room with id room_id
@param room_id [Int]
The identifier of the room in which the user will have the role of member.
@param user_id [Int]
The identifier of the user that will have the role of member.
@return [nil]
This method does not return anything and throws an exception on failure
# File lib/frankly-ruby.rb, line 877 def create_room_member(room_id, user_id) Rooms.create_room_member(@base_url, @headers, room_id, user_id) end
Creates a new message object in the room with the id specified in the first argument. The properties of that new message are given as hash to the method.
@param room_id [Int]
The identifier of the room to create the message in.
@param payload [Hash]
A hash containing the properties of the new message. See the Messages section above to see how properly format this argument
@return [Hash]
A hash that represents the newly created message.
# File lib/frankly-ruby.rb, line 639 def create_room_message(room_id, payload) JSON.parse Message.create_room_message(@base_url, @headers, room_id, payload) end
This method flags the message with id message_id in the room with id room_id.
@param room_id [Int]
The identifier of the room that contains the messsage to be flagged.
@param message_id [Int]
The identifier of the messsage being flagged.
@return [nil]
The method doesn't return anything and throws an exception on failure.
# File lib/frankly-ruby.rb, line 1032 def create_room_message_flag(room_id, message_id) JSON.parse Message.create_room_message_flag(@base_url, @headers, room_id, message_id) end
This method gives the user with id user_id the role of moderator in the room with id room_id
@param room_id [Int]
The identifier of the room in which the user will have the role of moderator.
@param user_id [Int]
The identifier of the user that will have the role of moderator.
@return [nil]
This method does not return anything and throws an exception on failure
# File lib/frankly-ruby.rb, line 837 def create_room_moderator(room_id, user_id) Rooms.create_room_moderator(@base_url, @headers, room_id, user_id) end
This method gives the user with id user_id the role of owner in the room with id room_id.
@param room_id [Int]
The identifier of the room in which the user will have the role of owner.
@param user_id [Int]
The identifier of the user that will have the role of owner.
@return [nil]
This method does not return anything and throws an exception on failure.
# File lib/frankly-ruby.rb, line 797 def create_room_owner(room_id, user_id) Rooms.create_room_owner(@base_url, @headers, room_id, user_id) end
This method gives the user with id user_id the role of subscriber in the room with id room_id
@param room_id [Int]
The identifier of the room in which the user will have the role of subscriber.
@param user_id [Int]
The identifier of the user that will have the role of subscriber.
@return [nil]
This method does not return anything and throws an exception on failure
# File lib/frankly-ruby.rb, line 957 def create_room_subscriber(room_id, user_id) Rooms.create_room_subscriber(@base_url, @headers, room_id, user_id) end
Creates a new user in the app. The properties of that new user are given as hash to the method.
@param payload [Hash]
A hash containing the properties of the new user. See the Users section above to see how properly format this argument
@return [Hash]
A hash that represents the newly created user.
# File lib/frankly-ruby.rb, line 516 def create_user(payload) JSON.parse Users.create_user(@base_url, @headers, payload.to_json) end
This method exposes a generic interface for deleting objects through the Frankly API. Every delete_* method is implemented on top of this one.
@param path [Array]
An Array of strings representing the collection to delete an object in.
@param params [Hash]
Parameters passed as part of the request.
@param payload [Hash]
A hash representing the body of the request.
@return [nil]
The method doesn't return anything on success and throws an exception on failure.
# File lib/frankly-ruby.rb, line 475 def delete(path, params = {}, payload = {}) JSON.parse Generic.delete(@base_url, @headers, path, params, payload) end
Deletes the announcement object with the id sepecified in the first argument. Note that deleting an announcement doesn't remove messages from rooms it has already been published to. This operation cannot be undone!
@param announcement_id [Int]
The identifier of the announcement to delete.
@return [nil]
The method doesn't return anything on success and throws an exception on failure.
# File lib/frankly-ruby.rb, line 602 def delete_announcement(announcement_id) Announcement.delete_announcement(@base_url, @headers, announcement_id) end
Deletes the room object with the id sepecified in the first argument. Note that this will cause all messages sent to this room to be deleted as well, a safer approach could be to change the room status to 'unpublished' to hide it without erasing data. This operation cannot be undone!
@param room_id [Int]
The identifier of the room to delete.
@return [nil]
The method doesn't return anything on success and throws an exception on failure.
# File lib/frankly-ruby.rb, line 401 def delete_room(room_id) Rooms.delete_room(@base_url, @headers, room_id) end
This method removes the role of announcer from the user with id user_id in the room with id room_id
@param room_id [Int]
The identifier of the room in which the user will have the role of announcer removed.
@return [nil]
This method does not return anything and throws an exception on failure
# File lib/frankly-ruby.rb, line 942 def delete_room_announcer(room_id, user_id) Rooms.delete_room_announcer(@base_url, @headers, room_id, user_id) end
This method removes the role of member from the user with id user_id in the room with id room_id
@param room_id [Int]
The identifier of the room in which the user will have the role of member removed.
@return [nil]
This method does not return anything and throws an exception on failure
# File lib/frankly-ruby.rb, line 902 def delete_room_member(room_id, user_id) Rooms.delete_room_member(@base_url, @headers, room_id, user_id) end
This method removes the role of moderator from the user with id user_id in the room with id room_id
@param room_id [Int]
The identifier of the room in which the user will have the role of moderator removed.
@return [nil]
This method does not return anything and throws an exception on failure
# File lib/frankly-ruby.rb, line 862 def delete_room_moderator(room_id, user_id) Rooms.delete_room_moderator(@base_url, @headers, room_id, user_id) end
This method removes the role of owner from the user with id user_id in the room with id room_id
@param room_id [Int]
The identifier of the room in which the user will have the role of owner removed.
@return [nil]
This method does not return anything and throws an exception on failure.
# File lib/frankly-ruby.rb, line 822 def delete_room_owner(room_id, user_id) Rooms.delete_room_owner(@base_url, @headers, room_id, user_id) end
This method removes the subscriber role from the user with id user_id in the room with id room_id
@param room_id [Int]
The identifier of the room in which the user will have the role of subscriber removed.
@return [nil]
This method does not return anything and throws an exception on failure
# File lib/frankly-ruby.rb, line 982 def delete_room_subscriber(room_id, user_id) Rooms.delete_room_subscriber(@base_url, @headers, room_id, user_id) end
This method deletes the current session. After this function is called, the other functions will return exceptions until open is called again.
@return [nil]
The method does not return anything and throws an exception on failure
# File lib/frankly-ruby.rb, line 782 def delete_session Sessions.delete_session(@base_url, @headers) end
Deletes the user object with the id sepecified in the first argument.
@param room_id [Int]
The identifier of the user to delete.
@return [nil]
The method doesn't return anything on success and throws an exception on failure.
# File lib/frankly-ruby.rb, line 554 def delete_user(user_id) Users.delete_user(@base_url, @headers, user_id) end
This should be the first method called on an instance of FranklyClient, after succesfully returning the client can be used to interact with the Frankly API.
@param app_key [String]
The key that specifies which app this client is authenticating for, this value is provided by the Frankly Console.
@param app_secret [String]
The secret value associated the the key allowing the client to securely authenticate against the Frankly API.
@return [nil]
The method doesn't return anything, it modified the internal state of the object it is called on.
# File lib/frankly-ruby.rb, line 321 def open(*args) if args.length == 2 app_key = args[0] app_secret = args[1] @headers = Util.build_headers(@base_url, app_key, app_secret) else if args.length == 1 identity_token = args[0] response = Auth.open(@base_url, identity_token) @headers = Util.build_headers(@base_url, response.cookies) else fail 'Incorrect number of arguments' end end end
This method exposes a generic interface for reading objects through the Frankly API. Every read_* method is implemented on top of this one.
@param path [Array]
An Array of strings representing the collection to read an object in.
@param params [Hash]
Parameters passed as part of the request.
@param payload [Hash]
Dict-like object representing the object to create.
@return [Hash/Array]
The object read from the API at the specified path.
# File lib/frankly-ruby.rb, line 438 def read(path, params = {}, payload = {}) JSON.parse Generic.read(@base_url, @headers, path, params, payload) end
Retrieves the announcement object with the id sepecified in the first argument.
@param announcement_id [Int]
The identifier of the announcement to fetch.
@return [Hash]
A hash representing the announcement with the specified id.
# File lib/frankly-ruby.rb, line 589 def read_announcement(announcement_id) JSON.parse Announcement.read_announcement(@base_url, @headers, announcement_id) end
Retrieves the list of announcements that are available in the app.
@return [Array]
An array of annoucement hashes ordered by id, which may be empty if there are no announcements in the app.
# File lib/frankly-ruby.rb, line 611 def read_announcement_list JSON.parse Announcement.read_announcement_list(@base_url, @headers) end
Retrieves the list of rooms that an annoucement has been published to.
@param announcement_id [Int]
The identifier of the announcement used to generate the room list.
@return [Array]
A list of room objects ordered by id, which may be empty if the announcement haven't been published yet.
# File lib/frankly-ruby.rb, line 623 def read_announcement_room_list(announcement_id) JSON.parse Announcement.read_announcement_room_list(@base_url, @headers, announcement_id) end
This method returns a hash that contains all of the properties of the application with it app_id. See the Application section above for more information.
@param app_id [Int]
The identifier of the application.
@return [Hash]
A hash that contains the properties of the app.
# File lib/frankly-ruby.rb, line 1018 def read_app(app_id) JSON.parse Apps.read_app(@base_url, @headers, app_id) end
Retrieves the room object with the id specified in the first argument.
@param room_id [Int]
The identifier of the room to fetch.
@return [Hash]
A hash that represents the fetched room.
# File lib/frankly-ruby.rb, line 371 def read_room(room_id) JSON.parse Rooms.read_room(@base_url, @headers, room_id) end
The method returns a hash that contains a list of all of the users in the room with the role of announcer
@param room_id [Int]
The identifier of the room that contains the users with the announcer role.
@return [Array]
An array of hashes that represent the users in the room with the announcer role
# File lib/frankly-ruby.rb, line 930 def read_room_announcer_list(room_id) JSON.parse Rooms.read_room_announcer_list(@base_url, @headers, room_id) end
The method returns a hash that contains the number of active, subscribed, and online users in the room with id room_id.
@param room_id [Int]
The identifier of the room that contains the users.
@return [Hash]
A hash that contains the active, subscribed, and online user counts.
# File lib/frankly-ruby.rb, line 1006 def read_room_count(room_id) Rooms.read_room_count(@base_url, @headers, room_id) end
Retrieves the list of all available rooms in the app.
@return [Array]
A list of hashes ordered by id, which may be empty if there are no rooms in the app.
# File lib/frankly-ruby.rb, line 360 def read_room_list JSON.parse Rooms.read_room_list(@base_url, @headers) end
The method returns a hash that contains a list of all of the users in the room with the role of member
@param room_id [Int]
The identifier of the room that contains the users with the member role.
@return [Array]
An array of hashes that represent the users in the room with the member role
# File lib/frankly-ruby.rb, line 890 def read_room_member_list(room_id) JSON.parse Rooms.read_room_member_list(@base_url, @headers, room_id) end
Retrieves the message object with the id sepecified in first argument from the room with the id specified in the second argument.
@param room_id [Int]
The identifier of the room to create the message in.
@param message_id [Int]
The identifier of the message to fetch.
@return [Hash]
A hash representing the message with the specified id.
# File lib/frankly-ruby.rb, line 669 def read_room_message(room_id, message_id) JSON.parse Message.read_room_message(@base_url, @headers, room_id, message_id) end
Fetches a list of messages from the room with the id specified in the first argument.
@param room_id [Int]
The identifier of the room whose messages are being fetched.
@param params [Hash]
A hash that defines the range of the messages that are fetched. See the Messages section above to see how properly format this argument.
@return [Array]
An array of room hashes which may be empty if no messages satisfy the query.
# File lib/frankly-ruby.rb, line 654 def read_room_message_list(room_id, params) JSON.parse Message.read_room_message_list(@base_url, @headers, room_id, params) end
The method returns a hash that contains a list of all of the users in the room with the role of moderator
@param room_id [Int]
The identifier of the room that contains the users with the moderator role.
@return [Array]
An array of hashes that represent the users in the room with the moderator role
# File lib/frankly-ruby.rb, line 850 def read_room_moderator_list(room_id) JSON.parse Rooms.read_room_moderator_list(@base_url, @headers, room_id) end
The method returns a hash that contains a list of all of the users in the room with the role of owner.
@param room_id [Int]
The identifier of the room that contains the users with the owner role.
@return [Array]
An array of hashes that represent the users in the room with the owner role.
# File lib/frankly-ruby.rb, line 810 def read_room_owner_list(room_id) JSON.parse Rooms.read_room_owner_list(@base_url, @headers, room_id) end
The method returns a hash that contains a list of all of the users in the room.
@param room_id [Int]
The identifier of the room that contains the users.
@return [Array]
An array of hashes that represent the users in the room with the participant role
# File lib/frankly-ruby.rb, line 994 def read_room_participant_list(room_id) JSON.parse Rooms.read_room_participant_list(@base_url, @headers, room_id) end
The method returns a hash that contains a list of all of the users in the room with the role of subscriber
@param room_id [Int]
The identifier of the room that contains the users with the subscriber role.
@return [Array]
An array of hashes that represent the users in the room with the subscriber role
# File lib/frankly-ruby.rb, line 970 def read_room_subscriber_list(room_id) JSON.parse Rooms.read_room_subscriber_list(@base_url, @headers, room_id) end
This method returns an object representing the current user's session See the Sessions section above for a description of the contents of the user session.
@return [Hash]
A hash that represents the current session.
# File lib/frankly-ruby.rb, line 773 def read_session JSON.parse Sessions.read_session(@base_url, @headers) end
Retrieves the user object with the id specified in the first argument.
@param user_id [Int]
The identifier of the room to fetch.
@return [Hash]
A hash that represents the fetched user.
# File lib/frankly-ruby.rb, line 527 def read_user(user_id) JSON.parse Users.read_user(@base_url, @headers, user_id) end
Retrieves the ban status of the user with the id specified in the first argument.
@param user_id [Int]
The identifier of the user whose ban status is fetched.
@return [Hash]
A hash that represents the ban status of the user.
# File lib/frankly-ruby.rb, line 565 def read_user_ban(user_id) JSON.parse Users.read_user_ban(@base_url, @headers, user_id) end
This method exposes a generic interface for updating objects through the Frankly API. Every read_* method is implemented on top of this one.
@param path [Array]
An Array of strings representing the collection to read an object in.
@param params [Hash]
Parameters passed as part of the request.
@param payload [Hash]
Dict-like object representing the object to create.
@return [Hash/Array]
The object updated on the API at the specified path.
# File lib/frankly-ruby.rb, line 456 def update(path, params = {}, payload = {}) JSON.parse Generic.update(@base_url, @headers, path, params, payload) end
Creates a new file object on Frankly servers and returns that object. The properties of that new file are given as a hash to the method.
@param destination_url [String]
The URL at which the file is hosted on Frankly servers. This can be obtained from the url field of an object returned by create_file for example.
@param file_obj [File]
A file-like object (as returned by File.open(..., 'rb') for example) providing the new content of the file.
@param file_size [Int]
The size of the new file content (in bytes).
@param mime_type [String]
The mime type of the new file content.
@param encoding [String]
The encoding of the new file content ('gzip' for example).
@return [nil]
The method doesn't return anything on success and throws an exception on failure.
# File lib/frankly-ruby.rb, line 708 def update_file(destination_url, file_obj, file_size, mime_type, encoding = nil) Files.upload_file(@base_url, @headers, destination_url, file_obj, file_size, mime_type, encoding) end
Creates a new file object on Frankly servers and returns that object. The properties of that new file are given as a hash to the method.
@param destination_url [String]
The URL at which the file is hosted on Frankly servers. This can be obtained from the url field of an object returned by create_file for example.
@param file_path [String]
A path to a local providing the new file content
@return [nil]
The method doesn't return anything on success and throws an exception on failure.
# File lib/frankly-ruby.rb, line 724 def update_file_from_path(destination_url, file_path) Files.update_file_from_path(@base_url, @headers, destination_url, file_path) end
Updates the existing room object with the id specified in the first argument and returns that object. The properties to update are given to the method as a hash.
@param room_id [Integer]
The identifier of the room to update.
@param payload [Hash]
A hash containing the properties of the new room. See the Rooms section above to see how properly format this argument
@return [Hash]
A hash that represents the newly updated room.
# File lib/frankly-ruby.rb, line 387 def update_room(room_id, payload) JSON.parse Rooms.update_room(@base_url, @headers, room_id, payload.to_json) end
Updates an existing user object in the app and returns that object. The properties of that new user are given as a hash to the method.
@param user_id [Integer]
The identifier of the room to update.
@param payload [Hash]
A hash containing the properties of the new room. See the Users section above to see how properly format this argument
@return [Hash]
A hash that represents the newly updated user.
# File lib/frankly-ruby.rb, line 543 def update_user(user_id, payload) JSON.parse Users.update_user(@base_url, @headers, user_id, payload.to_json) end
This method exposes a generic interface for uploading file contents through the Frankly API. Every upload_* method is implemented on top of this one.
@param url [String]
The URL at which the file is hosted on Frankly servers. This can be obtained from the url field of an object returned by create_file for example.
@param params [Hash]
Parameters passed as part of the request.
@param payload [Hash]
A hash representing the body of the request.
@param content_length [Int]
The size of the new file content (in bytes).
@param content_type [String]
The mime type of the new file content.
@param content_encoding [String]
The encoding of the new file content ('gzip' for example).
@return [nil]
The method doesn't return anything on success and throws an exception on failure.
# File lib/frankly-ruby.rb, line 503 def upload(url, params, payload, content_length, content_type, content_encoding) JSON.parse Generic.upload(@headers, url, params, payload, content_length, content_type, content_encoding) end
This method is convenience wrapper for creating a new file object on the Frankly API and setting its content.
@param file_obj [File]
A file-like object (as returned by File.open(..., 'rb') for example) providing the new content of the file.
@param file_size [Int]
The size of the new file content (in bytes).
@param mime_type [String]
The mime type of the new file content.
@param encoding [String]
The encoding of the new file content ('gzip' for example).
@param params [Hash]
A hash containing the properties of the new file. See the Files section above to see how properly format this argument.
@return [Hash]
A hash that represents the newly created file.
# File lib/frankly-ruby.rb, line 749 def upload_file(file_obj, file_size, mime_type, encoding = nil, params) Files.upload_file(@base_url, @headers, destination_url, file_obj, file_size, mime_type, encoding, params) end
This method is convenience wrapper for creating a new file object on the Frankly API and setting its content.
@param file_path [String]
A path to a local providing the new file content
@param params [Hash]
A hash containing the properties of the new file. See the Files section above to see how properly format this argument.
@return [Hash]
A hash that represents the newly created file.
# File lib/frankly-ruby.rb, line 764 def upload_file_from_path(file_path, params) Files.upload_file_from_path(@base_url, @headers, file_path, params) end


ElectroData/Burroughs Datatron 205 Emulator
Open-Source Project
Burroughs 205 and 220 Blog
Start the Emulator
Configure System
Using Configuration "
??
"
(Caution: Closing this window, minimizing it, or placing the page on a non-active tab may cause the emulator to run very slowly)


This document introduces CIMPLE 1.2.0 and explains what has changed since the last public release (CIMPLE 1.1.0). If you are unfamiliar with the major changes introduced by CIMPLE 1.1.0, you might want to review them by clicking here: http://www.cimple.org/downloads.html.
Chapter 1 describes what is new in this release. Chapter 2 discusses bugs fixed by this release. Chapter 3 explains how to migrate providers developed with earlier versions.
This chapter covers new capabilities introduced by CIMPLE 1.2.0.
BREVITY is a new client interface that employs concrete CIM elements (classes and methods). BREVITY is described in a presentation presented at the 2007 Management Developers Conference. For more information, please see http://www.cimple.org/CIMPLE-2007-MDC.pdf.
CIMPLE 1.2.0 now supports the following platforms.
The following were added in this realease.
genmak
ToolThe new genmak
tool generates provider makefiles automatically (the
CIMPLE build system is now installed by the install target). The following
generates a makefile that builds a library named "xyz" from a set of sources.
$ genmak xyz *.cpp
The genproj
command (which runs genclass, genprov, and genmod) also
runs genmak, when passed the -m
option.
Developers may continue to write their own makefiles if they prefer. This tool is simply a convenience that simplifies provider development.
This version introduces a logging facility that may be used in the provider. Logging is only enabled when CIMPLE is configured with debug. For example:
$ ./configure --enable-debug ...
All log entries are written to:
$HOME/.cimple/messages
Provider use the logging by calling the log
function. For example:
log(LL_DBG, "my name is %s; my age is %d", "John", 12);
There are five log levels:
LL_FATAL
LL_ERR
LL_WARN
LL_INFO
LL_DBG
In addition to provider generated log entries, the CIMPLE adapters themselves make log entries for warnings and errors during the normal operation of CIMPLE. We recommend configuring with debug and watching for log messages during provider development.
This release fixes the bugs described below (all critical bugs were addressed by earlier maintenance releases).
This release works around errors in the the CMPI headers released last year on the OpenGroup site. CIMPLE now compiles with all known CMPI headers.
Always regenerate classes, providers, and modules when using a new version
of CIMPLE. This is a trivial matter of running genrpoj
as follows:
$ genproj MODULE-NAME CLASS-1 CLASS-2 ... CLASS-N
This regenerates the classes and module and will patch your providers if necessary. This operation will not require any rework on your part. Just regnerate, clean, and remake.


Homepage
Hardware Engeneer
Design
Contacts
Information
Personal Information:
Name: Diogo Nunes
Age: 21 Anos
Phone Number: 961207358
Address: Rua Pedro Esteves, Nº12, 2ºEsq, 2860-096
Languages:
- HTML
- HTML5
- CSS
- Bootstrap


Some animated SVG icons for fun and learning.
SVG Path Editor
move left
move right
zoom in
zoom out
Some text
Sorry, your browser does not support inline SVG.


KBC Group CEO apologises for 'insensitive' comments about tracker mortgage scandal
by Stephen McNeiceThe head of the KBC Group has apologised for 'insensitive' comments he made yesterday about the tracker mortgage scandal.
Yesterday, CEO Johan Thijs described the measures the Central Bank has taken against lenders as a result of the scandal as "annoying".
Mr Thijs called on the regulator to move on, and insisted the Belgium-based group had learned from its mistakes.
The remarks prompted a reaction from the Taoiseach earlier, who said the best way for the bank to move on was for them to "deal with" the scandal.
Leo Varadkar added that they should issue a full apology to anyone who they've wronged.
Today, Mr Thijs said he wanted to "acknowledge the insensitivity of what I said and the manner in which it was delivered".
He said: “I would like to personally and sincerely apologise to our customers and to the Irish public for the offence caused by my words yesterday in relation to the tracker mortgage examination and investigation.
"KBC has previously apologised for the way we handled tracker mortgages on behalf of our customers, many of whom were directly impacted and I would like, also personally, to formally reiterate that apology again today."
He added that his comments yesterday were "unintentional", and that he was "truly sorry for the offence caused".
He also acknowledged that the Central Bank plays a 'crucial role' in regulatory matters, and insisted his own company is determined to act as a "positive force for choice" in the banking sector.
Earlier this year, the Central Bank’s final report into the tracker mortgage controversy showed just over 40,000 people were denied cheaper interest rates by Irish banks.
Those impacted were paid a total of €683 million by the banks in redress, while 99 families lost their homes as a consequence of the scandal.


Help people find your space when they filter." %}


espnet.lm package¶
espnet.lm.lm_utils¶
-
class
espnet.lm.lm_utils.
MakeSymlinkToBestModel
(key, prefix='model', suffix='best')[source]¶ Bases:
chainer.training.extension.Extension
Extension that makes a symbolic link to the best model
- Parameters
key (str) – Key of value
prefix (str) – Prefix of model files and link target
suffix (str) – Suffix of link target
-
class
espnet.lm.lm_utils.
ParallelSentenceIterator
(dataset, batch_size, max_length=0, sos=0, eos=0, repeat=True, shuffle=True)[source]¶ Bases:
chainer.dataset.iterator.Iterator
Dataset iterator to create a batch of sentences.
This iterator returns a pair of sentences, where one token is shifted between the sentences like ‘<sos> w1 w2 w3’ and ‘w1 w2 w3 <eos>’ Sentence batches are made in order of longer sentences, and then randomly shuffled.
-
property
epoch_detail
¶
-
property
previous_epoch_detail
¶
-
serialize
(serializer)[source]¶ Serializes the internal state of the iterator.
This is a method to support the serializer protocol of Chainer.
Note
It should only serialize the internal state that changes over the iteration. It should not serialize what is set manually by users such as the batch size.
-
property
-
espnet.lm.lm_utils.
compute_perplexity
(result)[source]¶ Computes and add the perplexity to the LogReport
- Parameters
result (dict) – The current observations
-
espnet.lm.lm_utils.
count_tokens
(data, unk_id=None)[source]¶ Count tokens and oovs in token ID sequences.
- Parameters
data (list[np.ndarray]) – list of token ID sequences
unk_id (int) – ID of unknown token
- Returns
tuple of number of token occurrences and number of oov tokens
- Return type
tuple
-
espnet.lm.lm_utils.
load_dataset
(path, label_dict, outdir=None)[source]¶ Load and save HDF5 that contains a dataset and stats for LM
- Parameters
path (str) – The path of an input text dataset file
label_dict (dict[str, int]) – dictionary that maps token label string to its ID number
outdir (str) – The path of an output dir
- Returns
- Tuple of
token IDs in np.int32 converted by read_tokens the number of tokens by count_tokens, and the number of OOVs by count_tokens
- Return type
tuple[list[np.ndarray], int, int]
espnet.lm.chainer_backend.extlm¶
espnet.lm.chainer_backend.lm¶
-
class
espnet.lm.chainer_backend.lm.
BPTTUpdater
(train_iter, optimizer, device)[source]¶ Bases:
chainer.training.updaters.standard_updater.StandardUpdater
An updater for a chainer LM
:param chainer.dataset.Iterator train_iter : The train iterator :param optimizer: :param int device : The device id
-
class
espnet.lm.chainer_backend.lm.
ClassifierWithState
(predictor, lossfun=<function softmax_cross_entropy>, label_key=-1)[source]¶ Bases:
chainer.link.Chain
A wrapper for a chainer RNNLM
:param link.Chain predictor : The RNNLM :param function lossfun: The loss function to use :param int/str label_key:
-
class
espnet.lm.chainer_backend.lm.
DefaultRNNLM
(**links)[source]¶ Bases:
espnet.nets.lm_interface.LMInterface
,chainer.link.Chain
Default RNNLM wrapper to compute reduce framewise loss values.
- Parameters
n_vocab (int) – The size of the vocabulary
args (argparse.Namespace) – configurations. see add_arguments
-
class
espnet.lm.chainer_backend.lm.
LMEvaluator
(val_iter, eval_model, device)[source]¶ Bases:
espnet.utils.training.evaluator.BaseEvaluator
A custom evaluator for a chainer LM
:param chainer.dataset.Iterator val_iter : The validation iterator :param eval_model : The model to evaluate :param int device : The device id to use
-
evaluate
()[source]¶ Evaluates the model and returns a result dictionary.
This method runs the evaluation loop over the validation dataset. It accumulates the reported values to
DictSummary
and returns a dictionary whose values are means computed by the summary.Note that this function assumes that the main iterator raises
StopIteration
or code in the evaluation loop raises an exception. So, if this assumption is not held, the function could be caught in an infinite loop.Users can override this method to customize the evaluation routine.
Note
This method encloses
eval_func
calls withfunction.no_backprop_mode()
context, so all calculations usingFunctionNode
s insideeval_func
do not make computational graphs. It is for reducing the memory consumption.- Returns
Result dictionary. This dictionary is further reported via
report()
without specifying any observer.- Return type
dict
-
-
class
espnet.lm.chainer_backend.lm.
RNNLM
(n_vocab, n_layers, n_units, typ='lstm')[source]¶ Bases:
chainer.link.Chain
A chainer RNNLM
- Parameters
n_vocab (int) – The size of the vocabulary
n_layers (int) – The number of layers to create
n_units (int) – The number of units per layer
type (str) – The RNN type
espnet.lm.pytorch_backend.extlm¶
-
class
espnet.lm.pytorch_backend.extlm.
LookAheadWordLM
(wordlm, word_dict, subword_dict, oov_penalty=0.0001, open_vocab=True)[source]¶ Bases:
torch.nn.modules.module.Module
-
forward
(state, x)[source]¶ Defines the computation performed at every call.
Should be overridden by all subclasses.
Note
Although the recipe for forward pass needs to be defined within this function, one should call the
Module
instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.
-
logzero
= -10000000000.0¶
-
zero
= 1e-10¶
-
-
class
espnet.lm.pytorch_backend.extlm.
MultiLevelLM
(wordlm, subwordlm, word_dict, subword_dict, subwordlm_weight=0.8, oov_penalty=1.0, open_vocab=True)[source]¶ Bases:
torch.nn.modules.module.Module
-
forward
(state, x)[source]¶ Defines the computation performed at every call.
Should be overridden by all subclasses.
Note
Although the recipe for forward pass needs to be defined within this function, one should call the
Module
instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.
-
logzero
= -10000000000.0¶
-
zero
= 1e-10¶
-
espnet.lm.pytorch_backend.lm¶
LM training in pytorch.
-
class
espnet.lm.pytorch_backend.lm.
BPTTUpdater
(train_iter, model, optimizer, device, gradclip=None, use_apex=False)[source]¶ Bases:
chainer.training.updaters.standard_updater.StandardUpdater
An updater for a pytorch LM.
Initialize class.
- Parameters
train_iter (chainer.dataset.Iterator) – The train iterator
model (LMInterface) – The model to update
optimizer (torch.optim.Optimizer) – The optimizer for training
device (int) – The device id
gradclip (float) – The gradient clipping value to use
use_apex (bool) – The flag to use Apex in backprop.
-
class
espnet.lm.pytorch_backend.lm.
LMEvaluator
(val_iter, eval_model, reporter, device)[source]¶ Bases:
espnet.utils.training.evaluator.BaseEvaluator
A custom evaluator for a pytorch LM.
Initialize class.
:param chainer.dataset.Iterator val_iter : The validation iterator :param LMInterface eval_model : The model to evaluate :param chainer.Reporter reporter : The observations reporter :param int device : The device id to use
-
class
espnet.lm.pytorch_backend.lm.
Reporter
(**links)[source]¶ Bases:
chainer.link.Chain
Dummy module to use chainer’s trainer.
-
espnet.lm.pytorch_backend.lm.
compute_perplexity
(result)[source]¶ Compute and add the perplexity to the LogReport.
- Parameters
result (dict) – The current observations
-
espnet.lm.pytorch_backend.lm.
concat_examples
(batch, device=None, padding=None)[source]¶ Concat examples in minibatch.
- Parameters
batch (np.ndarray) – The batch to concatenate
device (int) – The device to send to
padding (Tuple[int,int]) – The padding to use
- Returns
(inputs, targets)
:rtype (torch.Tensor, torch.Tensor)


MoonMenu.js
An awesome circular menu for your website
How to use:
Simple Menu
|
Custom Menu
|
Context Menu
|
CSS Customization
|
Events Registration
|
Multiple Menus
Documentation


We're currently looking for volunteers to help with the setup and and administration of MinneHack.
If you're interested in doing any of the following, please sign up and help us make a great event even better!
Plus, any volunteers will get a special MinneHack Volunteer T-shirt!
If there's some other way you think you can contribute, shoot us an email, or contact us with the contact form below!


Search
Home
IT Books
Special Books
Register
feedback
contact
Home
»
Contact Us
Contact Us
Our Location
Address:
Tracyorange
Afghanistan
Mobile:
9999999999
Landline:
9999999999
Contact Form
First Name:
E-Mail Address:
Enquiry:
Enter the code in the box below:
Tell a Friend
Brands
Gift Vouchers
Affiliates
Specials
Tracyorange © Copyright 2014
eCommerce Software
by


Amanitas - A. Muscaria
Took estimated 7-9 grams. Took half a large cap within tea at 8PM. Tea was made by boiling water for three minutes in the microwave and then pouring the still very hot water over the cap and letting it steep for 10 minutes or so. Then filter through tea strainer. Took tea with milk. I wish I had some honey, because even though I love Soma, I dislike the taste, especially in a tea.
About 9:30PM, I ate another 1/2 of a dried cap. This was a medium sized cap. Feeling pretty good by 10:00 High by 11:00 PM. Then chewed the last bit (around 1/5th of a medium cap) around 11:30 PM. The last bit seemed to be what pushed me over the edge. Again, total consumption estimated at 7 to 9 grams, from three seperate dried mushrooms, all caps.
Some observations from my notes taken at the time:
The world is PULSING with energy. Each item in the room is alternately expanding/contracting (PULSING), with life and energy. Colors are very intense and vivid and the light seems to penetrate everything. Objects have an inner glow much as I remember seeing things when I was a child. Lighting seems like that within the Big Top, at the Circus. This is a very high energy buzz; intellectual, religious, physical.
Work (I am painting the ceiling of a very large room) is effortless. I feel invincible, -- not violent at all, but very strong. I am experiencing minor twitching convulsions but they assist in the work. (I am used to this from previous Soma experiences). I urinated but did not drink it (which I have done in the past.) I am so high that I don’t feel necessary to extend or enhance this trip. Tried to turn off my cellphone, but can’t figure out how (I had the sudden urge to conserve the battery.)
This is the greatest drug in the world! I feel God pulsing through my muscles. Just realized “anyone can dance to every song because the beat is God. The pulse of energy that emanates through everything is God. I am dancing with God, literally. God is a mushroom, or rather — God created the mushroom so that man could participte in God’s consciousness.”
Here began a long period of time where the word “God” was continually repeated in my mind — although it took a long time subjectively before “I” realized it. The situation was that I was sitting on the couch downstairs with this tremendous buzz going on — everything in the universe was just buzzing with energy and I was on the verge of feeling overwhelmed (had to sit down) when all the sudden I realized, that the sound of the buzz was the word “God”. The meaning of the phrase “in the beginning was the word and the word was God” becomes crystal clear to me. I had become one with God. I’m not talking about a sublime intellectual experience, this was the most astounding, powerful, awe inspiring experience I have ever had.
I’m not a scholar on Soma (although I’ve read a half dozen books on the topic), but this was, I believe a “peak” religious experience. I can easily imagine how people in ancient times would be in awe of this mushroom. I had the distinct sense that the mushroom was identifying itself, through my consciousness, as God.
After this (which was probably 5 or 6 hours into the trip), I began to have heavier convulsions (twitching), and resumed painting. However, I was dropping the paint roller at a fairly regular interval. I began to notice that the convulsions were cycling through my body and started to worry, just a bit that they would affect my heart. For example, my hand would twitch then my feet, then my arms... I was afraid that my heart would stop when its “turn” came up.
But after my legs buckled and I did not fall -- I recovered very quickly, I stopped worring about that... I also knew — because generally my memory was good — that this mushroom isn’t a killer. Au contraire, it is my protector and my counselor. Another idea — mentioned above -- is that somehow Soma is God’s means of experiencing, through man’s mind, the joy of being. Hard to describe, but I had the distinct impression that somehow, “God” is only able to experience existence vicariously. Somehow human beings (and other sentient beings) are the lenses through which God views existence. The mushroom is the catalyst.
For some reason, the timeframe of 350 million years kept running through my mind — this may be from one of Terence McKenna’s books, but the idea that Soma is very, very ancient, was in my head.
I also went through short periods of time where I was just standing and swaying, looking around, and getting off on the trip. Not heavy visuals (e.g., no walls melting, etc...) but one interesting feature was seeing the electrons (or something?) within the air in front and all around me. They were very very tiny multicolored points, almost like gnats, but lots of them... flying around. Similar to the “stars” one sees with a bump to the head. Very strange. I knew at this point that I was totally stoned and decided I was done with painting the ceiling. Also, I knocked the radio on the floor and couldn't figure out how to get it working again. Definately impaired (grin.)
Finally at 3:00 I went to bed. I was glad that I had stopped when I did as far as not taking more. I had a somewhat similar experience 20 years ago (on cubensis), but that was more of a “bad” trip with things melting, and many negative fears intruding on the buzz. This experience was generally (99%) positive, with little or no fear. The twitching seems to be a component of the Soma buzz for me, so I’m not fearful of that effect. I would certainly not drive or operate heavy equipment on a trip like this (even a paint roller was too much at the later stages). Also, this would be an incredible experience, I believe, outside, in nature.
In hindsite, I should have walked outside and looked around, but it was 3:00 AM, and I was covered in paint, and the dogs would have woken up, etc.
All in all, an astounding trip! I still had another dose left, maybe another 9 grams. One large full cap and 2/5ths of another cap. That will be a intense trip, but the question, for me at this point, is when? This stuff is so strong, it’s not something I would do ever day, or even every week. One other tip, from Donald Teeter's works, is: don't drink carbonated beverages with Soma. I found out the hard way, that doing so will often lead to nausea. As it is, I drink milk with the shrooms, and rarely, if ever experience nausea (again-- no carbonated beverages.) Take care folks, and respect Soma.
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.


HONG MINHO
Learning is a lifelong process.
Learning is a lifelong process.
GPA: 3.68
Cooperated with team members to make a proposal for M&A strategy of one of the most largest Japanese firms. Provided detailed deal execution plans using financidal modeling and valuation skills.
On individual basis, made a proposal for acquisition of a major Japanese firm based on market research. Provided detailed deal execution plans based on various valuation methods.
Provided an analysis of current capital market in Japan and gave a presentation based on a vast amount of research.
Provided an advice for M&A strategy for one of the largest Japanese company based on financial modeling.
Developed translation into subtitle scripts in Korean and English from Japanese. As a senior translator, provided review and evaluation on other translators for improving the quality of translation and implemented job training for new translators.
Worked with a student to provide personalized educational, behavioral and emotional support for university examination. Proposed the optimal examination strategy for a student who wanted to study abroad. Helped to enter one of the most prestigious universities in Japan.
Guarded public facilities(White House of South Korea, embassies, the houses of ex-presidents, etc.). Managed protest and public safety. Managed massive protests demanding for impeachment of now ex-president Park Geun-hye where over tens of millions people gathered in total.
Full Stack


My name is William Putra Pangestu. I am 23 years old. I was born and raised in Indonesia
I came to the United States of America 5 years ago to pursue my dream of becoming an engineer.
I am currently living in Los Angeles with my sister, my brother in law and my beautiful niece and nephew.
Right now, I am on my last semester as a Mechanical Engineering student at California State University Northridge


Dynamic Query Notes
Table of Contents
Overview
The question often gets asked how to build dynamic or composable queries in postmodern. First we need to remember that the query macro assumes that everything that is not a list starting with a keyword will evaluate to a string.
There are generally two approaches to building dynamic or composible queries, either use sql-compile or use :raw. In either case you will need to ensure that either you have control over the inputs or they still result in parameterized queries. If not you have opened yourself up to an sql injection attack.
Approach #1 Use sql-compile
Sql-compile does a run-time compilation of an s-sql expression. In the following example, we create a function that accepts a where-clause, a table-name, 3 columns to select and two parameters to go into the where clause.
(defun toy-example (where-clause table-name col1 col2 col3 arg1 arg2) (with-test-connection (query (sql-compile (append `(:select ,col1 ,col2 ,col3 :from ,table-name :where) where-clause)) arg1 arg2))) (toy-example '((:and (:= 'city '$1) (:> 'salary '$2))) 'employee 'id 'name 'city "Toronto" 45000) ((6 "James" "Toronto") (9 "Mary" "Toronto"))
If we just look at what this call to sql-compile in toy-example generates, it would look like:
"(SELECT id, name, city FROM employee WHERE ((city = $1) and (salary > $2)))"
This example is still a parameterized query but for security reasons you will need to be very careful how you generate the where clause.
Another example with sql-compile and append, in this case updating a table and setting two columns to NULL.
(sql-compile (append '(:update :table1 :set) (loop for a in '("col1" "col2") collect a collect :NULL))) "UPDATE table1 SET E'col1' = NULL, E'col2' = NULL"
Lets think about it differently. What if we know the universe of columns we want to select, but want to conditionally select some of them. Suppose we know our targetted table has columns:
'id 'name 'salary 'start-date 'city 'region 'age.
We may decide we always want name, city and age, but salary and start-date are conditional.
(defun toy-example-2 (salaryp start-date-p) (sql-compile (remove nil `(:select 'name 'city 'age ,(if salaryp 'salary nil) ,(if start-date-p 'start-date nil) :from 'employee)))) (query (toy-example-2 t t)) (("Jason" "New York" 29 40420 #<SIMPLE-DATE:DATE 01-02-1994>) ("Robert" "Vancouver" 21 14420 #<SIMPLE-DATE:DATE 02-01-1995>) ("Celia" "Toronto" 24 24020 #<SIMPLE-DATE:DATE 03-12-1996>) ("Linda" "New York" 28 40620 #<SIMPLE-DATE:DATE 04-11-1997>) ("David" "Vancouver" 31 80026 #<SIMPLE-DATE:DATE 05-10-1998>) ("James" "Toronto" 26 70060 #<SIMPLE-DATE:DATE 06-09-1999>) ("Alison" "New York" 38 90620 #<SIMPLE-DATE:DATE 07-08-2000>) ("Chris" "Vancouver" 22 26020 #<SIMPLE-DATE:DATE 08-07-2001>) ("Mary" "Toronto" 34 60020 #<SIMPLE-DATE:DATE 08-06-2002>)) (query (toy-example-2 t nil)) (("Jason" "New York" 29 40420) ("Robert" "Vancouver" 21 14420) ("Celia" "Toronto" 24 24020) ("Linda" "New York" 28 40620) ("David" "Vancouver" 31 80026) ("James" "Toronto" 26 70060) ("Alison" "New York" 38 90620) ("Chris" "Vancouver" 22 26020) ("Mary" "Toronto" 34 60020))
You could skip the (remove nil… portion and substitute t for nil. E.g.
(defun toy-example-2 (salaryp start-date-p) (sql-compile `(:select 'name 'city 'age ,(if salaryp 'salary t) ,(if start-date-p 'start-date t) :from 'employee)))
But I prefer to remove those segments completely from the query.
Following on this same thread of thought, you can define a portion of the sql in a let clause:
(let ((sql1 '(:= name "Jason"))) (query (sql-compile `(:select 'name 'city 'age :from 'employee :where ,sql1)))) (("Jason" "New York" 29))
Approach #2 Use :raw
To quote Marijn, the :raw keyword takes a string and inserts it straight into the query. I try to stay away from :raw if possible, but sometimes…
(query (:select (:raw "tmp1.name") :from (:as 'baz (:raw "tmp1"))))


GitHub repo
Click the line numbers to toggle breakpoints.
Canvas is not supported.
Step
Start
Stop
Clear
Download rom
Go to
SP
PC


19 June 2016
What was a problem you solved this week in an elegant way?
This week we were asked to write a program that uses console.log to print all the numbers from 1 to 100, with two exceptions. For numbers divisible by 3, print "Fizz" instead of the number, and for numbers divisible by 5 (and not 3), print "Buzz" instead.
This part of the exercise was relatively straightforward and I used a for loop and the % operator to assign string elements to the code if the conditions were true (if the number was divisible by 3 or 5). Then we were asked to modify the program to print "FizzBuzz", for numbers that are divisible by both 3 AND 5 and still print "Fizz" or "Buzz" for numbers divisible by only one of those. And I was completely stuck on how to do this. I tried a couple of techniques, like trial and error (mostly got errors) and I re-read the material we had been given in preparation for the exercise. I knew the answer to the exercise was provided in the following page, so in the end I looked ahead to find the answer.
What did you learn?
The second version of the program was really clever. The simple way is to add another “branch” to precisely test the given condition. This involved build up a string containing the word or words to output (fizz, buzz, fizzbuzz) and print either this word or the number if there is no word, by making use of the || operator.
The problem with this solution is that I saw the correct code and thought 'oh yep, that makes sense' but I didn't actually learn anything. So afterward, I wrote out the code again and again on my own until I was able to confidently write the program without any prompts. I used pseudocode to write it out, used rubby ducky method to practice explaining it to someone else and made notes on using the || operator for future reference. I thought I would use this week's blog to write out the learning process involved as way of reflective learning practice.