--- layout: post title: First Interactions with WCF date: 2010-01-14 08:51:48.000000000 +01:00 categories: - .Net framework - WCF tags: [] status: draft type: post published: false meta: _edit_last: '1' author: login: admin email<EMAIL_ADDRESS>display_name: admin first_name: '' last_name: '' ---
Since the inclusion of Windows Presentation Foundation (WPF), Windows Communication Foundation (WCF), and Windows Workflow Foundation (WF) into .Net 3.0, I have eagerly been awaiting an oppotunity to work with these. Working as part of a portal team at my current job position I have extensive experience in consuming web services. I have worked with both RESTful and SOAP based web services. The server-side of the story has always been out of my domain - until this week.
At the current project we have a C++ component, codenamed Mercury, which consumes a SOAP based web service from an external provider. It is both expensive and time consuming to start development at external partners, therefore we decided to develop our own sandbox web services. These web services should provide the same API as those from the external partner. This will allow the customers of Mercury to be unaware of whether they are interacting with the external partner or our sandbox (This is not completely true, since the developers have to configure which service to use). Other advantages of developing our own web services is that we can setup a bandwidth limiter, see how Mercury handles loss of connection, what happens when the web services are unavailable, we can test credentials and SSL, etc.
We decided on using WCF at server-side. Let's be honest, it is extremely easy. First of is to start a new project in Visual Studio. Here we chose a WCF Service Library. We then declare a public interface with a 'ServiceContract' attribute
[ServiceContract (Name = "SandboxService")]
public interface ISandboxService
{
}
The ServiceContract attribute defines a service contract in WCF for this interface. On declaring the methods in the interface we attach the 'OperationContract' attribute to each of them:
[OperationContract]
void GetString(string s);
The OperationContract attribute defines that this operation is part of a service contract.


