CB30 SLL B CB31 SLL C CB32 SLL D CB33 SLL E CB34 SLL H CB35 SLL L CB36 SLL (HL) CB37 SLL AThe SLL instruction operates exactly as SLA, though SLL inserts 1 in stead of 0.
Main instruction Effect of preceding DD ---------------- ---------------------- LD H,(HL) Causes LD H,(IX+d) LD (HL),H Causes LD (IX+d),H LD L,(HL) Causes LD L,(IX+d) LD (HL),L Causes LD (IX+d),L EX DE,HL None (left as EX DE,HL) EXX None (left as EXX) EDxx None (left as EDxx) CBxx See below (DDCB Prefix)
Multiple DDs or FDs after each other operate effectively as NOPs.
ED40 IN B,(C) ED60 IN H,(C) ED41 OUT (C),B ED61 OUT (C),H ED42 SBC HL,BC ED62 SBC HL,HL ED43 LD (nn),BC ED63 LD (nn),HL ED44 NEG ED64 * NEG ED45 RETN ED65 * RETN ED46 IM 0 ED66 * IM 0 ED47 LD I,A ED67 RRD ED48 IN C,(C) ED68 IN L,(C) ED49 OUT (C),C ED69 OUT (C),L ED4A ADC HL,BC ED6A ADC HL,HL ED4B LD BC,(nn) ED6B LD HL,(nn) ED4C * NEG ED6C * NEG ED4D RETI ED6D * RETN ED4E * IM 0/1 ED6E * IM 0/1 ED4F LD R,A ED6F RLD ED50 IN D,(C) ED70 * IN (C) / IN F,(C) ED51 OUT (C),D ED71 * OUT (C),0 ED52 SBC HL,DE ED72 SBC HL,SP ED53 LD (nn),DE ED73 LD (nn),SP ED54 * NEG ED74 * NEG ED55 * RETN ED75 * RETN ED56 IM 1 ED76 * IM 1 ED57 LD A,I ED77 * NOP ED58 IN E,(C) ED78 IN A,(C) ED59 OUT (C),E ED79 OUT (C),A ED5A ADC HL,DE ED7A ADC HL,SP ED5B LD DE,(nn) ED7B LD SP,(nn) ED5C * NEG ED7C * NEG ED5D * RETN ED7D * RETN ED5E IM 2 ED7E * IM 2 ED5F LD A,R ED7F * NOPThe ED70 instruction reads from port (C), just like the other instructions, but does not store the result. It does change the flags in the same way as the other IN instructions, however. The ED71 instruction OUTs a byte zero to port (C), interestingly. These instructions "should", by regularity of the instruction set, use (HL) as operand, but since from the processor's point of view accessing memory or accessing I/O devices is almost the same thing, and since the Z80 cannot access memory twice in one instruction (disregarding instruction fetch of course) it can't fetch or store the data byte (A hint in this direction is that, even though the NOP-synonyms LD B,B, LD C,C et cetera do exist, LD (HL),(HL) is absent and replaced by the HALT instruction.).
The IM 0/1 instruction puts the processor in either IM 0 or 1. I cannot figure it out on my MSX (IM 0 operates the same as IM 1, as the only interrupting device always provides value FFh (RST 38h) ).
The list also has some undocumented RETIs and RETNs. On a MSX these instructions cannot be distinguished from a normal RET. Only because of the opcode sequence I think these are RETIs and RETNs. It isn't verified.
000 B 001 C 010 D 011 E 100 H 101 L 110 (none: documented opcode) 111 AAs the BIT x,(IX+d) instructions only reads (IX+d), these instructions do not store anything in one of the all-purpose registers.
So, the DDCB0100 opcode effectively does the following:
LD B,(IX+01) RLC B LD (IX+01),BI would propose a shorthand: LD B,RLC (IX+01).
Note: I've seen these instructions as follows:
DDCB0100 RLC (IX+01), followed by LD B,(IX+01)
This is incorrect, as the Z80 stores the result of RLC (IX+01) in (IX+01) and the B register. It doesn't load the value from (IX+01). If (IX+01) would point to ROM memory, the B register would contain the rotated value. Also, the Z80 never accesses the memory three times during one instruction.
See Opcode list for a complete list of all opcodes.


[§128F-1] Name. This chapter may be cited as the Emergency Management Assistance Compact. [L 2006, c 55, pt of §2]


{% extends "base.html" %} {% block title %}Hotels{% endblock %} {% block nav_hotels %}active{% endblock %} {% block content %}
Keep in mind this will be Labor Day weekend so if you are staying in a hotel you need to book soon.
The closest neighborhood to the wedding is the University District and two great choices for hotels are the Watertown Hotel and the University Inn. They offer a discount for weddings if you use the promotional code: WED.


High Priest Marie:
Of course, the Elven Wizard is no exception. Anyone wishing to become an Elven Wizard must have achieved at least level 20 and passed the appropriate test.
You've done neither one! Reach level 20 and then speak with Rosella in Elven Village about taking the test. Pass her test and I'll make you an Elven Wizard!


mart
home
about us
page
shop
blog
contact us
AFFORDABLE PARIS TOURS
CITY TOURS / TOUR TICKETS / TOUR GUIDES
new collection
add to cart
blue tshirt
$26
add to cart
woman shirt
$31
add to cart
yellow tshirt
$21
add to cart
cool lingerie
$56


All of the methods return the Tooltip object to enable the chaining of configuration options
Alternatively, you can build an associative array, using the method names as keys, and pass the array into the Tooltip's constructor


DosExec(), SysShutdown()
There are two ways for a geode to shut down GEOS. The first,
DosExec()
, shuts the system down to run a program under DOS, returning after the DOS program has finished--unless a task-switch driver is in use, in which case the system will create a new task and cause the task-switcher to switch to the new task.
The second,
SysShutdown()
, forces the system to shut itself down completely. Neither of these routines is commonly used by anything other than the kernel, GeoManager, special "launcher" programs, or the UI. Their use by other libraries or applications is discouraged unless absolutely necessary.
DosExec()
takes several parameters including the pathname of the DOS program to be run, arguments for the program, an optional disk handle of the disk that contains the program to be run, the optional directory and disk handle in which the program should be executed, and a record of
DosExecFlags
. If the return value is nonzero, an error occurred in loading the DOS program, and you can use
ThreadGetError()
to check what error occurred. Note that
DosExec()
always returns. Applications should
not
rely on
DosExec()
shutting the system down; if a task switcher is present, GEOS will be swapped out rather than shut down.
SysShutdown()
causes GEOS to exit in one of several ways. This routine should be passed a shutdown mode. If the mode is SST_CLEAN, SST_RESTART, SST_SUSPEND, or SST_CLEAN_FORCED, the routine will return; otherwise, it will not return and the shutdown will commence. If SST_CLEAN is passed, the shutdown may be aborted after
SysShutdown()
returns. You can have
SysShutdown()
cause GEOS to reboot itself after shutting down (as the Preferences Manager application does for certain preferences settings), but this starts GEOS fresh. This routine is very rarely used by anything other than the UI, the kernel, or the Preferences Manager application.
If something else (typically the UI or task switcher) shuts the system down, objects that register for shutdown notification will receive
MSG_META_CONFIRM_SHUTDOWN
. The application should call
SysShutdown()
with the mode SST_CONFIRM_START; this allows the object to have exclusive rights for asking the user to confirm the shutdown (when the object is finished with the user interaction, it can call
SysShutdown()
with SST_CONFIRM_END to release exclusive access). This is useful if your application or library has an ongoing operation and wants to verify the shutdown with the user.


|
ovs all
|
Public Member Functions | |
| def | __init__ (self) |
| def | register (self, fd, events) |
| def | poll (self, timeout) |
Data Fields | |
| rlist | |
| wlist | |
| xlist | |
select.poll emulation by using select.select. Only register and poll are needed at the moment.
| def ovs.poller._SelectSelect.__init__ | ( | self | ) |
| def ovs.poller._SelectSelect.poll | ( | self, | |
| timeout | |||
| ) |
| def ovs.poller._SelectSelect.register | ( | self, | |
| fd, | |||
| events | |||
| ) |
| ovs.poller._SelectSelect.rlist |
| ovs.poller._SelectSelect.wlist |
| ovs.poller._SelectSelect.xlist |


{% extends 'fundraising/index.html' %} {% load humanize static %} {% block content %}
Your support is invaluable to continue the rapid development of Django and helps the Django Fellowship program in particular.
Please help us spread the word and encourage your friends and colleagues to donate. Thank you!
Tweet #SupportDjangoWe'd love if you proudly displayed a badge on your website or online profile to help spread the word about our campaign. You may use the "Leader" badge if you donated more than ${{ leadership_level_amount|intcomma }} per year.
If you'd like to have your name or company displayed on the Fundraising page and in the sidebar on the Django Project website, please fill out the form below. This is, of course, optional.
{% endblock %} {% block content-extra %}{% endblock %}


Up and running ASM.js in browser
-
Install Emscripten SDK
Download Emscripten SDK Offline Installer and install it. For more information about installation process refer https://kripken.github.io/emscripten-site/docs/getting_started/index.html
-
Check Emscripten installation
Click on Windows -> Search and search for Emscripten Command Prompt. Check Emscripten version.
emcc -v
emcc is transcompiler to compile C/C++ code to javascript code.
-
Create C/C++ test file
mkdir asmdemo
cd asmdemo
copy NUL hello-world.c (create hello-world.c)
Copy following content into newly created hello-world.c
#include<stdio.h>
int main() {
printf("hello, world!\n");
return 0;
}
-
Compile C/C++ code using emcc
emcc hello-world.c
it will create file name a.out.js
-
Run
node a.out.js
-
ASM.js in Browser
- We want HTML so that we can view it in the browser. Enter this command to specify and HTML document.
emcc hello-world.c -o hello.html
- Open hello.html that with your browser, and you can see it as a web page.
Written on July 10, 2016


Reveal.js & Library Tutorials
Code4Lib Recap for SCOPA
September 29, 2017
Slides: bit.ly/scopaslides
Project Goals
- Create access to comprehensive information without being too lengthy
- Afford user agency and respect time
- Accomodate varied learning styles
- Leverage existing open resources
Technical Requirements
- Compatible with campus LMS
- Integrate assessment tool
- Functional across devices
- Modular construction
- Multimedia capabilities
Reveal.js: a perfect fit
- HTML presentation framework
- Permits nested slides
- Easy to write and work on collaboratively
- Responsive design, houses multimedia content
Case Study: Zotero
Learning objectives:
- Create Zotero account
- Collect various types of resources
- Organize library into folders
- Generate a bibliography
Included Content
- Videos demonstrating saving resources
- Instructional GIFs for organization tips
- Nine level top slides, 18 total
- Integrated assessment tool
Publishing
- Deployed in a LibGuide, made campus LMS module, WI+RE website
- Available to other universities with liberal CC license
- As of March, had been adopted by three other schools
- Session duration over three minutes
This framework at Yale
- Similar project for EndNote
- Building out one for formulating clinical questions
Let's collaborate!
For more information...
caitlin.meyer@yale.edu


