# Deep Structured Semantic Models (DSSM)
Deep Structured Semantic Models (DSSM) is simple but powerful DNN based model for matching web search queries and the URL based documents. This example demonstrates how to use PaddlePaddle to implement a generic DSSM model for modeling the semantic similarity between two strings.
## Background Introduction
DSSM \[[1](##References)]is a classic semantic model proposed by the Institute of Physics. It is used to study the semantic distance between two texts. The general implementation of DSSM is as follows.
1. The CTR predictor measures the degree of association between a user search query and a candidate web page.
2. Text relevance, which measures the degree of semantic correlation between two strings.
3. Automatically recommend, measure the degree of association between User and the recommended Item.
## Model Architecture
In the original paper \[[1](#References)] the DSSM model uses the implicit semantic relation between the user search query and the document as metric. The model structure is as follows
Figure 1. DSSM In the original paper
With the subsequent optimization of the DSSM model to simplify the structure \[[3](#References)]，the model becomes：
Figure 2. DSSM generic structure
The blank box in the figure can be replaced by any model, such as fully connected FC, convoluted CNN, RNN, etc. The structure is designed to measure the semantic distance between two elements (such as strings).
In practice，DSSM model serves as a basic building block, with different loss functions to achieve specific functions, such as
- In ranking system, the pairwise rank loss function.
- In the CTR estimate, instead of the binary classification on the click, use cross-entropy loss for a classification model
- In regression model, the cosine similarity is used to calculate the similarity
## Model Implementation
At a high level, DSSM model is composed of three components: the left and right DNN, and loss function on top of them. In complex tasks, the structure of the left DNN and the light DNN can be different. In this example, we keep these two DNN structures the same. And we choose any of FC, CNN, and RNN for the DNN architecture.
In PaddlePaddle, the loss functions are supported for any of classification, regression, and ranking. Among them, the distance between the left and right DNN is calculated by the cosine similarity. In the classification task, the predicted distribution is calculated by softmax.
Here we demonstrate:
- How CNN, FC do text information extraction can refer to [text classification](https://github.com/PaddlePaddle/models/blob/develop/text_classification/README.md#模型详解)
- The contents of the RNN / GRU can be found in [Machine Translation](https://github.com/PaddlePaddle/book/blob/develop/08.machine_translation/README.md#gated-recurrent-unit-gru)
- For Pairwise Rank learning, please refer to [learn to rank](https://github.com/PaddlePaddle/models/blob/develop/ltr/README.md)
Figure 3 shows the general architecture for both regression and classification models.
Figure 3. DSSM for REGRESSION or CLASSIFICATION
The structure of the Pairwise Rank is more complex, as shown in Figure 4.
图 4. DSSM for Pairwise Rank
In below, we describe how to train DSSM model in PaddlePaddle. All the codes are included in `./network_conf.py`.
### Create a word vector table for the text
```python
def create_embedding(self, input, prefix=''):
'''
Create an embedding table whose name has a `prefix`.
'''
logger.info("create embedding table [%s] which dimention is %d" %
(prefix, self.dnn_dims[0]))
emb = paddle.layer.embedding(
input=input,
size=self.dnn_dims[0],
param_attr=ParamAttr(name='%s_emb.w' % prefix))
return emb
```
Since the input (embedding table) is a list of the IDs of the words corresponding to a sentence, the word vector table outputs the sequence of word vectors.
### CNN implementation
```python
def create_cnn(self, emb, prefix=''):
'''
A multi-layer CNN.
@emb: paddle.layer
output of the embedding layer
@prefix: str
prefix of layers' names, used to share parameters between more than one `cnn` parts.
'''
def create_conv(context_len, hidden_size, prefix):
key = "%s_%d_%d" % (prefix, context_len, hidden_size)
conv = paddle.networks.sequence_conv_pool(
input=emb,
context_len=context_len,
hidden_size=hidden_size,
# set parameter attr for parameter sharing
context_proj_param_attr=ParamAttr(name=key + 'contex_proj.w'),
fc_param_attr=ParamAttr(name=key + '_fc.w'),
fc_bias_attr=ParamAttr(name=key + '_fc.b'),
pool_bias_attr=ParamAttr(name=key + '_pool.b'))
return conv
logger.info('create a sequence_conv_pool which context width is 3')
conv_3 = create_conv(3, self.dnn_dims[1], "cnn")
logger.info('create a sequence_conv_pool which context width is 4')
conv_4 = create_conv(4, self.dnn_dims[1], "cnn")
return conv_3, conv_4
```
CNN accepts the word sequence of the embedding table, then process the data by convolution and pooling, and finally outputs a semantic vector.
### RNN implementation
RNN is suitable for learning variable length of the information
```python
def create_rnn(self, emb, prefix=''):
'''
A GRU sentence vector learner.
'''
gru = paddle.networks.simple_gru(
input=emb,
size=self.dnn_dims[1],
mixed_param_attr=ParamAttr(name='%s_gru_mixed.w' % prefix),
mixed_bias_param_attr=ParamAttr(name="%s_gru_mixed.b" % prefix),
gru_param_attr=ParamAttr(name='%s_gru.w' % prefix),
gru_bias_attr=ParamAttr(name="%s_gru.b" % prefix))
sent_vec = paddle.layer.last_seq(gru)
return sent_vec
```
### FC implementation
```python
def create_fc(self, emb, prefix=''):
'''
A multi-layer fully connected neural networks.
@emb: paddle.layer
output of the embedding layer
@prefix: str
prefix of layers' names, used to share parameters between more than one `fc` parts.
'''
_input_layer = paddle.layer.pooling(
input=emb, pooling_type=paddle.pooling.Max())
fc = paddle.layer.fc(
input=_input_layer,
size=self.dnn_dims[1],
param_attr=ParamAttr(name='%s_fc.w' % prefix),
bias_attr=ParamAttr(name="%s_fc.b" % prefix))
return fc
```
In the construction of FC, we use `paddle.layer.pooling` for the maximum pooling operation on the word vector sequence. Then we transform the sequence into a fixed dimensional vector.
### Multi-layer DNN implementation
```python
def create_dnn(self, sent_vec, prefix):
# if more than three layers exists, a fc layer will be added.
if len(self.dnn_dims) > 1:
_input_layer = sent_vec
for id, dim in enumerate(self.dnn_dims[1:]):
name = "%s_fc_%d_%d" % (prefix, id, dim)
logger.info("create fc layer [%s] which dimention is %d" %
(name, dim))
fc = paddle.layer.fc(
input=_input_layer,
size=dim,
act=paddle.activation.Tanh(),
param_attr=ParamAttr(name='%s.w' % name),
bias_attr=ParamAttr(name='%s.b' % name),
)
_input_layer = fc
return _input_layer
```
### Classification / Regression
The structure of classification and regression is similar. Below function can be used for both tasks.
```python
def _build_classification_or_regression_model(self, is_classification):
'''
Build a classification/regression model, and the cost is returned.
A Classification has 3 inputs:
- source sentence
- target sentence
- classification label
'''
# prepare inputs.
assert self.class_num
source = paddle.layer.data(
name='source_input',
type=paddle.data_type.integer_value_sequence(self.vocab_sizes[0]))
target = paddle.layer.data(
name='target_input',
type=paddle.data_type.integer_value_sequence(self.vocab_sizes[1]))
label = paddle.layer.data(
name='label_input',
type=paddle.data_type.integer_value(self.class_num)
if is_classification else paddle.data_type.dense_input)
prefixs = '_ _'.split(
) if self.share_semantic_generator else 'source target'.split()
embed_prefixs = '_ _'.split(
) if self.share_embed else 'source target'.split()
word_vecs = []
for id, input in enumerate([source, target]):
x = self.create_embedding(input, prefix=embed_prefixs[id])
word_vecs.append(x)
semantics = []
for id, input in enumerate(word_vecs):
x = self.model_arch_creater(input, prefix=prefixs[id])
semantics.append(x)
if is_classification:
concated_vector = paddle.layer.concat(semantics)
prediction = paddle.layer.fc(
input=concated_vector,
size=self.class_num,
act=paddle.activation.Softmax())
cost = paddle.layer.classification_cost(
input=prediction, label=label)
else:
prediction = paddle.layer.cos_sim(*semantics)
cost = paddle.layer.square_error_cost(prediction, label)
if not self.is_infer:
return cost, prediction, label
return prediction
```
### Pairwise Rank
```python
def _build_rank_model(self):
'''
Build a pairwise rank model, and the cost is returned.
A pairwise rank model has 3 inputs:
- source sentence
- left_target sentence
- right_target sentence
- label, 1 if left_target should be sorted in front of right_target, otherwise 0.
'''
source = paddle.layer.data(
name='source_input',
type=paddle.data_type.integer_value_sequence(self.vocab_sizes[0]))
left_target = paddle.layer.data(
name='left_target_input',
type=paddle.data_type.integer_value_sequence(self.vocab_sizes[1]))
right_target = paddle.layer.data(
name='right_target_input',
type=paddle.data_type.integer_value_sequence(self.vocab_sizes[1]))
label = paddle.layer.data(
name='label_input', type=paddle.data_type.integer_value(1))
prefixs = '_ _ _'.split(
) if self.share_semantic_generator else 'source target target'.split()
embed_prefixs = '_ _'.split(
) if self.share_embed else 'source target target'.split()
word_vecs = []
for id, input in enumerate([source, left_target, right_target]):
x = self.create_embedding(input, prefix=embed_prefixs[id])
word_vecs.append(x)
semantics = []
for id, input in enumerate(word_vecs):
x = self.model_arch_creater(input, prefix=prefixs[id])
semantics.append(x)
# cossim score of source and left_target
left_score = paddle.layer.cos_sim(semantics[0], semantics[1])
# cossim score of source and right target
right_score = paddle.layer.cos_sim(semantics[0], semantics[2])
# rank cost
cost = paddle.layer.rank_cost(left_score, right_score, label=label)
# prediction = left_score - right_score
# but this operator is not supported currently.
# so AUC will not used.
return cost, None, None
```
## Data Format
Below is a simple example for the data in `./data`
### Regression data format
```
# 3 fields each line:
# - source's word ids
# - target's word ids
# - target
\t \t
```
The example of this format is as follows.
```
3 6 10 \t 6 8 33 \t 0.7
6 0 \t 6 9 330 \t 0.03
```
### Classification data format
```
# 3 fields each line:
# - source's word ids
# - target's word ids
# - target
\t \t


{{template "filter.html"}}
Save all
Reset
Confirm All
Freeze
Unfreeze
Account Set-Up Details
Save
Reset
Confirm
City Name
Login Date
Deal No.
RM Name
Branch Head
PD Info
Click to enter details & hover to show details
Credit Analyst
Lead Distributor
Product
Scheme
Borrower Details
Save
Reset
Confirm
Company Background
Business Segment
Diversification: No. of clients / customers
Dependence on Suppliers
Business Vintage
External Rating
Borrower Constitution
Management
Business Start Date
Top Customer Names
Product : Name & Details
Orders in Hand
Projects Completed
Second Line in Business
Comment on Financials
Expansion Plans
Reference Check
Market Reference
Reference Check Details
Add Reference Check
REFERENCE CHECK
Management & Promoter Details
Add Main Promoter
Save
Reset
Confirm
Name of Main Promoter
Experience in Same Line of Business (Yrs)
Educational Qualification of main Promoter
Residence Ownership Status
Office Ownership Status
CIBIL Score
Real Estate Position (Rs. Lacs)
Minimal CIBIL Score
Distributor / Vendor Repayment Track
Average Delay Days(Avg)
Average Delays Days (Highest)
Add Vendor
Save
Reset
Confirm
Distributor Name
Max Delay Days
Max Payment Days
Average Delay Days
Standard Deviation
Average Payment Days
Avg. Transaction Weighted Payment Delay Days
Standard Deviation
Avg. Transaction Weighted Payment Days
Standard Deviation
Amount of Business Done with Distributor (Rs. Lacs)
Loan Details
Save
Reset
Confirm
Loan Detail
Requested Loan Amount
Proposed Amount of Limit (Rs. Lacs)
Limit Tenor (Months)
Proposed Rate of Interest (ROI) %
Proposed Processing Fee %
Proposed X10 Interest Outgo in (Rs. Lacs)
Security Structure
Type of Security
Details of Security
Purchase Order Backing
If Backed By PO
Project PO Value for Back to Back Transaction
Expected Payment from project in 120 days (Rs. Lacs)
Existing X-10 Customer Details
If Existing Customer
If Yes, Existing Limit Amount (Rs. Lacs)
Existing ROI %
Existing Processing Fee %
First Agreement Date
Recent Agreement Date
Vintage with X10 (in months)
Commercial CIBIL Report
Customer Business Mix
Save
Reset
Confirm
Stock & Sell - in %
B2B - Govt.- in %
B2B - Corporate - in %
Distributor Mix
Add Vendor
Save
Reset
Confirm
×
PD Info
PD Done By
PD Date
PD Place
Person Met
Customer Margin(%)
PD Remarks
PD Comments


100MiBs the Limit
This site requires some cool Web 2.0 stuff Install the latestFirefox or Botnet and come back <3


Gateway
BOT
19-Nov-18 08:41 PM
[dscrd-hush] <KillahJon> thanks it worked!
[dscrd-hush] <Berg> :aengrythonk:
[dscrd-hush] <halo kitty rules> @KillahJon yes, we can see on coinexchange. Thanks!
[dscrd-hush] <KillahJon> lol
[dscrd-hush] <KillahJon> my cousin wanted to rid of his
[dscrd-hush] <KillahJon> i still have mine
[dscrd-hush] <KillahJon> he dumped for cheap
[dscrd-hush] <halo kitty rules> Next time seeking for instructions at least erase amount completely. There are still some digits half-visiable and it's possible to see the number of digits before dots. Thank you, I was able to lower my orders in time (you don't have to tell your cousin).
[dscrd-hush] <KillahJon> oo thanks'
[dscrd-hush] <halo kitty rules> @Berg you got yours? Or blue donkey ate all the funds?
[dscrd-hush] <Berg> Still have all my crypto investments
[dscrd-hush] <Berg> My car fund is in NYSE/NASDAQ
[dscrd-hush] <Berg> Which if BTC falls to $3K will all get converted over into BTC
[dscrd-hush] <Berg> Most of the work I do on my car is just me working in my garage, I spend money on sheet metal and gasses and whatnot, but until I buy a new motor entirely, self-bodywork is cheap.
[dscrd-hush] <halo kitty rules> In december/january keep an eye on ETH. Bottom supports are 100 and 90 USD respectively. And it is an annual ETH run compared to BTC from january on.
[dscrd-hush] <Berg> You think ETH is a safe bet for January?
[dscrd-hush] <Berg> I haven't personally followed them much since I last cashed out.
[dscrd-hush] <Berg> I knew there was a lot of turmoil and insecurity over ETH in the past few months, I'll have to do my research on what that was all about.
[dscrd-hush] <halo kitty rules> Yes, I think it is a safe bet. I will go into. But gains will not be as high as we are used to. I expect we will break BTC 6200 USD resistance only in next autumn.
[dscrd-hush] <halo kitty rules> Until than I just hope KillahJon has some more cousins...
[dscrd-hush] <Berg> Ahahahaha
[dscrd-hush] <Berg> Yeah I'll definitely continue to average as things come down
[dscrd-hush] <Berg> Not a single green in the top 100
[dscrd-hush] <KillahJon> no more lol
[dscrd-hush] <halo kitty rules> See, soon it will be 1/2 of your crypto value. Cross fingers that Cryptopia will not enable trading before summer.
[dscrd-hush] <KillahJon> im starting to think that hush will bever be enabled on cryptopia again
[dscrd-hush] <Berg> I think you're thinking wrong
[dscrd-hush] <Berg> I can guarantee you that the team and I are working very hard on rectifying Cryptopia's situation.
[dscrd-hush] <KillahJon> oh i don't doubt your hard work
[dscrd-hush] <KillahJon> just them
[dscrd-hush] <Berg> And we have made tremendous progress
[dscrd-hush] <KillahJon> lol.
[dscrd-hush] <Berg> I think we're going to end up in a good place
[dscrd-hush] <Berg> My morale is very high, and I'm not just saying that to save face for PR or whatever
[dscrd-hush] <Berg> That's not my style
[dscrd-hush] <halo kitty rules> @KillahJon cousin still has his HUSH?
[dscrd-hush] <halo kitty rules> It would be nice to know in time.
[dscrd-hush] <KillahJon> lol
[dscrd-hush] <KillahJon> he's not gonna sell his hush


the and for SARS-CoV- with are The {background margin that {border-style viral px;} #ffffff;} (), coronavirus â€". Mpro from virus its COVID- protein angiotensin clinical has human which RNA have host into may therapeutic through ACE TMPRSS been drug drugs inhibitors respiratory was H.; can disease infection other patients protease px; such {font-family C.; J.; RdRp against also among font-size lung more structures will S). Spike ZhangL.; agents coronaviruses currently double; entry expression future infected likely new novel proteins targets these A.; M.; SARS-CoV SARS-CoV-. These This acute approved being border-color border-width catalytic cells current fatality high not rate reported solid; structure than virus. {font-style {font-weight (Figure (NCT). (nsp, ./s---. COVID-. LiuY.; Med. S.; W.; While ZhangY.; additional all amino antiviral associated bold but cases cell cleavage courier; crystal development discovery effect effective em; first genome highly immune inhibitor membrane most only pandemic patients. pneumonia positive potential proteases pt;} recently replication repurposing several severe show structural syndrome tested testing their there they this three trials two were


| File | Statements | Branches | Functions | Lines | |||||
|---|---|---|---|---|---|---|---|---|---|
| button.spec.ts | 100% | 28/28 | 100% | 0/0 | 100% | 6/6 | 100% | 28/28 | |
| buttongroup.spec.ts | 100% | 4/4 | 100% | 0/0 | 100% | 2/2 | 100% | 4/4 | |
| cascsder.spec.ts | 100% | 30/30 | 100% | 0/0 | 100% | 9/9 | 100% | 30/30 | |
| collapse.spec.ts | 100% | 35/35 | 100% | 0/0 | 100% | 10/10 | 100% | 35/35 | |
| datepicker.spec.ts | 100% | 150/150 | 100% | 0/0 | 100% | 34/34 | 100% | 150/150 | |
| dialog.spec.ts | 100% | 42/42 | 100% | 0/0 | 100% | 8/8 | 100% | 42/42 | |
| gird.spec.ts | 100% | 16/16 | 100% | 0/0 | 100% | 6/6 | 100% | 16/16 | |
| icon.spec.ts | 100% | 9/9 | 100% | 0/0 | 100% | 3/3 | 100% | 9/9 | |
| input.spec.ts | 100% | 75/75 | 100% | 0/0 | 100% | 6/6 | 100% | 75/75 | |
| layout.spec.ts | 100% | 7/7 | 100% | 0/0 | 100% | 2/2 | 100% | 7/7 | |
| menu.spec.ts | 100% | 43/43 | 100% | 0/0 | 100% | 11/11 | 100% | 43/43 | |
| pagination.spec.ts | 100% | 40/40 | 100% | 0/0 | 100% | 9/9 | 100% | 40/40 | |
| popover.spec.ts | 100% | 15/15 | 100% | 0/0 | 100% | 5/5 | 100% | 15/15 | |
| swiper.spec.ts | 100% | 54/54 | 100% | 0/0 | 100% | 17/17 | 100% | 54/54 | |
| table.spec.ts | 100% | 59/59 | 100% | 0/0 | 100% | 13/13 | 100% | 59/59 | |
| tabs.spec.ts | 100% | 36/36 | 100% | 0/0 | 100% | 9/9 | 100% | 36/36 | |
| toast.spec.ts | 100% | 26/26 | 100% | 0/0 | 100% | 8/8 | 100% | 26/26 | |
| upload.spec.ts | 97.37% | 37/38 | 100% | 2/2 | 90% | 9/10 | 97.37% | 37/38 |


Advance at least one level every 10 weeks
Find out moreStudying English abroad is an investment in your future, so we want to assure you that it is a sensible investment that will get you to where you need to be.
You will advance at least one level of English fluency every 10 weeks on a course that offers Guaranteed Progression. All students are placed in their classes using our adaptive KITE test as well as an initial consultation with one of our teachers. After that, students are tested every 10 weeks to see if they can progress to the next level. The KITE test adapts to your skill level and measures your progress as you study English to ensure you benefit from a fully tailored learning experience.
If you don’t improve by at least one level every 10 weeks, but have attended all your classes and completed all your homework assignments, then we will stand behind our methods by giving you four weeks of free tuition to get you to that next level.
You know a few simple words and phrases, but you have a very small vocabulary and can only communicate basic needs.
You have some understanding of grammar and a growing functional vocabulary. You can speak and write basic sentences.
You can participate in simple conversations, read longer texts and write short compositions.
You can participate fully in more complex conversations, read more advanced texts and write a simple essay.
You can handle most social and professional situations, explain complex thoughts fluently, and understand the general themes of radio and TV broadcasts.
You can read demanding texts and handle long, in-depth discussions. You can understand and express subtle shades of meaning. You are very close to using the language like a native speaker.
TOEFL®: 0-12
IELTS: 3.0
CAMBRIDGE: 100-120
ALTE: Breakthrough Level
CEFR: A1
TOEFL®: 13-36
IELTS: 3.5-4.0
CAMBRIDGE: 100-120 KET
ALTE: Level 1
CEFR: A2
TOEFL®: 37-54
IELTS: 4.5-5.0
CAMBRIDGE: 140-160 PET
ALTE: Level 2
CEFR: B1
PTE: 43-58
TOEFL®: 55-74
IELTS: 5.5-6.0
CAMBRIDGE: 160-180 FCE
ALTE: Level 3
CEFR: B2
PTE: 59-75
TOEFL®: 75-91
IELTS: 6.5-7.0
CAMBRIDGE: 180-200 CAE
ALTE: Level 4
CEFR: C1
PTE: 76-84
TOEFL®: 92-100
IELTS: 7.5-8.0
CAMBRIDGE: 200+ CAE
ALTE: Level 5
CEFR: C2
PTE: 85-100
We offer Guaranteed Progression on the following Kaplan English courses:
Guaranteed Progress is available in all of our English schools in US, UK, Ireland and Canada. We guarantee progression in fluency levels on the condition that students have a 95% attendance rate, complete all of their homework assignments and do not display any behavioural issues.
If you wish to know more, please read the full terms and conditions.


The Platform
interface provides callbacks that allow to perform
RDBMS Platform specific operations whereever neccessary.
The class PlatformDefaultImpl
implements Platform
and
provides default implementations of all methods.
For each supported Platform Xxx
there is a class PlatformXxxImpl
which extends PlatformDefaultImpl
and may override the methods of the
baseclass.
The factory class PlatformFactory
can be used to create Platform
instances. It uses information from a JdbcConnectionDescriptor
to
select the appropriate PlatformXxxImpl
class.
Patterns applied: Configurable Factory, Strategy, Bridge
Todo: Provide more Platform-Implementations


Using Arm7 assmbly to program an old fashion SpaceInvader. Program a Hotel Safe Lock Using C, alone with other Low Level hardware design. Go to my GitHub and see more!
Link To My GithubWorked in a team with five members, designed a fun and challenging shooting game. Our game was inspired by an ancient game Galaga.
Youtube VideoBasic Embeded System I build with Feather m0 and Feather Wing. The device sense the surrounding apmasphere and play different melodies. The user can also configure different playlist.
Youtube Video


--- layout: doc_layout title: Unity category: IoC Container Support prev: /docs/ioc/structuremap.html next: /docs/ioc/customadapters.html ---
To use Unity, add this NuGet package to your project:
PM> Install-Package Wave.IoC.Unity
With this package installed, enabling Unity as the IoC container can be done using fluent configuration when configuring the host:


This is a Steenrod calculator. A Steenrod square is input like "Sq5" or "P5". The Milnor primitives are written like "Q2". In particular, at an odd prime the Bockstein is currently written "Q0". The Milnor basis elements are denoted like "Sq(0,1)" which is the same as "Q1" at the prime 2 or "P(0,0,1)" which is $[[P^1,P^p],P^{p^2}]$.
In order to multiply two elements you MUST include a "*" between them, for instance "Sq4*Sq2*Sq1". You can use parentheses for grouping as in "(Q2 + Sq7)*Sq2". Input can be an arbitrary homogenous arithmetic expression using +, -, *, and parentheses in these generators. Scalars are denoted like "2*P2". "P1*P1*2", or "-P1*P1" or "P1*P1*-1" are all valid notations.
For convenience, we also allow the notation "A(2 2 2 2)" for $Sq^2 Sq^2 Sq^2 Sq^2$ and "A(1 b 1)" for "P^1 \beta P^1". The letter "A" here stands for "admissible", though of course the sequences involved are not admissible. We also allow "M(0 0 2)" as an alternate notation for "P(0, 0, 2)" or "Sq(0,0,2)".


AHM Kamal got B.Sc. and M.Sc. on Computer Science and Engineering from SUST, Bagladesh in 2004 and 2005 respectively. After graduation he served as a Lecturer at the Department of Computer Science and Engineering (CSE) in Institute of Science, Trade and Technology, Bangladesh. In 2009, he joined in a Public University, Jessore University of Science and Technology, as a Lecture at the CSE Department. He then promoted as an Assistant Professor by 2012. In 2015, Mr. Subrata changed his professional place and recruited as an Assistant Professor at the Department of Computer Science and Engineering in Jatiya Kabi Kazi Nazrul Islam University, Bangladesh and serving to date.
| Year | Name of the award |
|---|---|
| 2006 | Cloud & Parallel Computing |
| 2009 | Big Data Analysis and Management |
| 2013 | High-performance and Low-Power Real-Time Systems |
| Year | Rank | Company/Institute/University |
|---|---|---|
| 2006-Present | Associate Professor | Jatiya Kabi Kazi Nazrul Islam University |
| 2004-2006 | Lecturer | Brac University |
| 2003-2004 | Senior System Administrator | Axle Technologies |
| Course Code | Course Name |
|---|---|
| CSE-121 | Structured Programming |
| CSE-221 | Algorithms |
| CSE-305 | Theory of Computation |
| CSE-405 | Network Security |
| CSE-439 | Digital Image Processing |
| Topic | Info |
|---|---|
| How Bubble Sort Works | Bubble sort. Bubble sort, sometimes referred to as sinking sort, is a simple sorting algorithm that repeatedly steps through the list to be sorted, compares each pair. |
| Greedy Method | A greedy algorithm is an algorithmic paradigm that follows the problem solving heuristic of making the locally optimal choice at each stage with the hope of finding a global optimum. |
| EDI Security | Electronic data interchange (EDI) is a major innovation in the practical use of computing. It is already being used extensively in some segments of the retailing |


My passion is to blur the boundary between Technology and art to create innovative IT solutions.
Current Project
My first goal is to create a portfolio that will display all my current and completed projects while evolving to showcase the skills I gain throughout my career.
The features I am currently implementing are:
- Image of erasor in the footer
- Scrolling front page that will display short text animations
- A linked Wordpress blog that will document and track the portfolios evolution while simultaneously evolving to match its graphical style
- Animated infographics for project progression
- Update news feed that links to the Wordpress blog
What can I do for your business?
Web design is no longer just about presenting dry paragraphs of information, it’s about creating an engaging and artistic solution that can be accessed quickly and easily by the widest possible audience.
My solutions achieve this by providing the following:
- Placing a strong emphasis on search engine optimisation (SEO) in regards to visible content, metadata and the coding structure
- Minimising loading times to maximise end-user satisfaction
- Optimised coding to increase accessibility to a global audience
- Screen reader friendly coding
- Ensuring that older browsers render the website effectively to maximise accessibility.
- Scalable and robust design that seamlessly adapts to large monitor resolutions or small screen portable devices
- All graphical design work will be heuristically evaluated and tested to ensure compliance with Nielsen’s Heuristics, Norman’s design principles and Shneiderman’s Golden Rules


new EventBus()
- Source:
Members
(private, inner, constant) handlers :Object
Map object putting in relations actions (keys) and an array of
callbacks (handlers)
Type:
- Object
- Source:
Methods
(private, inner) _emitSingleAction(action, …params) → {object}
Trigger the callbacks associated with a single action
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
action |
string | The action to trigger | |
params |
string |
<repeatable> |
The params to pass to each callback |
- Source:
Returns:
Self-reference for object chaining
- Type
- object
(private, inner) _splitEmitParams(params) → {array}
Helper function that splits the mixed actions and parameters values.
The actions values must be positioned before the parameters ones.
Parameters:
| Name | Type | Description |
|---|---|---|
params |
array | Mixed actions and parameters values |
- Source:
Returns:
An array containing nested arrays actions and params
- Type
- array
(inner) emit(…params) → {object}
Trigger the callbacks associated with the actions passed in parameters
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
params |
string |
<repeatable> |
Mix of actions and parameters values. The actions values must be positioned before the parameters ones. |
- Source:
Returns:
Self-reference for object chaining
- Type
- object
(inner) on(action, handler) → {object}
Register a new callback to the defined action
Parameters:
| Name | Type | Description |
|---|---|---|
action |
string | The action to be associated with the handler |
handler |
function | The handler to register |
- Source:
Returns:
Self-reference for object chaining
- Type
- object


We Need to Talk About Kevin
We Need to Talk About Kevin is a movie starring Tilda Swinton, John C. Reilly, and Ezra Miller. Kevin's mother struggles to love her strange child, despite the increasingly dangerous things he says and does as he grows up. But Kevin...


--- layout: default title: About slug: about lead: "Learn about the SunPy Project." base_url: "../" ---
SunPy is a free and open-source software library for solar physics based on Python.
SunPy is a community-developed free and open-source software package for solar physics. SunPy is meant to be a free alternative to the SolarSoft data analysis environment which is based on the IDL scientific programming language sold by Exelis. Though SolarSoft is open-source IDL is not and can be prohibitively expensive. The aim of the SunPy project is to provide the software tools necessary so that anyone can analyze solar data. SunPy is written using the Python programming language and is build upon the scientific Python environment which includes the core packages NumPy, SciPy. The development of SunPy is associated with that of Astropy. SunPy was founded on March 28, 2011 by a small group of scientists and developers at the NASA Goddard Space Flight Center. Thanks to the generous support of the ESA Summer of Code and the Google Summer of Code as well as contributors from around the world, SunPy is now a global project and is not associated with any individual institution.
SunPy is a living code base with many contributors. Anyone can and is welcome to get involved.
SunPy (the project) is run by the SunPy organization. This organization was founded and defined by this document. Its primary goal is to facilitate and promote the use and development of a community-led, free and open-source solar data-analysis software based on the scientific Python environment. The organization consists of a lead developer, a board of directors, and the developer community. The purpose of the board is to lead the overal structure and direction of SunPy while the lead developer works with the developer community to implement it.
The SunPy board is composed of the following members (in alphabetical order)
SunPy is an alternative to the popular SolarSoft analysis environment
The IDL-based SolarSoft analysis environment is a mature and rich code base to do Solar physics. Unfortunately not every person or institution have the capital necessary to fund a yearly IDL license. With the rise of scientific computing in Python new tools are now available to make developing the basics of a solar data analysis environment straightforward.
Stay up to date on the development of SunPy and interact with the community with these helpful resources.
Anyone can and is welcome to get involved. Many methods of interactions are provide and please refer to our Code of Conduct.matrix.org
, in the #sunpy-general channel.We are looking forward to meeting you!
SunPy is a living code base with many contributors. Anyone can and is welcome to get involved.
The SunPy board is composed of the following members (in alphabetical order)
If you have used SunPy in your scientific work we would appreciate it if you would acknowledge it.
The continued growth and development of SunPy is dependent on the community being aware of the use SunPy. If you use SunPy, we therefore ask that you acknowledge SunPy appropriately in a publication or presentation (poster or talk).
Part of SunPy has been developed with help from the Google and ESA Summer of Code programs.
Part of the development of SunPy has been generously supported by the Google Summer of Code (GSOC) as well as the European Space Agency Summer of Code in Space (SOCIS). Both of these programs have funded several students to work on SunPy for a few months (usually during the summer).
SunPy would like to thank both of these programs for their support.


{{ tournament.style }}
{{ tournament.players|length }}
{%- if tournament.startTime -%}{{ tournament.startTime|datetime }}
{%- if tournament.checkInTime -%}{{ (tournament.startTime - tournament.checkInTime)|timedelta }} before
{%- endif -%} {%- endif -%} {%- if not inApp -%}1v1 Stock
8 minutes
First game: alternate; highest seed first
Second game: loser picks
Twilight Grove Kings Pass Thundergard Stadium Blackguard Keep Mammoth Fortress Great Hall Shipwreck Falls
{{ tournament.description }}


{% extends 'generic/base.html' %} {% block title %} {{ block.super }} | Reports {% endblock %} {% block page_first_header %} Reports for {{ patron.full_name }} {% endblock %} {% block content %}
Please select a report from the following list. You'll be prompted for more info as needed
{% endblock %}


Plugin Information |
|---|
View export dynamic job data on the plugin site for more information. |
Adds a build step that exports runtime parameters into a properties file (e.g who triggered the build, what is her email address...). This information can be read by other build steps.
job-exporter plugin
Enabling
To use it, edit the configuration of a particular job, go to "Build" and click "Add build step", in the list select "Export Job runtime parameters", this will create the files at the point in the build where this step is executed.
Details
This plugin exports Jenkins (runtime) job parameters into a ".properties" file. So other build steps (e.g. ant scripts) can read those parameters and work with them. For example: send some information via email to the user who triggered a job.
The property file is named "hudsonBuild.properties" and will be created in the project workspace. This file contains the following informations:
Property |
Meaning |
|---|---|
build.jobName |
Name of running job. |
build.id |
Build ID. |
build.number |
Number of running job. |
build.host |
Job runs on this host. |
build.slave |
Job runs on this slave. |
build.result |
Job result til this build step. |
build.started |
Job started at this time. |
build.elapsedTime |
Milliseconds the job is already running. |
build.duration |
Human readable elapsed time. |
build.executor |
Executor number. |
build.cvsBranch |
CVS branch, if configured. |
build.svnRevision |
SVN revision, if configured. |
build.gitBranch |
GIT branch, if configured. |
build.user.id |
ID of user that triggered this job. Has value of "null" for anonymous user. Only filled if the build was triggered by an user. |
build.user.name |
User that triggered this job. Only filled if the build was triggered by an user. |
build.user.fullName |
Full name of user that triggered this job. Mostly identical with value of "build.user.name" (if ID is not null). |
build.user.emailAddress |
Email address of user that triggered this job. If no user with email address was found, the admin email address stands here. |
build.upstream.number |
Number of upstream job that triggered this job. Only filled if the build was triggered by an upstream project. |
build.upstream.project |
Upstream project that triggered this job. |
build.remote.host |
Remote host that triggered this job. Only filled if the build was triggered by a remote host. |
build.remote.note |
Host note for remotely triggered job. |
build.admin.emailAddress |
This is the current administrator email address. |
build.summary |
Build summary like "Executor #3 for master : executing MyJob #28" |
build.hudson.version |
Running Jenkins version. |
Version History
Version 0.4 (27 Jan 2012)
- Now working with current Jenkins version again.
- Some more properties are exported.
Version 0.3.1 (22 Mar 2011)
- Rerelease 0.3 to properly set required core version.
Version 0.3 (31 Jan 2011)
- This is just a bugfix release that should work as described before.
Version 0.2 (29 Jan 2011)
- User triggered build now has correct user email address again
- Upstream and remote build causes also provide some informations
Version 0.1 (01 Dec 2009)
- Initial release


Joshua John Villahermosa
Write a function countZeroes, which takes an array of numbers as its argument and returns the amount of zeroes that occur in it. Use reduce. Then, write the higher-order function count, which takes an array and a test function as arguments, and returns the amount of elements in the array for which the test function returned true. Re-implement countZeroes using this function.
Write a function processParagraph that, when given a paragraph string as its argument, checks whether this paragraph is a header. If it is, it strips off the '%' characters and counts their number. Then, it returns an object with two properties, content, which contains the text inside the paragraph, and type, which contains the tag that this paragraph must be wrapped in, "p" for regular paragraphs, "h1" for headers with one '%', and "hX" for headers with X '%' characters. Remember that strings have a charAt method that can be used to look at a specific character inside them.
% The Book of Programming %% The Two Aspects Below the surface of the machine, the program moves. Without effort, it expands and contracts. In great harmony, electrons scatter and regroup. The forms on the monitor are but ripples on the water. The essence stays invisibly below. When the creators built the machine, they put in the processor and the memory. From these arise the two aspects of the program. The aspect of the processor is the active substance. It is called Control. The aspect of the memory is the passive substance. It is called Data. Data is made of merely bits, yet it takes complex forms. Control consists only of simple instructions, yet it performs difficult tasks. From the small and trivial, the large and complex arise. The program source is Data. Control arises from it. The Control proceeds to create new Data. The one is born from the other, the other is useless without the one. This is the harmonious cycle of Data and Control. Of themselves, Data and Control are without structure. The programmers of old moulded their programs out of this raw substance. Over time, the amorphous Data has crystallised into data types, and the chaotic Control was restricted into control structures and functions. %% Short Sayings When a student asked Fu-Tzu about the nature of the cycle of Data and Control, Fu-Tzu replied 'Think of a compiler, compiling itself.' A student asked 'The programmers of old used only simple machines and no programming languages, yet they made beautiful programs. Why do we use complicated machines and programming languages?'. Fu-Tzu replied 'The builders of old used only sticks and clay, yet they made beautiful huts.' A hermit spent ten years writing a program. 'My program can compute the motion of the stars on a 286-computer running MS DOS', he proudly announced. 'Nobody owns a 286-computer or uses MS DOS anymore.', Fu-Tzu responded.  Reading it, a student asked 'You warned us against these techniques, yet I find them in your program. How can this be?' Fu-Tzu said 'There is no need to fetch a water hose when the house is not on fire.'{This is not to be read as an encouragement of sloppy programming, but rather as a warning against neurotic adherence to rules of thumb.} %% Wisdom A student was complaining about digital numbers. 'When I take the root of two and then square it again, the result is already inaccurate!'. Overhearing him, Fu-Tzu laughed. 'Here is a sheet of paper. Write down the precise value of the square root of two for me.' Fu-Tzu said 'When you cut against the grain of the wood, much strength is needed. When you program against the grain of a problem, much code is needed.' Tzu-li and Tzu-ssu were boasting about the size of their latest programs. 'Two-hundred thousand lines', said Tzu-li, 'not counting comments!'. 'Psah', said Tzu-ssu, 'mine is almost a *million* lines already.' Fu-Tzu said 'My best program has five hundred lines.' Hearing this, Tzu-li and Tzu-ssu were enlightened. A student had been sitting motionless behind his computer for hours, frowning darkly. He was trying to write a beautiful solution to a difficult problem, but could not find the right approach.  The student started writing an ugly solution. After he had finished, he suddenly understood the beautiful solution. %% Progression A beginning programmer writes his programs like an ant builds her hill, one piece at a time, without thought for the bigger structure. His programs will be like loose sand. They may stand for a while, but growing too big they fall apart{Referring to the danger of internal inconsistency and duplicated structure in unorganised code.}. Realising this problem, the programmer will start to spend a lot of time thinking about structure. His programs will be rigidly structured, like rock sculptures. They are solid, but when they must change, violence must be done to them{Referring to the fact that structure tends to put restrictions on the evolution of a program.}. The master programmer knows when to apply structure and when to leave things in their simple form. His programs are like clay, solid yet malleable. %% Language When a programming language is created, it is given syntax and semantics. The syntax describes the form of the program, the semantics describe the function. When the syntax is beautiful and the semantics are clear, the program will be like a stately tree. When the syntax is clumsy and the semantics confusing, the program will be like a bramble bush. Tzu-ssu was asked to write a program in the language called Java, which takes a very primitive approach to functions. Every morning, as he sat down in front of his computer, he started complaining. All day he cursed, blaming the language for all that went wrong. Fu-Tzu listened for a while, and then reproached him, saying 'Every language has its own way. Follow its form, do not try to program as if you were using another language.'


In this blog post we will discuss about what is variable scope, and what kind of variables exist in Ruby.
What is scope in general? Scope is an area of visibility. If we look at this word in programming world, it means absolutely the same, variable scope defines where in the program one or the other variable is accessible. I will give you few examples of variables that we have in Ruby:
$variable - is a global variable that is accessible everywhere in the code for a program.
@@variable - is a class variable that is accessible for all instances of a class, and it doesn’t mean that this variable can be shared between classes, it is available across objects of ne class.
@variable - is an instance variable that is accessible across methods for any particular instance or object. It is similar to class variable, but this variable value is local to specific instances of an object.
variable - is a local variable that is accessible within the method where it was defined, and it is not available outside of this specific method.
VARIABLE - is a constant variable, that is accessible across the class and module, once value is assigned it shouldn’t be changed.
So we’ve described all kinds of variables existing in Ruby. Are you still confused and don’t know how to use them all in your program? Let’s describe each variable separately, what those variables do and where can we use them.
Global variables.
Global variables begin with “$” sign followed by lowercase word
$variable or $new_variable or $shopping_list or whatever you want.
Uninitialized class variable has value of nil. Global variables are valid everywhere in the script that’s why they easily lead to many programming errors. The problem with global variables is that, not only are they visible anywhere in the code for a program, they can also be changed from anywhere in the application, and it makes process of tracking variable and debugging process very difficult.
Global variables should be used only when there is a real reason to use it. Instead of global variables, programmers are advised to use local variables whenever it is possible. Let’s take an example of a $global_variable:
Class variables.
Class variables begin with “@@” sign followed by lowercase word
@@number or @@class_variable or @@display_card or whatever you want.
These variables must be initialized before we use them inside of methods. Uninitialized class variable produces an error. Class variables keep data that belongs to a class, not to an instance. It is not always convenient to use class variables, but programmers do use them for initialization data. Before I show you an example of class variable I want to mention that value of class variable can be changed.
Instance variables.
Instance variable begins with “@“ sign followed by lowercase word
@my_program or @customers or @new_var or whatever you want.
Uninitialized instance variables have the value nil. Instance variables work like a regular class variable, but they differ with those because they are not shared with subclasses, they belong specifically to the class. They can be used inside different methods within the class.
Local variables.
Local variable begins with lowercase or “_”
variable or _new_variable or _fruit or whatever you want.
Local variable declared in a method or within a loop cannot be accessed outside of that loop or method. So it means you can use this variable multiple times just inside of your method, before it is closed. I will show you good and bad example for using local variable:
In the example above, you can see that I ma trying to print on the screen variable that was defined in the method. And because it is a local variable I get a message error, that variable is not defined.
In the example above, I tried to print on the screen variable “a” but I asked my program to do it inside of my method, and we can see that I got a result that I wanted.
Constant variables.
Constant variable usually is written in all upcase
VARIABLE or MY_VARIABLE or SHOPPING_LIST or whatever you want.
Once we gave our constant variable a value, it shouldn’t be changed within our program. It is defined in class or module, and may not be defined inside of the method, uninitialized constant produces an error.
And we came to the end of this blog post. I hope this information was useful for you. Try to use them on your own and you will figure out how everything works.
Thank you,
Iulia


Eumpy.real_time_detection.EEG package¶
Submodules¶
Eumpy.real_time_detection.EEG.EEG_feature_extract module¶
Created on Mon Oct 22 12:21:27 2018
@author: Yongrui Huang
This script is used for extracting average PSD (Power spectral density) features from raw EEG data. In the meantime, it also puts the features into hard disk in ‘.npy’ format.
The precess is described as follows. 14 channels and 3 asymmetric pair channels are picked. For each channel, we extract their PSD feature in each unit second(e.g. 1 second) with a 50% overlap.
Note: change tha name MAHNOB-HCI and you can extract your own data!
-
Eumpy.real_time_detection.EEG.EEG_feature_extract.
add_asymmetric
(raw_obj)¶ add asymmetric pair into a MNE raw object and return it. This 3 pair are added. (T7-T8, Fp1-Fp2 and CP1-CP2)
Arguments:
raw_obj: the MNE raw object.Returns:
new_raw_obj: the new MNE raw object with more channel.
-
Eumpy.real_time_detection.EEG.EEG_feature_extract.
exist_inf_data
(path)¶ check whether INF data exist after extracting the feature
Arguments:
path: the trial pathReturns:
True if INF data exist else False.
-
Eumpy.real_time_detection.EEG.EEG_feature_extract.
exist_nan_data
(path)¶ check whether NAN data exist after extracting the feature
Arguments:
path: the trial pathReturns:
True if NAN data exist else False.
-
Eumpy.real_time_detection.EEG.EEG_feature_extract.
extract_average_psd_from_a_trial
(raw_obj, average_second, overlap)¶ This method returns the average log psd features for a trial
Arguments:
raw_obj: a MNE raw object contains the information from a trial.
average_second: the time unit for average the psd.
overlap: how much overlap will be used.
- Returns:
- features: the features of multiply sample. shape (the sample number, the feature number)
-
Eumpy.real_time_detection.EEG.EEG_feature_extract.
get_a_channel_data_from_raw
(raw_obj, channel_name)¶ Arguments:
raw_obj: raw object from MNE library.
channel_name: the name of the channel.
Returns:
the numpy array data for the channel.
-
Eumpy.real_time_detection.EEG.EEG_feature_extract.
get_average_psd
(sub_raw_obj, fmin, fmax)¶ This method returns a the average log psd feature for a MNE raw object
Arguments:
sub_raw_obj: a raw object from MNE library
fmin: the minium frequency you are intreseted
fmax: the maximum frequency you are intreseted
Returns:
average_psd: the required psd features, numpy array like. shape: (the number of the features, )
-
Eumpy.real_time_detection.EEG.EEG_feature_extract.
raw_features
(trial_path)¶ This method return raw feature from one trial. It was implemented canse I want to see the whether the feature extracting could make a different and it did.
Arguments:
trial_path: the path in file system of the trialReturns:
The raw features. numpy-array-like.
-
Eumpy.real_time_detection.EEG.EEG_feature_extract.
raw_to_numpy_one_trial
(path)¶ read one-trial raw EEG from hard dick, extract the feature and write it back.
Arguments:
path: the trial’s path
Eumpy.real_time_detection.EEG.lstm_classification module¶
Created on Tue Oct 23 13:18:08 2018
@author: Yongrui Huang
-
class
Eumpy.real_time_detection.EEG.lstm_classification.
LstmModelClf
¶ Bases:
object
This class is used to apply lstm model to classify the valence and arousal. The emotion state value (valence or arousal) ranges from 1 to 9. We consider it as two category. When it is higher than 5, we take it as high category. when it is less than or equal with 5, we take it as low category.
Attributes:
train_X: the list saves all train sample
train_valence: save the ground truth of valence
train_arousal: save the ground truth of arousal
model: the implement model for training and predicting
X_mean: the mean vertor for the feature
X_std: the standard deviation vertor for the feature
X_test: the list saves all test sample
test_valence: save the ground truth of valence in test
test_arousal: save the ground truth of arousal in test
-
add_test_data
(trial_path)¶ add one trial data into model for testing
Arguments:
trial_path: the trial path of the data
-
add_train_data
(trial_path)¶ add one trial data into model for training
Arguments:
trial_path: the trial path of the data
-
build_model
(input_shape)¶ build the model
Arguments:
input_shape: the input shape of the sample.
-
evalute
()¶ evalute the performance
-
predict
(X)¶ predict the data using the trained model
Arguments:
X: the data set for predicting. shape: (sample number, feature number)
-
train
()¶ train the model
-
Eumpy.real_time_detection.EEG.lstm_regression module¶
Created on Tue Oct 23 13:21:00 2018
@author: Yongrui Huang
-
class
Eumpy.real_time_detection.EEG.lstm_regression.
LstmModelRegression
¶ Bases:
object
This class is used to apply lstm model to predict the valence and arousal. The emotion state value (valence or arousal) ranges from 1 to 9. We consider it as a continuous value and treat this preblem as a regression problem.
Attributes:
train_X: the list saves all train sample
train_valence: save the ground truth of valence
train_arousal: save the ground truth of arousal
model: the implement model for training and predicting
X_mean: the mean vertor for the feature
X_std: the standard deviation vertor for the feature
X_test: the list saves all test sample
test_valence: save the ground truth of valence in test
test_arousal: save the ground truth of arousal in test
-
add_test_data
(trial_path)¶ add one trial data into model for testing
Arguments:
trial_path: the trial path of the data
-
add_train_data
(trial_path)¶ add one trial data into model for training
Arguments:
trial_path: the trial path of the data
-
build_model
(input_shape)¶ build the model
Arguments:
input_shape: the input shape of the sample.
-
evalute
()¶ evalute the performance
-
predict
(X)¶ predict the data using the trained model
Arguments:
X: the data set for predicting. shape: (sample number, feature number)
-
train
()¶ train the model
-
-
Eumpy.real_time_detection.EEG.lstm_regression.
plot_arousal_training
(history, filename='arousal_EEG')¶ polt the train data image
-
Eumpy.real_time_detection.EEG.lstm_regression.
plot_valence_training
(history, filename='valence_EEG')¶ polt the train data image
Eumpy.real_time_detection.EEG.subject_dependent module¶
Eumpy.real_time_detection.EEG.subject_independent module¶
Eumpy.real_time_detection.EEG.svm_model module¶
Created on Tue Oct 23 10:52:01 2018
@author: Yongrui Huang
-
class
Eumpy.real_time_detection.EEG.svm_model.
SvmModel
¶ Bases:
object
This class is used to apply lstm model to detect valence and arousal. The emotion state value (valence or arousal) ranges from 1 to 9. We consider it as two category. When it is higher than 5, we take it as high category. when it is less than or equal with 5, we take it as low category. This class also apply the regression method for treating valence and arousal as continuous value and treat this preblem as a regression problem.
Attributes:
train_X: the list saves all train sample
train_valence: save the ground truth of valence
train_arousal: save the ground truth of arousal
model: the implement model for training and predicting
X_mean: the mean vertor for the feature
X_std: the standard deviation vertor for the feature
X_test: the list saves all test sample
test_valence: save the ground truth of valence in test
test_arousal: save the ground truth of arousal in test
-
add_test_data
(trial_path)¶ add one trial data into model for testing
Arguments:
trial_path: the trial path of the data
-
add_train_data
(trial_path)¶ add one trial data into model for training
Arguments:
trial_path: the trial path of the data
-
evalute
()¶ evalute the performance
-
predict
(X)¶ predict the data using the trained model
Arguments:
X: the data set for predicting. shape: (sample number, feature number)
-
train
()¶ train the model
-


I can finally spend a couple of days on nblogr. I hope I get enough done to have a releasable version after this time.
In it world Sean McGrath has been talking about Ajax and the hidden cost of use.
I got to this post through Jon Udell, who has a post about ajax and automation.
Anyway the sort of arguments that Sean is using make me think he has yet to complete a good ajax application.
A common buzzword in the industry is the concept of a “front end”. In an ideal world, the front end just handles all the graphical user interface stuff while the back end does all the real work. In this ideal world, you can just bypass the front end and work with the back end directly when you want to integrate applications. Sadly, we do not live in this ideal world.
I’m going of a rant here because I thought that the whole discussion AJAX is it good vs bad? was closed about a year ago.
He obviously hasn’t seen any of the Castle or ruby implementations who do just that. For example I can unit test my complete controllers base with out running a browser.
Unless i’m really sure that an application will be used in one type of browser or it’s successor and this browser is ajax capable.. then and only then the user interface will rely on javascript for the interaction.
 There are 2 main reasons for it :
1 separation of concerns the only decision an UI can make is should I show this red or green based on a value of the object etc. But nothing else.
2 you want live data not data that is almost live (i’m taling about a system where minutes matter in the workflow) :)
Think now of web-based applications you most like to use. How are their front ends and back ends? Well, historically, they have been quite cleanly separated. After all, a web browser only has limited capabilities. Behind the scenes it is really only capable of sending two commands GET and POST to things called URLs. Everything else (slight simplification!) happens at the back end.
Ah, but that was then and this is now. Now we have AJAX and JSON and Flash and the Google Web Toolkit and Windows Presentation Foundation and…
All these things help us to make web applications easier to use. In so doing, the clean separation between front end and back end gets more and more blurred. With every blurring of the separation, application integration becomes more complex.
I guess somebody is really missing the point here a UI is just a shell over lots of services that can do the job with or without the UI on it. All the real work is to be done in the service layer or deeper down in you app.
I think Windows Presentation Foundation says it all in its name already Presenation only whatever is not related to the presenation of your data in the UI shouldn’t be there.
What I think is going on here is that he’s affraid to take the plunge because the arguments he uses are arguments I had against building a full ajax site about 2 years ago. I’ve set them aside.. and just do it now.
I must say that using castle has been a tremendous help for me into getting things done in the same timeframe as i would have with the classic model.
For instance I’m about to finish a project that in a clasic model would have consisted out of 70+ very dataintensive forms. The result of using ajax a.o. technologies now has the application down to 5 forms
I still had to write the 70+ views and but not nearly as many search functions etc. I do ajax on the AHA principle (which means I send html snippets) because JSON and building dom nodes breaks backwards compatibility and would have slowed down development a lot.
To get to the automation bit .. I think ajax makes it much more easy to interact with the backend then the classic model would have done. There are many more options to choose from (which is kind of a dissease of our time.. too many options) and you have a much finer grained control over what passes through the pipeline in terms of bits and bytes. just pull up any http request listener and you’ll have all the things you need to replay your actions vs. parse forms and go through the html to figure out the fields etc.
Ok that’s it for my morning rant. I just thought somebody needed to put his views into context. I have to give him that technology certainly didn’t come to a standstill over the last year so it’s getting increasingly difficult to keep up.
I’ve known a couple of really good people to give up the game this year because it’s all moving too fast in some respects or not how they want it to move. In my opinion things are indeed moving very fast at the moment.. but that’s what makes it so exciting :D
DevExpress is giving away 40 controls for free. The only thing you need to do is register on their site and you’ll get an email with the controls.
Today I needed an accordion widget. I searched the internet but didn’t really find one that was based on scriptaculous and did what i wanted it to do and how i wanted.
You need scriptaculous for this widget. Example markup is shown in the comments. Just add the javascript to a page and it will find the accordion just fine.
I thought I’d share the code:
/**
* @author Ivan Porto Carrero
*
*
* Styles:
* *******
* .accordeon{
* border: 1px solid #1F669B;
* font-family: Trebuchet MS, Arial, Helvetica, sans-serif;
* font-size: 11px;
* overflow:auto;
* }
* h5 {
* font-size:12px;
* padding: 3px 5px 3px 5px;
* margin: 0;
* border-style: solid none solid none;
* border-top-color:#BDC7E7;
* border-bottom-color:#a1bbe4;
* border-width: 1px 0px 1px 0px;
* color:#fff;
* background-color: #63699C;
* cursor:pointer;
* }
* .panel_header{
* color:#878285;
* background-color: #63699C;
* background:url(images/shade.gif) 0 0 repeat-x;
* }
* .panel{
* margin: 0;
* padding-bottom:0;
* border: none;
* }
* .panel_body{padding:5px;}
*
*
* Markup:
* *******
*
*

*

*
Accordian 1 Title

*

*
Content goes here

*

*

*

*
Accordian 2 Title

*

*
Content goes here

*

*

*

*
Accordian 3 Title

*

*
Content goes here

*

*

*

*
Accordian 4 Title

*

*
Content goes here

*

*

*

*/
Accordeon = Class.create();
Accordeon.prototype = {
initialize:function(element, options){
this.options = {
onBeforeSwitch:null,
onAfterSwitch:null,
activePanel:null,
panelClass:'panel',
headerClass:'panel_header',
bodyClass: 'panel_body',
activePanelClass:'active',
showAnim:false
 };
Object.extend(this.options,options||{});
this.accordeon = $(element);
this.accordeon.panels = new Array();
var pnls = $A(this.accordeon.childNodes);
pnls.each(
function(pnl){
var ele = $(pnl);
var headers = ele.getElementsByClassName(this.options.headerClass);
if(headers.length > 0){
var header = headers[0];
ele.header = header;
Event.observe(header,'click', this.onChange.bindAsEventListener(this))
}
var bodies = ele.getElementsByClassName(this.options.bodyClass);
if(bodies.length > 0){
var body = bodies[0];
ele.body = body;
body.hide();
}
if(ele.tagName.toLowerCase() == 'div' && Element.hasClassName(ele,this.options.panelClass)){
this.accordeon.panels.push(ele);
}
}.bind(this)
);
this.setActivePanel(pnls[0],false);
},
onChange:function(ev){
var ele = Event.element(ev);
var parents = ele.ancestors();
var panel;
parents.each(
function(elm){
var obj = $(elm);
if(obj.hasClassName(this.options.panelClass)){
panel = obj;
return;
}
}.bind(this)
);
this.setActivePanel(panel,true);
},
setActivePanel:function(panel,showAnim){
if(this.onBeforeSwitch)
this.onBeforeSwitch();
if(this.activePanel && this.activePanel.id != panel.id ){
var hideAnim = null;
if(this.options.showAnim)
new Effect.toggle(this.activePanel.body,'blind',{duration:0.3});
else
 this.activePanel.body.hide();
this._activatePanel(panel,showAnim,hideAnim);
}
else if (!this.activePanel){
this._activatePanel(panel,showAnim);
}
if(this.onAfterSwitch)
this.onAfterSwitch();
},
_activatePanel:function(panel,showAnim,panelToHide){
panel.body.addClassName(this.options.activePanelClass);
if(showAnim && this.options.showAnim){
new Effect.toggle(panel.body,'blind',{duration:0.3});
}
else{
panel.body.show();
}
this.activePanel = panel;
}
};
Accordeon.Widget = Class.create();
Accordeon.Widget.prototype = {
initialize:function(options){
this.options={
containerClass:null
 };
Object.extend(this.options,options||{});
this.accordeons = new Array();
$$('.' + this.options.containerClass).each(
function(accordeon){
this.accordeons.push(new Accordeon(accordeon,this.options));
}.bind(this)
);
}
};
Event.observe(window,'load',function(){
var options = {
panelClass:'panel',
headerClass:'panel_header',
bodyClass: 'panel_body',
activePanelClass:'active',
showAnim:true,
containerClass:'accordeon'
 };
new Accordeon.Widget(options);
}.bindAsEventListener(this));

Sorry for spamming your readers today. But this is an absolute must see
http://ajaxian.com/archives/douglas-crockford-video-advanced-javascript
One of my best friends is joining Microsoft in belgium.
He has a blog concerning marketing and advertising campaigns.
You can read all about it here : View his blog post…
Well today has been an interesting day. I signed up for a day of presentations on user experience, which is something that can always improve. Turns out it are a bunch of presentations on Microsoft Expression (I guess in some ways that has to do with user experience )It’s not something I personally will be using as it is more designer focussed and I use visual studio for all my development and web design.
Over the last couple of months or so I have been sensing that Microsoft isn’t what they used to be and I’m not the only one that is inclined to think that way
Mostly because I’m currently working as a sole developer in my own company I feel very much left out by them.
Most of the issues I have is to quickly develop something, where I am in full control of what happens, is not something that is easily done in asp.net. (For more on reasons why I like castle vs asp.net webforms : Am I too late, A bit further down the castle track
Back to the original story
Those presentations didn’t really hold value for me but I got into a conversation with 2 microsoft employees that were there with the goal of finding out why people like me are moving to rails and what microsoft isn’t giving us and they should.
My main points of discomfort would be:
Feeling of not being in control
Complexity to get it to render out pages
Slow development pass (might be ok if you’re a giant company in which people actually hold meetings and have managers but not in my case). I’m all about agile (not to be confused with the TFS agile method) development. Plan, build, ship within 2 months would be average.
Need to know a page lifecycle (which is statefull programming in a stateless environment, need i say more)
Complexity to get things done
No proper sample code available that shows something beyond “Hello world”
Anyway we had this interesting talk about it, now it’s again a case of waiting to see if they can make a change before the new year to keep me interested.
While I’m on the subject. Next week will be the week in which I’ll try to build my first RoR site. I’m pretty confident that it will work out and then i can finally assess myself which one is better for what.
Ok I’m off to buy Agile webdevelopment with ruby now
I couldn’t really say goodbye to vista. So I thought the cheaper option would be to go buy a wired headset in anticipation of the bluetooth headset drivers.
I am dissapointed that they worked in RC1/RC2 but not in the RTM release.
I can find some comfort in the matter that I’m not the only one that has these problems. http://forums.microsoft.com/TechNet/showpost.aspx?postid=985349&siteid;=17&¬ification_id=413753&message;_id=413753&agent;=messenger
Hammet just announced that he will be creating an ironpython view engine for castle. Read more about it here
del.icio.us tags: IronPython, Castle
Vista is a cool operating system but the fact that I can’t run IE6 on it plus the fact that I can’t get any of my bluetooth headsets to work with it make it so that I have to roll back to xp for the time being.
I can live without IE6 but not without skype :)
If somebody knows how to get a logitech or a motorola headset going on vista please let me know. That would mean I can stay on vista :D


A | |
| acc [CamlinternalFormat] | |
| acc_formatting_gen [CamlinternalFormat] | |
| access_permission [UnixLabels] | Flags for the |
| access_permission [Unix] | Flags for the |
| addr_info [UnixLabels] | Address information returned by |
| addr_info [Unix] | Address information returned by |
| alarm [Gc] | An alarm is a piece of data that calls a user function at the end of each major GC cycle. |
| allocation [Gc.Memprof] | The type of metadata associated with allocations. |
| allocation_source [Gc.Memprof] | |
| anon_fun [Arg] | |
B | |
| backend_type [Sys] | Currently, the official distribution only supports |
| backtrace_slot [Printexc] | The abstract type |
| block_type [CamlinternalFormatBasics] | |
C | |
| c_layout [Bigarray] | |
| channel [Event] | The type of communication channels carrying values of type |
| char_set [CamlinternalFormatBasics] | |
| closure [CamlinternalOO] | |
| complex32_elt [Bigarray] | |
| complex64_elt [Bigarray] | |
| continuation [Effect.Shallow] |
|
| continuation [Effect.Deep] |
|
| control [Gc] | The GC parameters are given as a |
| counter [CamlinternalFormatBasics] | |
| custom_arity [CamlinternalFormatBasics] | |
D | |
| data [Weak.S] | The type of the elements stored in the table. |
| dir_handle [UnixLabels] | The type of descriptors over opened directories. |
| dir_handle [Unix] | The type of descriptors over opened directories. |
| doc [Arg] | |
E | |
| effect_handler [Effect.Deep] |
|
| elt [Set.S] | The type of the set elements. |
| elt [MoreLabels.Set.S] | The type of the set elements. |
| error [UnixLabels] | The type of error codes. |
| error [Unix] | The type of error codes. |
| error [Dynlink] | |
| event [Event] | The type of communication events returning a result of type |
| extern_flags [Marshal] | The flags to the |
| extra_info [Sys] | |
| extra_prefix [Sys] | |
F | |
| file_descr [UnixLabels] | The abstract type of file descriptors. |
| file_descr [Unix] | The abstract type of file descriptors. |
| file_kind [UnixLabels] | |
| file_kind [Unix] | |
| file_name [Scanf.Scanning] | A convenient alias to designate a file name. |
| file_perm [UnixLabels] | The type of file access rights, e.g. |
| file_perm [Unix] | The type of file access rights, e.g. |
| float32_elt [Bigarray] | |
| float64_elt [Bigarray] | |
| float_conv [CamlinternalFormatBasics] | |
| float_flag_conv [CamlinternalFormatBasics] | |
| float_kind_conv [CamlinternalFormatBasics] | |
| flow_action [UnixLabels] | |
| flow_action [Unix] | |
| flush_queue [UnixLabels] | |
| flush_queue [Unix] | |
| fmt [CamlinternalFormatBasics] | List of format elements. |
| fmt_ebb [CamlinternalFormat] | |
| fmtty [CamlinternalFormatBasics] | |
| fmtty_rel [CamlinternalFormatBasics] | |
| format [Stdlib] | |
| format4 [Stdlib] | |
| format6 [Stdlib] | |
| format6 [CamlinternalFormatBasics] | |
| formatter [Format] | Abstract data corresponding to a pretty-printer (also called a formatter) and all its machinery. |
| formatter_out_functions [Format] | The set of output functions specific to a formatter: the |
| formatter_stag_functions [Format] | The semantic tag handling functions specific to a formatter:
|
| formatting_gen [CamlinternalFormatBasics] | |
| formatting_lit [CamlinternalFormatBasics] | |
| fortran_layout [Bigarray] | To facilitate interoperability with existing C and Fortran code, this library supports two different memory layouts for Bigarrays, one compatible with the C conventions, the other compatible with the Fortran conventions. |
| fpclass [Float] | The five classes of floating-point numbers, as determined by
the |
| fpclass [Stdlib] | The five classes of floating-point numbers, as determined by
the |
G | |
| geometry [Format] | |
| getaddrinfo_option [UnixLabels] | Options to |
| getaddrinfo_option [Unix] | Options to |
| getnameinfo_option [UnixLabels] | Options to |
| getnameinfo_option [Unix] | Options to |
| group_entry [UnixLabels] | Structure of entries in the |
| group_entry [Unix] | Structure of entries in the |
H | |
| handler [Effect.Shallow] |
|
| handler [Effect.Deep] |
|
| heter_list [CamlinternalFormat] | |
| host_entry [UnixLabels] | Structure of entries in the |
| host_entry [Unix] | Structure of entries in the |
I | |
| id [Domain] | Domains have unique integer identifiers |
| ignored [CamlinternalFormatBasics] | |
| impl [CamlinternalOO] | |
| in_channel [Scanf.Scanning] | The notion of input channel for the |
| in_channel [Stdlib] | The type of input channel. |
| inet_addr [UnixLabels] | The abstract type of Internet addresses. |
| inet_addr [Unix] | The abstract type of Internet addresses. |
| info [Obj.Closure] | |
| init_table [CamlinternalOO] | |
| int16_signed_elt [Bigarray] | |
| int16_unsigned_elt [Bigarray] | |
| int32_elt [Bigarray] | |
| int64_elt [Bigarray] | |
| int8_signed_elt [Bigarray] | |
| int8_unsigned_elt [Bigarray] | |
| int_conv [CamlinternalFormatBasics] | |
| int_elt [Bigarray] | |
| interval_timer [UnixLabels] | The three kinds of interval timers. |
| interval_timer [Unix] | The three kinds of interval timers. |
| interval_timer_status [UnixLabels] | The type describing the status of an interval timer |
| interval_timer_status [Unix] | The type describing the status of an interval timer |
K | |
| key [MoreLabels.Map.S] | The type of the map keys. |
| key [MoreLabels.Hashtbl.SeededS] | |
| key [MoreLabels.Hashtbl.S] | |
| key [Map.S] | The type of the map keys. |
| key [Hashtbl.SeededS] | |
| key [Hashtbl.S] | |
| key [Ephemeron.SeededS] | |
| key [Ephemeron.S] | |
| key [Domain.DLS] | Type of a DLS key |
| key [Arg] | |
| kind [Bigarray] | To each element kind is associated an OCaml type, which is the type of OCaml values that can be stored in the Bigarray or read back from it. |
L | |
| label [CamlinternalOO] | |
| layout [Bigarray] | |
| lexbuf [Lexing] | The type of lexer buffers. |
| linking_error [Dynlink] | |
| location [Printexc] | The type of location information found in backtraces. |
| lock_command [UnixLabels] | Commands for |
| lock_command [Unix] | Commands for |
M | |
| meth [CamlinternalOO] | |
| msg_flag [UnixLabels] | The flags for |
| msg_flag [Unix] | The flags for |
| mutable_char_set [CamlinternalFormat] | |
N | |
| name_info [UnixLabels] | Host and service information returned by |
| name_info [Unix] | Host and service information returned by |
| nativeint_elt [Bigarray] | |
| node [Seq] | A node is either |
O | |
| obj [CamlinternalOO] | |
| obj_t [Obj.Ephemeron] | alias for |
| ocaml_release_info [Sys] | |
| open_flag [UnixLabels] | The flags to |
| open_flag [Unix] | The flags to |
| open_flag [Out_channel] | Opening modes for |
| open_flag [In_channel] | Opening modes for |
| open_flag [Stdlib] | Opening modes for |
| out_channel [Stdlib] | The type of output channel. |
P | |
| pad_option [CamlinternalFormatBasics] | |
| padding [CamlinternalFormatBasics] | |
| padty [CamlinternalFormatBasics] | |
| param_format_ebb [CamlinternalFormat] | |
| params [CamlinternalOO] | |
| passwd_entry [UnixLabels] | Structure of entries in the |
| passwd_entry [Unix] | Structure of entries in the |
| position [Lexing] | A value of type |
| prec_option [CamlinternalFormatBasics] | |
| precision [CamlinternalFormatBasics] | |
| process_status [UnixLabels] | The termination status of a process. |
| process_status [Unix] | The termination status of a process. |
| process_times [UnixLabels] | The execution times (CPU times) of a process. |
| process_times [Unix] | The execution times (CPU times) of a process. |
| protocol_entry [UnixLabels] | Structure of entries in the |
| protocol_entry [Unix] | Structure of entries in the |
R | |
| raw_backtrace [Printexc] | The type |
| raw_backtrace_entry [Printexc] | A |
| raw_backtrace_slot [Printexc] | This type is used to iterate over the slots of a |
| raw_data [Obj] | |
| ref [Stdlib] | The type of references (mutable indirection cells) containing
a value of type |
| regexp [Str] | The type of compiled regular expressions. |
| repr [Sys.Immediate64.Make] | |
| result [Stdlib] | |
S | |
| scanbuf [Scanf.Scanning] | The type of scanning buffers. |
| scanner [Scanf] | The type of formatted input scanners: |
| scanner_opt [Scanf] | |
| seek_command [UnixLabels] | Positioning modes for |
| seek_command [Unix] | Positioning modes for |
| service_entry [UnixLabels] | Structure of entries in the |
| service_entry [Unix] | Structure of entries in the |
| setattr_when [UnixLabels] | |
| setattr_when [Unix] | |
| shape [CamlinternalMod] | |
| shutdown_command [UnixLabels] | The type of commands for |
| shutdown_command [Unix] | The type of commands for |
| signal_behavior [Sys] | What to do when receiving a signal: |
| sigprocmask_command [UnixLabels] | |
| sigprocmask_command [Unix] | |
| sockaddr [UnixLabels] | The type of socket addresses. |
| sockaddr [Unix] | The type of socket addresses. |
| socket_bool_option [UnixLabels] | The socket options that can be consulted with |
| socket_bool_option [Unix] | The socket options that can be consulted with |
| socket_domain [UnixLabels] | The type of socket domains. |
| socket_domain [Unix] | The type of socket domains. |
| socket_float_option [UnixLabels] | The socket options that can be consulted with |
| socket_float_option [Unix] | The socket options that can be consulted with |
| socket_int_option [UnixLabels] | The socket options that can be consulted with |
| socket_int_option [Unix] | The socket options that can be consulted with |
| socket_optint_option [UnixLabels] | The socket options that can be consulted with |
| socket_optint_option [Unix] | The socket options that can be consulted with |
| socket_type [UnixLabels] | The type of socket kinds, specifying the semantics of communications. |
| socket_type [Unix] | The type of socket kinds, specifying the semantics of communications. |
| spec [Arg] | The concrete type describing the behavior associated with a keyword. |
| split_result [Str] | |
| stag [Format] | Semantic tags (or simply tags) are user's defined annotations to associate user's specific operations to printed entities. |
| stat [Gc] | The memory management counters are returned in a |
| statistics [MoreLabels.Hashtbl] | |
| statistics [Hashtbl] | |
| stats [UnixLabels.LargeFile] | |
| stats [UnixLabels] | The information returned by the |
| stats [Unix.LargeFile] | |
| stats [Unix] | The information returned by the |
| stats [CamlinternalOO] | |
| symbolic_output_buffer [Format] | The output buffer of a symbolic pretty-printer. |
| symbolic_output_item [Format] | Items produced by symbolic pretty-printers |
T | |
| t [Thread] | The type of thread handles. |
| t [CamlinternalOO] | |
| t [CamlinternalLazy] | |
| t [Weak.S] | The type of tables that contain elements of type |
| t [Weak] | The type of arrays of weak pointers (weak arrays). |
| t [Unit] | The unit type. |
| t [Uchar] | The type for Unicode characters. |
| t [Sys.Immediate64.Immediate] | |
| t [Sys.Immediate64.Non_immediate] | |
| t [Sys.Immediate64.Make] | |
| t [String] | The type for strings. |
| t [StringLabels] | The type for strings. |
| t [Stack] | The type of stacks containing elements of type |
| t [Set.OrderedType] | The type of the set elements. |
| t [Set.S] | The type of sets. |
| t [Seq] | A sequence |
| t [Semaphore.Binary] | The type of binary semaphores. |
| t [Semaphore.Counting] | The type of counting semaphores. |
| t [Result] | The type for result values. |
| t [Random.State] | The type of PRNG states. |
| t [Queue] | The type of queues containing elements of type |
| t [Printexc.Slot] | |
| t [Printexc] | The type of exception values. |
| t [Out_channel] | The type of output channel. |
| t [Option] | The type for option values. |
| t [Obj.Ephemeron] | an ephemeron cf |
| t [Obj.Extension_constructor] | |
| t [Obj] | |
| t [Nativeint] | An alias for the type of native integers. |
| t [Mutex] | The type of mutexes. |
| t [MoreLabels.Set.OrderedType] | The type of the set elements. |
| t [MoreLabels.Set.S] | The type of sets. |
| t [MoreLabels.Map.OrderedType] | The type of the map keys. |
| t [MoreLabels.Map.S] | The type of maps from type |
| t [MoreLabels.Hashtbl.SeededHashedType] | The type of the hashtable keys. |
| t [MoreLabels.Hashtbl.HashedType] | The type of the hashtable keys. |
| t [MoreLabels.Hashtbl.SeededS] | |
| t [MoreLabels.Hashtbl.S] | |
| t [MoreLabels.Hashtbl] | The type of hash tables from type |
| t [Map.OrderedType] | The type of the map keys. |
| t [Map.S] | The type of maps from type |
| t [ListLabels] | An alias for the type of lists. |
| t [List] | An alias for the type of lists. |
| t [Lazy] | A value of type |
| t [Int64] | An alias for the type of 64-bit integers. |
| t [Int32] | An alias for the type of 32-bit integers. |
| t [Int] | The type for integer values. |
| t [In_channel] | The type of input channel. |
| t [Hashtbl.SeededHashedType] | The type of the hashtable keys. |
| t [Hashtbl.HashedType] | The type of the hashtable keys. |
| t [Hashtbl.SeededS] | |
| t [Hashtbl.S] | |
| t [Hashtbl] | The type of hash tables from type |
| t [Float.ArrayLabels] | The type of float arrays with packed representation. |
| t [Float.Array] | The type of float arrays with packed representation. |
| t [Float] | An alias for the type of floating-point numbers. |
| t [Ephemeron.Kn.Bucket] | A bucket is a mutable "list" of ephemerons. |
| t [Ephemeron.Kn] | an ephemeron with an arbitrary number of keys of the same type |
| t [Ephemeron.K2.Bucket] | A bucket is a mutable "list" of ephemerons. |
| t [Ephemeron.K2] | an ephemeron with two keys |
| t [Ephemeron.K1.Bucket] | A bucket is a mutable "list" of ephemerons. |
| t [Ephemeron.SeededS] | |
| t [Ephemeron.S] | |
| t [Ephemeron.K1] | an ephemeron with one key |
| t [Either] | A value of |
| t [Effect] | The type of effects. |
| t [Domain] | A domain of type |
| t [Digest] | The type of digests: 16-character strings. |
| t [Condition] | The type of condition variables. |
| t [Complex] | The type of complex numbers. |
| t [Char] | An alias for the type of characters. |
| t [BytesLabels] | An alias for the type of byte sequences. |
| t [Bytes] | An alias for the type of byte sequences. |
| t [Buffer] | The abstract type of buffers. |
| t [Bool] | The type of booleans (truth values). |
| t [Bigarray.Array3] | The type of three-dimensional Bigarrays whose elements have
OCaml type |
| t [Bigarray.Array2] | The type of two-dimensional Bigarrays whose elements have
OCaml type |
| t [Bigarray.Array1] | The type of one-dimensional Bigarrays whose elements have
OCaml type |
| t [Bigarray.Array0] | The type of zero-dimensional Bigarrays whose elements have
OCaml type |
| t [Bigarray.Genarray] | The type |
| t [Atomic] | An atomic (mutable) reference to a value of type |
| t [ArrayLabels] | An alias for the type of arrays. |
| t [Array] | An alias for the type of arrays. |
| table [CamlinternalOO] | |
| tables [CamlinternalOO] | |
| tag [CamlinternalOO] | |
| tag [Format] | |
| terminal_io [UnixLabels] | |
| terminal_io [Unix] | |
| tm [UnixLabels] | The type representing wallclock time and calendar date. |
| tm [Unix] | The type representing wallclock time and calendar date. |
| tracker [Gc.Memprof] | A |
U | |
| usage_msg [Arg] | |
| utf_decode [Uchar] | The type for UTF decode results. |
W | |
| wait_flag [UnixLabels] | Flags for |
| wait_flag [Unix] | Flags for |


Class CompletionQueue (2.9.0)
Call the functor associated with asynchronous operations when they complete.
Constructors
CompletionQueue()
CompletionQueue(std::shared_ptr< internal::CompletionQueueImpl >)
| Parameter | |
|---|---|
| Name | Description |
impl |
std::shared_ptr< internal::CompletionQueueImpl >
|
Functions
Run()
Run the completion queue event loop.
Note that more than one thread can call this member function, to create a pool of threads completing asynchronous operations.
| Returns | |
|---|---|
| Type | Description |
void |
Shutdown()
Terminate the completion queue event loop.
| Returns | |
|---|---|
| Type | Description |
void |
CancelAll()
Cancel all pending operations.
| Returns | |
|---|---|
| Type | Description |
void |
MakeDeadlineTimer(std::chrono::system_clock::time_point)
Create a timer that fires at deadline
.
| Parameter | |
|---|---|
| Name | Description |
deadline |
std::chrono::system_clock::time_point
when should the timer expire. |
| Returns | |
|---|---|
| Type | Description |
google::cloud::future< StatusOr< std::chrono::system_clock::time_point > > |
a future that becomes satisfied after |
MakeRelativeTimer(std::chrono::duration< Rep, Period >)
Create a timer that fires after the duration
.
| Parameters | |
|---|---|
| Name | Description |
duration |
std::chrono::duration< Rep, Period >
when should the timer expire relative to the current time. |
typename Rep |
a placeholder to match the Rep tparam for |
typename Period |
a placeholder to match the Period tparam for |
| Returns | |
|---|---|
| Type | Description |
future< StatusOr< std::chrono::system_clock::time_point > > |
a future that becomes satisfied after |
MakeUnaryRpc(AsyncCallType, Request const &, std::unique_ptr< grpc::ClientContext >)
Make an asynchronous unary RPC.
| Parameters | |
|---|---|
| Name | Description |
async_call |
AsyncCallType
a callable to start the asynchronous RPC. |
request |
Request const &
the contents of the request. |
context |
std::unique_ptr< grpc::ClientContext >
an initialized request context to make the call. |
typename AsyncCallType |
the type of async_call. It must be invocable with |
typename Request |
the type of the request parameter in the gRPC. |
typename Response |
the response from the asynchronous RPC. |
| Returns | |
|---|---|
| Type | Description |
future< StatusOr< Response > > |
a future that becomes satisfied when the operation completes. |
MakeStreamingReadRpc(AsyncCallType &&, Request const &, std::unique_ptr< grpc::ClientContext >, OnReadHandler &&, OnFinishHandler &&)
Make an asynchronous streaming read RPC.
Reading from the stream starts automatically, and the handler is notified of all interesting events in the stream. Note that then handler is called by any thread blocked on this object's Run() member function. However, only one callback in the handler is called at a time.
| Parameters | |
|---|---|
| Name | Description |
async_call |
AsyncCallType &&
a callable to start the asynchronous RPC. |
request |
Request const &
the contents of the request. |
context |
std::unique_ptr< grpc::ClientContext >
an initialized request context to make the call. |
on_read |
OnReadHandler &&
the callback to be invoked on each successful Read(). |
on_finish |
OnFinishHandler &&
the callback to be invoked when the stream is closed. |
typename AsyncCallType |
the type of async_call. It must be invocable with parameters |
typename Request |
the type of the request in the streaming RPC. |
typename Response |
the type of the response in the streaming RPC. |
typename OnReadHandler |
the type of the |
typename OnFinishHandler |
the type of the |
| Returns | |
|---|---|
| Type | Description |
std::shared_ptr< AsyncOperation > |
RunAsync(Functor &&)
Asynchronously run a functor on a thread Run()
ning the CompletionQueue
.
| Parameters | |
|---|---|
| Name | Description |
functor |
Functor &&
the functor to call in one of the CompletionQueue's threads. |
typename Functor |
the type of |
| Returns | |
|---|---|
| Type | Description |
void |
RunAsync(Functor &&)
Asynchronously run a functor on a thread Run()
ning the CompletionQueue
.
| Parameters | |
|---|---|
| Name | Description |
functor |
Functor &&
the functor to call in one of the CompletionQueue's threads. |
typename Functor |
the type of |
| Returns | |
|---|---|
| Type | Description |
void |
AsyncWaitConnectionReady(std::shared_ptr< grpc::Channel >, std::chrono::system_clock::time_point)
Asynchronously wait for a connection to become ready.
| Parameters | |
|---|---|
| Name | Description |
channel |
std::shared_ptr< grpc::Channel >
the channel on which to wait for state changes |
deadline |
std::chrono::system_clock::time_point
give up waiting for the state change if this deadline passes |
| Returns | |
|---|---|
| Type | Description |
future< Status > |
|


All Employees
No employees.
Photo
Start Date
ID
First Name
Last Name
Employee Status
Position
Date of Birth


First thing first,
I have been lifting and coding for almost 1 year now. I started both of them around the same time and it was also the first time I attempted to do so. Therefore, I'm still a complete beginner.
I have learnt a lot from lifting alone to improve my strength and personal record. Interestingly, these lessons can apply well for improving coding skills, especially in learning Computer Science.
A solid foundation is crucial.
It was in the end of 2017 Spring term, I did not go to the gym for 2 weeks. I said to myself I was busy and it was fine to rest for a while and focus on studying. Everything was good until 2 week later. I could hardly pick up the same weight as I could before. I had to decrease 10% to 20% of the weight but it was still a challenge.
Later on, I found out that I did not have a solid strength base. I thought I was strong but I was not. If my strength base was solid, I could totally lift the same weight I was able to lift at least 95% of the weight I was able to lift before.
That said, it’s very easy to forget about how does quick sort work if you don’t have a strong knowledge on Data Structure and Algorithm.
It all comes down to the basics.
In strength training, there are 3 most important movements: Bench Press, Squat, and Deadlift. If you look at different bodybuilding programs or powerlifting programs, you would always see that they are the core movements.
They are all compounds movements which target different muscle groups at the same time.  It is proved by many great couch that doing barbell exercises is the most simplest and effective way to get stronger and build muscle. There are hundreds of exercises that you can do but if you are not doing well with these main movements, it’s hard to gain well and effectively.
Now, back to computer science education. The main reason that we need to study computer science in the first place is because it is the foundation and basics that everyone who want to be a great software engineer should know. Just like the 3 big movements, in Computer Science we have: Data Structure and Algorithms, Computer Architecture, Operating Systems, Computer Networking, Compilers, Databases.
The one who understand computer science well enough is able to do challenging, innovative work. The one who don’t typically stay at the surface, learning specific tools and technologies rather than their underlying foundations, only picking up new skills when the winds of technical fashion change.
Train with high volume and frequency, low intensity. Slowly progress overtime.
This is one of the most important lesson that I learn in order to build a solid strength base and to hit a personal record. It’s physically impossible to add 5 pounds to the workout every week because you will hit a plateau eventually. So how can you still increase the weight? The short answer is to train in your 70-80% of your 1 rep max, lower the intensity, higher the volume, slowly add weight over time and repeat.
For example, you train 70% the weight in your first week. Next week, you increase the weight to 72,5% and continue to add 2,5% in the next few weeks. After 4 weeks, you measure your 1 rep max again and repeat the cycle at 72.5%.
It really depends on the individual but the key point is to lower the intensity to achieve high volume and increase slowly overtime. The reason you want to do that is because you want to drill down the technique. You want to increase your strength base which will help your potential gain. Instead of chasing a personal record, focus on the big picture, which is to improve your overall strength then eventually you will hit a new personal record.
In Computer Science, you want to do the easy problems, increase difficulty and repeat after a while. Also, instead of practicing 3 times a week, practice everyday!
Supporting exercises, variations help.
Let’s say you are stuck at Bench Pressing 200 pounds for months. One thing you might consider is to try out different variations or supporting exercises like Dumbbell Press or Dips. The Floor Press focuses more on explosive strength and targets more on your arm and the Incline Barbell Press targets more on your upper chest. Find your weakness and improve constantly.
Try different sorting algorithms if you’re stuck at a particular one.