|
CORNERSTONE SPEECH It is a common assertion nowadays that the Confederacy had no purpose or justification but perpetuating racist slavery. That argument can be made intelligently, and has been made, but the lazy debater wants to treat it as a settled proposition above discussion. Any objection to it, or any suggestion of Southern legitimacy, is automatically dismissable because it amounts to a defense of the Confederacy, and even if someone who is not an outright racist or slavery-apologist would defend the Confederacy, the debater on the other side has the option to not be bothered with that distinction. Far easier to dismiss the opposition as crypto-racist. It's the old fallacy of arguing in a circle. Yet people choose this tactic, perhaps in part because they find it frustratingly difficult to pin down American history or any part of it to such a simplistic idea as "it was all about slavery." Naturally, some people do want to regard all this as settled before they plow into their opponents. The easy expedient is to go in search of one zinger of a quote that will seem to prove the case. In Internet debates, those willing to be convinced will look no further, and those who disagree will be required to build up the cathedral of context, a tedious process. By the time they finish, the audience will have wandered off with the zinger lodged in their heads. So they pick through the sources. Any quote will do, by anyone remotely prominent in the Confederacy, saying, more or less, "it was all about slavery." Jeff. Davis's inaugural speech? No, it makes nary a mention of slaves or slavery. Robert Toombs' report to the Georgia legislature in 1860? No, that outlines how anti-slavery agitation in the North was exploited by political powers there to disguise economic motives. The "Cornerstone Speech" by Alexander Stephens is the usual bludgeon of choice. Stephens, a Georgian who had served in Congress, was the new vice president of the CSA in the spring of 1861, and in this speech he explained the new Confederate constitution and the prospects of the new nation, as he saw them, to an audience in Savannah. Here is how one commentator cherry-picks the usual cherries from it: Stephens said that the American Revolution had been based on a premise that was “fundamentally wrong.” That premise was, as Stephens defined it, “the assumption of equality of the races.” Stephens insisted that, instead, “our new [Confederate] government is founded upon exactly the opposite idea. Its foundations are laid, its cornerstone rests upon the great truth that the Negro is not equal to the white man. Slavery — subordination to the superior race — is his natural and normal condition. This, our new government, is the first, in the history of the world, based upon this great and moral truth.”Stephens's post-war writings downplayed the importance of slavery in the sectional conflict, and they formed much of the foundation of the first generation of defense of the Southern nation -- the so-called "Lost Cause" view of the war. That reasonably can be dismissed as a convenient revisionism. The Savannah speech exists in transcripts. There is no original version of Stephens's speech, because he spoke extemporaneously. His words were jotted down and printed in the Savannah newspapers. Stephens sometimes complained of the inaccuracy of such reporting, and singled out Savannah reporters in at least one instance, "who very often make me say things which I never did" [speech to the Georgia Legislature, Nov. 14, 1860]. But I have not found that he said at any time after the Cornerstone Speech that they got any part of it fundamentally wrong. Stephens was educating the people of his state and preparing them for a fight he had tried to keep them out of. In the state legislature in July 1860, he fought hard against Georgia's call for a secession convention, then at that convention Stephens spoke out against secession so vehemently that the North circulated copies of his speech as propaganda during the Civil War. The "Cornerstone Speech," in its praise of slavery, is a personal justification of Stephens's career. His post-bellum history book that downplays slavery's role ("Constitutional View of the Late War Between the States") is another. They both are public, political rhetoric. Yet commentators tend to treat the one as an utter lie and the other as absolute truth. To see the offhand paragraph in the speech as some defining Genesis moment of the Confederacy, out of the mouth of the eternal spirit of the nation instead of one political man, is a gross exaggeration.
A brief glance at Stephens's life and career shows how far this remarkable man stood from being representative of the leaders, or the common citizens, of the Confederacy. Even his position as the Confederate vice president was a matter of old-fashioned ticket-balancing, not a proof of his centrality in the Southern cause. He was, in most ways, an eccentric. Stephens was a small, sickly, prickly, brilliant man, perhaps impotent, in a time and place where leaders were expected to be strong, handsome and virile. He stood barely 5 feet tall and never reached 100 pounds weight in his life. He was a poor orphan in a time and place where wealth and family mattered. From the start of his career, he identified himself with the Whig party, and their platform was his natural ideology. But this set him apart from most Southerners, who were Democrats. By nature and necessity he partook of the values of the people in his community, and he had to wrestle his broad ideology into alignment with the local realities. Yet as far and as long as he was capable of it, he kept his political convictions. Stephens "defended slavery apologetically where it already existed, in much the same manner as [Henry] Clay" [Daniel Walker Howe, "Political Culture of the American Whigs," p.244]. Clay was Lincoln's ideal, too, and they shared the same view of American slavery. Stephens also vehemently opposed the war on Mexico, which most Southern slavery-advocates supported, and denounced it as illegal and unjust. In the 1850s, as North and South grew increasingly bitter toward each other, the bridges between Stephens's ideals and the South's realities stretched and broke. The Whigs fell apart over sectional issues, and many of Stephens's party friends from the North, including Lincoln, gravitated into the new, radical, sectional Republican Party. The Southern Whigs were hopeless, paralyzed by the limp, drifting quality that always seems to infect a party that has accepted its minoritarian status. Stephens refused to drift with them. He cast his lot with the Democrats. One result of the sectional rift was that the South gradually hardened in its defense of slavery. Stephens followed it, and became, for a time, among the most strident proclaimers of slavery as ordained by nature and a "positive good" to both races. In this he outran the bulk of Southerners. This is the face he showed in the Savannah speech. And his digression into slavery apologetics there was the result of his need to reconcile his embrace of slavery with his essential Whig ideology. That moral contortion required him to fit slavery into a social context based on order and philanthropy. The "cornerstone" passage is a reflection of his internal struggle to maintain consistency of social thought. He spoke extemporaneously, as the words flowed, and the tumult in the lecture hall must have been matched by inner turmoil. Here was a man who had publicly reversed most of his earlier political positions. He seemed to be talking of himself, primarily, when after justifying slavery he said, "Many who hear me, perhaps, can recollect well, that this truth was not generally admitted, even within their day. The errors of the past generation still clung to many as late as twenty years ago."
The "cornerstone" image is hardly original to Stephens. "Corner-stones" (as it generally was spelled then), are sprinkled like Greek ruins throughout slavery and anti-slavery rhetoric between 1835 and 1860. The National Anti-Slavery Society convention in Philadelphia on Dec. 4, 1833, declared: "More than fifty seven years have elapsed since a band of patriots convened in this place, to devise measures for the deliverance of this country from a foreign yoke. The corner-stone which they founded the TEMPLE OF FREEDOM was broadly this -- 'that all men are created equal; that they are endowed by Creator with certain inalienable rights; that among these life, LIBERTY, and the pursuit of happiness.' " But it was most common as a trope in defense-of-slavery rhetoric. New York lawyer and abolitionist Alvan Stewart called it the slavery defenders' "favorite maxim" in an 1838 speech to the Vermont Legislature. ["Writings and Speeches of Alvan Stewart on Slavery," 1860, p.167]. In 1845, James M. Hammond wrote, "I endorse without reserve the much abused sentiment of Governor M'Duffie, that 'Slavery is the corner-stone of our republican edifice' " ["Letter to an English Abolitionist"]. M'Duffie, governor of South Carolina, a true secessionist fire-eater in his day, had said in a message to his legislature in 1835: "Domestic slavery, therefore, instead of being a political evil, is the corner-stone of our republican edifice. Most of the printed references to slavery as a "corner-stone" between 1835 and 1860 directly cite M'Duffie, but he is forgotten today. Of course, Hammond and M'Duffie, and the others who used the phrase between 1835 and 1860 meant the American republic. They were writing and speaking in both economic and social terms; slavery was widely understood to be a necessary adjunct of a republican form of government, as it had been in Greece and Rome, because it freed a class of men from pursuit of money by labor or commerce and allowed them to devote time and energy to political life and, as Hammond put it, to "preserving a reasonable and well ordered government. ... Hence, Slavery is truly the 'corner-stone' and foundation of every well-designed and durable 'republican edifice.' " As appalling as that is now, Hammond, at the time, had the partial evidence of history on his side. After the Revolution, one of the images foremost in the minds of the Founders was how republics die. All the classical republics, then knew, had come to an end in anarchy and then tyranny. Classical and modern writers had taken up the theme of the death of a republic so often and so minutely that by the 18th century the process could be described in almost clinical terms. The Founders knew it from their classical educations, and the common people knew it from the popular plays of the day, such as "Julius Caesar" and Addison's "Cato" (which Washington had ordered performed for the troops at Valley Forge, notwithstanding a Congressional ban on theaters). The vital principle in keeping a republic alive was public virtue. This was virtue in the classical, not the Christian, definition. The Christian, seeking to be not of this world in Roman times, turned pagan virtue on its head. Classical virtue was not in the least bit meek, but it strove to be first in doing good for one's country and coveted the glory that comes with unrelenting devotion to the good of the people. It expressed itself in endurance, industry, frugality, and probity -- many of which were consistent with Christianity. Gertrude Himmelfarb has ably condensed the classical idea of virtue as "the will and capacity to put the public interest over the private." This was the pulse and ichor of a republic. Washington said it plainly in his Farewell Address, "It is substantially true that virtue or morality is a necessary spring of popular government." His successor, John Adams, wrote, "There must be a positive Passion for the public good, the public Interest, Honour, Power and Glory, established in the Minds of the People, or there can be no Republican Government, nor any real liberty." It was obvious to the Founders that public virtue could be the province of free men only. One who was bound by debt or loyalty to other men was not free to give himself totally to the good of the public. That accounts for the Founders' general horror of debts, banks, lenders, and mortgages. It accounts for the requirement in many states that voters or office-holders be men of a certain income or property. That was at heart a republican, not an aristocratic, principle. But North and South diverged on how best to keep the tree of public virtue well-watered and flowering. The puritan republicans upheld personal morality as the solution: A virtuous people could not help but be a virtuous republic. The agrarians looked to the structure of a limited government and to an ordered, hierarchic society to keep the republic healthy. Historians' views of the political philosophy of the South during the Revolution tend to miss the mark because the writers are dazzled by the twin stars of Jefferson and Madison. The two friends had a potent impact on America, but as Southern men they were exotics. A more typical Southern view of the republican problem is represented by John Taylor of Caroline, who wrote, "The more a nation depends for its liberty on the qualities of individuals, the less likely it is to retain it. By expecting publick good from private virtue, we expose ourselves to publick evils from private vices." Like the puritans, the agrarians had a battery of writers at their fingertips, such as Bolingbroke and the authors who published under the title "Cato's Letters." To them, the ownership of property, unencumbered by debt, was the rock foundation of republican independence, virtue, and liberty. New Englanders believed in this, too, but the Southerners made it a dogma. This led them to see the hierarchy which already existed among them as a bulwark of the republic: In their vision, the masses of slaves did the labor, and the citizens -- by definition free white males -- thus stood on a republican equality. As DeBow wrote, "No white man at the South serves another as a body servant, to clean his boots, wait on his table, and perform the menial services of his household. ... He is a companion and an equal." At least ideally, and socially. But there was a class of men at the top of the social order whose plantations gave them such independence and leisure that they could devote themselves wholly to public virtue without regard for keeping food on the family table. John C. Calhoun was the epitome of such a man. One reason Southerners so dominated the republic in its early generations was that the leading Northern men in Congress frequently had to drop government business or retire from office for a time and go home to make money or plow their fields. The Southern senators did not. As odious as much of the old South is to modern attitudes, it had the approval of history. The Spartan, Athenian, and Roman republics -- the principal examples available to the Founders -- were built on essentially the same social and economic model, with a mass of slaves at the bottom. Indeed, the very fact of slavery among them made the Southern men more zealous about protecting liberty. Edmund Burke, looking to the Southern colonies, guessed it right in 1775, answering the question that puzzled so many Englishmen: Why the love of liberty was so strong among those who held slaves. Where this is the case in any part of the world, those who are free are by far the most proud and jealous of their freedom. Freedom is to them not only an enjoyment, but a kind of rank and privilege. Not seeing there, that freedom, as in countries where it is a common blessing and as broad and general as the air, may be united with much abject toil, with great misery, with all the exterior of servitude; liberty looks, amongst them, like something that is more noble and liberal.As in the Athenian democracy, the people were to be consulted directly only upon the most dangerous and important questions -- such as secession. South Carolina still chose its presidential electors in the state government in 1860. Rigorous private moral virtue was not necessary in the agrarian republican model -- and was little esteemed among men in the South. Instead, jealousy of power and careful attention to governance would keep the flame of public virtue alive. Govern well, put men of pure virtues and total leisure in power, guard against demagogues and tyrants, and live as well as you please. Instead of the New England ideal of a government that put its thumb down on every amusement and vice, the Southerners favored a minimal government on every level, with few restrictions and coercions. In light of all that, Hammond's "cornerstone" passage is worth quoting at some length: It will scarcely be disputed that the very poor have less leisure to prepare themselves for the proper discharge of public duties than the rich; and that the ignorant are wholly unfit for them at all. In all countries save ours, these two classes, or the poor rather, who are presumed to be necessarily ignorant, are by law expressly excluded from participation in the management of public affairs. In a Republican Government this cannot be done. Universal suffrage, though not essential in theory, seems to be in fact a necessary appendage to a republican system. Where universal suffrage obtains, it is obvious that the government is in the hands of a numerical majority; and it is hardly necessary to say that in every part of the world more than half the people are ignorant and poor. Though no one can look upon poverty as a crime, and we do not here generally regard it as any objection to a man in his individual capacity, still it must be admitted that it is a wretched and insecure government which is administered by its most ignorant citizens, and those who have the least at stake under it. Though intelligence and wealth have great influence here, as everywhere, in keeping in check reckless and unenlightened numbers, yet it is evident to close observers, if not to all, that these are rapidly usurping all power in the non-slaveholding States, and threaten a fearful crisis in republican institutions there at no remote period. In the slaveholding States, however, nearly one-half of the whole population, and those the poorest and most ignorant, have no political influence whatever, because they are slaves. Of the other half, a large proportion are both educated and independent in their circumstances, while those who unfortunately are not so, being still elevated far above the mass, are higher toned and more deeply interested in preserving a stable and well ordered government, than the same class in any other country. Hence, Slavery is truly the "cornerstone" and foundation of every well-designed and durable "republican edifice." [Hammond, reprinted in Drew Gilpin Faust, ed., "The Ideology of Slavery," 1981, LSU Press, pp. 176-7] Stephens gave the trope a particular twist. He took it one step further and put it into the Biblical image of "The stone which the builders refused" which "is become the head stone of the corner" [Psalms CXVII:22]. Stephens's friend and rival, Toombs, in urging secession on Georgia in November 1860, had placed the national "cornerstone" elsewhere: In states' rights. "The basis, the corner-stone of this Government," he said, "was the perfect equality of the free, sovereign, and independent States which made it." But, we are told, states' rights was a smokescreen for racism. Evidently some cornerstones are more inportant than others. As late as the 1860 election, Stephens had backed the moderate Douglas, not the South's hard-line choice, Breckenridge. He considered secessionists "demagogues," and he defended Lincoln, with whom he had served in the House. Lincoln, he wrote, "is not a bad man. He will make as good a president as Fillmore did and better too in my opinion." Lincoln, still trying to pretend he led a national government, considered inviting Stephens to join his cabinet. But Stephens cast his loyalty with his section, not his principles. If he could not correct the South, he would try to guide it and, by compromising some, attempt to save the rest. He failed, and the South failed. The Savannah speech is a sad affair, not just because of the blunt racism of that one passage -- the racism itself, it ought to be noted, would hardly have offended any white audience in 1861 America, North, South, or West, outside a few abolitionist circles. But sad because it shows a politician who has so twisted himself to try to hold the reins of a revolution that he has got tangled in them and they now rule him. He embraces what he once scorned, and he mocks positions he once held. He has thrown away his ideals, and the "cornerstone" passage, to me, reads so much more accurately as an odd eruption of a warped and very personal ideological struggle. It has no place in the overall speech, which is essentially a practical laying-out of the political and military situation the Deep South faced in March 1861. The "cornerstone" rhetoric doesn't deserve such prominence in a treatment of the Confederate Constitution, which pretty much was a carbon copy of the U.S. Constitution except that it stipulated the government could not impose protective tariffs, grant subsidies, or finance internal improvements. On the matter of slavery, it specifically asserted the inviolability of that institution. This was more clear than the U.S. Constitution, but not at odds with it, and Lincoln and many in his camp publicly declared they were willing to amend the U.S. Constitution to make it say the same, if doing so would end the rebellion. Other than that, you can read the two constitutions side by side for long stretches and not be sure which is which. The CSA Constitution banned slave imports from Africa, proscribed international traffic in slaves, kept the three-fifths clause, and even allowed non-slave states the option of joining the new nation. No one can deny the importance of slavery to the feud that split the United States, or that the CSA states made protection of slavery one of its central purposes. But the secession of 1860-61 and the shooting war that followed were the climax of a long interplay. Like a couple heading into divorce, the regions fought often, in the open and in secret. But they nursed grudges, and what they argued out loud was not always the real issue. During the 1840s, slavery became the symbol and character of all sectional differences. It was the emotional gasoline on the sectional fires. Its moral and social implications colored every issue in terms of right and rights. William Seward, the Republican leader, recognized the fact: "Every question, political, civil, or ecclesiastical, however foreign to the subject of slavery, brings up slavery as an incident, and the incident supplants the principal question." So far from slavery being the cause of secession, the fact is many thinking men in the South knew that secession would be the doom of slavery. Slavery could not be economically viable or legally enforcable where freedom was just a river away. They had pushed the North so hard to enforce the Fugitive Slave Laws for just this reason. Stephens was among those who judged "slavery much more secure in the union than out of it."
|
| ©2002Douglas Harper | "When misunderstanding serves others as an advantage, one is helpless to make oneself understood." -Lionel Trilling |


