[film] "Virus" A Postview, copyright 1999 p-m agapow
Taking a leaf from the Daleks' book, a sentient informational lifeform tries to invade Earth. Fortunately, it is defeated by Jamie-Lee Curtis and one of the lesser Baldwin brothers. Unfortunately, it is defeated by Jamie-Lee Curtis and one of the lesser Baldwin brothers.
It happens every year, regular as clockwork. No one knows why. They dash unthinkingly towards their doom, the horde sweeping over the edge into the abyss. Perhaps it is the rhythm of nature. Perhaps it is something primal. But every year, a film crew tries to remake "Alien".
There are minor differences of course. Sometimes the monster is a robot, sometimes a mutant. Sometimes the victims are trapped in the arctic, sometimes in a city.
Of course trawling the depths of such suckiness can sometimes be tremendously entertaining, such as the loopily wet "Leviathan", the colourful "Hardware", the demented "DeepStar Six".  And let's face it: Jamie-Lee Curtis in a sou'wester is no ones idea of fun.
For those of you that didn't catch "Virus" at the cinema (which from the box office figures is - well - everybody), the story goes like this: the crew of the "Minnow" are in trouble. Their cargo barge is taking water. Their ship is running into a hurricane. And their skipper is Donald Sutherland. The uninsured cargo barge sinks and Donald retreats to his cabin, to clutch a pistol and gaze at a photo taken during his youth. "I've let you down, boy," he sighs. If you weren't watching closely, you might think he was talking in character. But Gilligan (Curtis) spots a disabled Russian freighter and they board, hoping to make a mint in salvage. Unbeknownst to them, a huge cloud of static electricity has drifted across space, zapped Mir, telneted down to the ship and is looking for more copies of Microsoft Office to infect. Unbeknowst that is, until they find the sole demented Russian survivor for some quick plot exposition.  See, it _is_ just like "Gilligan's Island".
Let me cut to the chase: it's lucky the "Minnow" has such a fearless (and large) crew because they die one by one or get turned into bio-mechanical killing machines. Ginger is left alone in the critically important generator room and just like the dizzy-headed movie star he is, goes to investigate a noise and is strangled by a powercable. The Howells and Maryanne split up and blunder around alone in the ships dark corridors until they get eaten. The Professor rigs up a complicated device so he can escape the ship. Of course, it's a long standing law of trashy monster films that characters die in order of increasing socio-economic standing. The Professor, being the token black, is thus doomed never to see the end of the film. But for those who like to keep their finger on the pulse of popular culture, it's a hopeful sign of progress that he dies after the alcoholic, the Cuban and the redneck. (And after the Maori, who has a Sydney accent.) My, what a long way we've come.   I'm sure that the rights have been sold and in a few years we'll see a cheapie sequel starring a different Baldwin brother. [*/misfire] and a nagging chest cold on the Sid & Nancy scale.
"Virus" Released 1999. Directed by John Bruno. Starring Jamie-Lee Curtis, Donald Sutherland, Baldwin X., Joanna Pacula.
-- Paul-Michael Agapow<EMAIL_ADDRESS>The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews


Tags
Only followers of
Uploaded
Search
Select by
posts
users
Winners amount:
Who is lucky?


academia
Home
Courses
About Us
Login
At academia!
Register yourself with require details
Email
Password
Confirm Email
Confirm Password
Register
Forgot password?
Already have an account!
Login now


# -*- coding: utf-8 -*- import os import sys import unittest from pygame.tests.test_utils import example_path import pygame from pygame.compat import as_unicode, unicode_, filesystem_encode class MixerMusicModuleTest(unittest.TestCase): @classmethod def setUpClass(cls): # Initializing the mixer is slow, so minimize the times it is called. pygame.mixer.init() @classmethod def tearDownClass(cls): pygame.mixer.quit() def setUp(cls): # This makes sure the mixer is always initialized before each test (in # case a test calls pygame.mixer.quit()). if pygame.mixer.get_init() is None: pygame.mixer.init() def test_load(self): "|tags:music|" # __doc__ (as of 2008-07-13) for pygame.mixer_music.load: # pygame.mixer.music.load(filename): return None # Load a music file for playback data_fname = example_path('data') formats = ['mp3', 'ogg', 'wav'] for f in formats: path = os.path.join(data_fname, 'house_lo.%s' % f) if os.sep == '\\': path = path.replace('\\', '\\\\') umusfn = as_unicode(path) bmusfn = filesystem_encode(umusfn) pygame.mixer.music.load(umusfn) pygame.mixer.music.load(bmusfn) def test_load_object(self): """test loading music from file-like objects.""" formats = ['ogg', 'wav'] data_fname = example_path('data') for f in formats: path = os.path.join(data_fname, 'house_lo.%s' % f) if os.sep == '\\': path = path.replace('\\', '\\\\') bmusfn = filesystem_encode(path) with open(bmusfn, 'rb') as musf: pygame.mixer.music.load(musf) def test_load_unicode(self): """test non-ASCII unicode path""" import shutil ep = unicode_(example_path('data')) temp_file = os.path.join(ep, u'你好.wav') org_file = os.path.join(ep, u'house_lo.wav') try: with open(temp_file, 'w') as f: pass os.remove(temp_file) except IOError: raise unittest.SkipTest('the path cannot be opened') shutil.copy(org_file, temp_file) try: pygame.mixer.music.load(temp_file) pygame.mixer.music.load(org_file) # unload finally: os.remove(temp_file) def todo_test_queue(self): # __doc__ (as of 2008-08-02) for pygame.mixer_music.queue: # This will load a music file and queue it. A queued music file will # begin as soon as the current music naturally ends. If the current # music is ever stopped or changed, the queued song will be lost. # # The following example will play music by Bach six times, then play # music by Mozart once: # # pygame.mixer.music.load('bach.ogg') # pygame.mixer.music.play(5) # Plays six times, not five! # pygame.mixer.music.queue('mozart.ogg') self.fail() def todo_test_stop(self): # __doc__ (as of 2008-08-02) for pygame.mixer_music.stop: # Stops the music playback if it is currently playing. self.fail() def todo_test_rewind(self): # __doc__ (as of 2008-08-02) for pygame.mixer_music.rewind: # Resets playback of the current music to the beginning. self.fail() def todo_test_get_pos(self): # __doc__ (as of 2008-08-02) for pygame.mixer_music.get_pos: # This gets the number of milliseconds that the music has been playing # for. The returned time only represents how long the music has been # playing; it does not take into account any starting position # offsets. # self.fail() def todo_test_fadeout(self): # __doc__ (as of 2008-08-02) for pygame.mixer_music.fadeout: # This will stop the music playback after it has been faded out over # the specified time (measured in milliseconds). # # Note, that this function blocks until the music has faded out. self.fail() def todo_test_play(self): # __doc__ (as of 2008-08-02) for pygame.mixer_music.play: # This will play the loaded music stream. If the music is already # playing it will be restarted. # # The loops argument controls the number of repeats a music will play. # play(5) will cause the music to played once, then repeated five # times, for a total of six. If the loops is -1 then the music will # repeat indefinitely. # # The starting position argument controls where in the music the song # starts playing. The starting position is dependent on the format of # music playing. MP3 and OGG use the position as time (in seconds). # MOD music it is the pattern order number. Passing a startpos will # raise a NotImplementedError if it cannot set the start position # self.fail() def todo_test_load(self): # __doc__ (as of 2008-08-02) for pygame.mixer_music.load: # This will load a music file and prepare it for playback. If a music # stream is already playing it will be stopped. This does not start # the music playing. # # Music can only be loaded from filenames, not python file objects # like the other pygame loading functions. # self.fail() def todo_test_get_volume(self): # __doc__ (as of 2008-08-02) for pygame.mixer_music.get_volume: # Returns the current volume for the mixer. The value will be between # 0.0 and 1.0. # self.fail() def todo_test_set_endevent(self): # __doc__ (as of 2008-08-02) for pygame.mixer_music.set_endevent: # This causes Pygame to signal (by means of the event queue) when the # music is done playing. The argument determines the type of event # that will be queued. # # The event will be queued every time the music finishes, not just the # first time. To stop the event from being queued, call this method # with no argument. # self.fail() def todo_test_pause(self): # __doc__ (as of 2008-08-02) for pygame.mixer_music.pause: # Temporarily stop playback of the music stream. It can be resumed # with the pygame.mixer.music.unpause() function. # self.fail() def todo_test_get_busy(self): # __doc__ (as of 2008-08-02) for pygame.mixer_music.get_busy: # Returns True when the music stream is actively playing. When the # music is idle this returns False. # self.fail() def todo_test_get_endevent(self): # __doc__ (as of 2008-08-02) for pygame.mixer_music.get_endevent: # Returns the event type to be sent every time the music finishes # playback. If there is no endevent the function returns # pygame.NOEVENT. # self.fail() def todo_test_unpause(self): # __doc__ (as of 2008-08-02) for pygame.mixer_music.unpause: # This will resume the playback of a music stream after it has been paused. self.fail() def todo_test_set_volume(self): # __doc__ (as of 2008-08-02) for pygame.mixer_music.set_volume: # Set the volume of the music playback. The value argument is between # 0.0 and 1.0. When new music is loaded the volume is reset. # self.fail() def todo_test_set_pos(self): # __doc__ (as of 2010-24-05) for pygame.mixer_music.set_pos: #This sets the position in the music file where playback will start. The # meaning of "pos", a float (or a number that can be converted to a float), # depends on the music format. Newer versions of SDL_mixer have better # positioning support than earlier. An SDLError is raised if a particular # format does not support positioning. # self.fail() if __name__ == '__main__': unittest.main()


WAL TUSSIN ADULT CHEST CONGESTION- guaifenesin syrup
Walgreen Company
Disclaimer: Most OTC drugs are not reviewed and approved by FDA, however they may be marketed if they comply with applicable regulations and policies. FDA has not evaluated whether this product complies.
Active ingredient (in each 10 mL)
Guaifenesin, USP 200 mg
Use
helps loosen phlegm (mucus) and thin bronchial secretions to make coughs more productive
Warnings
Ask a doctor before use if you have
- •
- cough that occurs with too much phlegm (mucus)
- •
- cough that lasts or is chronic such as occurs with smoking, asthma, chronic bronchitis, or emphysema
Stop use and ask a doctor if
cough lasts for more than 7 days, comes back, or is accompanied by fever, rash, or persistent headache. A persistent cough may be a sign of a serious condition.
If pregnant or breast-feeding,
ask a health professional before use.
Keep out of reach of children.
In case of overdose, get medical help or contact a Poison Control Center right away. (1-800-222-1222)
Directions
- •
- do not take more than 6 doses in any 24-hour period
- •
- measure only with dosing cup provided
- •
- keep dosing cup with product
- •
- mL = milliliter
- •
- this adult product is not intended for use in children under 12 years of age
age |
dose |
adults and children 12 years and over |
10 – 20 mL every 4 hours |
children under 12 years |
do not use |
Other information
store at 20-25°C (68-77°F)
Inactive ingredients
anhydrous citric acid, caramel, FD&C red no. 40, flavor, glycerin, high fructose corn syrup, maltol, menthol, propylene glycol, purified water, saccharin sodium, sodium benzoate
Questions or comments?
1-800-719-9260
Principal Display Panel
ADULT – NON-DROWSY
Wal-Tussin®
Chest Congestion
Guaifenesin / Expectorant
Alcohol free
Relieves chest congestion & mucus
Ages 12 & over
8 FL OZ (237 mL)
CHERRY FLAVOR
Compare to Robitussin® Mucus + Chest Congestion active ingredient


