| Home | Libraries | People | FAQ | More |
boost::accumulators::impl::variance_impl — Iterative calculation of variance.
// In header: <boost/accumulators/statistics/variance.hpp> template<typename Sample, typename MeanFeature, typename Tag> struct variance_impl { // types typedef numeric::functional::average< Sample, std::size_t >::result_type result_type; // construct/copy/destruct template<typename Args> variance_impl(Args const &); // public member functions template<typename Args> void operator()(Args const &) ; result_type result(dont_care) const; };
Iterative calculation of sample variance according to the formula
where
is the estimate of the sample mean and is the number of samples.
Note that the sample variance is not defined for .
A simplification can be obtained by the approximate recursion
because the difference
converges to zero as . However, for small the difference can be non-negligible.


Havoc Pennington has been writing lately (quite often) on Java, Mono, or C++.
He is bringing up some important issues, which I think can be summarized with the question: what is the future of the free software development environment?
Historically, of course, the environment has been primarily C. As this has become less acceptable to software writers, efforts have diverged into a number of different areas. But the "core" efforts, the basic infrastructure upon which we build, has remained in C. Except KDE's C++, but that's really the exception that proves the point -- and certainly not an example of how we want to transition to a different core environment (speaking from a social/political point of view, not technically).
Even C has been a bit of an issue, as attempts to build up the environment in C have met some resistance from people who don't want to deal with a large number of dependencies. Of course, since I use Debian I don't mind a large number of dependencies, and I'm only even vaguely aware that dependencies exist. But apparently a significant number of people are using inferior operating systems where this is a problem.
Anyway, ignoring the issues of dependencies, the question of environment is a very important one, and I think Havoc is right to start to talk about it as a conscious decision. Anyway, my two cents:
I think many in the free software community -- especially those with a desktop orientation -- have had an inferiority complex. They've heard the message that free software can only play catch-up with proprietary software, and for some reason they've come to actually believe this.
We need to start appreciating what we ("we" in the most inclusive sense) have accomplished. Coming back to dependencies and Debian, I think this is something that is an under-appreciated example of success. Debian has something on the order of 10,000 packages in it, all inside an inclusive system of developer support, bug tracking, release management, and everything else that makes the operating system work. This is built on technical foundations in part, but also very much on social and political foundations.
I believe the result is simply the most maintainable, well-controlled system of software ever. Ever! I feel confident that no one has created a matching system, not inside a research facility, not on mainframes, not in any of the other major operating systems. Because you can't create something like that outside of a social structure, and Debian simply has no peers in this.
This isn't a minor accomplishment either -- it gets to the foundation of managing a computer system, as applicable to desktops as to servers. It does so through technical means (which can be copied by proprietary companies), but also through the incremental and cooperative efforts of the Debian maintainers and users (which cannot be copied). Obviously, robust software management isn't the complete solution to all our woes, but it's a very important part of the ultimate solution.
I don't bring that up because it directly informs the environment debate -- though it does relate in some ways (in terms of creating manageable eclectic environments) -- but because I see it as a strategic example. Debian wasn't competing with Microsoft. I don't even think people were comparing Debian to Microsoft at any time during development. Debian did not compete on Microsoft's terms. And as a result, they were able to create a system that excelled in a way Microsoft could not excel.
We need to be doing the same when we consider environments. Here we're looking at two proprietary environments -- Java and C# (and arguably even C++ is proprietary in spirit) -- and asking which one is best. That's a horrible strategy! Those environments were created with strategic goals in mind, and those strategies hinge around proprietary companies.
Instead we should be looking for inspiration from within our community. We should be looking for the successes we have come up with ourselves, based on a feedback cycle that includes free software developers, and based on software methodologies that makes sense for us (methodologies which are very different from proprietary development).
An example: I think Python's model of portability is superior to Java's -- Java is based on the idea that you can abstract away the larger environment, so that every program will see the same thing no matter what platform it is on. Python's model is that you expose the platform's differences when they exist, and allow developers to create portability layers at whatever level makes sense to them, or to use no layer at all.
Java's model makes sense for proprietary development, because you may test on only one platform, but a user can use it on another platform with no changes. Python's model is superior for open source software, because if the user has problems on their platform (which won't necessarily happen, but can), then they can report the problem, suggest whatever pragmatic fix is necessary, and it will work on the next upgrade. Because there's a feedback loop, and because the user is empowered through the presence of source code, Python can make context-sensitive decisions about portability. The Python program can then make full use of the platform it runs on, instead of using the lowest common denominator, or creating entirely alternate layers (like Swing).
I'm not familiar enough with desktop programming, or with Java or C#, to come up with a lot of examples like this, but I suspect many exist. Ultimately a solution equivalent to Java or C# isn't going to come out of the free software community. But I think alternative solutions already have come into existence, we just haven't always recognized them because they don't map one-to-one to the proprietary technologies.
Ultimately I've already made my choices, so it should be no surprise I think Python is part of that solution. But only part. The larger environment that favors Python is probably one built on C libraries. This is in no small part because Python needs all the help in terms of speed that it can get (at least for the desktop). Though the dumb procedural libraries that C encourages also maps well to Python and other environments, where we would prefer to be given a low-concept library that can serve as the foundation of a higher-level library in the native language (and this applies to all the high level languages). Mapping a library from Java will be slightly less comfortable, I think, due to almost-but-not-quite mappings. But I don't have a lot of experience in this area, so maybe it works better than I expect.
I've been happy reading about some of the projects like D-BUS which seem to carry on in the tradition of low-concept libraries. Perhaps what's need is a way of understanding and appreciating this model of development -- layered, procedural, decoupled -- rather than supplanting it with something more "advanced".
(Of course, I don't program in C, so maybe it's flippant for me to say that I'm happy others are working in C, because those other people might not be so happy to be in that environment.)
I've only just recently started migrating to Debian. The packaging system seems to be both powerful and user hostile at the same time.
For a start everything is still firmly rooted in the commandline. There are programs like aptitude that try to hide some of this but it seems pretty obvious that this stuff was designed for commandline users.
The other thing that struck me is how many dependencies I need to bring down just to update one package. Sometimes I'll do an update and get 50 other packages along with it. Some of these seem to have nothing to do with the one I actually wanted.
The windows packaging system may have a lot of technical problems but at least it's easy to comprehend. You download one bundle. Run it and everything you need is bundled.# Anonymous
The Debian system is certainly written with the technical user in mind, though I think the foundation they provide doesn't preclude an easier system. I don't really want to debate the particulars of what it accomplishes, as it's an aside to this article, but it should be noted that it is extremely robust. And while it isn't necessarily easy for a novice user (novice with respect to system administration), it is actually superior to Windows in many respects that relate to usability. Most importantly: you can't mess it up. You can't remove a dependency without removing the packages that depend on it, so you won't leave things in a broken state. A lot of the less meaningful installation options are left out. The configuration is centrally located, and typically configured with reasonable defaults. Security updates are easily acquired and can be safely applied. Updates are always provided in the proper order. Major operating system upgrades can be performed safely. And the software will never spy on you.
Windows software can be easy to install, but is very hard to trust. I think the proper compromise -- even for the most novice user! -- is a trustworthy computer. Ultimately I don't think it's a necessary compromise -- robust system administration isn't exclusive with easy system administration -- but even if it was, I think Debian makes the right compromise.
But anyway, now I've done what I said I wouldn't -- go into debate about the particulars. The general idea was that Debian has done something truly novel, something that truly advances the state of the art, and soemthing that proprietary software hasn't and can't match. It's not the destination, but it's a solid step in the right direction, and something that we can build on. And the kind of success we can try to replicate.# Ian Bicking
Oh, and actually the Debian package system _is_ quite easy to understand. All data formats can be hacked, viewed, sliced, diced as you want - they are all standard stuff (ar archives, tar.gz files and simple text files). Not as some other packaging systems where you need special tools to drill in. And the mechanism that apt-get builds on is quite simple - just the package files which contain the dependencies and hints. Even the tools to build packages are standard stuff - you can still hack your package yourself without using any special tools (although the special tools do make life much easier).
And let's be honest: doing a whole system update by just "apt-get dist-upgrade" on a life machine without taking it down is allmost as cool as doing your first "make world" on a BSD box ;-)
I don't doubt the Debian package system is a technically robust system. I would like to see more emphasis making it more approachable to end users. I think Lindows got this point right with their click-and-run system - although they screw up other bits - so it obviously is possible to put a friendly front-end on apt. click-and-run works well for web-distributed products but we shouldn't stand alone packaging either.
The biggest issue isn't debs at all but the fact that Linux distributions are completely fragmented when it comes to package management. Right now you can't create a package that can be installed on any linux system without falling back to tarballs or building for all the separate packaging systems.
I guess we're diverging from the original discussion a bit aren't we?# Anonymous


Youth Services administers the Youth Interventionist Program, which was established in 1995. We house three experienced and well - trained masters-level Youth Interventionists at the Township who coordinate services to help young people at risk of involvement with gang activity, violence or substance abuse, working closely and collaboratively with local schools, law enforcement, libraries, parks, and villages year round. Eleven local government boards support the program both financially and with social capital.
- Crisis Intervention – The Interventionists work hard to build trusting relationships with teens that are at risk and are often the first to learn of an impending violent situation, or of a student who is exhibiting dangerous behaviors. The Interventionists also respond to school officials needing assistance with crises related to gangs and school violence, providing outreach and counseling.
- Identification of Pertinent Issues – The Interventionists meet with identified young people and their family members, and bring in professional counselors when needed, to identify issues that have triggered anti-social behavior. These can include a variety of core problems such as alienation from school, drug use within the family, and lack of parental supervision.
- Identification of Appropriate Services – The Interventionists work with the community’s extensive network of social service agencies to identify the most appropriate services to meet the needs of the targeted youth and his or her entire family. They then bring together the resources required to address individual and family needs including parenting skills, conflict resolution, job training and substance abuse counseling. Finally, they continue to track the youth and their families through the community's various support systems, thereby ensuring coordination of services.
Monthly Interventionist Reports
October 2017
A brochure that summarizes the Interventionist program may be found here. The annual report on the 2016 Youth Interventionist Program is available here.
For more information about gang prevention services offered in Oak Pak Township, please use our "Contact Us" form and select Youth Services, or call<PHONE_NUMBER>.


In common sense, a comment is a spoken remark of an action. Now this also applies to HTML.
In HTML a comment is a part of the code which tells another person reading your code what that part of the code is all about. It is not outputted with the rest of the code rather it only shows what the code in that part is all about. A comment can be put anywhere and as many times in a code


Our goal is to help players confront their unknown biases by exposing them to ways of life at different intersections of race, gender, socioeconomic status and ability.
You'll experience a day in the life of a random identity. Pay attention to the details, and when you're ready, take a guess at the race, gender, socioeconomic-status, and mental/physical ability.
Assume you are living in the USA, and that you're an adult.
Here's how you did!
[ explanations of evidence in the story goes here. ]
this kitten Kittens are an awesome source of ice cream. Learn more about.
Hey there! If you're seeing this, something went wrong. Not with you, but with this little game.
Drop us a note on the project page if you'd like to tell us what happened.
Time to check your social media feed!  You want to say something, but it doesn't really apply to your race. You ignore it instead.
Time to check your social media feed!  You want to say something, but it doesn't really apply to your race. You ignore it instead.
 You open the cabinets and realize you only have one serving of cereal left.  You open the cabinets and realize you only have one serving of cereal left. You decide to skip breakfast, knowing you won't be able to buy groceries later today
You rush to the train station but just as you reach the platform, you see the train pulling away. The next train comes in 25 minutes, so you call for an Uber instead so you can get to work on time
You rush to the train station but just as you reach the platform, you see the train pulling away. The next train comes in 25 minutes and there's no other accessible mode of transportation, you all you can do is wait
You've just started work at a new place and your boss calls you into his office. Instead of asking about your work, he makes a suggestive comment about your appearance.
You've just started work at a new place and your boss calls you into his office. Instead of asking about your work, he asks you how you're settling into the company.
You're alone in the elevator waiting to go to the ground floor. The doors open and your male colleague walks in. You move to the side.
You're alone in the elevator waiting to go to the ground floor. The doors open and your male colleague walks in and makes small talk.
You turn on the tap in the kitchen sink and light brown water flows out of it. You know that this isn't normal, so you go to the store and buy some jugs of water to use in the meantime.
You turn on the tap in the kitchen sink and light brown water flows out of it.


We Are Coming Soon
Days
931
Hours
24
Minutes
38
Seconds
08
Be the first to know when the website is ready!
Subscribe
Your browser does not support JavaScript!


Molly had been staring out of her window for about an hour now. On her desc, lying between the copies of Nature, New Scientist, and all the others scientific journals her work had appeared in, was a well thumbed copy of On The Road. It had been Molly's favorite book since college, and the longer she spent in these four walls the more she felt she needed to be free.
She had spent the last ten years in this room, sitting under the poster
with the Oscar Wilde quote proclaiming that Work is the refuge of people who
have nothing better to do
.


CacheDiff |
class CacheDiff : Diff |
FRegisterDiff |
class FRegisterDiff : Diff |
HeapSpaceDiff |
class HeapSpaceDiff : Diff |
InstructionDiff |
class InstructionDiff : Diff |
MemoryDiff |
class MemoryDiff : Diff |
PCDiff |
class PCDiff : Diff |
RegisterDiff |
class RegisterDiff : Diff |


Use -R to recurse, or explicitly a-r to remove read permissions.
chmod -r 0700 dir
chmod -r file
chmod -R 0700 dir
chmod a-r file
Many tools use -r
for recursive operation, but in chmod
this removes read permissions.
If you wanted to change permissions recursively, change the flag to -R
. If you wanted to remove read permissions, consider using a-r
explicitly to make this more obvious.
If you're using it correctly and don't mind the potential for confusion, you can save a single character by ignoring this warning.


Are you developing with Web Components, and wondering if you can use a given string as a custom element name in HTML? Just use this tool.
permalinkThat's a valid custom element name.
This tool uses Sindre Sorhus's validate-element-name under the hood.


Hi
I am facing problems when using multigraph, both on Emoncms.org and on my local server (V7).
 Sometines, some feeds are missing.
To get the multigraph works fine, I have to reload the page or to click on the D (or W or Y) buttons several times.
Most of the time, I lost the feeds when using the +/- (or </>) buttons) or when zooming in (focus with a window).
My browser is Mozilla Firefox Ubuntu 26.0.
Eric
Re: problems when using multigraph
Try this Eric,
Now every time you open the dashboard you should see 1 day's worth of data by default.
In respect of the disappearing feeds, could it be that you are zooming in too far? You will need at least 2 feed datapoints on screen for a line to be drawn, and if your feeds update less frequently, or you have missing datapoints, it's easy to zoom in and have just one datapoint in view - and therefore there would be no feed evident in the graph.
Paul
Re: problems when using multigraph
I am seeing a similar phenomenon with my graphs as well. They do not load with data and I need to hit D W etc. to display data. This is something that has started just recently. I even see this on some of my raw data graphs on my dashboards.
Re: problems when using multigraph
David, have you tried the above?
Paul
Re: problems when using multigraph
Hi Paul,
I created my multigraphs exactly how you told me to do it but it doesn't change anything. Sometimes I get a blank graph. Sometimes, one or several feeds are missing. To reproduce that bug, you can access to my main dashboard and reload that pages 10 times.
When I zoom in, I don't go too far. (2hours=120 data). Sometimes it works but some others times, I got a blank graph.
These two bugs must be related neither to my emoncms account nor to the way I created my multigraphs because I also got them when accessing public dashboard that belong to others emoncms.org users. Not sure, but It seems to be pretty new.
Eric
EDIT : I do not select the option "published" for my dashboard. What does this option mean for a dashboard ?
Re: problems when using multigraph
Take a look at the Dashboard Configuration part of this page of the Emoncms guide for what published means
http://emoncms.org/site/docs/dashboards
Can you also see if you have the same issue in a different web browser such as Chrome.
Re: problems when using multigraph
Paul,
I did try the suggestion above, but it did not resolve the issue. I did forget to mention that I am using Chrome as my web browser. Everything was working perfectly until just recently.
I've attached a screenshot of one of my dashboards. The top graph is a raw data graph and the bottom is a reat time graph. If I click one of the buttons on the graph, the data will show up. The dials update just fine.
Re: problems when using multigraph
Same observation on my side. It is a pretty new wrong behaviour.
Re: problems when using multigraph
This may be associated with the emoncms.org timestore problem in discussion here: http://openenergymonitor.org/emon/node/3731


Convert SPSS syntax files that contain BEGIN PROGRAM blocks of Python 2 code or Python 2 files to Python 3
STATS CONVERT PYTHON
FILES=file specifications* [/HELP] * Required
OUTPUTLOC="directory for output"*
INCLUDESUBS=yes or no**
COPYALL=yes or no**
OVERWRITE=yes or no**
** Default
/HELP displays this help and does nothing else.
STATS CONVERT PYTHON
FILES="C:/code/mycode.sps" OUTPUTLOC="C:/convertedcode".
STATS CONVERT PYTHON
FILES="C:/code/**" OUTPUTLOC="C:/convertedcode".
The command accepts a file, or a wildcard file expression of Statistics syntax and/or Python code and converts any Python 2 code to Python 3. For syntax files, it extracts BEGIN PROGRAM PYTHON, BEGIN PROGRAM PYTHON2, or BEGIN PROGRAM blocks, converts them to Python 3, and reinserts the converted code in place of the extracted code. It updates the block start to BEGIN PROGRAM PYTHON3.
FILES specifies the files to convert. It can be a plain file name with an sps extension or a Python file with a .py extension or a file wildcard expression such as "c:/code/*.sps".
Any files with other exensions are ignored, so *.* would process only .py and .sps files.
If the Python 2 code has errors in it, the conversion will fail. Occasionally the code conversion will be incomplete, and notes to that effect are displayed if detected. Note, however, that while conversions will be syntactically correct, they are not guaranteed to be perfectly accurate. As an example, x/y in Python 2 does integer division if the terms are integers while in Python 3, the operation is float division. The / would need to be changed to // to preserve the intent, but the converter cannot do this.
OUTPUTLOC specifies the location where the converted files should be written. If the location does not already exist, it will be created. Output files have the same subdirectory structure as the inputs but with the head of the input directory specification replaced with the OUTPUTLOC specification.
INCLUDESUBS If ** is used in the file expression, the search for input files will recurse through subdirectories if INCLUDESUBS is yes. For example, FILES="c:/code/**/*.py" would process code and all its subdirectories for Python files. FILES="c:/code/**" would process both Python and syntax files.
COPYALL specifies whether files that are not changed by conversion either because the Python is already valid Python 3 or the syntax file does not contain any Python 2 blocks are copied.
OVERWRITE specifies whether files in the target locations are overwritten or not, if possible.
The actual conversions are done by the Python lib2to3 module that is part of the Python standard library.
An additional log file named conversionMessages.txt is written to the output location root.
© Copyright(C) Jon K. Peck, 2021


{% extends 'common/backend_template.html' %} {% block content %} {% from "common/macros/_vertical_form.html" import render_field_with_errors %}
Maintain your company information here.
Maintain users who have access to this system.
| # | Name | Role(s) | Actions | |
|---|---|---|---|---|
| {{ loop.index }} | {{ user }} | {{ user.email }} | {{ user.get_roles_string() }} |
|


Use this page to compile or adjust the report. Use this page to review the report. Use this page to review daily report.
Markdown is your friend.


func runtime.runqget
5 uses
runtime (current package)
mgc.go#L1989: gp, _ := runqget(pp)
proc.go#L2583: if gp, inheritTime := runqget(_p_); gp != nil {
proc.go#L2670: if gp, inheritTime := runqget(_p_); gp != nil {
proc.go#L3120: gp, inheritTime = runqget(_g_.m.p.ptr())
proc.go#L5851: func runqget(_p_ *p) (gp *g, inheritTime bool) {
The pages are generated with Golds v0.2.7-preview. (GOOS=darwin GOARCH=amd64)


VA·LIS 2
ˈvælɪs
noun
Vast Active Living Intelligence System. The hologram-projecting satellite that creates our perceived reality. See: Philip K. Dick’s 1981 novel.
A less cool– but hopefully still interesting– blog on topics in pure mathematics, computer science, sci-fi, and sometimes music too.
Started in May of 2019 by a bored high school senior. The goal(s)? To…
- Better understand topics in mathematics and computer science by writing about and explaining them
- Give back by creating a decent resource for others to use
- Have an outlet for random thoughts on random things
About the Author
Sahra* Yusuf (姚凡莎) graduated from TJHSST in 2019 and is currently attending George Mason University for Computer Science. She has struggled for years to stick to just one thing but has finally begun to focus on a few subjects which are reflected in the topics explored here. She plays Nethack but has not yet ascended. Her Chinese is 不错.
*ˈsɛrə


We're sorry but final_safefood_vue doesn't work properly without JavaScript enabled. Please enable it to continue.


How to SSH into EC2 (Mac & Linux users)
Setup and configure AWS Command Line Interface (CLI)
-
Open your terminal and run “pip install awscli” and wait for it to install. You should get a message similar to the one below when it is finished.
Successfully installed PyYAML-3.13 awscli-1.16.18 botocore-1.12.8 ....
-
You can verify that aws cli was installed with “aws –version”.
$ aws --version aws-cli/1.16.10 Python/2.7.10 Darwin/17.7.0 botocore/1.12.0
-
We need to create the Access key now and we can do that by:
- Login to your aws console
- Click on your user name on the right top corner then “My Security Credentials”
- Click “Users” on the left side and then click on your user name. You should now see a summary of that user.
- Click “Security credentials” and then “Create access key”
- You can either download and store the .csv in a secure place or just write them down somewhere else, but remember that you cannot recover or view your secret access key if you lose it.

-
Open your terminal again and cd into the folder where you have your privatekey.pem file stored and run “chmod 400 privatekey.pem” to change the permissions of the key.
-
Most Mac & Linux machines have SSH preinstalled but you can check by running “ssh” in your terminal. Check out http://www.openssh.com if the terminal does not recognize the command.
-
We should now be able to successfully connect through SSH by running: “ssh -A /path_to_key/privatekey.pem username@public_dns_name” (Amazon Linux uses ec2-user as username and -A enables agent forwarding).
$ ssh -A privatekey.pem<EMAIL_ADDRESS>Last login: Fri Sep 21 23:26:43 2018 from 76-221-172-215.lightspeed.irvnca.sbcglobal.net __| __|_ ) _| ( / Amazon Linux AMI __\___|___| https://aws.amazon.com/amazon-linux-ami/2018.03-release-notes/ 13 package(s) needed for security, out of 24 available Run "sudo yum update" to apply all updates.
Connect to your instance with a private network.
-
You are now able to SSH into your instance with a private ip by running “ssh username@private-ip”. (Ubuntu uses ubuntu as username)
$ ssh ubuntu@PrivateIP-1 Welcome to Ubuntu 16.04.5 LTS (GNU/Linux 4.4.0-1065-aws x86_64) * Documentation: https://help.ubuntu.com * Management: https://landscape.canonical.com * Support: https://ubuntu.com/advantage Get cloud support with Ubuntu Advantage Cloud Guest: http://www.ubuntu.com/business/services/cloud 0 packages can be updated. 0 updates are security updates. The programs included with the Ubuntu system are free software; the exact distribution terms for each program are described in the individual files in /usr/share/doc/*/copyright. Ubuntu comes with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law. To run a command as administrator (user "root"), use "sudo <command>". See "man sudo_root" for details. ubuntu@PrivateIP-1:~$


This is a collection of some of the React projects I have built.
The game is a zero-player game, meaning that its evolution is determined by its initial state. One interacts with the Game of Life by creating an initial configuration.
A dungeon crawl is a type of scenario in fantasy role-playing games in which heroes navigate a labyrinthine environment (a "dungeon"), battling various monsters.
Drum machines is an app that imitate drum kits or other percussion instruments, or produce unique sounds.
A game concept where the player maneuvers as a snake. In this case the Snake grows by having an extra of its infants follow it. For every mouse eaten by the snake, the snake gains an infant.
Markdown is a lightweight markup language that allows people "to write using an easy-to-read, easy-to-write plain text format, then convert it to structurally valid XHTML (or HTML)". This Project gives you the option to write text in Markdown and have them displayed in markdown view.


Finished a master course in Intelligent Computer Games Development. Have participated in several simulation projects. Pursuing a career in game development, artificial intelligent, computer graphics and virtual reality.
Able to develop applications with various programming languages. Has in-depth knowledge of software methodologies, algorithms and data structures. Occasionally create apps and websites in spare time.
Provide consulting service in various sectors of technology. Finding solution for technology related problems. Currently writing news articles on tntonly.com and teaching stuff.
A full-featured calculator created using Javascript running on a HTML page. Find it here
A simple application to turn any of your photos to a Cheguevara-like photo. Well may be not that magical, but at least your photo will have a black and red look. You know, like most Che photos. Find it here
What you're looking at right now. Find it here
System Administrator
Knowledge Engineer
Business Analyst
You can go to their profiles by clicking on the icons above ;)