Employee Review Form
Details of the Employees
First Name
{{form.EFname}}
Last Name
{{form.ELname}}
Employee email
{{form.Eemail}}
Department
{{form.department}}
Position
{{form.position}}
Details of the Manager
Manager First Name
{{form.MFname}}
Manager Last Name
{{form.MLname}}
Details of the Review
Job Knowledge
{{form.job}}
Work Quality
{{form.quality}}
Attendance Puntuality
{{form.attendanceP}}
Productivity
{{form.productivity}}
Communicatiion/Listening Skills
{{form.communicationL}}
Dependability
{{form.dependability}}
Overall Rating
{{form.Orating}}
Comments
{{form.comments}}
Approve
Decline
Delete
Close


@* * Copyright 2023 HM Revenue & Customs * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. *@ @import common.resident.MoneyPounds @this() @(rowId: String, question: String, amount: BigDecimal, isTotal: Boolean = false, hintText: Boolean = true)(implicit messages: Messages) @(isTotal, hintText) match { case (true, _) => {


Money Play. How should Red play 53?
pips Red=166 White=111
(CorrectAnswer= 0/0, ErrorScore= 0)
I got this one well wrong over the board. I played 18/15, 18/13 which I think many would choose with the objective of maintaining the1-4 back game.
The problem is that Red needs to be about 90 pips behind in the race to play a 1-4 back game and at the moment he is well shy of that. With such dubious timing he needs to look for a different plan.
Clearly the ace-point should not be given up as that is the last bastion of Red’s defence. Equally well the checkers on the bar-point are holding the checkers on White’s mid-point and 11-pt.
This leads us to the unusual play of giving up Red’s 4-pt. The correct way to do this is to play 21/13, leaving the option of remaking the 4-pt later in some variations. 21/16, 21/18 is a blunder as in fact is every play other than 21/13.
The problem is that Red needs to be about 90 pips behind in the race to play a 1-4 back game and at the moment he is well shy of that. With such dubious timing he needs to look for a different plan.
Clearly the ace-point should not be given up as that is the last bastion of Red’s defence. Equally well the checkers on the bar-point are holding the checkers on White’s mid-point and 11-pt.
This leads us to the unusual play of giving up Red’s 4-pt. The correct way to do this is to play 21/13, leaving the option of remaking the 4-pt later in some variations. 21/16, 21/18 is a blunder as in fact is every play other than 21/13.
1. Cubeful 2-ply 21/13 Eq.: -0.628 0.373 0.074 0.002 - 0.627 0.230 0.022 2. Cubeful 2-ply 21/18 21/16 Eq.: -0.656 (-0.028) 0.362 0.063 0.002 - 0.638 0.217 0.020 3. Cubeful 2-ply 18/15 18/13 Eq.: -0.676 (-0.047) 0.366 0.060 0.001 - 0.634 0.223 0.018 4. Cubeful 2-ply 24/16 Eq.: -0.679 (-0.051) 0.350 0.068 0.003 - 0.650 0.221 0.008 5. Cubeful 2-ply 18/10 Eq.: -0.751 (-0.123) 0.350 0.056 0.001 - 0.650 0.233 0.018


Conversational Web
A chatbot that learns by reading your website.
process
user interviews -> needs validation -> paper prototyping -> heuristic review -> medium-fidelity prototyping -> wizard-of-oz testing -> high-fidelity prototyping -> think alouds -> usability testing -> development -> ...
team
Matt Tharp, Jon Linton, Alan deLespinasse, Ira Ladson
duration
2019 / ongoing
Problem Statement
Prospective buyers of a new product or service often have lots of specific questions. It is hard to find these answers on the seller's website, not because the information isn't there but because it is buried deep within the website's labyrinths. Providing access to knowledgeable sales people via chat 24x7 is expensive, and many sellers consequently lose out on prospective buyers.
Outcome
Conversational Web is "AI in chatbot clothing." It lives at the bottom of the page, but instead sending your questions to a live customer service team, it answers (most of) them right away. When it fails, it elicits human help. Using contextual clues based on the website's DOM, Conversational Web also surfaces relevant prompts to engage visitors as they explore a company's website. The beta version of the product will launch in January 2020. More info here.
Selected Assets
A selection of assets from the prototyping process are presented here. As stated above, this is an ongoing project.
[Figure 1] A collection of paper prototypes from the early stages of the project.
[Figure 2] A low-fidelity wireframe showing the form factor of the chat window.
[Figure 3] A wireframe showing the chat window in the middle of a conversation.
[Figure 4] A high-fidelity prototype showing the chatbot attempting to engage a visitor with a proactive question. The question fades when the timer runs out after 10 seconds.
[Figure 5] A high-fidelity prototype showing the chatbot attempting to engage a visitor with subtle calls-to-action (CTAs) as they scroll down a webpage. The CTAs are contextual, i.e. related to the content that the user sees on the webpage.
[Figure 6] A high-fidelity prototype showing a conversation between the chatbot and the visitor.


Standard(attribute: Attribute)
sortAttribute refers to common table attributes defined in the node schemas: VaultState, VaultLinearStates, VaultFungibleStates


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


Thank you for joining this session via Zoom. Please share your screen.
You need about 30 minutes to complete this session in one sitting and free of interruption. Unless you encounter technical difficulties, you should not ask the researcher questions. If you do need to ask a question, use the chat.
Follow closely the instructions below to complete the same task seen before.
Task:
Add accurate and complete information about “leaf blade” to the CAREX Ontology.
First, watch the Wizard_New video, then complete the task. Then watch the video for Wizard. Lastly complete the comparison survey.
| 1 | Watch Wizard_New Video | Complete task using Wizard_New. Move on when 5 min is up even if you don't complete the task. | 2 | Watch Wizard Video | 3 | Answer Comparison Survey |
|---|
*Let the researcher know in the Chat when you're done.


This page introduces the task of labeling industrial smoke emissions from videos. Each video is 3 seconds. Note the following characteristics of smoke:
- Smoke shows various colors, while steam is mostly whitish.
- Smoke has unclear edges and fades away slower than steam.
- Smoke has various opacities, while steam usually has high opacity.
High and Low Opacity (Need to Select Both)
Please label high and low opacity smoke, even with unknown emission source. High-opacity smoke (the first and second videos below) blocks its background. For low-opacity smoke (the third and fourth videos below), the background can be visible.
Steam-Only (Do Not Select)
Steam disappears faster and has sharp edges when compared to smoke. Steam usually has high opacity, which makes its background not visible. Here are examples that show mainly steam, which should not be selected.
Smoke + Steam (Need to Select)
Smoke and steam can appear at the same time. Here are examples that show both smoke and steam, which also needs to be selected.
Bad Weather (Do Not Select)
Various bad weather conditions can affect the camera view. Here are examples that show bad weather, which should not be selected.


ng-conf this year will be a fully virtual event, due to the situation with COVID-19. All the workshops, including ngGirls, will be delivered online.
We're planning to give you the best, most engaging experience.
- The workshop will happen as planned, on Tuesday, March 31st, between 10am - 5pm (MDT).
- We'll start with an intro to Angular, then work in virtual groups with the help of the mentors.
- Applicants from all over the US and the whole world are welcome! Help us spread the word and invite all your friends!
- Mentors needed - from all over the world!
Please expect more details and acceptance emails in the coming week.


Dog Corp
Welcome to Dog Corp. Our firm is deticated to fulfilling dog needs thoughout the world. We specialze as consultants on hole digging, barking at random noises and eating trash.
Our Core Values
- Satisfying and delighting our clients
- Providing clients with affordable council
- Persueing growth and learning
Our company culture is not the only reason why we have had such a good track record of success. Dog Corp's rise was predicted by Cissero
Summo saperet constituam dogs no sit, malis clita in eam. Id quo unum lorem omnium. Brute discere mediocritatem at qui. Sententiae adversarium no nec, ex civibus dissentias disputando eos, has elit commune efficiendi id.
Duo ut senserit consetetur, duo alterum fabellas at, omnis volumus accommodare et sit. Red bellied warbler nostrum cotidieque no, duo te indoctum contentiones. Ubi cani sunt?
One of the world famous projects we consulted on
Other Projects Include(chronlogically)
- Eating the trash by 14th and Roosevelt
- Holes in Mr. Ernst's Flower garden
- Barking at that car that one time
References
Contact us


---
layout: post
esbma_id: 1422
date: 2002-01-11 12:00:00
keywords: cornsharp
title: Blog entry on 11 Jan 2002
---
I just posted the following remarks to a discussion Slashdot:
Eventually the CLR will replace Microsoft's platform revenue stream.
 Windows is one of the most expensive components of a desktop computer.
If you look far enough down the road, Linux on the desktop is a reality. So they know that the OS monopoly is coming to an end. It is time to start getting a new monopoly ready to take its place.
They will ride this gravy train as long as they can, and then they will concede the OS market and start charging the same per-computer tax for the CLR. They won't care what OS is running underneath it. The OS will become a low-margin commodity, and they may even just starting giving Windows away for free. The profit margins will simply be relocated upward to a higher layer of this new and thicker notion of a platform.
BTW, don't even think about suggesting that Java will win because it was here first. Java is to the CLR as Lotus-1-2-3 was to Excel. Some people innovate. Other people specialize in refinement and broad market penetration.
BTW, my remarks about the CLR are intended to be more admiring than pejorative. We're committed to the .NET platform, and I really like C#.


Subject Where Do We Go From Here?
From Dilyn Corner<EMAIL_ADDRESS>Date Tues, 23 Feb 2021 5:00:00 -0500
Where to begin!
First, I would like to thank all of who participated in the poll we recently
ran! We had over a hundred responses, which by itself I found quite amazing -
Dylan's little project turns out to be bigger than I had expected. I certainly
wasn't anticipating the outcome we had, but I appreciate that so many of you
thought of me. For those of you who didn't want a new BDFL, I do not blame you;
I myself have been happily maintaining all of my own packages for several months
now with few issues. The beauty of KISS is that you can be your own BDFL :)
I'm certain many of you are curious what I plan to do with these newfound powers
and responsibilities, so I thought I would take some time to explain my plans,
goals, and intentions. I have a tendency to be overly verbose, so I'll break
this up into sections; feel free to read as much or as little as you'd like.
The Guidestones [1.0]
The Package Manager [2.0]
The Website [3.0]
The Repositories [4.0]
Reddit & IRC [5.0]
Structure [6.0]
[1.0] THE GUIDESTONES
________________________________________________________________________________
I take Dylan quite seriously in his declaration that "[the Guidestones] are a
set of notes which make KISS... KISS". They're explicit, simple, and focused. I
think these principles are what have given us the kind of community we have,
with projects like $/eudaldgr/kiss-live $/wyvertux/wyverkiss $/gkisslinux/grepo
$/Himmalerin/kiss-wayland springing up to fill the gaps and needs of users, by
users. And I think the 'by users' part is the most important thing. That users
want to contribute and explore ideas, concepts, and features make KISS what it
is - a maleable yet sturdy base on which you can create whatever you want.
Specifically, I see no reason to change the goals that define the main
repositories. Dylan had previously spoken about switching to Wayland, only when
it finally became apparant that using Xorg would be essentially impossible. See
his discussion in IRC here:
https://freenode.logbot.info/kisslinux/20200912#c5073615
Drew Devault will yet have his day, it seems.
KISS will continue to target X86_64 primarily, and will be English only. There
should be few if any new packages added to the core repo. The most complicated
thing a majority of people want is a graphical environment that runs a
webbrowser, and that is what they will get. By default, officially supported :)
As such, I see no good reason to change much of the Guidestones.  While my own
personal repository is quite different from the core repository - strictly using
Wayland and pursuing software under nonGPL licenses - I have no interest in
imposing these restrictions on KISS as a whole. If that is something a user
wants, they can do it themselves, like I did.
The point on the existence of a 'below governance structure' is an important
one; I do not wish to change this rule, and I will describe at the end what I
intend to do so that the KISS project can avoid going through these last few
months again.
[2.0] THE PACKAGE MANAGER
________________________________________________________________________________
Dylan was previously working on K, a version of kiss written in C. Recently,
$/illiliti/king has taken up a similar project. I commend the effort, and it
will be interesting to see how it turns out! Much like Dylan said when he
started working on it, however, I have no plans of changing the fundamentals of
the package manager much if at all - it is, in my opinion, feature complete, and
most of our focus on it should be on extensions like kiss-orphans and kiss-graph
than packing new lines of code into kiss itself.
There have consistently been talks of adding a maintainer and license file to
packages, adding metadata to the repositories, and otherwise tweaking packages.
My opinion on the matter is that, without good technical reason for doing so,
the way packages are made and distributed is precisely the minimum required, and
maximally efficient. Adding a maintainer file defeats the purpose of using git,
for instance; while a one-line plaintext file may be easier to parse than git
log, kiss-maintainer seems to be more than adequate. A license file or a line in
the version file is interesting, but I don't think ultimately necessary - all
software in the main repositories is necessarily F(L)OSS; extended concerns
about which license is used by what package can be answered by simply
downloading the source and investigating one of the files inside (usually
COPYING or LICENSE). However, should users wish to install the license file WITH
the package, I have no issue with allowing a one-liner to the end of community
build files:
install -Dm644 COPYING "$1/usr/share/$1/$1.$licensename"
This wouldn't violate the package guidelines, it's easily greppable for curious
users, and everyone else can check the sources.
There are a few small bugs in kiss; the infamous KISS_SU bug which caused a
flurry of Reddit posts for instance, along with a few other ones. I would hope
to fix these, and am more than happy to accept patches which add small, quality
of life changes that do not fundamentally alter the package manager - in my
eyes, kiss is essentially 'feature complete'.
[3.0] THE WEBSITE
________________________________________________________________________________
With Dylan's disappearance, many things have slowly crumbled. The domain expired
earlier this month, SSL certificates have expired, and of course the main
repositories have been untouched. There has been a lot of discussion on IRC
since January about what to do should Dylan not return before the website
expires, and a loose plan emerged.
Ideally, we (I, I guess) will be purchasing the domain when it goes up for
auction sometime in March. This is to ensure some level of continuuity between
Dylan's time as BDFL and the time we are in now.
Conversations have been had on IRC (we talk a lot on IRC, you should look into
joining us) and many users showed interest in taking a self-hosted direction
with many features of KISS instead of relying so much on GitHub, which many
users take issue with. My primary concern with self-hosting is that we would be
at the mercy of the hoster. And while I would certainly choose someone
trustworthy, that doesn't change the fact that we would be relying on a system
in some closet somewhere in the world. The distributed nature of a host like
GitHub is useful, if not ultimately necessary. Mirroring the site, on the other
hand, I have no real issue with. If people would like to mirror the website or
the repositories, a few links can be added to the main repositories and site
mentioning their existence. I will be looking into doing some sort of mirroring
as well.
Speaking of mirrors, $/mcpcpc has been working on converting the website away
from the bare-bones, minimalistic plaintext the website is currently utilizing
and turning it into something more rich. You can find it here https://mcpcpc.com/k1ss
While his efforts are appreciated, one of the beauties of the site as it stands
is how simple and lightweight it is - honestly, a feat one sees rarely in the
Modern Web(tm). I don't intend on making their work the official incarnation of
the site, but users are certainly more than welcome to use it instead if that is
what they would prefer. KISS is essentially self-documenting, and bundling the
website with the package manager is convenient and, I think, best done from the
simplest sources possible.
People have been talking about switching to Gemini. While this is perhaps
arguably more inline with our goals and principles than the 'average Web', I
fear it is far too restrictive - but maybe this is just my 'old man yells at
clouds' moment. Again, I am not opposed to people mirroring the site to Gemini,
and I am fine with making reasonable and good changes to the site if that would
help. And, of course, linking to their work for the users who want that option.
[4.0] THE REPOSITORIES
________________________________________________________________________________
Much like the website, people are curious about where the repositories should be
- going even as far as to suggest we drop git entirely for fossil. First and
foremost, I think switching to fossil is at best incredibly difficult. git is
so deeply ingrained in the functioning of KISS, a lot of work would have to be
done for such a transition. That being said, I see no good reason it couldn't
theoretically be supported - if we do not lock users into coreutils or init, why
should we lock them into VCS? I will be exploring this soon(tm) in my own
repository. As it stands, KISS will be sticking to git for a while, if not
forever.
Gaining access to $/kisslinux is probably never going to happen, so
hopefully we will be able to telegraph to the world to look elsewhere. An
interim repository at $/kiss-community was setup by a few members, and I see no
good reason to change from it - no sense in making users switch to
Yet Another Upstream ReposiTory.
As far as hosting the repositories on GitHub is concerned, my worries for
self-hosting the website carry over here.  Our current single point of failure is the BDFL, not the hardware of some
poor soul. Mirroring the repositories, however, I am fine with. Honestly, I
have never done such a thing - the most I've ever hosted is a media server off
of a screendead laptop in 2008. Hosting outside of GitHub will be explored and
proper announcements made should something change, but there will always at
least be a mirror of the repositories on GitHub. Here it was born, and here it
shall stay.
[5.0] REDDIT & IRC
________________________________________________________________________________
I got notified literally while writing this that my request for Mod privileges
on the subreddit has been granted, so I suspect several of you will have gotten
here from there. Hello! While Dylan may not have been hands-off with the
subreddit by choice but rather by ignorance, I will take a similar track;
pinning things that are relevant, announcing changes as they come, etc. I'll
always be around in there, silently watching...
Somebody other than me has submitted a request for the IRC channel. I'm not
terribly concerned with the IRC - it barely had moderation to begin with, some
might say...
Mostly, I'd just like to update the Song of the Day more than once every five
months :) The IRC channel will continue, under someone's (or noone's) control,
in perpetuity. No plans for Discord, Matrix, Telegram, Whatsapp, Slack, Teams,
or Newsgroups. Y'all are more than welcome to start your own, if you'd like. But
I won't be joining them.
[6.0] STRUCTURE
________________________________________________________________________________
This is, I think, the most important topic to tackle. Obviously we were left out
in the cold rather abruptly. I didn't terribly mind it - Dylan did after all say
that he wanted the distro to be easily maintainable my one person. Plus, I don't
rely on community very much at all for my packages.  Eliminating duplication of effort is important. I don't know how
long I'll be around (I plan to live forever, so far so good), and I'd like to
see the repositories, wiki, website, etc. be more resilient and avoid having a
single point of failure.
The point of having a BDFL is to ensure total control over the direction,
trajectory, and development of the project. My primary aim is to follow the
things Dylan specified as closely as possible. The point of a BDFL is NOT to
disrupt the experience of users, but to ensure consistency and focus for the
project. When it comes to a Linux distribution, updates in large part means
security updates and bug fixes. I want to ensure users aren't exposed due to my
own failure or disappearance. Dylan was resistant to letting other people
maintain even just community; I have a different take.
* The responsibility of checking packages for correctness and merging PRs in the
main repositories falls to me, with one extra user having access to the main
repo and (a potentially different) user having access to community. My intention
here is not that they have just as much responsibility or authority over the
repository, but instead to (1) merge PRs and respond to issues should they stay
open for 'too long', and (2) to ensure that, should something happen to me, the
repositories carry on. Think of them not as assistants, but failsafes.
* The responsibility of releasing updated tarballs of KISS falls to me. Nobody
else should feel compelled to do this, unless I'm just *poof* gone.
* The responsibility of keeping up with the website and wiki falls to me, with
one other, different than the previous persons, also having access.
The point is not to have multiple people in charge. Changes to anything
regarding the package manager, inclusion in the repositories, adjustments to
documentation, etc.etc.etc. should all go through me.
The point is instead to ensure that, should I disappear or be deposed because
I'm a jerk, users aren't left exposed. I don't want this to be Void. I don't aim
to hold anyone's hand, but at the same time there is no good reason users of a
distribution should not be allowed to opt into having their updates funneled
through a singular channel. That is, after all, the point - if users don't want
that, they can choose otherwise.
I have no announcements of who these people will be, but the changes won't
effect much of how you would expect things to function if Dylan were still here.
I am of course willing to hear feedback on this stark shift from Dylan's
previous policy, and suggestions on any of this are welcome. You can always find
me in IRC #kisslinux (I always read the logs), you can talk to me at
$/dilyn-corner or on Reddit (u/dilyn), and email is always an option:
<EMAIL_ADDRESS>If you find my address, you can even mail me a
letter if you want.
In conclusion, thanks for your faith.
___
________________________________________________________________________________
Dylan Araps (C) 2019-2020
kiss-community (C) 2020-2021
Dilyn Corner (C) 2021
Linux(R) is the registered trademark of Linus Torvalds in the U.S. and
other countries.


