Unity / C#
Unity Audio package
Often when working in unity you want have sounds for things like gunshots and footsteps. It is very easy just to slap a audio source component on the object that you want to play the sound and you call the “Play()” function. But this leaves some things to be desired, the same sound over and over again does not sound great so maybe you start to pitch it to add some variation. Later on, you realize you want more than one sound for your footsteps and you add an array of clips. The whole thing gets more and more complex and the simple component you created for just playing some simple footsteps has become a behemoth of a code base. This is where SoundKraft™ comes in, it is made to store all the data regarding the permutations of the sound in a simple to read data asset. Furthermore, it utilizes an object pool to keep the amount of active audio object to an minimum. I this text I will describe how I when about to create this system. If you want to download the source code here is a link to the project on git.
As mention earlier the goal of the structure is to make the use of dynamic SFX as easy as possible and as alive as possible by avoiding repetition of sounds. The data controlling the sounds is stored in the audio object and it is the audio object that is the main interfacing point for the user. But if they want more ingame control they can use the controller, that works a bit like a remote to a audio source that is obtained from the objectpool.
The audio object inherits from scriptable object witch is Unity's default data asset it hold the data regarding the random ranges and values for the sounds. All the user needs to do to play a sound is a reference to this object and they can run the Play method. The audio object object takes care of the selecting of random clips and allocating of audio objects. To avoid the same sound repeating two times I a row I implemented a queuing system whereas in all the clips in the list will be played at least one time before they can be played again. To give the user more control of how the sounds play each audio object can be linked to a unity mixer group, this helps when the user wants to add addition effect to the sound. Furthermore, all the clips are subjected to pitch and volume pitching based on the values setup here in the audio object.
The job of the controller is just that, to control the sounds that are playing. The controller takes care of fading in and out the sounds and returns the audio object to objectpool when the sound is done playing. The controller takes care of the actual setting of the values in the audio source, in many ways the audio controller is the interface for the audio source. The user should never change the actual audio source by them self’s, instead all of that is handled trough the controller. Every time the play function is called from the audio object a instance of the controller is created as a form of remote for the user to access and change sounds on the fly.
public class AudioObject : ScriptableObject { public AudioMixerGroup MixerGroup; public ListClips; [MinMax(0, 1, ShowEditRange = true)] public MathHelper.FloatMinMax Volume = new MathHelper.FloatMinMax(1, 1); [MinMax(0, 3, ShowEditRange = true)] public MathHelper.FloatMinMax Pitch = new MathHelper.FloatMinMax(1, 1); [MinMax(1, 1000, ShowEditRange = true)] public Vector2 Distance = new Vector2(1, 1000); [Range(0, 1)] public float SpatialBlend = 1; public AudioRolloffMode RolloffMode = AudioRolloffMode.Logarithmic; public bool IsLooping; public bool Sound2D = true; [Header("Fade in")] public float FadeInTime = 0; public AnimationCurve FadeInCurve; [Header("Fade out")] public float FadeOutTime = 0; public AnimationCurve FadeOutCurve; [Header("")] public float MinSpawnInterval = 0f; private static AudioListener _audioListener; private List _indexList; private float _lastSpawnTime; private AudioController _lastAvailableController; private Camera _camera; //Play the sound on specified position and transform public AudioController Play(Vector3 pos = default(Vector3), Transform parent = default(Transform), float delay = 0) { if (Time.time - _lastSpawnTime < MinSpawnInterval && _lastAvailableController != null) return _lastAvailableController; _lastAvailableController = ObjectPool.Instantiate(AudioSceeneObject, pos, Quaternion.identity, parent).GetComponent (); _lastAvailableController.SetUp(this); _lastAvailableController.transform.position = pos; if (parent != default(Transform)) _lastAvailableController.transform.parent = parent; _lastSpawnTime = Time.time; return _lastAvailableController; } //Play the sound on the camera public AudioController Play() { Transform currentCameraTransform = null; if (Camera.current) currentCameraTransform = Camera.current.transform; else if (Camera.main) currentCameraTransform = Camera.main.transform; else if (_audioListener) { currentCameraTransform = _audioListener.transform; } else { _audioListener = FindObjectOfType (); currentCameraTransform = _audioListener.transform; } if (currentCameraTransform != null) return Play(currentCameraTransform.position, currentCameraTransform); Debug.LogError("There is no audio listener in the scene"); return null; } //Picks random clip form list an exiles it temporarily till all clips are played public AudioClip GetClip() { if(Clips.Count < 3) { return Clips[Random.Range(0, Clips.Count)]; } if (_indexList == null || _indexList.Count != Clips.Count) { _indexList = null; _indexList = new List (); for (int i = 0; i < Clips.Count; i++) { _indexList.Add(i); } } int quarantinedIndex = Mathf.CeilToInt(Clips.Count / 3f); int tempIndex = _indexList[Random.Range(quarantinedIndex + 1, _indexList.Count)]; _indexList.Remove(tempIndex); _indexList.Insert(0, tempIndex); return Clips[tempIndex]; } //For Editor testing of sound public void TestPlay() { IEnumerable testerList = FindObjectsOfType ().Where(audio => audio.IsPlayingAudioObject(this)); if (IsLooping && testerList.ToArray().Length > 0) { foreach (var editorAudioTester in testerList) { DestroyImmediate(editorAudioTester.gameObject); } } else new GameObject("EditorAudio(temp)").AddComponent ().Initialize(this); } }
public class ObjectPool { private static Dictionary> _poolAvailable = new Dictionary >(); private static Dictionary _prefabMapper = new Dictionary (); private static Dictionary > _typePoolAvailable = new Dictionary >(); private static int SizeToAddAtFull = 5; private static Transform _transformInstance; private static Transform transform { get { if (_transformInstance == null) _transformInstance = new GameObject("ObjectPool").transform; return _transformInstance; } } private static GameObject GetObjectFromPool(GameObject objKey) { if (_poolAvailable[objKey].Count <= 0) return null; GameObject obj = _poolAvailable[objKey].Dequeue(); _prefabMapper[obj] = objKey; obj.transform.localScale = objKey.transform.localScale; obj.transform.rotation = objKey.transform.rotation; obj.transform.position = objKey.transform.position; obj.SetActive(true); return obj; } //Public facing methods public static void Destroy(GameObject obj) { if (_prefabMapper.ContainsKey(obj)) { _poolAvailable[_prefabMapper[obj]].Enqueue(obj); obj.transform.SetParent(transform); obj.SetActive(false); } else UnityEngine.Object.Destroy(obj); } public static void Destroy (GameObject obj) { if (_typePoolAvailable.ContainsKey(typeof(T)) && obj.GetComponent () != null) { _typePoolAvailable[typeof(T)].Enqueue(obj); obj.transform.SetParent(transform); obj.SetActive(false); } else UnityEngine.Object.Destroy(obj); } public static GameObject Instantiate(GameObject prefab, Vector3 position, Quaternion rotation, Transform parent = null) { GameObject temp = Instantiate(prefab); temp.transform.position = position; temp.transform.rotation = rotation; if(parent != null) temp.transform.SetParent(transform); return temp; } public static GameObject Instantiate(GameObject prefab) { if (!_poolAvailable.ContainsKey(prefab)) _poolAvailable[prefab] = new Queue (); if (_poolAvailable[prefab].Count <= 0) { //Add object to fill out pool for (int i = 0; i < SizeToAddAtFull; i++) { GameObject temp = GameObject.Instantiate(prefab, transform, true); temp.name = prefab.name + "(" + i + ")"; temp.SetActive(false); _poolAvailable[prefab].Enqueue(temp); } } return GetObjectFromPool(prefab); } public static T Instantiate (Vector3 position, Quaternion rotation, Transform parent = null) where T : Component { T temp = Instantiate (); temp.transform.position = position; temp.transform.rotation = rotation; if(parent != null) temp.transform.SetParent(transform); return temp; } public static T Instantiate () where T : Component { Type type = typeof(T); if (!_typePoolAvailable.ContainsKey(type)) _typePoolAvailable.Add(type, new Queue ()); if (_typePoolAvailable[type].Count == 0) { //Add object to fill out pool for (int i = 0; i < SizeToAddAtFull; i++) { GameObject temp = new GameObject(type.Name); temp.transform.parent = transform; temp.AddComponent (); temp.SetActive(false); _typePoolAvailable[type].Enqueue(temp); } } GameObject obj = _typePoolAvailable[type].Dequeue(); obj.SetActive(true); return obj.GetComponent (); } }


Use your keybooard up, down, left and right arrows to move the player.
Safely reaching the [holy] water gets you 10 points, but don't get disctracted by Dr. Bob! Look out for Rosary rings to win bonus points!


Below is a detailed list of some of the latest technologies incorporated into this sample application.
HTML5 - is a core technology markup language of the Internet used for structuring and presenting content for the World Wide Web. As of October 2014 this is the final and complete fifth revision of the HTML standard of the World Wide Web Consortium (W3C). The previous version, HTML 4, was standardised in 1997. Its core aims have been to improve the language with support for the latest multimedia while keeping it easily readable by humans and consistently understood by computers and devices (web browsers, parsers, etc.). HTML5 is intended to subsume not only HTML 4, but also XHTML 1 and DOM Level 2 HTML. Following its immediate predecessors HTML 4.01 and XHTML 1.1, HTML5 is a response to the fact that the HTML and XHTML in common use on the World Wide Web are a mixture of features introduced by various specifications, along with those introduced by software products such as web browsers, those established by common practice. It is also an attempt to define a single markup language that can be written in either HTML or XHTML. It includes detailed processing models to encourage more interoperable implementations; it extends, improves and rationalises the markup available for documents, and introduces markup and application programming interfaces (APIs) for complex web applications.[6] For the same reasons, HTML5 is also a potential candidate for cross-platform mobile applications. Many features of HTML5 have been built with the consideration of being able to run on low-powered devices such as smartphones and tablets. In December 2011, research firm Strategy Analytics forecast sales of HTML5 compatible phones would top 1 billion in 2013. In particular, HTML5 adds many new syntactic features. These include the new video, audio and canvas elements, as well as the integration of scalable vector graphics (SVG) content (replacing generic object tags), and MathML for mathematical formulas. These features are designed to make it easy to include and handle multimedia and graphical content on the web without having to resort to proprietary plugins and APIs. Other [page structuring] new elements, such as main, section, article, header, footer, aside, nav and figure, are designed to enrich the semantic content of documents. New attributes have been introduced for the same purpose, while some elements and attributes have been removed. Some elements, such as a, cite and menu have been changed, redefined or standardized. The APIs and Document Object Model (DOM) are no longer afterthoughts, but are fundamental parts of the HTML5 specification. HTML5 also defines in some detail the required processing for invalid documents so that syntax errors will be treated uniformly by all conforming browsers and other user agents.
JavaScript - also known as ECMAScript (the untrademarked name used for the standard), is a dynamic programming language. It is most commonly used as part of web browsers, whose implementations allow client-side scripts to interact with the user, control the browser, communicate asynchronously, and alter the document content that is displayed. It is also used in server-side network programming with runtime environments such as Node.js, game development and the creation of desktop and mobile applications. JavaScript is classified as a prototype-based scripting language with dynamic typing and first-class functions. This mix of features makes it a multi-paradigm language, supporting object-oriented, imperative, and functional programming styles.
Bootstrap - is the most popular HTML, CSS, and JS framework for developing responsive, mobile first projects on the web. Designed for everyone, everywhere. Bootstrap makes front-end web development faster and easier. It's made for folks of all skill levels, devices of all shapes, and projects of all sizes. Bootstrap easily and efficiently scales your websites and applications with a single code base, from phones to tablets to desktops with CSS media queries. With Bootstrap, you get extensive and beautiful documentation for common HTML elements, dozens of custom HTML and CSS components, and awesome jQuery plugins.
Microsoft ASP.NET MVC - Based on ASP.NET, ASP.NET MVC allows software developers to build a web application as a composition of three roles: Model, View and Controller. The MVC model defines web applications with 3 logic layers: Model (business layer) View (display layer) Controller (input control) A model represents the state of a particular aspect of the application. A controller handles interactions and updates the model to reflect a change in state of the application, and then passes information to the view. A view accepts necessary information from the controller and renders a user interface to display that information.[4] In April 2009, the ASP.NET MVC source code was released under the Microsoft Public License (MS-PL).[5] ASP.NET MVC framework is a lightweight, highly testable presentation framework that is integrated with existing ASP.NET features. Some of these integrated features are master pages and membership-based authentication. The MVC framework is defined in the System.Web.Mvc assembly.[6] The ASP.NET MVC Framework couples the models, views, and controllers using interface-based contracts, thereby allowing each component to be tested independently.
AngularJS - In software development, AngularJS (commonly referred to as "Angular") is an open-source web application framework maintained by Google and by a community of individual developers and corporations to address many of the challenges encountered in developing single-page applications. It aims to simplify both the development and the testing of such applications by providing a framework for client-side model–view–controller (MVC) architecture, along with components commonly used in rich Internet applications. The AngularJS library works by first reading the HTML page, which has embedded into it additional custom tag attributes. Angular interprets those attributes as directives to bind input or output parts of the page to a model that is represented by standard JavaScript variables. The values of those JavaScript variables can be manually set within the code, or retrieved from static or dynamic JSON resources.
Microsoft .NET - The .NET Framework (pronounced dot net) is a software framework developed by Microsoft that runs primarily on Microsoft Windows. It includes a large class library known as Framework Class Library (FCL) and provides language interoperability (each language can use code written in other languages) across several programming languages. Programs written for .NET Framework execute in a software environment (as contrasted to hardware environment), known as Common Language Runtime (CLR), an application virtual machine that provides services such as security, memory management, and exception handling. FCL and CLR together constitute .NET Framework.
Microsoft SQL-Server - Microsoft SQL (Structured Query Language) Server is a relational database management system developed by Microsoft. As a database server, it is a software product whose primary function is to store and retrieve data as requested by other software applications, be it those on the same computer or those running on another computer across a network (including the Internet). There are at least a dozen different editions of Microsoft SQL Server aimed at different audiences and for workloads ranging from small single-machine applications to large Internet-facing applications with many concurrent users. Its primary query languages are T-SQL and ANSI SQL.
Microsoft Entity Framework - Entity Framework (EF) is an open source[1] object-relational mapping (ORM) framework for ADO.NET, part of .NET Framework. The Entity Framework is a set of technologies in ADO.NET that support the development of data-oriented software applications. Architects and developers of data-oriented applications have typically struggled with the need to achieve two very different objectives. They must model the entities, relationships, and logic of the business problems they are solving, and they must also work with the data engines used to store and retrieve the data. The data may span multiple storage systems, each with its own protocols; even applications that work with a single storage system must balance the requirements of the storage system against the requirements of writing efficient and maintainable application code. The Entity Framework enables developers to work with data in the form of domain-specific objects and properties, such as customers and customer addresses, without having to concern themselves with the underlying database tables and columns where this data is stored. With the Entity Framework, developers can work at a higher level of abstraction when they deal with data, and can create and maintain data-oriented applications with less code than in traditional applications. Because the Entity Framework is a component of the .NET Framework, Entity Framework applications can run on any computer on which the .NET Framework (starting with version 3.5 SP1) is installed.


Fast weighted median. Computes the weighted median of a set of samples. http://en.wikipedia.org/wiki/Weighted_median "A weighted median of a sample is the 50% weighted percentile." For matrices computes median along each column (or dimension dim). If all weights are equal to 1 gives identical results to median. USAGE m = medianw( x, w, [dim] ) INPUTS x - vector or array of samples w - vector or array of weights dim - dimension along which to compute median OUTPUTS m - weighted median value of x EXAMPLE - simple toy example x=[1 2 3]; w=[1 1 5]; medianw(x,w) EXAMPLE - comparison to median n=randi(100); m=randi(100); x=rand(n,m); w=ones(n,m); m1=median(x); m2=medianw(x,w); assert(isequal(m1,m2)) See also median Piotr's Computer Vision Matlab Toolbox Version 3.24 Copyright 2014 Piotr Dollar. [pdollar-at-gmail.com] Licensed under the Simplified BSD License [see external/bsd.txt]


Hacking SeaMonkey
This is really only something for the very technical and very enthusiastic.
It is likely to be something that people who use SeaMonkey every day
want to do. Most people will use Firefox with our [Firefox extension]
though.
For SeaMonkey editing, download and patch it
1) Go get a recent version of SeaMonkey
Unfortunately, you have to make a modification to SeaMonkey after
installing it.
2) Install it the normal way.
3) Go to to a directory called 'chrome' that contains a file called
'comm.jar' in a command shell
4) Do jar -xf comm.jar content/editor/editorApplicationOverlay.js
5) Edit that file in Notepad, Textpad, Vi, Emacs etc..
6) Change ....
function editPage(url, launchWindow, delay)
{
// Always strip off "view-source:" and #anchors
url = url.replace(/^view-source:/, "").replace(/#.*/, "");
to ....
function editPage(url, launchWindow, delay)
{
// Always strip off "view-source:" and #anchors
url = url.replace(/^view-source:/, "").replace(/#.*/, "");
if (url.substr(0,4) == "http")
{
if (url.indexOf("?") > 0)
{
url = url + "&editMode=true";
}
else
{
url = url + "?editMode=true";
}
}
7) Do jar -uf comm.jar content/editor/editorApplicationOverlay.js
Now your SeaMonkey has been modified. It allows the server side Cozmos
to recognise the differences betweeen a page request from the browser
and one from the composer (editor) sides of SeaMonkey. We hope to
see the SeaMonkey team build in such functionality in future.
It is important to note that there are no permissions presently for
editing of pages. This will change in future versions of Cozmos.
We will supply a script to modify SeaMonkey for you in future versions.
Or the SeaMonkey team will allow server applications to
differentiate between requests for the browser component and those for
the editor component.
Edit a page on the site with SeaMonkey
While browsing the Cozmos based site with SeaMonkey, hit Ctrl-E (Apple-E for
Mac users) and make changes to the page. Hit the "Publish"
icon in the toolbar to push the changes back to the server.


XCode has a decent build system, but it doesn’t work as well as it could out of the box. With just a little work, you can make your projects easier to setup and maintain just the way you want them, improve your code, and even speed up your build times.
The first thing we want to do is get rid of one of the great obfuscations of Xcode: The Build panel.
The build panel seems convenient at first, but in practice it makes it hard to see what’s going on in your build. It especially gets confusing as your build settings get complicated. When you need to turn off Thumb Code Generation because of an obscure assembler conflict in legacy C++ code (true story), it would be nice to put a comment somewhere indicating why you’ve done this so someone doesn’t come along later switch the setting. The Build Panel doesn’t give you an easy way to include comments right along with the setting (the “Comments” panel is pretty useless in my experience), and it’s easy to lose settings or accidentally apply them to only to one configuration.
XCode provides a better solution called xcconfig files. Everything you can do in the build panel can be done in xcconfig files, and you can actually read them and make comments. So let’s make some.
- Create a new Window-Based iPhone Application. (Everything we do here works exactly the same for Mac.)
- Add a new group to your Groups & Files called “Build Configuration”.
- Add a new file to the group. Under “Other” select “Configuration Settings File.” Call it “Shared.xcconfig”.
- Create three more xcconfig files called Debug, Release and Application.
- Double-click the Project to open the Project Info panel, and select Build.
- Select Configuration: “Debug” and Show: “Settings Defined at This Level.”
- Select all the settings (you can use Cmd-A here).
- Copy them with Cmd-C.
- Go back to Debug.xcconfig and paste with Cmd-V. You now know how to find out the xcconfig syntax for any Build Panel setting you’re uncertain of.
- Go back to the Build Panel and hit Delete to set all settings to default. Select “Show: All Settings” so you can see your settings again.
- In the lower-right of the panel, for “Based On:” select “Debug.” You should see your old settings show back up, but not bold this time.
- Repeat for Configuration: “Release”. Copy them to Release.xcconfig and delete them from the Build Panel.
- Double-click on the Target, and repeat the process, moving both its Debug and Release settings to Application. Put in a comment to indicate which are the Debug settings and which are the Release settings. We’ll clean them up shortly. Select “Configuration: All Configurations” and “Based On: Application.”
We’ve now moved everything from the build panel to the xcconfig files, and the system should build. Debug and Release are slightly confused because we mixed the settings in Application, but we’ll fix that now.
Look in Application.xcconfig, and move anything that’s in Debug but not in Release to Debug.xcconfig, and anything in Release but not Debug to Release.xcconfig. Anything that’s in both, delete the second copy of.
Anything that is in both Release and Debug, move to Shared, and put #include "Shared.xcconfig"
at the top of the Release and Debug configs.
If you’ve followed all the instructions, you should have four files that look like this (assuming your product’s name is “Test”):
Shared.xcconfig
ARCHS = $(ARCHS_STANDARD_32_BIT)
SDKROOT = iphoneos2.2.1
CODE_SIGN_IDENTITY =
CODE_SIGN_IDENTITY[sdk=iphoneos#] = iPhone Developer
PREBINDING = NO
GCC_C_LANGUAGE_STANDARD = c99
GCC_WARN_ABOUT_RETURN_TYPE = YES
GCC_WARN_UNUSED_VARIABLE = YES
Release.xcconfig
#include "Shared.xcconfig"
COPY_PHASE_STRIP = YES
Debug.xcconfig
#include "Shared.xcconfig"
ONLY_ACTIVE_ARCH = YES
COPY_PHASE_STRIP = NO
GCC_DYNAMIC_NO_PIC = NO
GCC_OPTIMIZATION_LEVEL = 0
Application.xcconfig
INFOPLIST_FILE = Info.plist
PRODUCT_NAME = Test
ALWAYS_SEARCH_USER_PATHS = NO
GCC_PRECOMPILE_PREFIX_HEADER = YES
GCC_PREFIX_HEADER = Test_Prefix.pch
If you Build&Run now, everything should work. It’s not a great build configuration, but it’s Apple’s default in a form that we can start understanding and improving.
But before that, we’re going to convert this to a Project Template, so we don’t have to go through this process again. We’ll do that in the next part of this series.


This analysis is a placeholder with a sample set. If you want to contribute new analyses for the site, contact Disaster Area on Discord.
Level: 27
- Thunder Wave
- Thunderbolt
- Surf
- Substitute
This analysis is a placeholder with a sample set. If you want to contribute new analyses for the site, contact Disaster Area on Discord.
Body Slam, Submission
This analysis is a placeholder with a sample set. If you want to contribute new analyses for the site, contact Disaster Area on Discord.
Author: Plague von Karma
HTML by: Plague von Karma
Publish Date: 22nd October 2020


Applications
IIIF Manifest Collection
View
SPARQL Endpoint
View
Graph2d
View
Timeline
View
Metadata
View


This PWG face-to-face meeting will be held on May 5 - 8, 2020, only via WebEx teleconference (Virtual F2F).
There is no registration fee or RSVP survey for this meeting.
Note:All times are local to the venue - Eastern Daylight Time (EDT) (UTC−04:00).
Discussions at PWG face-to-face meetings are covered by the PWG Policy on Intellectual Property and Confidentiality - basically everything we discuss is non-confidential and can be included in an open standard.
| Date | Times | Description |
|---|---|---|
| May 5 | 10:00 AM to 10:30 AM | OpenPrinting Plenary |
| 10:30 AM to 11:15 AM | OpenPrinting: GSoC and Project Updates | |
| 11:15 AM to 12:00 PM | OpenPrinting: Printer Applications | |
| 12:00 PM to 12:30 PM | Break / Lunch | |
| 12:30 PM to 1:15 PM | OpenPrinting: Status of Ghostscript and MuPDF | |
| 1:15 PM to 1:45 PM | OpenPrinting: Status of Chrome OS Printing | |
| 1:45 PM to 2:00 PM | Break | |
| 2:00 PM to 2:45 PM | OpenPrinting: cups-filters, Driverless Scanning, CUPS Snap, ippusbxd, ipp-usb, Avahi | |
| May 6 | 10:00 AM to 11:00 AM | PWG Plenary |
| 11:00 AM to 11:15 AM | IPP WG: Status | |
| 11:15 AM to 12:00 PM | IPP WG: IPP Everywhere v1.1 · IPP Everywhere Self Cert v1.1 | |
| 12:00 PM to 12:30 PM | Break / Lunch | |
| 12:30 PM to 2:00 PM | IPP WG : Job Accounting with IPP v1.0 | |
| May 7 | 10:00 AM to 12:00 PM | IDS WG : Status and Discussion · PWG Hardcopy Device Security Guidelines v1.0 |
| 12:00 PM to 12:30 PM | Break / Lunch | |
| 12:30 PM to 2:00 PM | IPP WG : IPP Enterprise Printing Extensions v2.0 | |
| May 8 | 10:00 AM to 10:20 AM | IPP WG : IPP Production Printing Extensions v2.0 |
| 10:20 AM to 12:00 PM | IPP WG : IPP Driverless Printing Extensions v2.0 | |
| 12:00 PM to 12:30 PM | Break / Lunch | |
| 12:30 PM to 1:45 PM | IPP WG: 3D Printing Liaison: Status and Guidance | |
| 1:45 PM to 2:00 PM | IPP WG : Next Steps |


Restaurant XXXXXXXXX Locator
Ponsonby, Auckland NZ.
Search Restaurants:
Local Ponsonby Restaurants
Restaurant images and info source - Yelp.com
×
Looks like the info is not available right now :(, try again later.


Total of 800 Hong Kong Protesters Already Left PolyU Campus - Police
MOSCOW (Sputnik) - A total of 800 protesters who had holed up for over a week at Hong Kong Polytechnic University (PolyU) left the campus in a peaceful manner, police said in a statement on Tuesday.
"As at 11 pm last night (November 19) [15:00 GMT], a total of around 800 people have left the campus of Hong Kong Polytechnic University (Poly U) in a peaceful manner and cooperated with police investigation. Among all, 300 people are under 18 years old," police said.
A group of 20 first-aid volunteers left Poly U through the main entrance at around 10 p.m. A dozen masked rioters tried to follow in their steps an hour later but were intercepted by police.
Anti-government protesters have occupied the PolyU campus since last week despite police repeatedly asking them to leave. Police promised to show flexibility when dealing with those who were inside.
Qualified first responders from Red Cross and Doctors Without Borders earlier entered Poly U and assisted those needing first aid.
Police have appealed to all those staying on campus to leave in a peaceful manner and pledged to bring offenders to justice in a fair manner.


Meat: Beef, Lamb, Chicken, Pork Salad: All kinds of vegetables, Noodles: Chow Mein, Spaghetti, Udon, Pho Rice: All kinds of rice plates Dipping: Dumplings, Nuggets, Chips Soup: All kinds of soup Special: Hot Pot


Made byFortress
Thank you so much for purchasing this theme and for being our loyal customer. You are awesome!
This documentation was created to help in each step of installing and customizing your theme. Please, go through the documentation carefully to understand how this theme is made and how to edit it properly.
If you have any questions that are beyond the scope of this help file, please get in touch<EMAIL_ADDRESS>Thanks so much!
Once you download the ZIP file from Theme Forest, you will see several folders within. Here is the descripton for each folder:
| Folder | Description |
|---|---|
Documentation |
Here is the documentation about the Theme. You have to open the index.html file. |
Design |
Here are the design files, for example Photoshop or Sketch files. |
Theme |
Inside you will find the actual theme. There will be a file called blacklist.zip . |
This theme styling was crafted with great detail. (Sass files are provided) There is one main file that has been provided also minified for a better performance:
| File Name | Description |
|---|---|
blacklist/assets/css/screen.css |
The main CSS file. |
blacklist/assets/css/min/screen.min.css |
The minified version. |
You can edit the "screen.css" file to change anything you want. For faster and more powerfull development you may also use Sass files. This way you will have more flexibility while customizing your theme, but this requires more advanced skills.
The file you have to upload is inside the ZIP file downloaded from Theme Forest under a folder called "Theme". Inside this folder you will find the ZIP file called "blacklist.zip". That's the file you have to upload.
So if you are a Ghost(Pro) user just follow this tutorial and upload that ZIP file: How to upload a theme to your Ghost(Pro) blog
If you are using a self-hosted version of Ghost the method to upload depends on your Server, for example here is a guide on how to upload the theme if you are using DigitalOcean as your server: How to Upload a Theme on DigitalOcean
I'm pretty sure that if you are using a self-hosted Ghost you already know how to do it :)
In your Admin Panel >> Settings >> Navigation you can create the menu. The oficial documentation about navigation menus is here: How to add a navigation menu to your Ghost blog.
You can add these social icons right from your Admin Panel in Ghost. Just go to Code Injection in your Admin Panel and add this code in Blog Footer:
This is a javascript array with the list of your social URLs, just add your social profiles and the theme will show the correct icon, that's all you need to do. In the Admin Panel the code should look like this:
This is the list of social icons availables:
http://twitter.com http://facebook.com http://plus.google.com http://instagram.com http://spotify.com http://vk.com http://rss.com http://youtube.com http://twitch.tv http://vimeo.com http://flickr.com http://dribbble.com http://behance.net http://github.com http://ello.co http://tumblr.com http://soundcloud.com http://skype.com http://reddit.com http://linkedin.com http://last.fm http://delicious.com http://stackoverflow.com http://pinterest.com http://codepen.io
Just like with social icons you can enable Disqus right from your Admin Panel. Just add your Disqus Shortname as a javascript variable in Code Injection >> Blog Footer:
You may use the same script block than the social icons, like this:
Here is the official documentation to installing disqus: Ghost Installation Instructions
You can set up your Instagram account from the Admin Panel. But first you need to know your Instagram userID
and accessToken
. There are several ways to know them, the easiest is going to this URL and allowing Instafeed (the plugin we use to show instagram images) to tell you: Instafeed plugin.
After that you get your userID
and accessToken
, add them in Code Injection like this:
So along with your social icons and Disqus code, it shoul look like something like this:
And that's it, the theme will get your Instagram images with those two variables.
These are plugins or files used by the theme:
----------------------------------------------------------------------------------------- Version 1.0.0 - February 14th, 2016 ----------------------------------------------------------------------------------------- - Released


Programming Survey
What is your name?
What are you interested making?
Building and updating enterprise-level software systems
Engaging Visual Experiences
Scalable applications on the bleeding egde of web development
Content-heavy websites that can be partially updated by the non-developer
Are you more interested in the visual aspects(front-end) or the logical aspects(back-end) of what you would make?
Visual
Logical
What kind of environment would you feel most comfortable working?
A large international corporation
A mid-size regional company
A small start-up with a laid-back atmosphere
Would you like to freelance for small businesses or entrepreneurs?
Yes
No
Which code looks the most appealing to work with?
body { margin: 0; }
echo "Hello World"
puts "Hello World"
System.out.println("Hello World");
System.Console.WriteLine("Hello, World!");
What should I learn?!


Is LADOL truly a Nigerian company? - The Nation Newspaper
Goodluck Adeoye
Even with the signing of the Nigerian Oil and Industry Content Development (NOGICD) Act of 2010, many Nigerian investors still exploit the old loopholes in the system to take advantage of this law.
Many Nigerians still parade foreign-owned companies as local entities to take advantage of the opportunities provided by the NOGICD Act at the detriment of the Nigerian economy.
LADOL, for instance, prides itself as a local company and is reaping the huge benefits that accrue to local companies in Nigeria but its shareholding structure appears to question this claim.
It is not an offence for foreign companies to operate in Nigeria.
After all, President Muhammadu Buhari has travelled all over the world to woo foreign investors to come into Nigeria and harness the investment opportunities his administration has created.
Also, the Vice President, Professor Yemi Osinbajo, has also made tremendous efforts to improve Nigeria’s ranking in the World Bank’s Ease of Doing Business to attract foreign companies.
Buhari and Osinbajo’s efforts have paid off by attracting many foreign companies and investments since 2015.
All these investments by foreign companies operating in Nigeria have provided employment for Nigerians and helped to grow the Nigerian economy.
The Nigerian government has also provided benefits for these foreign companies to thrive.
READ ALSO: Nigerian Company emerges largest supplier of LPG in West Africa
But it is worrisome when some foreign-owned companies parade themselves as local companies because they shortchange both the Nigerian economy and truly Nigerian companies.
Foreign-owned companies, which should enjoy the benefits provided by the Nigerian government for foreign companies have claimed to be local companies to enjoy the benefits in the NOGICD Act.
A peep into the shareholding structure of LADOL, for instance, reveals that the ownership is foreign-dominated because this conglomerate, which claims to be a bona fide Nigerian company, has its substantial 84 per cent shares held by foreign companies.
The two foreign companies that own the 84 per cent stake in LADOL are Sable Offshore Investment Limited, registered in British Virgin Island, and Alsba Ventures, also registered in the British Virgin Island.
While Sable Offshore Investment Limited has 53 per cent stake in LADOL, Alsba Ventures Group has 31 per cent.
When two foreign companies establish a company in Nigeria, the company can be rightly regarded as a foreign company.
So, substantially, and legally too, it can be argued that LADOL is a British Virgin Island company and not a Nigerian indigenous company because it is owned by entities registered in British Virgin island.
If British Virgin Island companies owned by Nigerians establish a company in Nigeria, the company is not a truly Nigerian company because it is owned by foreign companies.
When Nigerians establish companies in British Virgin Island and use these companies to set up a company in Nigeria, their motive becomes questionable and suspicious.
The questions are: Why did they not set up the company in Nigeria instead of setting up companies in foreign countries and using these foreign companies to set up a company in Nigeria? What is their motive?
What are they trying to dodge? Which rules are they trying to circumvent?
It is also well known all over the world that British Virgin Island is a tax haven where companies do not pay tax.
These companies are shell companies and regulators and anti-corruption agencies in most countries have had cause to probe the business activities of these companies.
Despite this obviously foreign ownership structure, LADOL is one of the greatest beneficiaries of the opportunities provided in the NOGICD Act.
Indeed, the company has benefited enormously from the local content policy in the oil and gas sector.
The opportunities and benefits LADOL have enjoyed are clearly meant for Nigerian companies. But is it truly a Nigerian company?
Many people have called on the government regulators to probe the ownership structure of LADOL to ascertain if it is truly a Nigerian company.
The earlier this is done the better for the Nigerian economy.
Adeoye writes from Yenagoa


Hi there,
There is a new update on TIM.
New discussion created by '{{discussion.user.name}}' in the category '{{discussion.category.name}}':
Title: {{discussion.title}}
Description:
{{discussion.text}}
Attachments: {{discussion.documents.filter_by(filetype='image').all() | length}} image(s) and
{{discussion.documents.filter_by(filetype='doc').all() | length}} file(s).
Hope you catch the update soon.
Cheers,
Team TIM


General informatcion about {{target.symbol}} protein from UniProt .
ID: {{uniprot.id}}
Subunit:
Subcellular location:
UniProt Keywords:
See this information in Uniprot


What is HackNight?
Hacktoberfest is a yearly virtual event that primarily focuses on open-source development of applications, code libraries, tools etc. for a variety of operating systems and platforms. ACM PESU-ECC presents to you Hacknight , our own rendition of the Hacktoberfest! This is an initiative to provide a platform to all coders of all skill levels. Join us and take your first dive into the vast world of open source!
What, how and why open source?
Open source is a tag given to organisations that avail their source code
for free to access, utilize and even edit! This promotes the
transparency and security of the source code.
But how do these organisations filter out edits to their code?
That’s where Github comes to play! Github is a service that allows these
organisations to host their code repositories on their website and allow
contributors to send their version of the code to the code maintainers
who then verify the changes and approve them to be added to the source
code. The best part is, if you ever come across a paid software product,
there will always be a free, open-source counterpart to it which is
close to or even better than the paid product!
So how does Github work?
If you are looking to access and contribute some code to any repository,
you can use Github to look for these repositories. Git is a useful tool
for this that allows you to carry out Github instructions using a CLI.
To learn more about Git and Github, make sure you attend our workshops
to get you prepared for the event! Details below.
So why get into open source?
This community is built upon experimenting and learning to code. It is
welcoming and exciting to work on and can grant you a ton of experience
and fun! In fact, most core organisations utilize the Git version
control or something similar for their proprietary software development
workflow. So this can definitely help you get a head-start on
familiarizing yourself with the workflow and work distribution of
software development.


PING-PONG
Let's play!
Rules:
Ping Pong will count up to your number from 1 with the following exceptions:
Numbers divisible by 3 become "ping"
Numbers divisible by 5 become "pong"
Numbers divisible by 3 and 5 become "pingpong"
Enter your number here:
PingPong!


Relationships
Edit (pull request)Normatives relationship types in TOSCA
tosca.relationships.Root
This is the default (root) TOSCA Relationship Type definition that all other TOSCA Relationship Types derive from.
Definition
tosca.relationships.Root:
# The TOSCA root relationship type has no property mappings
interfaces:
tosca.interfaces.relationship.Configure:
documentation: >
Default lifecycle for nodes in TOSCA.
operations:
pre_configure_source:
documentation: Operation to pre-configure the source endpoint.
pre_configure_target:
documentation: Operation to pre-configure the target endpoint.
post_configure_source:
documentation: Operation to post-configure the source endpoint.
post_configure_target:
documentation: Operation to post-configure the target endpoint.
add_target:
documentation: Operation to add a target node.
remove_target:
documentation: Operation to remove a target node.
tosca.relationships.DependsOn
This type represents a general dependency relationship between two nodes. Depends on impacts the TOSCA default lifecycle. A node that depends from a target node will be started after the target node has been actually started.
Definition
tosca.relationships.DependsOn:
derived_from: tosca.relationships.Root
valid_target_types: [ tosca.capabilities.Root ]
tosca.relationships.HostedOn
This type represents a hosting relationship between two nodes.
Definition
tosca.relationships.HostedOn:
derived_from: tosca.relationships.DependsOn
valid_target_types: [ tosca.capabilities.Container ]
tosca.relationships.ConnectsTo
This type represents a network connection relationship between two nodes.
Definition
tosca.relationships.ConnectsTo:
derived_from: tosca.relationships.DependsOn
valid_target_types: [ tosca.capabilities.Endpoint ]
tosca.relationships.AttachTo
This type represents an attachment relationship between two nodes. For example, an AttachTo relationship type would be used for attaching a storage node to a Compute node.
Definition
tosca.relationships.AttachTo:
derived_from: tosca.relationships.Root
valid_target_types: [ tosca.capabilities.Attachement ]
properties:
location:
type: string
constraints:
min_length: 1
device:
type: string
tosca.relationships.RoutesTo
This type represents an intentional network routing between two Endpoints in different networks.
Definition
tosca.relationships.RoutesTo:
derived_from: tosca.relationships.ConnectsTo
valid_target_types: [ tosca.capabilities.Endpoint ]


Bombers fan goes 17 years with no pants
by Danton Unger, News Writer/ProducerWinnipeg – It’s been a drafty 17 years since a Winnipeg Blue Bombers fan has worn a pair of pants, but that could all change on Sunday.
It was 2001 and the Winnipeg Blue Bombers were about to face off against the Calgary Stampeders in the 89th Grey Cup Championships. Chris Matthew was wearing shorts at the time and he told his friends he would keep wearing shorts until the Bombers won the cup. Then the boys in blue and gold lost.
“I said I would wear them until they win the Grey Cup, and I’m still waiting,” Matthew told CTV News.
It’s been 17 years and Matthews said he still hasn’t broken that vow. He does still own a pair of stretchy camo-patterned pants.
“I would rather he be in shorts than those pants, so it’s worked out well,” said Darla Matthew, Chris’ wife. “Yeah, it’s going to be shorts forever – and he does look cute in his shorts.”
Mathew said he does get a lot of stares from people walking down the street. And the response from Darla?
“Idiot, goofball, I mean there’s so many,” she says of her husband’s vow.
 “ I mean who else runs around -40 C below in Winnipeg with no pants on, so I mean it’s not the brightest thing in the world to do, I’ll give you that.”
Matthew said if Bombers’ head coach Mike O’Shea shows up at his door, telling him to put some pants on he would do it. But unless that happens, Matthew said he’s going to be wearing shorts.
He hopes that will change on Sunday when the Bombers take on the Hamilton Tiger-Cats. Darla isn’t so sure though.
“Yeah, it’s going to be shorts forever – he does look cute in his shorts.”
-with files from CTV's Jamie Dowsett


--- title: (Blackfynn) setup keywords: documentation theme, jekyll, technical writers, help authoring tools, hat replacements last_updated: July 3, 2016 tags: [getting_started] sidebar: matlab_docs_sidebar permalink: blackfynn_setup.html folder: mydoc ---
setup Setup a profile for the Blackfynn client. setup() Static method to create a profile that contains an API token and secret to use as credentials for using the Blackfynn MATLAB client.
| Access | public |
| Sealed | false |
| Static | true |


#{extends 'web.html' /} #{set 'title'}&{'welcome'}#{/set}
${siteDescription}
&{'_.explore.expand'}
&{'_.discuss.expand'}
&{'_.share.expand'}
#{a @web.Documents.list()}All categories#{/a} #{list documentCategories} - #{a @web.Documents.list(null, _.id, null, null)}${_.name}#{/a} #{/list}
#{a @web.Discussions.list()}All categories#{/a} #{list discussionCategories} - #{a @web.Discussions.list(null, _.id, null, null)}${_.name}#{/a} #{/list}
Hello! This quick tour will guide through you the main features of this application.
Explore documents : read, comment and copy them directly to your Google Drive account.
Discussions are deeper conversations about documents. You can explore and read them here. You can also link additional documents to a discussion.
Upload a document to share it with others. A copy of that document will also be uploaded to your Google Drive.
Start a discussion : ask a question, post an idea or debate. Link documents to these discussions.
Quick search : access documents and discussions directly from here.
You can use this application without signing in. However for community features, you will need to sign in.


Upload to timestamp your data.
Drag and drop your files here.
Trace records
View recent updates
Internal uploads


#include <IEvent.h>
Public Member Functions | |
| void | Block () |
| void | Unblock () |
| bool | IsBlocked () const |
| virtual | ~IEvent () |
Protected Member Functions | |
| IEvent () | |
|
inlinevirtual |
|
inlineprotected |
|
inline |
|
inline |
|
inline |
Generated on Sun May 6 2018 for ionEngine v0.4.5


The frames per second at which this ticker is running. The default is approximately 60 in most modern browsers. Note: This does not factor in the value of {@link PIXI.Ticker#speed}, which is specific to scaling {@link PIXI.Ticker#deltaTime}.
Whether or not this ticker should invoke the method {@link PIXI.Ticker#start} automatically when a listener is added.
Counts the number of listeners on this ticker.
Scaler time elapsed in milliseconds from last frame to this frame. This value is capped by setting {@link PIXI.Ticker#minFPS} and is scaled with {@link PIXI.Ticker#speed}. Note: The cap may be exceeded by scaling. If the platform supports DOMHighResTimeStamp, this value will have a precision of 1 µs. Defaults to target frame time
Scalar time value from last frame to this frame. This value is capped by setting {@link PIXI.Ticker#minFPS} and is scaled with {@link PIXI.Ticker#speed}. Note: The cap may be exceeded by scaling.
Time elapsed in milliseconds from last frame to this frame. Opposed to what the scalar {@link PIXI.Ticker#deltaTime} is based, this value is neither capped nor scaled. If the platform supports DOMHighResTimeStamp, this value will have a precision of 1 µs. Defaults to target frame time
The last time {@link PIXI.Ticker#update} was invoked. This value is also reset internally outside of invoking update, but only when a new animation frame is requested. If the platform supports DOMHighResTimeStamp, this value will have a precision of 1 µs.
Manages the minimum amount of milliseconds required to
elapse between invoking {@link PIXI.Ticker#update}.
This will effect the measured value of {@link PIXI.Ticker#FPS}.
If it is set to 0
, then there is no limit; PixiJS will render as many frames as it can.
Otherwise it will be at least minFPS
Manages the maximum amount of milliseconds allowed to
elapse between invoking {@link PIXI.Ticker#update}.
This value is used to cap {@link PIXI.Ticker#deltaTime},
but does not effect the measured value of {@link PIXI.Ticker#FPS}.
When setting this property it is clamped to a value between
0
and PIXI.settings.TARGET_FPMS * 1000
.
Factor of current {@link PIXI.Ticker#deltaTime}.
Whether or not this ticker has been started.
true
if {@link PIXI.Ticker#start} has been called.
false
if {@link PIXI.Ticker#stop} has been called.
While false
, this value may change to true
in the
event of {@link PIXI.Ticker#autoStart} being true
and a listener is added.
The shared ticker instance used by PIXI.AnimatedSprite and by {@link PIXI.VideoResource} to update animation frames / video textures.
It may also be used by PIXI.Application if created with the sharedTicker
option property set to true.
The property {@link PIXI.Ticker#autoStart} is set to true
for this instance.
Please follow the examples for usage, including how to opt-out of auto-starting the shared ticker.
The system ticker instance used by PIXI.interaction.InteractionManager and by
PIXI.BasePrepare for core timing functionality that shouldn't usually need to be paused,
unlike the shared
ticker which drives visual animations and rendering which may want to be paused.
The property {@link PIXI.Ticker#autoStart} is set to true
for this instance.
Register a handler for tick events. Calls continuously unless it is removed or the ticker is stopped.
The listener function to be added for updates
This instance of a ticker
Add a handler for the tick event which is only execute once.
The listener function to be added for one update
This instance of a ticker
Destroy the ticker and don't use after this. Calling this method removes all references to internal events.
Removes any handlers matching the function and context parameters. If no handlers are left after removing, then it cancels the animation frame.
The listener function to be removed
This instance of a ticker
Starts the ticker. If the ticker has listeners a new animation frame is requested at this point.
Stops the ticker. If the ticker has requested an animation frame it is canceled at this point.
Triggers an update. An update entails setting the current {@link PIXI.Ticker#elapsedMS}, the current {@link PIXI.Ticker#deltaTime}, invoking all listeners with current deltaTime, and then finally setting {@link PIXI.Ticker#lastTime} with the value of currentTime that was provided. This method will be called automatically by animation frame callbacks if the ticker instance has been started and listeners are added.
Generated using TypeDoc
A Ticker class that runs an update loop that other objects listen to.
This class is composed around listeners meant for execution on the next requested animation frame. Animation frames are requested only when necessary, e.g. When the ticker is started and the emitter has listeners.
PIXI


AWS::Greengrass::Group
AWS IoT Greengrass seamlessly extends AWS to edge devices so they can act locally on the data they generate, while still using the cloud for management, analytics, and durable storage. With AWS IoT Greengrass, connected devices can run AWS Lambda functions, execute predictions based on machine learning models, keep device data in sync, and communicate with other devices securely – even when not connected to the internet. For more information, see the AWS IoT Greengrass Version 1 Developer Guide.
For AWS Region support, see AWS CloudFormation Support for AWS IoT Greengrass in the AWS IoT Greengrass Version 1 Developer Guide.
The
AWS::Greengrass::Group
resource represents a group in AWS IoT Greengrass.
In the AWS IoT Greengrass API, groups are used to organize your group versions.
Groups can reference multiple group versions. All group versions must be associated with a group. A group version references a device definition version, subscription definition version, and other version types that contain the components you want to deploy to a Greengrass core device.
To deploy a group version, the group version must reference a core definition version that contains one core. Other version types are optionally included, depending on your business need.
When you create a group, you can optionally include an initial group version.
To associate a group version later, create a AWS::Greengrass::GroupVersion
resource and specify the ID of this group.
To change group components (such as devices, subscriptions, or functions), you must create new versions. This is because versions are immutable. For example, to add a function, you create a function definition version that contains the new function (and all other functions that you want to deploy). Then you create a group version that references the new function definition version (and all other version types that you want to deploy).
Deploying a Group Version
After you create the group version in your AWS CloudFormation template, you can deploy it using the aws greengrass create-deployment command in the AWS CLI or from the Greengrass node in the AWS IoT console. To deploy a group version, you must have a Greengrass service role associated with your AWS account. For more information, see AWS CloudFormation Support for AWS IoT Greengrass in the AWS IoT Greengrass Version 1 Developer Guide.
Syntax
To declare this entity in your AWS CloudFormation template, use the following syntax:
JSON
{ "Type" : "AWS::Greengrass::Group", "Properties" : { "InitialVersion" :
GroupVersion
, "Name" :String
, "RoleArn" :String
, "Tags" :Json
} }
YAML
Type: AWS::Greengrass::Group Properties: InitialVersion:
GroupVersion
Name:String
RoleArn:String
Tags:Json
Properties
InitialVersion
-
The group version to include when the group is created. A group version references the Amazon Resource Name (ARN) of a core definition version, device definition version, subscription definition version, and other version types. The group version must reference a core definition version that contains one core. Other version types are optionally included, depending on your business need.
Note To associate a group version after the group is created, create an
AWS::Greengrass::GroupVersion
resource and specify the ID of this group.Required: No
Type: GroupVersion
Update requires: Replacement
Name
-
The name of the group.
Required: Yes
Type: String
Update requires: No interruption
RoleArn
-
The Amazon Resource Name (ARN) of the IAM role attached to the group. This role contains the permissions that Lambda functions and connectors use to interact with other AWS services.
Required: No
Type: String
Update requires: No interruption
Tags
-
Application-specific metadata to attach to the group. You can use tags in IAM policies to control access to AWS IoT Greengrass resources. You can also use tags to categorize your resources. For more information, see Tagging Your AWS IoT Greengrass Resources in the AWS IoT Greengrass Version 1 Developer Guide.
This
Json
property type is processed as a map of key-value pairs. It uses the following format, which is different from mostTags
implementations in AWS CloudFormation templates."Tags": { "KeyName0": "value", "KeyName1": "value", "KeyName2": "value" }
Required: No
Type: Json
Update requires: No interruption
Return values
Ref
When you pass the logical ID of this resource to the intrinsic Ref
function, Ref
returns the
ID of the group, such as
1234a5b6-78cd-901e-2fgh-3i45j6k178l9
.
For more information about using the Ref
function, see Ref.
Fn::GetAtt
The Fn::GetAtt
intrinsic function returns a value for a specified attribute of this type. The following are the available attributes and sample return values.
For more information about using the Fn::GetAtt
intrinsic function, see Fn::GetAtt.
Arn
-
The ARN of the
Group
, such asarn:aws:greengrass:us-east-1:123456789012:/greengrass/definition/groups/1234a5b6-78cd-901e-2fgh-3i45j6k178l9
. Id
-
The ID of the
Group
, such as1234a5b6-78cd-901e-2fgh-3i45j6k178l9
. LatestVersionArn
-
The ARN of the last
GroupVersion
that was added to theGroup
, such asarn:aws:greengrass:us-east-1:123456789012:/greengrass/definition/groups/1234a5b6-78cd-901e-2fgh-3i45j6k178l9/versions/9876ac30-4bdb-4f9d-95af-b5fdb66be1a2
. Name
-
The name of the
Group
, such asMyGroup
. RoleArn
-
The ARN of the IAM role that's attached to the
Group
, such asarn:aws:iam::123456789012:role/role-name
. RoleAttachedAt
-
The time (in milliseconds since the epoch) when the group role was attached to the
Group
.
Examples
Create a Group
The following template defines a core, device, function, logger, subscription, and two resources, and then references them from the group version.
The template includes parameters that let you specify the certificate ARNs for the core
and device and the ARN of the source Lambda function (which is an AWS Lambda resource).
It uses the Ref
and GetAtt
intrinsic functions to
reference IDs, ARNs, and other attributes that are required to create Greengrass resources.
After you create the group version in your AWS CloudFormation template, you can deploy it using the aws greengrass create-deployment command in the AWS CLI or from the group configuration page in the AWS IoT console. To deploy a group version, you must have a Greengrass service role associated with your AWS account. For more information, see AWS CloudFormation Support for AWS IoT Greengrass in the AWS IoT Greengrass Version 1 Developer Guide.
JSON
{ "Description": "AWS IoT Greengrass example template that creates a group version with a core, device, function, logger, subscription, and resources.", "Parameters": { "CoreCertificateArn": { "Type": "String" }, "DeviceCertificateArn": { "Type": "String" }, "LambdaVersionArn": { "Type": "String" } }, "Resources": { "TestCore1": { "Type": "AWS::IoT::Thing", "Properties": { "ThingName": "TestCore1" } }, "TestCoreDefinition": { "Type": "AWS::Greengrass::CoreDefinition", "Properties": { "Name": "DemoTestCoreDefinition" } }, "TestCoreDefinitionVersion": { "Type": "AWS::Greengrass::CoreDefinitionVersion", "Properties": { "CoreDefinitionId": { "Ref": "TestCoreDefinition" }, "Cores": [ { "Id": "TestCore1", "CertificateArn": { "Ref": "CoreCertificateArn" }, "SyncShadow": "false", "ThingArn": { "Fn::Join": [ ":", [ "arn:aws:iot", { "Ref": "AWS::Region" }, { "Ref": "AWS::AccountId" }, "thing/TestCore1" ] ] } } ] } }, "TestDevice1": { "Type": "AWS::IoT::Thing", "Properties": { "ThingName": "TestDevice1" } }, "TestDeviceDefinition": { "Type": "AWS::Greengrass::DeviceDefinition", "Properties": { "Name": "DemoTestDeviceDefinition" } }, "TestDeviceDefinitionVersion": { "Type": "AWS::Greengrass::DeviceDefinitionVersion", "Properties": { "DeviceDefinitionId": { "Fn::GetAtt": [ "TestDeviceDefinition", "Id" ] }, "Devices": [ { "Id": "TestDevice1", "CertificateArn": { "Ref": "DeviceCertificateArn" }, "SyncShadow": "true", "ThingArn": { "Fn::Join": [ ":", [ "arn:aws:iot", { "Ref": "AWS::Region" }, { "Ref": "AWS::AccountId" }, "thing/TestDevice1" ] ] } } ] } }, "TestFunctionDefinition": { "Type": "AWS::Greengrass::FunctionDefinition", "Properties": { "Name": "DemoTestFunctionDefinition" } }, "TestFunctionDefinitionVersion": { "Type": "AWS::Greengrass::FunctionDefinitionVersion", "Properties": { "FunctionDefinitionId": { "Fn::GetAtt": [ "TestFunctionDefinition", "Id" ] }, "DefaultConfig": { "Execution": { "IsolationMode": "GreengrassContainer" } }, "Functions": [ { "Id": "TestLambda1", "FunctionArn": { "Ref": "LambdaVersionArn" }, "FunctionConfiguration": { "Pinned": "true", "Executable": "run.exe", "ExecArgs": "argument1", "MemorySize": "512", "Timeout": "2000", "EncodingType": "binary", "Environment": { "Variables": { "variable1": "value1" }, "ResourceAccessPolicies": [ { "ResourceId": "ResourceId1", "Permission": "ro" }, { "ResourceId": "ResourceId2", "Permission": "rw" } ], "AccessSysfs": "false", "Execution": { "IsolationMode": "GreengrassContainer", "RunAs": { "Uid": "1", "Gid": "10" } } } } } ] } }, "TestLoggerDefinition": { "Type": "AWS::Greengrass::LoggerDefinition", "Properties": { "Name": "DemoTestLoggerDefinition" } }, "TestLoggerDefinitionVersion": { "Type": "AWS::Greengrass::LoggerDefinitionVersion", "Properties": { "LoggerDefinitionId": { "Ref": "TestLoggerDefinition" }, "Loggers": [ { "Id": "TestLogger1", "Type": "AWSCloudWatch", "Component": "GreengrassSystem", "Level": "INFO" } ] } }, "TestResourceDefinition": { "Type": "AWS::Greengrass::ResourceDefinition", "Properties": { "Name": "DemoTestResourceDefinition" } }, "TestResourceDefinitionVersion": { "Type": "AWS::Greengrass::ResourceDefinitionVersion", "Properties": { "ResourceDefinitionId": { "Ref": "TestResourceDefinition" }, "Resources": [ { "Id": "ResourceId1", "Name": "LocalDeviceResource", "ResourceDataContainer": { "LocalDeviceResourceData": { "SourcePath": "/dev/TestSourcePath1", "GroupOwnerSetting": { "AutoAddGroupOwner": "false", "GroupOwner": "TestOwner" } } } }, { "Id": "ResourceId2", "Name": "LocalVolumeResourceData", "ResourceDataContainer": { "LocalVolumeResourceData": { "SourcePath": "/dev/TestSourcePath2", "DestinationPath": "/volumes/TestDestinationPath2", "GroupOwnerSetting": { "AutoAddGroupOwner": "false", "GroupOwner": "TestOwner" } } } } ] } }, "TestSubscriptionDefinition": { "Type": "AWS::Greengrass::SubscriptionDefinition", "Properties": { "Name": "DemoTestSubscriptionDefinition" } }, "TestSubscriptionDefinitionVersion": { "Type": "AWS::Greengrass::SubscriptionDefinitionVersion", "Properties": { "SubscriptionDefinitionId": { "Ref": "TestSubscriptionDefinition" }, "Subscriptions": [ { "Id": "TestSubscription1", "Source": { "Fn::Join": [ ":", [ "arn:aws:iot", { "Ref": "AWS::Region" }, { "Ref": "AWS::AccountId" }, "thing/TestDevice1" ] ] }, "Subject": "TestSubjectUpdated", "Target": { "Ref": "LambdaVersionArn" } } ] } }, "TestGroup": { "Type": "AWS::Greengrass::Group", "Properties": { "Name": "DemoTestGroupNewName", "RoleArn": { "Fn::Join": [ ":", [ "arn:aws:iam:", { "Ref": "AWS::AccountId" }, "role/TestUser" ] ] }, "InitialVersion": { "CoreDefinitionVersionArn": { "Ref": "TestCoreDefinitionVersion" }, "DeviceDefinitionVersionArn": { "Ref": "TestDeviceDefinitionVersion" }, "FunctionDefinitionVersionArn": { "Ref": "TestFunctionDefinitionVersion" }, "SubscriptionDefinitionVersionArn": { "Ref": "TestSubscriptionDefinitionVersion" }, "LoggerDefinitionVersionArn": { "Ref": "TestLoggerDefinitionVersion" }, "ResourceDefinitionVersionArn": { "Ref": "TestResourceDefinitionVersion" } }, "Tags": { "KeyName0": "value", "KeyName1": "value", "KeyName2": "value" } } } } }
YAML
Description: >- AWS IoT Greengrass example template that creates a group version with a core, device, function, logger, subscription, and resources. Parameters: CoreCertificateArn: Type: String DeviceCertificateArn: Type: String LambdaVersionArn: Type: String Resources: TestCore1: Type: 'AWS::IoT::Thing' Properties: ThingName: TestCore1 TestCoreDefinition: Type: 'AWS::Greengrass::CoreDefinition' Properties: Name: DemoTestCoreDefinition TestCoreDefinitionVersion: Type: 'AWS::Greengrass::CoreDefinitionVersion' Properties: CoreDefinitionId: !Ref TestCoreDefinition Cores: - Id: TestCore1 CertificateArn: !Ref CoreCertificateArn SyncShadow: 'false' ThingArn: !Join - ':' - - 'arn:aws:iot' - !Ref 'AWS::Region' - !Ref 'AWS::AccountId' - thing/TestCore1 TestDevice1: Type: 'AWS::IoT::Thing' Properties: ThingName: TestDevice1 TestDeviceDefinition: Type: 'AWS::Greengrass::DeviceDefinition' Properties: Name: DemoTestDeviceDefinition TestDeviceDefinitionVersion: Type: 'AWS::Greengrass::DeviceDefinitionVersion' Properties: DeviceDefinitionId: !GetAtt - TestDeviceDefinition - Id Devices: - Id: TestDevice1 CertificateArn: !Ref DeviceCertificateArn SyncShadow: 'true' ThingArn: !Join - ':' - - 'arn:aws:iot' - !Ref 'AWS::Region' - !Ref 'AWS::AccountId' - thing/TestDevice1 TestFunctionDefinition: Type: 'AWS::Greengrass::FunctionDefinition' Properties: Name: DemoTestFunctionDefinition TestFunctionDefinitionVersion: Type: 'AWS::Greengrass::FunctionDefinitionVersion' Properties: FunctionDefinitionId: !GetAtt - TestFunctionDefinition - Id DefaultConfig: Execution: IsolationMode: GreengrassContainer Functions: - Id: TestLambda1 FunctionArn: !Ref LambdaVersionArn FunctionConfiguration: Pinned: 'true' Executable: run.exe ExecArgs: argument1 MemorySize: '512' Timeout: '2000' EncodingType: binary Environment: Variables: variable1: value1 ResourceAccessPolicies: - ResourceId: ResourceId1 Permission: ro - ResourceId: ResourceId2 Permission: rw AccessSysfs: 'false' Execution: IsolationMode: GreengrassContainer RunAs: Uid: '1' Gid: '10' TestLoggerDefinition: Type: 'AWS::Greengrass::LoggerDefinition' Properties: Name: DemoTestLoggerDefinition TestLoggerDefinitionVersion: Type: 'AWS::Greengrass::LoggerDefinitionVersion' Properties: LoggerDefinitionId: !Ref TestLoggerDefinition Loggers: - Id: TestLogger1 Type: AWSCloudWatch Component: GreengrassSystem Level: INFO TestResourceDefinition: Type: 'AWS::Greengrass::ResourceDefinition' Properties: Name: DemoTestResourceDefinition TestResourceDefinitionVersion: Type: 'AWS::Greengrass::ResourceDefinitionVersion' Properties: ResourceDefinitionId: !Ref TestResourceDefinition Resources: - Id: ResourceId1 Name: LocalDeviceResource ResourceDataContainer: LocalDeviceResourceData: SourcePath: /dev/TestSourcePath1 GroupOwnerSetting: AutoAddGroupOwner: 'false' GroupOwner: TestOwner - Id: ResourceId2 Name: LocalVolumeResourceData ResourceDataContainer: LocalVolumeResourceData: SourcePath: /dev/TestSourcePath2 DestinationPath: /volumes/TestDestinationPath2 GroupOwnerSetting: AutoAddGroupOwner: 'false' GroupOwner: TestOwner TestSubscriptionDefinition: Type: 'AWS::Greengrass::SubscriptionDefinition' Properties: Name: DemoTestSubscriptionDefinition TestSubscriptionDefinitionVersion: Type: 'AWS::Greengrass::SubscriptionDefinitionVersion' Properties: SubscriptionDefinitionId: !Ref TestSubscriptionDefinition Subscriptions: - Id: TestSubscription1 Source: !Join - ':' - - 'arn:aws:iot' - !Ref 'AWS::Region' - !Ref 'AWS::AccountId' - thing/TestDevice1 Subject: TestSubjectUpdated Target: !Ref LambdaVersionArn TestGroup: Type: 'AWS::Greengrass::Group' Properties: Name: DemoTestGroupNewName RoleArn: !Join - ':' - - 'arn:aws:iam:' - !Ref 'AWS::AccountId' - role/TestUser InitialVersion: CoreDefinitionVersionArn: !Ref TestCoreDefinitionVersion DeviceDefinitionVersionArn: !Ref TestDeviceDefinitionVersion FunctionDefinitionVersionArn: !Ref TestFunctionDefinitionVersion SubscriptionDefinitionVersionArn: !Ref TestSubscriptionDefinitionVersion LoggerDefinitionVersionArn: !Ref TestLoggerDefinitionVersion ResourceDefinitionVersionArn: !Ref TestResourceDefinitionVersion Tags: KeyName0: value KeyName1: value KeyName2: value
See also
-
CreateGroup in the AWS IoT Greengrass Version 1 API Reference


A cache object that deletes the least-recently-used items.
var LRU = require("lru-cache")
, options = { max: 500
, length: function (n) { return n * 2 }
, dispose: function (key, n) { n.close() }
, maxAge: 1000 * 60 * 60 }
, cache = LRU(options)
, otherCache = LRU(50) // sets just the max size
cache.set("key", "value")
cache.get("key") // "value"
cache.reset() // empty the cache
If you put more stuff in it, then items will fall out.
If you try to put an oversized thing in it, then it’ll fall out right
away.
max
The maximum size of the cache, checked by applying the lengthInfinity
.maxAge
Maximum age in ms. Items are not pro-actively pruned outlength
Function that is used to calculate the length of storedfunction(n){return n.length}
. The default isfunction(n){return 1}
, which is fine if you want to store n
dispose
Function that is called on items when they are droppedkey, value
. It’s called beforenextTick
or setTimeout
callback or it won’t do anything.stale
By default, if you set a maxAge
, it’ll only actually pullget(key)
. (That is, it’ssetTimeout
or anything.) If you setstale:true
, it’ll return the stale value before deleting it. Ifundefined
when you try toset(key, value, max)
get(key) => value
Both of these will update the “recently used”-ness of the key.
They do what you think. max
is optional and overrides the
cache max
option if provided.
peek(key)
Returns the key value (or undefined
if not found) without
updating the “recently used”-ness of the key.
(If you find yourself using this a lot, you might be using the
wrong sort of data structure, but there are some use cases where
it’s handy.)
del(key)
Deletes a key out of the cache.
reset()
Clear the cache entirely, throwing away all values.
has(key)
Check if a key is in the cache, without updating the recent-ness
or deleting it for being stale.
forEach(function(value,key,cache), [thisp])
Just like Array.prototype.forEach
. Iterates over all the keys
in the cache, in order of recent-ness. (Ie, more recently used
items are iterated over first.)
keys()
Return an array of the keys in the cache.
values()
Return an array of the values in the cache.
length()
Return total length of objects in cache taking into account
length
options function.
itemCount()
Return total quantity of objects currently in cache. Note, that
stale
(see options) items are returned as part of this item
count.


Upload BagIt-Container (Authorization required)
Select (BagIt-)File:
Upload Date
Version
OCRD Identifier
URL
Files
Metadata
Ground Truth
Provenance
Text Regions
Download Zip


Class: Concurrent::CachedThreadPool
- Inherits:
-
ThreadPoolExecutor
- Object
- ThreadPoolExecutor
- Concurrent::CachedThreadPool
- Defined in:
- lib/concurrent/executor/cached_thread_pool.rb
Overview
Failure to properly shutdown a thread pool can lead to unpredictable results. Please read Shutting Down Thread Pools for more information.
A thread pool that dynamically grows and shrinks to fit the current workload. New threads are created as needed, existing threads are reused, and threads that remain idle for too long are killed and removed from the pool. These pools are particularly suited to applications that perform a high volume of short-lived tasks.
On creation a CachedThreadPool
has zero running threads. New threads are
created on the pool as new operations are #post
. The size of the pool
will grow until #max_length
threads are in the pool or until the number
of threads exceeds the number of running and pending operations. When a new
operation is post to the pool the first available idle thread will be tasked
with the new operation.
Should a thread crash for any reason the thread will immediately be removed from the pool. Similarly, threads which remain idle for an extended period of time will be killed and reclaimed. Thus these thread pools are very efficient at reclaiming unused resources.
The API and behavior of this class are based on Java's CachedThreadPool
Thread Pool Options
Thread pools support several configuration options:
idletime
: The number of seconds that a thread may be idle before being reclaimed.max_queue
: The maximum number of tasks that may be waiting in the work queue at any one time. When the queue size reachesmax_queue
and no new threads can be created, subsequent tasks will be rejected in accordance with the configuredfallback_policy
.auto_terminate
: When true (default) anat_exit
handler will be registered which will stop the thread pool when the application exits. See below for more information on shutting down thread pools.fallback_policy
: The policy defining how rejected tasks are handled.
Three fallback policies are supported:
:abort
: Raise aRejectedExecutionError
exception and discard the task.:discard
: Discard the task and return false.:caller_runs
: Execute the task on the calling thread.
Shutting Down Thread Pools
Killing a thread pool while tasks are still being processed, either by calling
the #kill
method or at application exit, will have unpredictable results. There
is no way for the thread pool to know what resources are being used by the
in-progress tasks. When those tasks are killed the impact on those resources
cannot be predicted. The best practice is to explicitly shutdown all thread
pools using the provided methods:
- Call
#shutdown
to initiate an orderly termination of all in-progress tasks - Call
#wait_for_termination
with an appropriate timeout interval an allow the orderly shutdown to complete - Call
#kill
only when the thread pool fails to shutdown in the allotted time
On some runtime platforms (most notably the JVM) the application will not
exit until all thread pools have been shutdown. To prevent applications from
"hanging" on exit all thread pools include an at_exit
handler that will
stop the thread pool when the application exits. This handler uses a brute
force method to stop the pool and makes no guarantees regarding resources being
used by any tasks still running. Registration of this at_exit
handler can be
prevented by setting the thread pool's constructor :auto_terminate
option to
false
when the thread pool is created. All thread pools support this option.
pool1 = Concurrent::FixedThreadPool.new(5) # an `at_exit` handler will be registered
pool2 = Concurrent::FixedThreadPool.new(5, auto_terminate: false) # prevent `at_exit` handler registration
Instance Method Summary collapse
-
#initialize(opts = {}) ⇒ CachedThreadPool
constructor
Create a new thread pool.
Constructor Details
#initialize(opts = {}) ⇒ CachedThreadPool
Create a new thread pool.
39 40 41 42 43 44 45 |
# File 'lib/concurrent/executor/cached_thread_pool.rb', line 39 def initialize(opts = {}) defaults = { idletime: DEFAULT_THREAD_IDLETIMEOUT } overrides = { min_threads: 0, max_threads: DEFAULT_MAX_POOL_SIZE, max_queue: DEFAULT_MAX_QUEUE_SIZE } super(defaults.merge(opts).merge(overrides)) end |


Next: Examples of Resolution of Apparent Conflict in Exceptional Situations, Previous: Treatment of Exceptional Situations, Up: Conforming Implementations
If more than one passage in this specification appears to apply to the same situation but in conflicting ways, the passage that appears to describe the situation in the most specific way (not necessarily the passage that provides the most constrained kind of error detection) takes precedence.


Stephanie Major
LinkedIn
Programming
Projects
About Me
Blog
Project .....
Project .......
Project ........ Hashes
Project ............ and attributes


The Image_Cache module caches frames of the displayed objects in data viewer.
module Image_Cache{ omethod+notify_inst create() = "CacheCreate"; omethod+req set_mode(.mode+notify+read+write+req ) = "CacheSetMode"; omethod+req set_capture(.capture+notify+read+req, .playback+nonotify+write ) = "CacheCapture"; omethod+req set_playback(.playback+notify+read+req, .capture+nonotify+write ) = "CachePlayback"; omethod+req set_frame(.frame_in+notify+read+req, .frame_out+nonotify+write ) = "CacheSetFrame"; omethod+req proc_trigger(.view+notify+read, .frame_out+nonotify+write, .num_frames+nonotify+write ) = "CacheProcessTrigger"; omethod+notify_deinst delete() = "CacheDestroy"; GDview_templ &view ; enum mode { choices = {"interactive","loop"}; } = "interactive"; Boolean capture ; Boolean playback ; int frame_in ; int frame_out ; int num_frames ; ptr hidden = 0; };
The Image_Cache module caches the frames of the movements of the displayed objects in the data viewer. In playback mode the cached frames are provided to the viewer with the set frame rate. The Image_Cache module records everything that covers the data window, except for the mouse pointer.
view
Input for the current view of the data viewer.
mode
"interactive" (=0) is used for the CineInteract macro. The recording must be stopped manually. "loop" (=1) is used for the CineLoop module. It starts frames from the beginning when the end value has been reached.
capture
Reference to the enable value, via the parameter block, which is referenced by the &CineParams input.
playback
Reference to the playback value, via the parameter block, which is referenced by the &CineParams input. In CineLoop this value is not required.
frame_in
Reference to the frame_in value of the Cine_Control module.
frame_out
Value of the currently shown frame.
frame_number
Number of all frames.
The Cache_Image module is used in the Functional Macro CineFunc and is cooperating with the Cine_Control module.
An example application CineInteractEg and CineLoopEg is provided, which uses the AVS/Express sample data file mri.fld, to show the functionality of the macro.
xp_comm_proj/cine/cine_mods.v contains the CineParams group, the Image_Cache module and the Cine_Control module V definitions.
unknown
Gorden Tausch Manchester Visualization Centre Tobias Schiebeck Manchester Visualization Centre
Cine_Control, CineInteract and CineLoop.


| Language | ||
| Character | ||
|
Frames of human timing error per box |
||
| Category |
| Language | ||
| Character | ||
|
Frames of human timing error per box |
||
| Category |
The first line of text should be the name of your route.
After that, each line of text should be one of the following:
A level, such as Good Egg 1
, or
Honeyhive Comet
, or Bowser's Star Reactor
.
-
separator.
So for Good Egg 1, you can put Good Egg 1
,
Dino Piranha
, or Good Egg 1 - Dino Piranha
.Good Egg C
, Good Egg Comet
, or Good Egg 4
.Good Egg P
,
Good Egg purples
, Good Egg purple coins
,
Good Egg purple comet
, or Good Egg 5
.H
,
Hidden
, Hidden Star
, S
,
Secret
, Secret Star
, L
,
Luigi
, Luigi Star
, G
,
Green
, and Green Star
.9. Bowser Jr.'s Robot Reactor
or
9) Bowser Jr.'s Robot Reactor
.
Your star number will simply be ignored, since the route processor
figures out the star number.Battlerock H (star 2's hidden star)
An action, such as > Feed Terrace Hungry Luma
,
or > Talk to Luigi at Garage
.
>
character at the
start of a line.A comment. Put a *
character at the
start of a line to make it a comment. Comments are just notes for
a person reading the route; they are not used for route processing.
This page is open source on GitHub.


Just a few notes before the conference starts! We want to make sure everybody has the latest info.
Remember, registration starts at 8:00 AM on Oct 17. When you arrive at Microsoft Cambridge and the NERD Center, you may have to sign in at the security desk. If not, just direct yourselves to the elevator and the conference is upstairs on the first floor. Please have your ticket with the barcode readily available. We'll scan you as you enter into the doors after stepping off the elevators. You can either print it out or display it on your phone. If you have an iPhone and have upgraded to iOS 6, you can fill out this form to add your ticket to Passbook.
Wi-Fi is availabe at the conference. Connect to the "Cambridge" network SSID and you can join by using the password: mm1017
Use the hash tag #MonkeySpace on Twitter to tweet about the conference.
If you're interested, come hang out and discuss the conference in the MonkeySpace room on jabbr.net.
If you have any questions, please don't hesitate to ask.


Intro
This post sheds light on a common pitfall of the Python multiprocessing
module: spending too much time serializing and deserializing data before shuttling it to/from your child processes. I gave a talk on this blog post at the Boston Python User Group in August 2018
Generally speaking, concurrent programming is hard. Luckily for us, Python’s multiprocessing.Pool
abstraction makes the parallelization of certain problems extremely approachable.
from multiprocessing import Pool
def sqrt(x):
return x**.5
numbers = [i for i in range(1000000)]
with Pool() as pool:
sqrt_ls = pool.map(sqrt, numbers)
The basic idea is that given any iterable of type Iterable[T]
, and any function f(x: T) -> Any
, we can parallelize the higher-order function map(f, iterable)
with 1 line of code. The above iterates over 1 million integers, and in parallel, calculates the sqrt
of each integer, utilizing all CPUs on our machine.
That said, this post is about getting into trouble, not about the simple case above.
A More Complex Case: IntToBitarrayConverter
Our toy class will do just what it says it does: convert ints
to their binary representation of 0s and 1s. Specifically, our implementation will return a bitarray as a numpy.ndarray
. Our class also stores a cache of int
-> str
, implemented as a simple dict
, which quickly converts int
keys to str
values (bitstrings).
class IntToBitarrayConverter():
def set_bitstring_cache(self, bitstring_cache: Dict):
self.bitstring_cache = bitstring_cache
def convert(self, integer: int) -> np.ndarray:
bitstring = self.bitstring_cache[integer]
# cache the step of bitstring = format(integer, 'b')
return self._bitstring_to_ndarray(bitstring)
@staticmethod
def _bitstring_to_ndarray(bitstring) -> np.ndarray:
arr = (np.fromstring(bitstring, 'u1') - 48)
return arr
Note: that
np.fromstring(bitstring, 'u1') - 48
parses the str as the 8-bit integer ASCII values of the ‘0’ and ‘1’ chars (48 and 49 respectively), and subtracts 48 to yield binary data.
We can convert 1000000 ints
to their np.ndarray
bitarray representations with the code below:
CACHE_SIZE = 1024 * 1024 # 40 MB
ITER_SIZE = 1000000 # 1 million
int_to_bitarr_converter = IntToBitarrayConverter()
int_to_bitarr_converter.set_bitstring_cache(
{key: format(key, 'b') for key in range(CACHE_SIZE)})
ndarray_bitarr_ls = list(
map(int_to_bitarr_converter.convert,
(random.randint(0, CACHE_SIZE - 1)
for _ in range(ITER_SIZE))))
Running the above on my 2017 Macbook Pro, I see a wall time of 4.94s. Five seconds is not an extraordinarily long span of time, but I am greedy, and I want to run this concurrently and speed things up. Fortunately, this is easy with our Pool
abstraction:
from multiprocessing import Pool
CACHE_SIZE = 1024 * 1024 # 40 MB
ITER_SIZE = 1000000 # 1 million
int_to_bitarr_converter = IntToBitarrayConverter()
int_to_bitarr_converter.set_bitstring_cache(
{key: format(key, 'b') for key in range(CACHE_SIZE)})
with Pool() as pool:
ndarray_bitarr_ls = pool.map(
int_to_bitarr_converter.convert,
(random.randint(0, CACHE_SIZE - 1)
for _ in range(ITER_SIZE))))
Running the above on the same machine, this takes 32.5s. This a 600% slow-down! What is going on?
Stuck in a Pickle
Link to Boston Python User Group Lightning Talk Diagram
Under the hood, our call to pool.map(...)
does the following:
- Initializes 3
Queues
:- The
taskqueue
which holdstuple
oftasks
:(result_job, func, (x,), {}
).- We only care about
(x,)
above. This holds our functionconvert()
, and a chunk of elements from ouriterable
.
- We only care about
- The
inqueue
, which holds serialized (pickled)tasks
. - The
outque
, which will holds serialized (pickled) return values of eachtask
.
- The
- Creates a pool of “worker”
Processes
, which are responsible for:- Removing tasks from the
inqueue
, which are deserialized, and executing thetask
. - Executing each
task
, and sending the results to theoutqueue
, where it is serialized and stored.
- Removing tasks from the
- Creates 3
Threads
which manage the above 3Queues
:- The
_task_handler
which populates theinqueue
with pickledtask
objects, from thetaskqueue
- The
_worker_handler
which “reuses” workers by re-creating them once their work is done. - The
_result_handler
which “removes” elements off of theoutqueue
, which are deserialized, and returned to your parent process call toPool.map()
.
- The
Re-read the above again and note everywhere you read serialize
, deserialize
or pickle
. Objects must be serialized
to a str
before being shuttled to each process, and then that process must deserialize
that str
to re-create the object. This needs to happen on the return journey of the data also. That’s 2 calls to pickle.dumps()* and **2 calls to pickle.loads() per task!
Note: Time spent serializing & deserializing is the overhead that we pay in exchange for multiprocessed concurrency. If this takes longer than the execution of the
convert()
function, we are wasting out time! Raymond Hettinger explains this well in his talk here, and I build on our toy example in this post to investigate further.
A Tricky Task
When all fails, drop in a debugger. Let’s find where _task_handler
Thread appends a task
onto the inqueue
, and investigate the size and composition of this task
. (github link)
@staticmethod
def _handle_tasks(taskqueue, put, outqueue, pool, cache):
thread = threading.current_thread()
for taskseq, set_length in iter(taskqueue.get, None):
task = None
try:
# iterating taskseq cannot fail
for task in taskseq:
if thread._state:
util.debug('task handler found thread._state != RUN') break
try:
import ipdb; ipdb.set_trace()
put(task)
Let’s print the 3rd element of our task
, the single-element tuple
mentioned above as (x,)
:
ipdb> args_tuple = task[3]
ipdb> elem = args_tuple[0]
ipdb> func = elem[0]
ipdb> func_args = elem[1]
ipdb> func
<bound method IntToBitarrayConverter.convert of <caches.IntToBitarrayConverter object at 0x1122d60f0>>
ipdb> func_args
(612, 640, 176, 806, 372, 895, 345, 15, 173, ... 449)
In the call to put(task
) above, our func_args
and func
will be serialized. The serialization of func_args
is trivial: these are ints
.
However, on further inspection, our <bound method...of object...>
should raise concern! This is an instance method, meaning it holds the entire IntToBitarrayConverter
object:
ipdb> func.__self__
<caches.IntToBitarrayConverter object at 0x1122d60f0>
Further, there is a 40 MB dict
on this object accessed via the bitstring_cache
attribute:
ipdb> func.__self__.bitstring_cache
{0: '0', 1: '1', 2: '10', 3: '11', 4: '100', 5: '101'...1048576: '100000000000000000000'}
ipdb> import sys
ipdb> sys.getsizeof(func.__self__.bitstring_cache) / 1024 / 1024
40
This explains our 600% slowdown. We are pickling/unpickling a 40 MB dict
4 times per task
!
Serial (Performance) Killers
Here is the actual profiled breakdown, produced with blood, sweat and several debug statements in a non-optimized local copy of the multiprocessing
package.
| Process | dumps() calls | dumps() time(s) | avg | loads() calls | loads() time(s) | avg |
|---|---|---|---|---|---|---|
| Parent | 42 | 3m36s | 5.14s | 33 | 4.34s | .13s |
| 1 | 4 | 5.37s | 1.34s | 5 | 2.98s | .59s |
| 2 | 4 | 5.12s | 1.28s | 5 | 3.01s | .60s |
| 3 | 4 | 5.18s | 1.29s | 5 | 3.75s | .75s |
| 4 | 4 | 5.74s | 1.43s | 5 | 2.95s | .59s |
| 5 | 4 | 5.09s | 1.27s | 5 | 3.01s | .60s |
| 6 | 4 | 5.14s | 1.28s | 5 | 2.96s | .59s |
| 7 | 4 | 5.79s | 1.44s | 4 | 2.96s | .74s |
| 8 | 4 | 5.13s | 1.28s | 5 | 3.52s | .70s |
How exactly did this happen?
OOP: Object-oriented Programming Problems
An instance method is a method which is called on an object, and has the object available within the scope of the method. In C++ and Javascript, we access the bound object
via the variable this
. In Python, we use self
.
Recall the method convert(...)
, on our toy class, found below:
def convert(self, integer: int) -> np.ndarray:
bitstring = self.bitstring_cache[integer]
return self._bitstring_to_ndarray(bitstring)
Once our object IntToBitarrayConverter
is created, the object is bound to the method convert(...)
. This means when we pass our method to Pool.map(...)
, we are implicitly passing a reference to the object as well.
Passing an instance method to Pool.map(...)
is OK, so long as the instance is not large. That said, a rule-of-thumb is to use @staticmethods
or regular unbound functions when using Pool
, to explicitly avoid this scenario. Otherwise you are at the mercy of the size of data that consumers add to your object.
The big takeaway here is that we spend 3m 35s in the parent process continuously pickling our bitstring_cache
so it can be sent to our children.
A Global Solution
The proposed solution of using unbound methods may not be appealing. Often times we need additional state to apply our mapped function f(x)
across our iterable
. Each worker process may need to do things like:
- Acquire a database connection to fetch or update data.
- Access an in-memory cache, like our
dict
cache example above.
Fortunately, the general concept of initializaing each Pool worker
process so that it has access to an unpickable object like a database engine, or a large object like our bitstring_cache is supported, with limitations…
We continue our example here for a solution to our problem using global variables.
A Global Correct Solution
Unfortunately, global variables shatter encapsulation, and in my opinion, are not a satisfying solution. I’ve begun work on a Pull Request augmenting the current initializer
kwarg used to initialize Pool workers, while maintaining encapsulation. Please check out my work so far, and leave feedback. New test coverage is in progress. I will update when complete once a PR has been opened. No existing tests/interfaces have been broken.


home
eng
company
text1
text2
text3
text4
management innovation
text1
text2
text3
text4
portfolio
text1
text2
text3
text4
sustainability management
text1
text2
text3
text4
recruit
Your browser does not support the video tag.


This is a sub-structure in CSL_Aif2LinkSetup. This structure is used for configuring the parameters of protocol decoder. More...
#include <csl_aif2.h>
Data Fields | |
| Bool | bEnablePdLink |
| Uint8 | CpriEnetStrip |
| Uint8 | Crc8Poly |
| Uint8 | Crc8Seed |
| Uint8 | PreEncBitmap |
| Uint8 | PostEncBitmap |
| CSL_Aif2CpriCwPktDelim | CpriCwPktDelimitor [4] |
| Uint16 | CpriCwNullDelimitor |
| Uint8 | PdPackDmaCh [4] |
| Bool | bEnablePack [4] |
| CSL_Aif2CrcLen | PdCpriCrcType [4] |
| Bool | bEnableCpriCrc [4] |
| CSL_Aif2DualBitMap | PdCpriDualBitMap |
| CSL_Aif2PdTypeLut | PdTypeLut [32] |
| Uint8 | CpriDmaCh [128] |
| Bool | bEnableCpriX [128] |
| Bool | bEnableCpriPkt [128] |
| Uint8 | Cpri8WordOffset [128] |
| Uint8 | CpriCwChannel [256] |
| Bool | bEnableCpriCw [256] |
| Bool | bHyperFrameEop [256] |
This is a sub-structure in CSL_Aif2LinkSetup. This structure is used for configuring the parameters of protocol decoder.
| Bool CSL_Aif2PdLinkSetup::bEnableCpriCrc[4] |
enable pd cpri crc
| Bool CSL_Aif2PdLinkSetup::bEnableCpriCw[256] |
All possible CPRI CW per hyperframe. Dicatates whether the control word should be captured at all
| Bool CSL_Aif2PdLinkSetup::bEnableCpriPkt[128] |
DBMF CPRI Stream LUT: dicates the cpri payload is to be used as AxC (normal) or Packet traffic
| Bool CSL_Aif2PdLinkSetup::bEnableCpriX[128] |
DBMF CPRI Stream LUT: enable-disable of channel, for each value of DBM X count.
| Bool CSL_Aif2PdLinkSetup::bEnablePack[4] |
enable pd cpri pack
| Bool CSL_Aif2PdLinkSetup::bEnablePdLink |
Boolean indicating if Pd link is to be enabled
| Bool CSL_Aif2PdLinkSetup::bHyperFrameEop[256] |
All possible CPRI CW per hyperframe. identifies which control word slot is eop for each stream
| Uint8 CSL_Aif2PdLinkSetup::Cpri8WordOffset[128] |
Fine AxC offset. Used in the front end of PD to align word data into QWords. bit [1:0] are offset into a QWord. bit[2] give RSA double QWork alignment. Bit[2] and corresponding axc_offset[0] should always be programmed to be identical
| Uint8 CSL_Aif2PdLinkSetup::CpriCwChannel[256] |
All possible CPRI CW per hyperframe are are mapped to one of four(0~3) CPRI CW staging areas
| Uint16 CSL_Aif2PdLinkSetup::CpriCwNullDelimitor |
CPRI Conrol Word Null Delimitor. Used instead of 4B/5B for packet delimitation. Only used when enabled by CpriCwPktDelimitor fields
| CSL_Aif2CpriCwPktDelim CSL_Aif2PdLinkSetup::CpriCwPktDelimitor[4] |
CRPI Control Word 4B/5B encoding enable for 4 channels
| Uint8 CSL_Aif2PdLinkSetup::CpriDmaCh[128] |
DBMF CPRI Stream LUT: AxC:used to map DBM X count to DMA channel. PKT:2 lsb indicates 0-3 PKT packing circuit (assumed 4B/5B encoding)
| Uint8 CSL_Aif2PdLinkSetup::CpriEnetStrip |
CPRI: bit3-0 enables stripping Ethernet headers for chan3-0 OBSAI: unused
| Uint8 CSL_Aif2PdLinkSetup::Crc8Poly |
CRC: programmable polynomial for CRC8 (other polynomials are fixed)
| Uint8 CSL_Aif2PdLinkSetup::Crc8Seed |
CRC: programmable seed value for CRC8 (other polynomials are fixed)
| CSL_Aif2CrcLen CSL_Aif2PdLinkSetup::PdCpriCrcType[4] |
PD CRC setup structure
| CSL_Aif2DualBitMap CSL_Aif2PdLinkSetup::PdCpriDualBitMap |
Dual bit map structure for Pd CPRI dual bit map rule FSM
| Uint8 CSL_Aif2PdLinkSetup::PdPackDmaCh[4] |
PD CPRI Pack map structure
| CSL_Aif2PdTypeLut CSL_Aif2PdLinkSetup::PdTypeLut[32] |
32 Pd Type LUT structure
| Uint8 CSL_Aif2PdLinkSetup::PostEncBitmap |
CPRI Control word post packing bit order control (used for changing endianness)
| Uint8 CSL_Aif2PdLinkSetup::PreEncBitmap |
CPRI Control word pre packing bit order control (used for changing endianness)


It is a neutral color or achromatic color, meaning literally that it is a color "without color",
because it can be composed of black and white.
The neutrality of gray gives us the ability to meditate and invisible.
Gray has the ability to show 'nothing' that other colors do not have.
|


Faster Techniques For 3D Orientation Reconstruction
1 Background: Real Projective Plane \(\mathbb{RP}^2\)
\begin{itemize}
\item Set of all infinite lines through the origin
\item Two dimensional space
\item Not a vector space!
\item Single dipole orientations live in the real projective plane
\item The sphere \(\mathbb{S}^2\) is a \textit{double cover} of \(\mathbb{RP}^2\)
\item The sphere \(\mathbb{S}^2\) can be \textit{embedded} in 3D Euclidean space \(\mathbb{R}^3\)
\end{itemize}
2 Watson Distribution
\begin{center}
\includegraphics[width=1.0\textwidth, interpolate=true]{figs/watson.pdf}\\
\end{center}
\begin{align*}
&f(\mh{r}; \bs{\hat{\mu}}, \kappa) = \frac{1}{4\pi{}_1F_1\left(\frac{1}{2}, \frac{3}{2}, \kappa\right)}\text{exp}\{\kappa (\bs{\hat{\mu}}^T\mh{r})^2\}\\
&r \in \mathbb{RP}^2, \hat{\mu} \in \mathbb{RP}^2, \kappa \in \mathbb{R}
\end{align*}
\begin{itemize}
\item Expensive special function \({}_1F_1\)
\item Can't take integrals or derivatives wrt \(\kappa\)
\item Can't take intensity integrals wrt \(\hat{\mu}\)
\end{itemize}
3 Central Angular Gaussian Distribution
\begin{align*}
&f(\mh{r}; \mathbf{A}) = \frac{r^T\mathbf{A}r}{|\mathbf{A}|}\\
&r \in \mathbb{RP}^2\\
&\mathbf{A}\ \text{is a}\ 3\times 3\ \text{positive definite matrix}
\end{align*}
\begin{itemize}
\item Projection of a Gaussian in \(\mathbb{R}^3\) into \(\mathbb{RP}^2\)
\item \(\mathbf{A}\) defines a ellipsoid.
\item Too general for us. We want rotational symmetry.
\end{itemize}
4 Spheroid Distribution
\vspace{-1em}
\begin{center} \includegraphics[width=1.0\textwidth, interpolate=true]{figs/spheroid.pdf} \end{center}\vspace{-4em}
\begin{align*} f(\mh{r}; \mathbf{A}) = \frac{r^T\mathbf{A}r}{|\mathbf{A}|} \end{align*}\vspace{-1em}
\begin{itemize} \item \(\mathbf{A}\) is a 3 \(\times\) 3 positive definite matrix with 3 orthonormal evecs. \item The first evec is pointed along the symmetry axis \(\hat{\mu} \in \mathbb{RP}^2\) \item The other two evecs are have the same eigenvalue. \item The ratio of the symmetry evalue to orthogonal evalues is \(\kappa^2\). \item Cheap to compute. Can take derivatives and integrals. \item \(\kappa\) has an easy interpretation---ratio of symmetry axis radius to orthogonal axis radius \item Matches Rudolf's previous work with birefringent materials. We're comfortable reasoning about spheroids. \end{itemize}5 Next Topic: Optimization Problem
\begin{align*}
f&: \mathbb{S}^2 \rightarrow \mathbb{R}\\ \\
x^* &= \underset{x\in \mathbb{S}^2}{\mathrm{argmin}}\ f(x)
\end{align*}
\begin{itemize}
\item What is the gradient of \(f\)?\\
\item Use spherical coordinates (\(\theta\), \(\phi\)). \(\nabla f \stackrel{?}{=} \left(\frac{\partial f}{\partial \theta}, \frac{\partial f}{\partial \phi})\)
\item Step size is different at different points on the sphere.
\item Gradient depends on the coordinate choice.
\item Trouble at the poles!
\end{itemize}
6 Instead optimize on a manifold
\begin{center}
\includegraphics[width=0.4\textwidth, interpolate=true]{figs/book.png}\\
\end{center}
7 Rough Recipe For Optimizing On A Manifold
\begin{enumerate}
\item Let \(f:\mathbb{S}^2 \rightarrow \mathbb{R}\) be the function we want to optimize.
\item {Embed the manifold in Euclidean space and define a new smooth function \(\bar{f}: \mathbb{R}^3 \rightarrow \mathbb{R}\). If we
constrain \(\bar{f}\) to \(\mathbb{S}^2\) then we recover \(f\).}
\item Choose an initial guess on \(\mathbb{S}^2\).
\item Take the usual Euclidean gradient of \(\bar{f}\). \(\nabla \bar{f} = \left(\frac{\partial f}{\partial x}, \frac{\partial f}{\partial y}, \frac{\partial f}{\partial z})\)
\item Project the Euclidean gradient onto the tangent space of \(\mathbb{S}^2\). This projected gradient is called the \textit{Riemannian gradient}.
\item Update your guess by moving along the Riemannian gradient.
\item \textit{Retract} your new guess from the tangent space back onto \(\mathbb{S}^2\).
\item Repeat from step 4.
\end{enumerate}
8
\begin{center}
\includegraphics[width=1.0\textwidth, interpolate=true]{figs/tangent.pdf}\\
\end{center}
9 Summary + Work In Progress
\begin{itemize}
\item A central angular Gaussian distribution with rotational symmetry gives the spheroid distribution.
\item Spheroid distributions are easier to handle than Watson distributions.
\item I'm working on integrating the spheroid distribution analytically which will yield a much faster forward model.
\item Optimizing on an embedded manifold allows us to calculate gradients correctly.
\item Multiple seed gradient methods will be much faster than the gradient-free particle swarm methods I've been using.
\item Initial seed could be generated with Rudolf's proposed change of coordinates.
\end{itemize}


HTML before
HTML before
HTML before
woo
right
bar
main panel with
a link
.
yay
HTML after
HTML after
HTML after