This puzzle presents as a simple chat room with a stated goal: All your team has to do is count to 100, one by one, without skipping or repeating any numbers. This is a traditionally difficult coordination exercise in live chats worldwide. To better simulate the posting conditions to which solvers may be accustomed, we have provided our own trolls to assist with the task (since we know that none of our solving teams contain Internet trolls at all). The moment any participant successfully counts 100, the page reveals the correct answer, YOSHIMITSU.
The behavior of the six automated trolls is described below, in the order of their expected appearance. Their names have no special significance except to hint at their behavior.
As an initial layer of difficulty, all participants in chat are assigned a random animal name to better disguise the presence of our automated trolls.
Helpful Firefly announces its presence after some number N with a suitably human-like message. It then counts N+1 and, three seconds later, N+3. This tests the solving team's ability to designate exactly one person to submit N+2 in the small window of reaction time given.
In addition, teams that are too efficient in their counting may find that all their active members are on the five-second message cooldown when Helpful Firefly appears.
Singing Creodont is not a standalone entity, but instead replaces all chat text with some number of A's. This is a purely cosmetic effect — numeric inputs are still processed as normal, and replaced by that number of A's. While solvers can technically keep counting and ignore the Creodont, its yelling may interfere with their ability to recognize when one of the other trolls is in play.
Singing Creodont's effect can be disabled by singing along, providing the correct number of A's (e.g. 13, in the case of Ember Husky above). Providing an incorrect number of A's registers as a counting failure.
Quizb Owl asks relatively simple trivia questions. The problem is that their answers are all numbers, so solvers have to write them out in words to avoid a miscount. Questions attempt to induce one of several failure modes — timeout failure because the spelled-out version of the number is long; communication failure because the answer is chosen to be in the vicinity of a number that is the correct count; and brain failure because the question nerd snipes hard enough for the answerer to forget about the whole use-words thing.
Quizb Owl insists upon an answer within forty seconds, posting increasingly agitated reminders every ten seconds. At the forty second mark, Quizb Owl posts the correct answer, as a number, which may trigger a miscount.
Automated Adder Viper tries to backsolve this puzzle through a long and complicated simulation process that is equivalent to summing the two components of its version number. Solvers need to race with the Viper's startup process to make sure that their expected count is at the right place when the Viper spits out its projected answer to the problem.
The amount of time allotted, and the Viper's eventual answer, are chosen so that a team of four will find the race to be fast but not impossibly so. Three people can manage it as long as they can dispatch other interfering bots easily.
Twitchy Chat, much like its namesake, just wants solvers to know that it is good at solving puzzles too. It is sometimes correct and sometimes wrong, but never actually triggers a count or miscount.
Nice Ouroboros just wants to post the meme number.


