Basic layout. Tabindex="0" added to each pane to test for tab order matching source code order. Tab order should be: left, right, top, middle/main, bottom
Advanced layout. Tabindex="0" added to each pane to test for tab order matching source code order. Tab order should be: left, top, bottom, inner left, inner middle, inner right. This is not an ideal tab order. See below to use nested layout containers to achieve a tab order which matches presentation and source code order.
Advanced layout with nested containers. Tabindex="0" added to content panes to show tab order. Order should be: left, top, inner left, inner middle, inner right, bottom. This is the preferred tab order for this type of layout.
Goofy spiral layout. Match of source code order to tab order can not be achieved with this type of layout.


"Honey, I shrunk the function!"
Recursion is fun, and it makes code really clean and succinct. But what if we could make it even cleaner? We can, thanks to Coconut's Addpattern functionality.
Here's where we left off:
def factorial(n):
"""Compute n! where n is an integer >= 0."""
case n:
match 0:
return 1
match _ is int if n > 0:
return n * factorial(n-1)
# Test cases:
-1 |> factorial |> print # TypeError
0.5 |> factorial |> print # TypeError
0 |> factorial |> print # 1
3 |> factorial |> print # 6
Using Addpattern, we can tell Coconut to basically do the recursion for us. Here's the syntax for that:
def factorial(0) = 1
@addpattern(factorial)
def factorial(n is int if n > 0) =
"""Compute n! where n is an integer >= 0."""
range(1, n+1) |> reduce$(*)
# Test cases:
-1 |> factorial |> print # MatchError
0.5 |> factorial |> print # MatchError
0 |> factorial |> print # 1
3 |> factorial |> print # 6


{% extends 'base.html' %} {% block content %}
You're about to sign up for the {{ plan_tag }} plan for the AVWX REST API. Click the button below to finish. Your card will be charged after the 14-day free trial has ended.
{% if config.ENV == 'development' %}Since the app is in development: use the following Stripe card numbers and make up the rest:
Check their documentation for a full list of test credit card numbers
{% endif %} {% endblock %}


Part of elita.views View In Hierarchy
| Method | __init__ | Undocumented |
| Method | GET | Undocumented |
Inherited from GenericView:
| Method | get_created_datetime_text | Undocumented |
| Method | sanitize_doc_created_datetime | created_datetime field in doc (as supplied by DataService) is a Python datetime object and is not serializable to JSON. If field exists on doc, convert to string in ISO format |
| Method | run_async | Undocumented |
| Method | deserialize_attributes | Undocumented |
| Method | check_against_existing | Undocumented |
| Method | get_unknown | Undocumented |
| Method | get_username | Get username of requester |
| Method | user_check_password | Used by UserView/UserPermissionsView to verify password or auth_token (but only token from the context user) |
| Method | check_patch_body | Verify that the keys in the provided JSON body are either: a) a strict subset of the keys in the context object; b) a valid JSON Patch document only affecting valid paths |
| Method | call_action | Undocumented |
| Method | __call__ | Undocumented |
| Method | check_params | Undocumented |
| Method | get_submitted_token | Undocumented |
| Method | setup_permissions | Undocumented |
| Method | set_params | Undocumented |
| Method | return_action_status | Undocumented |
| Method | status_ok | Undocumented |
| Method | Success | Undocumented |
| Method | Error | Undocumented |
| Method | POST | Undocumented |
| Method | PUT | Undocumented |
| Method | DELETE | Undocumented |
| Method | PATCH | Undocumented |
| Method | UNKNOWN_VERB | Undocumented |
| Method | UNIMPLEMENTED | Undocumented |
| Method | UNAUTHORIZED | Undocumented |
| Method | MISSING_PARAMETER | Undocumented |


Can a dashboard of interactive non-geospatial visualisations of network topology and NetFlow data effectively communicate network structure, latencies and network traffic information about a network to the network managers of African NRENs?
Can one efficiently and reliably collect traceroute data for the purpose of this project, reducing the number of measurements to perform and increasing the accuracy of these managements?
Can a geospatial visualisation effectively and accurately communicate the network topology of African NRENs, allowing users to identify networks, where they connect and the routes this traffic traverses as well as convey network traffic information such as latencies and network traffic type?


Case study: MariaDB ColumnStore
A recent project I worked on provided an opportunity to work with MariaDB ColumnStore.
The Product
The product is a business intelligence application. Its main view, a very comprehensive dashboard with an abundance of counters, showing all operational aspects: from server status, database backups, support tickets and SLA to datacenter atmospheric conditions.
In the middle of all this: several MariaDB databases fed through multiple ETL jobs.
As the application grew, the dashboard got increasingly more intricate. The tables got bigger and the queries slower. To cope with the higher load, aggregate tables were added at some point. These tables contained precomputed subtotals for various predefined filters.
The Issue
The aggregate tables worked really well for a very long time. However, it still had its downsides, all of which got worse as data ingestion rate increased:
- db schema and operation gets more complex
- tables need to be updated frequently as new data is added
- higher resource utilization, locks and timeouts during update jobs
- even on the best cases, some lag between precomputed and actual data is always present
That last one was causing the big trouble. Dashboards where getting out of date fast, new data was being added faster than it could be processed. As a result, users where more frequently seeing stale data.
The Requirements
The main requirement is to have the dashboards to be as close as possible to real time, while keeping page load times within reason.
Several solutions were proposed, including partitioning, sharding and adding more replication slaves. After talking and discussing options, we settled trying out MariaDB ColumnStore.
Some reasons we thought it would be a good solution:
- Familiarity: They were already running MySQL and MariaDB.
- Simplicity: We could get rid of the aggregate tables and their update processes.
- Integration: No need to overhaul the whole setup, we could copy the tables at our convenience.
The ColumnStore
MariaDB ColumnStore (CS) is a special version of MariaDB, it supports all the traditional MariaDB features while providing an additional storage engine: ColumnStore, for columnar-based tables.
But while MariaDB has a 1 query = 1 CPU restriction, CS is all about parallelism. Not only a single query can be processed by multiple CPUs: queries can be distributed among multiple CS servers,
The Test
For the test I was given a modest VM with 8 CPUs and 15 GB of RAM. We picked a pilot table, extracted one month worth of data from the table (about 5M rows) and proceded to run the tests.
As a “control group”, a vanilla MariaDB server was installed and the usual production queries were benchmarked.
Then the second phase began: after removing MariaDB, a CS server was installed and data imported in a ColumnStore table. Again, bechmarks were run.
Here are the times to compute an aggregate table:
| InnoDB | ColumnStore | |
|---|---|---|
| Query Time | 7.549 s | 0.169 s |
Quite impressive: about 44 times faster.
We can’t claim victory yet, as this does not really reflect the actual user experience. Remember the app is fed from the precomputed aggregate table.
The real test is about estimating page load time. How does the realtime aggregation compares against getting the precomputed table?
| Query Time | 1 thread | 2 threads | 4 threads |
|---|---|---|---|
| InnoDB | 0.005 s | 0.006 s | 0.010 s |
| ColumnStore | 0.169 s | 0.242 s | 0.443 s |
From the user perspective, performance with CS is worse, the page load time increases in about 2 orders of magnitude. True, the data show is as realtime as possible. But can we do better?
Yes, of course. So far we only scratched the surface.
MariaDB ColumnStore has 3 modes of operation, these can be set at global level or session level:
- Mode 0: generic row-by-row mode, highly compatible but much slower.
- Mode 1: distributed, very fast but non-parallelizable queries are rejected.
- Mode 2: automatic, switches between mode 0 and 1 depending on query.
Mode 1 is the default, which means it wants to be fed good queries. To make the previous tests work, I had to switch to mode 0, so we’re not getting the best possible performance.
With a surprisingly little bit of rewriting, the same queries were running on mode 1.
Let’s see how well it does:
| Query Time | 1 thread | 2 threads | 4 threads |
|---|---|---|---|
| InnoDB (aggregate) | 0.005 s | 0.006 s | 0.010 s |
| ColumnStore (mode 1) | 0.048 s | 0.068 s | 0.117 s |
| ColumnStore (mode 0) | 0.169 s | 0.242 s | 0.443 s |
Query times improved a lot, realtime mode 1 takes only 1 order of magnitude more than getting the precomputed data, that’s quite a feat. Page load times are still worse, but it’s very much within the usual latency for a web application.
The Solution
Once the plan was green-lighted, I proceeded to install a proper CS server (only one node for now, but we can add more later).
To provide load-balancing a MariaDB MaxScale proxy was added. This proved a key component as it also allows to capture changes on the main db, which are then sent to CS without needing to modify any other processes.
With proper load balancing in place, we took to opportunity to add more slave replicas to increase the performance of the general queries.
Caveats
Some problems we encountered along the way:
- Not all queries were as easy to optimize for mode 1.
- Not all aggregation functions are available for CS tables:
Things like
SUM(FIND_IN_SET(code,'0,1'))
don’t work. In some cases, we had to add additional columns to work around this.
- Datatypes in CS are more strict than in MariaDB, JOINS require types to match much more closely.
- Some queries where trying to aggregate too many columns at a time, which probably made sense of a Row based database. But for CS we found it’s better to split them in separate queries.
- Big joins can fail due to lack of memory, disk-based joins are disabled by default. Enabling the feature fixes the issue, but performance goes down fast. As a result, we had to tweak joins and where conditions on some queries.
Related links
- MariaDB ColumnStore: https://mariadb.com/kb/en/library/mariadb-columnstore/
- Operating modes: https://mariadb.com/kb/en/library/columnstore-operating-mode/
- Aggregate functions: https://mariadb.com/kb/en/library/columnstore-distributed-aggregate-functions/
- MariaDB MaxScale: https://mariadb.com/kb/en/maxscale/
- Change Data Capture: https://mariadb.com/kb/en/mariadb-maxscale-22-change-data-capture-cdc-protocol/
Thanks
I’d like to thank the customer who very graciously allowed me to publish this entry and share the experience.
Later
Tomas


For larger data access or to access PBD-peptide interaction predictions, refer to the uploaded data at synapse.org
Funding: U54-CA225088 (NIH), P50-GM107618 (NIH) and W911NF-14-1-0397 (DARPA / DOD)
© 2018, Laboratory of Systems Pharmacology. All rights reserved.