Circuit IPPT Training
4-6 Sets\n\n
You only have 10 min to complete each set.\n
The longer you take to complete the circuit, the shorter your rest time.\n\n
Run 400m at your goal pace (e.g 1:30 = 9 min, 2.4 km goal pace)\n\n
Pull ups : 1 - 10 reps\n\n
Situps : 15 - 50 reps\n\n
Pushups : \n\n
Flutter Kicks : 20 counts of 4\n\n
Diamond Pushups : 5 - 15 reps\n\n
Rest the remaining of your 10 min before going for the next set


features
view all of the features of YatzuCheats
a clean user interface to improve your experience
Your information is always safe when using any yatzu's products and you are always welcome at us.
have any questions? join our
discord


contact<EMAIL_ADDRESS>I've lived around the globe: Europe, Asia and the United States. I've learned a lot about other cultures, life, international business, the global playing field, myself, and have met some amazing people along the way.
As much experience as I've had in my life, the new and unexpected are always around the corner. Dev Bootcamp has become my latest adventure.
I've had the itch for programming since childhood. However, life has always taken me in a different direction. I've always tried to get into programming and had somehow always lost my way. Whether I was interupted with stock administration, resource management, teaching or relocation, I had always seemed to get pulled into other opportunties.  Dedicating my life from this point on to Web Developement.