Apache Cordova
Connecting to Device
Device is Ready
Login with Facebook
Show Dialog with Facebook
Test API with Facebook
Get access token with Facebook
Get login status with Facebook
Logout with Facebook


random
`Prev `__
R
`Next `__
--------------
**random**: adj.
1. Unpredictable (closest to mathematical definition); weird. “The
system's been behaving pretty randomly.”
2. Assorted; undistinguished.
3. (pejorative) Frivolous; unproductive; undirected. “He's just a random
loser.”
4. Incoherent or inelegant; poorly chosen; not well organized. “The
program has a random set of misfeatures.” “That's a random name for that
function.” “Well, all the names were chosen pretty randomly.”
5. In no particular order, though deterministic. “The I/O channels are
in a pool, and when a file is opened one is chosen randomly.”
6. Arbitrary. “It generates a random name for the scratch file.”
7. Gratuitously wrong, i.e., poorly done and for no good apparent
reason. For example, a program that handles file name defaulting in a
particularly useless way, or an assembler routine that could easily have
been coded using only three registers, but redundantly uses seven for
values with non-overlapping lifetimes, so that no one else can invoke it
without first saving four extra registers. What
`*randomness* `__!
8. n. A random hacker; used particularly of high-school students who
soak up computer time and generally get in the way.
9. n. Anyone who is not a hacker (or, sometimes, anyone not known to the
hacker speaking); the noun form of sense 2. “I went to the talk, but the
audience was full of randoms asking bogus questions”.
10. n. (occasional MIT usage) One who lives at Random Hall. See also
`*J. Random* <../J/J--Random.html>`__, `*some random
X* <../S/some-random-X.html>`__.
11. [UK] Conversationally, a non sequitur or something similarly
out-of-the-blue. As in: “Stop being so random!” This sense equates to
‘hatstand’, taken from the Viz comic character “Roger Irrelevant - He's
completely Hatstand.”
--------------
+-----------------------------------+----------------------------+--------------------------------------+
| `Prev `__ | `Up <../R.html>`__ | `Next `__ |
+-----------------------------------+----------------------------+--------------------------------------+
| rainbow series | `Home <../index.html>`__ | Random Number God |
+-----------------------------------+----------------------------+--------------------------------------+


This is my third time with iprocin (4-HO-DIPT). The first two times were with approximately 10mg and 15mg respectively, which both resulted in rather mild but potentially intriguing experiences. This time, with more like 25mg, was considerably more intense. Note: all doses were eyeballed (not even by myself), so they are loose estimates based on the intensity of others' trip reports.
10/6/05
6:00pm ingested somewhere around 25mg swallowed in capsule. Have had nothing to eat for several hours. Mindset is anticipatory and prepared for a strong trip.
T+0:35 Minor tryptamine body buzz. I feel relaxed, almost lethargic.
T+0:50 Mild +. I'm a little frustrated at the mildness and slow come-up. I'm worried that the material has degraded becuase 50 minutes is a long time to wait to feel something on this drug - especially with reports of strong alerts in 15 minutes.
T+1:00 Relaxed and drifty ++. The tryptamine feel is very warm, enveloping, and comforting - like its bubbling up from inside of me. This is probably as intense as my last 15 mg experience.
T+1:15 I am suddenly quite energetic (a no-longer-quite-so-mild ++). Rapidly ascending. Very FUN feeling - there is a distinct 5-MeO-DIPT type body energy that is becoming more and more pronounced.
T+1:20 This is very intense but not at all what I expected. There are no visuals to speak of ... it is very body oriented. Jittery. Mentally I jump quickly from one thought to another without much depth. But simply moving THROUGH this galactic energy field that my thoughts are immersed in is so beautiful. Speaking of energy, I am literally not able to stop moving, even for a few moments. Either my muscles tremor uncontrollably or else I have to channel that energy into dancing around, which I do to great enjoyment. It is as if the drug wants me to oscillate at a specific vibrational frequency - for what purpose I don't know.
T+1:30-45 +++. I can't do anything except what I'm doing. I can't imagine doing anything except what I'm doing. Have I always been doing this? The experience is totally enveloping. 'Just +++ smashed' (from TiHKAL) is as apt a description as is possible. There is a deep euphoria and contentedness with the world. What difference does anything make? Things will happen as they happen and you're either along for the ride or else continually fighting the ride. Analyzing it while you're going along is probably not even worth it. Just ENJOY it for what it is because if you just relaxed it WILL be beautiful. It is what it is.
T+2:00 I have passed the peak and am slowly coming down. Still +++, but the intrusive energy felt earlier has evaporated and now things feel very gentle. Deep. I try drawing. Things feel gloriously chaotic and I am well in tune with the quantum mechanical improbabilities of the universe..
T+2:30 ++. I feel downright fantastic.
T+2:45 +
T+3:00 Largely baseline with an empathic and lucid afterglow. Amazing.
T+7:00 Sleep difficult, as is typical for me after a psychedelic experience, no matter how baseline I feel.
This was a wonderful experience by any standards, and I was quite amazed at the rapidity of comeup, peak, and comedown - even though it took longer to hit than expected. The body buzz was almost annoying, but not too bad since I was able to channel it well and it lasted for at most an hour. Similar to a 5-MeO-DIPT trip, for me the experience seems divided into an ascent dominated by body energy and a plateau and descent that is much more mental/emotional.
I liked this chemical but at this dose I feel it lacked the spiritual depth of mushrooms or the malleability of many of the phenethylamines. For most of the trip I was mentally scattered, buzzing and euphoric but unable to do anything else except experience it. Perhaps revisiting it at a similar or higher dose will reveal it more meaningful, since the first time seeing the true colors of a psychedelic you are often put in the observer's role. It was surely an intense little trip however, the short duration of which is a major plus.c
Experience Reports are the writings and opinions of the individual authors who submit them.
Some of the activities described are dangerous and/or illegal and none are recommended by Erowid.