Meta data
They are important to keep file organization.
Refresh page
We can set a refresh interval within
meta
content


Deep_diagnose
An automated and efficient way for diagnosis
Report of diagnosis
Patient Name:
{{name}}
Medications
Date of Diagnosis:
{{date}}
Itraconzole
Terbinafine
Griseofulvin
Sertoconazole
Luliconazole
Clotrimazole
Antihistaminic
Time of Diagnosis:
{{time}}
Result of Diagnosis:
{{result}}
Print


1. How to extend the library by deriving your own classes
2. How do traversers work?
3. How to add new traversers.
4. How to add ROUTEs to user derived classes
5. How to build the libraries
6. What to ship with your applications.


Under development released at DerbyCon 2018 by byt3bl33d3r, the maker of crackmapexec (amazing)
https://www.youtube.com/watch?v=NaFiAx737qg
https://github.com/byt3bl33d3r/silenttrinity
A post-exploitation agent powered by Python, IronPython, C#/.NET
Requirements
Server requires Python >= 3.7
SILENTTRINITY C# implant requires .NET >= 4.5
Python 3.7 should be included in Kali, but you have to specify it directly every time.
Probably also useful for apt install python3.7-dev python3-pip
python3.7 -m pip install -r requirements.txt
python3.7 st.py
Notes
.NET runtime support
The implant needs .NET 4.5 or greater due to the IronPython DLLs being compiled against .NET 4.0, also there is no ZipArchive .NET library prior to 4.5 which the implant relies upon to download the initial stage containing the IronPython DLLs and the main Python code.
Reading the source for the IronPython Compiler it seems like we can get around the first issue by directly generating IL code through IKVM (I still don't understand why this works). However this would require modifying the compiler to generate a completely new EXE stub (definitely feasible, just time consuming to find the proper IKVM API calls).
C2 Comms
Currently the implant only supports C2 over HTTP 1.1, .NET 4.5 seems to have a native WebSocket library which makes implementing a WS C2 channel more than possible.
HTTP/2 client support for .NET's HttpClient API is in the works, just not yet released.
The implant and server design are very much "future proof" which should make implementing these C2 Channels pretty trivial when the time comes.


What is FeatherGUI?
FeatherGUI is a GUI abstraction layer that seperates logic from implementation. Instead of abstracting over a hardcoded set of existing GUI APIs, FeatherGUI implements an abstraction layer you then implement in your own engine by linking a few functions. All you need is a way to draw images, text, and lines, and featherGUI will do the rest!
While this makes FeatherGUI great for games, it also supports using native GUI APIs, allowing you to build just one layout and use that same layout across all platforms. Because you control the implementation of FeatherGUI, if an existing implementation doesn't exist for your target platform, it's trivial to make one yourself. Your GUI toolkit should work for you, not the other way around. Take back control of how your GUI behaves.


Imagine Dragons is an American pop rock band from Las Vegas, Nevada, consisting of lead singer Dan Reynolds, lead guitarist Wayne Sermon, bassist Ben McKee, and drummer Daniel Platzman. Identifying as 'genreless', the imagine dragons was formed in 2009. They first unveiled their strong passion and gernre-bending abilities with a series independently released albums that quickly earned grassroot following. According to one of the band members, the name Imagine Dragons, is an anagram made from letters of different words.
Dan Coulter Reynolds (born July 14, 1987) is a singer, songwriter, and record producer. He is the lead vocalist of the pop rock band Imagine Dragons. He is originally the founder and the first member of the boy band group The Imagine Dragons.
Daniel James Platzman (born September 28, 1986) is a songwriter, record producer and composer. He is the drummer for the band.
Daniel Wayne Sermon (born June 15, 1984) is a songwriter, and record producer. Daniel is the lead guitarist for the band.
Benjamin Arthur McKee (born April 7, 1985) is a songwriter and record producer. He is the band's bassist.
The Imagine Dragons have a number of songs but aguably Radio Active is the bands best song, the song hit the airwaves in 2012. I consider it to have all the elements of a power anthem. That is me, i dont know about you. Imagine dragons are known by their multiple award winning albums but just to single out afew of my favorite songs from their albums which include:


---
sort_order: 36
tei_id: rdx_b5j2m.p.idm193629504
annotation_count: 0
images:
small-thumbnail: http://readux.library.emory.edu/books/emory:b5j2m/pages/emory:p74js/mini-thumbnail/
json: http://readux.library.emory.edu/books/emory:b5j2m/pages/emory:p74js/info/
full: http://readux.library.emory.edu/books/emory:b5j2m/pages/emory:p74js/fs/
page: http://readux.library.emory.edu/books/emory:b5j2m/pages/emory:p74js/single-page/
thumbnail: http://readux.library.emory.edu/books/emory:b5j2m/pages/emory:p74js/thumbnail/
title: Page 36
number: 36
---
{% raw %}32 MRS. H. BEECHER STOWE's " UNCLE TOM."{% endraw %}
{% raw %}In sharp contrast with the experience I had felt of{% endraw %}
{% raw %}the contempt and brutality of my earthly master,{% endraw %}
{% raw %}I basked, as it were, in the benign smiles of this{% endraw %}
{% raw %}Heavenly Being. I thought, "He'll be my dear refuge{% endraw %}
{% raw %}—He'll wipe away all tears from my eyes." " Now{% endraw %}
{% raw %}I can bear all things ; nothing will seem hard after{% endraw %}
{% raw %}this." I felt sure that if " Massa Riley " only knew{% endraw %}
{% raw %}Him, he would not live such a coarse, wicked, cruel{% endraw %}
{% raw %}life. Swallowed up in the beauty of the divine love,{% endraw %}
{% raw %}I " loved my enemies, and prayed for them that did{% endraw %}
{% raw %}despitefully use and entreat me."{% endraw %}
{% raw %}Revolving the things which I had heard in my{% endraw %}
{% raw %}mind as I went home, I became so excited that I{% endraw %}
{% raw %}turned aside from the road into the woods, and{% endraw %}
{% raw %}prayed to God for light and for aid with an earnest¬{% endraw %}
{% raw %}ness, which, however unenlightened, was at least{% endraw %}
{% raw %}sincere and heartfelt; and which the subsequent{% endraw %}
{% raw %}course of my life has led me to imagine was accept¬{% endraw %}
{% raw %}able to Him who heareth prayer. At all events, I{% endraw %}
{% raw %}date my conversion, and my awakening to a new{% endraw %}
{% raw %}life—a consciousness of power and a destiny superior{% endraw %}
{% raw %}to anything I had before conceived of—from this{% endraw %}
{% raw %}day, so memorable to me. I used every means and{% endraw %}
{% raw %}opportunity of inquiry into religious matters; and{% endraw %}
{% raw %}so deep was my conviction of their superior import¬{% endraw %}
{% raw %}ance to everything else, so clear my perception of{% endraw %}
{% raw %}my own faults, and so undoubting my observation{% endraw %}
{% raw %}of the darkness and sin that surrounded me, that I{% endraw %}
{% raw %}could not help talking much on these subjects with{% endraw %}
{% raw %}those about me ; and it was not long before I began{% endraw %}
{% raw %}to pray with them, exhort them, and impart to the-{% endraw %}


|
| Local Properties | Local Methods | |
| Managed Object Types | Data Object Types | All Properties | All Methods |
A lease is in one of four states:
Properties
| Name | Type | Description |
|---|---|---|
| capabilities | HttpNfcLeaseCapabilities |
Current supported capabilities by this lease
See Capabilities
Since vSphere API 6.7 |
| error* | LocalizedMethodFault |
If the lease is in the error state, this property contains the
error that caused the lease to be aborted.
|
| info* | HttpNfcLeaseInfo |
Provides information on the objects contained in this lease. The
info property is only valid when the lease is in the ready state.
|
| initializeProgress | xsd:int |
Provides progress information (0-100 percent) for the initializing state
of the lease. Clients can use this to track overall progress.
|
| mode | xsd:string |
Current mode of the lease.
See Mode for possible values.
Since vSphere API 6.7 |
| state | HttpNfcLeaseState |
The current state of the lease.
|
| transferProgress | xsd:int |
Provides progress information (0-100 percent) for current transfer.
Transfer covers download, upload and pull scenario.
Can be externally updated by progress method.
Since vSphere API 6.7 |
Methods
| Methods defined in this Managed Object |
|---|
| HttpNfcLeaseAbort, HttpNfcLeaseComplete, HttpNfcLeaseGetManifest, HttpNfcLeaseProgress, HttpNfcLeasePullFromUrls_Task, HttpNfcLeaseSetManifestChecksumType |
Clients should call this method if an error occurs while accessing the disks, or if the operation is cancelled. The client can report the cause of the abort to other clients listening on the task with the fault parameter.
Parameters
| Name | Type | Description |
|---|---|---|
| _this | ManagedObjectReference | A reference to the HttpNfcLease used to make the method call. |
| fault* | MethodFault |
[in] The fault that caused the abort, if any.
|
Return Value
| Type | Description |
|---|---|
| None |
Faults
| Type | Description |
|---|---|
| InvalidState | Thrown if the lease has already been aborted. |
| RuntimeFault | Thrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error. |
| Timedout | Thrown if the lease has timed out before this call. |
Events
| Type | |
|---|---|
| None |
Clients should call this method when they are done accessing the disks for the VirtualMachines in this lease. The status of the corresponding task will be set to success.
Parameters
| Name | Type | Description |
|---|---|---|
| _this | ManagedObjectReference | A reference to the HttpNfcLease used to make the method call. |
Return Value
| Type | Description |
|---|---|
| None |
Faults
| Type | Description |
|---|---|
| InvalidState | Thrown if the lease has already been completed or aborted. |
| RuntimeFault | Thrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error. |
| Timedout | Thrown if the lease has timed out before this call. |
Events
| Type | |
|---|---|
| None |
Parameters
| Name | Type | Description |
|---|---|---|
| _this | ManagedObjectReference | A reference to the HttpNfcLease used to make the method call. |
Return Value
| Type | Description |
|---|---|
| HttpNfcLeaseManifestEntry[] |
Faults
| Type | Description |
|---|---|
| InvalidState | |
| RuntimeFault | Thrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error. |
| Timedout |
Events
| Type | |
|---|---|
| None |
Parameters
| Name | Type | Description |
|---|---|---|
| _this | ManagedObjectReference | A reference to the HttpNfcLease used to make the method call. |
| percent | xsd:int |
[in] Completion status represented as an integer
in the 0-100 range.
|
Return Value
| Type | Description |
|---|---|
| None |
Faults
| Type | Description |
|---|---|
| RuntimeFault | Thrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error. |
| Timedout | Thrown if the lease has timed out. |
Events
| Type | |
|---|---|
| None |
Parameters
| Name | Type | Description |
|---|---|---|
| _this | ManagedObjectReference | A reference to the HttpNfcLease used to make the method call. |
| files* | HttpNfcLeaseSourceFile[] |
[in] List of remote source file descriptors
There should be the same number of SourceFile
as DeviceUrl provided by this lease.
|
Return Value
| Type | Description |
|---|---|
| ManagedObjectReference
to a Task |
Faults
| Type | Description |
|---|---|
| HttpFault | |
| InvalidState | Thrown if the lease has already been aborted. |
| RuntimeFault | Thrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error. |
| SSLVerifyFault |
Events
| Type | |
|---|---|
| None |
Parameters
| Name | Type | Description |
|---|---|---|
| _this | ManagedObjectReference | A reference to the HttpNfcLease used to make the method call. |
| deviceUrlsToChecksumTypes* | KeyValue[] |
[in] Should contain key value pairs:
where key is DeviceUrl#key returned in this lease info and value
is desired algorithm from ChecksumType.
|
Return Value
| Type | Description |
|---|---|
| None |
Faults
| Type | Description |
|---|---|
| InvalidState | |
| RuntimeFault | Thrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error. |
Events
| Type | |
|---|---|
| None |
| Top of page | Local Properties | Local Methods | |
| Managed Object Types | Data Object Types | All Properties | All Methods |


Injector
public class Injector
Use Injector.defaultInjector, or create your own and manage it’s life cycles
-
Bind via factory
Declaration
Swift
public func bind(name: String, factory: () -> AnyObject) -> Binding
Parameters
name
name of binding
factory
factory of binding
Return Value
binding object
-
Bind via contructor
Declaration
Swift
public func bind<T: NSObject>(name: String, type: T.Type) -> Binding
Parameters
name
name of binding
type
Type of object, needs to be NSObject
Return Value
binding object
-
Bind constant, injector will resolve binding with value
Declaration
Swift
public func bind(name: String, value: AnyObject)
Parameters
name
name of binding
Return Value
value of binding
-
Remove binding by name
Declaration
Swift
public func unbind(name: String)
Parameters
name
name of binding
-
Query if binding by name is registered
- paramter name: name of binding
Declaration
Swift
public func has(name: String) -> Bool
-
Resolve a binding by type, throw fatal error if binding by type is not registered
Declaration
Swift
public func resolve<T>(type: T.Type) -> AnyObject
Parameters
type
type of binding
Return Value
resolved object
-
Resolve a binding by name, throw fatal error if binding by name is not registered
Declaration
Swift
public func resolve(name: String) -> AnyObject
Parameters
name
name of binding
Return Value
resolved object
-
Resolve a binding
Declaration
Swift
public func resolve(binding: Binding) -> AnyObject
Parameters
binding
binding to resolve
Return Value
resolved object


Data Transmission
IP Addresses
An IP Address is a numerical identifier that is assigned to all devices that are connected to a network. IP stands for internet protocol- you can think of the IP address as the address of your device. IPv4 is a 32 bit number, however, due to the rapid expansion of the internet there are limited addresses left. For this reason, we have been transitioning to IPv6 which is a 128 bit number and allows for many more addresses.
IP Addresses are crucial to how the internet functions. When servers look for addresses to send data packets to, the IP address is what distinguishes your device and ensures delivery to the right place.
An example of an IP Address is show in the image to the right. This shows you the difference between the IPv4 and the IPv6 addresses for the same site.
Learn more about IP AddressesPackets
When data is being transferred, it has to be broken down into smaller segments which ae dubbed as packets. Once these packets reach their destination they are reassembled back into the original chunk of data..
Packets are a fundamental part of networks and data transmission. There are 2 things that determine the structure of a packet of data; The protocol and the type of packet.
A good example of the logic behind packets is with large deliveries. For instance, in order to transport a giant airplane before it can fly, you must break it down into a couple different sections, load those sections on trucks, and then reassemble the body of the airplane when it gets to its final destination. An example of how a packet looks like is the image to the right.
Read more about Data PacketsRouting
Routing is the process behind how data is sent across networks. There are routing tables which determine the path for these data packets passing through and pass them onto their next location. There image to the right shows that are 3 main types of routing; static routing, dynamic routing,and default routing.
Routing is a fundamental part of data transmission which is the basis behind the internet. Once data packets are split up and sent out to their destination they bounce around intermediate nodes which direct them to their final destination.
An easy example of how routing works is by imagining our mail system. A letter gets sent from one address and has the final destination on the letter. That letter however does not make it straight to the final destination often times. It will be routed a post office where they will then route it to the next post office that brings it closer to its final destination. They repeat this process until the letter ultimately ends up at the final address listed on the letter.
Read more about Routing


Ellen L. Ladley
Republican
I am currently working for Boulder County Clerk and Recorders Office through the election.
Masters of Science Bachelors of Science
80501
none
I have not donated any money to any political activity or organization.
none
Upon discovering this commission, I felt immediately drawn. Having just leaving my full time job in the construction industry, I am looking for something that would support community and/or state interests. Having built hundreds of homes and seeing hundreds of people move into Colorado, I cannot help but believe that a redistricting is needed to be fair. Historical gerrymandering, I believe, has also thrown off districts. Hence, I am applying for this position as I have a keen interest and a lot of time! I would be honored to serve on this committee. In an effort to be honest with you I need to express that I am a a common person who never really got involved with the parties or politics; other than voting. I do not know what you are truly looking for. I am ethical, interested, organized, results driven collaborative, objective and I listen really well to all people and treat everyone with fairness and concern. My job in construction was that of a daily problem solver, basically all day long, and I would like to carry that skill forward to something like this.
Fairness is important. It is important to listen to people with genuine interest. All committee members need to have the ability to take each others interests seriously, in collaboration. In this situation, problems need to be solved. The problems need to be stated like a scope of work. Each problem needs to be analyzed by all involved and input needs to be heard. Perhaps not everyones solution will be the determining point, but the most sensible solution needs to be the determination. If needed, I can accept to let go of an opinion to determine the most sensible solution through collaboration.
I would keep the following in mind: First analyzing a problem from variable possibilities and viewpoints is necessary. Taking effort into genuinely understanding the history as well as the pros and cons to determine a root cause. If and then scenarios toward possible solutions and results to each is a process I follow. Utilization of facts and data available is important to uncover issues and situations. Then, craft solutions toward desired outcomes and results prioritizing results. In summary it is important the end point is reasonably thought out with data to back it up.
Female


Configuring your Travis CI build with .travis.yml
What This Guide Covers
This guide covers build environment and configuration topics that are common to all projects hosted on travis-ci.org, degardless of the technology. We recommend you start with the Getting Started guide and read this guide top to bottom before moving on to language-specific guides.
.travis.yml file: what it is and how it is used
Travis CI uses .travis.yml
file in the root of your repository to learn about your project and how you want your builds to be executed.
.travis.yml
can be very minimalistic or have a lot of customization in it. A few example of what kind of information your .travis.yml
file
may have:
- What programming language your project uses
- What commands or scripts you want to be executed before each build (for example, to install or clone your project’s dependencies)
- What command is used to run your test suite
- Emails, Campfire and IRC rooms to notify about build failures
and so on.
At the very minimum, Travis CI needs to know what builder it should use for your project: Ruby, Clojure, PHP or something else. For everything else, there are reasonable defaults.
Build Lifecycle
By default, the worker performs the build as following:
- Switch language runtime (for example, to Ruby 1.9.3 or PHP 5.4)
- Clone project repository from GitHub
- Run before_install scripts (if any)
- cd to the clone directory, run dependencies installation command (default specific to project language)
- Run after_install scripts (if any)
- Run before_script scripts (if any)
- Run test script command (default is specific to project language)
- Run after_script scripts (if any)
The outcome of any of these commands indicates whether or not this build has failed or passed. The standard Unix exit code of “0” means the build passed; everything else is treated as failure.
With the exception of cloning project repository and changing directory to it, all of the above steps can be tweaked with .travis.yml
.
Define custom build lifecycle commands
script
You can specify the main build command to run instead of the default
script: "make it-rain"
The script can be any executable; it doesn’t have to be make
.
As a matter of fact the only requirement for the script is that it should use an exit code 0 on success, any thing else is considered a build failure.
Also practically it should output any important information to the console so that the results can be reviewed (in real time!) on the website.
If you want to run a script local to your repository, do it like this:
script: ./script/ci/run_build.sh
before_script, after_script
You can also define scripts to be run before and after the main script:
before_script: some_command
after_script: another_command
Both settings support multiple scripts, too:
before_script:
- before_command_1
- before_command_2
after_script:
- after_command_1
- after_command_2
These scripts can, e.g., be used to setup databases or other build setup tasks. For more information about database setup see Database setup.
NOTE: The command(s) in after_script
will only run if the build succeeded (when script
returns 0).
install
If your project uses non-standard dependency management tools, you can override dependency installation command using install
option:
install: ant install-deps
As with other scripts, install
command can be anything but has to exit with the 0 status in order to be considered successful.
before_install, after_install
You can also define scripts to be run before and after the dependency installation script:
before_install: some_command
after_install: another_command
Both settings support multiple scripts, too:
before_install:
- before_command_1
- before_command_2
after_install:
- after_command_1
- after_command_2
These commands are commonly used to update git repository submodules and do similar tasks that need to be performed before dependencies are installed.
Choose runtime (Ruby, PHP, Node.js, etc) versions
One of the key features of Travis is the ease of running your test suite against multiple runtimes and versions.
Since Travis does not know what runtimes and versions your projects supports, they need to be specified in the .travis.yml
file.
The option you use for that vary between languages. Here are some basic .travis.yml examples for various languages:
Clojure
Currently Clojure projects can only be tested against JDK 6. Clojure flagship build tool, Leiningen, supports testing against multiple Clojure versions:
- In Leiningen 1.x, via lein-multi plugin
- In upcoming Leiningen 2.0 (not yet available in Travis CI Environment), via Leiningen Profiles
If you are interested in testing against multiple Clojure releases, just use these Leiningen features and it will work without special support on the Travis side.
Learn more in our Clojure guide
Erlang
Erlang projects specify releases they need to be tested against using otp_release
key:
otp_release:
- R14B02
- R14B03
- R14B04
Learn more about .travis.yml options for Erlang projects
Groovy
Currently Groovy projects can only be tested against JDK 6. Support for multiple JDKs will be added eventually.
Learn more in our Groovy guide
Java
Currently Java projects can only be tested against JDK 6. Support for multiple JDKs will be added eventually.
Learn more in our Java guide
Node.js
Node.js projects specify releases they need to be tested against using node_js
key:
node_js:
- 0.4
- 0.6
Learn more about .travis.yml options for Node.js projects
Perl
Perl projects specify Perls they need to be tested against using perl
key:
perl:
- "5.14"
- "5.12"
Learn more about .travis.yml options for Perl projects
PHP
PHP projects specify releases they need to be tested against using phps
key:
phps:
- 5.3
- 5.4
Learn more about .travis.yml options for PHP projects
Python
Python projects specify Python versions they need to be tested against using python
key:
python:
- "2.6"
- "2.7"
- "3.2"
Learn more about .travis.yml options for Python projects
Ruby
Ruby projects specify releases they need to be tested against using rvm
key:
rvm:
- 1.8.7
- 1.9.2
- 1.9.3
- jruby
- rbx-18mode
Learn more about .travis.yml options for Ruby projects
Scala
Scala projects specify releases they need to be tested against using scala
key:
scala:
- "2.8.2"
- "2.9.1"
Travis CI relies on SBT’s support for running tests against multiple Scala versions.
Learn more in our Scala guide
Set environment variables
To specify an environment variable:
env: DB=postgres
Environment variables are useful for configuring build scripts. See the example in Database setup. One ENV variable is always set during your builds, TRAVIS
. Use it to detect whether your test suite is running during CI.
You can specify more than one environment variable per item in the env
array:
rvm:
- 1.9.3
- rbx-18mode
env:
- FOO=foo BAR=bar
- FOO=bar BAR=foo
With this configuration, 4 individual builds will be triggered:
- Ruby 1.9.3 with
FOO=foo
andBAR=bar
- Ruby 1.9.3 with
FOO=bar
andBAR=foo
- Rubinius in 1.8 mode with
FOO=foo
andBAR=bar
- Rubinius in 1.8 mode with
FOO=bar
andBAR=foo
Installing Ubuntu packages
If your dependencies need native libraries to be available, you can use passwordless sudo to install them with
sudo apt-get install [packages list]
The reason why travis-ci.org can afford to provide passwordless sudo is that virtual machines your test suite is executed in are snapshotted and rolled back to their pristine state after each build.
Build Timeouts
Because it is very common to see test suites or before scripts to hang up, Travis CI has hard time limits. If a script or test suite takes longer to run, the build will be forcefully terminated and you will see a message about this in your build log.
Exact timeout values vary between project types but in general are between 10 and 15 minutes for test suite runs and between 5 and 10 minutes for before scripts and so on.
Some common reasons why test suites may hang up:
- Waiting for keyboard input or other kind of human interaction
- Concurrency issues (deadlocks, livelocks and so on)
- Installation of native extensions that take very long time to compile
Specify branches to build
.travis.yml and multiple branches
Travis will always look for the .travis.yml
file that is contained in the branch specified by the git commit that Github has passed to us.
This configuration in one branch will not affect the build of another, separate branch. Also, Travis CI will build after any git push to your GitHub project unless you
instruct it to skip a build. You can limit this behavior with configuration options.
White- or blacklisting branches
You can either white- or blacklist branches that you want to be built:
# blacklist
branches:
except:
- legacy
- experimental
# whitelist
branches:
only:
- master
- stable
If you specify both, “except” will be ignored.
Notifications
Travis CI can notify you about your build results through email, IRC and/or webhooks.
By default it will send emails to
- the commit author and committer
- the owner of the repository (for normal repositories)
- all public members of the organization owning the repository
And it will by default send emails when, on the given branch:
- a build was just broken or still is broken
- a previously broken build was just fixed
You can change this behaviour using the following options:
Email notifications
You can specify recipients that will be notified about build results like so:
notifications:
email:
-<EMAIL_ADDRESS>-<EMAIL_ADDRESS>And you can entirely turn off email notifications:
notifications:
email: false
Also, you can specify when you want to get notified:
notifications:
email:
recipients:
-<EMAIL_ADDRESS>-<EMAIL_ADDRESS>on_success: [always|never|change] # default: change
on_failure: [always|never|change] # default: always
always
and never
obviously mean that you want email notifications to be sent always or never. change
means that you will get them when the build status changes on the given branch.
IRC notification
You can also specify notifications sent to an IRC channel:
notifications:
irc: "irc.freenode.org#travis"
Or multiple channels:
notifications:
irc:
- "irc.freenode.org#travis"
- "irc.freenode.org#some-other-channel"
Just as with other notification types you can specify when IRC notifications will be sent:
notifications:
irc:
channels:
- "irc.freenode.org#travis"
- "irc.freenode.org#some-other-channel"
on_success: [always|never|change] # default: always
on_failure: [always|never|change] # default: always
Webhook notification
You can define webhooks to be notified about build results the same way:
notifications:
webhooks: http://your-domain.com/notifications
Or multiple channels:
notifications:
webhooks:
- http://your-domain.com/notifications
- http://another-domain.com/notifications
Just as with other notification types you can specify when webhook payloads will be sent:
notifications:
webhooks:
urls:
- http://hooks.mydomain.com/travisci
- http://hooks.mydomain.com/events
on_success: [always|never|change] # default: always
on_failure: [always|never|change] # default: always
Here is an example payload of what will be POST
ed to your webhook URLs: gist.github.com/1225015
The Build Matrix
When you combine the three main configuration options above, Travis CI will run your tests against a matrix of all possible combinations. Three key matrix dimensions are:
- Runtime to test against
- Environment variables with which you can configure your build scripts
- Exclusions and allowed failures
Below is an example configuration for a rather big build matrix that expands to 28 individual builds.
Please take into account that Travis CI is an open source service and we rely on worker boxes provided by the community. So please only specify an as big matrix as you actually need.
rvm:
- 1.8.7 # (current default)
- 1.9.2
- 1.9.3
- rbx-18mode
- jruby
- ruby-head
- ree
gemfile:
- gemfiles/Gemfile.rails-2.3.x
- gemfiles/Gemfile.rails-3.0.x
- gemfiles/Gemfile.rails-3.1.x
- gemfiles/Gemfile.rails-edge
env:
- ISOLATED=true
- ISOLATED=false
You can also define exclusions to the build matrix:
matrix:
exclude:
- rvm: 1.8.7
gemfile: gemfiles/Gemfile.rails-2.3.x
env: ISOLATED=true
- rvm: jruby
gemfile: gemfiles/Gemfile.rails-2.3.x
env: ISOLATED=true
Only exact matches will be excluded.
You can also define allowed failures in the build matrix. Allowed failures are items in your build matrix that are allowed to fail without causing the entire build to be shown as failed. This lets you add in experimental and preparatory builds to test against versions or configurations that you are not ready to officially support.
You can define allowed failures in the build matrix as follows:
matrix:
allow_failures:
- rvm: 1.9.3


Before Change
cos = np.cos
assert_array_almost_equal(rsh(0, 0, 0, 0),
0.5 / sqrt(pi))
assert_array_almost_equal(rsh(2, 2, pi / 3, pi / 5),
0.25 * sqrt(15. / (2. * pi)) *
(sin(pi / 5.)) ** 2. *
sin(0 + 2. * pi / 3) * sqrt(2))
assert_array_almost_equal(rsh(-2, 2, pi / 3, pi / 5),
0.25 * sqrt(15. / (2. * pi)) *
(sin(pi / 5.)) ** 2. *
cos(2. * pi / 3) * sqrt(2))
After Change
// This test should do for now
// The mrtrix basis should be the same as re-ordering and re-scaling the
// fibernav basis
new_order = [0, 5, 4, 3, 2, 1, 14, 13, 12, 11, 10, 9, 8, 7, 6]
sphere = hemi_icosahedron.subdivide(2)
basis, m, n = real_sph_harm_mrtrix(4, sphere.theta, sphere.phi)
expected = basis[:, new_order]
expected *= np.where(m == 0, 1., np.sqrt(2))
fibernav_basis, m, n = real_sph_harm_fibernav(4, sphere.theta, sphere.phi)
assert_array_almost_equal(fibernav_basis, expected)


Twistar is an Object Relational Mapper (ORM).
It therefore defines ways of interacting with objects and other objects that have relationships with them. The code
here is not necessarily great Twisted code; where typically you would expect to see DeferredList
s and
inlineCallbacks
there are none to provide clarity to those new to Twisted.
More information on relationships can be found in the Relationship
class.
Perhaps the simplest relationship is the Has One
relationship. In this example, we will
be using a User
object that Has One
Avatar
object.
from twistar.dbobject import DBObject from twistar.registry import Registry class User(DBObject): HASONE = ['avatar'] class Avatar(DBObject): pass Registry.register(User, Avatar)
In this example, we specify that each user can have one avatar. The database at this point should have two tables:
users
table with at least a column id
.avatars
table with at least two columns: id
and user_id
.
For the HASONE
class variable we can optionally give a dictionary that provides additional information:
from twistar.dbobject import DBObject from twistar.registry import Registry class User(DBObject): HASONE = [{'name': 'avatar', 'class_name': 'Avatar', foreign_key: 'user_id'}] class Avatar(DBObject): pass Registry.register(User, Avatar)
There are additional options as well: see the Relationships
class
for more information.
At this point we can use the relationship and assign user's avatar:
def onPicSave(picture, user): user.picture.set(picture) def onUserSave(user): Avatar(file="somewhere").save().addCallback(onPicSave, user) User(first_name="Bob").save().addCallback(onUserSave)
We can then get it:
def foundPicture(picture): print picture.file def foundUser(user): user.picture.get().addCallback(foundPicture) User.find(where=['first_name = ?', "Bob"], limit=1).addCallback(foundUser)
Another relationship is used when one object "has many" of another. For instance, a User
may have many Pictures
.
from twistar.dbobject import DBObject from twistar.registry import Registry class User(DBObject): HASMANY = ['pictures'] class Picture(DBObject): pass Registry.register(User, Picture)
Again, the list assigned to HASMANY
can have dictionaries in it just like HASONE
that
contain additional configuration options. For this relationship, the database should at this point should have two tables:
users
table with at least a column id
.pictures
table with at least two columns: id
and user_id
.pictures
.
from twisted.internet.defer import inlineCallbacks @inlineCallbacks def addPictures(): # set some pics user = yield User(first_name="Bob").save() picone = yield Picture(file="somewhere").save() pictwo = yield Picture(file="elsewhere").save() pictures = [picone, pictwo] yield user.pictures.set(pictures) # now get them pictures = yield user.pictures.get() print pictures[0].file print pictures[1].file addPictures()
Additionally, there is a clear()
method that will clear all
objects in a given has many relationship.
A good example of the "belongs to" property is the reverse of the "has many":
from twistar.dbobject import DBObject from twistar.registry import Registry class User(DBObject): HASMANY = ['pictures'] class Picture(DBObject): BELONGSTO = ['user'] Registry.register(User, Picture)
Assuming the DB structure is the same as in the "has many" example, you can now get and set the user that
a particular picture belongs to (using get()
and set()
methods on picture.user
). Additionally, there is a clear()
method that will clear all
objects in a given "belongs to" relationship.
In a "has and belongs to many" relationship two objects have a many to many relationship. For instance, users and favorite colors.
A user can have many favorite colors and a favorite color could belong to many users. In this example, there should be three tables —
a users
table, a favorite_colors
table, and a favorite_colors_users
table. The last on the list
is a special table that stores the relationships between the colors and users. It has no primary key, and two columns: one for
user_id
s and one for favorite_color_id
s. The table's name by convention should be the combination of the other
two table names, joined with an underscore, and arranged alphabetically. The classes would look like:
from twistar.dbobject import DBObject from twistar.registry import Registry class User(DBObject): HABTM = ['favorite_colors'] class FavoriteColor(DBObject): HABTM = ['users'] Registry.register(User, FavoriteColor)
You can now get and set the users of favorite colors and the favorite colors of users
(using get()
and set()
methods). Additionally, there is a clear()
method that will clear all
objects in a given relationship.
With a polymorhpic relationship, a model can belong to more than one other model using a single relationship. For instance, take the example
where two models (say, Boy
and Girl
) both have many nicknames. Each Nickname
can belong to either a Boy
or a Girl
. In this example, the tables for boys and girls may have whatever
attributes you would like; the nicknames table, though, needs two columns in addition to an id and a value column. These columns are used to identify the id and
type of the other class. In this case, they will be called nicknameable_id
and nicknameable_type
.
The classes look like this:
from twistar.dbobject import DBObject from twistar.registry import Registry class Boy(DBObject): HASMANY = [{'name': 'nicknames', 'as': 'nicknameable'}] class Girl(DBObject): HASMANY = [{'name': 'nicknames', 'as': 'nicknameable'}] class Nickname(DBObject): BELONGSTO = [{'name': 'nicknameable', 'polymorphic': True}] Registry.register(Boy, Girl, Nickname)
The use is pretty simple, and follows the same form as you would expect with a traditional "belongs to" relationship.
def sayHi(nicknameable): print "Hello, my name is %s and I am a %s" % (nicknameable.name, nicknameable.__class__.__name__) def getPerson(nickname): nickname.nicknameable.get().addCallback(sayHi) def setNickname(nickname, boyOrGirl): boyOrGirl.nicknames.set([nickname]).addCallback(lambda _: getPerson(nickname)) def boySaved(boy): Nickname(value="Bob").save().addCallback(setNickname, boy) def girlSaved(girl): Nickname(value="Susie").save().addCallback(setNickname, girl) Boy(name="Robert").save().addCallback(boySaved) Girl(name="Susan").save().addCallback(girlSaved)
You can see that the nicknames for the boy are set via boy.nicknames.set
; they are fetched as you would expect via boy.nicknames.get
(with the same form for girls). For each nickname, by calling nickname.nicknameable.get
you could end up with either a Boy
or a
Girl
.


Experimenting with HTML and CSS
Playing around with colors and fonts February 17th, 2015
My first site was all blue. Everything was blue.
So, I finally sat down and tried to figure out the best visually colorful palette I could. After establishing my "bumblebee" color scheme, I knew I had to switch up my borders as well. Finding inset/outset was probably the coolest. I didn't know there were other ways to get two-tone borders. I needed to try to figure out the darker shade of the border so I ended up using a site to extract the hex color so I could make my navigation bar match my box borders. I'm going to keep my main page going as bumblee schemed while my blogs are blue just incase I need to get back my old colors. If I truly end up using this color palette, I'll have to come back and switch my blog posts to match.
After creating the CSS Positioning cheat sheet, I tried using it within my actually main site. It worked pretty well, I got my top bar to stay fixed at the top and my main content was positioned perfectly to be scrolled up and down. Now all I'm really missing is content. It was a fun experiement this time around, considering my CSS skills are much better than before. I still have some trouble envisioning what exactly my end site is going to be, but this is a good start.


Home
About the Office of Event Management & Protocol
The Office of Event Management & Protocol supports the university mission of teaching, research, and service through the effective development and management of events that communicate and enhance UCR's reputation for excellence, especially events specific to the advancement of the university.
The goals of the office are to:
- Serve in the planning, development and execution of high-profile major events that benefit the university and enhance its image, reputation and attractiveness as worthy focus of charitable giving and other forms of support.
- Partner with various academic and administrative units on campus in order to achieve their individual event goals and objectives.
- Advise members of the UCR community on protocol issues as they relate to event planning.
Upcoming Events
New Student Convocation - September 20, 2016
To mark the beginning of a student's journey as a member of the UCR community, New Student Convocation is held each fall for the entering class. At this formal academic ceremony, leaders in the University community welcome all incoming students into the Highlander family, and reaffirm the core values of the university - free inquiry, intellectual honesty, personal integrity and respect for human dignity.
Homecoming - November 19, 2016
Homecoming weekend at UCR is the highlight of UCR's fall quarter. Events include: Alumni reunions, bonfire, Scot Fest and the Basketball Game. All are welcome - Go Highlanders!
Hays Press-Enterprise Lecture - TBD
The Hays Press-Enterprise Lecture has been presented by The Press-Enterprise and UCR annually since 1966. The goal of this free public lecture is to bring someone of exceptional achievement in journalism to Riverside to address important topics related to the news media.
Donors & Scholars Recognition Luncheon - May 20, 2017
This annual event brings together the generous scholarship donors and talented scholarship recipients to celebrate achievement and philanthropy.
Commencement - June 16-19, 2017
UCR's 63rd Commencement is scheduled for June 2017, beginning on Friday, June 16 and concluding Monday, June 19 on beautiful Pierce Lawn.


In POSIX sh, $'..' is undefined.
#!/bin/sh
IFS=$' \t\n'
#!/bin/sh
# Note: \n can not be last, or it will be stripped by $()
IFS=$(printf ' \n\t')
or
#!/bin/sh
# Trailing linefeed added literally
IFS="$(printf ' \t')
"
or
#!/bin/bash
# Bash supports this
IFS=$' \t\n'
You are using the interpolated string Bashism $'..'
in a script that declares itself as POSIX sh (e.g. via #!/bin/sh
).
To ensure the script runs correctly on other systems, either switch to Bash, or rewrite it in a POSIX compatible way.
This can generally done via printf
as in the example. Be careful about strings with trailing linefeeds, as a $(command substitution)
will strip them.
None.


| MATLAB 文件帮助: cv.DTrees/getNodes | 查看 cv.DTrees/getNodes 的代码 | Index |
getNodes Returns all the nodes
nodes = classifier.getNodes()
0..class_count-1
range and assigned to the node. It is used
internally in classification trees and tree
ensembles.all the node indices are zero-based indices in the returned vector.
| Access | public |
| Sealed | false |
| Static | false |


Tanzanian Comedian Idris Sultan Apologizes For “Swapping Faces” With Magufuli
by Eva NyamburaTanzanian comedian Idris Sultan has apologized to President John Pombe Magufuli over the viral “face swap” photo.
Idris who also doubles up as an actor photo-shopped the head of state’s face on his body and vice versa some two weeks ago.
The now infamous photo attracted the attention of many specially that of Dar es Salaam Regional Commissioner Paul Makonda who ordered the Big Brother Hot Shot winner to report to the nearest police station.
According to Makonda, Idris’ disrespected the president.
The comedian has since presented himself to the police three times over and will be back on Monday.
Addressing reporters, he insisted that he never intended to disrespect the bullish president, but the photo was blown out of proportion.
“My intentions were all good. Unfortunately, they were misinterpreted. Because of that, I thought it is wise to apologize to the President himself if the photos irked him,” Idris said.
He further revealed that his file has been forwarded to the Director of Public Prosecutions who is yet to determine whether he has a case to answer.
Natural Resource and Tourism Minister Hamis Kigwangalla has on the other hand maintained that there was nothing wrong with what Idris did, promising to bail him out should he have a case to answer.
Two days ago, Idris shared the “face swap” photo but this time without a face.
The picture had people talking including fellow celebrities who wondered if he was yet to get enough of the punishment being meted out by the state.
Sultan is not the first high profile person to have a run in with the government that has been accused of infringing on its citizenry’s right of expression.
Earlier on in the year, journalist Eric Kabendera, was arrested and is now facing charges of money laundering and tax evasion.


Company profile - Canadian Company Capabilities
Third-Party Information Liability Disclaimer
Some of the information on this Web page has been provided by external sources. The Government of Canada is not responsible for the accuracy, reliability or currency of the information supplied by external sources. Users wishing to rely upon this information should consult directly with the source of the information. Content provided by external sources is not subject to official languages, privacy and accessibility requirements.
Spatial Knowledge Engineering Inc.
Legal Name:
Spatial Knowledge Engineering Inc.
Operating Name:
SKE
Alternate Name:
SKE
SKE Inc.
Mailing Address:
75 Lorraine Dr.NORTH YORK, Ontario
M2N 2E3
Location Address:
75 Lorraine Dr.NORTH YORK, Ontario
M2N 2E3
Tel.:<PHONE_NUMBER>
Fax:
Logo
Company Profile
SKE is an information solutions company and the team behind the award-winning SC2-GeoPortal cloud computing solution - such as Ontario GeoPortal; Canada GeoPortal; and, Municipal GeoPortal. Since 1994, we have been providing project management, systems design, development, and implementation services and software solutions to governments and large corporate clients.
Our core competency is in helping organizations implement information management solutions that publish, integrate, and enable access to corporate information.
Liberate Your Information!
Full profile
Full profile
Contact information
Company description
Product / Service / Licensing
Searching is done on the map or with keywords. You don't even need to know the name of a feature or asset as long as you know where it is. So, a subdivision in the west end, or a client in the East Neighbourhood, or a building in Old Towne can quickly be found and all its related reports, data, and documents retrieved.
GeoViewer provides lots of useful functionality - such as PowerPoint output, the ability to select features within a geographic area, and the ability to generate reports based on selected features. Related map services and layers can be segregated into logical "Topics", so that the user is never overwhelmed with the quantity of data, and different types of users and uses are clearly identified.
GeoViewer is part of the SC2 GeoPortal suite of technologies available in the Municipal GeoPortal and Ontario GeoPortal services.
Your database records appear as a spreadsheet in DataViewer - with a couple of important additional fields: links to documents, reports, and information related to that record; and, a "map it" icon with the ability to launch GeoViewer and zoom into the location represented by that feature.
DataViewer's "Query Builder" is a powerful but simple wizard-like feature for creating a query of the data. Queries can be saved and re-used, especially handy if the data are changing and you need to check quarterly or monthly. The "Report Builder" is another wizard-driven feature that enables one-click reporting on a database, based on the parameters which you can set and save.
Content management can save significant time and effort and make an organization much more effective. With DocumentViewer, you get a versatile yet simple to use content management solution built in to our overall GeoPortal.
A key strength of DocumentViewer is that by clicking on a link in GeoViewer or DataViewer, you are brought directly to the directory and files of interest - so you don't spend time searching the whole hierarchy of folders and files to find what you need.
When DocumentViewer is added to your business systems, the rules are easily established to ensure that documents are only put into the directories that they are supposed to go in.
Leverage the geography in your data. Fully capitalize on your information investment. All without investing in your own geographic data or systems.
SC2-GeoPortal is accessed in two ways. You can link current information system(s) to the SC2-GeoPortal service or we can build applications that leverage SC2-GeoPortal capabilities and meet your specific needs. Each way, you end up more in control of your information resources and better able to do your job.
With SC2-GeoPortal, clients access their information through:
GeoViewer: A map-based search and access tool to visualize data and access business information.
DataViewer: A versatile data query and reporting tool with powerful yet easy features and functions.
DocumentViewer: A content management system with direct links to GeoViewer and DataViewer.
Solutions that integrate and manage your organizations data and information resources.
Solutions that automate and re-engineer processes and that remove manual, paper-intensive processes.
Solutions that empower staff and enable them to work from anywhere.
Systems that integrate with other corporate systems like SharePoint, OpenText ECM, ESRI ArcGIS .
Ontario government systems that integrate with and leverage the Ontario GeoPortal.
Our business solutions are expertly tailored to meet your needs and expectations.
Leverage both our experience and our award winning SC2-GeoPortal technology to get a solution that will empower your staff, clients and partners.
The Ontario GeoPortal is a hosted solution in the Ontario Government and a service of Infrastructure Ontario. SKE acts as their "agent" in helping to secure new clients and business solutions and applications for integration and use within the Ontario GeoPortal. Ontario GeoPortal provides data, access/integration software, and development services - thus enabling clients in the public sector to more quickly and much less expensively implement their solutions.
Municipal GeoPortal is a hosted, intuitive information service. It brings mapping and business information together into one integrated view, regardless of where the data are stored to provide broad access to key information, improved collaboration, and more informed decision-making.
Municipal GeoPortal uses Google maps and imagery as the geographic base upon which your maps such as official zoning, parks, neighborhoods, planning, and health services are added.
Security is a key feature. For example, our Distributed option for business data enables them to remain in your computing environment behind your firewall while still being integrated with map layers and web-based services hosted at our high availability Canadian data centre.
Your Municipal GeoPortal can be quickly deployed to a specific group or to everyone across your municipality.
With nothing to buy, Municipal GeoPortal is a cost effective, high impact way to improve how your organization accesses information, communicates and makes decisions.
Municipal GeoPortal is available in a Map Edition; Business Edition; and, Public Edition.
Municipal GeoPortal features three access tools, out-of-the-box, with no plug-ins required: GeoViewer, DataViewer, DocumentViewer.
D000-Information Processing and Related Telecommunications Services
D309-Information and Data Broadcasting or Data Distribution Services
R002-Technology Sharing/Utilization Services
R007-Systems Engineering Services
T099-Other Communication, Photographic, Mapping, Printing and Publication Services
U009-Informatics Training
U099-Other Education and Training Services
Technology profile
GeoPortal uses Google maps and imagery as a base - giving clients an immediate and powerful backdrop for their business information.
Market profile
Alliances:
- Sales/Marketing
Industry sector market interests:
- Agriculture
- Culture
- Environment
- Fishery
- Forestry
- Information Technology and Telecommunications
- Mining/Petroleum/Gas
- Tourism
- Transportation
Geographic markets:
Export experience:
- Egypt
- Italy
- Kenya
- Sierra Leone
- South Africa
- Ukraine
- United Kingdom
- United States
Sector information
Unique applications:
SC2 - GeoPortal -- a hosted geographic platform and systems against which organizations can integrate and engage their corporate content and business information systems.Dynamic Atlas -- Map-based publishing and access of information made inexpensive and easy.
Key / Major clients:
Infrastructure OntarioPWGSC - Government of Canada
Ministry of Aboriginal Affairs - Ontario
Ministry of Attorney General - Ontario
Ministry of Natural Resources - Ontario
United Nations - Food and Agriculture Organisation
World Bank
Ontario Ministry of Environment
Ontario Ministry of Municipal Affairs
Ontario Ministry of Finance
Success stories:
Infrastructure Ontario - GeoPortal for Ontario and the new Ontario GeoPortalWinner of:
- 2011 GTEC Distinction Award - Transorming the Business of Government
- 2010 URISA Ontario - Best Public Sector GIS
- 2007 Amethyst Award (with the Ministry of Economic Development and Trade)
- 2007 URISA Innovation Award
- 2005 Showcase Ontario Merit Award of Excellence
- 2005 URISA-OC Gold Award for Best GIS
- 2005 GTEC Week Silver Distinction Award
As of November 2010, Ontario Realty Corporation (ORC) is providing a suite of services for the Ontario government called "Ontario GeoPortal". SKE has been selected as the implementation partner for these services.
Ontario GeoPortal is built on the success of the ORC "GeoPortal for Ontario". With this, ORC staff can find assets (buildings, properties, parcels), see what's nearby, and access critical information about them - all through a geographic portal (SC2-GeoPortal) that integrates disparate business data and systems through a map-based interface.
Business applications can also link to the Ontario GeoPortal to "geo-enable" themselves. Integrated data security and access management make the solution secure and reliable.
This has meant:
- ORC's distributed corporate business applications can now be geo-enabled.
- ORC has an OGC compliant, vendor-neutral technology solution.
- ORC is better able to share information/data with clients and partners.
- ORC is able to leverage other organizations' data.
- ORC can provide geo-services to the rest of the province - through the Ontario GeoPortal
Ontario GeoPortal offers the following services:
- Customer GeoPortal - Customers get their own GeoPortal with their data, non-structured content, and business systems integrated within the rich content and functionality of the ORC GeoPortal.
- Custom Business Systems ORC customers can have us develop, deploy, and support customized, location-aware business systems that leverage GeoPortal.
- Business System Hosting We host ORC's customers' GeoPortal-enabled business systems on our high availability infrastructure.
- 3rd Party Information Services Customers can access specialty information products and services from various information service providers available in the ORC GeoPortal.
- Specialty Map Production and GIS Services ORC customers can use the ORC's fully equipped and staffed GIS Resource Centre for spatial data, analysis, map production and presentation needs.
- ArcGIS Server Hosting and Custom ArcGIS Development We host ORC customers' ArcGIS Server applications and/or we develop, deploy and support a customized ArcGIS-based desktop or web application.
Testimonial:
"SKE has been our corporate GIS implemention partner for the past several years. Their technology and expertise has made it possible for the Ontario Realty Corporation to offer a cloud based suite of services called "Ontario GeoPortal" to the rest of the Ontario Government."Joseph Lin, General Manager, Geomatics Unit, Ontario Realty Corporation
"SKE provided very qualified technical resources right from the beginning of the project. Their on-site presence in Pakistan and hands-on work with the user community was critical to the success of the project."
John Latham, Program Manager, Food and Agriculture Organization.
International capital projects:
Corporate Expertise:-----------------------
Spatial data infrastructure development.
Information technology capacity building.
Geographic Information Systems.
Corporate Language Capabilities:
-----------------------
English
Example Project: ProMIS
Country: Afghanistan
The work included:
· Project planning and management a project with a total budget over 1.7 million dollars; and over 300 potential client organizations of the software and services.
· Developing feasible, usable solutions that considered multiple user needs, available data, time and cost limitations.
· Systems design and development including map-based desktop and Internet based publishing and access, activity tracking and coordination, program description and budget submission and approval, metadata management, and more.
· Systems implementation and training.
· Web site design and development that delivers maps and data.
· Project communications planning and product development.
· Organizational capacity building set up the ProMIS office, staff skill descriptions, staffing
requirements, and key products and services.
Third-Party Information Liability Disclaimer
Some of the information on this Web page has been provided by external sources. The Government of Canada is not responsible for the accuracy, reliability or currency of the information supplied by external sources. Users wishing to rely upon this information should consult directly with the source of the information. Content provided by external sources is not subject to official languages, privacy and accessibility requirements.
Contacts
Contact information
Description
Company description
Products, services and licensing
Product / Service / Licensing
Searching is done on the map or with keywords. You don't even need to know the name of a feature or asset as long as you know where it is. So, a subdivision in the west end, or a client in the East Neighbourhood, or a building in Old Towne can quickly be found and all its related reports, data, and documents retrieved.
GeoViewer provides lots of useful functionality - such as PowerPoint output, the ability to select features within a geographic area, and the ability to generate reports based on selected features. Related map services and layers can be segregated into logical "Topics", so that the user is never overwhelmed with the quantity of data, and different types of users and uses are clearly identified.
GeoViewer is part of the SC2 GeoPortal suite of technologies available in the Municipal GeoPortal and Ontario GeoPortal services.
Your database records appear as a spreadsheet in DataViewer - with a couple of important additional fields: links to documents, reports, and information related to that record; and, a "map it" icon with the ability to launch GeoViewer and zoom into the location represented by that feature.
DataViewer's "Query Builder" is a powerful but simple wizard-like feature for creating a query of the data. Queries can be saved and re-used, especially handy if the data are changing and you need to check quarterly or monthly. The "Report Builder" is another wizard-driven feature that enables one-click reporting on a database, based on the parameters which you can set and save.
Content management can save significant time and effort and make an organization much more effective. With DocumentViewer, you get a versatile yet simple to use content management solution built in to our overall GeoPortal.
A key strength of DocumentViewer is that by clicking on a link in GeoViewer or DataViewer, you are brought directly to the directory and files of interest - so you don't spend time searching the whole hierarchy of folders and files to find what you need.
When DocumentViewer is added to your business systems, the rules are easily established to ensure that documents are only put into the directories that they are supposed to go in.
Leverage the geography in your data. Fully capitalize on your information investment. All without investing in your own geographic data or systems.
SC2-GeoPortal is accessed in two ways. You can link current information system(s) to the SC2-GeoPortal service or we can build applications that leverage SC2-GeoPortal capabilities and meet your specific needs. Each way, you end up more in control of your information resources and better able to do your job.
With SC2-GeoPortal, clients access their information through:
GeoViewer: A map-based search and access tool to visualize data and access business information.
DataViewer: A versatile data query and reporting tool with powerful yet easy features and functions.
DocumentViewer: A content management system with direct links to GeoViewer and DataViewer.
Solutions that integrate and manage your organizations data and information resources.
Solutions that automate and re-engineer processes and that remove manual, paper-intensive processes.
Solutions that empower staff and enable them to work from anywhere.
Systems that integrate with other corporate systems like SharePoint, OpenText ECM, ESRI ArcGIS .
Ontario government systems that integrate with and leverage the Ontario GeoPortal.
Our business solutions are expertly tailored to meet your needs and expectations.
Leverage both our experience and our award winning SC2-GeoPortal technology to get a solution that will empower your staff, clients and partners.
The Ontario GeoPortal is a hosted solution in the Ontario Government and a service of Infrastructure Ontario. SKE acts as their "agent" in helping to secure new clients and business solutions and applications for integration and use within the Ontario GeoPortal. Ontario GeoPortal provides data, access/integration software, and development services - thus enabling clients in the public sector to more quickly and much less expensively implement their solutions.
Municipal GeoPortal is a hosted, intuitive information service. It brings mapping and business information together into one integrated view, regardless of where the data are stored to provide broad access to key information, improved collaboration, and more informed decision-making.
Municipal GeoPortal uses Google maps and imagery as the geographic base upon which your maps such as official zoning, parks, neighborhoods, planning, and health services are added.
Security is a key feature. For example, our Distributed option for business data enables them to remain in your computing environment behind your firewall while still being integrated with map layers and web-based services hosted at our high availability Canadian data centre.
Your Municipal GeoPortal can be quickly deployed to a specific group or to everyone across your municipality.
With nothing to buy, Municipal GeoPortal is a cost effective, high impact way to improve how your organization accesses information, communicates and makes decisions.
Municipal GeoPortal is available in a Map Edition; Business Edition; and, Public Edition.
Municipal GeoPortal features three access tools, out-of-the-box, with no plug-ins required: GeoViewer, DataViewer, DocumentViewer.
D000-Information Processing and Related Telecommunications Services
D309-Information and Data Broadcasting or Data Distribution Services
R002-Technology Sharing/Utilization Services
R007-Systems Engineering Services
T099-Other Communication, Photographic, Mapping, Printing and Publication Services
U009-Informatics Training
U099-Other Education and Training Services
Technology
Technology profile
GeoPortal uses Google maps and imagery as a base - giving clients an immediate and powerful backdrop for their business information.
Market
Market profile
Alliances:
- Sales/Marketing
Industry sector market interests:
- Agriculture
- Culture
- Environment
- Fishery
- Forestry
- Information Technology and Telecommunications
- Mining/Petroleum/Gas
- Tourism
- Transportation
Geographic markets:
Export experience:
- Egypt
- Italy
- Kenya
- Sierra Leone
- South Africa
- Ukraine
- United Kingdom
- United States
Sector
Sector information
Unique applications:
SC2 - GeoPortal -- a hosted geographic platform and systems against which organizations can integrate and engage their corporate content and business information systems.Dynamic Atlas -- Map-based publishing and access of information made inexpensive and easy.
Key / Major clients:
Infrastructure OntarioPWGSC - Government of Canada
Ministry of Aboriginal Affairs - Ontario
Ministry of Attorney General - Ontario
Ministry of Natural Resources - Ontario
United Nations - Food and Agriculture Organisation
World Bank
Ontario Ministry of Environment
Ontario Ministry of Municipal Affairs
Ontario Ministry of Finance
Success stories:
Infrastructure Ontario - GeoPortal for Ontario and the new Ontario GeoPortalWinner of:
- 2011 GTEC Distinction Award - Transorming the Business of Government
- 2010 URISA Ontario - Best Public Sector GIS
- 2007 Amethyst Award (with the Ministry of Economic Development and Trade)
- 2007 URISA Innovation Award
- 2005 Showcase Ontario Merit Award of Excellence
- 2005 URISA-OC Gold Award for Best GIS
- 2005 GTEC Week Silver Distinction Award
As of November 2010, Ontario Realty Corporation (ORC) is providing a suite of services for the Ontario government called "Ontario GeoPortal". SKE has been selected as the implementation partner for these services.
Ontario GeoPortal is built on the success of the ORC "GeoPortal for Ontario". With this, ORC staff can find assets (buildings, properties, parcels), see what's nearby, and access critical information about them - all through a geographic portal (SC2-GeoPortal) that integrates disparate business data and systems through a map-based interface.
Business applications can also link to the Ontario GeoPortal to "geo-enable" themselves. Integrated data security and access management make the solution secure and reliable.
This has meant:
- ORC's distributed corporate business applications can now be geo-enabled.
- ORC has an OGC compliant, vendor-neutral technology solution.
- ORC is better able to share information/data with clients and partners.
- ORC is able to leverage other organizations' data.
- ORC can provide geo-services to the rest of the province - through the Ontario GeoPortal
Ontario GeoPortal offers the following services:
- Customer GeoPortal - Customers get their own GeoPortal with their data, non-structured content, and business systems integrated within the rich content and functionality of the ORC GeoPortal.
- Custom Business Systems ORC customers can have us develop, deploy, and support customized, location-aware business systems that leverage GeoPortal.
- Business System Hosting We host ORC's customers' GeoPortal-enabled business systems on our high availability infrastructure.
- 3rd Party Information Services Customers can access specialty information products and services from various information service providers available in the ORC GeoPortal.
- Specialty Map Production and GIS Services ORC customers can use the ORC's fully equipped and staffed GIS Resource Centre for spatial data, analysis, map production and presentation needs.
- ArcGIS Server Hosting and Custom ArcGIS Development We host ORC customers' ArcGIS Server applications and/or we develop, deploy and support a customized ArcGIS-based desktop or web application.
Testimonial:
"SKE has been our corporate GIS implemention partner for the past several years. Their technology and expertise has made it possible for the Ontario Realty Corporation to offer a cloud based suite of services called "Ontario GeoPortal" to the rest of the Ontario Government."Joseph Lin, General Manager, Geomatics Unit, Ontario Realty Corporation
"SKE provided very qualified technical resources right from the beginning of the project. Their on-site presence in Pakistan and hands-on work with the user community was critical to the success of the project."
John Latham, Program Manager, Food and Agriculture Organization.
International capital projects:
Corporate Expertise:-----------------------
Spatial data infrastructure development.
Information technology capacity building.
Geographic Information Systems.
Corporate Language Capabilities:
-----------------------
English
Example Project: ProMIS
Country: Afghanistan
The work included:
· Project planning and management a project with a total budget over 1.7 million dollars; and over 300 potential client organizations of the software and services.
· Developing feasible, usable solutions that considered multiple user needs, available data, time and cost limitations.
· Systems design and development including map-based desktop and Internet based publishing and access, activity tracking and coordination, program description and budget submission and approval, metadata management, and more.
· Systems implementation and training.
· Web site design and development that delivers maps and data.
· Project communications planning and product development.
· Organizational capacity building set up the ProMIS office, staff skill descriptions, staffing
requirements, and key products and services.


I have a CurrentCost Envir, and would like to start migrating to my own OpenEnergyMonitor.
I understand there are options to do this.
1. Replace all CurrentCost equipment with a new EmonTX and Raspberry Pi base station with webserver
As is: Current Cost Transmitter -> CurrentCost Envir Display -> CurrentCost Bridge
To Be: EmonTx -> Raspberry Pi with RFM12Pi & HDD (running OpenEnergyServer locally) or Raspberry Pi with Rock Solid Gateway posting readings to hosted version of OpenEnergyServer
2. Replace the CurrentCost inhome display with the Raspberry Pi base station with webserver and modify code to decipher the proprietory code CurrentCost uses.
As is: Current Cost Transmitter -> CurrentCost Envir Display -> CurrentCost Bridge
To Be: CurrentCost Transmitter -> Raspberry Pi with RFM12Pi & HDD (running OpenEnergyServer locally) or Raspberry Pi with Rock Solid Gateway posting readings to hosted version of OpenEnergyServer (with modified perl to decipher CurrentCost protocol)
3. Keep all of the CurrentCost and connect the in-home display to a perl based server posting readings to a OpenEnergy Server (Raspberry Pi based or the hosted version). (I read with interest this very useful post http://openenergymonitor.org/emon/node/1418)
As is: Current Cost Transmitter -> CurrentCost Envir Display -> CurrentCost Bridge
To Be: Current Cost Transmitter -> CurrentCost Envir Display -> Serial:USB cable -> Perl based client with custom code -> Raspberry Pi with RFM12Pi & HDD (running OpenEnergyServer locally) or Raspberry Pi with Rock Solid Gateway posting readings to hosted version of OpenEnergyServer!
Who has implemented what? My preference is as follows:
Option 2 if someone has the code and can advise how to apply to the Pi based server.
or
Option 3 if the Pi based server could run the script which grabs the serial:USB data from the CurrentCost monitor.
Can anyone help and advise me?
Thanks
Re: CurrentCost User - migrating to OpenEnergyMonitor. Help and Advice please
Ok - so I had a go at setting up scenario 3 on my own. I chose scenario 3 because I quite like having the in home display, and I believe it works quite reliably - just the bridge seems to be unreliable. Also there was quite a lot of examples of people grabbing data from the Envir via the included USB Serial cable with perl on a pi
Let it be known I'm no linux or Raspberry Pi expert, a definite noob actually. But I've managed to get it working.
So to recap scenario 3 is:
I have built the Emoncms booting to HDD so a self contained Emoncms system on a single Raspberry Pi. I also put a copy of the envi.pl script (from the post I reference above) onto my Pi SD boot card, and modified it mith my Pi's IP and the API key for my Emoncms read/write access. I also modified the script to comment out the print statements and reference to channel 1 as I don't have any IAM's. I found the envi.pl script wouldn't run without installing some libraries for LWP and Serial Port support. This is what I did to get it working:
On booting the Pi and logging in with the pi user.
sudo bash
apt-get install libdevice-serialport-perl
apt-get install libwww-perl
cd /boot
perl envi.pl &
And that's it.
Its working great.
Now playing with Emoncms, and setting up some cool visualizations and dashboards...
However - I still need help and advice:


--- layout: post date: 2006-06-25 time: "09:00:00" authors: ["Greg Wilson"] title: "Software Carpentry's new home" tags: ["Instructor Development"] ---
Thanks to the folks at Enthought, the Software Carpentry course notes have a new home at http://www.swc.scipy.org. I'll move the wiki, bug tracker, and mailing lists there over the next couple of days as well. I hope the community will find the material useful — it's certainly been a lot of fun putting it together.


test_image module¶
-
test_image.
test_b64_to_image
(b64_path, expected_path)¶ Test the b64_to_image function
This function ensures that the b64_to_image function correctly converts a base64 string into an image. The converted image is compared to the expected image, which is loaded from a file.
- Parameters
b64_path (str) – path to txt file with base64 string
expected_path (str) – path to expected image file
- Returns
none
-
test_image.
test_image_to_b64
(img_path, b64_path)¶ Test the image_to_b64 function
This function ensures that the image_to_b64 function correctly convert an image into a base64 string. The converted string is then compared to the expected string, which is loaded from a txt file.
- Parameters
img_path (str) – path to image
b64_path (str) – path to expected base64 string
- Returns
none
-
test_image.
test_is_b64
(b64_image, expected)¶ Test the is_b64 function
- Parameters
b64_image (str) – string in question for b64 validity
- Returns
none
-
test_image.
test_read_img_as_b64
(file_path, b64_path)¶ The the read_img_as_b64 function
This function ensures that the read_img_as_b64 function converts the image into the correct string. The converted string is compared to the expected string, which is loaded from a text file.
- Parameters
file_path (str) – path to image file
b64_path (str) – path to txt file with expected b64 string
- Returns
none
-
test_image.
test_save_b64_img
(b64_path, file_path, expected_path)¶ Test the save_b64_img function
This function ensures that the save_b64_img function correctly converts the base64 string into an image. The converted image is compared to the expected image, which is loaded from a file.
- Parameters
b64_path (str) – path to txt file with expected b64 string
file_path (str) – path to image file
expected_path (str) – path to expected image file
- Returns
none
-
test_image.
test_unzip
(filename, expected)¶ Test the unzip function
This function ensures that the unzip function extracts all the images in a zip file.
- Parameters
filename (str) – file path to zip file
expected (dict) – dictionary with expected image list and
flag (success) –
- Returns
none


You appear to be using a singleton directly in your code.
The singleton pattern should be used to restrict the number of instances a class can have instead of enabling easier retrieval of a specific object.
Using a singleton instance directly in another class by calling the Singleton.getInstance() instance retrieval method increases a strong coupling between the singleton and the class it is used in, i.e. the class using the singleton can only ever use this one specific instance.
This can be a particular problem during testing. For this reason, instance retrieval of a singleton — be it a legitimate usage of the pattern or not — should only ideally occur once in the entire code base and the instances can be passed into any constructor whose class is using the instance. Even better, to reduce coupling even further, Singleton should implement a generic interface which can be injected into other classes using it. This allows for even easier testing.
${if improvement}


CaptureWorld
Parameters:
| None. |
Description:
| Takes a snapshot of the position and orientation of each entity in the
world. This snapshot can then be used with RenderWorld to render entities at a point somewhere between their captured position and their current position. See RenderWorld for more about how and why this is done. |
| None. |


Rails 3.2 playground
This project was created so I could better understand Rails 3.2 and ruby-lang
.
Still to learn
How model validation works :client, :server, :anything and :everything
- Request life-cycle :filters, :actions, :redirects
- Fucking
routes
.
Why do every gem
introduce a new fucking config
file
Introduce some client-side scripts :serve them correctly
- Write some tests
- Write some
Selenium
tests
- Write some
db:seeds
- Read more about Rails 3.2 here: http://guides.rubyonrails.org/3_2_release_notes.html
TODO
In the order I wish to implement:
- Complete Backbone.js routes and views
Convert views/templates to use Mustache
(this is so much easier on Node.js
)
Re-create server views that work without Backbone.js
Styling, add some CSS3 animations (without JS hooks for triggering animation)
Findings
I expect to expand on these findings below sometime soon. In the meantime, you'll have to put up with vague, abstract points notations.
- Rails 3.2 +
CoffeeScript
– I will never understand why. I personally think CoffeeScript
integration should be a choice, not default
- Basic model validation seems pretty simple, and at this stage the next step in this direction would be to find out how to write
custom_validators
and hooking them up to models
- Configuration for new
gems
are minimal. I like the idea of initializers
- The new Asset Pipeline is fairly trivial


To view your own model, drag a gcode file from your desktop and drop it in this window.
This is a viewer for GCode files, which contain commands sent to a CNC machine such as a RepRap or MakerBot 3D printer.
This viewer shows the operations the machine will take.
Drag the mouse to rotate the model. Scroll with the mouse wheel to zoom. Right click and drag to pan.
To view your own model, drag a gcode file from your desktop and drop it in this window.
To learn more, read the blog posts.
This code is based off of the original GCode Viewer by Joe Walnes.


This mapping will make your mac behave more it would on Windows. It is designed with an external keyboard in mind.


{% extends "layout.html" %}
{% block content %}
Champion (Wins Minus Losses)
|
Player |
Wins - Losses |
{% for place, stat in season_stats['wins_minus_losses'] -%}
| {{ place + 1 }} |
{{ stat[0].full_name }} |
{{ stat[1] }} |
{%- endfor %}
Hurricane (Wins)
|
Player |
Wins |
{% for place, stat in season_stats['wins'] -%}
| {{ place + 1 }} |
{{ stat[0].full_name }} |
{{ stat[1] }} |
{%- endfor %}
Dedicated (Games Played)
|
Player |
Games |
{% for place, stat in season_stats['games_played'] -%}
| {{ place + 1 }} |
{{ stat[0].full_name }} |
{{ stat[1] }} |
{%- endfor %}
Marathon Person (Games in a Day)
|
Player |
Games |
{% for place, stat in season_stats['games_played_one_ep'] -%}
| {{ place + 1 }} |
{{ stat[0].full_name }} |
{{ stat[1] }} |
{%- endfor %}
Dan Slayer (Dans Defeated by Kyu)
|
Player |
Dans Slain |
{% for place, stat in season_stats['dans_slain'] -%}
| {{ place + 1 }} |
{{ stat[0].full_name }} |
{{ stat[1] }} |
{%- endfor %}
Kyu Killer (Kyus Defeated by Dan)
|
Player |
Kyus Killed |
{% for place, stat in season_stats['kyus_killed'] -%}
| {{ place + 1 }} |
{{ stat[0].full_name }} |
{{ stat[1] }} |
{%- endfor %}
Sensei (Games vs. Weaker)
|
Player |
Games |
{% for place, stat in season_stats['games_against_weaker'] -%}
| {{ place + 1 }} |
{{ stat[0].full_name }} |
{{ stat[1] }} |
{%- endfor %}
Philanthropist (Losses)
|
Player |
Losses |
{% for place, stat in season_stats['losses'] -%}
| {{ place + 1 }} |
{{ stat[0].full_name }} |
{{ stat[1] }} |
{%- endfor %}
{% endblock %}