asn
Provides code generated from the asn.1 specification using the openAsn compiler to implement the asn.1 encoduing and decoding using unaligned PER encoding.


Dashboard 1: Faculty and Staff Demographics
>
Dashboard 2: What Courses Experience the Largest Drop In Enrollments?
>
Dashboard 3: Distribution of Letter Grades Awarded
>
Dashboard 4: Degrees and Certificates Awarded by Academic Year
>
Dashboard 5: California Law (AB 705) Adherence
>


GoFastCall
Seamlessly jump into your next meeting
To get started,
Connect with Google Calendar
Next, click on the extension button
when it's time for your meeting.
Refresh
Disconnect


Please choose the right service
Massage is a treatment that uses different kinds of physical contact to relax, revive and heal the body.
A hot stone massage is a type of massage therapy. It's used to help you relax and ease tense muscles.
Skin care is the range of practices that support skin integrity, enhance its appearance and relieve skin conditions.
Face masks can help absorb excess oils, open clogged pores, and reduce inflammation.
There is never a shortage of excuses for a great “treat yourself day.” There is always a good reason to pamper yourself
Keep calm and make a self-care plan.
© Copyright 2020. All right reserved.
Designed by Tath


Business organisation
Business organisation
Organisation name
Nomensa
Registration number
0123456789
Address
If this is not the correct organisation
email the lead applicant
.
Continue