cis_interface.communication package¶
Subpackages¶
- cis_interface.communication.tests package
- Submodules
- cis_interface.communication.tests.test_AsciiFileComm module
- cis_interface.communication.tests.test_AsciiMapComm module
- cis_interface.communication.tests.test_AsciiTableComm module
- cis_interface.communication.tests.test_AsyncComm module
- cis_interface.communication.tests.test_CommBase module
- cis_interface.communication.tests.test_FileComm module
- cis_interface.communication.tests.test_ForkComm module
- cis_interface.communication.tests.test_IPCComm module
- cis_interface.communication.tests.test_JSONFileComm module
- cis_interface.communication.tests.test_MatFileComm module
- cis_interface.communication.tests.test_ObjFileComm module
- cis_interface.communication.tests.test_PandasFileComm module
- cis_interface.communication.tests.test_PickleFileComm module
- cis_interface.communication.tests.test_PlyFileComm module
- cis_interface.communication.tests.test_RMQAsyncComm module
- cis_interface.communication.tests.test_RMQComm module
- cis_interface.communication.tests.test_ServerComm module
- cis_interface.communication.tests.test_YAMLFileComm module
- cis_interface.communication.tests.test_ZMQComm module
- Module contents
Submodules¶
cis_interface.communication.AsciiFileComm module¶
-
class
cis_interface.communication.AsciiFileComm.
AsciiFileComm
(*args, **kwargs)[source]¶ Bases:
cis_interface.communication.FileComm.FileComm
Class for handling I/O from/to a file on disk.
Parameters: -
classmethod
get_testing_options
(**kwargs)[source]¶ Method to return a dictionary of testing options for this class.
Returns: - Dictionary of variables to use for testing. Key/value pairs:
- kwargs (dict): Keyword arguments for comms tested with the
- provided content.
send (list): List of objects to send to test file. recv (list): List of objects that will be received from a test
file that was sent the messages in ‘send’.- contents (bytes): Bytes contents of test file created by sending
- the messages in ‘send’.
Return type: dict
-
classmethod
cis_interface.communication.AsciiMapComm module¶
-
class
cis_interface.communication.AsciiMapComm.
AsciiMapComm
(*args, **kwargs)[source]¶ Bases:
cis_interface.communication.FileComm.FileComm
Class for handling I/O from/to a ASCII map on disk.
Parameters: - name (str) – The environment variable where file path is stored.
- **kwargs – Additional keywords arguments are passed to parent class.
-
classmethod
get_testing_options
()[source]¶ Method to return a dictionary of testing options for this class.
Returns: - Dictionary of variables to use for testing. Key/value pairs:
- kwargs (dict): Keyword arguments for comms tested with the
- provided content.
send (list): List of objects to send to test file. recv (list): List of objects that will be received from a test
file that was sent the messages in ‘send’.- contents (bytes): Bytes contents of test file created by sending
- the messages in ‘send’.
Return type: dict
cis_interface.communication.AsciiTableComm module¶
-
class
cis_interface.communication.AsciiTableComm.
AsciiTableComm
(*args, **kwargs)[source]¶ Bases:
cis_interface.communication.AsciiFileComm.AsciiFileComm
Class for handling I/O from/to a file on disk.
Parameters: - name (str) – The environment variable where communication address is stored.
- delimiter (str, optional) – String that should be used to separate columns. If not provided and format_str is not set prior to I/O, this defaults to whitespace.
- use_astropy (bool, optional) – If True and the astropy package is installed, it will be used to read/write the table. Defaults to False.
- **kwargs – Additional keywords arguments are passed to parent class.
-
advance_in_series
(*args, **kwargs)[source]¶ Advance to a certain file in a series.
Parameters: index (int, optional) – Index of file in the series that should be moved to. Defaults to None and call will advance to the next file in the series. Returns: True if the file was advanced in the series, False otherwise. Return type: bool
-
change_position
(file_pos, series_index=None, header_was_read=None, header_was_written=None)[source]¶ Change the position in the file/series.
Parameters: - file_pos (int) – Position that should be moved to in the file.
- series_index (int, optinal) – Index of the file in the series that should be moved to. Defaults to None and will be set to the current series index.
- header_was_read (bool, optional) – Status of if header has been read or not. Defaults to None and will be set to the current value.
- header_was_written (bool, optional) – Status of if header has been written or not. Defaults to None and will be set to the current value.
-
classmethod
get_testing_options
(as_array=False, **kwargs)[source]¶ Method to return a dictionary of testing options for this class.
Returns: - Dictionary of variables to use for testing. Key/value pairs:
- kwargs (dict): Keyword arguments for comms tested with the
- provided content.
send (list): List of objects to send to test file. recv (list): List of objects that will be received from a test
file that was sent the messages in ‘send’.- contents (bytes): Bytes contents of test file created by sending
- the messages in ‘send’.
Return type: dict
cis_interface.communication.AsyncComm module¶
-
class
cis_interface.communication.AsyncComm.
AsyncComm
(name, dont_backlog=False, **kwargs)[source]¶ Bases:
cis_interface.communication.CommBase.CommBase
Class for handling asynchronous I/O.
Parameters: -
dont_backlog
¶ If True, the backlog will not be started and all messages will be sent/received directly to/from the comm.
Type: bool
-
backlog_send_ready
¶ Event set when there is a message in the send backlog.
Type: threading.Event
-
backlog_recv_ready
¶ Event set when there is a message in the recv backlog.
Type: threading.Event
-
add_backlog_recv
(msg)[source]¶ Add a message to the backlog of received messages.
Parameters: msg (str) – Received message that should be backlogged.
-
add_backlog_send
(msg, **kwargs)[source]¶ Add a message to the backlog of messages to be sent.
Parameters: - msg (str) – Message that should be backlogged for sending.
- **kwargs – Additional keyword arguments are added along with the message.
-
backlog_thread
¶ Thread that will handle sinding or receiving backlogged messages.
Type: tools.CisThread
-
pop_backlog_recv
()[source]¶ Pop a message from the front of the recv backlog.
Returns: First backlogged recv message. Return type: str
-
cis_interface.communication.ClientComm module¶
-
class
cis_interface.communication.ClientComm.
ClientComm
(name, request_comm=None, response_kwargs=None, dont_open=False, **kwargs)[source]¶ Bases:
cis_interface.communication.CommBase.CommBase
Class for handling Client side communication.
Parameters: - name (str) – The environment variable where communication address is stored.
- request_comm (str, optional) – Comm class that should be used for the request comm. Defaults to None.
- response_kwargs (dict, optional) – Keyword arguments for the response comm. Defaults to empty dict.
- **kwargs – Additional keywords arguments are passed to the output comm.
-
ocomm
¶ Request comm.
Type: Comm
-
call
(*args, **kwargs)[source]¶ Do RPC call. The request message is sent to the output comm and the response is received from the input comm.
Parameters: - *args – Arguments are passed to output comm send method.
- **kwargs – Keyword arguments are passed to output comm send method
Returns: Output from input comm recv method.
Return type: obj
-
classmethod
is_installed
(language=None)[source]¶ Determine if the necessary libraries are installed for this communication class.
Parameters: language (str, optional) – Specific language that should be checked for compatibility. Defaults to None and all languages supported on the current platform will be checked. Returns: Is the comm installed. Return type: bool
-
classmethod
new_comm_kwargs
(name, request_comm=None, **kwargs)[source]¶ Initialize communication with new comms.
Parameters:
-
opp_comm_kwargs
()[source]¶ Get keyword arguments to initialize communication with opposite comm object.
Returns: Keyword arguments for opposite comm object. Return type: dict
-
recv
(*args, **kwargs)[source]¶ Receive a message from the input comm and open a new response comm for output using address from the header.
Parameters: - *args – Arguments are passed to input comm recv method.
- **kwargs – Keyword arguments are passed to input comm recv method.
Returns: Output from input comm recv method.
Return type: obj
-
send
(*args, **kwargs)[source]¶ Create a response comm and then send a message to the output comm with the response address in the header.
Parameters: - *args – Arguments are passed to output comm send method.
- **kwargs – Keyword arguments are passed to output comm send method.
Returns: Output from output comm send method.
Return type: obj
cis_interface.communication.CommBase module¶
-
class
cis_interface.communication.CommBase.
CommBase
(name, address=None, direction='send', dont_open=False, is_interface=False, recv_timeout=0.0, close_on_eof_recv=True, close_on_eof_send=False, single_use=False, reverse_names=False, no_suffix=False, is_client=False, is_response_client=False, is_server=False, is_response_server=False, comm=None, matlab=False, **kwargs)[source]¶ Bases:
cis_interface.tools.CisClass
Class for handling I/O.
Parameters: - name (str) – The environment variable where communication address is stored.
- address (str, optional) – Communication info. Default to None and address is taken from the environment variable.
- direction (str, optional) – The direction that messages should flow through the connection. ‘send’ if the connection will send messages, ‘recv’ if the connecton will receive messages. Defaults to ‘send’.
- ( (serializer) – class:.DefaultSerialize, optional): Class with serialize and deserialize methods that should be used to process sent and received messages. Defaults to None and is constructed using provided ‘serializer_kwargs’.
- serializer_kwargs (dict, optional) – Keyword arguments that should be passed to :class:.DefaultSerialize to create serializer. Defaults to {}.
- format_str (str, optional) – String that should be used to format/parse messages. Default to None.
- dont_open (bool, optional) – If True, the connection will not be opened. Defaults to False.
- is_interface (bool, optional) – Set to True if this comm is a Python interface binding. Defaults to False.
- recv_timeout (float, optional) – Time that should be waited for an incoming message before returning None. Defaults to 0 (no wait). A value of False indicates that recv should block.
- close_on_eof_recv (bool, optional) – If True, the comm will be closed when it receives an end-of-file messages. Otherwise, it will remain open. Defaults to True.
- close_on_eof_send (bool, optional) – If True, the comm will be closed after it sends an end-of-file messages. Otherwise, it will remain open. Defaults to False.
- single_use (bool, optional) – If True, the comm will only be used to send/recv a single message. Defaults to False.
- reverse_names (bool, optional) – If True, the suffix added to the comm with be reversed. Defaults to False.
- no_suffix (bool, optional) – If True, no directional suffix will be added to the comm name. Defaults to False.
- is_client (bool, optional) – If True, the comm is one of many potential clients that will be sending messages to one or more servers. Defaults to False.
- is_response_client (bool, optional) – If True, the comm is a client-side response comm. Defaults to False.
- is_server (bool, optional) – If True, the commis one of many potential servers that will be receiving messages from one or more clients. Defaults to False.
- is_response_server (bool, optional) – If True, the comm is a server-side response comm. Defaults to False.
- recv_converter (func, optional) – Converter that should be used on received objects. Defaults to None.
- send_converter (func, optional) – Converter that should be used on sent objects. Defaults to None.
- comm (str, optional) – The comm that should be created. This only serves as a check that the correct class is being created. Defaults to None.
- matlab (bool, optional) – True if the comm will be accessed by Matlab code. Defaults to False.
- **kwargs – Additional keywords arguments are passed to parent class.
-
serializer (
class:.DefaultSerialize): Object that will be used to serialize/deserialize messages to/from python objects.
-
close_on_eof_recv
¶ If True, the comm will be closed when it receives an end-of-file messages. Otherwise, it will remain open.
Type: bool
-
close_on_eof_send
¶ If True, the comm will be closed after it sends an end-of-file messages. Otherwise, it will remain open.
Type: bool
-
is_client
¶ If True, the comm is one of many potential clients that will be sending messages to one or more servers.
Type: bool
-
is_server
¶ If True, the comm is one of many potential servers that will be receiving messages from one or more clients.
Type: bool
-
recv_converter
¶ Converter that should be used on received objects.
Type: func
-
send_converter
¶ Converter that should be used on sent objects.
Type: func
Raises: RuntimeError
– If the comm class is not installed.RuntimeError
– If there is not an environment variable with the specified name.ValueError
– If directions is not ‘send’ or ‘recv’.
-
add_work_comm
(comm)[source]¶ Add work comm to dict.
Parameters: ( (comm) – class:.CommBase): Comm that should be added. Raises: KeyError
– If there is already a comm associated with the key.
-
apply_recv_converter
(msg_in)[source]¶ Apply recv_converter.
Parameters: msg_in (object) – Message to convert. Returns: Converted message. Return type: object
-
apply_send_converter
(msg_in)[source]¶ Apply send converter.
Parameters: msg_in (object) – Message to convert. Returns: Converted message. Return type: object
-
chunk_message
(msg)[source]¶ Yield chunks of message of size maxMsgSize
Parameters: msg (str, bytes) – Raw message bytes to be chunked. Returns: Chunks of message. Return type: str
-
close
(linger=False)[source]¶ Close the connection.
Parameters: linger (bool, optional) – If True, drain messages before closing the comm. Defaults to False.
-
close_in_thread
(no_wait=False, timeout=None)[source]¶ In a new thread, close the comm when it is empty.
Parameters:
-
create_work_comm
(work_comm_name=None, **kwargs)[source]¶ Create a temporary work comm.
Parameters: - work_comm_name (str, optional) – Name that should be used for the work comm. If not provided, one is created from the header id and the comm class.
- **kwargs – Keyword arguments for new_comm that should override work_comm_kwargs.
Returns: class:.CommBase: Work comm.
-
drain_messages
(direction=None, timeout=None, variable=None)[source]¶ Sleep while waiting for messages to be drained.
-
empty_obj_recv
¶ Empty message object.
Type: obj
-
classmethod
get_testing_options
(**kwargs)[source]¶ Method to return a dictionary of testing options for this class.
Returns: - Dictionary of variables to use for testing. Key/value pairs:
- kwargs (dict): Keyword arguments for comms tested with the
- provided content.
send (list): List of objects to send to test file. recv (list): List of objects that will be received from a test
file that was sent the messages in ‘send’.- contents (bytes): Bytes contents of test file created by sending
- the messages in ‘send’.
Return type: dict
-
get_work_comm
(header, **kwargs)[source]¶ Get temporary work comm, creating as necessary.
Parameters: - header (dict) – Information that will be sent in the message header to the work comm.
- **kwargs – Additional keyword arguments are passed to header2workcomm.
Returns: class:.CommBase: Work comm.
-
header2workcomm
(header, work_comm_name=None, **kwargs)[source]¶ Get a work comm based on header info.
Parameters: - header (dict) – Information that will be sent in the message header to the work comm.
- work_comm_name (str, optional) – Name that should be used for the work comm. If not provided, one is created from the header id and the comm class.
- **kwargs – Additional keyword arguments are added to the returned dictionary.
Returns: class:.CommBase: Work comm.
-
is_empty_recv
(msg)[source]¶ Check if a received message object is empty.
Parameters: msg (obj) – Message object. Returns: True if the object is empty, False otherwise. Return type: bool
-
is_empty_send
(msg)[source]¶ Check if a message object being sent is empty.
Parameters: msg (obj) – Message object. Returns: True if the object is empty, False otherwise. Return type: bool
-
is_eof
(msg)[source]¶ Determine if a message is an EOF.
Parameters: msg (obj) – Message object to be tested. Returns: True if the message indicates an EOF, False otherwise. Return type: bool
-
is_file
= False
-
classmethod
is_installed
(language=None)[source]¶ Determine if the necessary libraries are installed for this communication class.
Parameters: language (str, optional) – Specific language that should be checked for compatibility. Defaults to None and all languages supported on the current platform will be checked. If set to ‘any’, the result will be True if this comm is installed for any of the supported languages. Returns: Is the comm installed. Return type: bool
-
maxMsgSize
Maximum size of a single message that should be sent.
Type: int
-
new_server
(srv_address)[source]¶ Create a new server.
Parameters: srv_address (str) – Address of server comm.
-
on_recv
(s_msg, second_pass=False)[source]¶ Process raw received message including handling deserializing message and handling EOF.
Parameters: Returns: - Success or failure, processed message, and
header information.
Return type:
-
on_recv_eof
()[source]¶ Actions to perform when EOF received.
Returns: Flag that should be returned for EOF. Return type: bool
-
on_send
(msg, header_kwargs=None)[source]¶ Process message to be sent including handling serializing message and handling EOF.
Parameters: - msg (obj) – Message to be sent
- header_kwargs (dict, optional) – Keyword arguments that should be added to the header.
Returns: - Truth of if message should be sent, raw
bytes message to send, and header info contained in the message.
Return type:
-
on_send_eof
()[source]¶ Actions to perform when EOF being sent.
Returns: True if EOF message should be sent, False otherwise. Return type: bool
-
opp_comm_kwargs
()[source]¶ Get keyword arguments to initialize communication with opposite comm object.
Returns: Keyword arguments for opposite comm object. Return type: dict
-
recv
(*args, **kwargs)[source]¶ Receive a message.
Parameters: - *args – All arguments are passed to comm _recv method.
- **kwargs – All keywords arguments are passed to comm _recv method.
Returns: - Success or failure of receive and received
message.
Return type:
-
recv_dict
(*args, **kwargs)[source]¶ Return a received message as a dictionary of fields. If there are not any fields specified, the fields will have the form ‘f0’, ‘f1’, ‘f2’, …
Parameters: - *args – Arguments are passed to recv.
- **kwargs – Keyword arguments are passed to recv.
Returns: - Success/failure of receive and a dictionar of
message fields.
Return type: Raises:
-
recv_multipart
(*args, **kwargs)[source]¶ Receive a multipart message. If a message is received without a header, it assumed to be complete. Otherwise, the message is received in parts from a worker comm initialized by the sender.
Parameters: - *args – All arguments are passed to comm _recv method.
- **kwargs – All keywords arguments are passed to comm _recv method.
Returns: - Success or failure of receive and received
message.
Return type:
-
remove_work_comm
(key, in_thread=False, linger=False)[source]¶ Close and remove a work comm.
Parameters:
-
send
(*args, **kwargs)[source]¶ Send a message.
Parameters: - *args – All arguments are assumed to be part of the message.
- **kwargs – All keywords arguments are passed to comm _send method.
Returns: Success or failure of send.
Return type:
-
send_dict
(args_dict, **kwargs)[source]¶ Send a message with fields specified in the input dictionary.
Parameters: - args_dict (dict) – Dictionary of arguments to send.
- **kwargs – Additiona keyword arguments are passed to send.
Returns: Success/failure of send.
Return type: Raises: RuntimeError
– If the field order can not be determined.
-
send_eof
(*args, **kwargs)[source]¶ Send the EOF message as a short message.
Parameters: - *args – All arguments are passed to comm send.
- **kwargs – All keywords arguments are passed to comm send.
Returns: Success or failure of send.
Return type:
-
send_multipart
(msg, header_kwargs=None, **kwargs)[source]¶ Send a multipart message. If the message is smaller than maxMsgSize, it is sent using _send, otherwise it is sent to a worker comm using _send_multipart_worker.
Parameters: - msg (obj) – Message to be sent.
- header_kwargs (dict, optional) – Keyword arguments that should be added to the header.
- **kwargs – Additional keyword arguments are passed to _send or _send_multipart_worker.
Returns: Success or failure of send.
Return type:
-
server_exists
(srv_address)[source]¶ Determine if a server exists.
Parameters: srv_address (str) – Address of server comm. Returns: - True if a server with the provided address exists, False
- otherwise.
Return type: bool
-
wait_for_confirm
(timeout=None, direction=None, active_confirm=False, noblock=False)[source]¶ Sleep until all messages are confirmed.
-
class
cis_interface.communication.CommBase.
CommServer
(srv_address, cli_address=None, **kwargs)[source]¶ Bases:
cis_interface.tools.CisThreadLoop
Basic server object to keep track of clients.
-
class
cis_interface.communication.CommBase.
CommThreadLoop
(comm, name=None, suffix='CommThread', **kwargs)[source]¶ Bases:
cis_interface.tools.CisThreadLoop
Thread loop for comms to ensure cleanup.
Parameters: - ( (comm) – class:.CommBase): Comm class that thread is for.
- name (str, optional) – Name for the thread. If not provided, one is created by combining the comm name and the provided suffix.
- suffix (str, optional) – Suffix that should be added to comm name to name the thread. Defaults to ‘CommThread’.
- **kwargs – Additional keyword arguments are passed to the parent class.
-
comm (
class:.CommBase): Comm class that thread is for.
-
cis_interface.communication.CommBase.
cleanup_comms
(comm_class, close_func=None)[source]¶ Clean up comms of a certain type.
Parameters: comm_class (str) – Comm class that should be cleaned up. Returns: Number of comms closed. Return type: int
-
cis_interface.communication.CommBase.
get_comm_registry
(comm_class)[source]¶ Get the comm registry for a comm class.
Parameters: comm_class (str) – Comm class to get registry for. Returns: Dictionary of registered comm objects. Return type: dict
-
cis_interface.communication.CommBase.
is_registered
(comm_class, key)[source]¶ Determine if a comm object has been registered under the specified key.
Parameters:
-
cis_interface.communication.CommBase.
register_comm
(comm_class, key, value)[source]¶ Add a comm object to the global registry.
Parameters:
cis_interface.communication.ErrorComm module¶
cis_interface.communication.FileComm module¶
-
class
cis_interface.communication.FileComm.
FileComm
(*args, **kwargs)[source]¶ Bases:
cis_interface.communication.CommBase.CommBase
Class for handling I/O from/to a file on disk.
>>> x = FileComm('test_send', address='test_file.txt', direction='send') >>> x.send('Test message') True >>> with open('test_file.txt', 'r') as fd: ... print(fd.read()) Test message >>> x = FileComm('test_recv', address='test_file.txt', direction='recv') >>> x.recv() (True, b'Test message')
Parameters: - name (str) – The environment variable where communication address is stored.
- read_meth (str, optional) – Method that should be used to read data from the file. Defaults to ‘read’. Ignored if direction is ‘send’.
- append (bool, optional) – If True and writing, file is openned in append mode. Defaults to False.
- in_temp (bool, optional) – If True, the path will be considered relative to the platform temporary directory. Defaults to False.
- open_as_binary (bool, optional) – If True, the file is opened in binary mode. Defaults to True.
- newline (str, optional) – String indicating a new line. Defaults to serialize._default_newline.
- is_series (bool, optional) – If True, input/output will be done to a series of files. If reading, each file will be processed until the end is reached. If writing, each output will be to a new file in the series. The addressed is assumed to contain a format for the index of the file. Defaults to False.
- wait_for_creation (float, optional) – Time (in seconds) that should be waited before opening for the file to be created if it dosn’t exist. Defaults to 0 s and file will attempt to be opened immediately.
- **kwargs – Additional keywords arguments are passed to parent class.
-
fd
¶ File that should be read/written.
Type: file
-
in_temp
¶ If True, the path will be considered relative to the platform temporary directory.
Type: bool
-
is_series
¶ If True, input/output will be done to a series of files. If reading, each file will be processed until the end is reached. If writing, each output will be to a new file in the series.
Type: bool
Raises: ValueError
– If the read_meth is not one of the supported values.-
advance_in_file
(file_pos)[source]¶ Advance to a certain position in the current file.
Parameters: file_pos (int) – Position that should be moved to in the current. file.
-
advance_in_series
(series_index=None)[source]¶ Advance to a certain file in a series.
Parameters: series_index (int, optional) – Index of file in the series that should be moved to. Defaults to None and call will advance to the next file in the series. Returns: True if the file was advanced in the series, False otherwise. Return type: bool
-
change_position
(file_pos, series_index=None)[source]¶ Change the position in the file/series.
Parameters:
-
fd
Associated file identifier.
-
get_series_address
(index=None)[source]¶ Get the address of a file in the series.
Parameters: index (int, optional) – Index in series to get address for. Defaults to None and the current index is used. Returns: Address for the file in the series. Return type: str
-
classmethod
get_testing_options
(read_meth='read', open_as_binary=True, **kwargs)[source]¶ Method to return a dictionary of testing options for this class.
Returns: - Dictionary of variables to use for testing. Key/value pairs:
- kwargs (dict): Keyword arguments for comms tested with the
- provided content.
send (list): List of objects to send to test file. recv (list): List of objects that will be received from a test
file that was sent the messages in ‘send’.- contents (bytes): Bytes contents of test file created by sending
- the messages in ‘send’.
Return type: dict
-
is_file
= True¶
-
classmethod
is_installed
(language=None)[source]¶ Determine if the necessary libraries are installed for this communication class.
Parameters: language (str, optional) – Specific language that should be checked for compatibility. Defaults to None and all languages supported on the current platform will be checked. Returns: Is the comm installed. Return type: bool
-
on_send_eof
()[source]¶ Close file when EOF to be sent.
Returns: False so that message not sent. Return type: bool
cis_interface.communication.ForkComm module¶
-
class
cis_interface.communication.ForkComm.
ForkComm
(name, comm=None, **kwargs)[source]¶ Bases:
cis_interface.communication.CommBase.CommBase
Class for receiving/sending messages from/to multiple comms.
Parameters: -
opp_comm_kwargs
()[source]¶ Get keyword arguments to initialize communication with opposite comm object.
Returns: Keyword arguments for opposite comm object. Return type: dict
-
cis_interface.communication.IPCComm module¶
-
class
cis_interface.communication.IPCComm.
IPCComm
(name, dont_backlog=False, **kwargs)[source]¶ Bases:
cis_interface.communication.AsyncComm.AsyncComm
Class for handling I/O via IPC message queues.
-
q
¶ Message queue.
Type: sysv_ipc.MessageQueue
-
classmethod
is_installed
(language=None)[source]¶ Determine if the necessary libraries are installed for this communication class.
Parameters: language (str, optional) – Specific language that should be checked for compatibility. Defaults to None and all languages supported on the current platform will be checked. Returns: Is the comm installed. Return type: bool
-
-
class
cis_interface.communication.IPCComm.
IPCServer
(srv_address, cli_address=None, **kwargs)[source]¶ Bases:
cis_interface.communication.CommBase.CommServer
IPC server object for cleaning up server queue.
-
cis_interface.communication.IPCComm.
get_queue
(qid=None)[source]¶ Create or return a sysv_ipc.MessageQueue and register it.
Parameters: qid (int, optional) – If provided, ID for existing queue that should be returned. Defaults to None and a new queue is returned. Returns: Message queue. Return type: sysv_ipc.MessageQueue
-
cis_interface.communication.IPCComm.
ipc_queues
()[source]¶ Get a list of active IPC queues.
Returns: List of IPC queues. Return type: list
-
cis_interface.communication.IPCComm.
ipcrm
(options=[])[source]¶ Remove IPC constructs using the ipcrm command.
Parameters: options (list) – List of flags that should be used. Defaults to an empty list.
-
cis_interface.communication.IPCComm.
ipcrm_queues
(queue_keys=None)[source]¶ Delete existing IPC queues.
Parameters: queue_keys (list, str, optional) – A list of keys for queues that should be removed. Defaults to all existing queues.
cis_interface.communication.JSONFileComm module¶
-
class
cis_interface.communication.JSONFileComm.
JSONFileComm
(*args, **kwargs)[source]¶ Bases:
cis_interface.communication.FileComm.FileComm
Class for handling I/O from/to a JSON file on disk.
Parameters: - name (str) – The environment variable where file path is stored.
- **kwargs – Additional keywords arguments are passed to parent class.
-
classmethod
get_testing_options
()[source]¶ Method to return a dictionary of testing options for this class.
Returns: - Dictionary of variables to use for testing. Key/value pairs:
- kwargs (dict): Keyword arguments for comms tested with the
- provided content.
send (list): List of objects to send to test file. recv (list): List of objects that will be received from a test
file that was sent the messages in ‘send’.- contents (bytes): Bytes contents of test file created by sending
- the messages in ‘send’.
Return type: dict
cis_interface.communication.MatFileComm module¶
-
class
cis_interface.communication.MatFileComm.
MatFileComm
(name, **kwargs)[source]¶ Bases:
cis_interface.communication.FileComm.FileComm
Class for handling I/O from/to a Matlab .mat file on disk.
Parameters: - name (str) – The environment variable where file path is stored.
- **kwargs – Additional keywords arguments are passed to parent class.
-
classmethod
get_testing_options
()[source]¶ Method to return a dictionary of testing options for this class.
Returns: - Dictionary of variables to use for testing. Key/value pairs:
- kwargs (dict): Keyword arguments for comms tested with the
- provided content.
send (list): List of objects to send to test file. recv (list): List of objects that will be received from a test
file that was sent the messages in ‘send’.- contents (bytes): Bytes contents of test file created by sending
- the messages in ‘send’.
Return type: dict
cis_interface.communication.ObjFileComm module¶
-
class
cis_interface.communication.ObjFileComm.
ObjFileComm
(*args, **kwargs)[source]¶ Bases:
cis_interface.communication.PlyFileComm.PlyFileComm
Class for handling I/O from/to a .obj file on disk.
Parameters: - name (str) – The environment variable where communication address is stored.
- **kwargs – Additional keywords arguments are passed to parent class.
-
classmethod
get_testing_options
()[source]¶ Method to return a dictionary of testing options for this class.
Returns: - Dictionary of variables to use for testing. Key/value pairs:
- kwargs (dict): Keyword arguments for comms tested with the
- provided content.
send (list): List of objects to send to test file. recv (list): List of objects that will be received from a test
file that was sent the messages in ‘send’.- contents (bytes): Bytes contents of test file created by sending
- the messages in ‘send’.
Return type: dict
cis_interface.communication.PandasFileComm module¶
-
class
cis_interface.communication.PandasFileComm.
PandasFileComm
(*args, **kwargs)[source]¶ Bases:
cis_interface.communication.AsciiTableComm.AsciiTableComm
Class for handling I/O from/to a pandas csv file on disk.
Parameters: -
classmethod
get_testing_options
(as_frames=False, no_names=False)[source]¶ Method to return a dictionary of testing options for this class.
Parameters: Returns: - Dictionary of variables to use for testing. Key/value pairs:
- kwargs (dict): Keyword arguments for comms tested with the
provided content.
send (list): List of objects to send to test file. recv (list): List of objects that will be received from a test
file that was sent the messages in ‘send’.
- contents (bytes): Bytes contents of test file created by sending
the messages in ‘send’.
Return type:
-
classmethod
-
cis_interface.communication.PandasFileComm.
pandas_recv_converter
(obj)[source]¶ Performs conversion to a limited set of objects from a Pandas data frame for receiving from a file via PandasFileComm. Currently supports converting to lists/tuples of numpy arrays.
Parameters: obj (pandas.DataFrame) – Data frame to convert. Returns: - pandas.DataFrame: Converted data frame (or unmodified input if conversion
- could not be completed.
Return type: list
-
cis_interface.communication.PandasFileComm.
pandas_send_converter
(obj)[source]¶ Performs conversion from a limited set of objects to a Pandas data frame for sending to a file via PandasFileComm. Currently supports converting from structured numpy arrays, lists/tuples of numpy arrays, and dictionaries.
Parameters: obj (object) – Object to convert. Returns: - Converted data frame (or unmodified input if conversion
- could not be completed.
Return type: pandas.DataFrame
cis_interface.communication.PickleFileComm module¶
-
class
cis_interface.communication.PickleFileComm.
PickleFileComm
(name, **kwargs)[source]¶ Bases:
cis_interface.communication.FileComm.FileComm
Class for handling I/O from/to a pickled file on disk.
Parameters: - name (str) – The environment variable where file path is stored.
- **kwargs – Additional keywords arguments are passed to parent class.
-
classmethod
get_testing_options
()[source]¶ Method to return a dictionary of testing options for this class.
Returns: - Dictionary of variables to use for testing. Key/value pairs:
- kwargs (dict): Keyword arguments for comms tested with the
- provided content.
send (list): List of objects to send to test file. recv (list): List of objects that will be received from a test
file that was sent the messages in ‘send’.- contents (bytes): Bytes contents of test file created by sending
- the messages in ‘send’.
Return type: dict
cis_interface.communication.PlyFileComm module¶
-
class
cis_interface.communication.PlyFileComm.
PlyFileComm
(*args, **kwargs)[source]¶ Bases:
cis_interface.communication.FileComm.FileComm
Class for handling I/O from/to a .ply file on disk.
Parameters: - name (str) – The environment variable where communication address is stored.
- **kwargs – Additional keywords arguments are passed to parent class.
-
classmethod
get_testing_options
()[source]¶ Method to return a dictionary of testing options for this class.
Returns: - Dictionary of variables to use for testing. Key/value pairs:
- kwargs (dict): Keyword arguments for comms tested with the
- provided content.
send (list): List of objects to send to test file. recv (list): List of objects that will be received from a test
file that was sent the messages in ‘send’.- contents (bytes): Bytes contents of test file created by sending
- the messages in ‘send’.
Return type: dict
cis_interface.communication.RMQAsyncComm module¶
-
class
cis_interface.communication.RMQAsyncComm.
RMQAsyncComm
(name, dont_backlog=False, **kwargs)[source]¶ Bases:
cis_interface.communication.RMQComm.RMQComm
Class for handling asynchronous RabbitMQ communications. It is not recommended to use this class as it can leave hanging threads if not closed propertly. The normal RMQComm will cover most use cases.
Parameters: -
rmq_thread
¶ Thread used to run IO loop.
Type: tools.CisThread
-
channel_stable
¶ True if the connection ready for messages and not about to close. False otherwise.
Type: bool
-
on_bindok
(unused_frame)[source]¶ Actions to perform once the queue is succesfully bound. Start consuming messages.
-
on_cancelok
(unused_frame)[source]¶ Actions to perform after succesfully cancelling consumption. Closes the channel.
-
on_channel_closed
(channel, *args)[source]¶ Actions to perform when the channel is closed. Close the connection.
-
on_channel_open
(channel)[source]¶ Actions to perform after a channel is opened. Add the channel close callback and setup the exchange.
-
on_connection_closed
(connection, *args)[source]¶ Actions that must be taken when the connection is closed. Set the channel to None. If the connection is meant to be closing, stop the IO loop. Otherwise, wait 5 seconds and try to reconnect.
-
on_connection_open
(connection)[source]¶ Actions that must be taken when the connection is opened. Add the close connection callback and open the RabbitMQ channel.
-
on_connection_open_error
(unused_connection)[source]¶ Actions that must be taken when the connection fails to open.
-
on_exchange_declareok
(unused_frame)[source]¶ Actions to perform once an exchange is succesfully declared. Set up the queue.
-
on_queue_declareok
(method_frame)[source]¶ Actions to perform once the queue is succesfully declared. Bind the queue.
-
rmq_lock
¶ Lock associated with RMQ ioloop thread.
-
cis_interface.communication.RMQComm module¶
-
class
cis_interface.communication.RMQComm.
RMQComm
(name, dont_backlog=False, **kwargs)[source]¶ Bases:
cis_interface.communication.AsyncComm.AsyncComm
Class for handling basic RabbitMQ communications.
-
connection
¶ RabbitMQ connection.
Type: pika.Connection
-
channel
¶ RabbitMQ channel.
Type: pika.Channel
Raises: RuntimeError
– If a connection cannot be established.-
classmethod
is_installed
(language=None)[source]¶ Determine if the necessary libraries are installed for this communication class.
Parameters: language (str, optional) – Specific language that should be checked for compatibility. Defaults to None and all languages supported on the current platform will be checked. Returns: Is the comm installed. Return type: bool
-
classmethod
new_comm_kwargs
(name, user=None, password=None, host=None, virtual_host=None, port=None, exchange=None, queue='', **kwargs)[source]¶ Initialize communication with new connection.
Parameters: - name (str) – Name of new connection.
- user (str, optional) – RabbitMQ server username. Defaults to config option ‘user’ in section ‘rmq’ if it exists and ‘guest’ if it does not.
- password (str, optional) – RabbitMQ server password. Defaults to config option ‘password’ in section ‘rmq’ if it exists and ‘guest’ if it does not.
- host (str, optional) – RabbitMQ server host. Defaults to config option ‘host’ in section ‘rmq’ if it exists and ‘localhost’ if it does not. If ‘localhost’, the output of socket.gethostname() is used.
- virtual_host (str, optional) – RabbitMQ server virtual host. Defaults to config option ‘vhost’ in section ‘rmq’ if it exists and ‘/’ if it does not.
- port (str, optional) – Port on host to use. Defaults to config option ‘port’ in section ‘rmq’ if it exists and ‘5672’ if it does not.
- exchange (str, optional) – RabbitMQ exchange. Defaults to config option ‘namespace’ in section ‘rmq’ if it exits and ‘’ if it does not.
- queue (str, optional) – Name of the queue that messages will be send to or received from. If an empty string, the queue will be a random string and exclusive to a receiving comm. Defaults to ‘’.
- **kwargs – Additional keywords arguments are returned as keyword arguments for the new comm.
Returns: Arguments and keyword arguments for new comm.
Return type:
-
-
class
cis_interface.communication.RMQComm.
RMQServer
(srv_address, cli_address=None, **kwargs)[source]¶ Bases:
cis_interface.communication.CommBase.CommServer
RMQ server object for cleaning up server connections.
-
cis_interface.communication.RMQComm.
check_rmq_server
(url=None, **kwargs)[source]¶ Check that connection to a RabbitMQ server is possible.
Parameters: - url (str, optional) – Address of RMQ server that includes all the necessary information. If this is provided, the remaining arguments are ignored. Defaults to None and the connection parameters are taken from the other arguments.
- username (str, optional) – RMQ server username. Defaults to config value.
- password (str, optional) – RMQ server password. Defaults to config value.
- host (str, optional) – RMQ hostname or IP Address to connect to. Defaults to config value.
- port (str, optional) – RMQ server TCP port to connect to. Defaults to config value.
- vhost (str, optional) – RMQ virtual host to use. Defaults to config value.
Returns: - True if connection to RabbitMQ server is possible, False
otherwise.
Return type:
cis_interface.communication.ServerComm module¶
-
class
cis_interface.communication.ServerComm.
ServerComm
(name, request_comm=None, response_kwargs=None, dont_open=False, **kwargs)[source]¶ Bases:
cis_interface.communication.CommBase.CommBase
Class for handling Server side communication.
Parameters: - name (str) – The environment variable where communication address is stored.
- request_comm (str, optional) – Comm class that should be used for the request comm. Defaults to None.
- response_kwargs (dict, optional) – Keyword arguments for the response comm. Defaults to empty dict.
- **kwargs – Additional keywords arguments are passed to the input comm.
-
icomm
¶ Request comm.
Type: Comm
-
ocomm
¶ Response comm for last request.
Type: Comm
-
classmethod
is_installed
(language=None)[source]¶ Determine if the necessary libraries are installed for this communication class.
Parameters: language (str, optional) – Specific language that should be checked for compatibility. Defaults to None and all languages supported on the current platform will be checked. Returns: Is the comm installed. Return type: bool
-
classmethod
new_comm_kwargs
(name, request_comm=None, **kwargs)[source]¶ Initialize communication with new comms.
Parameters:
-
opp_comm_kwargs
()[source]¶ Get keyword arguments to initialize communication with opposite comm object.
Returns: Keyword arguments for opposite comm object. Return type: dict
-
recv
(*args, **kwargs)[source]¶ Receive a message from the input comm and open a new response comm for output using address from the header.
Parameters: - *args – Arguments are passed to input comm recv method.
- **kwargs – Keyword arguments are passed to input comm recv method.
Returns: Output from input comm recv method.
Return type: obj
cis_interface.communication.YAMLFileComm module¶
-
class
cis_interface.communication.YAMLFileComm.
YAMLFileComm
(*args, **kwargs)[source]¶ Bases:
cis_interface.communication.FileComm.FileComm
Class for handling I/O from/to a YAML file on disk.
Parameters: - name (str) – The environment variable where file path is stored.
- **kwargs – Additional keywords arguments are passed to parent class.
-
classmethod
get_testing_options
()[source]¶ Method to return a dictionary of testing options for this class.
Returns: - Dictionary of variables to use for testing. Key/value pairs:
- kwargs (dict): Keyword arguments for comms tested with the
- provided content.
send (list): List of objects to send to test file. recv (list): List of objects that will be received from a test
file that was sent the messages in ‘send’.- contents (bytes): Bytes contents of test file created by sending
- the messages in ‘send’.
Return type: dict
cis_interface.communication.ZMQComm module¶
-
class
cis_interface.communication.ZMQComm.
ZMQComm
(name, dont_backlog=False, **kwargs)[source]¶ Bases:
cis_interface.communication.AsyncComm.AsyncComm
Class for handling I/O using ZeroMQ sockets.
Parameters: - name (str) – The environment variable where the socket address is stored.
- context (zmq.Context, optional) – ZeroMQ context that should be used. Defaults to None and the global context is used.
- socket_type (str, optional) – The type of socket that should be created. Defaults to _default_socket_type. See zmq for all options.
- socket_action (str, optional) – The action that the socket should perform. Defaults to action based on the direction (‘connect’ for ‘recv’, ‘bind’ for ‘send’.)
- topic_filter (str, optional) – Message filter to use when subscribing. This is only used for ‘SUB’ socket types. Defaults to ‘’ which is all messages.
- dealer_identity (str, optional) – Identity that should be used to route messages to a dealer socket. Defaults to ‘0’.
- **kwargs – Additional keyword arguments are passed to :class:.CommBase.
-
context
¶ ZeroMQ context that will be used.
Type: zmq.Context
-
socket
¶ ZeroMQ socket.
Type: zmq.Socket
-
check_reply_socket_recv
(msg)[source]¶ Check incoming message for reply address.
Parameters: msg (str) – Incoming message to check. Returns: Messages with reply address removed if present. Return type: str
-
check_reply_socket_send
(msg)[source]¶ Append reply socket address if it
Parameters: msg (str) – Message that will be piggy backed on. Returns: Message with reply address if it has not been sent. Return type: str
-
header2workcomm
(header, **kwargs)[source]¶ Get a work comm based on header info.
Parameters: - header (dict) – Information that will be sent in the message header to the work comm.
- **kwargs – Additional keyword arguments are passed to the parent method.
Returns: class:.CommBase: Work comm.
-
classmethod
is_installed
(language=None)[source]¶ Determine if the necessary libraries are installed for this communication class.
Parameters: language (str, optional) – Specific language that should be checked for compatibility. Defaults to None and all languages supported on the current platform will be checked. Returns: Is the comm installed. Return type: bool
-
is_message
(flags)[source]¶ Poll the socket for a message.
Parameters: flags (int) – ZMQ poll flags. Returns: True if there is a message matching the flags, False otherwise. Return type: bool
-
classmethod
new_comm_kwargs
(name, protocol=None, host=None, port=None, **kwargs)[source]¶ Initialize communication with new queue.
Parameters: - name (str) – Name of new socket.
- protocol (str, optional) – The protocol that should be used. Defaults to None and is set to _default_protocol. See zmq for details.
- host (str, optional) – The host that should be used. Invalid for ‘inproc’ protocol. Defaults to ‘localhost’.
- port (int, optional) – The port used. Invalid for ‘inproc’ protocol. Defaults to None and a random port is choosen.
- **kwargs – Additional keywords arguments are returned as keyword arguments for the new comm.
Returns: Arguments and keyword arguments for new socket.
Return type:
-
on_send
(msg, header_kwargs=None)[source]¶ Process message to be sent including handling serializing message and handling EOF.
Parameters: - msg (obj) – Message to be sent
- header_kwargs (dict, optional) – Keyword arguments that should be added to the header.
Returns: - Truth of if message should be sent, raw
bytes message to send, and header info contained in the message.
Return type:
-
on_send_eof
()[source]¶ Actions to perform when EOF being sent.
Returns: True if EOF message should be sent, False otherwise. Return type: bool
-
opp_comm_kwargs
()[source]¶ Get keyword arguments to initialize communication with opposite comm object.
Returns: Keyword arguments for opposite comm object. Return type: dict
-
server_exists
(srv_address)[source]¶ Determine if a server exists.
Parameters: srv_address (str) – Address of server comm. Returns: - True if a server with the provided address exists, False
- otherwise.
Return type: bool
-
class
cis_interface.communication.ZMQComm.
ZMQProxy
(srv_address, context=None, retry_timeout=-1, nretry=1, **kwargs)[source]¶ Bases:
cis_interface.communication.CommBase.CommServer
Start a proxy in a new thread for a server address. A client-side address will be randomly generated.
Parameters: - srv_address (str) – Address that should face the server(s).
- context (zmq.Context, optional) – ZeroMQ context that should be used. Defaults to None and the global context is used.
- protocol (str, optional) – Protocol that should be used for the sockets. Defaults to None and is set to _default_protocol.
- host (str, optional) – Host for socket address. Defaults to ‘localhost’.
- retry_timeout (float, optional) – Time (in seconds) that should be waited before retrying to bind the sockets to the addresses. If negative, a retry will not be attempted and an error will be raised. Defaults to -1.
- nretry (int, optional) – Number of times to try binding the sockets to the addresses. Defaults to 1.
- **kwargs – Additional keyword arguments are passed to the parent class.
-
context
¶ ZeroMQ context that will be used.
Type: zmq.Context
-
srv_socket
¶ Socket facing client(s).
Type: zmq.Socket
-
cli_socket
¶ Socket facing server(s).
Type: zmq.Socket
-
cis_interface.communication.ZMQComm.
bind_socket
(socket, address, retry_timeout=-1, nretry=1)[source]¶ Bind a socket to an address, getting a random port as necessary.
Parameters: - socket (zmq.Socket) – Socket that should be bound.
- address (str) – Address that socket should be bound to.
- retry_timeout (float, optional) – Time (in seconds) that should be waited before retrying to bind the socket to the address. If negative, a retry will not be attempted and an error will be raised. Defaults to -1.
- nretry (int, optional) – Number of times to try binding the socket to the addresses. Defaults to 1.
Returns: - Address that socket was bound to, including random port if one
was used.
Return type:
-
cis_interface.communication.ZMQComm.
check_czmq
()[source]¶ Determine if the necessary C/C++ libraries are installed for ZeroMQ.
Returns: True if the libraries are installed, False otherwise. Return type: bool
-
cis_interface.communication.ZMQComm.
format_address
(protocol, host, port=None)[source]¶ Format an address based on its parts.
Parameters: Returns: Complete address.
Return type: Raises: ValueError
– If the protocol is not recognized.
-
cis_interface.communication.ZMQComm.
get_ipc_host
()[source]¶ Get an IPC host using uuid.
Returns: File path for IPC transport created using uuid. Return type: str
-
cis_interface.communication.ZMQComm.
get_socket_type_mate
(t_in)[source]¶ Find the counterpart socket type.
Parameters: t_in (str) – Socket type. Returns: Counterpart socket type. Return type: str Raises: ValueError
– If t_in is not a recognized socket type.
-
cis_interface.communication.ZMQComm.
parse_address
(address)[source]¶ Split an address into its parts.
Parameters: address (str) – Address to be split.
Returns: Parameters extracted from the address.
Return type: Raises: ValueError
– If the address dosn’t contain ‘://’.ValueError
– If the protocol is not supported.
Module contents¶
-
cis_interface.communication.
new_comm
(name, comm=None, **kwargs)[source]¶ Return a new communicator, creating necessary components for communication (queues, sockets, channels, etc.).
Parameters: Returns: Communicator of given class.
Return type: Comm
-
cis_interface.communication.
get_comm
(name, **kwargs)[source]¶ Return communicator for existing comm components.
Parameters: - name (str) – Communicator name.
- **kwargs – Additional keyword arguments are passed to new_comm.
Returns: Communicator of given class.
Return type: Comm
-
cis_interface.communication.
get_comm_class
(comm=None)[source]¶ Return a communication class given it’s name.
Parameters: comm (str, optional) – Name of communicator class. Defaults to tools.get_default_comm() if not provided. Returns: Communicator class. Return type: class


Starting with version 0.10 you can use bottle as a command-line tool:
$ python -m bottle
Usage: bottle.py [options] package.module:app
Options:
-h, --help show this help message and exit
--version show version number.
-b ADDRESS, --bind=ADDRESS
bind socket to ADDRESS.
-s SERVER, --server=SERVER
use SERVER as backend.
-p PLUGIN, --plugin=PLUGIN
install additional plugin/s.
--debug start server in debug mode.
--reload auto-reload on file changes.
The ADDRESS field takes an IP address or an IP:PORT pair and defaults to localhost:8080. The other parameters should be self-explanatory.
Both plugins and applications are specified via import expressions.  See load() for details. Here are some examples:
# Grab the 'app' object from the 'myapp.controller' module and
# start a paste server on port 80 on all interfaces.
python -m bottle -server paste -bind <IP_ADDRESS>:80 myapp.controller:app
# Start a self-reloading development server and serve the global
# default application. The routes are defined in 'test.py'
python -m bottle --debug --reload test
# Install a custom debug plugin with some parameters
python -m bottle --debug --reload --plugin 'utils:DebugPlugin(exc=True)'' test
# Serve an application that is created with 'myapp.controller.make_app()'
# on demand.
python -m bottle 'myapp.controller:make_app()''


public class Controller
extends java.lang.Object
implements javafx.fxml.Initializable
| Modifier and Type | Field and Description |
|---|---|
private Base |
model
Base model's field
|
private Router |
router
Router for model's data passing and view's changing.
|
private javafx.scene.Scene |
scene
FX scene field
|
| Constructor and Description |
|---|
Controller() |
| Modifier and Type | Method and Description |
|---|---|
Base |
getModel()
Basic getter for base model
|
javafx.scene.Scene |
getScene()
Scene getter
|
void |
initialize(java.net.URL location,
java.util.ResourceBundle resources)
Run after fxml file initialization
|
void |
moveToCategoryList()
Move to categoryListView from FX
|
void |
moveToCategoryList(javafx.event.ActionEvent event)
Move to categoryListView from FX
|
void |
moveToEditCategory(Category category)
Move to EditCategoryVIew and turn on EditCategory controller
|
void |
moveToShowCard(CardList cardList)
Move to ShowCardView and turn on ShowCard controller
|
void |
setModel(Base newModel)
Setter for model
|
void |
setRouter(Router newRouter)
Router setter
|
Controller |
setScene(javafx.scene.Scene newScene)
Check if scene exists, if not -> assign newScene to field.
|
void |
setTitle(java.lang.String name)
Blank method to override
|
private javafx.scene.Scene scene
private Router router
private Base model
public void moveToShowCard(CardList cardList)
cardList
- model passed from higher Controllerpublic void moveToEditCategory(Category category)
category
- model passed from higher Controllerpublic Base getModel()
public void setModel(Base newModel)
newModel
- to set.public void moveToCategoryList(javafx.event.ActionEvent event)
event
- passed with user's clickpublic void moveToCategoryList()
public javafx.scene.Scene getScene()
public Controller setScene(javafx.scene.Scene newScene)
newScene
- to assignpublic void setRouter(Router newRouter)
newRouter
- to set.public void initialize(java.net.URL location, java.util.ResourceBundle resources)
initialize
in interface javafx.fxml.Initializable
location
- include path to fxml fileresources
- include Resources objectspublic void setTitle(java.lang.String name)
name
- to set.


Kamala Harris Slams Donald Trump in New Viral Video Ahead of 2020 Democratic Presidential Debate
US Senator and Democratic presidential candidate Kamala Harris as part of her campaign for 2020 tweeted a video clip on Wednesday comparing herself to President Donald Trump.
Harris, one of several Democratic candidates for the 2020 US presidential race, pointed out some comparisons between herself and Trump, as the latter faces impeachment by Democrats in the House of Representatives.
Harris claims that she prosecuted “sex predators” while pointing out that Trump is a member of that club. She also claims that Trump has run for-profit sham educational institutions, and noted that has made efforts to shut down such institutions.
Another point of comparison promoted on the video was that, while Trump is “owned by big banks” she has “held banks accountable”.
“I'm not just prepared to take on Trump, I'm prepared to beat him,” tweeted the Democratic presidential hopeful.
Twitterians were quick to react to the former California attorney general's ad, with some praising her for “bringing the fire” and “breaking” the Internet.
Others thought that Harris was being too judgmental.