| Employee | Division | Suggestions | Rating |
|---|---|---|---|
| Give background color to the table cells to achieve seamless transition | |||
| Stephen C. Cox | Marketing | Make discount offers | 3/10 |
| Josephin Tan | Advertising | Give bonuses | 5/10 |
| Joyce Ming | Marketing | New designs | 8/10 |
| James A. Pentel | Marketing | Better Packaging | 8/10 |
| Employee | Division | Suggestions | Rating |
|---|---|---|---|
| Give background color to the table cells to achieve seamless transition |


Place ID geocoding required parameters
Place ID geocoding optional parameters
-
language
The language in which to return results.
-
See the
list of supported languages. Google often updates the supported languages, so this list may not be
exhaustive.
-
If
language
is not supplied, the API attempts to use the
preferred language as specified in the
Accept-Language
header, or the native language of the
domain from which the request is sent.
-
The API does its best to provide a street address that is readable for
both the user and locals. To achieve that goal, it returns street
addresses in the local language, transliterated to a script readable by
the user if necessary, observing the preferred language. All other
addresses are returned in the preferred language. Address components are
all returned in the same language, which is chosen from the first
component.
-
If a name is not available in the preferred language, the API uses the
closest match.
-
The preferred language has a small influence on the set of results that
the API chooses to return, and the order in which they are returned. The
geocoder interprets abbreviations differently depending on language,
such as the abbreviations for street types, or synonyms that may be
valid in one language but not in another. For example, utca and
tér are synonyms for street in Hungarian.
-
region
The region code, specified as a
ccTLD ("top-level domain")
two-character value. Most ccTLD codes are identical to ISO 3166-1 codes,
with some notable exceptions. For example, the United Kingdom's ccTLD is
"uk" (.co.uk) while its ISO 3166-1 code is "gb" (technically for the
entity of "The United Kingdom of Great Britain and Northern Ireland").
Generated from the
OpenAPI specification.
edit Edit
bug_report Report bug


Building a Unix-shell in Rust - Part 1
My goal is to find more work opportunities to write in Rust the same way I can write in Python and Go. Since I spend a lot of time designing and executing automation, it felt useful to start somewhere familiar. How about a simple Unix shell? Yes, I use bash all the time.
Rather than get this all worked out before posting, I'm going to document as much of my thought process in the design, as I have it. (But I am editing this to spare you the noisier stream-of-consciousness experience.)
I'll have code snippets occasionally, but I'm trying to keep the audience around intermediate experience (where I consider myself to be today). I'm going to assume you use another programming language today to Get Shit Done, and use the terminal to do simple things, but not necessarily write shell scripts.
Why am I doing this? I don't often see posts from beginning Rust learners doing practical, simple things (that can simply be copy/pasted and modified slightly), like in the other more mature language communities... Widest market? Probably not.
I guess that's enough rambling. Let’s dive in.
What’s a shell?🔗
A shell is an interactive language interpreter that allows you to run text-based commands and translates them into an action, such as making internal function calls, or running external programs.
You usually use it to access resources from the operating system.
Additional to accepting a text command - it typically outputs text results and/or causes some other side-effect.
You may know some of the name brand shells like the kind we're making, a Unix shell:
- Bourne-shell (sh)
- bash
- zsh
- fish
Or the windows specific:
- Command Prompt (cmd.exe)
- Powershell
Or interpreted languages:
- python
- lua
- haskell
Shells run in terminal emulators. This is (over-) simplified as the text-only window that runs your shell.
It handles the interaction from you (known as Standard-In, like keystrokes) and your shell (known as Standard-Out for the buffered/flushed output style, and Standard-Error for the direct output style).
In most cases, the terminal emulator and shell are different processes (Windows’ cmd.exe and Powershell are confusingly, both the shell and terminal emulator)
You may have made reference to it by other common names such as:
- command prompt
- terminal
- console
Examples of some terminal emulators
- xterm
- rxvt
- iTerm
- Terminal.app
- Windows Command Prompt
- Powershell
I’m going to focus on writing a bash-like shell. Functionality, and syntax should feel familiar.
The shells are a REPL, a Read-Eval-Print-Loop.
Typically, a character (let’s say ‘$’) is printed and a cursor blinks. This informs the user that a command can be typed in.
You type in a command.
You hit enter to translate the command into an action.
The output of the program prints to the screen.
$
What does this mean for me?🔗
It lets us quickly stub the code out into this REPL pattern Our main function that will enter a loop. Inside the main loop, we request a command from the user, and do something. Then we do it all over again.
Breaking down the steps🔗
First we Read🔗
We need to take user input. Most shells print a symbol to signal to the user that we can input a command (as opposed to, for example, executing a command). I need to learn how to get a text command from the user.
Let's start our definition of a command.
Command
a series of words separated by spaces.
$ keyword arg1 arg2 arg3…
The first word is a keyword. It's either a built-in function or an executable on the filesystem, with the rest of the line being parameters passed to our function.
Keyword
One of 2 possibilities :
- A built-in function to the shell (that is, calling a function in the code)
- An executable
- Either in one of the directories in your PATH
- Or a filesystem path (relative or absolute)
Then we Execute🔗
When we use a command that calls a built-in, we simply pass the arguments to the function, and return back to the start of the loop when it completes.
And when we call an executable?🔗
We need to make a fork syscall, that is, create a new process for the executable to run in, so it can have its own memory space, and manage its own interactions with the operating system. (The shell is still the parent process)
To start a process inside the child process, we have to call the exec syscall.
Then we Process🔗
This is when we cause side-effects to the system.
We want to provide feedback to the user to let them know the results of this process. To keep this simple, we will only consider returning text to the user, as we are providing commands as text.
Our shell process has at least 3 file descriptors for passing input, or receiving output provided. Stdin, Stdout, and Stderr. I need to know how to do that purely with Rust.
After the process is complete, any output should be printed to the screen, via stdout or stderr.
Exit codes will be treated as binary for this exercise. It should be set to 0 if we exit without error. Otherwise the exit code will be 1.
Lastly, we Loop🔗
Return of control will go back to the user. The default user prompt will print as a visual cue (along with the typical blinking cursor) and we should be able to enter another command.
The coding strategy🔗
So then we're running commands. Let's review the strategy.
- I need to know how to take input command in a loop.
- I need to process the input to separate the keyword from the arguments
- I need a way to call both builtins and executables.
- The most abstract : I need to give the user feedback about the command run. (E. g. Print onto screen as appropriate and set an exit code of the command.)
In the next post, we'll dive into using cargo
and start writing in Rust.


Examples
This example page is simple enough, it shows only few examples. Explore the source code to find out more usages that you can imagine.
Simplest - jQuery Plugin fashion
Simplest - OOP fashion
Rating
Get stars
Thinking...
More stars
Many stars in the sky. Style them by specifying CSS rules.


{{ instructions }}
{{ hint }}
All Notes
Thumbs (B3 and C4)
B3 to D4
A3 to D4
G3 to E4
F3 to F4
E3 to G4
D3 to A4


GONE IN SIXTY SECONDS RATING: 6.5/10 --> So-so
For more reviews and movie wallpapers, visit http://www.joblo.com/
The Entertainment Weekly magazine movie critic who reviewed this film called THE ROCK ("big and half dumb"), CON AIR ("huge and moronic"), and ARMAGEDDON ("colossal and brain-dead"). Now those three films combined to gross a little less than half a billion dollars domestically, so my guess is that there were actually a few people out there who did appreciate the films on a certain level. This has always been my main complaint about so-called real "movie critics". Why review films which obviously don't appeal to your sensibilities? Get another critic who appreciates certain aspects of that genre to check it out instead. Phew! Okay...rant over. And oh yeah, the critic in question gave this film a "D". Duh! Didn't see that one comin'.
 The older brother basically has 24 hours to steal 50 specific high-priced automobiles or his little brother bites the dust. Simple enough?