# -*- coding: utf-8 -*-
"""
:Author: Dominic Hunt
:Reference: Genetic triple dissociation reveals multiple roles for dopamine in reinforcement learning.
Frank, M. J., Moustafa, A. a, Haughey, H. M., Curran, T., & Hutchison, K. E. (2007).
Proceedings of the National Academy of Sciences of the United States of America, 104(41), 16311–16316.
doi:10.1073/pnas.0706111104
"""
import numpy as np
from tasks.taskTemplate import Task
from model.modelTemplate import Stimulus, Rewards
[docs]class ProbSelect(Task):
"""
Probabilistic selection task based on Genetic triple dissociation reveals multiple roles for dopamine in reinforcement learning.
Frank, M. J., Moustafa, A. a, Haughey, H. M., Curran, T., & Hutchison, K. E. (2007).
Proceedings of the National Academy of Sciences of the United States of America, 104(41), 16311–16316.
doi:10.1073/pnas.0706111104
Many methods are inherited from the tasks.taskTemplate.Task class.
Refer to its documentation for missing methods.
Attributes
----------
Name : string
The name of the class used when recording what has been used.
Parameters
----------
reward_probability : float in range [0,1], optional
The probability that a reward is given for choosing action A. Default
is 0.7
action_reward_probabilities : dictionary, optional
A dictionary of the potential actions that can be taken and the
probability of a reward.
Default {0:rewardProb, 1:1-rewardProb, 2:0.5, 3:0.5}
learning_action_pairs : list of tuples, optional
The pairs of actions shown together in the learning phase.
learning_length : int, optional
The number of trials in the learning phase. Default is 240
test_length : int, optional
The number of trials in the test phase. Default is 60
reward_size : float, optional
The size of reward given if successful. Default 1
number_actions : int, optional
The number of actions that can be chosen at any given time, chosen at
random from actRewardProb. Default 4
Notes
-----
The task is broken up into two sections: a learning phase and a
transfer phase. Participants choose between pairs of four actions: A, B, M1
and M2. Each provides a reward with a different probability: A:P>0.5,
B:1-P<0.5, M1=M2=0.5. The transfer phase has all the action pairs but no
feedback. This class only covers the learning phase, but models are
expected to be implemented as if there is a transfer phase.
"""
def __init__(self,
reward_probability=0.7,
learning_action_pairs=None,
action_reward_probabilities=None,
learning_length=240,
test_length=60,
number_actions=None,
reward_size=1):
if learning_action_pairs is None:
learning_action_pairs = [(0, 1), (2, 3)]
if not action_reward_probabilities:
action_reward_probabilities = {0: reward_probability,
1: 1 - reward_probability,
2: 0.5,
3: 0.5}
if not number_actions:
number_actions = len(action_reward_probabilities)
super(ProbSelect, self).__init__()
self.parameters["reward_probability"] = reward_probability
self.parameters["action_reward_probabilities"] = action_reward_probabilities
self.parameters["learning_action_pairs"] = learning_action_pairs
self.parameters["learning_length"] = learning_length
self.parameters["test_length"] = test_length
self.parameters["number_actions"] = number_actions
self.parameters["reward_size"] = reward_size
self.t = -1
self.reward_probability = reward_probability
self.action_reward_probabilities = action_reward_probabilities
self.learning_action_pairs = learning_action_pairs
self.learning_length = learning_length
self.reward_size = reward_size
self.task_length = learning_length + test_length
self.action = None
self.reward_value = -1
self.number_actions = number_actions
self.choices = list(action_reward_probabilities.keys())
self.action_sequence = self.__generate_action_sequence(action_reward_probabilities,
learning_action_pairs,
learning_length,
test_length)
# Recording variables
self.record_reward_values = [-1] * self.task_length
self.record_actions = [-1] * self.task_length
def __next__(self):
"""
Produces the next stimulus for the iterator
Returns
-------
stimulus : None
next_valid_actions : Tuple of length 2 of ints
The list of valid actions that the model can respond with.
Raises
------
StopIteration
"""
self.t += 1
if self.t == self.task_length:
raise StopIteration
next_stimulus = None
next_valid_actions = self.action_sequence[self.t]
return next_stimulus, next_valid_actions
[docs] def receiveAction(self, action):
"""
Receives the next action from the participant
Parameters
----------
action : int or string
The action taken by the model
"""
self.action = action
[docs] def feedback(self):
"""
Responds to the action from the participant
"""
# The probability of success varies depending on if it is choice
if self.t < self.learning_length:
action_reward_probabilities = self.action_reward_probabilities[self.action]
if action_reward_probabilities >= np.random.rand(1):
reward = self.reward_size
else:
reward = 0
else:
reward = float('Nan')
self.reward_value = reward
self.storeState()
return reward
[docs] def proceed(self):
"""
Updates the task after feedback
"""
pass
[docs] def returnTaskState(self):
"""
Returns all the relevant data for this task run
Returns
-------
results : dictionary
A dictionary containing the class parameters as well as the other useful data
"""
results = self.standardResultOutput()
results["rewVals"] = np.array(self.record_reward_values)
results["Actions"] = np.array(self.record_actions)
results["validAct"] = np.array(self.action_sequence)
return results
[docs] def storeState(self):
""" Stores the state of all the important variables so that they can be
output later """
self.record_actions[self.t] = self.action
self.record_reward_values[self.t] = self.reward_value
@staticmethod
def __generate_action_sequence(action_reward_probability,
learning_action_pairs,
learning_length,
test_length):
pair_nums = list(range(len(learning_action_pairs)))
action_pairs = np.array(learning_action_pairs)
pairs = np.random.choice(pair_nums, size=learning_length, replace=True)
action_sequence = list(action_pairs[pairs])
for t in range(test_length):
pairs = np.random.choice(pair_nums, size=2, replace=False)
elements = np.random.choice([0, 1], size=2, replace=True)
pair = [action_pairs[p, e] for p, e in zip(pairs, elements)]
action_sequence.append(pair)
return action_sequence
[docs]class StimulusProbSelectDirect(Stimulus):
"""
Processes the selection stimuli for models expecting just the event
Examples
--------
>>> stim = StimulusProbSelectDirect()
>>> stim.processStimulus(1)
(1, 1)
>>> stim.processStimulus(0)
(1, 1)
"""
[docs] def processStimulus(self, observation):
"""
Processes the decks stimuli for models expecting just the event
Returns
-------
stimuliPresent : int or list of int
stimuliActivity : float or list of float
"""
return 1, 1
[docs]class RewardProbSelectDirect(Rewards):
"""
Processes the probabilistic selection reward for models expecting just the reward
"""
[docs] def processFeedback(self, reward, action, stimuli):
"""
Returns
-------
modelFeedback:
"""
return reward