step 1
Quisque libero libero, dictum non turpis in, luctus semper lorem.
And find the perfect partner to fullfill it
Based in Chicago. I love playing tennis and loud music.
I get my inspiration from nature and objects around me. I have a passion to colours, typography and skateboards.
I'm a happy person that loves cats and climbing on mountains.
Based in Chicago. I love playing tennis and loud music.
Hi! What are your holiday interests?
Search partners


Trade Ethereum ERC20 Tokens
Trade HOM Coin
Trade >
TESTNET TOKENS
Trade Homescoin Test 1
Trade >
Trade Homescoin Test 2
Trade >
Trade Lol Coin
Trade >


October 25th
October 25th
Lecture
Akash: link-state
- Global routing algorithm
- Requires a link-state boradcast to gather all infomration about a network
- advantage is that it is striaght forward, and easy to implement
- Dijsktra's algorithm: Used to find shortest path between nodes in a graph. Big O of N2
- Start at a node, check distance to neighbors.
- Choose node with shorest distance and check distance to it's neighbors
- Continue until all nodes (that are connected) are checked
- Any unconnected nodes (or nodes not yet checked who have not been reach by edges so far) are set to infinity
- Typically repeat for each node so they have a table of how to reach each node
- Map quest uses Dijsktra's algorithm to calculate route
Guest Speaker: HIPAA privacy
- From Bangladesh, works at Iowa, Ph.D. at University of Texas at San Antonio, post doc at Carnegie Melllon and Purdue.
- Cybersecurity and privacy with theoretical foundations
- Accountability though complicance checking--have a standard, system to check if standard is mainainted
- Privacy policy compliance--Focus of talk
- Often breaking a system is simply changing the point of view (ie. phone light behind quiz card)
- Personal information spread all over (ie. hospitals, school, etc.). How to control who they give it to? (ie. selling to black market)
- Medical records are more valuable than social security numbers or credit card numbers. Approx $15
- HIPAA is the compliace system for health records. If information is leaked then they file $4.3 million or more, and list you in a group of blacklisted people
-
- Use audits to determin if someone is in violation of comliance
- Cumbersome, timecomsuming, not scalable
- Solution: Computer records, computer/AI checker/auditor
- Difficulties in this
- HIPAA has complex structure: internal refrences, written in natural language, very long
- Grey information: subjective belief, purpose, attribute (ie. wording like "Reasonably believes"
- Scalability
- Prior work:
- Automated compliance checking: efficiency vs policy expresivness. Must balance to find a balance
- Precis: software that does compiance checking
- Policy language: usually phrased as "something happened" or "didn't happen". Explicit time constraints: must be done in a certian time. etc.
- challenges
- Quantification over possibly infinite domain
- Instantiate quantified variables with all domain elements
- Efficiency in checking past requirements
- Runtime verification:
- Quantification ver possibly infinte domain
- Efficiency in checking past requirements--build a cache
- Use summary structures--keep information small, easier to check
- Percis works well at solving a lot of these issues:
- Pre-procesing -- use temporal mode check to mark summarizable policy fragments
- compliance chekcing -- update summary structures, recurse over
- Currently fastest solution
- Outsourcing motivation
- Cheaper
- Discolsure logs are large
- Compliance computation is highly parallel
- Outsouce to the cloud, the audit log, the compliance checker
- Problem: logs can contain confidential information
- can encrypt data -- difficult to use
- Use homomorphic encryption -- prohibitive cost
- Client-side processing -- not desired
- SQL-aware encryption -- No clear end-to-end security. Invented by google
- Must know what information (if any) is leaked
- Homomorphic encryption: ...(should look it up, but basically allows you to preform stuff on the encypted data whie encrpted)
- Eunomia (greek goddess of good order and lawful conduct) -- System to code for equations on data
- Cryptdb: use certian encryption then you can run SQL on encrypted data, security proof is incomplete. System can be broken
- Smart contracts (online lotteries?)
- Certificate verification: way to say that you are a certian site, and be confirmed by clients. Found bugs in system, not perfect
- Smart bulbs, babymonitors, etc. Easy to hack into, use relativly unsecure communication (ie. radio)
- Passwords are vulnerable to sniffing mailware and key loggers
- "The Quest to Replace Passwords: A Framework for Comparative Evaluation of Web Authentication Schemes"
- Ways to replace passwords
- Passwindow
- You have a pass-top secret, combine it with the challenge that the bank sends you, get answer and send it to the bank
- Not as secure as though, adversary can impersonate a user only after observing transcripts of 1000 sessions, but they broke it in 3
- Turns out you don't need to have the whole key, just part of it
- For each segment note whether it is on, off, of idk (misses correlation, lot of information to use. Not used)
- For each position keep bit position that tells what patterns can happen (low over head, misses correlation. Chose to break system)
- Look at the challenge and the response. No digits besides answer can be encoded. Maximum one digit encoded per frame, digits are encoded in consecutive frames, remove all the keys that do not encode response digits or encode other digits
- Graduate Studies in CS at University of Iowa
- "Like a home enviroment", "Can walk up to anyone's office", "Very open", "If you get into Carnege Mellon, don't go to Iowa...otherwise though"
- MCS: Master of Computer Science--2 years (Application based)
- Course based program
- 10 CS graduate courses, 3-4 semesters
- Careers phD program
- Tase of cutting-edge research
- More attractice to large companies, huge salary jump
- Not a huge time commitment
- Decide if you want to do PhD
- PhD: Doctor of Philosophy--5 years (Research based)
- Research-based program, students do original research
- Minimal course work with flexibility meant to support early immersion into research
- Careers in academics, research,etc.
- Passionate about specific area withing comp sci and want to make new/original contribution
- Become a professor and communicate ideas in CS to students and continue original CS research
- If you want to do CS research for large companies, labs, etc.
- Often recieve Teaching Assistantships and full tuition
- Fellowships, renewable wtih 3.25 GPA
- Regional scholarship fellowship
- Research in CS @ Iowa
- Algorithms
- Computational logic
- Human computer interaction, virtual enviroments
- Informatics
- Networks and distributed systems
- Numerical methods, parallel computing, optimization
- Fun fact: bots that forge likes on products to influence people's purchasing
- November 4th open house for prospective graduate sutdent visit day site. Suggest talking to him, he has money laying around and needs students. Need to do RA/TA unless impressive.
- omar-chowdhury@uiowa.edu


8/3/2014
Dear FLVS Staffing,
I am seeking the opportunity to turn my passion into a career; to consolidate my education and work experience and apply it everyday in a professional setting. I am prepared to thrive in a technology-based system, harness the unique methodology, and overcome the associated challenges. I believe we are in the midst of an educational revolution and FLVS is at the forefront. I am truly honored to be considered.
I have had the opportunity to educate children of varying ages and abilities through my FLVS internship, AVID volunteer work, substitute teaching and pursuit of an Exceptional Student Education degree. The majority of my work has been for students with exceptional needs while maintaining a focus on reading.
Thank you for taking the time to consider my resume. This application represents the culmination of my academic and professional efforts. Education is one of the greatest propellers of success, and I am envigorated by the opportunity to serve students as their instructor.
Sincerely,
Siobhan MacElhiney
To secure a career at FLVS, instruct K-12 students through technology-based methods, develop my skills as a teacher, and further the field of alternative education.
Florida Virtual School · Aug '13 - Jan '14
English II Intern
Teach English II units. Manage the course via Educator and Virtual School Administrator. Provide instructional support for assignments. Grade course work. Further assist students with IEPs, and create alternative assignments. Represent the internship program during the investors round-table.
Ocoee Middle School · Aug '13 - Jan '14
Exceptional Student Education Intern
Provided instruction in all academic areas for students in grades 6-8 with IEPs in accordance with classroom curriculum. Helped students complete assignments. Pushed-in to support students in math, history, english, and science courses. Observed students to provide anecdotal reports.
Lake Whitney Elementary · Aug '13 - Jan '14
Varying Exceptionalities Intern
Assisted the varying exceptionalities teacher with instruction and instruction design. Lead instruction for K-5 students in the areas of mathematics, reading, and language arts. Push-in for fourth grade language arts.
Substitute Teacher
Perform all required duties of an Orange County Public School substitute teacher and follow classroom lesson plans.
University of Central Florida · Aug '10 - Dec '13
Bachelors of Science, Exceptional Student Education
The Florida Virtual School
Meagan Stocks
(813) 358-7969<EMAIL_ADDRESS>Lake Whitney Elementary
Patricia Sullivan
(407) 421-2012<EMAIL_ADDRESS>Ocoee Middle School
Regan Trampe
(407) 877-5035<EMAIL_ADDRESS>Creative School for Children
Catherine Bell
(407) 823-2726 catherine.bell@ucf.edu


Quickstart¶
All examples will be conducted on mockable.io, a publicly available mock api creator.
Declare a Client¶
Clients are declared by subclassing the SpanClient
class.
from spanclient import SpanClient
class HogwartsClient(SpanClient):
DEFAULT_HOST_NAME = "illuscio.mockable.io"
DEFAULT_PROTOCOL = "https"
DEFAULT_HOST_NAME
does not need to be set, but will require the user to pass a value
for 'hostname='
to the init of HogwartsClient
.
DEFAULT_PROTOCOL
will be 'http'
if none is set.
Add a Method¶
To add an endpoint method we decorate it with @handles.{method}
. Lets set up a
method for fetching text from an endpoint that returns the name of a hogwarts house for
us to be sorted into.
from spanclient import handles, ClientRequest
from typing import List, Dict, Any
REQ = SpanClient.REQ
class HogwartsClient(SpanClient):
DEFAULT_HOST_NAME = "illuscio.mockable.io"
DEFAULT_PROTOCOL = "https"
@handles.get("/sortinghat")
async def sort_house(self, req: ClientRequest=REQ) -> str:
pass
That’s all! The client is ready for use!
import asyncio
# this is out main async function
async def main():
# declare our client
client = HogwartsClient()
# enter a context with our client. Upon exiting, the connection pool used by
# aiohttp will be closed.
async with client:
# invoke our method
house = await client.sort_house()
# pretty-print the resulting loaded data.
print("HOUSE:", house)
loop = asyncio.get_event_loop()
loop.run_until_complete(main())
Output:
HOUSE: Ravenclaw
By default, the decoded response body is used as the return value of decorated method.
The full url invoked in this example is
'https://illuscio.mockable.io/sortinghat'
Note
{method}
can be anything, but there are a few stubbed-out methods like
.get()
for IDE code completion. The actual decorator that is invoked is always
handles.generic()
.
Note
All methods must include a req
keyword-only argument, which will be passed a
ClientReq
by the decorator. To make it clear that this value does not need
to be set by the end-user, a default value of SpanClient.REQ can be used. This value
is not actually passed in, but replaced by a fresh ClientRequest
object
each time the method is invoked.
Return Values¶
For most returns, no explicit handling of the response is required. All boilerplate is handled by the decorator, and the return value is pulled from the decoded message body.
# biolerplate declaration of the client is removed in this and all subsequent
# examples for clarity.
@handles.get("/wizards")
async def list_wizards(self, req: ClientRequest = REQ) -> List[Dict[str, Any]]:
pass
Run it:
# all boilerplate for setting up and running the client in-context is removed here.
# this code can be dropped into the first example above for testing.
wizards = await client.list_wizards()
print("WIZARDS:", json.dumps(wizards, indent=4), sep="\n")
Output:
WIZARDS:
[
{
"id": "eb340f70-524f-4459-a5ae-d7214f9780ca",
"name": "Harry Potter",
"house": "Gryffindor"
},
...
{
"id": "05b289cc-9164-4b2d-ac23-badefbc9a4cd",
"name": "Luna Lovegood",
"house": "Ravenclaw"
}
]
Check Response Code¶
By default, responses are checked for 200 status code. To alter the expected response code:
@handles.post("/house/gryffindor/point", resp_codes=201)
async def one_point_to_gryffindor(self, req: ClientRequest = REQ) -> str:
# adds 1 point to gryffindor
pass
Run it:
points = await client.one_point_to_gryffindor()
print("RESP:", resp)
Output:
RESP: 542
If there are multiple acceptable codes:
@handles.post("/house/gryffindor/point", resp_codes=(200, 201, 202))
async def one_point_to_gryffindor(self, req: ClientRequest = REQ) -> str:
# adds 1 point to gryffindor
pass
Handling Response / Return¶
Directly execute and handle a response:
@handles.post("/house/gryffindor/point", resp_codes=201)
async def one_point_to_gryffindor(self, req: ClientRequest = REQ) -> int:
# adds 1 point to gryffindor
result: ResponseData = await req.execute()
points = result.decoded
return int(points)
We call ClientRequest.execute()
to execute the request directly in the method.
This returns a ResponseData
object which we can use to determine a return.
In this case, we want to cast the points to an int
.
Important
When ClientRequest.execute()
is called inside a method, the return of the
method is used as the return value of the method, unlike previous examples where the
return value is pulled automatically from the response body.
Request Body¶
The request body can be set via the ClientRequest.media
attribute for unserialized
data or ClientRequest.content
for serialized bytes
data.
@handles.post("/wizards", resp_valid_codes=201,)
async def add_wizard(self, wizard: dict, req: ClientRequest = REQ) -> str:
# This endpoint assigns the house and wizard ID to a new student.
req.media = wizard
Now when we call it:
wizard = {"name": "Cedric Diggory"}
wizard = await client.add_wizard(wizard)
print("ADDED:", wizard)
Output:
ADDED:
{
"id": "30817cb1-4fd2-4f50-b258-4f225127f39c",
"name": "Cedric Diggory",
"house": "Hufflepuff"
}
Note
By default, list
and dict
objects are serialized as
'application/json'
, and str
objects are serialized as 'text/plain'
Content-Type Encoding¶
SpanClient
natively handles the following http body mimetypes:
JSON (application/json)
YAML (application/yaml)
BSON (application/bson)
TEXT (text/plain)
Each of the supported mimetypes is represented as a string Enum in MimeType
.
from spanserver import MimeType,
@handles.post("/wizards", mimetype_send=MimeType.YAML, resp_valid_codes=201,)
async def add_wizard(
self, wizard: dict, req: ClientRequest = REQ
) -> Dict[str, Any]:
# This endpoint assigns the house and wizard ID to a new student.
req.media = wizard
Now the request body will be encoded as yaml instead of json, and the 'Content-Type'
header will be set to 'application/yaml'
Content mime-type can also be set at the request level if it needs to be dynamically determined:
@handles.post("/wizards", resp_valid_codes=201,)
async def add_wizard(self, wizard: dict, req: ClientRequest = REQ) -> str:
# This endpoint assigns the house and wizard ID to a new student.
req.media = wizard
req.mimetype_send=MimeType.YAML
Request a Content-Type¶
Request a return mimetype from the server.
@handles.get("/wizards", mimetype_accept=MimeType.YAML)
async def add_wizard(self, req: ClientRequest = REQ) -> Dict[str, Any]:
pass
The 'Accept'
header will be set to 'application/yaml'
, and services based on
spanserver will return yaml-encoded data.
Content-Type Sniffing¶
When 'Content-Type'
is not specified in the response header, SpanClient
will attempt to decode the content with every available decoder, until one does not
throw an error.
When registering custom encoders, make sure that they throw errors when they should. For instance, json will decode raw strings to a str object, so the built-in json decoder throws an error when the resulting object is not a dictionary or list.
Request body mimetype is resolved in the following order:
Mimetype set to
ClientRequest.mimetype_send()
JSON for
dict
/list
media valuesTEXT for
str
media.No action for
bytes
media values.
Content-Type Handlers¶
Custom encoders and decoders can be registered with the api, and can replace the default ones. Let’s register a couple to handle text/csv content.
An encoder must take in a data object and turn it into bytes:
import csv
import io
from typing import List, Dict, Any
def csv_encode(data: List[Dict[str, Any]]) -> bytes:
encoded = io.StringIO()
headers = list(data[0].keys())
writer = csv.DictWriter(encoded, fieldnames=headers)
writer.writeheader()
writer.writerows(data)
return encoded.getvalue().encode()
Decoders must take in bytes and return python objects.
def csv_decode(data: bytes) -> List[Dict[str, Any]]:
csv_file = io.StringIO(data.decode())
reader = csv.DictReader(csv_file)
return [row for row in reader]
Now we can register them when declaring our client:
from spanclient import register_mimetype
class APIClient(SpanClient):
register_mimetype("text/csv", encoder=csv_encode, decoder=csv_decode)
@handles.post("/csv", mimetype_send="text/csv")
async def csv_roundtrip(
self, csv_data: List[Dict[str, Any]], *, req: ClientRequest
) -> List[Dict[str, Any]]:
req.media = csv_data
Path Parameters¶
Like spanserver, spanclient allows f-string-like syntax for declaring path
parameters. Path parameters can be set via the ClientRequest
.
@handles.get("/wizard/{wizard_id}")
async def fetch_wizard(
self, wizard_id: uuid.UUID, req: ClientRequest = REQ
) -> Dict[str, Any]:
req.path_params["wizard_id"] = wizard_id
Non-string params are cast via str()
when being inserted into the url. Lets try it
out:
# Load our wizard id into a UUID object
wizard_id = uuid.UUID("05b289cc-9164-4b2d-ac23-badefbc9a4cd")
wizard = await client.fetch_wizard(wizard_id)
# pretty-print the resulting loaded data.
print("WIZARD:", json.dumps(wizard, indent=4))
Output
WIZARD:
{
"id": "05b289cc-9164-4b2d-ac23-badefbc9a4cd",
"name": "Luna Lovegood",
"house": "Ravenclaw"
}
The full url invoked in this example is
'https://illuscio.mockable.io/wizard/05b289cc-9164-4b2d-ac23-badefbc9a4cd'
Query Parameters¶
Query parameters are handled identically to path parameters.
@handles.get("/wizards")
async def list_house(
self, house: str, req: ClientRequest = REQ
) -> List[Dict[str, Any]]:
req.query_params["house"] = house
We invoke it:
wizards = await client.list_house("Gryffindor")
print("HOUSE GRYFFINDOR:", json.dumps(wizards, indent=4), sep="\n")
Output:
HOUSE GRYFFINDOR:
[
{
"id": "eb340f70-524f-4459-a5ae-d7214f9780ca",
"name": "Harry Potter",
"house": "Gryffindor"
},
{
"id": "0a810fcb-75cd-4d40-be7e-0a3208ec05fd",
"name": "Hermione Granger",
"house": "Gryffindor"
},
{
"id": "230173db-dfaa-4296-a8e6-510aabe34ecb",
"name": "Ron Weasley",
"house": "Gryffindor"
}
]
The full url invoked in this example is
'http://illuscio.mockable.io/wizards%3Fhouse=Gryffindor'
You can also set query params on the method decorator. These will be added every time the method is invoked:
@handles.get("/wizards", query_params={"house": "Gryffindor"})
async def list_gryffindor(self, req: ClientRequest = REQ) -> str:
pass
Which would be called for the same result:
wizards = await client.list_gryffindor()
Projection URL Params¶
Natively handle `SpanServer's projection convention`_ for slimming down response payloads.
@handles.get("/wizards")
async def list_wizards(
self, req: ClientRequest = REQ
) -> List[Dict[str, Any]]:
req.projection["house"] = 0
When invoked, the 'house'
field will be suppressed:
wizards = await client.list_wizards()
# pretty-print the resulting loaded data.
print("WIZARDS:", json.dumps(wizards, indent=4), sep="\n")
Output:
WIZARDS:
[
{
"id": "eb340f70-524f-4459-a5ae-d7214f9780ca",
"name": "Harry Potter"
},
{
"id": "0a810fcb-75cd-4d40-be7e-0a3208ec05fd",
"name": "Hermione Granger"
},
{
"id": "230173db-dfaa-4296-a8e6-510aabe34ecb",
"name": "Ron Weasley"
},
{
"id": "245dca2d-1c72-495e-99a8-08c2808325b8",
"name": "Draco Malfoy"
},
{
"id": "30817cb1-4fd2-4f50-b258-4f225127f39c",
"name": "Cedric Diggory"
},
{
"id": "05b289cc-9164-4b2d-ac23-badefbc9a4cd",
"name": "Luna Lovegood"
}
]
Use the same method to allow users to define their own projection:
@handles.get("/wizards")
async def list_wizards(
self,
projection: Optional[Dict[str, int]] = None,
req: ClientRequest = REQ
) -> List[Dict[str, Any]]:
if projection is not None:
req.projection = projection
Invoke it:
projection = {"name": 1}
wizards = await client.list_wizards(projection)
print("WIZARDS:", json.dumps(wizards, indent=4), sep="\n")
Output:
WIZARDS:
[
{
"name": "Harry Potter"
},
{
"name": "Hermione Granger"
},
{
"name": "Ron Weasley"
},
{
"name": "Draco Malfoy"
},
{
"name": "Cedric Diggory"
},
{
"name": "Luna Lovegood"
}
]
Request Headers¶
Headers are handled identically to path and query params. Either:
@handles.get("/wizards")
async def fetch_wizards(self, some_value: str, req: ClientRequest = REQ) -> str:
req.headers["some-header"] = some_value
Or:
@handles.get("/wizards", headers={"some-header": "some-value"})
async def fetch_wizards(self, req: ClientRequest = REQ) -> str:
pass
Request Body Schema¶
Let’s make a marshmallow schema for our wizard info:
class WizardSchema(marshmallow.Schema):
id = marshmallow.fields.UUID()
name = marshmallow.fields.Str()
house = marshmallow.fields.Str()
@marshmallow.validates("house")
def is_valid_house(self, value: str, **kwargs: Any):
houses = ["Gryffindor", "Slytherin", "Hufflepuff", "Ravenclaw"]
if value not in houses:
raise marshmallow.ValidationError(
f"{value} is not a hogwarts house"
)
We can use this schema to serialize our request body:
@handles.post(
"/wizards", req_schema=WizardSchema(only=["name"]), resp_valid_codes=201
)
async def add_wizard(self, wizard: dict, req: ClientRequest = REQ) -> str:
# This endpoint assigns the house and wizard ID. We
req.media = wizard
When we invoke it:
wizard = {"name": "Cedric Diggory"}
wizard = await client.add_wizard(wizard)
print("ADDED:", json.dumps(wizard, indent=4), sep="\n")
Output
ADDED:
{
"id": "30817cb1-4fd2-4f50-b258-4f225127f39c",
"name": "Cedric Diggory",
"house": "Hufflepuff"
}
Response Body Schema¶
In the last example, the uuid came back as a string. We can register a response body schema to load it when the response is returned.
@handles.post(
"/wizards",
req_schema=WizardSchema(only=["name"]),
resp_valid_codes=201,
resp_schema=WizardSchema()
)
async def add_wizard(self, wizard: dict, req: ClientRequest = REQ) -> str:
# This endpoint assigns the house and wizard ID to a new student.
req.media = wizard
Now when we call it:
wizard = {"name": "Cedric Diggory"}
wizard = await client.add_wizard(wizard)
print("ADDED:", wizard)
Output:
ADDED: {... 'id': UUID('30817cb1-4fd2-4f50-b258-4f225127f39c')...}
The uuid object has been deserialized.
Note
For those who wish to deserialize from and serialize to dataclasses, there is a sister project, Grahamcracker, specifically written for use with the `spanreed`_ family.
Update Data In-Place¶
In the above example, the method returns a NEW data object when the wizard is posted, but we can update objects IN-PLACE if we want:
@handles.post(
"/wizards",
req_schema=WizardSchema(only=["name"]),
resp_valid_codes=201,
resp_schema=WizardSchema()
)
async def add_wizard(self, wizard: dict, req: ClientRequest = REQ) -> str:
# This endpoint assigns the house and wizard ID. We
req.media = wizard
req.update_obj = wizard
Run it:
wizard = {"name": "Cedric Diggory"}
# wizard is updated in-place
await client.add_wizard(wizard)
print("ADDED:", wizard)
Output:
ADDED: {'name': 'Cedric Diggory', 'id': ..., 'house': 'Hufflepuff'}
Note
SpanClient uses a library called Gemma to automatically update objects in-place. However, there are a few limitations to it’s capabilities:
The Structure of the existing and incoming objects must be the same: for instance key1.nested1 must exist on both objects.
It does not matter if the “addresses” are attributes or keys, both are discoverable, so a dataclass can be updated by a dict, as long as their field names are identical.
Nested objects like dicts or dataclasses are updated in-place.
Nested sequences are wholly replaced. If your data has a list of sub-data, the list is not updated in-place, it is replaced with a new list.
Assign a custom updater if something more complicated is needed:
def update_wizard(current: dict, new: dict) -> None:
current["id"] = new["id"]
current["house"] = new["house"]
@handles.post(
"/wizards",
req_schema=WizardSchema(only=["name"]),
resp_valid_codes=201,
resp_schema=WizardSchema(),
data_updater=update_wizard
)
async def add_wizard(self, wizard: dict, req: ClientRequest = REQ) -> str:
# This endpoint assigns the house and wizard ID. We
req.media = wizard
req.update_obj = wizard
Response Errors¶
When we get a response code we were not expecting, a generic
StatusMismatchError
is returned.
Spanclient is designed to work seamlessly with spanserver and understands it’ error conventions. Errors returned in response headers that conform to the `spanreed`_ spec will be raised as native errors.
@handles.get("/wizards/slytherin/good")
async def good_slytherins(self, req: ClientRequest = REQ) -> List[Dict[str, Any]]:
pass
Run it:
wizards = await client.good_slytherins()
Output:
Traceback (most recent call last):
...
spantools.errors_api._classes.NothingToReturnError: There are no good Slytherins.
Register custom errors while declaring your client by subclassing
errors_api.APIError
, and assigning expected HTTP and api error codes.
class BrokenWandError(errors_api.APIError):
http_code: int = 404
api_code: int = 2001
class HogwartsClient(SpanClient):
DEFAULT_HOST_NAME = "illuscio.mockable.io"
DEFAULT_PROTOCOL = "https"
API_ERRORS_ADDITIONAL = [BrokenWandError]
@handles.post("/spell")
async def cast_spell(self, req: ClientRequest = REQ) -> List[Dict[str, Any]]:
pass
Note
If you are writing both a client and backend together, have a single python package with errors and schemas for the API that is used by both the server and client.
In the case of spanclient and spanserver, both use the same error classes from a shared package called spantools.
This strategy ensures that when tweaks occur to an error’s definition, it only has to be updated in one place (at least for the python libraries).
Paged Endpoints¶
Like with errors, SpanClient
offers an easy way to deal with paged endpoints
using spanserver’s paging convention
@handles.paged(limit=2)
@handles.get("/wizards")
async def list_wizards(self, req: ClientRequest = REQ) -> List[Dict[str, Any]]:
pass
limit=2
sets the 'paging-limit'
query parameter to '2'
, so the server will
return our data two us in batches of two wizards per request.
Run it:
async for wizard in client.list_wizards():
print("WIZARD:", wizard)
Output:
WIZARD: {'id': ..., 'name': 'Harry Potter', 'house': 'Gryffindor'}
WIZARD: {'id': ..., 'name': 'Hermione Granger', 'house': 'Gryffindor'}
WIZARD: {'id': ..., 'name': 'Ron Weasley', 'house': 'Gryffindor'}
WIZARD: {'id': ..., 'name': 'Draco Malfoy', 'house': 'Slytherin'}
WIZARD: {'id': ..., 'name': 'Cedric Diggory', 'house': 'Hufflepuff'}
WIZARD: {'id': ..., 'name': 'Luna Lovegood', 'house': 'Ravenclaw'}
Our method has been turned into an async iterable! The paging happens seamlessly in the background, so even though our wizards are being fetched in groups of two, we get all six when iterating through them:
Paging limit and starting offset can also be set on the request object:
@handles.paged()
@handles.get("/wizards")
async def list_wizards(
self, skip: int, batch_size: int, *, req: ClientRequest = REQ
) -> List[Dict[str, Any]]:
req.paging.offset_start = skip
req.paging.limit = batch_size


Installation on your own computer¶
We now proceed to discuss installation of the necessary software on your own machine.
Uninstalling Anaconda¶
Unless you have experience with Anaconda and know how to set up environments, if you have previously installed Anaconda with a version of Python other than 3.8, you need to uninstall it, removing it completely from your computer. You can find instructions on how to do that from the official uninstallation documentation.
Downloading and installing Anaconda¶
Downloading and installing Anaconda is simple.
Go to the Anaconda distribution homepage and download the graphical installer. Be sure to download Anaconda for Python 3.8 (or higher) for the appropriate operating system. Follow the on-screen instructions for installation. You may be prompted for optional installations, like PyCharm. You will not need these for the course.
That’s it! After you do that, you will have a functioning Python distribution.
Launching Jupyter notebook¶
After installing the Anaconda distribution, you should be able to launch the Anaconda Navigator. If you are using macOS, this is available in your Applications menu. If you are using Windows, you can do this from the Start menu. Launch Anaconda Navigator
We will be using jupyter notebooks throughout the course. You should see an option to launch Jupyter Notebook. When you do that, a new browser window or tab will open with Jupyter notebook running. For the updating and installation of necessary packages, there will be code cells within the notebooks to do that.


Delaunay triangulation of standard triangular grid.
tri = sphtri(Symmetry,n)
Computes the Delaunay triangulation of the orientational grid
constructed by the function sphgrid(Symmetry,n)
.
The argument Symmetry
specifies on of the centrosymmetric point groups,
see sphgrid for
details. n
is the number of orientations (knots) over a quarter
of a meridian.
tri
is a Nx3 array containing the indices for the triangles along
the rows. If a row is [4 8 3], this means that that triangle is formed
by orientations 4, 8 and 3 as returned by sphgrid.
The output of this function can be used to plot orientationally
dependent data generated with resfields,
endorfrq
or any other function. The orientations should be generated by
sphgrid,
the plotting can be done using trisurf
or trimesh
.
It is very easy to compute the orientation dependence of the effective
g value for a g tensor of [1.9 2 2.1]
and display the result.
First we compute orientations and g values.
x = sphgrid('D2h',30); g2 = [1.9*x(1,:); 2*x(2,:); 2.1*x(3,:)].^2; g = sqrt(sum(g2));
Next we compute the triangulation and use MATLAB's trisurf
function to plot the g values.
tri = sphtri('D2h',30); trisurf(tri,x(1,:),x(2,:),x(3,:),g); view(135,39); colorbar
This functions does not rely on MATLAB's general triangulation
functions like delaunay
, but computes the triangle
indices in a way tailored to the special grids constructed by
sphgrid.


wine command- Run a specific program in background:
wine start command- Install/uninstall an MSI package:
wine msiexec /i|x path/to/package.msi- Run `File Explorer`, `Notepad`, or `WordPad`:
wine explorer|notepad|write- Run `Registry Editor`, `Control Panel`, or `Task Manager`:
wine regedit|control|taskmgr- Run the configuration tool:
wine winecfg


{% set page.title = "Verily Challenge" %} {% extends '../layout.html' %} {% block navigation %} {% endblock %} {% block main %}
We live in the Information Age... or the Disinformation Age. Finding out the truth in the vast amounts of contradictory information is becoming increasingly difficult for each of us.
Can a coordinated collective effort be effective in quickly discerning true answers to key questions?


The table D3-Births houses data on the following columns:
| Columns | Description |
|---|---|
| Non-Hispanic White Births | Births to mothers identified as not Hispanic and White. |
| Non-Hispanic Black Births | Births to mothers identified as not Hispanic and Black. |
| Non-Hispanic Other Race Births | Births to mothers identified as not Hispanic, Black, or White. |
| Hispanic Births | Births to mothers identified as Hispanic. |
| Births with Inadequate Prenatal Care | Inadequate prenatal care was defined as births rated “inadequate” or “intermediate” on the Kessner Index.† |
| Low Birth Weight Births | Infants weighing under 2,500 grams were considered a low weight birth. |
| Births to Teen Mothers | Births to mothers under 20 years old. |
The Kessner Index is a classification of prenatal care based on the month of pregnancy in which prenatal care began, the number of prenatal visits and the length of pregnancy (i.e. for shorter pregnancies, fewer prenatal visits constitute adequate care.)
Adequate: Care that began within the first trimester and included an average of at least one or two additional prenatal visits per month of gestation, depending on the length of gestation.
Intermediate: Care that began during the second trimester of pregnancy with correspondingly fewer visits, or began during the first trimester but with fewer visits than would be appropriate for the length of gestation.
Inadequate: When no care was received or if care began during the third trimester. It is also inadequate if care began during the first or second trimester but less than five visits occurred, when the length of gestation was 34 weeks or more. When the length of gestation was less than 34 weeks, care is defined as inadequate when care began during the first or second trimester but a number of visits less that four occurred, that number depending on the actual weeks of gestation.


ultra.utils package¶
Submodules¶
ultra.utils.data_utils module¶
-
class
ultra.utils.data_utils.
Raw_data
(data_path=None, file_prefix=None, rank_cut=None)¶ Bases:
object
-
__init__
(data_path=None, file_prefix=None, rank_cut=None)¶ Initialize a dataset
- Parameters
data_path – (string) the root directory of the experimental dataset.
file_prefix – (string) the prefix of the data to process, e.g. ‘train’, ‘valid’, or ‘test’.
rank_cut – (int) the maximum number of top documents considered in each list.
- Returns
None
-
load_basic_data_information
(data_path=None, file_prefix=None, rank_cut=None)¶ - Load basic dataset information from data_path including:
feature_size: the number of features for each query-document pair. removed_feature_ids: the idxs of the features to ignore.
- Parameters
data_path – (string) the root directory of the experimental dataset.
- Returns
None
-
load_data_in_ULTRA_format
(data_path=None, file_prefix=None, rank_cut=None)¶ - Read dataset in ULTRA format including:
rank_list_size: the maximum number of documents for a query in the data. features: the feature vectors of each query-document pair. dids: the doc ids for each query-document pair. initial_list: the initial ranking list for each query qids: the query ids for each query. labels: the relevance label for each query-document pair in the initial_list. initial_scores: (if exists) the initial ranking scores in the initial list for each query-document pair. initial_list_lengths: the length of the initial list for each query.
- Parameters
data_path – (string) the root directory of the experimental dataset.
file_prefix – (string) the prefix of the data to process, e.g. ‘train’, ‘valid’, or ‘test’.
rank_cut – (int) the maximum number of top documents considered in each list.
- Returns
None
-
load_data_in_libsvm_format
(data_path=None, file_prefix=None, rank_cut=None)¶ - Read dataset in libsvm format including:
rank_list_size: the maximum number of documents for a query in the data. features: the feature vectors of each query-document pair. dids: the doc ids for each query-document pair (created by this program). initial_list: the initial ranking list for each query (created according to data sequence in the libsvm file) qids: the query ids for each query (created by this program). labels: the relevance label for each query-document pair in the initial_list. initial_list_lengths: the number of candidate documents for each query.
- Parameters
data_path – (string) the root directory of the experimental dataset.
file_prefix – (string) the prefix of the data to process, e.g. ‘train’, ‘valid’, or ‘test’.
rank_cut – (int) the maximum number of top documents considered in each list.
- Returns
None
-
pad
(rank_list_size, pad_tails=True)¶ Pad a rank list with zero feature vectors when it is shorter than the required rank list size.
- Parameters
rank_list_size – (int) the required size of a ranked list
pad_tails – (bool) Add padding vectors to the tails of each list (True) or the heads of each list (False)
- Returns
None
-
remove_invalid_data
()¶ Remove query lists with no relevant items or less than 2 items
self.feature_size = -1 self.rank_list_size = -1 self.removed_feature_ids = [] self.features = [] self.dids = [] self.initial_list = [] self.qids = [] self.labels = [] self.initial_scores = [] self.initial_list_lengths = []
- Returns
None
-
-
ultra.utils.data_utils.
generate_ranklist
(data, rerank_lists)¶ Create a reranked lists based on the data and rerank documents ids.
- Parameters
data – (Raw_data) the dataset that contains the raw data
rerank_lists – (list<list<int>>) a list of rerank list in which each element represents the original rank of the documents in the initial list.
- Returns
(map<list<int>>) a map of qid with the reranked document id list.
- Return type
qid_list_map
-
ultra.utils.data_utils.
generate_ranklist_by_scores
(data, rerank_scores)¶ Create a reranked lists based on the data and rerank scores.
- Parameters
data – (Raw_data) the dataset that contains the raw data
rerank_scores – (list<list<float>>) a list of rerank list in which each element represents the reranking scores for the documents on that position in the initial list.
- Returns
(map<list<int>>) a map of qid with the reranked document id list.
- Return type
qid_list_map
-
ultra.utils.data_utils.
merge_TFSummary
(summary_list, weights)¶
-
ultra.utils.data_utils.
output_ranklist
(data, rerank_scores, output_path, file_name='test')¶ Create a trec format rank list by reranking the initial list with reranking scores.
- Parameters
data – (Raw_data) the dataset that contains the raw data
rerank_scores – (list<list<float>>) a list of rerank list in which each element represents the reranking scores for the documents on that position in the initial list.
output_path – (string) the path for the output
file_name – (string) the name of the output set, e.g., ‘train’, ‘valid’, ‘text’.
- Returns
None
-
ultra.utils.data_utils.
parse_TFSummary_from_bytes
(summary_bytes)¶
-
ultra.utils.data_utils.
read_data
(data_path, file_prefix, rank_cut=None)¶
ultra.utils.hparams module¶
Hyperparameter values.
-
class
ultra.utils.hparams.
HParams
(hparam_def=None, model_structure=None, **kwargs)¶ Bases:
object
Class to hold a set of hyperparameters as name-value pairs. A HParams object holds hyperparameters used to build and train a model, such as the number of hidden units in a neural net layer or the learning rate to use when training. You first create a HParams object by specifying the names and values of the hyperparameters. To make them easily accessible the parameter names are added as direct attributes of the class. A typical usage is as follows:
`python # Create a HParams object specifying names and values of the model # hyperparameters: hparams = HParams(learning_rate=0.1, num_hidden_units=100) # The hyperparameter are available as attributes of the HParams object: hparams.learning_rate ==> 0.1 hparams.num_hidden_units ==> 100 `
Hyperparameters have type, which is inferred from the type of their value passed at construction type. The currently supported types are: integer, float, string, and list of integer, float, or string. You can override hyperparameter values by calling the [parse()](#HParams.parse) method, passing a string of comma separated name=value pairs. This is intended to make it possible to override any hyperparameter values from a single command-line flag to which the user passes ‘hyper-param=value’ pairs. It avoids having to define one flag for each hyperparameter. The syntax expected for each value depends on the type of the parameter. See parse() for a description of the syntax. Example: ```python # Define a command line flag to pass name=value pairs. # For example using argparse: import argparse parser = argparse.ArgumentParser(description=’Train my model.’) parser.add_argument(‘–hparams’, type=str,help=’Comma separated list of “name=value” pairs.’)
args = parser.parse_args() … def my_program():
# Create a HParams object specifying the names and values of the # model hyperparameters: hparams = tf.HParams(learning_rate=0.1, num_hidden_units=100,
activations=[‘relu’, ‘tanh’])
# Override hyperparameters values by parsing the command line hparams.parse(args.hparams) # If the user passed –hparams=learning_rate=0.3 on the command line # then ‘hparams’ has the following attributes: hparams.learning_rate ==> 0.3 hparams.num_hidden_units ==> 100 hparams.activations ==> [‘relu’, ‘tanh’] # If the hyperparameters are in json format use parse_json: hparams.parse_json(‘{“learning_rate”: 0.3, “activations”: “relu”}’)
-
__init__
(hparam_def=None, model_structure=None, **kwargs)¶ Create an instance of HParams from keyword arguments. The keyword arguments specify name-values pairs for the hyperparameters. The parameter types are inferred from the type of the values passed. The parameter names are added as attributes of HParams object, so they can be accessed directly with the dot notation hparams._name_. Example: ```python # Define 3 hyperparameters: ‘learning_rate’ is a float parameter, # ‘num_hidden_units’ an integer parameter, and ‘activation’ a string # parameter. hparams = tf.HParams(
learning_rate=0.1, num_hidden_units=100, activation=’relu’)
hparams.activation ==> ‘relu’ ``` Note that a few names are reserved and cannot be used as hyperparameter names. If you use one of the reserved name the constructor raises a ValueError. :param hparam_def: Serialized hyperparameters, encoded as a hparam_pb2.HParamDef
protocol buffer. If provided, this object is initialized by deserializing hparam_def. Otherwise **kwargs is used.
- Parameters
model_structure – An instance of ModelStructure, defining the feature crosses to be used in the Trial.
**kwargs – Key-value pairs where the key is the hyperparameter name and the value is the value for the parameter.
- Raises
ValueError – If both hparam_def and initialization values are provided, or if one of the arguments is invalid.
-
add_hparam
(name, value)¶ Adds {name, value} pair to hyperparameters. :param name: Name of the hyperparameter. :param value: Value of the hyperparameter. Can be one of the following types:
int, float, string, int list, float list, or string list.
- Raises
ValueError – if one of the arguments is invalid.
-
static
from_proto
(hparam_def, import_scope=None)¶
-
get
(key, default=None)¶ Returns the value of key if it exists, else default.
-
get_model_structure
()¶
-
override_from_dict
(values_dict)¶ Override hyperparameter values, parsing new values from a dictionary. :param values_dict: Dictionary of name:value pairs.
- Returns
The HParams instance.
- Raises
ValueError – If values_dict cannot be parsed.
-
parse
(values, ignore_unknown_hyperparameters=True)¶ Override hyperparameter values, parsing new values from a string. See parse_values for more detail on the allowed format for values. :param values: String. Comma separated list of name=value pairs where
‘value’ must follow the syntax described above.
- Parameters
ignore_unknown_hyperparameters – Bool. Set false to raise ValueError if the hyper-parameter is unknown.
- Returns
The HParams instance.
- Raises
ValueError – If values cannot be parsed.
-
parse_json
(values_json)¶ Override hyperparameter values, parsing new values from a json object. :param values_json: String containing a json object of name:value pairs.
- Returns
The HParams instance.
- Raises
ValueError – If values_json cannot be parsed.
-
set_from_map
(values_map)¶ DEPRECATED. Use override_from_dict.
-
set_hparam
(name, value)¶ Set the value of an existing hyperparameter. This function verifies that the type of the value matches the type of the existing hyperparameter. :param name: Name of the hyperparameter. :param value: New value of the hyperparameter.
- Raises
ValueError – If there is a type mismatch.
-
set_model_structure
(model_structure)¶
-
to_json
(indent=None, separators=None, sort_keys=False)¶ Serializes the hyperparameters into JSON. :param indent: If a non-negative integer, JSON array elements and object members
will be pretty-printed with that indent level. An indent level of 0, or negative, will only insert newlines. None (the default) selects the most compact representation.
- Parameters
separators – Optional (item_separator, key_separator) tuple. Default is (‘, ‘, ‘: ‘).
sort_keys – If True, the output dictionaries will be sorted by key.
- Returns
A JSON string.
-
values
()¶ Return the hyperparameter values as a Python dictionary. :returns: A dictionary with hyperparameter names as keys. The values are the
hyperparameter values.
-
-
ultra.utils.hparams.
parse_values
(values, type_map, ignore_unknown_hyperparameters)¶ Parses hyperparameter values from a string into a python map. values is a string containing comma-separated name=value pairs. For each pair, the value of the hyperparameter named name is set to value. If a hyperparameter name appears multiple times in values, a ValueError is raised (e.g. ‘a=1,a=2’, ‘a[1]=1,a[1]=2’). If a hyperparameter name in both an index assignment and scalar assignment, a ValueError is raised. (e.g. ‘a=[1,2,3],a[0] = 1’). The value in name=value must follows the syntax according to the type of the parameter: * Scalar integer: A Python-parsable integer point value. E.g.: 1,
100, -12.
Scalar float: A Python-parsable floating point value. E.g.: 1.0, -.54e89.
Boolean: Either true or false.
Scalar string: A non-empty sequence of characters, excluding comma, spaces, and square brackets. E.g.: foo, bar_1.
List: A comma separated list of scalar values of the parameter type enclosed in square brackets. E.g.: [1,2,3], [1.0,1e-12], [high,low].
When index assignment is used, the corresponding type_map key should be the list name. E.g. for “arr[1]=0” the type_map must have the key “arr” (not “arr[1]”). :param values: String. Comma separated list of name=value pairs where
‘value’ must follow the syntax described above.
- Parameters
type_map – A dictionary mapping hyperparameter names to types. Note every parameter name in values must be a key in type_map. The values must conform to the types indicated, where a value V is said to conform to a type T if either V has type T, or V is a list of elements of type T. Hence, for a multidimensional parameter ‘x’ taking float values, ‘x=[0.1,0.2]’ will parse successfully if type_map[‘x’] = float.
ignore_unknown_hyperparameters – Bool. Set false to raise ValueError if the hyper-parameter is unknown.
- Returns
A scalar value.
A list of scalar values.
A dictionary mapping index numbers to scalar values.
(e.g. “x=5,L=[1,2],arr[1]=3” results in {‘x’:5,’L’:[1,2],’arr’:{1:3}}”)
- Return type
A python map mapping each name to either
- Raises
ValueError – If there is a problem with input.
* If values cannot be parsed. –
* If a list is assigned to a list index (e.g. 'a[1] = [1,2,3]') –
* If the same rvalue is assigned two different values (e.g. 'a=1,a=2', – ‘a[1]=1,a[1]=2’, or ‘a=1,a=[1]’)
ultra.utils.metrics module¶
Defines ranking metrics as TF ops.
The metrics here are meant to be used during the TF training. That is, a batch of instances in the Tensor format are evaluated by ops. It works with listwise Tensors only.
-
class
ultra.utils.metrics.
RankingMetricKey
¶ Bases:
object
Ranking metric key strings.
-
ARP
= 'arp'¶
-
DCG
= 'dcg'¶
-
ERR
= 'err'¶
-
MAP
= 'map'¶
-
MAX_LABEL
= None¶
-
MRR
= 'mrr'¶
-
NDCG
= 'ndcg'¶
-
ORDERED_PAIR_ACCURACY
= 'ordered_pair_accuracy'¶
-
PRECISION
= 'precision'¶
-
-
ultra.utils.metrics.
average_relevance_position
(labels, predictions, weights=None, name=None)¶ Computes average relevance position (ARP).
This can also be named as average_relevance_rank, but this can be confusing with mean_reciprocal_rank in acronyms. This name is more distinguishing and has been used historically for binary relevance as average_click_position.
- Parameters
labels – A Tensor of the same shape as predictions.
predictions – A Tensor with shape [batch_size, list_size]. Each value is the ranking score of the corresponding example.
weights – A Tensor of the same shape of predictions or [batch_size, 1]. The former case is per-example and the latter case is per-list.
name – A string used as the name for this metric.
- Returns
A metric for the weighted average relevance position.
-
ultra.utils.metrics.
discounted_cumulative_gain
(labels, predictions, weights=None, topn=None, name=None)¶ Computes discounted cumulative gain (DCG).
- Parameters
labels – A Tensor of the same shape as predictions.
predictions – A Tensor with shape [batch_size, list_size]. Each value is the ranking score of the corresponding example.
weights – A Tensor of the same shape of predictions or [batch_size, 1]. The former case is per-example and the latter case is per-list.
topn – A cutoff for how many examples to consider for this metric.
name – A string used as the name for this metric.
- Returns
A metric for the weighted discounted cumulative gain of the batch.
-
ultra.utils.metrics.
expected_reciprocal_rank
(labels, predictions, weights=None, topn=None, name=None)¶ Computes expected reciprocal rank (ERR).
- Parameters
labels – A Tensor of the same shape as predictions. A value >= 1 means a relevant example.
predictions – A Tensor with shape [batch_size, list_size]. Each value is the ranking score of the corresponding example.
weights – A Tensor of the same shape of predictions or [batch_size, 1]. The former case is per-example and the latter case is per-list.
topn – A cutoff for how many examples to consider for this metric.
name – A string used as the name for this metric.
- Returns
A metric for the weighted expected reciprocal rank of the batch.
-
ultra.utils.metrics.
make_ranking_metric_fn
(metric_key, topn=None, name=None)¶ Factory method to create a ranking metric function.
- Parameters
metric_key – A key in RankingMetricKey.
topn – An integer specifying the cutoff of how many items are considered in the metric.
name – A string used as the name for this metric.
- Returns
labels: A Tensor of the same shape as predictions representing
- graded
relevance.
predictions: A Tensor with shape [batch_size, list_size]. Each value
- is
the ranking score of the corresponding example.
weights: A Tensor of weights (read more from each metric function).
- Return type
A metric fn with the following Args
-
ultra.utils.metrics.
mean_average_precision
(labels, predictions, weights=None, topn=None, name=None)¶ Computes mean average precision (MAP). The implementation of MAP is based on Equation (1.7) in the following: Liu, T-Y “Learning to Rank for Information Retrieval” found at https://www.nowpublishers.com/article/DownloadSummary/INR-016
- Parameters
labels – A Tensor of the same shape as predictions. A value >= 1 means a relevant example.
predictions – A Tensor with shape [batch_size, list_size]. Each value is the ranking score of the corresponding example.
weights – A Tensor of the same shape of predictions or [batch_size, 1]. The former case is per-example and the latter case is per-list.
topn – A cutoff for how many examples to consider for this metric.
name – A string used as the name for this metric.
- Returns
A metric for the mean average precision.
-
ultra.utils.metrics.
mean_reciprocal_rank
(labels, predictions, weights=None, name=None)¶ Computes mean reciprocal rank (MRR).
- Parameters
labels – A Tensor of the same shape as predictions. A value >= 1 means a relevant example.
predictions – A Tensor with shape [batch_size, list_size]. Each value is the ranking score of the corresponding example.
weights – A Tensor of the same shape of predictions or [batch_size, 1]. The former case is per-example and the latter case is per-list.
name – A string used as the name for this metric.
- Returns
A metric for the weighted mean reciprocal rank of the batch.
-
ultra.utils.metrics.
normalized_discounted_cumulative_gain
(labels, predictions, weights=None, topn=None, name=None)¶ Computes normalized discounted cumulative gain (NDCG).
- Parameters
labels – A Tensor of the same shape as predictions.
predictions – A Tensor with shape [batch_size, list_size]. Each value is the ranking score of the corresponding example.
weights – A Tensor of the same shape of predictions or [batch_size, 1]. The former case is per-example and the latter case is per-list.
topn – A cutoff for how many examples to consider for this metric.
name – A string used as the name for this metric.
- Returns
A metric for the weighted normalized discounted cumulative gain of the batch.
-
ultra.utils.metrics.
ordered_pair_accuracy
(labels, predictions, weights=None, name=None)¶ Computes the percentage of correctedly ordered pair.
For any pair of examples, we compare their orders determined by labels and predictions. They are correctly ordered if the two orders are compatible. That is, labels l_i > l_j and predictions s_i > s_j and the weight for this pair is the weight from the l_i.
- Parameters
labels – A Tensor of the same shape as predictions.
predictions – A Tensor with shape [batch_size, list_size]. Each value is the ranking score of the corresponding example.
weights – A Tensor of the same shape of predictions or [batch_size, 1]. The former case is per-example and the latter case is per-list.
name – A string used as the name for this metric.
- Returns
A metric for the accuracy or ordered pairs.
-
ultra.utils.metrics.
precision
(labels, predictions, weights=None, topn=None, name=None)¶ Computes precision as weighted average of relevant examples.
- Parameters
labels – A Tensor of the same shape as predictions. A value >= 1 means a relevant example.
predictions – A Tensor with shape [batch_size, list_size]. Each value is the ranking score of the corresponding example.
weights – A Tensor of the same shape of predictions or [batch_size, 1]. The former case is per-example and the latter case is per-list.
topn – A cutoff for how many examples to consider for this metric.
name – A string used as the name for this metric.
- Returns
A metric for the weighted precision of the batch.
ultra.utils.propensity_estimator module¶
-
class
ultra.utils.propensity_estimator.
BasicPropensityEstimator
(file_name=None)¶ Bases:
object
-
__init__
(file_name=None)¶ Initialize a propensity estimator.
- Parameters
file_name – (string) The path to the json file of the propensity estimator. ‘None’ means creating from scratches.
-
getPropensityForOneList
(click_list, use_non_clicked_data=False)¶ Computing the propensity weights for each result in a list with clicks.
- Parameters
click_list – list<int> The list of clicks indicating whether each result are clicked (>0) or not (=0).
use_non_clicked_data – Set True to give weights to non-clicked results, otherwise the non-clicked results would have 0 weights.
- Returns
list<float> A list of propensity weights for the corresponding results.
- Return type
propensity_weights
-
loadEstimatorFromFile
(file_name)¶ Load a propensity estimator from a json file.
- Parameters
file_name – (string) The path to the json file of the propensity estimator.
-
outputEstimatorToFile
(file_name)¶ Export a propensity estimator to a json file.
- Parameters
file_name – (string) The path to the json file of the propensity estimator.
-
-
class
ultra.utils.propensity_estimator.
OraclePropensityEstimator
(click_model)¶ Bases:
ultra.utils.propensity_estimator.BasicPropensityEstimator
-
__init__
(click_model)¶ Initialize a propensity estimator.
- Parameters
file_name – (string) The path to the json file of the propensity estimator. ‘None’ means creating from scratches.
-
getPropensityForOneList
(click_list, use_non_clicked_data=False)¶ Computing the propensity weights for each result in a list with clicks.
- Parameters
click_list – list<int> The list of clicks indicating whether each result are clicked (>0) or not (=0).
use_non_clicked_data – Set True to give weights to non-clicked results, otherwise the non-clicked results would have 0 weights.
- Returns
list<float> A list of propensity weights for the corresponding results.
- Return type
propensity_weights
-
loadEstimatorFromFile
(file_name)¶ Load a propensity estimator from a json file.
- Parameters
file_name – (string) The path to the json file of the propensity estimator.
-
outputEstimatorToFile
(file_name)¶ Export a propensity estimator to a json file.
- Parameters
file_name – (string) The path to the json file of the propensity estimator.
-
-
class
ultra.utils.propensity_estimator.
RandomizedPropensityEstimator
(file_name=None)¶ Bases:
ultra.utils.propensity_estimator.BasicPropensityEstimator
-
__init__
(file_name=None)¶ Initialize a propensity estimator.
- Parameters
file_name – (string) The path to the json file of the propensity estimator. ‘None’ means creating from scratches.
-
estimateParametersFromModel
(click_model, data_set)¶ Estimate propensity weights based on clicks simulated with a click model.
- Parameters
click_model – (ClickModel) The click model used to generate clicks.
data_set – (Raw_data) The data set with rank lists and labels.
-
loadEstimatorFromFile
(file_name)¶ Load a propensity estimator from a json file.
- Parameters
file_name – (string) The path to the json file of the propensity estimator.
-
outputEstimatorToFile
(file_name)¶ Export a propensity estimator to a json file.
- Parameters
file_name – (string) The path to the json file of the propensity estimator.
-
-
ultra.utils.propensity_estimator.
main
()¶
ultra.utils.sys_tools module¶
-
ultra.utils.sys_tools.
create_object
(class_str, *args, **kwargs)¶ Find the corresponding class based on a string of class name and create an object.
- Parameters
class_str – a string containing the name of the class
- Raises
ValueError – If there is no class with the name.
-
ultra.utils.sys_tools.
find_class
(class_str)¶ Find the corresponding class based on a string of class name.
- Parameters
class_str – a string containing the name of the class
- Raises
ValueError – If there is no class with the name.
-
ultra.utils.sys_tools.
list_recursive_concrete_subclasses
(base)¶ List all concrete subclasses of base recursively.
- Parameters
base – a string containing the name of the class


- j
- m
- p
- r
- e
- s
- s
- .
- j
- s
build a website on the infinite canvas
I am
pure
, .css {}
and function javascript() {}
and use CSS3 transitions and transformations.
between elements on an infinite canvas.
I currently work
with most modern web browsers
and fallback to simpler transitions with unsupported browsers.
- yes
- yes
- partly
- yes
- partly
I started as a
a jQuery port of impress.js
but I have become much, much more.
here are
some of my features
get started quickly
by using one of our pre-made presentation templates
Simple, jQuery UI
Don't know HTML or CSS? Beta drag and drop presentation builders are being developed in the community: Strut & Impressionist.
press p
to open presenter notes
move your notes off the main screen and have them follow along with your main presentation.
press esc
to de-initialize jmpress.js
allowing your presentation to be printed.
press +
and -
to zoom in and out of a step
or use your mouse wheel.
custom animations
using the data-jmpress
attribute
press the next arrow key or spacebar to view...

- read more about animations
i am
developer friendly
and have a great plugin interface to extend from.
want cleaner HTML?
use templates
set the attributes of your elements with javascript:
$.jmpress('template', 'arraytemplate', { x: 100, y: 100, scale: 2, children: [ { x: 0, y: 150, scale: 0.2 }, { x: 0, y: 450, scale: 0.3 } ] });
// or even better, use a function $.jmpress('template', 'functiontemplate', { x: 100, y: 100, scale: 2, children: function(i) { return { x: i * 200 }; } });
Then use on your parent element:

easily
nest or embed jmpress
on a page or even within another jmpress
embed your presentation
into your blog
combine with the duration-plugin
to auto advance your slides
load
with ajax
Just set the href
or data-src
attributes.
customize
all the controls
Map any key to an action in jmpress.js, read more.
// bind the 'o' key to select a step with the id 'overview' $('#jmpress').jmpress({ keyboard: { keys: { 79: ['select', '#overview'] } } });
change the flow with
routing
$('#jmpress').jmpress('route', [ '#one', '#three', '#two', '#four' ]);
read more about routing
apply
secondary animations
$.jmpress('apply', '#secondary', { secondary: { rotate: { z: 20, x: 20, y:20 }, '': 'self' } });
read more about the secondard plugin
examples
basic
advanced
presentation templates