CRITIQUE: A below-par Bruckheimer film which does satisfy with a couple of cool chase scenes, a semi-interesting tale and car-stealing scenarios, but ultimately doesn't blow you away with anything. I enjoyed this film because it looked cool, the people in it were acting cool and all of the cars in it screamed cool, but I can't honestly say that it was a good movie. I was never bored during the film, but other than the last 30 minutes or so, I kept wondering where all the action was. Just like every other Bruckheimer machismo guy flick, there is always the prerequisite situation (I like to call it the "A-Team scene") featuring the rounding up of a certain motley crew of gruffy, down-and-out and badass MoFos, and the mobilization of the master plan. Generally, this part only lasts a few minutes and we move on to a whole lot of wham-bang-and-thank-you-ma'ams, but this film decided to spend a lot more time on the set-up. Perhaps it was supposed to develop the characters somehow, but despite the story being absorbing to a certain extent, I did keep wondering when all the action was gonna take place, especially when the holes started showing up in the plot.
And when they finally did begin stealing the cars, I was doubly surprised at how little resistance (read action/fun blow 'em ups) there was as well. I don't know, maybe I just expected too much popcorn for my buck, but despite the film coming through as a whole, it did disappoint as an all-out nacho flick. Cage was Cage once more, the staple hip, tough guy with a heart, while the rest of the crew was a well-rounded bunch this time around. Lindo was cool, Duvall is always fun to watch, Vinnie Jones is just waiting to be discovered as the next action-hero superstar and Ribisi, well, I'll admit that he's finally starting to get on my nerves with his down-and-out character portrayals. I was also a little disappointed with the one-liners in this film, which seemed a little weak this time around.  And oh yeah...Angelina Jolie is barely in it!
At this point, I think everyone knows what a "Bruckheimer movie" is, so please don't go into this movie expecting anything more than that. With that in mind, you might just enjoy yourself.
Review Date: June 24, 2000 Director: Dominic Sena Writer: Scott Rosenberg Producers: Jerry Bruckheimer and Mike Stenson Actors: Nicolas Cage as Randall Raines Giovanni Ribisi as Kip Raines Delroy Lindo as Dt. Roland Castlebeck Robert Duvall as Otto Halliwell Genre: Action Year of Release: 2000 ------------------------------------ JoBlo's Movie Emporium http://www.joblo.com/ ------------------------------------ (c) 2000 Berge Garabedian
The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews


We know you like a good story about Xavier. And we here at Xavier love to tell them.
Like many other universities as well as other entities across the country, we at Xavier are committing to utilize a variety of communication channels to disseminate great Xavier stories. Gone are the days of having to wait for a Magazine, where everything is read in one place, at one time.
Today, with the popularity of social media, video storytelling and our website, we have learned just how you're reading our content — and because of that knowledge, we are delivering stories to you in an easier and more timely way.
That said, who doesn't like to get some Xavier stories in the mail too? Stay tuned for some exciting and new items in your mailbox that will allow you to hear even more about what's happening at X. One should be coming soon.
Make sure you are ready for stories on all Xavier channels:
• Do you get the Alumni E-Newsletter? Make sure we have your current contact info.
• Do you follow us on social media?
• Have you heard about our new Xavier Storytellers web page?
• Did you know all of your Class Notes and Alumni events can be found online?
Get more of the Xavier stories you love. Everyday. Lets' Go X!


|
jubilant-funicular
|
One thread available to the pool. More...
Public Attributes | |
| std::thread | t |
| The thread owned by the worker. | |
| Thunk | thunk |
| The function the worker is currently scheduled to execute. | |
| std::atomic< bool > | free |
| Whether or not the worker is free to take on a new function. | |
| Semaphore | task |
One thread available to the pool.
Definition at line 38 of file ThreadPool.h.


Suggest a topic in 4 steps
When proposing a new discussion topic, make sure to search first if the topic has not been discussed yet. It is also important that the discussion topic does not address a specific matter, for example "The lack of choice with food delivery services", but instead relates to a larger issue that can be addressed in various ways, for example "The quality and variety of food delivered at home".
Required fields


Who We Are
FireHound is a Custom ROM developed with a major focus on system stability and useful features. All this without compromising on the pure Android experience.
Up-to-date Security Patches
We merge latest android revisions as soon as Google releases them and we are satisfied that they do not cause unstability
Ashes
The core customization's hub written from scratch built-in to the the Settings app to provide you with a range of customizations
Essentials
Our default app written from scratch used for Over-The-Air updates and applying our Wallpapers
Bloat Free
We have removed the excess un-needed heavy apps and replaced some with a lighter version to provide a lag free experience
Open Source
Every part of our project is Open Source and can be found on the Github organization.
Smoothness
The ROM is tweaked and optimized to provide you with a smooth and lag free experience


Chocolate cake
Toast slices
Sweet donut
Ready to baking
Feedback
Site map
Source log
Gally
Canberra’s dessert
How to


Come Meet the team
Here are the brains behind the MentorMe app
Alex King
Back End Engineer
Hunter Smith
Project Lead / Engineer
Taylor Blount
Front End Engineer
Turcan Vladimir
Front End Engineer
Yi Lun Weng
UI Developer
Here are the brains behind the MentorMe app
Back End Engineer
Project Lead / Engineer
Front End Engineer
Front End Engineer
UI Developer


TI-82 Link Protocol Guide v1.0 - File formats
The TI-82 Graph Link software stores variables in several types of files. Single variables are stored in files that have an extension that corresponds with their type. Groups of variables are stored in files with the extension ".82g". However, all of these file types have a common format.
The different file types and contents that the TI-82 Graph Link software can read and write are shown below.
| Extension | Description |
|---|---|
|
.82b |
TI-82 system backup |
|
.82d |
TI-82 GDB (function, polar, parametric or sequence) |
|
.82g |
Multiple TI-82 variables of varying types (group) |
|
.82i |
TI-82 picture (image) |
|
.82l |
TI-82 list |
|
.82m |
TI-82 matrix |
|
.82n |
TI-82 real number |
|
.82p |
TI-82 program |
|
.82t |
TI-82 table setup |
|
.82w |
TI-82 window settings (Window or RclWindow) |
|
.82y |
TI-82 Y-Variable (equation) |
|
.82z |
TI-82 zoom (saved window settings) |
The TI-82 variable file format has two parts: a header and several variable entries.
The header appears at the beginning of the file and takes the following format:
Note - All 2-byte integers are stored little-endian Intel-style (least significant byte first).
| Offset | Length | Description |
|---|---|---|
| 0 | 8 bytes | 8-character signature. The signature is always "**TI82**". |
| 8 | 3 bytes | 3-byte further signature. These three bytes always contain {1Ah, 0Ah, 00h} = {26, 10, 0} |
| 11 (Bh) | 42 (2Ah) bytes | Comment. The comment is either zero-terminated or padded on the right with space characters. |
| 53 (35h) | 2 bytes | Length, in bytes, of the data section of the file. This number should be 57 (39h) bytes less than the file size. |
| 55 (37h) | n bytes | Data section - consists of a number of variable entries (described below). |
| 55 (37h)+n | 2 bytes | File checksum. This is the lower 16 bits of the sum of all bytes in the data section. |
Each variable entry follows this format:
| Offset | Length | Description |
|---|---|---|
| 0 | 2 bytes | Always has a value of 11 (Bh). |
| 2 | 2 bytes | Length, in bytes, of the variable data. |
| 4 | 1 byte | variable type ID byte (see variable type ID's) |
| 5 | 8 bytes | Variable name, padded with NULL characters (0h) on the right. |
| 13 (Dh) | 2 bytes | Length, in bytes, of the variable data. (This is a copy of the value in offset 2) |
| 15 (Fh) | n bytes | Variable data. Click here for variable data formats. |
Most link programs allow a user to download and save system backups with the extension ".82b".
Here is the format for backup files:
| Offset | Length | Description |
|---|---|---|
| 0 | 8 bytes | 8-character signature. The signature is always "**TI82**". |
| 8 | 3 bytes | 3-byte further signature. These three bytes always contain {1Ah, 0Ah, 00h} = {26, 10, 0} |
| 11 (Bh) | 42 (2Ah) bytes | Comment. The comment is either zero-terminated or padded on the right with space characters. |
| 53 (35h) | 2 bytes | Length, in bytes, of the backup header and the data sections. This number should be 17 (11h) bytes more than the sum of the lengths of the three data sections as reported in the backup header. |
| 55 (37h) | 11 bytes | The backup header (format described below). |
| 66 (42h) | 2 bytes | Length, in bytes, of the first data section. |
| 68 (44h) | x bytes | First data section. |
| 68 (44h)+x | 2 bytes | Length, in bytes, of the second data section |
| 70 (46h)+x | y bytes | Second data section. |
| 70 (46h)+x+y | 2 bytes | Length, in bytes, of the third data section |
| 72 (48h)+x+y | z bytes | Third data section |
| 72 (48h)+x+y+z | 2 bytes | Checksum. This is the lower 16 bits of the sum of all bytes in the backup header and data sections. |
The backup header has this format:
| Offset | Length | Description |
|---|---|---|
| 0 | 2 bytes | Offset to data length: Always has a value of 9. |
| 2 | 2 bytes | Length, in bytes, of the first data section. |
| 4 | 1 byte | Type ID: Always has a value of 15 (Fh). |
| 5 | 2 bytes | Length, in bytes, of the second data section. |
| 7 | 2 bytes | Length, in bytes, of the third data section. |
| 9 | 2 bytes | Memory address of the second data section ? |


---
layout: default
title: Django guide
description:
---
This is a collection of guides documenting common activities
while developing django applications.
We are using our Django project template for bootstrapping a new django application.
In the template there is a script Before starting the bootstrap.sh script you need to configure your GITHUB_TOKEN, CIRCLE_TOKEN and to login to Heroku console.
Export GITHUB_TOKEN and CIRCLE_TOKEN:
Login to Heroku console:
Start bootstrap script:
If you prefer not to set up the delivery pipeline, you can simply prepare the project for development:
Make scripts executable:
Delete bootstrap script:
Add project name to README file, install requirements, migrate db and git init the project:
We use selenium for functional testing.
You just need to download selenium and run it.
Move chromeDriver from download folder to:
To run selenium on windows you need to start it with variable Dwebdriver.chrome.driver wich is pointing to your chromedriver
From pycharm toolbar menu go to:Overview
Bootstrapping
If you have done this before there is a tl:dr version of the instructions for bootstraping and continuous deliver in the README of our template.
Creating new project:
You can create a new project from our template by running this inside a Python 3 virtual environment:
***Change [project_name] with the real project name (do not use special characters)***
$ virtualenv --python=python3 venv
$ . venv/bin/activate
$ pip install Django==1.10
$ venv/bin/django-admin startproject [project_name] \
--template https://github.com/codecentric-labs-zero/django-project-template/archive/master.zip \
--name .flooignore,.gitignore,Procfile,.env \
--extension py,md,txt,sh,ini,yml
Setting up with continuous delivery
bootstrap.sh
that we use to setup continuous delivery on heroku and circleci.
This script will create github project and set it up on heroku and circleci so it is important that you are part of codecentric-labs-zero
organizations on Heroku and GitHub so you would be granted permisions for creating projects and apps.
Please note that this can and should only be done once for a project.
First if necessary, make script executable:
$ chmod u+x bootstrap.sh
$ export GITHUB_TOKEN=[your github token]
$ export CIRCLE_TOKEN=[your circle token]
$ heroku login
$ ./bootstrap.sh
Setting up without continuous delivery
$ chmod u+x manage.py
$ chmod u+x merge-base-ff.sh
$ rm bootstrap.sh
$ echo "# [project name]" > README.md
$ pip install -r requirements.txt
$ ./manage.py migrate
$ py.test
$ git init
$ git commit -am "Initial project setup"
Setup Testing Enviroment
To run our functional tests you need a runing selenium server with chromedriver on your machine.
Install selenium
Download selenium
Download chromeDriver
Run selenium
Run selenium on linux/mac
/usr/local/share/chromedriver
*** you do not have to move it there(you can have it wherever you won't) but if you move it to that specific folder
you won't need to tell selenium where the driver is every time you start it.***
sudo mv -f ~/Downloads/chromedriver /usr/local/share/chromedriver
Make chromeDriver executable
chmod +x ~/usr/local/share/chromedriver
Run selenium
java -jar -Dwebdriver.chrome.driver=/[path to chromedriver]/chromedriver ~/[path to selenium]/selenium-server-standalone.jar
Example:
java -jar -Dwebdriver.chrome.driver=/usr/local/bin/chromedriver ~/Downloads/selenium-server-standalone.jar
If you moved chromdriver to /usr/local/share/
:
java -jar ~/Downloads/selenium-server-standalone.jar
Run selenium on windows
java jar -Dwebdriver.chrome.driver=/[path to chromedriver]/chromedriver ~/[path to selenium]/selenium-server-standalone.jar
Example:
java -jar -Dwebdriver.chrome.driver=/Downloads/chromedriver.exe ~/Downloads/selenium-server-standalone.jar
Running tests from pycharm
DJANGO_SECRET_KEY=whatevervalue
SELENIUM_URI=http://localhost:4444/wd/hub
. venv/bin/activate
$ export DJANGO_SECRET_KEY=whatevervalue
$ export SELENIUM_URI=http://localhost:4444/wd/hub
$ py.test
For django app monitoring we are using New Relic,
which is now included into Django app template.
Steps for setting up New Relic on application that is deployed to Heroku are:
heroku --app appName addons:create newrelic:$planlevel
heroku --app appName config:set NEW_RELIC_APP_NAME='Your Application Name'
newrelic==n.n.n.n
web: newrelic-admin run-program gunicorn mysite.wsgi
heroku --app appName env | grep NEW_RELIC


The target database to write to.
Writing to InfluxDB is disabled unless both an InfluxDB URL and InfluxDB Database are specified.


| 961 | (A) | For als foule es the freke at the ferrere Ende |
| 966 | (C) | For also fer forth is he . at þe ferther ende |
| (D) | ---- no text ---- | |
| (E) | ---- no text ---- | |
| 8 | (Ex) | For as Ferre ys the F. . . |
| 986 | (L) | for as fers is þe freke atte ferre ende |
| 901 | (P) | For als faye es þe freke at þe fyre ende |
| (U) | ---- no text ---- | |
| 26 | (V) | For as ferfurthe is þe freek . at þe fire ende |


a simplified von Neumann computer
reset
interrupt
boot
mem addr:value (hex)
hex output
sim delay
program counter
instruction register
register
memory


posted on march 28, 2013
All the Lorem Ipsum generators on the Internet tend to repeat predefined chunks as necessary, making this the first true generator on the Internet. It uses a dictionary of over 200 Latin words, combined with a handful of model sentence structures, to generate Lorem Ipsum which looks reasonable. There are many variations of passages of Lorem Ipsum available, but the majority have suffered alteration in some form, by injected humour, or randomised words which don't look even slightly believable. If you are going to use a passage of Lorem Ipsum, you need to be sure there isn't anything embarrassing hidden in the middle of text.
Read More
posted on march 3, 2013
All the Lorem Ipsum generators on the Internet tend to repeat predefined chunks as necessary, making this the first true generator on the Internet. It uses a dictionary of over 200 Latin words, combined with a handful of model sentence structures, to generate Lorem Ipsum which looks reasonable. There are many variations of passages of Lorem Ipsum available, but the majority have suffered alteration in some form, by injected humour, or randomised words which don't look even slightly believable. If you are going to use a passage of Lorem Ipsum, you need to be sure there isn't anything embarrassing hidden in the middle of text.
Read More
posted on December 2, 2013
All the Lorem Ipsum generators on the Internet tend to repeat predefined chunks as necessary, making this the first true generator on the Internet. It uses a dictionary of over 200 Latin words, combined with a handful of model sentence structures, to generate Lorem Ipsum which looks reasonable. There are many variations of passages of Lorem Ipsum available, but the majority have suffered alteration in some form, by injected humour, or randomised words which don't look even slightly believable. If you are going to use a passage of Lorem Ipsum, you need to be sure there isn't anything embarrassing hidden in the middle of text.
Read More


so we can do that fast-forwarding thing
$ git fetch upstream
$ git checkout master
$ git merge upstream/master
Updating 34e91da..16c56ad
Fast-forward
README.md | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
$ git push origin/master
spoiler alert: its just .html file hosting
so we can fast-forward (sound familiar?)
we use the exact same workflow to keep in sync
$ git fetch upstream
$ git checkout gh-pages
$ git merge upstream/master
Updating 34e91da..16c56ad
Fast-forward
README.md | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
$ git push upstream/gh-pages
but more caution here, gh-pages is a shared branch upstream
open source?
save forks for later?
commandline?


Name:
Challenge Rating:
Type:
Size Rating: Tiny Small Medium Large Huge Gargantuan
Alignment: Unaligned Lawful Good Lawful Neutral Lawful Evil Neutral Good True Neutral Neutral Evil Chaotic Good Chaotic Neutral Chaotic Evil
Movement Type: Burrow Climb Fly Hover Swim


Working on selection for MTM
We came up on decision for making Camera Dolly after seeing Videos of
Edelkrone
Work Load distribution
Our team was of four members with set of different skills set.
Gautam Prakash |
Ashsih Tiwari |
Avishek Das | Dhruv Saidava (me)
- Design and Tooling : Avishek & Ashish
- Purchase and Electronics : Gautam & Dhruv
Purchase
In Ahmedabad we have industrial market and Gandhinagar near by City is having Electronics based industries from were all material was purchased.


Sign Up
It's free and always will be.
Birthday
Month
Jan
Feb
Mar
Apr
May
Jun
Jul
Aug
Sep
Oct
Nov
Dec
Day
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
Year
2007
2006
2005
2004
2003
2002
2001
2000
1999
1998
1997
1996
1995
1994
1993
1992
1991
1990
Male
Female
By clicking Sign Up, you agree to our Terms and that you have read our Data Use Policy, including our Cookie Use.
Sign Up


Snow storm could slam US east coast
Forecasters say two feet of snow could fall over the weekend in some areas, with Washington to bear the brunt.
There are warnings the blizzard could cause power outages and bring road and air travel to a halt.
light dusting of snow on Wednesday night caused gridlock in Washington, raising fears about what is ahead.
This text has the style applied to it, making it 20pt.
Routine commutes lasted up to three hours and some people abandoned their cars, after an inch fell - a fraction of what is expected on Friday and Saturday.
This text has the font-size and color styles applied to it, making it 20pt and deep sky blue.


|
Smack | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jivesoftware.smack.keepalive.KeepAliveManager
public class KeepAliveManager
Using an implementation of XMPP Ping (XEP-0199). This class provides keepalive functionality with the server that will periodically "ping" the server to maintain and/or verify that the connection still exists.
The ping is done at the application level and is therefore protocol agnostic. It will thus work for both standard TCP connections as well as BOSH or any other transport protocol. It will also work regardless of whether the server supports the Ping extension, since an error response to the ping serves the same purpose as a pong.
| Method Summary | |
|---|---|
void |
addPingFailedListener(PingFailedListener listener)
Add listener for notification when a server ping fails. |
static KeepAliveManager |
getInstanceFor(Connection connection)
Retrieves a KeepAliveManager for the specified Connection , creating one if it doesn't already
exist. |
long |
getPingInterval()
Gets the ping interval. |
long |
getTimeSinceLastContact()
Returns the elapsed time (in milliseconds) since the last successful contact with the server (i.e. |
void |
removePingFailedListener(PingFailedListener listener)
Remove the listener. |
void |
setPingInterval(long newPingInterval)
Sets the ping interval. |
void |
stopPinging()
Stops pinging the server. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static KeepAliveManager getInstanceFor(Connection connection)
KeepAliveManager
for the specified Connection
, creating one if it doesn't already
exist.
connection
- The connection the manager is attached to.
public void setPingInterval(long newPingInterval)
pingInterval
- The new ping time interval in milliseconds.public void stopPinging()
To restart, call setPingInterval(long)
.
public long getPingInterval()
public void addPingFailedListener(PingFailedListener listener)
Please note that this doesn't necessarily mean that the connection is lost, a slow to respond server could also cause a failure due to taking too long to respond and thus causing a reply timeout.
listener
- The listener to be calledpublic void removePingFailedListener(PingFailedListener listener)
listener
- The listener to be removed.public long getTimeSinceLastContact()
Note: Result is -1 if no message has been received since manager was created and 0 if the elapsed time is negative due to a clock reset.
|
Smack | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |


httpfile
httpfile is a class used by the IWebserverPlugin to realize static files. A static file that will be provided by the IWebserverPlugin needs
to converted with the httpfiles tool and added to the project during the building process (have a look to an innovaphone App created from
the template within Visual Studio to see how to implement static files). Each file that will be statically included will be represented by
an httpfile instance and placed inside a btree. So generally there is no need to use the httpfile class "manually".
NOTE: The interface of httpfile is compatible to the innovaphone firmware internals.
File information
Classes
httpfile
class httpfile: public btree {
public:
httpfile(const char * fileName, word /* servlettype unused */, word theFlags, byte * data, size_t dataSize);
~httpfile();
const char * GetFileName() { return fileName; }
const byte * GetData() { return data; }
size_t GetSize() { return dataSize; }
word GetResourceType() { return type; }
word GetFlags() { return flags; }
const char * GetMD5String() { return md5str; }
};
Public functions
httpfile (Constructor)
Parameters
| const char * fileName | The name of the static file including the path to the file a path inside the virtual web directory of an app registered to the webserver (e. G. "/main/index.html") |
| word <unused> | Unused on the AppPlatform side. This parameter only exists for compatibility reasons with other innovaphone projects. Set always to 0. |
| word theFlags | Flags for the file. Currently ond one flag exist (HTTP_GZIP) to declare the file as stored in compressed format. |
| byte * data | Pointer to the data of the file. |
| size_t dataSize | The size of the data. |
Remarks
If the file is compressed, the webserver will handle the necessary header fields need by the browser.
GetFileName
Return Value
Returns the name of the file including the path (like set with the fileName parameter of the constructor).
GetFileName
Return Value
Returns a pointer to the file date.
GetSize
Return Value
Returns the size of the file. If the file is compressed, the file size is in compressed state.
GetResourceType
Return Value
Returns the resource type of the file. That value will send from the webbrowser as content-type header field. The
constructor of httpfile autodetecst the resource type by the file suffix.
GetFlags
Return Value
Returns the flags set for the file. For now, only HTTP_GZIP is supported to indicate, that the file data is in gzip compressed format.
GetMD5String
Return Value
Returns the MD5 checksum of the file date. This value will be calculated by the constructor and used by the IWebserverPlugin / Webserver
as etag to support file caching of the browser.
Static Variables
staticFilesRoot
All httpfile instances are put to the staticFilesRoot btree for fast accessing them when requested. Don't manipulate that btree, it will completly be managed
by the httpfile instances themselfs and accessed by the IWebserverPlugin.


Change Accepted
Auto-Merged
Change Rejected
Metrics Reduction
{{ (item.isPending())? 'Waiting for execution' : 'Executing ...'}}
Complete
to
Failed


23 Sep 2016
- NSX Bytes: vCloud Director cannot deploy NSX Edges -
Link
- NSX Central CLI Update on 6.2.3/6.2.4 -
Link
- NSXv – DFW Log Format Change -
Link
- Orphaned Files Revisited -
Link
- Checking if VCSA migrated from a Windows vCenter Server ? -
Link
- Log Insight 3.6: Content Pack Upgrade Instructions -
Link
Misc
- GraphQL: A query language for your API -
Link
- Visual Studio Code: Troubleshooting PowerShell Extension Issues -
Link
- Scalable Stream Processing: A Survey of Storm, Samza, Spark and Flink -
Link
- There is no REST API -
Link
- HashiConf 2016 Youtube -
Link
- Welcome to Python cheatsheet! -
Link
- httpstat: curl statistics made simple -
Link
16 Sep 2016
- Collect vCloud Director Cell Logs with Log Insight Agent -
Link
- Force HA Failover on NSX Edges -
Link
- NSXv – DFW Log Format Change -
Link
- @DuncanYB’s recommended reads part 5 -
Link
- VMware ESXi Claim Rules unleashed -
Link
- NSX - Custom Regex queries for Log Insight -
Link
- VMware Integrated OpenStack 3.0 Released -
Link
- Automating vCenter Server 5.5 repoint to a new SSO 5.5 -
Link
- vCenter Server Appliance (VCSA) Migration Tool officially GAs w/vSphere 6.0 Update 2m -
Link
- vSphere HTML5 Web Client 2.5 Released -
Link
- ESXi Embedded Host Client 1.9.1 Released -
Link
- Getting started with vCheck -
Link
- Automatically Configuring an F5 BIG-IP Load Balancer for PSC 6.0 HA -
Link
- How VMware Integrated Containers May Introduce Docker to the Enterprise -
Link
- Home Lab Decision Making – NUC and Supermicro -
Link
- vmware/govmomi 1.9 Released - Go library for the VMware vSphere API -
Link
Misc
- Your Life Is Tetris. Stop Playing It Like Chess. -
Link
- 250 GB/day of logs with Graylog: The good, the bad and the ugly -
Link
- How a loud noise brought a data center to its knees -
Link
- Using Vagrant with AWS -
Link
- Announcing Envoy: C++ L7 proxy and communication bus -
Link
- The state of the Octoverse 2016 -
Link
- Kubernetes The Hard Way: Updated for AWS Cloud Platform -
Link
- Technology Short Take #71 -
Link
- Consul 0.7 Released -
Link
- Netmiko: Multi-vendor library to simplify Paramiko SSH connections to network devices -
Link
09 Sep 2016
- PowerCLI Stops Working After NSX 6.2.4 Upgrade -
Link
- PowerNSX – Validating logging status on DFW rules -
Link
- What’s new with vRealize Operations 6.3 -
Link
- Sharing VMworld slides -
Link
- Direct playback & download URLs for all VMworld US 2016 sessions -
Link
- VMworld US 2016 Breakout Sessions -
Link |
Download
- Stickers/Shirts -
Link
- Disable Virtual SAN health check alarms -
Link
- vmware/priam: Go CLI tool for VMware Identity Manager portal -
Link
Misc
- NGINX as a Reverse Proxy for Docker Swarm Clusters -
Link
- Using Vault as a Certificate Authority for Kubernetes -
Link
- Scaleway : pas assez cher mon fils ! [FRENCH] -
Link
- GitHub: Improving collaboration with forks -
Link
- Using Docker Datacenter to launch load test -
Link
- ASP.NET Core continuous deployment with Docker Hub -
Link
- Docker Kata 003: Live debugging -
Link
- Jenkins makes a UX splash with Blue Ocean -
Link
- Docker Datacenter for AWS -
Link
- Docker Service and Swarm Mode to Create Couchbase Cluster -
Link
- Oh shit, git! -
Link
- A space error: $370 million for an integer overflow -
Link
- Outage Post-Mortem for August 22nd -
Link
- InfluxDB 1.0 GA Released: A Retrospective and What’s Next -
Link
- Wireshark 2.2 Released -
Link
- EdgeMAX EdgeRouter software release v1.9.0 -
Link
02 Sep 2016
- vCloud Director – retain IP/Mac -
Link
- VMware NSX-v 6.2.4 Compatible with vCloud Director 8.0.1 & 8.1.0 -
Link
- Reboot All Hosts in vCloud Director - new script provided by one of my readers -
Link
- VMworld 2016: Cross Cloud Platform - Raw Thoughts -
Link
- VMworld 2016: VMware vSphere Integrated Containers Demo -
Link
- VMworld 2016: NET9989 - VMware NSX, Network Bridge to Multi-Cloud Future -
Link
- VMworld 2016: The Power Hour: Deep Dive, DevOps, and New Features of PowerCLI -
Link
- VMworld 2016: Enforcing a vSphere Cluster Design with PowerCLI Automation -
Link
- VMworld 2016: vSphere 6.x Host Resource Deep Dive -
Link
- VMware Cloud Foundation FAQ -
Link
- Introducing VMware Validated Design 3.0 -
Link
- How to install and configure vRealize Network Insight 3.0 -
Link
- An Industry Roadmap: From storage to data management #STO7903 by @xtosk -
Link
- How to Add a Linux Machine as PowerShell Host in vRO (Linux PS over SSH) (SKKB1030) -
Link
- Log Insight 3.6: Official API Documentation! -
Link
- Log Insight 3.6: Syslog Event Forwarder Tags -
Link
- Photon OS with sshfs from source -
Link
- vSphere Integrated Containers – The Next Step -
Link
- Photon Platform Architecture -
Link
- VMware Remote Console 9.0 Released -
Link
- vSphere Integrated Containers v0.5.5 Released + Documentation -
Link 1 |
Link 2
- vSphere HTML5 Web Client 2.3 Released -
Link
- VMware Admiral: Highly Scalable Container Management Platform -
Link
- PowerNSX v2 Released -
Link
- vmxtoolkit: Powershell extension to VMware Workstation -
Link
- Vester: Easily validate and remediate your vSphere configuration -
Link
- Add RPM builder for VMware Photon OS #24116 = Official Docker 1.13+ RPMS for Photon OS -
Link
Misc
- A Docker Fork: Talk of a Split Is Now on the Table -
Link
- 2 weeks with Terraform -
Link
- DevOps vs SRE: Delayed coverage of the dumbest War -
Link
- Ansible Best Practices: The Essentials -
Link
- So a product manager asks you to fix a bug… -
Link
- Why is stretched ACI infinitvely better than OTV ? -
Link
- Beta News – Flash Player NPAPI for Linux -
Link
- 400,000 GitHub repositories, 1 billion files, 14 terabytes of code: Spaces or Tabs? -
Link
- New CentOS Atomic Host with Package Layering Support -
Link
- Zalando’s Restful API Guidelines -
Link
- 30K Page Views for $0.21: A Serverless Story -
Link
- The Hardest Part About Microservices: Your Data -
Link
- Terraform module for creating Kubernetes cluster running on CoreOS in an AWS VPC -
Link
- Deploy a Kubernetes cluster using Terraform and Ansible on top of CoreOS. -
Link
- kops: the easiest way to get a production Kubernetes up and running -
Link
- Awesome Go Patterns: A curated list of Go patterns and idioms -
Link
- Tipboard - in-house, tasty, local dashboarding system -
Link
- netdata: real-time performance monitoring, now scaled out! -
Link
- Fork: a fast and friendly git client for Mac -
Link
26 Aug 2016
- NUMA Deep Dive Part 5: ESXi VMkernel NUMA Constructs -
Link
- Storage and Availability Technical Documents -
Link
- vRealize Operations 6.3: What’s New, Hint it just got even better -
Link
- NSX for vSphere 6.2.4 Released -
Link
- Testing Distributed Firewall heap usage -
Link
- License NSX via automation with PowerCLI -
Link
- Release: NSX SDN-LAB v3.5 with advanced designs, vRealize Log + Network Insight and more -
Link
- Auto create Nano server for ESXi with Powershell -
Link
- Context, Visibility and Containment – NSX Securing “Anywhere” Part V -
Link
- Micro-segmentation Benchmark – NSX Securing “Anywhere” Part VI -
Link
- Use VMware Perl SDK to manage a vSphere infrastructure -
Link
- Virtual SAN Enterprise Network Design and Implementation with Brocade -
Link
- VSAN SwapThickProvisionDisabled OneLiner -
Link
- Log Insight 3.6: Enhanced Query API -
Link
- vSphere HTML5 Web Client 2.2 Released -
Link
- HCIBench v<IP_ADDRESS> Released -
Link
- rbvmomi 1.9.2 Released (vSphere 6 Support) -
Link
- Harbor 0.3.5 Released -
Link
- vagrant-guests-photon 1.0.4 Released -
Link
Misc
- Easy Conference Tunneling - OSX, Sidestep, and Cloud Servers -
Link
- Ultimate PowerShell Prompt Customization and Git Setup Guide -
Link
- Kubernetes Secret Manager -
Link
- Color Schemes for ConEmu -
Link
- GitLab 8.11 released with Issue Boards and Merge Conflict Resolution -
Link
- I Contributed To An Open-Source Editor, And So Can You -
Link
- @DuncanYB’s recommended reads part 4 -
Link
19 Aug 2016
- Custom Pattern as a Classification Value on NSX Data Security Regulation -
Link
- Quick Tip – How to retrieve the ESXi Update Level using the vSphere API? -
Link
- Automate vRealize Orchestrator with PowerShell: Introducing PowervRO -
Link
- Intel Xeon D-1518 (X10SDV-4C-7TP4F) ESXi & Storage server build notes -
Link
- vSphere HTML5 Web Client 2.1 Released -
Link
- VMFork for pyVmomi v1.0.2 Released -
Link
- VMware VSAN 6.2 All-Flash Review -
Link
Misc
- Microsoft open sources PowerShell, brings it to Linux and OS X -
Link
- Solving the routing mess for services using Docker -
Link
- Simpler GitHub Pages publishing -
Link
- Kubernetes Namespaces: use cases and insights -
Link
12 Aug 2016
- PowerCLI Script to calculate VSAN vCAN Points per Month -
Link
- How to Increase VCSA External PSC Disk Space in vSphere 6 -
Link
- Working with maintenance mode in vROPS via PowerCLI -
Link
- Homelab: CloudFlare dynamic dns update script (cf-ddns.sh) -
Link
- VMware Horizon Client (PCoIP & Blast) Connection Workflow -
Link
- Operationalize SDDC program -
Link
- VSAN Upgrades–NVMe & SATADOM -
Link
- ACI Automation Deep Dive - Part 1 -
Link
- Supermicro X10SDV-4C-7TP4F server Bill-of-Materials -
Link
- vSphere HTML5 Web Client 2.0 Released -
Link
Misc
- Microservices - Not A Free Lunch! -
Link
- Distributed Logging Architecture in the Container Era -
Link
- Facebook moving to JBOF (just a bunch of flash) -
Link
- Watchtower: Automatic Updates for Docker Containers -
Link
- How Containers, Microservices and AI Will Lead to the Operatorless Data Center -
Link
- 15 Things You Should Know About Ansible -
Link
- Ensuring a Command Module Task is Repeatable with Ansible -
Link
- The missing piece in containers: storage! -
Link
- TNS Research: A Scan of the Container Vulnerability Scanner Landscape -
Link
- Microservices: Real Architectural Patterns -
Link
- Samsung Introduces 64-Layer V-NAND & A 32TB SAS SSD -
Link
- The complete guide to Go net/http timeouts -
Link
- Concourse CI: CI that scales with your project -
Link
- GoConvey: Write behavioral tests in your editor. Get live results in your browser -
Link
- Go’s march to low-latency GC -
Link
- Kafka in a Nutshell -
Link
- Go Walkthrough: bytes + strings packages -
Link
- Like on Git: Chrome extension to save links on your Github repository -
Link
- Paw: The most advanced API tool for Mac (3.0 Free Upgrade for 2.x users) -
Link
- jq: A lightweight and flexible command-line JSON processor -
Link
05 Aug 2016
- Inspect your network with vRealize Network Insight (vRNI) -
Link
- How to correctly test the performance of Virtual SAN 6.2 deduplication feature -
Link
- vSphere HTML5 Web Client 1.17 Released -
Link
- ESXi Embedded Host Client v1.7.1 Released -
Link
- Common OVF Tool v1.7.0 Released -
Link
Misc
- Inside the mind of a master procrastinator -
Link
- Nobody Cares How Hard You Work -
Link
- The Human Cost of Tech Debt -
Link
- Designing Modern Teams -
Link
- Standing on Distributed Shoulders of Giants -
Link
- The Difference Between “Remote” and “Remote-First” -
Link
- I Love Go; I Hate Go -
Link
- Hard Drive Stats for Q2 2016 -
Link
- Adding Hyper-V support to 2016 TP5 Docker VM -
Link
- Kubeform: Kubernetes Clusters in any Cloud -
Link
- Introducing Winston - Event driven Diagnostic and Remediation Platform -
Link
- IDEs are Moving to the Cloud -
Link
- Using A Static Site Generator At Scale: Lessons Learned -
Link
- Google and Facebook share proposed new Open Rack Standard with 48-volt power architecture -
Link
- Docker image with StatsD, Graphite, Grafana 2 and a Kamon Dashboard -
Link
- Building Docker 1.12 on a Raspberry Pi -
Link
- Approaching Graphite 1.0 -
Link
- Minio Cloud Storage -
Link
- Terraform 0.7
Link
- Free Network Diagnostic Tool - mylg v0.2.1 released -
Link
- Visual Studio Code 1.4 Released (Powershell Fixes) -
Link
29 Jul 2016
- vCloud Director Object Extensibility -
Video
- VSAN Healthcheck: Read Cache Reservations test failed -
Link
- Quick Tip – How to disable the landing page for vCenter Server 5.x & 6.x? -
Link
- Automating the import of vCenter Server 6.x root certificate -
Link
- VSAN: Upgrading from 6.1 to 6.2 Hybrid to All Flash - Part 3 -
Link
- VMFS Unmap switches block count -
Link
- Using vSphere docker volume driver to run Project Harbor on VSAN -
Link
- NSX-V SpoofGuard via API -
Link
- VSAN Management API Cookbook for Python -
Link
- NSX-V: Multi-site Options and Cross-VC NSX Design Guide -
Link
- Performance Degradation of Hybrid disk groups on VSAN 6.2 Deployments (2146267) -
Link
- vCloud Availability for vCloud Director 1.0 Released -
Link
- vSphere HTML5 Web Client 1.16 Released -
Link
- ESXi Embedded Host Client v1.7.0 Released -
Link
- VMware Remote Console 8.1 Released -
Link
- New Fling: VMFork for pyVmomi Released -
Link
- nsxramlclient 2.0.1 Released -
Link
- PyNSXv 0.4 Released -
Link
- fog-vsphere 1.0 Released - The Ruby cloud services library -
Link |
Doc
- PSDeploy-vSphereOVF-Recipes -
Link
Misc
- The Biggest Tech Innovation That You Never Notice -
Link
- Diversity is a broken product in tech. FIX IT. -
Link
- The Uber Engineering Tech Stack, Part 1: The Foundation -
Link
- The Uber Engineering Tech Stack, Part 2: The Edge and Beyond -
Link
- Why Uber Engineering switched from Postgres to MySQL -
Link
- High frequency security bug hunting: 120 days, 120 bugs -
Link
- Your Slides DO Matter -
Link
- How to make a Slack bot speak Kubernetes -
Link
- The End of Gmane? -
Link
- Asciinema: 1.3 aka “And Now for Something Completely Different” -
Link
- The Black Magic Of SSH / SSH Can Do That? -
Video
- Building High Scalable v6 Only Cloud Hosting -
Link
- Monospace Font Favorites -
Link
- Why You Should Never Use MongoDB
Link 1 |
Link 2
- On Orchestrated Microservices -
Link
- Docker Swarm - An Analysis Of A Very-Large-Scale Container System -
Link
- Work/Life Balance: My Impossible Reality -
Link
22 Jul 2016
- vCloud Architecture Toolkit -
Link
- Gathering Health Status of vCloud Director Edge Gateways -
Link
- VMware Validated Design for SDDC 2.0 – Now Available -
Link
- VMware Validated Design for Software-Defined Data Center 2.0 Poster -
Link
- Remotely query an ESXi host without adding it to vCenter Server -
Link
- How to easily disable vMotion & Cross vCenter vMotion for a particular Virtual Machine? -
Link
- vRops Backup done right -
Link
- VSAN: Upgrading from 6.1 to 6.2 Hybrid to All Flash - Part 1 -
Link
- VSAN: Upgrading from 6.1 to 6.2 Hybrid to All Flash - Part 2 -
Link
- Getting started with vSphere Integrated Containers (short video) -
Link
- Deploy Mesos on Photon Controller (video) -
Link
- Container Networks in VIC v0.4.0 -
Link
- Playing around with Tintri Global Center and Tintri storage systems -
Link
- @DuncanYB’s recommended reads part 2 -
Link
- DFW rules using SG not correctly being applied to VMs after NSX 6.2.3 install or upgrade -
Link
- NSX API call flowstats badly documented /app required -
Link
- vSphere HTML5 Web Client 1.15 -
Link
- VMware Harbor 0.3.0 Released -
Link
- pyvcloud v16 released: Python SDK for VMware vCloud Director -
Link
- vca-cli v17 released: Command Line Interface for VMware vCloud Director -
Link
Misc
- Avoiding Scope Creep -
Link
- Random Acts of Optimization -
Link
- SuperRoot: Launching a High-SLA Production Service at Twitter -
Link
- WTF is Operations ? #Serverless -
Link
- an HAProxy, segfaulted, choose-your-own stack frame adventure -
Link
- Solving the stateful service problem in container orchestration -
Link
- DevOps Bookmarks -
Link
- POSHOrigin - #Powershell #VMware #DSC series -
Link
- Building a Simple Release Pipeline in PowerShell Using psake, Pester, and PSDeploy -
Link
- vimgifs -
Link
- snap: A powerful open telemetry framework -
Link
- A tcpdump Primer with Examples -
Link
- perf-tooling.today: Performance related articles -
Link
- Stack Overflow: Docker documentation snippets -
Link
- A beautiful Slack command line interface (CLI -> uses 20mb memory) -
Link
- Windows File System Proxy - FUSE for Windows -
Link
- Kubernetes Certificate Manager -
Link
- Kubernetes 1.3.3 Released -
Link
- Vagrant 1.8.5 Released -
Link
- Scott’s Technology Short Take #69 -
Link


#-----------------------------------------------------------------------------
# Copyright (c) 2012 - 2018, Anaconda, Inc. All rights reserved.
#
# Powered by the Bokeh Development Team.
#
# The full license is in the file LICENSE.txt, distributed with this software.
#-----------------------------------------------------------------------------
''' Provide Python descriptors for delegating to Bokeh properties.
The Python `descriptor protocol`_ allows fine-grained control over all
attribute access on instances ("You control the dot"). Bokeh uses the
descriptor protocol to provide easy-to-use, declarative, type-based
class properties that can automatically validate and serialize their
values, as well as help provide sophisticated documentation.
A Bokeh property really consist of two parts: a familiar "property"
portion, such as ``Int``, ``String``, etc., as well as an associated
Python descriptor that delegates attribute access to the property instance.
For example, a very simplified definition of a range-like object might
be:
.. code-block:: python
from bokeh.model import Model
from bokeh.core.properties import Float
class Range(Model):
start = Float(help="start point")
end = Float(help="end point")
When this class is created, the ``MetaHasProps`` metaclass wires up both
the ``start`` and ``end`` attributes to a ``Float`` property. Then, when
a user accesses those attributes, the descriptor delegates all get and
set operations to the ``Float`` property.
.. code-block:: python
rng = Range()
# The descriptor __set__ method delegates to Float, which can validate
# the value 10.3 as a valid floating point value
rng.start = 10.3
# But can raise a validation exception if an attempt to set to a list
# is made
rng.end = [1,2,3] # ValueError !
More sophisticated properties such as ``DataSpec`` and its subclasses can
exert control over how values are serialized. Consider this example with
the ``Circle`` glyph and its ``x`` attribute that is a ``NumberSpec``:
.. code-block:: python
from bokeh.models import Circle
c = Circle()
c.x = 10 # serializes to {'value': 10}
c.x = 'foo' # serializes to {'field': 'foo'}
There are many other examples like this throughout Bokeh. In this way users
may operate simply and naturally, and not be concerned with the low-level
details around validation, serialization, and documentation.
This module provides the class |PropertyDescriptor| and various subclasses
that can be used to attach Bokeh properties to Bokeh models.
.. note::
These classes form part of the very low-level machinery that implements
the Bokeh model and property system. It is unlikely that any of these
classes or their methods will be applicable to any standard usage or to
anyone who is not directly developing on Bokeh's own infrastructure.
.. _descriptor protocol: https://docs.python.org/3/howto/descriptor.html
'''
#-----------------------------------------------------------------------------
# Boilerplate
#-----------------------------------------------------------------------------
from __future__ import absolute_import, division, print_function, unicode_literals
import logging
log = logging.getLogger(__name__)
#-----------------------------------------------------------------------------
# Imports
#-----------------------------------------------------------------------------
# Standard library imports
from copy import copy
# External imports
from six import string_types
# Bokeh imports
from .wrappers import PropertyValueContainer
#-----------------------------------------------------------------------------
# Globals and constants
#-----------------------------------------------------------------------------
__all__ = (
'BasicPropertyDescriptor',
'ColumnDataPropertyDescriptor',
'DataSpecPropertyDescriptor',
'PropertyDescriptor',
'UnitsSpecPropertyDescriptor',
)
#-----------------------------------------------------------------------------
# General API
#-----------------------------------------------------------------------------
#-----------------------------------------------------------------------------
# Dev API
#-----------------------------------------------------------------------------
[docs]class PropertyDescriptor(object):
''' Base class for a python descriptor that delegates access for a named
attribute to a Bokeh |Property| instance.
'''
[docs] def __init__(self, name):
''' Create a descriptor for a hooking up a named Bokeh property
as an attribute on a |HasProps| class.
Args:
name (str) : the attribute name that this descriptor is for
'''
self.name = name
[docs] def __str__(self):
''' Basic string representation of ``PropertyDescriptor``.
**Subclasses must implement this to serve their specific needs.**
'''
return "PropertyDescriptor(%s)" % (self.name)
[docs] def __get__(self, obj, owner):
''' Implement the getter for the Python `descriptor protocol`_.
Args:
obj (HasProps or None) :
The instance to set a new property value on (for instance
attribute access), or None (for class attribute access)
owner (obj) :
The new value to set the property to
Returns:
None
Raises:
NotImplementedError
**Subclasses must implement this to serve their specific needs.**
'''
raise NotImplementedError("Implement __get__")
[docs] def __set__(self, obj, value, setter=None):
''' Implement the setter for the Python `descriptor protocol`_.
.. note::
An optional argument ``setter`` has been added to the standard
setter arguments. When needed, this value should be provided by
explicitly invoking ``__set__``. See below for more information.
Args:
obj (HasProps) :
The instance to set a new property value on
value (obj) :
The new value to set the property to
setter (ClientSession or ServerSession or None, optional) :
This is used to prevent "boomerang" updates to Bokeh apps.
(default: None)
In the context of a Bokeh server application, incoming updates
to properties will be annotated with the session that is
doing the updating. This value is propagated through any
subsequent change notifications that the update triggers.
The session can compare the event setter to itself, and
suppress any updates that originate from itself.
Returns:
None
Raises:
NotImplementedError
**Subclasses must implement this to serve their specific needs.**
'''
raise NotImplementedError("Implement __set__")
[docs] def __delete__(self, obj):
''' Implement the deleter for the Python `descriptor protocol`_.
Args:
obj (HasProps) : An instance to delete this property from
Raises:
NotImplementedError
**Subclasses must implement this to serve their specific needs.**
'''
raise NotImplementedError("Implement __delete__")
# This would probably be cleaner with some form of multiple dispatch
# on (descriptor, property). Currently this method has to know about
# various other classes, and that is annoying.
[docs] def add_prop_descriptor_to_class(self, class_name, new_class_attrs, names_with_refs, container_names, dataspecs):
''' ``MetaHasProps`` calls this during class creation as it iterates
over properties to add, to update its registry of new properties.
The parameters passed in are mutable and this function is expected to
update them accordingly.
Args:
class_name (str) :
name of the class this descriptor is added to
new_class_attrs(dict[str, PropertyDescriptor]) :
mapping of attribute names to PropertyDescriptor that this
function will update
names_with_refs (set[str]) :
set of all property names for properties that also have
references, that this function will update
container_names (set[str]) :
set of all property names for properties that are
container props, that this function will update
dataspecs(dict[str, PropertyDescriptor]) :
mapping of attribute names to PropertyDescriptor for DataSpec
properties that this function will update
Return:
None
'''
from .bases import ContainerProperty
from .dataspec import DataSpec
name = self.name
if name in new_class_attrs:
raise RuntimeError("Two property generators both created %s.%s" % (class_name, name))
new_class_attrs[name] = self
if self.has_ref:
names_with_refs.add(name)
if isinstance(self, BasicPropertyDescriptor):
if isinstance(self.property, ContainerProperty):
container_names.add(name)
if isinstance(self.property, DataSpec):
dataspecs[name] = self
[docs] def class_default(self, cls):
''' The default as computed for a certain class, ignoring any
per-instance theming.
Raises:
NotImplementedError
**Subclasses must implement this to serve their specific needs.**
'''
raise NotImplementedError("Implement class_default()")
[docs] def serializable_value(self, obj):
''' Produce the value as it should be serialized.
Sometimes it is desirable for the serialized value to differ from
the ``__get__`` in order for the ``__get__`` value to appear simpler
for user or developer convenience.
Args:
obj (HasProps) : the object to get the serialized attribute for
Returns:
JSON-like
'''
value = self.__get__(obj, obj.__class__)
return self.property.serialize_value(value)
[docs] def set_from_json(self, obj, json, models=None, setter=None):
'''Sets the value of this property from a JSON value.
Args:
obj: (HasProps) : instance to set the property value on
json: (JSON-value) : value to set to the attribute to
models (dict or None, optional) :
Mapping of model ids to models (default: None)
This is needed in cases where the attributes to update also
have values that have references.
setter (ClientSession or ServerSession or None, optional) :
This is used to prevent "boomerang" updates to Bokeh apps.
(default: None)
In the context of a Bokeh server application, incoming updates
to properties will be annotated with the session that is
doing the updating. This value is propagated through any
subsequent change notifications that the update triggers.
The session can compare the event setter to itself, and
suppress any updates that originate from itself.
Returns:
None
'''
self._internal_set(obj, json, setter=setter)
[docs] def trigger_if_changed(self, obj, old):
''' Send a change event notification if the property is set to a
value is not equal to ``old``.
Args:
obj (HasProps)
The object the property is being set on.
old (obj) :
The previous value of the property to compare
Raises:
NotImplementedError
**Subclasses must implement this to serve their specific needs.**
'''
raise NotImplementedError("Implement trigger_if_changed()")
@property
def has_ref(self):
''' Whether the property can refer to another ``HasProps`` instance.
This is typically True for container properties, ``Instance``, etc.
Raises:
NotImplementedError
**Subclasses must implement this to serve their specific needs.**
'''
raise NotImplementedError("Implement has_ref()")
@property
def readonly(self):
''' Whether this property is read-only.
Read-only properties may only be modified by the client (i.e., by
BokehJS, in the browser). Read only properties are useful for
quantities that originate or that can only be computed in the
browser, for instance the "inner" plot dimension of a plot area,
which depend on the current layout state. It is useful for Python
callbacks to be able to know these values, but they can only be
computed in the actual browser.
Raises:
NotImplementedError
**Subclasses must implement this to serve their specific needs.**
'''
raise NotImplementedError("Implement readonly()")
@property
def serialized(self):
''' Whether the property should be serialized when serializing
an object.
This would be False for a "virtual" or "convenience" property that
duplicates information already available in other properties, for
example.
Raises:
NotImplementedError
**Subclasses must implement this to serve their specific needs.**
'''
raise NotImplementedError("Implement serialized()")
def _internal_set(self, obj, value, hint=None, setter=None):
''' Internal implementation to set property values, that is used
by __set__, set_from_json, etc.
Args:
obj (HasProps)
The object the property is being set on.
old (obj) :
The previous value of the property to compare
hint (event hint or None, optional)
An optional update event hint, e.g. ``ColumnStreamedEvent``
(default: None)
Update event hints are usually used at times when better
update performance can be obtained by special-casing in
some way (e.g. streaming or patching column data sources)
setter (ClientSession or ServerSession or None, optional) :
This is used to prevent "boomerang" updates to Bokeh apps.
(default: None)
In the context of a Bokeh server application, incoming updates
to properties will be annotated with the session that is
doing the updating. This value is propagated through any
subsequent change notifications that the update triggers.
The session can compare the event setter to itself, and
suppress any updates that originate from itself.
Raises:
NotImplementedError
**Subclasses must implement this to serve their specific needs.**
'''
raise NotImplementedError("Implement _internal_set()")
[docs]class BasicPropertyDescriptor(PropertyDescriptor):
''' A ``PropertyDescriptor`` for basic Bokeh properties (e.g, ``Int``,
``String``, ``Float``, etc.) with simple get/set and serialization
behavior.
'''
[docs] def __init__(self, name, property):
''' Create a PropertyDescriptor for basic Bokeh properties.
Args:
name (str) : The attribute name that this property is for
property (Property) : A basic property to create a descriptor for
'''
super(BasicPropertyDescriptor, self).__init__(name)
self.property = property
self.__doc__ = self.property.__doc__
[docs] def __str__(self):
''' Basic string representation of ``BasicPropertyDescriptor``.
Delegates to ``self.property.__str__``
'''
return "%s" % self.property
[docs] def __get__(self, obj, owner):
''' Implement the getter for the Python `descriptor protocol`_.
For instance attribute access, we delegate to the |Property|. For
class attribute access, we return ourself.
Args:
obj (HasProps or None) :
The instance to set a new property value on (for instance
attribute access), or None (for class attribute access)
owner (obj) :
The new value to set the property to
Returns:
None
Examples:
.. code-block:: python
>>> from bokeh.models import Range1d
>>> r = Range1d(start=10, end=20)
# instance attribute access, returns the property value
>>> r.start
10
# class attribute access, returns the property descriptor
>>> Range1d.start
<bokeh.core.property.descriptors.BasicPropertyDescriptor at 0x1148b3390>
'''
if obj is not None:
return self._get(obj)
elif owner is not None:
return self
else:
# This should really never happen. If it does, it means we've
# called __get__ explicitly but in a bad way.
raise ValueError("both 'obj' and 'owner' are None, don't know what to do")
[docs] def __set__(self, obj, value, setter=None):
''' Implement the setter for the Python `descriptor protocol`_.
.. note::
An optional argument ``setter`` has been added to the standard
setter arguments. When needed, this value should be provided by
explicitly invoking ``__set__``. See below for more information.
Args:
obj (HasProps) :
The instance to set a new property value on
value (obj) :
The new value to set the property to
setter (ClientSession or ServerSession or None, optional) :
This is used to prevent "boomerang" updates to Bokeh apps.
(default: None)
In the context of a Bokeh server application, incoming updates
to properties will be annotated with the session that is
doing the updating. This value is propagated through any
subsequent change notifications that the update triggers.
The session can compare the event setter to itself, and
suppress any updates that originate from itself.
Returns:
None
'''
if not hasattr(obj, '_property_values'):
# Initial values should be passed in to __init__, not set directly
raise RuntimeError("Cannot set a property value '%s' on a %s instance before HasProps.__init__" %
(self.name, obj.__class__.__name__))
if self.property._readonly:
raise RuntimeError("%s.%s is a readonly property" % (obj.__class__.__name__, self.name))
self._internal_set(obj, value, setter=setter)
[docs] def __delete__(self, obj):
''' Implement the deleter for the Python `descriptor protocol`_.
Args:
obj (HasProps) : An instance to delete this property from
'''
if self.name in obj._property_values:
old_value = obj._property_values[self.name]
del obj._property_values[self.name]
self.trigger_if_changed(obj, old_value)
if self.name in obj._unstable_default_values:
del obj._unstable_default_values[self.name]
[docs] def class_default(self, cls):
''' Get the default value for a specific subtype of ``HasProps``,
which may not be used for an individual instance.
Args:
cls (class) : The class to get the default value for.
Returns:
object
'''
return self.property.themed_default(cls, self.name, None)
[docs] def instance_default(self, obj):
''' Get the default value that will be used for a specific instance.
Args:
obj (HasProps) : The instance to get the default value for.
Returns:
object
'''
return self.property.themed_default(obj.__class__, self.name, obj.themed_values())
[docs] def set_from_json(self, obj, json, models=None, setter=None):
''' Sets the value of this property from a JSON value.
This method first
Args:
obj (HasProps) :
json (JSON-dict) :
models(seq[Model], optional) :
setter (ClientSession or ServerSession or None, optional) :
This is used to prevent "boomerang" updates to Bokeh apps.
(default: None)
In the context of a Bokeh server application, incoming updates
to properties will be annotated with the session that is
doing the updating. This value is propagated through any
subsequent change notifications that the update triggers.
The session can compare the event setter to itself, and
suppress any updates that originate from itself.
Returns:
None
'''
return super(BasicPropertyDescriptor, self).set_from_json(obj,
self.property.from_json(json, models),
models, setter)
[docs] def trigger_if_changed(self, obj, old):
''' Send a change event notification if the property is set to a
value is not equal to ``old``.
Args:
obj (HasProps)
The object the property is being set on.
old (obj) :
The previous value of the property to compare
Returns:
None
'''
new_value = self.__get__(obj, obj.__class__)
if not self.property.matches(old, new_value):
self._trigger(obj, old, new_value)
@property
def has_ref(self):
''' Whether the property can refer to another ``HasProps`` instance.
For basic properties, delegate to the ``has_ref`` attribute on the
|Property|.
'''
return self.property.has_ref
@property
def readonly(self):
''' Whether this property is read-only.
Read-only properties may only be modified by the client (i.e., by BokehJS
in the browser).
'''
return self.property.readonly
@property
def serialized(self):
''' Whether the property should be serialized when serializing an
object.
This would be False for a "virtual" or "convenience" property that
duplicates information already available in other properties, for
example.
'''
return self.property.serialized
def _get(self, obj):
''' Internal implementation of instance attribute access for the
``BasicPropertyDescriptor`` getter.
If the value has not been explicitly set by a user, return that
value. Otherwise, return the default.
Args:
obj (HasProps) : the instance to get a value of this property for
Returns:
object
Raises:
RuntimeError
If the |HasProps| instance has not yet been initialized, or if
this descriptor is on a class that is not a |HasProps|.
'''
if not hasattr(obj, '_property_values'):
raise RuntimeError("Cannot get a property value '%s' from a %s instance before HasProps.__init__" %
(self.name, obj.__class__.__name__))
if self.name not in obj._property_values:
return self._get_default(obj)
else:
return obj._property_values[self.name]
def _get_default(self, obj):
''' Internal implementation of instance attribute access for default
values.
Handles bookeeping around |PropertyContainer| value, etc.
'''
if self.name in obj._property_values:
# this shouldn't happen because we should have checked before _get_default()
raise RuntimeError("Bokeh internal error, does not handle the case of self.name already in _property_values")
is_themed = obj.themed_values() is not None and self.name in obj.themed_values()
default = self.instance_default(obj)
if is_themed:
unstable_dict = obj._unstable_themed_values
else:
unstable_dict = obj._unstable_default_values
if self.name in unstable_dict:
return unstable_dict[self.name]
if self.property._may_have_unstable_default():
if isinstance(default, PropertyValueContainer):
default._register_owner(obj, self)
unstable_dict[self.name] = default
return default
def _internal_set(self, obj, value, hint=None, setter=None):
''' Internal implementation to set property values, that is used
by __set__, set_from_json, etc.
Delegate to the |Property| instance to prepare the value appropriately,
then `set.
Args:
obj (HasProps)
The object the property is being set on.
old (obj) :
The previous value of the property to compare
hint (event hint or None, optional)
An optional update event hint, e.g. ``ColumnStreamedEvent``
(default: None)
Update event hints are usually used at times when better
update performance can be obtained by special-casing in
some way (e.g. streaming or patching column data sources)
setter (ClientSession or ServerSession or None, optional) :
This is used to prevent "boomerang" updates to Bokeh apps.
(default: None)
In the context of a Bokeh server application, incoming updates
to properties will be annotated with the session that is
doing the updating. This value is propagated through any
subsequent change notifications that the update triggers.
The session can compare the event setter to itself, and
suppress any updates that originate from itself.
Returns:
None
'''
value = self.property.prepare_value(obj, self.name, value)
old = self.__get__(obj, obj.__class__)
self._real_set(obj, old, value, hint=hint, setter=setter)
def _real_set(self, obj, old, value, hint=None, setter=None):
''' Internal implementation helper to set property values.
This function handles bookkeeping around noting whether values have
been explicitly set, etc.
Args:
obj (HasProps)
The object the property is being set on.
old (obj) :
The previous value of the property to compare
hint (event hint or None, optional)
An optional update event hint, e.g. ``ColumnStreamedEvent``
(default: None)
Update event hints are usually used at times when better
update performance can be obtained by special-casing in
some way (e.g. streaming or patching column data sources)
setter (ClientSession or ServerSession or None, optional) :
This is used to prevent "boomerang" updates to Bokeh apps.
(default: None)
In the context of a Bokeh server application, incoming updates
to properties will be annotated with the session that is
doing the updating. This value is propagated through any
subsequent change notifications that the update triggers.
The session can compare the event setter to itself, and
suppress any updates that originate from itself.
Returns:
None
'''
# Normally we want a "no-op" if the new value and old value are identical
# but some hinted events are in-place. This check will allow those cases
# to continue on to the notification machinery
if self.property.matches(value, old) and (hint is None):
return
was_set = self.name in obj._property_values
# "old" is the logical old value, but it may not be the actual current
# attribute value if our value was mutated behind our back and we got
# _notify_mutated.
if was_set:
old_attr_value = obj._property_values[self.name]
else:
old_attr_value = old
if old_attr_value is not value:
if isinstance(old_attr_value, PropertyValueContainer):
old_attr_value._unregister_owner(obj, self)
if isinstance(value, PropertyValueContainer):
value._register_owner(obj, self)
if self.name in obj._unstable_themed_values:
del obj._unstable_themed_values[self.name]
if self.name in obj._unstable_default_values:
del obj._unstable_default_values[self.name]
obj._property_values[self.name] = value
# for notification purposes, "old" should be the logical old
self._trigger(obj, old, value, hint=hint, setter=setter)
# called when a container is mutated "behind our back" and
# we detect it with our collection wrappers.
def _notify_mutated(self, obj, old, hint=None):
''' A method to call when a container is mutated "behind our back"
and we detect it with our |PropertyContainer| wrappers.
Args:
obj (HasProps) :
The object who's container value was mutated
old (object) :
The "old" value of the container
In this case, somewhat weirdly, ``old`` is a copy and the
new value should already be set unless we change it due to
validation.
hint (event hint or None, optional)
An optional update event hint, e.g. ``ColumnStreamedEvent``
(default: None)
Update event hints are usually used at times when better
update performance can be obtained by special-casing in
some way (e.g. streaming or patching column data sources)
Returns:
None
'''
value = self.__get__(obj, obj.__class__)
# re-validate because the contents of 'old' have changed,
# in some cases this could give us a new object for the value
value = self.property.prepare_value(obj, self.name, value)
self._real_set(obj, old, value, hint=hint)
def _trigger(self, obj, old, value, hint=None, setter=None):
''' Unconditionally send a change event notification for the property.
Args:
obj (HasProps)
The object the property is being set on.
old (obj) :
The previous value of the property
new (obj) :
The new value of the property
hint (event hint or None, optional)
An optional update event hint, e.g. ``ColumnStreamedEvent``
(default: None)
Update event hints are usually used at times when better
update performance can be obtained by special-casing in
some way (e.g. streaming or patching column data sources)
setter (ClientSession or ServerSession or None, optional) :
This is used to prevent "boomerang" updates to Bokeh apps.
(default: None)
In the context of a Bokeh server application, incoming updates
to properties will be annotated with the session that is
doing the updating. This value is propagated through any
subsequent change notifications that the update triggers.
The session can compare the event setter to itself, and
suppress any updates that originate from itself.
Returns:
None
'''
if hasattr(obj, 'trigger'):
obj.trigger(self.name, old, value, hint, setter)
[docs]class ColumnDataPropertyDescriptor(BasicPropertyDescriptor):
''' A ``PropertyDescriptor`` specialized to handling ``ColumnData`` properties.
'''
[docs] def __set__(self, obj, value, setter=None):
''' Implement the setter for the Python `descriptor protocol`_.
This method first separately extracts and removes any ``units`` field
in the JSON, and sets the associated units property directly. The
remaining value is then passed to the superclass ``__set__`` to
be handled.
.. note::
An optional argument ``setter`` has been added to the standard
setter arguments. When needed, this value should be provided by
explicitly invoking ``__set__``. See below for more information.
Args:
obj (HasProps) :
The instance to set a new property value on
value (obj) :
The new value to set the property to
setter (ClientSession or ServerSession or None, optional) :
This is used to prevent "boomerang" updates to Bokeh apps.
(default: None)
In the context of a Bokeh server application, incoming updates
to properties will be annotated with the session that is
doing the updating. This value is propagated through any
subsequent change notifications that the update triggers.
The session can compare the event setter to itself, and
suppress any updates that originate from itself.
Returns:
None
'''
if not hasattr(obj, '_property_values'):
# Initial values should be passed in to __init__, not set directly
raise RuntimeError("Cannot set a property value '%s' on a %s instance before HasProps.__init__" %
(self.name, obj.__class__.__name__))
if self.property._readonly:
raise RuntimeError("%s.%s is a readonly property" % (obj.__class__.__name__, self.name))
from ...document.events import ColumnDataChangedEvent
if obj.document:
hint = ColumnDataChangedEvent(obj.document, obj, setter=setter)
else:
hint = None
self._internal_set(obj, value, hint=hint, setter=setter)
[docs]class DataSpecPropertyDescriptor(BasicPropertyDescriptor):
''' A ``PropertyDescriptor`` for Bokeh |DataSpec| properties that serialize to
field/value dictionaries.
'''
[docs] def serializable_value(self, obj):
'''
'''
return self.property.to_serializable(obj, self.name, getattr(obj, self.name))
[docs] def set_from_json(self, obj, json, models=None, setter=None):
''' Sets the value of this property from a JSON value.
This method first
Args:
obj (HasProps) :
json (JSON-dict) :
models(seq[Model], optional) :
setter (ClientSession or ServerSession or None, optional) :
This is used to prevent "boomerang" updates to Bokeh apps.
(default: None)
In the context of a Bokeh server application, incoming updates
to properties will be annotated with the session that is
doing the updating. This value is propagated through any
subsequent change notifications that the update triggers.
The session can compare the event setter to itself, and
suppress any updates that originate from itself.
Returns:
None
'''
if isinstance(json, dict):
# we want to try to keep the "format" of the data spec as string, dict, or number,
# assuming the serialized dict is compatible with that.
old = getattr(obj, self.name)
if old is not None:
try:
self.property._type.validate(old, False)
if 'value' in json:
json = json['value']
except ValueError:
if isinstance(old, string_types) and 'field' in json:
json = json['field']
# leave it as a dict if 'old' was a dict
super(DataSpecPropertyDescriptor, self).set_from_json(obj, json, models, setter)
[docs]class UnitsSpecPropertyDescriptor(DataSpecPropertyDescriptor):
''' A ``PropertyDecscriptor`` for Bokeh |UnitsSpec| properties that contribute
associated ``_units`` properties automatically as a side effect.
'''
[docs] def __init__(self, name, property, units_property):
'''
Args:
name (str) :
The attribute name that this property is for
property (Property) :
A basic property to create a descriptor for
units_property (Property) :
An associated property to hold units information
'''
super(UnitsSpecPropertyDescriptor, self).__init__(name, property)
self.units_prop = units_property
[docs] def __set__(self, obj, value, setter=None):
''' Implement the setter for the Python `descriptor protocol`_.
This method first separately extracts and removes any ``units`` field
in the JSON, and sets the associated units property directly. The
remaining value is then passed to the superclass ``__set__`` to
be handled.
.. note::
An optional argument ``setter`` has been added to the standard
setter arguments. When needed, this value should be provided by
explicitly invoking ``__set__``. See below for more information.
Args:
obj (HasProps) :
The instance to set a new property value on
value (obj) :
The new value to set the property to
setter (ClientSession or ServerSession or None, optional) :
This is used to prevent "boomerang" updates to Bokeh apps.
(default: None)
In the context of a Bokeh server application, incoming updates
to properties will be annotated with the session that is
doing the updating. This value is propagated through any
subsequent change notifications that the update triggers.
The session can compare the event setter to itself, and
suppress any updates that originate from itself.
Returns:
None
'''
value = self._extract_units(obj, value)
super(UnitsSpecPropertyDescriptor, self).__set__(obj, value, setter)
[docs] def set_from_json(self, obj, json, models=None, setter=None):
''' Sets the value of this property from a JSON value.
This method first separately extracts and removes any ``units`` field
in the JSON, and sets the associated units property directly. The
remaining JSON is then passed to the superclass ``set_from_json`` to
be handled.
Args:
obj: (HasProps) : instance to set the property value on
json: (JSON-value) : value to set to the attribute to
models (dict or None, optional) :
Mapping of model ids to models (default: None)
This is needed in cases where the attributes to update also
have values that have references.
setter (ClientSession or ServerSession or None, optional) :
This is used to prevent "boomerang" updates to Bokeh apps.
(default: None)
In the context of a Bokeh server application, incoming updates
to properties will be annotated with the session that is
doing the updating. This value is propagated through any
subsequent change notifications that the update triggers.
The session can compare the event setter to itself, and
suppress any updates that originate from itself.
Returns:
None
'''
json = self._extract_units(obj, json)
super(UnitsSpecPropertyDescriptor, self).set_from_json(obj, json, models, setter)
def _extract_units(self, obj, value):
''' Internal helper for dealing with units associated units properties
when setting values on |UnitsSpec| properties.
When ``value`` is a dict, this function may mutate the value of the
associated units property.
Args:
obj (HasProps) : instance to update units spec property value for
value (obj) : new value to set for the property
Returns:
copy of ``value``, with 'units' key and value removed when
applicable
'''
if isinstance(value, dict):
if 'units' in value:
value = copy(value) # so we can modify it
units = value.pop("units", None)
if units:
self.units_prop.__set__(obj, units)
return value
#-----------------------------------------------------------------------------
# Private API
#-----------------------------------------------------------------------------
#-----------------------------------------------------------------------------
# Code
#-----------------------------------------------------------------------------