{% comment %}
This modal is used on /education/apply-for-education-benefits/
and should be extended as needed around the non-react vets.gov
content.
{% endcomment %}
Which form do you need to use?
Servicemembers and Veterans applying for education benefits
If you are:
- A student who wants to change programs or schools
- A spouse or dependent
- A candidate for National Call to Service


Diamonds For Breakfast (1968)
Grade: 55
"Diamonds For Breakfast" is a comedy with surrealistic elements. It fittingly stars Marcello Mastroianni, whose most famous film is the surreal "8 1/2". While the comedy often doesn't work, the fantasy elements keep things interesting.
Mastroianni is the son of a Russian nobleman. The nobleman gambled away the family jewels, and now they reside in a British museum. Mastroianni decides to steal the jewels. To do this, he recruits a series of beautiful women, each of whom will do his bidding once he makes love to them. In an elaborate bait-and-switch scheme (the women are the bait, and the jewels are switched) the jewels are his again! But then things begin to unravel...
To keep Mastroianni onscreen as much as possible, he plays other roles as well, especially a bearded ancestor who appears now and then to offer advice and encouragement. Mastroianni also sings the title song, where we learn that there are limits to his talents.
Because of the mix of reality and fantasy, and a first-time director apparently without anyone looking over his shoulder, "Diamonds For Breakfast" is confusing and muddled. Much of the storyline is difficult to accept even in a comedy, such as the ease in which the diamonds are switched, and Mastroianni's success with "the family gift", which appears to be the ability to bed any woman and convert her into a slave. Also curious is that with all these beauties to choose from, the woman he prefers is also the least attractive.
Not quite there either as a comedy or as an art film, "Diamonds For Breakfast" is doomed to obscurity. It is recommended only to Mastroianni fans.
http://members.tripod.com/~Brian_Koller/movies.html
The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews


█ WELCOME
Warning, experimental content may not be suitable for human interfacing.
My name is Mathieu Dombrock and this is the home of my personal projects. It is not my portfolio. If you are looking for that head over to
mzero.space.
All links on this site are subject to change at any time without any redirects. Link to this site with caution.


--- layout: page-fullwidth meta_teaser: teaser: "" header: image: OFORTUNA.jpg background-color: "#262930" caption: 6832 Aquila Risen caption_url: image: thumb: OFORTUNA.jpg homepage: caption: caption_url: "" categories: - robotics - projects title: I Am Become Aquila, Destroyer of Worlds tags: [Motivate] section: team personhours: 20 rollcall: [Max] ---
The Great One, Aqui'la, has slumbered for too long. Since the deity lost Its battle with the accursed Gravitae a year ago, Its physical form has crumbled to pieces, leaving It powerless to bend the world to our will. As the last High Priest and Grand Memer of Its reign, the duty falls to me to return It to Its full power so that It may reign once more. I must do more than rebuild its effigy, however. To ensure It is not defeated by the forces of Physicks once again, the body must be as strong as the mountains, and as inpenetrable as the darkness.
Time is short; I must work quickly. I have retrieved the bones of the husk which once housed the Great One, and will use the unholy power of the Tri-Dimensional Prynter through which I first summoned it to rebuild the body. The ABS Plastyck, black as night, with which the old bones were once built, shall be the regent with which I will revive It.
At the stroke of midnight last night, I performed the Ritual of Creo to obtain the designs with which I may summon Aqui'la. With haste, I brought them to the Prynter. As I write these words, the new form takes shape; the barrier between our world and Its wears thin. The Great One draws nearer with each moment. Hark! The Prynter's work has been completed. I go now to piece together the old bones with the new, and conduct Its conciousness into the new form.


