Here's my opinion on how you should package most Python libraries:
you shouldn't
Package applications. Package things that are useful. Libraries aren't useful. Things made with libraries are useful. Package those.
Don't put anything in site-packages. Simply because you shouldn't have to, there's no reason to, you aren't making the system run any better or be any more useful.
There are probably some exceptions to this. Such as libraries that interact with other C libraries on the system, like a database driver. And... well, that's about it.
For development of applications something like virtual-python or working-env combined with easy_install and python setup.py develop gives you the features you will want, in a way that is much more comfortable and flexible for the developer.
Those isolated development environments are reminiscent of the kind of thing you should be packaging up as an application. Sadly, there are no tools yet built to make packaging these bundles easy (that I know of -- though probably things like p2exe come close in spirit). Yup, those tools should be built. For all I know they are easy; I would speculate, for instance, that some of p2exe's harder work comes from extracting such an isolated environment from the big dump of packages that is site-packages. If you get something working (or even try and fail), please be sure to tell distutils-sig, as we'll be interested.
Update: it occurs to me that when I say "package" here I am being vague. Don't package Python libraries as RPMs or Debs or any of those things. Do use Python "packages" aka namespaces.
I ran into an instance just this morning where I was trying to install a prototype of an app on someone's laptop, using a virtual-python setup, and I ran into problems due to packages being in the system-wide site-packages that were in the way of what I wanted to install in the virtual-python environment.
I ended up removing the symlinks from the virtual-python's site-packages dir, but perhaps a good wiki page somewhere would be a collection of big long one-liners that remove Python library packages from various operating systems. For instance, I would use a big long apt-get remove ... line on Debian systems :)
In working-env.py by default I leave out site-packages entirely (though there is an option to include it). Then you don't have to remove anything, since nothing at all gets copied over ;)
# Ian Bicking
Luckily I don't think that debian is going to listen to you about this :-) but if they did, I think it's a disaster waiting to happen.
Basically, what you're saying is that any time you want to integrate 2 python libraries on a given system, you should have to create two entirely new "virtual installations". If everyone writes libraries this way, why bother with namespaces? I know that in my "virtual installations", "n.py" is the networking module. It's a lot less work to type "import n" than to create an __init__.py, a package directory, and do 'from my_networking import n'.
Now, working-env.py looks valuable. In fact, it looks identical (from what I can see) to Divmod's Combinator, something I wrote myself to handle similar deployment issues. However, real installations and real packaging are going to beat this kind of ad-hoc code slinging any day. The fact that they're still more work is unfortunate, but in the end it's worth it to have all your code in one place so it's easily loadable from one interpreter.
It sounds like when you boil it down, this is the argument between static and dynamic linking. Dynamic linking may be less important due to disk-space concerns today, but it is still clearly the superior option for security reasons. If ten of your "working environments" have the same library installed and it has a security flaw, it is going to be a lot more work to make sure they're all properly updated (by hand, by copying files) rather than having your distro install a new (but tested to be compatible by distro QA) version of the library.
Basically, what you're saying is that any time you want to integrate 2 python libraries on a given system, you should have to create two entirely new "virtual installations". If everyone writes libraries this way, why bother with namespaces? I know that in my "virtual installations", "n.py" is the networking module. It's a lot less work to type "import n" than to create an __init__.py, a package directory, and do 'from my_networking import n'.I don't know what you mean by "integrate 2 python libraries". Libraries don't integrate. They are integrated. What is integrating them? A developer, or an application. If it's a developer, they should be doing it in a development sandbox. If it is an application, then it is a package.
Underlying the system-level packages are python-level packages. I'm not arguing against Python packages (though my original post didn't make the distinction as it should have). In this model a system-level package (e.g., an rpm) contains a set of python-level packages. There is some kind of point of entry into this set of packages; typically it will be a script that changes sys.path. In other environments where there isn't an executable point of entry, I'm not sure how the activation happens. For plugins it is a little fuzzy too, but plugin systems are already fuzzy in these packaging systems.
However, real installations and real packaging are going to beat this kind of ad-hoc code slinging any day. The fact that they're still more work is unfortunate, but in the end it's worth it to have all your code in one place so it's easily loadable from one interpreter.How? Why is it easier? It's a heck of a lot more implicit. It's a heck of a lot harder to debug. It's harder to control dependencies. It's harder to develop, harder to branch. We have a modest number of tools that work well with the current system; more tools than we currently have to work with a new isolated system. /usr/bin/python is just one tool, it's not something magical. These tools are the only advantage I see to the status quo. But it's not an impressive number of tools on either side.
"Real" packaging leaves many problems unsolved. It doesn't solve the problem of different applications requiring different versions of code. The packaging systems will whine and complain and get in your way if you have conflicting requirements, but they won't help you in any way. "Real" packaging systems force you to upgrade even when you don't want to, they force you to create a globally consistent environment. This is everything that pisses deployers off. This is the style of development that makes it hard for Debian to make releases. "Real" packages are an enabler for coupled software, and promote cultures that are getting in the way of building properly decoupled software.
It sounds like when you boil it down, this is the argument between static and dynamic linking. Dynamic linking may be less important due to disk-space concerns today, but it is still clearly the superior option for security reasons. If ten of your "working environments" have the same library installed and it has a security flaw, it is going to be a lot more work to make sure they're all properly updated (by hand, by copying files) rather than having your distro install a new (but tested to be compatible by distro QA) version of the library.To me that sounds like bad tool support being a justification for complex architecture.
Honestly, why is it so much worse if 10 packages have to be upgraded in response to a security flaw instead of 1? Because we can't keep track of what libraries are embedded in what packages? That doesn't seem hard to resolve. Because computers are incapable of doing repetitive tasks? Because the network bandwidth is so valuable? It doesn't make sense to me.
I'm not arguing that everything should be entirely ad hoc, though for my own uses system-level packages are not useful. I'm arguing that developer use libraries, but deployers never do.   It's a back-and-forth where neither is happy. So I'm saying developers shouldn't bother using system packages for libraries at all. Setuptools and sandbox environments are already a much better experience for them. And deployers don't care about libraries, so don't we shouldn't waste our time trying to expose that level of ganularity to them.
# Ian Bicking
Okay, I can see where you're coming from. The deployment system within my company uses a "virtual environment" or "sandbox" model, and it does have its advantages. However, it also creates its own complexity and coordination problems, which I think are easy to underestimate if you haven't used such a system on a large scale. If I'm a library developer in this system, it can be quite hard to get updates to my library deployed to all the relevant application environments, even with the help of an extensive system for tracking deployments and dependencies.
Ubuntu uses the same packaging system (and almost all of the same packages) as Debian, and they have no problem releasing on schedule. Debian does have a problem (note: I am a Debian developer), but it's not a technical problem and does not have a technical solution.
First of all, let me be clear that there is a point of agreement here. I think there is a happy medium between what you're saying and the status quo. Right now, per-user installation is screwed, and there is no generally accepted facility for virtual installations. site.py only reads user-installed directories on OS X, for some reason.  There are many times wheren virtualized installations are really handy, and certainly per-user installation is important (at the very least, if your installer does not have system-administrator privileges) and it is one of python's strengths that this kind of configuration is relatively easy to do from the interpreter itself, from any application. The fact that there are no standard or accepted conventions for doing this, especially in Python where it is only a matter of convention, all the technical problems are solved, is unfortunate.
I'm arguing that developer use libraries, but deployers never do.If that's the core argument, then I'll argue against just that and I won't bother with defending the other things I was saying :). Debian developers (who I think are generally considered authoritative on the topic of deployment, at least) have already responded here saying why deployers care about libraries. However, another good indication of the fact that deployers deal with libraries directly is the phenomenon of library configuration; for example, /etc/fonts/fonts.conf - someone deploying a GNOME desktop will edit that file, and it doesn't configure the X server "application" - it is a common configuration file read by every application that uses fontconfig, generally invoked by the Xft library. There's also a pile of library-related configuration in /etc/gnome* and /etc/gconf. If fontconfig were installed for every application, first of all, there would be a lot of copies of fontconfig:
% apt-cache rdepends libfontconfig1 | wc -l
1091
and second of all, it would be a package management nightmare making sure that all 1091 applications on this system with their own copy of fontconfig were able to read the same configuration format.
(By the way: fontconfig is about 1M all told, so although disk space isn't as big a deal as it used to be, all those packages would have 1G of just copies of fontconfig. Once you add in the inevitable X and Gnome dependencies in each package too, that number would explode into impracticality really fast.)
Speaking in terms of the strength of tools, good libraries are tools in their own right, not just for developers. Deployers can use to configure and customize large groups of applications at a time. In the best case, a library can allow you to tweak its behavior independently of an application, to affect an application's behavior (or many applications' behavior) without the applications having explicitly coded any support for it.
However, another good indication of the fact that deployers deal with libraries directly is the phenomenon of library configuration; for example, /etc/fonts/fonts.conf - someone deploying a GNOME desktop will edit that file, and it doesn't configure the X server "application" - it is a common configuration file read by every application that uses fontconfig, generally invoked by the Xft library.That's an example of a situation where discovery and registration of resources is necessary. That is definitely a problem with bundled software, though it is not trivial in a centralized system either. /etc/fonts/fonts.conf has policy associated with it, and various scripts that do things to that file -- all of which must work properly for the entire system to work properly -- and all as an augmentation of the (fairly slow) index of package metadata that exists elsewhere.
It's harder with software bundles, but I don't think that isolated installs need to be entirely isolated from the system either. I think it's better to start from the default of fully insulated and add conventions from there. It's not easy regardless of what you are doing.
(By the way: fontconfig is about 1M all told, so although disk space isn't as big a deal as it used to be, all those packages would have 1G of just copies of fontconfig. Once you add in the inevitable X and Gnome dependencies in each package too, that number would explode into impracticality really fast.)Perhaps caching of shared content needs to be a central concept of this. Something I've meant to add to working-env.py, for instance, is a way of linking in libraries from elsewhere -- probably using Setuptools .egg-link files (which are largely equivalent to platform independent symlinks). In that case it would an opt-in sharing -- which is better than implicit sharing without any opt-out option at all (except for careful manipulation and stacking of the entries on sys.path). But a more implicit sharing of resources that are identical would be possible.
I don't think fontconfig is actually an example of a resource at all, but the problem certainly exists. I'm also not sure how far down to push this isolation. Right now most Python applications depend on a set of libraries that mostly should be bundled. Should everything be bundled everywhere? Thinking about what that would mean would be an interesting thought experiment ;) I'm not even sure what it would look like.
Deployers can use to configure and customize large groups of applications at a time. In the best case, a library can allow you to tweak its behavior independently of an application, to affect an application's behavior (or many applications' behavior) without the applications having explicitly coded any support for it.Applications should delegate to their component libraries when possible and reasonable, and let information pass down. This usually has nothing to do with the packaging used. Applications would still use libraries, and those libraries can still look at their environment; nothing changes with respect to that.
# Ian Bicking
Applications should delegate to their component libraries when possible and reasonable, and let information pass down. This usually has nothing to do with the packaging used.In fact it does. Default configuration is very much part of the library package, at least on debian.
Applications would still use libraries, and those libraries can still look at their environment; nothing changes with respect to that.The thing that changes with respect to that is that, within a compatible version of a library, the format of the system configuration for the library may change, or features may be added, without necessarily alerting applications to that fact. Or, an entirely new version might be released, which provides a compatibility later.
Now, there are ways to design around this, future-proofing your format etc, but demonstrably library authors do not always do this. Configuration formats do change, and will continue to change whether application authors start bundling everything under the sun with their application or not.
Right now the user experience of this is, you upgrade the library, and Debian prompts you if you want to upgrade your system config file. You (and your users) have to infer that you also must upgrade files under ~/. as well, but at least one upgrade to that file and you're done with it. If every application packages every library, all of a sudden you've got 1091 copies of fonts.conf, under /etc/gaim/fonts/fonts.conf, /etc/gimp/fonts/fonts.conf, and you have to track the version of fontconfig used by every single one of those apps manually. Even if you make no modifications, the package maintainers for each of those applications suddenly has to become a fontconfig expert, whereas before they didn't even have to know this file existed.
If you include .egg-link files with your application that "link" to other libraries, how is that different from an import statement "linking" to another library? It's just adding additional work to your import lines. What if I want to write a plugin for application X which imports a library from application Y? What is my "application"? How do I install under package X in such a way that I can then "link" to package Y? Perhaps each project should also come with an XML config file which describes all its dependencies? The pygtk project had thoughts along these lines before, and their solution has mainly made people unhappy: http://www.tortall.net/mu/blog/2006/01/18/pyxyz_require_sense
I've been talking a lot about random C libraries as if they might be in Python (and I hope in the future more will) but let me speak directly and practically about Python as it is now. The status quo may not be perfect, but it effortlessly allows me to write python plugins for nautilus or gaim which import twisted, gtk, vte, sqlite, ogg, BitTorrent, or any other library on my system. It seems you want to break that by unbundling every library (I have over 100 python libraries installed through Ubuntu's packaging system, and a half-dozen installed in my user environment) from my system, and putting it into the applications which use it, and making me re-install or re-declare the use of those libraries in my "working environment" for the plugin, all apparently to prevent some hypothetical breakage. (Is the plugin an "application"? How does its environment differ from that of the (usually non-Python) application it's hosted in?)
To get to the bottom of this, though: what's the real problem you're trying to solve here? Is it just making side-by-side installation so that applications don't break when subtly different versions of libraries are installed?
Suppose a security bug is found in a popular library.
If I'm using a Debian-based system like Ubuntu, a notification will appear on my screen. I click the "install update" button. The system downloads installs a new version of the library package. I'm done.
On the other hand, suppose I'm on a system without proper packages, where each application installs the library into its own copy of the environment. Then I need to hunt through every application on my system, see if it uses the library, and install the security fix for each application that does. Or, every application author needs to update their application packages to include the security fix, and I need to install all of the updated packages.
This is just one of the reasons that libraries benefit from proper packaging even more than applications do.
Suppose a security bug is found in a popular library.Then the security bug exists in every application using that library, and they should all be updated, and new versions of the system-level application packages will emerge for you to install. Problem solved.
# Ian Bicking
This is pretty fast problem solving. But it doesn't match reality.
Look for example at xpdf; its code is duplicated in gpdf, kpdf, some command-line utilities, poppler, I am probably missing some. Waiting for all of them to update to the newer xpdf code is unrealistic. It has been shown as not working and causing delays.
You write they should all be updated. While only one single package could. I prefer that second option.
This is something that should be handled with proper tool support.
Look for example at xpdf; its code is duplicated in gpdf, kpdf, some command-line utilities, poppler, I am probably missing some. Waiting for all of them to update to the newer xpdf code is unrealistic.Why is it unrealistic? Because updating the code causes problems in those packages? Updating the code via dynamic linking doesn't improve that any. Because the maintainer isn't sufficiently available to make the update in time, or in a coordinated fashion? Debian does non-maintainer updates to solve this sort of problem; that kind of update just needs to be done more widely.
# Ian Bicking
It is not easy because gpdf, kpdf, etc. don't have much knowledge about the xpdf code they ship; so it takes time.
And the developers who will bundle many Python packages to get an "application package" won't know details about all those Python packages, same problem.
Even worse it gets much harder for an entity that cares (say Debian) to apply the fixes; 1) they must be applied in many different places and 2) those different places have different versions.
As for the tools to handle all of this, they do not exist for the moment.
IIRC you had slides opposing developers and packagers ("deployers", maintainers, sysadmins, whatever the name), iirc. All of this, For development of applications, much more comfortable and flexible for the developer, isolated development environments concerns developers. Please don't forget the other side.
I sort of agree.
There are fewer libraries in Python that can even have true security flaws. Those libraries are usually used in such a fashion that they _can_ be installed system-wide. In fact they should be included with the Python distribution.
All those helper libraries should be bundled separately with the application (as is usually done on Windows) and makes deployment easier.
But what about GUI development? For development, the sandbox approach doesn't work. I find wxWidgets is a pain sometimes because I need to tweak a widget to work well with my applications, since they often don't make subclassing easy. As a developer, sandboxing doesn't make sense because I want to be able to add this tweak to all my applications. But I do want to take advantage of new features, so something like working-env makes sense for all my legacy apps. Maybe that's a problem with the library though.
But what about web development? For hosting, the sandbox approach doesn't work so well for deployers (bundling CherryPy.) In this case it's nice to have a real server that can stay stable underneath.
However, I do agree that the majority of libraries don't belong in site-packages at all. Library dependencies should be resolved by the developer, not the deployer.
But what about GUI development? For development, the sandbox approach doesn't work. I find wxWidgets is a pain sometimes because I need to tweak a widget to work well with my applications, since they often don't make subclassing easy. As a developer, sandboxing doesn't make sense because I want to be able to add this tweak to all my applications.You mean you edit the wx code directly? In that case you should probably make a mini fork. Monkeypatching is probably a more realistic option, though. It's a messy situation any way you do it -- I think it's cleaner with monkeypatching though. Monkeypatching someone else's (or everyone else's) application is a little more difficult with isolated installations. So I don't know.
But what about web development? For hosting, the sandbox approach doesn't work so well for deployers (bundling CherryPy.) In this case it's nice to have a real server that can stay stable underneath.I think the opposite is true. The hoster really doesn't care about CherryPy, and generally doesn't want to maintain or update that for you. On both sides of that relationship people just want things to work and not to have to coordinate and communicate. Bundling CherryPy or whatever your web framework is is probably going to work better for everyone.
# Ian Bicking
Don't often disagree with you, but I do this time.
For some of us, python is the application. e.g. we want to analyse scientific data using python. We load libraries, we load (python) tools (aka applications) that use the libraries, but we mix them together to solve problems in python. We build wrappers to our legacy applications and we build libraries out of those, and we glue them together with python ...
... and tomorrows problem is different from todays, so the way we arrange things is different. I want a different bundle of libraries, and I want to different things with them ... I never release an application. Python is the application. Please don't argue that the application is the only endgame. We need to make it easy for people to package the libraries as well.
(p.s. my capta question is "of apples and oranges, which is more red" ... hmm is it a red delicious or a granny smith?)
So you'd recommend packaging the same libraries multiple times in separate applications?
In the past I've had to manage a Linux distro, and had to worry about supporting upgrades. The only mechanism that I had to work with was rpm. How would you suggest managing that with a minimum of effort, with no human interaction?
Given some 3am shenanigans with various setuptools autoinstallation tricks in conjunction with a fairly well-known Python package, I'd like to advise your readers to make full use of their distribution's packages and packaging system: no "automagical, I'm off to get stuff for you - bet you didn't expect that!" fun with setup scripts, just plain-and-simple use of the tools already available, documented and promoted things which everything else on your system already uses.
If setuptools played better with established solutions instead of wanting to install various things in /usr/bin without asking first, perhaps I'd take it a lot more seriously. Perhaps this isn't how setuptools is supposed to be used - in which case we have a prime example of how exciting new stuff, contrary to popular denial, really does have an impact on others via a combination of technical and social factors.


Personal loans
You can use our personal loans to get the car you want, consolidate your debts or for something else, like a new motorbike, boat or renovation.
Apply now
Reasons to bank with us
Complete your paperwork online
Funds are availble the same day
Flexible repayment terms
Borrow a little. Live a lot.
Afford your special something for as little as $49 per month.


{% include head-animation.html %}
{% include browser-upgrade.html %} {% include navigation.html %}
{{ content }}
{% include scripts.html %}


| DOSE: |
2 hits |
smoked |
Cannabis |
(plant material) |
I went to my friend's sister's new apartment one weekend in march. It had been a crazy weekend of getting drunk and partying. My friend's sister is in college so I knew we would either be drinking or smoking.
We walk into her apartment to find only one of her roommates. I grab a beer out of the fridge and sit down. Her sister quickly asks me if I want to smoke. I say sure, but refuse the use of a huge bong, because it looked too overwhelming. She comes back into the room with a mushroom shaped bowl that was from Woodstock 99. She packs it up for me and shows me a tiny carb. All the while everyone else is drinking beers.
We turn on South Park The Movie for laughs, and I begin to smoke. For some odd reason I took in this weed different from any other time. It was as if the smoke was the air and all I was doing was taking a huge relaxing breath. I exhale my first hit after holding it in for a decent 30 seconds. I blow it out of my nose and instantly my eyes swell and start to shut. I think nothing of it and take another hit. By this time I'm insanely high.
 Somehow I thought it was shitty weed and I wouldn't feel a thing.
Soon I get distracted and begin to talk to my friend's sister. I come up with this crazy idea that she has an accent and that she sounds exactly like my cousins. As I'm talking with her, she points out that I look 'really stoned.'  Then it hits me! fuck! I'm soo high!!!  I cause an uproar, and begin to insist the weed is laced (either it was laced, or it was just damn good). My friend's sister is saying it's not, but I continue to believe it is. If I think back, my friend and her sister were probably trying to calm me down, but I felt like they were annoyed with me the entire time, so it made things way worse.

My friend and her sister take me into a roommate's bedroom that has red lights done all around the ceiling. This was a damn good idea, it was a calming place to take me and it helped, but slowly. I tell these whack-ass stories about people that make no sense, but everyone is acting interested. I'm cool with that. On occasion the nausea comes back, so I have to kick my legs to try and forget about it.
My friend and her sister leave the room and let me calm down. I close my eyes and think about suicide and the world in general being chunked together in a pyramid. My mind is racing and I'm thinking mostly about death. I open my eyes to stop it. I shut them again and see palm trees everywhere. Palm trees?? Don't ask, I have no clue. Finally I say to myself, you have to stop, get up, drive and get home.
I walk into the kitchen where water and rice is waiting for me. Still shaken up, I drink, but barely touch the rice.  My friend and I get in my car. She is concerned, I had never driven high before. I get in, start my car and drive. I had never felt such a great feeling, the wheel spinning as I made a turn, my Paul Oakenfold and Sascha bumping perfectly. This experience was terrible, yet thrilling and calming at the same time. I was just really high, and after the scary peak, I came down slow, but such a dope slow. It was nuts.
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.


{% extends 'pages/base.html' %} {% block subtitle %} Teach {% endblock subtitle %} {% block header_js %} {{ super() }} {% endblock %} {% block navbar_breadcrumb %}
You might know a student who's struggling with a topic at school. They really want to learn it, but they've gotten a bit stuck, and it's hard for them to get the personalized support they need. And it's not just this student: other students, all over the world, are likely to have trouble with the same topics, again and again.
To address this, we're excited to announce the Teach with Oppia program, which enables anyone to contribute to a collection of free, accessible lessons on topics that learners find challenging. These lessons, called explorations, use Oppia's unique technology to recreate 1-on-1 tutoring, combining engaging instruction, clear explanations, and ample exercises that allow students to gain proficiency with the subject. Students can then do these lessons at their own pace, supported by useful, targeted feedback.
Ultimately, Oppia's goal is to cover as many subjects as possible. However, our short-term goal is to create a set of effective, enjoyable explorations for basic mathematics (up to pre-algebra) that students can use on their own, and that provably help them learn.
To achieve this, the Teach with Oppia program is currently accepting applications from individuals who can demonstrate a passion and aptitude for helping students learn basic mathematics. Participants will receive personalized feedback on the lessons they create, as well as assistance with playtesting and promoting their lessons. They'll also be able to connect with other like-minded creators, as well as the Oppia development team, to ensure that their creations are as well-realized as possible.
Though the program runs year-round, we can only accommodate a limited number of participants at any given time. We accept submissions on a rolling basis, so please fill out this form if you'd like to take part.
Interested individuals who wish to contribute explorations not focused on basic mathematics may also still apply. However, because Oppia is entirely volunteer-driven, we simply do not have the time to support every educator interested in the program. Therefore, in order to receive the same level of support from the Oppia team, these individuals will need to create, promote, and refine at least one exploration on their own first. This demonstrates that the individual could be a valuable long-term contributor to the project and is committed to Oppia's mission of helping anyone learn anything they want in an effective and enjoyable way.
Everyone is welcome to play and give feedback on published explorations. With everyone's help, we can continuously improve the lessons on the site and make them as effective as possible.
Use good judgement when publishing explorations. Explorations should have significant educational value and cannot contain advertising, spam, vandalism and/or abuse.
Be a good citizen. Creating multiple accounts, abusing the feedback systems, using explorations to trick users, or other similar antisocial behavior will not be tolerated and may result in account suspension.
If you need any clarification on these guidelines, please feel free to ask on our forum.
When an exploration is published, it is credited to you, and becomes available for anyone to learn from. In order to create a good learning experience for students, here's a few tips we've found useful:
For additional help on crafting useful feedback and good explorations, check out our Design Tips page.
Any owner of a private exploration can publish it at any time. However, low-quality explorations may be unpublished by the moderators, with feedback on how to improve them.
Explorations are meant to be continuously improved, and explorations that haven't been edited for a long time may be considered "orphaned". In this case, ownership may be handed to the Oppia community at large (at moderator discretion), so that the exploration can continue to be improved.


Minesweeper clone, named after the film "The Hurt Locker" (https://en.wikipedia.org/wiki/The_Hurt_Locker)
(The name and the images are just for fun, because they deal with mines/bombs in that film. So this is a parody. All copyright belongs to their creators.)
GitHub is found here.
Unlike the original Minesweeper, which had "Board Cycles, this version is actually random. Even I don't know beforehand where the mines would be!


How many sets of numbers?
How many numbers in each set?
Ranging from?
… up to and including?
Need them to be unique?
Want them sorted?
Background: "Random" by
Lars Plougmann
/ CC BY-SA 2.0
Fork on


Preparation time
less than 30 mins
Cooking time
less than 10 mins
Serves
Serves 1
Dietary
For the fondue, pour the cider into a pan and cook over a high heat until reduced by a third. Stir in the Stilton, whisking until completely melted.
In a small bowl, mix the cornflour with the cold water into a paste and stir into the cider and Stilton mixture. Stir in the fresh chives just before serving.
For the croûtes, drizzle the bread chunks with the oil and fry in a pan for 4-5 minutes, or until golden-brown and crisp.
To serve, transfer the fondue to a large serving bowl set on a large plate, arranging the croûtes around the edges of the plate.


--- layout: page title: Newsletter ---
People have asked for a way to follow me, so in 2014 I started a simple e-mail newsletter. It has been fun. We're a small community of freelancers, consultants and small business owners with one common goal: we all want to grow our business in a smart way.


Toggle navigation
Safe Travels
Plan Your Travel
Discussion Forum
Tip of the Day
Plan a Safe Travel
Worried about getting infected during your travel?
SafeTravels application suggests the most safe travel route to your destination.
Plan Your Travel
Route Information
Climate Information
Threat Analysis
Safest Route
Common Viruses
Driving
Walking
Bicycling
Miles
Kilometres
Go
Distance:
Travel Time:


Python API documentation¶
-
class
bdc_api.
BdcApi
(username, api_key, hostname)¶ Class responsible for handling all API calls.
-
class
QueryInfo
(progress, status)¶ -
__getnewargs__
()¶ Return self as a plain tuple. Used by copy and pickle.
-
static
__new__
(_cls, progress, status)¶ Create new instance of QueryInfo(progress, status)
-
__repr__
()¶ Return a nicely formatted representation string
-
progress
¶ Alias for field number 0
-
status
¶ Alias for field number 1
-
-
__init__
(username, api_key, hostname)¶ Initialize username, API key, and session information.
Parameters:
- username
valid API username.
- api_key
valid API key generated from the wesbite under REST API Key Manager.
- hostname
Hostname to be used throughout the session (e.g: https://minos.lbl.gov)
Returns:
New BdcApi object.
Raises:
None.
-
__weakref__
¶ list of weak references to the object (if defined)
-
check_query_progress
(query_id)¶ Check the progress query.
Parameters:
- query_id
Query ID from one of the start_datacollection_query or start_files_query functions.
Returns:
Named tuple object QueryInfo where the progress field contains the percentage progress of the query and the status field includes the job status.
Raises:
- BdcApiException on problematic requests (e.g. malformed inputs or
issues reaching the API endpoint).
-
get_datacollections
(task_numbers=[], domains=[], time_limits=[], limit=0)¶ Get all available datacollections, optionally filtered.
Parameters (all optional):
- task_numbers
A list of task number names.
- domains
A list of domain names.
- time_limits
A list of 2 timestamps.
- limit
Maximum number of datacollections to return.
Returns:
List of datacollection names.
Raises:
- BdcApiException on problematic requests (e.g. malformed inputs or
issues reaching the API endpoint) or when no datacollections are found.
-
get_domains
(task_ID='')¶ - Get the domains associated with all tasks (associated with the user),
or just those associated with a specified task.
Parameters:
- task_ID
Optional task ObjectID.
Returns:
Dictionary of task names, whose values are their associated domain names.
Raises:
- BdcApiException on problematic requests (e.g. malformed inputs or
issues reaching the API endpoint).
-
get_files
(datacollections=[], extensions='', limit=0)¶ Get file names from all or selected datacollections.
Parameters (optional):
- datacollections
list of datacollection names whose filenames are desired.
- limit
limit on data collections returned (defaults to 0, meaning no limit).
- extensions
comma-separated string of desired extensions (e.g: ‘json,txt’)
Returns:
Dictionary of the form
{ "datacollection_1": ["filename1", "filename2"], "datacollection_2": ["filename3", "filename4"] }
Raises:
- BdcApiException on problematic requests (e.g. malformed inputs or
issues reaching the API endpoint).
-
get_task_numbers
()¶ Get the task numbers associated with the logged-in user’s organizations.
Parameters:
None.
Returns:
Dictionary with keys in the format `{task name}/{task number}’ and value being a dict including POCs and the ID of the task. For e.g:
{"Electromagnetic / 2.1": {"POCS": [{"username": "admin", "laboratory": "LBNL", "fullname": " "}], "ID": "5d9e26ada81660b57e387f49"} }
Raises:
- BdcApiException on problematic requests (e.g. malformed inputs or
issues reaching the API endpoint).
-
save_file
(query_id, jupyterhub=False, local_path='')¶ This function will save the result of a query to the given directory on local disk, or, if the jupyterhub flag is set to True, to the user’s JupyterHub home directory. The latter requires that the JupyterHub home directory has been created and is accessible to the Apache user that runs the service.
The response will contain either a success or error message returned by the service.
Parameters:
- query_id
Query ID from one of the start_datacollection_query or start_files_query functions.
- jupyterhub
Whether or not the API is being run from JupyterHub (default False).
- local_path
A path to a directory on local disk, which will only be considered if the API is not being run from JupyterHub.
Returns:
Upon success if the jupyterhub flag is True, will return a dict with the success message:
{"message": "Successfully moved query results to home directory. Filename is: download_5d9407266362395834cdbfbe.zip"}
Upon success if the jupyterhub flag is False, will return a dict with the success message:
{"message": "Successfully downloaded query results to /path/on/disk. Filename is: download_5d9407266362395834cdbfbe.zip"}
Upon failure, will raise BdcApiException.
Raises:
BdcApiException on problematic requests (e.g. malformed inputs or issues reaching the API endpoint).
-
start_datacollection_query
(datacollection)¶ Initiate a query to download all files associated with a datacollection.
Parameters:
- datacollection
name of datacollection to get data for.
Returns:
Query ID with which to check query progress or request the download.
Raises:
- BdcApiException on problematic requests (e.g. malformed inputs or
issues reaching the API endpoint).
-
start_files_query
(files)¶ Initiate a query to download specified files.
Parameters:
- files
List of desired file names as selected from get_files.
Returns:
Query ID with which to check query progress or request the download.
Raises:
- BdcApiException on problematic requests (e.g. malformed inputs or
issues reaching the API endpoint).
-
class


--- layout: post title: First thoughts on final project ---
I'm pretty excited about a few ideas, including making digital music, and possibly making a game with Scratch.
Let's assume that I'm going to do digital music.
I would definitely need to learn how to use the tools inside the program that I choose. I will also need to do some research about good programs to use.
My first step will definitely be to find a program that I can use, and after that figuring out how to use it.


TestFlightSDK 2.0 Reference
Introduction
The TestFlight SDK allows you to track how beta testers are testing your application. Out of the box we track simple usage information, such as which tester is using your application, their device model/OS, how long they used the application, and automatic recording of any crashes they encounter.
The SDK can track more information if you pass it to TestFlight. The Checkpoint API is used to help you track exactly how your testers are using your application. Curious about which users passed level 5 in your game, or posted their high score to Twitter, or found that obscure feature? See “Checkpoint API” down below to see how.
The SDK also offers a remote logging solution. Find out more about our logging system in the “Remote Logging” section.
Requirements
The TestFlight SDK requires iOS 4.3 or above, the Apple LLVM compiler, and the libz library to run.
The AdSupport.framework is required for iOS 6.0+ in order to uniquely identify users so we can estimate the number of users your app has (using ASIdentifierManager
). You may weak link the framework in you app. If your app does not link with the AdSupport.framework, the TestFlight SDK will automatically load it for apps running on iOS 6.0+.
Integration
Add the files to your project: File –> Add Files to “ ”
- Find and select the folder that contains the SDK
- Make sure that “Copy items into destination folder (if needed)” is checked
- Set Folders to “Create groups for any added folders”
- Select all targets that you want to add the SDK to
Verify that libTestFlight.a has been added to the Link Binary With Libraries Build Phase for the targets you want to use the SDK with
- Select your Project in the Project Navigator
- Select the target you want to enable the SDK for
- Select the Build Phases tab
- Open the Link Binary With Libraries Phase
- If libTestFlight.a is not listed, drag and drop the library from your Project Navigator to the Link Binary With Libraries area
- Repeat Steps 2 – 5 until all targets you want to use the SDK with have the SDK linked
Add libz to your Link Binary With Libraries Build Phase
- Select your Project in the Project Navigator
- Select the target you want to enable the SDK for
- Select the Build Phases tab
- Open the Link Binary With Libraries Phase
- Click the + to add a new library
- Find libz.dylib in the list and add it
- Repeat Steps 2 – 6 until all targets you want to use the SDK with have libz.dylib
Get your App Token
If this is a new application, and you have not uploaded it to TestFlight before, first register it here: [https://testflightapp.com/dashboard/applications/create/](https://testflightapp.com/dashboard/applications/create/).
Otherwise, if you have previously uploaded your app to TestFlight, go to your list of applications (http://testflightapp.com/dashboard/applications/) and click on the application you are using from the list.
Click on the “App Token” tab on the left. The App Token for that application will be there.
 }
To report crashes to you we install our own uncaught exception handler. If you are not currently using an exception handler of your own then all you need to do is go to the next step.
Setting the UDID
For BETA apps only: In order for “In App Updates” to work and for user data not to be anonymized, you may provide the device’s unique identifier. To send the device identifier call the following method before your call to [TestFlight takeOff:]
like so:
[TestFlight setDeviceIdentifier:[[UIDevice currentDevice] uniqueIdentifier]];
[TestFlight takeOff:@"Insert your Application Token here"];
Note: [[UIDevice currentDevice] uniqueIdentifier]
is deprecated, which means it may be removed from iOS in the future and that it should not be used in production apps. We recommend using it only in beta apps. If using it makes you feel uncomfortable, you are not required to include it.
Note on iOS 7 and Xcode 5: In iOS 7, uniqueIdentifier
no longer returns the device’s UDID, so iOS 7 users will show up anonymously on TestFlight. Also, when building with ARC, Xcode 5 will not allow you to call uniqueIdentifier
because it has been removed in iOS 7 from UIDevice
’s header. We are working on a workaround for this issue.
DO NOT USE THIS IN PRODUCTION APPS. When it is time to submit to the App Store comment this line out. Apple will probably reject your app if you leave this line in.
Uploading your build
After you have integrated the SDK into your application you need to upload your build to TestFlight. You can upload your build on our website, using our desktop app, or by using our upload API.
Basic Features
Session Information
View anonymous information about how often users use your app, how long they use it for, and when they use it. You can see what type of device the user is using, which OS, which language, etc.
Sessions automatically start at app launch, app did become active, and app will enter foreground and end at app will resign active, app did enter background, or app will terminate. Sessions that start shortly after an end continue the session instead of starting a new one.
For beta users, you can see who the users are if you are setting the UDID, they have a TestFlight account, and their device is registered to TestFlight. (See Setting the UDID for more information).
Crash Reports
The TestFlight SDK automatically reports all crashes (beta and prod) to TestFlight’s website where you can view them. Crash reports are sent at crash time. TestFlight will also automatically symbolicate all crashes (if you have uploaded your dSYM). For beta apps, on the site, you can see which checkpoints the user passed before the crash and see remote logs that were sent before the crash. For prod apps, you can see remote logs that were sent before the crash.
Beta In App Updates
If a user is using a beta version of your app, you are setting the UDID, a new beta version is available, and that user has permission to install it; an in app popup will ask them if they would like to install the update. If they tap “Install”, the new version is installed from inside the app.
NB: For this to work, you must increment your build version before uploading. Otherwise the new and old builds will have the same version number and we won’t know if the user needs to update or is already using the new version.
To turn this off set this option before calling takeOff:
[TestFlight setOptions:@{ TFOptionDisableInAppUpdates : @YES }];
Additional Features
Checkpoints
When a tester does something you care about in your app, you can pass a checkpoint. For example completing a level, adding a todo item, etc. The checkpoint progress is used to provide insight into how your testers are testing your apps. The passed checkpoints are also attached to crashes, which can help when creating steps to replicate. Checkpoints are visible for all beta and prod builds.
[TestFlight passCheckpoint:@"CHECKPOINT_NAME"];
Use passCheckpoint:
to track when a user performs certain tasks in your application. This can be useful for making sure testers are hitting all parts of your application, as well as tracking which testers are being thorough.
Checkpoints are meant to tell you if a user visited a place in your app or completed a task. They should not be used for debugging purposes. Instead, use Remote Logging for debugging information (more information below).
Custom Environment Information
In beta builds, if you want to see some extra information about your user, you can add some custom environment information. You must add this information before the session starts (a session starts at takeOff:
) to see it on TestFlight’s website. NB: You can only see this information for beta users.
[TestFlight addCustomEnvironmentInformation:@"info" forKey:@"key"];
You may call this method as many times as you would like to add more information.
User Feedback
In beta builds, if you collect feedback from your users, you may pass it back to TestFlight which will associate it with the user’s current session.
[TestFlight submitFeedback:feedback];
Once users have submitted feedback from inside of the application you can view it in the feedback area of your build page.
Remote Logging
Remote Logging allows you to see the logs your app prints out remotely, on TestFlight’s website. You can see logs for beta sessions and prod sessions with crashes. NB: you cannot see the logs for all prod sessions.
To use it, simply replace all of your NSLog
calls with TFLog
calls. An easy way to do this without rewriting all your NSLog
calls is to add the following macro to your .pch
file.
#import "TestFlight.h"
#define NSLog TFLog
Not only will TFLog
log remotely to TestFlight, it will also log to the console (viewable in a device’s logs) and STDERR (shown while debugging) just like NSLog does, providing a complete replacement.
For even better information in your remote logs, such as file name and line number, you can use this macro instead:
#define NSLog(__FORMAT__, ...) TFLog((@"%s [Line %d] " __FORMAT__), __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__)
Which will produce output that looks like
[MyAppDelegate application:didFinishLaunchingWithOptions:] [Line 45] Launched!
Custom Logging
If you have your own custom logging, call TFLog
from your custom logging function. If you do not need TFLog
to log to the console or STDERR because you handle those yourself, you can turn them off with these calls:
[TestFlight setOptions:@{ TFOptionLogToConsole : @NO }];
[TestFlight setOptions:@{ TFOptionLogToSTDERR : @NO }];
Advanced Notes
Checkpoint API
When passing a checkpoint, TestFlight logs the checkpoint synchronously (See Remote Logging for more information). If your app has very high performance needs, you can turn the logging off with the TFOptionLogOnCheckpoint
option.
Remote Logging
All logging is done synchronously. Every time the SDK logs, it must write data to a file. This is to ensure log integrity at crash time. Without this, we could not trust logs at crash time. If you have a high performance app, please email<EMAIL_ADDRESS>for more options.
Advanced Session Control
Continuing sessions: You can adjust the amount of time a user can leave the app for and still continue the same session when they come back by changing the TFOptionSessionKeepAliveTimeout
option. Change it to 0 to turn the feature off.
Manual Session Control: If your app is a music player that continues to play music in the background, a navigation app that continues to function in the background, or any app where a user is considered to be “using” the app even while the app is not active you should use Manual Session Control. Please only use manual session control if you know exactly what you are doing. There are many pitfalls which can result in bad session duration and counts. See TestFlight+ManualSessions.h
for more information and instructions.
Advanced Exception/Signal Handling
An uncaught exception means that your application is in an unknown state and there is not much that you can do but try and exit gracefully. Our SDK does its best to get the data we collect in this situation to you while it is crashing, but it is designed in such a way that the important act of saving the data occurs in as safe way a way as possible before trying to send anything. If you do use uncaught exception or signal handlers, install your handlers before calling takeOff:
. Our SDK will then call your handler while ours is running. For example:
/*
My Apps Custom uncaught exception catcher, we do special stuff here, and TestFlight takes care of the rest
*/
void HandleExceptions(NSException *exception) {
NSLog(@"This is where we save the application data during a exception");
// Save application data on crash
}
/*
My Apps Custom signal catcher, we do special stuff here, and TestFlight takes care of the rest
*/
void SignalHandler(int sig) {
NSLog(@"This is where we save the application data during a signal");
// Save application data on crash
}
-(BOOL)application:(UIApplication *)application
didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
// installs HandleExceptions as the Uncaught Exception Handler
NSSetUncaughtExceptionHandler(&HandleExceptions);
// create the signal action structure
struct sigaction newSignalAction;
// initialize the signal action structure
memset(&newSignalAction, 0, sizeof(newSignalAction));
// set SignalHandler as the handler in the signal action structure
newSignalAction.sa_handler = &SignalHandler;
// set SignalHandler as the handlers for SIGABRT, SIGILL and SIGBUS
sigaction(SIGABRT, &newSignalAction, NULL);
sigaction(SIGILL, &newSignalAction, NULL);
sigaction(SIGBUS, &newSignalAction, NULL);
// Call takeOff after install your own unhandled exception and signal handlers
[TestFlight takeOff:@"Insert your Application Token here"];
// continue with your application initialization
}
You do not need to add the above code if your application does not use exception handling already.


Allow access to the Test App
The state value is set to {{ state }}. It should be part of the response you get in the callback after authorizing


1) HTTP Requests (Client/Server)
2) HTML BASICS
Syntax, elements, meta-data, attributes, website structure, debugging- Web Development Course V2 - Front End Masters (With license)
- Introduction to HTML - MDN (Free)
- Introduction to HTML - W3Schools (Free)
3) Semantic HTML
- Web Accessibility Course - Front End Masters (With license)
- Semantics in HTML - MDN (Free)
- Semantics & Accessibility - Shayhowe (Free)
4) SEO Basics
- Modern SEO Course - Front End Masters (With license)
- HTML.COM - MDN (Free)
- SEO Guide - Google (Free)
5) Accessibility
- Web Accessibility Course - Front End Masters (With license)
- Learn Accessibility - MDN (Free)
- Accessibility Fundamentals - Google (Free)
- Accessibility - A11y with Lindsey (Free)
6) Performance
1) Core Concepts
Cascade, Order & Specificity2) CSS Basics
Syntax, rules3) CSS Selectors, Pseudo-Selectors
- Web Development Course V2 - Front End Masters (With license)
- Selectors - MDN (Free)
- Type Class and ID Selectors - MDN (Free)
- Pseudo-classes and Pseudo-elements - MDN (Free)
4) CSS Layouts (Flexbox):
Games5) CSS Media Queries
1) Values, operations, types & variables
2) Control structures / Error Handling
- Getting Started JS V2 Course - Front End Masters (With license)
- Control flow and error handling - MDN (Free)
3) Functions
4) Scope, THIS and prototypal inheritance
- Getting Started JS V2 Course - Front End Masters (With license)
- Inheritance and the prototype chain - MDN (Free)
- Visualized prototypal inheritance - DEV.TO (Free)


Use Pygments in Java¶
Thanks to Jython it is possible to use Pygments in Java.
This page is a simple tutorial to get an idea of how this is working. You can then look at the Jython documentation for more advanced use.
Since version 1.5, Pygments is deployed on Maven Central as a JAR so is Jython which makes it a lot easier to create the Java project.
Here is an example of a Maven pom.xml
file for a
project running Pygments:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>example</groupId>
<artifactId>example</artifactId>
<version>1.0-SNAPSHOT</version>
<dependencies>
<dependency>
<groupId>org.python</groupId>
<artifactId>jython-standalone</artifactId>
<version>2.5.3</version>
</dependency>
<dependency>
<groupId>org.pygments</groupId>
<artifactId>pygments</artifactId>
<version>1.5</version>
<scope>runtime</scope>
</dependency>
</dependencies>
</project>
The following Java example:
PythonInterpreter interpreter = new PythonInterpreter();
// Set a variable with the content you want to work with
interpreter.set("code", code);
// Simple use Pygments as you would in Python
interpreter.exec("from pygments import highlight\n"
+ "from pygments.lexers import PythonLexer\n"
+ "from pygments.formatters import HtmlFormatter\n"
+ "\nresult = highlight(code, PythonLexer(), HtmlFormatter())");
// Get the result that has been set in a variable
System.out.println(interpreter.get("result", String.class));
will print something like:

print "Hello World"


|
John Edward Robinson Sr.He's known as the Cyber-Sex killer, but a better way to describe John Robinson is to call him a domineering, lying, fraudulent, murderous, charismatic, psychopathic, bipolar, dildo thief.Robinson is now a confessed serial killer with a kink for torturing and raping women, then butchering them and hiding them in barrels. But that's all been done before; the real crime here is his theft of $500 worth of sex toys from a Texas psychologist. On Easter of 2000, John met up with this unnamed and obviously embarrassed woman in a Kansas City extended-stay hotel. They'd met online at a BDSM bulletin board. During their week-long tryst, Robinson, always the consummate businessman, had the woman sign a slave contract binding her to him.  She later pressed charges for abuse of her body, assault on her psyche, and theft of her sex toys.  Robinson is not only a God-fearing Christian businessman with four children and a wife, he is also an Eagle Scout, a Sunday School teacher, and a former man-of-the-year in Kansas City, Missouri. Of course, he rigged the vote and awarded himself that last one. Nice. He was born in Al Capone's favorite town, Cicero, Illinois, on December 27, 1943. His father was a professional blue-collar drunk, and his mother was a full-time disciplinarian. As the middle child of five, Robinson lost in a sea of punishment, spankings, and motherly abuse. When he was 13, Robinson's Boy Scout troop was shipped off to merry old England to perform for the Queen Mum. According to the Chicago Tribune, after the show, John met Judy Garland and received a kiss on the cheek, to the envy of homosexuals everywhere. He's said to have told her he wanted to be a priest. In 1964, John moved to Kansas City, Missouri. There, he quickly set to the task of making himself appear to be a civic asset and a respectable businessman. He trained as an X-ray technician, and got a job working for Harry Truman's doctor, Wallace H. Graham. He was then promptly fired and placed on three years' probation for embezzling. In 1970, he was arrested for stealing 6,200 stamps from Mobile Oil Corp., his employer at the time. After that, he snatched five grand from R. B. Jones Co., another company foolish enough to hire him. To top it all off, Robinson had something of a personality disorder. Local newspapers are riddled with neighbors' accounts of John being charming one moment, then flying off the handle in unabashed rage the next. Perhaps it was all those secrets he was keeping. Robinson had all sorts of twisted bondage fetishes that his wife wasn't into. He was in the habit of meeting up with submissive women around Missouri whom he met through personal ads. He made them all sign slave contracts, just like the Texas Psychologist. But he never killed anyone he met this way: at least, no one that we know of. Robinson eventually devised a scheme to satisfy his need to need to whip women to death while raping them. Robinson discovered a local shelter for homeless families and single mothers. He began to drop by with armloads of food and casually mention that he was on his way to give said food to a poor family he'd adopted. Workers at the shelter found him charming, but couldn't quite figure out why he kept dropping by to point out his own humility and charity. Eventually, Robinson began trying to open a home for unwed mothers, and chatted up the shelter's management for potential clients. One of those clients, Lisa Stasi, was brought to Robinson's attention.
Lisa Stasi vanished in 1985, about the same time Robinson decided to "adopt" her and her year-old daughter. When Lisa vanished, Robinson pawned off young Tiffany Stasi to his brother in an illegal adoption. His brother never knew that the $5,500 he paid John to arrange the adoption went right into the killer's wallet. Lisa's body was never found, but John eventually confessed to having raped, sodomized, beaten, and killed her. She was likely his first murder, but he could also have cut his teeth on 19-year-old Paula Godfrey, who vanished in 1984. After those first two kills, John took a little time off, before plunging back in again two years later with renewed vigor. 1987 brought the wayward Catherine Clampitt to Robinson's backyard. A 27 year old from Texas, Catherine sparked that old familiar feelings within Robinson. She was later found decomposing in a barrel on Robinson's property. Robinson continued to fund broken business deals and generally make a bad name for himself in Kansas City. It's possible that he killed Catherine Clampitt out of rage just before he was shipped off to prison for fraud at the end of 1987. Once he got out, he met Beverly Bonner and Sheila Faith, both single moms with estranged husbands. Robinson killed them both and then proceeded to bilk the US government out of their social security checks.  Not only did Debbie's legs not work, but she also had dental problems and developmental issues. None of this seemed to matter to our Robinson, who left her and her mother barreled up in a storage locker. Next came Suzette M. Trouten and Izabela K. Lewicka, who were both found inside barrels buried on some property Robinson owned outside of Kansas City. The final body count was 8, but there might be a few more out there, decomposing inside wodden and plastic barrels all over Missouri. Robinson began confessing to other murders towards the end of his trial in 2003; since then, he has also been brought up on charges of grand larceny, fraud, and mail fraud. Most days of the trial, John's wife, Nancy was seen sitting steadfastly behind her husband. She and her children refuse to believe that John Robinson is a depraved psychopathic killer, even after he'd confessed to the crimes. In 2001, Nancy even told reporters, "The John Robinson we know has always been a loving and caring husband and father, the type of parent who never missed a sporting event, a school function or an opportunity to be there for his family. We do not know the person whom we have read and heard about on TV." John Robinson, is now rotting in a Kansas City jail with two consecutive life sentences and an execution scheduled for 2005. |


Package redempt.redlib.protection
Class ProtectionPolicy
- java.lang.Object
-
- redempt.redlib.protection.ProtectionPolicy
-
- All Implemented Interfaces:
org.bukkit.event.Listener
public class ProtectionPolicy extends java.lang.Object implements org.bukkit.event.Listener
Represents a set of rules in the form ofProtectionPolicy.ProtectionType
s protecting a set of blocks, which can have bypasses
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ProtectionPolicy.ProtectionType
-
Field Summary
Fields Modifier and Type Field Description protected static java.util.Set<ProtectionPolicy>
globalPolicies
protected static RegionMap<ProtectionPolicy>
regionMap
-
Constructor Summary
Constructors Modifier Constructor Description ProtectionPolicy(java.util.function.Predicate<org.bukkit.block.Block> protectionCheck, ProtectionPolicy.ProtectionType... protections)
Create a ProtectionPolicy to protect blocks.protected
ProtectionPolicy(org.bukkit.plugin.Plugin plugin, CuboidRegion bounds, java.util.function.Predicate<org.bukkit.block.Block> protectionCheck, ProtectionPolicy.ProtectionType... protections)
ProtectionPolicy(CuboidRegion bounds, java.util.function.Predicate<org.bukkit.block.Block> protectionCheck, ProtectionPolicy.ProtectionType... protections)
Create a ProtectionPolicy to protect blocks
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addBypassPolicy(java.util.function.BiPredicate<org.bukkit.entity.Player,ProtectionPolicy.ProtectionType> bypassPolicy)
Adds a bypass policy, which allows certain players to bypass certain protection typesvoid
addBypassPolicy(BypassPolicy bypassPolicy)
Adds a bypass policy, which allows certain players to bypass certain protection typesvoid
addProtectionTypes(ProtectionPolicy.ProtectionType... protections)
Adds ProtectionTypes to this ProtectionPolicyboolean
allow(org.bukkit.block.Block block, ProtectionPolicy.ProtectionType type, org.bukkit.entity.Player player)
void
clearBypassPolicies()
Removes all bypass policiesvoid
clearDenyMessages()
Clear all deny messagesvoid
disable()
Disables all protections for this ProtectionPolicyvoid
enable()
Enables all protections specified for this ProtectionPolicyCuboidRegion
getBounds()
void
onCreatureSpawn(org.bukkit.event.entity.CreatureSpawnEvent e)
static <T extends org.bukkit.event.Event & org.bukkit.event.Cancellable>
voidregisterProtection(java.lang.Class<T> clazz, ProtectionPolicy.ProtectionType type, java.util.function.Function<T,org.bukkit.entity.Player> getPlayer, java.util.function.Function<T,org.bukkit.block.Block>... getBlocks)
Registers a custom event to be protected using a specific ProtectionTypestatic <T extends org.bukkit.event.Event>
voidregisterProtectionNonCancellable(java.lang.Class<T> clazz, ProtectionPolicy.ProtectionType type, java.util.function.Function<T,org.bukkit.entity.Player> getPlayer, java.util.function.Consumer<T> cancel, java.util.function.Function<T,org.bukkit.block.Block>... getBlocks)
Registers a custom event that cannot be cancelled usingCancellable.setCancelled(boolean)
using a specific ProtectionTypestatic void
registerProtections()
void
removeProtectionTypes(ProtectionPolicy.ProtectionType... protections)
Removes ProtectionTypes from this ProtectionPolicyvoid
setDenyMessage(java.util.function.Predicate<ProtectionPolicy.ProtectionType> filter, java.lang.String message)
Sets the message to be shown to a player when they attempt to do an action which is protected againvoid
setDenyMessage(ProtectionPolicy.ProtectionType type, java.lang.String message)
Sets the message to be shown to a player when they attempt to do an action which is protected againvoid
setProtectionTypes(ProtectionPolicy.ProtectionType... protections)
Sets the ProtectionTypes to be used
-
-
-
Field Detail
-
globalPolicies
protected static java.util.Set<ProtectionPolicy> globalPolicies
-
regionMap
protected static RegionMap<ProtectionPolicy> regionMap
-
-
Constructor Detail
-
ProtectionPolicy
protected ProtectionPolicy(org.bukkit.plugin.Plugin plugin, CuboidRegion bounds, java.util.function.Predicate<org.bukkit.block.Block> protectionCheck, ProtectionPolicy.ProtectionType... protections)
-
ProtectionPolicy
public ProtectionPolicy(CuboidRegion bounds, java.util.function.Predicate<org.bukkit.block.Block> protectionCheck, ProtectionPolicy.ProtectionType... protections)
Create a ProtectionPolicy to protect blocks- Parameters:
bounds
- A region that defines the bounds inside which this ProtectionPolicy protects blocksprotectionCheck
- A predicate which will be used to check whether blocks are protected by this ProtectionPolicyprotections
- The types of actions to protect against
-
ProtectionPolicy
public ProtectionPolicy(java.util.function.Predicate<org.bukkit.block.Block> protectionCheck, ProtectionPolicy.ProtectionType... protections)
Create a ProtectionPolicy to protect blocks. PreferProtectionPolicy(CuboidRegion, Predicate, ProtectionType...)
, as it will improve performance- Parameters:
protectionCheck
- A predicate which will be used to check whether blocks are protected by this ProtectionPolicyprotections
- The types of actions to protect against
-
-
Method Detail
-
registerProtections
public static void registerProtections()
-
registerProtection
public static <T extends org.bukkit.event.Event & org.bukkit.event.Cancellable> void registerProtection(java.lang.Class<T> clazz, ProtectionPolicy.ProtectionType type, java.util.function.Function<T,org.bukkit.entity.Player> getPlayer, java.util.function.Function<T,org.bukkit.block.Block>... getBlocks)
Registers a custom event to be protected using a specific ProtectionType- Type Parameters:
T
- The event type- Parameters:
clazz
- The event class of an event which implementsCancellable
type
- The ProtectionType to protect against this eventgetPlayer
- A function to get the player associated with the event - can return nullgetBlocks
- A vararg of functions to get blocks associated with the event
-
registerProtectionNonCancellable
public static <T extends org.bukkit.event.Event> void registerProtectionNonCancellable(java.lang.Class<T> clazz, ProtectionPolicy.ProtectionType type, java.util.function.Function<T,org.bukkit.entity.Player> getPlayer, java.util.function.Consumer<T> cancel, java.util.function.Function<T,org.bukkit.block.Block>... getBlocks)
Registers a custom event that cannot be cancelled usingCancellable.setCancelled(boolean)
using a specific ProtectionType- Type Parameters:
T
- The event type- Parameters:
clazz
- The event classtype
- The ProtectionType to protect against this eventgetPlayer
- A function to get the player associated with the event - can return nullcancel
- A consumer to cancel the eventgetBlocks
- A vararg of functions to get the blocks associated with this event
-
setProtectionTypes
public void setProtectionTypes(ProtectionPolicy.ProtectionType... protections)
Sets the ProtectionTypes to be used- Parameters:
protections
- The ProtectionTypes
-
addProtectionTypes
public void addProtectionTypes(ProtectionPolicy.ProtectionType... protections)
Adds ProtectionTypes to this ProtectionPolicy- Parameters:
protections
- The ProtectionTypes to add
-
removeProtectionTypes
public void removeProtectionTypes(ProtectionPolicy.ProtectionType... protections)
Removes ProtectionTypes from this ProtectionPolicy- Parameters:
protections
- The ProtectionTypes to remove
-
disable
public void disable()
Disables all protections for this ProtectionPolicy
-
enable
public void enable()
Enables all protections specified for this ProtectionPolicy
-
addBypassPolicy
public void addBypassPolicy(java.util.function.BiPredicate<org.bukkit.entity.Player,ProtectionPolicy.ProtectionType> bypassPolicy)
Adds a bypass policy, which allows certain players to bypass certain protection types- Parameters:
bypassPolicy
- TheBiPredicate
to determine bypasses by player and protection type
-
addBypassPolicy
public void addBypassPolicy(BypassPolicy bypassPolicy)
Adds a bypass policy, which allows certain players to bypass certain protection types- Parameters:
bypassPolicy
- TheBypassPolicy
to determine bypasses by player and protection type
-
clearBypassPolicies
public void clearBypassPolicies()
Removes all bypass policies
-
setDenyMessage
public void setDenyMessage(ProtectionPolicy.ProtectionType type, java.lang.String message)
Sets the message to be shown to a player when they attempt to do an action which is protected again- Parameters:
type
- The type of action the message corresponds tomessage
- The message players should be shown when this type of action is denied
-
setDenyMessage
public void setDenyMessage(java.util.function.Predicate<ProtectionPolicy.ProtectionType> filter, java.lang.String message)
Sets the message to be shown to a player when they attempt to do an action which is protected again- Parameters:
filter
- A filter for which types to set the message formessage
- The message players should be shown when these types of actions are denied
-
clearDenyMessages
public void clearDenyMessages()
Clear all deny messages
-
getBounds
public CuboidRegion getBounds()
- Returns:
- The cuboid bounds of this ProtectionPolicy, or null if it is a global policy
-
allow
public boolean allow(org.bukkit.block.Block block, ProtectionPolicy.ProtectionType type, org.bukkit.entity.Player player)
-
onCreatureSpawn
public void onCreatureSpawn(org.bukkit.event.entity.CreatureSpawnEvent e)
-
-


Current Suggestion and Closing Remarks¶
Current Suggestion¶
Rule based decompilation – or essentially hand coding a list of options for the ML agent to choose from and letting it choose only combinations of those actions seems to be holistically impossible. Other ideas that the team has begun to explore show much more promise and hopefully will be of more use. I suggest whole heartedly that we pursue such endeavors.
Closing Remarks¶
My suggestion not withstanding, some of the ideas that we discovered might come of use. While concrete, invariable rules are not only likely beyond us but would not be very successful, on a small scale, they might be of aid during the decompilation process. Borrowing the ideas of many other decompilers and providing the simpler actions at the very least would give the ML agent a step up into being able to handle complex decompilation.
For example, one idea that the team has been exploring has been an episodic RL agent which essentially has a lookup table of semantically equivalent copies of small snippets. The agent would be able to search for occurences and perform substituions throughout the code. This would allow a decompiler which does it’s job quite lazilly – perhaps generating goto style statements instead of while loops for example – to be fixed to produce readable, ellegant code. If the ML agent were able to perform substituions and then, after performing some substitions, run llvm passes to clean the results before continuing, it is possible it might learn quicker.


--- layout: post title: no title date: '2009-07-11T10:32:20+01:00' tags: [] tumblr_url: http://backlog.robbevan.com/post/139564530/the-88-the-making-of-love-is-the-thing-via ---
The 88 - The Making of Love Is The Thing (via ilovethe88)


Ice Hockey Icons
The number one source for fully licensed NHL icons and symbols for the Web! Not only do we have classic hockey symbols like the ones featured below we also have a plethora of team-themed icons such as player celebrations, logos, and numbers. If you want a specific icon made up we have a personal request system, (it may cost you some extra fees!), if you go to our "Contact Us" page. All created and designed by our lead designer Sasha Ahrens.


The Inland Wood CSS template
This is Inland Wood, the second in a new series of HTML/CSS templates from andreasviklund.com. It is a multi-layout design, and the second andreasviklund.com template to feature an image slider. Inland Wood is made for template users who want a design that catches the attention of the website visitor and it is suitable for both personal websites and blogs, as well as for professional websites for companies and organizations. Like all templates by Andreas Viklund, it keeps the code simple, making the template easy to customize and build upon. To see the different layout options, click the main menu links above...