This problem set includes problems that you will do on ``pencil-and-paper'' and writeup using the LaTeX template we provide, and problems that involve programming that you will do using a Jupyter notebook, a convenient way to edit and run Python code and integrate code with formatted text.
LaTeX Problems
To start PS1, visit the overleaf repository using this link: https://www.overleaf.com/read/qzzjybkydrmv. This provides the template for you to use to provide your answers.
Getting Started with Jupyter
Download the ps1.ipynb
file, a Jupyter notebook
which combines text (in Markdown format) and executable Python
code. You can see a preview of this file
here, but to execute it you will need to run it as a Jupyter notebook.
To execute and edit the Jupyter notebook, you will need to install jupyter.
Visit https://jupyter.org/ and follow the directions at https://jupyter.org/install to install jupyter on your machine. If you already have Python installed, this should just involve running:
pip install jupyterlab
If you don’t have Python installed, you’ll need to install Python first. See python.org for information on installing Python.
Once you’ve installed Jupyter, run
jupyter notebook ps1.ipynb
to get started. This will start the jupyter local server and open the notebook in your web browser.
Follow the directions there, and complete the assignment by editing this file.
Submitting Problem Set 1
To submit problem set 1, you will need to upload your PDF from the latex template and your Jupyter notebook as separate assignments in GradeScope. You should submit the PDF for the “Problem Set 1” assignment as a PDF upload, and the Jupyter file for the “Problem set 1 (programming part)” assignment.


Name
Last created
Oldest created
Sort by
Name
Last created
Oldest created
New Project
Edit
Project Path
No projects found


Collection of ancillary functions and utilities to be used in conjunction with the 'TraMineR' package for sequence data exploration. Most of the functions are in test phase, lack systematic consistency check of the arguments and are subject to changes. Once fully checked, some of the functions of this collection could be included in a next release of 'TraMineR'.
| Version: | 0.4.4 |
| Depends: | R (≥ 3.0.0), TraMineR (≥ 2.0-8) |
| Imports: | grDevices, graphics, stats, cluster, RColorBrewer, survival |
| Published: | 2018-12-14 |
| Author: | Gilbert Ritschard [aut, cre, ths, cph], Matthias Studer [aut], Reto Buergin [aut], Alexis Gabadinho [ctb], Pierre-Alexandre Fonta [ctb], Nicolas Muller [ctb], Patrick Rousset [ctb] |
| Maintainer: | Gilbert Ritschard <gilbert.ritschard at unige.ch> |
| License: | GPL-2 | GPL-3 [expanded from: GPL (≥ 2)] |
| URL: | http://traminer.unige.ch/ |
| NeedsCompilation: | yes |
| Citation: | TraMineRextras citation info |
| Materials: | NEWS |
| CRAN checks: | TraMineRextras results |
| Reference manual: | TraMineRextras.pdf |
| Package source: | TraMineRextras_0.4.4.tar.gz |
| Windows binaries: | r-devel: TraMineRextras_0.4.4.zip, r-release: TraMineRextras_0.4.4.zip, r-oldrel: TraMineRextras_0.4.4.zip |
| OS X binaries: | r-release: TraMineRextras_0.4.4.tgz, r-oldrel: TraMineRextras_0.4.4.tgz |
| Old sources: | TraMineRextras archive |
Please use the canonical form https://CRAN.R-project.org/package=TraMineRextras to link to this page.


---
layout: default
title: Full Conference Schedule
permalink: /schedule/
description: DroidYangon 2019 Full Conference Schedule
heading: Full Conference Schedule
sitemap: true
---
Tutorials: July 9
Coming Soon
{% for post in site.schedule %}
{% capture day %}{{ post.date | date: "%A" }}{% endcapture %}
{% if day == 'Sunday' %}
{% include schedule-tutorials-day.html %}
{% endif %}
{% endfor %}
Talks: July 9
{% for post in site.schedule %}
{% capture day %}{{ post.date | date: "%A" }}{% endcapture %}
{% if day == 'Monday' %}
{% include schedule-talks-day.html %}
{% endif %}
{% endfor %}


The Credits
Blitz was lovingly written by Mark Sibly
Coded with lots of help and abuse from James L Boyd, Claire Foley and George Bray.
This tutorial was hand crafted by George Bray
Written whilst listening to Jean Michel Jarre, Pink Floyd, Vangelis and drinking
an endless supply of Tetley tea.
I would like to thank all the beta testers who have helped through the many
stages of Blitz Basic and to those I still speak to regularly, I don't want to praise individuals as
the whole project has been very much a team effort (but you know who you are)
Log-on to the live one here Blitz Basic and Here
So long and thanks for all the fish - George


Importing Data
The exported data is useless if you can't do anything with it! That's why there's also an import feature, to put the data back into WeatherLog. Importing data is just as simple as exporting it; click the open button in the toolbar, select Import from the File menu, or press Control-O. This will remove all of the data in the current profile and replace it with the imported data.
There's another option for importing the data; if you don't want the new data to replace the data in the current profile, select Import and Merge from the File menu. This differs from the other import feature in that it combines both sets of data. If there are no conflicting dates, where a date appears in both the original and new sets of data, then all of the data will be combined into one. However, if there is a date that appears in both sets, then only the data corrosponding to that date in the original set will be added.
Import as New Profile, in the same menu as the other two, is slightly different; it will import data in a new profile, instead of in the current one.


Markdown version of this page.
Last updated: 2018/2/22
| Time | Topic | Presenter |
|---|---|---|
| 15:00 - 15:25 | Dev Plan 18Q1 | Yung-Yu |
| 15:25 - 15:40 | Research Group Status Quo | Yung-Yu |
| 15:40 - 16:05 | Modern Virtualization Technologies | Taihsiang |
| 16:05 - 16:20 | Career Opportunities with Virtualization | Taihsiang |
| 16:20 - 16:30 | Immediate Deliverables | Yung-Yu |
Maybe we can make the plan clearer, or maybe not. It’s highly unlikely to come up with a schedule, though.
march::gas
)march::cese
)march::mp
)march::gran
march::gas
)


Random Khaled
Tap DJ Khaled to toggle him. Adjust his yelling frequency below.
Khaleds per Day
Max is on loop.


Dirichlet Processes
The Dirichlet process can be created using dirichlet-process
. It takes two arguments,
a concentration parameter and a base measure.
λ> (dirichlet-process 1 (normal 0 4))
#distributions.core.DirichletProcess{:concentration 1, :base-measure #distributions.core.Normal{:mean 0, :variance 4}}
In the following we assume that the data is generated from G which is modelled as a Dirichlet process. After observing some data, one can get the posterior over G in the usual fashion
λ> (posterior [1.1 2.2 2.2] :G (dirichlet-process 1 (normal 0 4)))
#distributions.core.DirichletProcess{:concentration 4, :base-measure #distributions.core.Mixture{:components [#distributions.core.DiscreteReal{:locations (1.1 2.2), :probabilities (1/3 2/3)} #distributions.core.Normal{:mean 0, :variance 4}], :probabilities (1/2 1/2)}}
Prediction of a new observation can be obtained using the posterior-predictive
function
λ> (posterior-predictive [1.1 2.2 2.2] :G (dirichlet-process 1 (normal 0 4)))
#distributions.core.Mixture{:components [#distributions.core.DiscreteReal{:locations (1.1 2.2), :probabilities (1/3 2/3)} #distributions.core.Normal{:mean 0, :variance 4}], :probabilities (1/2 1/2)}
When DP's are used as priors in larger models there is the rn-alg3
function when conjugate base measures are used. There are plans to implement rn-alg8
for non-conjugate priors soon.
(rn-alg3 observations likelihood base-measure concentration niter)
Arguments are data, a model for the data depending on some parameters, a DP base measure for those parameters, a DP concentration parameter and number of iterations.
rn-alg3
returns a map with 3 keys
:densities
, :labels
and :parameters
, each are vectors of length equal to number of iterations. The former is a vector of functions corresponding to the predictive densities
Here are some examples...
Normal Mixtures
The data is generated from a two component normal mixture, with means -4 and 4, variances 1, and component probabilities 0.25 0.75. We shall use a DP to perform density estimation with
likelihood (normal :mu 1)
, base measure (normal 0 4)
and
concentration 0.1.
(def proposal (mixture [(normal -4 1) (normal 4 1)] [(/ 1 4) (/ 3 4)]))
(def observations (sample proposal 100))
(def likelihood (normal :mu 1))
(def base-measure (normal 0 4))
(def concentration 0.1)
(def draws (rn-alg3 observations likelihood base-measure concentration 100))
(apply compose (map (fn [m] (plot m [-5 5] :colour "#62B132" :opacity 0.1 :plot-range [[-5 5] [0 0.3]])) (drop 10 (:densities draws))))
Poisson Mixtures
The example here is the “Traffic” dataset from the “MASS” R library for which the description reads
"An experiment was performed in Sweden in 1961-2 to assess the effect of a speed limit on the motorway accident rate. The experiment was conducted on 92 days in each year, matched so that day j in 1962 was comparable to day j in 1961. On some days the speed limit was in effect and enforced, while on other days there was no speed limit and cars tended to be driven faster. The speed limit days tended to be in contiguous blocks."
The data for when the speed limit was enforced is
λ> yes
(12 41 15 18 11 19 19 9 21 22 23 14 19 15 13 22 42 29 21 12 16 17 23 16 20 13 13 9 10 27 12 7 11 15 19 32 22 24 9 29 17 17 15 25 9 16 25 25 16 22 21 17 26 41 25 12 17 24 26 16 15 12 22 24 16 25 14 15 9)
and when not
λ> no
(9 11 9 20 31 26 18 19 18 13 29 40 28 17 15 21 24 15 32 22 24 11 27 17 27 37 32 25 20 40 21 18 35 21 25 34 42 27 34 47 36 15 26 27 18 16 32 28 17 16 19 18 22 37 29 18 14 14 18 21 39 39 21 15 17 20 24 30 25 8 21 9 20 15 14 30 23 15 14 16 20 10 14 18 26 38 31 12 8 22 17 31 49 23 14 25 24 18 19 21 19 24 44 31 21 20 19 20 29 48 36 15 16 29 12)
Each dataset can be modelled as a DP mixture of Poissons. Here I use a Gamma 2 0.1 base measure, with concentration parameter 1.
(def likelihood (poisson :rate))
(def base-measure (gamma 2 0.1))
(def concentration 1)
(def yes-draws (rn-alg3 yes likelihood base-measure concentration 100))
(def no-draws (rn-alg3 no likelihood base-measure concentration 100))
(compose
(apply compose (map (fn [m] (list-plot (map m (range 0 50)) :colour "#62B132" :opacity 0.1 :joined true :plot-range [[0 50] [0 0.1]])) (drop 10 (:densities yes-draws))))
(apply compose (map (fn [m] (list-plot (map m (range 0 50)) :colour "#5882D6" :opacity 0.1 :joined true :plot-range [[0 50] [0 0.1]])) (drop 10 (:densities no-draws)))))