CHUNHYANG A film review by Robert Strohmeyer Copyright 2001 filmcritic.com filmcritic.com
Due in part to a dense shroud of regulatory policy, the Korean film industry finds few viewers in the West. One of a mere handful of directors to break through this barrier in recent years is Im Kwon Taek (Mandala, Ticket). The latest in a line of more than 100 films for Im (Korean family names come before given names), Chunhyang is a vivid retelling of the classic Korean tale of an 18th century love that withstands and defines a culture.
A musical of sorts, Chunhyang emerges as a rare pairing of film with the ancient Korean operatic tradition of pansori. As such, the picture opens on a black, dimly lighted stage as the pansori singer begins the tale, blending quickly into the moment of action.
Mongryong (Cho Seung Woo), the devoted son of a provincial governor, asks his servant to show him the sights of the region and gets more than he bargained for when he spies the beautiful Chunhyang (Lee Hyo Jung). The daughter of a courtesan, Chunhyang is a forbidden fruit that Mongryong can't resist. No sooner are the two married than Mongryong must depart for Seoul. But Chunhyang, being little more than a courtesan herself, must stay behind or cost her husband his chance at a noble title.
As Mongryong leaves, a new governor comes to town and learns of the much-desired Chunhyang. But, as a devoted wife, she refuses the new governor's advances and is sentenced to death. The remainder of the picture concerns, of course, the return of Mongryong and the dishing out of justice to the corrupt governor.
In itself, the story behind Chunhyang is no more intriguing than that of Romeo and Juliet. Two lovers come together against all odds, yadda yadda yadda. What surprised this critic was the stream of feminist commentary surrounding this picture, laudable for its vision of strength in womanhood. If anything, however, Im's vision of Chunhyang as a character is simply that of a devoted woman who knows her place. Far from an uplifting break from traditionally misogynistic views of femininity, what we're really being offered here is a modern re-hashing of an essentially Confucian idea that women can achieve greatness only through self-sacrifice in the name of their husbands.
Simultaneously, though, it is a richly experimental movie, demonstrating (as Mandala did before it) the vast cultural offerings of Korean cinema. Cunningly acted and breathtakingly filmed (except for the pansori scenes, which appear to have been shot by a drunk with a Handicam), Chunhyang takes bold risks with point of view and narrative style that might never have come from any director other than Im Kwon Taek.

Visit filmcritic.com on the Web at http://www.filmcritic.com
The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews


Set your start point by dragging the vehicle icon or right-clicking on the map to see what area you drive to within a specified minutes.


Toggle navigation
Kelvin
Home
Schedules
Configuration
Kelvin schedules
{{range .}}
Name:
Lights:
Enable when lights appear?
Morning
(00:00 - sunrise)
Time
Color Temperature
Brightness
Control
{{range .BeforeSunrise}}
Delete
Test
{{end}}
Add entry
Daylight
(sunrise - sunset)
Time
Color Temperature
Brightness
Control
Delete
Test
Evening
(sunset - 23:59)
Time
Color Temperature
Brightness
Control
{{range .AfterSunset}}
Delete
Test
{{end}}
Add entry
Delete schedule
{{end}}
Add schedule
Save schedules


This article is a collection of small issues you might run into using three.js that seemed too small to have their own article.
In the browser there are effectively 2 functions that will take a screenshot.
The old one
canvas.toDataURL
and the new better one
canvas.toBlob
So you'd think it would be easy to take a screenshot by just adding some code like
<canvas id="c"></canvas> +<button id="screenshot" type="button">Save...</button>
const elem = document.querySelector('#screenshot'); elem.addEventListener('click', () => { canvas.toBlob((blob) => { saveBlob(blob, `screencapture-${canvas.width}x${canvas.height}.png`); }); }); const saveBlob = (function() { const a = document.createElement('a'); document.body.appendChild(a); a.style.display = 'none'; return function saveData(blob, fileName) { const url = window.URL.createObjectURL(blob); a.href = url; a.download = fileName; a.click(); }; }());
Here's the example from the article on responsiveness with the code above added and some CSS to place the button
When I tried it I got this screenshot
Yes, it's just a black image.
It's possible it worked for you depending on your browser/OS but in general it's not likely to work.
The issue is that for performance and compatibility reasons, by default the browser will clear a WebGL canvas's drawing buffer after you've drawn to it.
The solution is to call your rendering code just before capturing.
In our code we need to adjust a few things. First let's separate out the rendering code.
+const state = { + time: 0, +}; -function render(time) { - time *= 0.001; +function render() { if (resizeRendererToDisplaySize(renderer)) { const canvas = renderer.domElement; camera.aspect = canvas.clientWidth / canvas.clientHeight; camera.updateProjectionMatrix(); } cubes.forEach((cube, ndx) => { const speed = 1 + ndx * .1; - const rot = time * speed; + const rot = state.time * speed; cube.rotation.x = rot; cube.rotation.y = rot; }); renderer.render(scene, camera); - requestAnimationFrame(render); } +function animate(time) { + state.time = time * 0.001; + + render(); + + requestAnimationFrame(animate); +} +requestAnimationFrame(animate);
Now that render
is only concerned with actually rendering
we can call it just before capturing the canvas.
const elem = document.querySelector('#screenshot'); elem.addEventListener('click', () => { + render(); canvas.toBlob((blob) => { saveBlob(blob, `screencapture-${canvas.width}x${canvas.height}.png`); }); });
And now it should work.
For a different solution see the next item.
Let's say you wanted to let the user paint with an animated
object. You need to pass in preserveDrawingBuffer: true
when
you create the WebGLRenderer
. This prevents the browser from
clearing the canvas. You also need to tell three.js not to clear
the canvas as well.
const canvas = document.querySelector('#c'); -const renderer = new THREE.WebGLRenderer({antialias: true, canvas}); +const renderer = new THREE.WebGLRenderer({ + canvas, + preserveDrawingBuffer: true, + alpha: true, +}); +renderer.autoClearColor = false;
Note that if you were serious about making a drawing program this would not be a solution as the browser will still clear the canvas anytime we change its resolution. We're changing is resolution based on its display size. Its display size changes when the window changes size. That includes when the user downloads a file, even in another tab, and the browser adds a status bar. It also includes when the user turns their phone and the browser switches from portrait to landscape.
If you really wanted to make a drawing program you'd render to a texture using a render target.
Throughout these tutorials we've often attached event listeners to the canvas
.
While many events work, one that does not work by default is keyboard
events.
To get keyboard events, set the tabindex
of the canvas to 0 or more. Eg.
<canvas tabindex="0"></canvas>
This ends up causing a new issue though. Anything that has a tabindex
set
will get highlighted when it has the focus. To fix that set its focus CSS outline
to none
canvas:focus { outline:none; }
To demonstrate here are 3 canvases
<canvas id="c1"></canvas> <canvas id="c2" tabindex="0"></canvas> <canvas id="c3" tabindex="1"></canvas>
and some css just for the last canvas
#c3:focus { outline: none; }
Let's attach the same event listeners to all of them
document.querySelectorAll('canvas').forEach((canvas) => { const ctx = canvas.getContext('2d'); function draw(str) { ctx.clearRect(0, 0, canvas.width, canvas.height); ctx.textAlign = 'center'; ctx.textBaseline = 'middle'; ctx.fillText(str, canvas.width / 2, canvas.height / 2); } draw(canvas.id); canvas.addEventListener('focus', () => { draw('has focus press a key'); }); canvas.addEventListener('blur', () => { draw('lost focus'); }); canvas.addEventListener('keydown', (e) => { draw(`keyCode: ${e.keyCode}`); }); });
Notice you can't get the first canvas to accept keyboard input. The second canvas you can but it gets highlighted. The 3rd canvas has both solutions applied.
By default THREE.js makes the canvas opaque. If you want the
canvas to be transparent pass in alpha:true
when you create
the WebGLRenderer
const canvas = document.querySelector('#c'); -const renderer = new THREE.WebGLRenderer({antialias: true, canvas}); +const renderer = new THREE.WebGLRenderer({ + canvas, + alpha: true, +});
You probably also want to tell it that your results are not using premultiplied alpha
const canvas = document.querySelector('#c'); const renderer = new THREE.WebGLRenderer({ canvas, alpha: true, + premultipliedAlpha: false, });
Three.js defaults to the canvas using
premultipliedAlpha: true
but defaults
to materials outputting premultipliedAlpha: false
.
If you'd like a better understanding of when and when not to use premultiplied alpha here's a good article on it.
In any case let's setup a simple example with a transparent canvas.
We applied the settings above to the example from the article on responsiveness. Let's also make the materials more transparent.
function makeInstance(geometry, color, x) { - const material = new THREE.MeshPhongMaterial({color}); + const material = new THREE.MeshPhongMaterial({ + color, + opacity: 0.5, + }); ...
And let's add some HTML content
 <canvas id="c"></canvas> +
 +
 +
Cubes-R-Us!
 +
We make the best cubes!
 +
 +

as well as some CSS to put the canvas in front
body { margin: 0; } #c { width: 100%; height: 100%; display: block; + position: fixed; + left: 0; + top: 0; + z-index: 2; + pointer-events: none; } +#content { + font-size: 7vw; + font-family: sans-serif; + text-align: center; + width: 100%; + height: 100%; + display: flex; + justify-content: center; + align-items: center; +}
note that pointer-events: none
makes the canvas invisible to the mouse
and touch events so you can select the text beneath.
A common question is how to make a three.js animation be the background of a webpage.
There are 2 obvious ways.
position
to fixed
as in#c { position: fixed; left: 0; top: 0; ... }
You can basically see this exact solution on the previous example. Just set z-index
to -1
and the cubes will appear behind the text.
A small disadvantage to this solution is your JavaScript must integrate with the page and if you have a complex page then you need to make sure none of the JavaScript in your three.js visualization conflict with the JavaScript doing other things in the page.
iframe
This is the solution used on the front page of this site.
In your webpage just insert an iframe, for example

 Your content goes here.

Then style the iframe to fill the window and be in the background
which is basically the same code as we used above for the canvas
except we also need to set border
to none
since iframes have
a border by default.
#background { position: fixed; width: 100%; height: 100%; left: 0; top: 0; z-index: -1; border: none; pointer-events: none; }


If the player rolls 1, they score nothing and it becomes the next players turn.
If the player rolls any other number, it is added to their turn total and the player's turn continues.
If a player chooses to "hold", their turn total is added to their score, and it becomes the next player's turn. The first player to score 100 or more points wins!!!


--- layout: home title: Joel Bradbury ---
Hello My name's Joel Bradbury and I'm a software developer from North Wales.
I live with my wife Gemma and my dog, Mr Jones, and work at View Creative.
—{{ post.date | date: "%b %d, %Y" }}


 I had about 5 nice hit out of a glass pipe, and then did a small line. I didn't sleep at all that night only for about 30 min. The next morning my friend came over at about 8:30 and we ditched school and smoked. I had about 10 or 12 fat hits. I didn't do any more that day and I was feeling the high until about 4 or 5 o'clock. At about 9:30 me and my other two friends had bought a twamp-five of Majuarina, and went up to a road into the country, it was nightime and very foggy towards the top of the hill where we had stopped. I had about ten good hits and we drove off.
As we were coming down from the hill, I looked up and saw purple, green, red, and yellow lights shooting up into the air and burst into what seemed like fireworks, but when I focused really hard, they were only lights on a barn, I then looked out the side window (I was riding in the back on the right side of the car), and couldn't believe my eyes. I saw a hurricane right outside of the window about 100 feet away from the car (up close!) that kind of hurricane's you see in the movie 'twister', it was hella trippy. I felt confused, and had a feeling that I never had before, it was a feeling of confusion and fright. but there was a voice in my head telling me it's cool, don't trip. It was pretty sicc now that I look back on it, this was about 4 dayz ago.
Experience Reports are the writings and opinions of the individual authors who submit them.
Some of the activities described are dangerous and/or illegal and none are recommended by Erowid.


--- layout: archive title: Zulip Chat Archive permalink: /stream/144837-PR-reviews/topic/.231601.20attribute.20.5Bclass.5D.20nat.2Eprime.html ---
Not a PR, but numbered from the same, er, numberspace?
I created issue #1601 about the awkward side effects of having attribute [class] nat.prime
in a different module than the one that defines nat.prime
.
You can revert a class using unfreezeI
but I agree that having attribute [class] nat.prime
globally in a file other than data.nat.prime
is liable to cause problems
It should just be on the definition itself
For nat.prime
in particular I think it is probably viable to treat it as a type class, particularly as there aren't a whole lot of theorems whose conclusion is that a number is prime, are there?
meaning that the "type class trap" is not that much of a hindrance
having to insert facts into the instance cache with haveI
, etc.
I remember when we first talked about this, the idea was to make nat.prime
a "weak typeclass" in the sense that it has the class
attribute but no instances
so it's only helping to get things out of the context
Maybe an instance (p : primes) : p.prime
so that you can express conclusions of the form "there exists a prime p such that ..." and unpack them without needing resetI
?
Haha, can you actually write the instance type as p.prime
? I don't think I've ever seen it written that way
oh, that wouldn't work anyways. but instance primes.prime (p : primes) : (p : ℕ).prime
works
Also ring_char K
would want to be an instance, whenever K
is a finite field.
I reposted my crazy idea at #1601, where I propose to ditch this class, and just use bundled primes as argument to Z_p
and Q_p
and zmod
(so we ditch zmodp
)
@Reid Barton Do you see any obvious disadvantages to my proposal?
Otoh, if we make nat.prime
a class, should we do it properly? As in
class nat.prime (p : ℕ) : Prop := (is_prime : ...)
Because I remember having trouble applying a theorem that wanted a [prime p]
, and I couldn't haveI : prime p := bla
. In this case I think p
was ring_char K
for some finite field.
The error message seemed to suggest that this was because prime
was not a proper class, but only a def
tagged as a class.
I started writing a response on the issue last night, but apparently I fell asleep first
I think this would basically work, but one disadvantage would be that the coercion from primes
to nat
might not fire as often as you like. For example, if p : primes
, then p - 1
would only work if the expected type was already known (say nat
or int
).
That might not be a big deal in practice, I'm not sure
That's true.
#1648 is my first attempt at "class"ifying nat.prime
.
Last updated: Apr 24 2020 at 19:02 UTC


--- layout: app/template/default title: How to do a quick literature review ---
Here is my method for a quick (one-three day) literature review on a specific topic. It assumes you already know the area but are looking for the cutting edge. If you are not at that stage yet then I would start by looking for (in vague order of simplicity):
Once you have a good overview and understand of the general topic you can being to answer specific questions.
To start gather a set of search terms trying to keep them as specific as possible. Based on a variety of searches download about 30 papers from and google scholar based upon titles and names. Read the abstract of each just to see if it is relevant, discard those that are not.
From here I read the title and abstract again to make sure I understand their basic premise. Next I read the references, I'm looking for names, institutions and specific entries that come up a lot or seem very pertinent. I keep a log of any common ones I find. I'm also looking for the terminology used in the titles in the references, again logging the best key phrases (I'll come back to this).
The purpose of this is to understand where this work fits relative to its peers and to find even better papers.
The notes file will contain:
Next is the diagrams and conclusion. I'm looking to see what was measured and what they found. I will have spent less than 5 mins reading each paper up to this point, it really is a brief look for specific things. I'm not trying to understand everything just want to know if it is a good and relevant paper.
Now I should know if it is well researched (from the references) and if I actually care about it (from the diagrams and conclusion). I will probably discard all but 5 at this point. I then print out the 5 papers and set them aside to read them later (start to finish in great detail actually making notes).
After this I go back and make a new list of search terms based upon the key phrases. I will specifically be looking out for the names and institutes that came up in my first set of searches but obviously I don't only go for them. Then it's the same process. I do this until I've got maybe 20 papers that are worth me understanding.
 I have three people who I kept a file on, I have read everything one guy had written.
So the order is:
And I don't make notes on the actual papers (other than the key players and terms etc.) until the last two steps. The steps are separate too, i.e. I read all the abstracts then all the references for every paper etc.
As for what I make notes on, I keep a notebook of useful phrases to be used as my references later on. So, if someone has found that "priming will change peoples perception of value" I will keep that so that I can access it easily.
I used jabref to keep track of the papers I had read and made my own summary on the papers I have printed out just so that I could remind myself quickly. After each literature review I would make a final set of notes on what I had learned, feelings and opinions, ideas for my own research, key findings, unexpected things, things to research more.
There are a few review articles where everything could be highlighted, be happy.
As a little aside I find it useful to write the year and how useful the paper is in big writing at the top and I only really highlight the best parts of that paper. Highlighting is to make stuff stand out.
Summary: Make a first pass very quickly and work out the key people, places and phrases/words. Then use that list to find even better paper to read and only bother reading those in detail.


MedCab
Home
Features
Mission
Team
News
About Us
Project Lead
Aaron Huizenga
Data Engineers
Navroz Lamba
Shannon Li
Machine Learning Engineers
Brad Brauser
Peggy Krom
Web UI Developers
Meg Benson
Christopher Girvin
Web React I Developers
Adam Ruffner
Olivia Chen
Web React II Developers
Andrew Ruiz
Johnny Schuler
Backend Development
Michael Hernandez


SSAP Advisor
Prof. Haimanti Banerji
PhD. , IIT Kharagpur
PhD. , IIT Kharagpur
Associate Professor, Architecture & Regional Planning
Prof. Arup Das
PhD. , IIT Kharagpur
PhD. , IIT Kharagpur
Associate Professor, Architecture & Regional Planning
President
Abhishek
5thYr. B.Arch
5thYr. B.Arch
IIT Kharagpur
Phone: +91-9635878870
Treasurer
Keval
5thYr. B.Arch
5thYr. B.Arch
IIT Kharagpur
Phone: +91-7477764666
Vice President
Rahul
2ndYr. MCP
2ndYr. MCP
IIT Kharagpur
Phone: +91-8348992220
President Designee
A Bhusan
4thYr. B.Arch
4thYr. B.Arch
IIT Kharagpur
Phone: +91-7864835040
Treasurer Designee
Vignesh
4thYr. B.Arch
4thYr. B.Arch
IIT Kharagpur
Phone: +91-9775885655
General Secretaries
Soumya
3rdYr. B.Arch
3rdYr. B.Arch
IIT Kharagpur
Phone: +91-8768829635
Bhimanyu
3rdYr. B.Arch
3rdYr. B.Arch
IIT Kharagpur
Phone: +91-8768830581
Social and Cultural Secretary
A Yaduwanshi
2ndYr. B.Arch
2ndYr. B.Arch
IIT Kharagpur
Phone: +91-8436942229
Wallpaper Secretary
A.K Agarwal
2ndYr. B.Arch
2ndYr. B.Arch
IIT Kharagpur
Phone: +91-9609808183
Magazine Secretaries
Medhajeet
2ndYr. B.Arch
2ndYr. B.Arch
IIT Kharagpur
Phone: +91-8436967555
Runjhun
2ndYr. B.Arch
2ndYr. B.Arch
IIT Kharagpur
Phone: +91-9002734111
Web Secretaries
Rohit
2ndYr. B.Arch
2ndYr. B.Arch
IIT Kharagpur
Phone: +91-8768995553
Paras
2ndYr. B.Arch
2ndYr. B.Arch
IIT Kharagpur
Phone: +91-7407210007
Mahendra
2ndYr. B.Arch
2ndYr. B.Arch
IIT Kharagpur
Phone: +91-8348994440
Suraj
2ndYr. B.Arch
2ndYr. B.Arch
IIT Kharagpur
Phone: +91-8436937770
Alumni Secretary
Ananya
2ndYr. B.Arch


No device found, is it plugged in?
🚀 The easiest way to manage your iOS devices.
If the device is already connected 👇
⚡ {{ userMsg }}
External dependencies
This plugin currently depends on libimobiledevice to do certain things. Install it with Homebrew.


About
Contact us
Register
Log in
Sell Item
Products
Home
iBay
-
eBay's most recent lawsuit recipient
All
category1
category2
category3
category4
category5
Our Products
Heading1
Heading2
Heading3
Heading4
Heading5
Top


{% extends "base.html" %} {% block innercontent %}
”Monkeys are safe in a zoo, but that’s not what monkeys are for.”
Ever wanted to become the Monkey God? This is what it's like.
Think of it as an register book filled with lots of Monkeys. Monkeys are very friendly, so they have some (many!) friends. Some of Monkeys have best friends. Sometimes Monkeys get really cranky and delete their friends. Sometimes they feel like they don't want to have best friends. Then they remove the best friend. But this action doesn't delete a monkey from the friend list, only from the best friend's pedestal. We need that to let a Monkey realize how valuable the friendship is.
Got tired of your Monkeys? Just go to the Monkey's profile. Look at all the friends it has, look how old it is, look at its email and write it somewhere down maybe?
How about new Monkeys? You can easily add some. Don't forget to fill in all the fields. All Monkeys need (and want) to be mature enough to have friends and emails.
Want to have a look at all of your Monkeys at once? Nope, not happening. There are too many Monkeys in here. That's why we have this awesome pagination feature. But you are free to sort your Monkeys to make the search easier. Possible sort features include sorting by name, by number of friends and by name of the best friend.
Now that you know everything you need to become the Monkey God, embrace your divine powers!


PyU4V package¶
Subpackages¶
Submodules¶
PyU4V.common module¶
-
class
PyU4V.common.
CommonFunctions
(request, interval, retries, u4v_version)¶ Bases:
object
-
static
check_status_code_success
(operation, status_code, message)¶ Check if a status code indicates success.
Parameters: - operation – the operation
- status_code – the status code
- message – the server response
Raises: VolumeBackendAPIException
-
static
create_list_from_file
(file_name)¶ Given a file, create a list from its contents.
Parameters: file_name – the path to the file Returns: list of contents
-
create_resource
(array, category, resource_type, payload, version=None)¶ Create a resource.
Parameters: - array – the array serial number
- category – the category
- resource_type – the resource type
- payload – the payload
- version – the U4V version
Returns: message – string, server response
-
delete_resource
(array, category, resource_type, resource_name, payload=None, params=None)¶ Delete a resource.
Parameters: - array – the array serial number
- category – the resource category e.g. sloprovisioning
- resource_type – the type of resource to be deleted
- resource_name – the name of the resource to be deleted
- payload – the payload, optional
- params – dict of optional query params
-
get_array
(array_id)¶ Return details on specific array.
Returns: server response
-
get_array_list
(filters=None)¶ Returns a list of arrays.
Parameters: filters – optional dict of filters Returns: dict
-
get_headroom
(array_id, workload, srp='SRP_1', slo='Diamond')¶ Get the Remaining Headroom Capacity.
Get the headroom capacity for a given srp/ slo/ workload combination. Exapmle output: {‘headroom’: [{‘workloadType’: ‘OLTP’, ‘headroomCapacity’: 29076.34, ‘processingDetails’: {‘lastProcessedSpaTimestamp’:<PHONE_NUMBER>000, ‘nextUpdate’: 1670}, ‘sloName’: ‘Diamond’, ‘srp’: ‘SRP_1’, ‘emulation’: ‘FBA’}]}) :param array_id: the array serial number :param workload: the workload type (DSS, OLTP, DSS_REP, OLTP_REP) :param srp: the storage resource pool. Default SRP_1. :param slo: the service level. Default Diamond. :return: dict
-
get_iterator_page_list
(iterator_id, start, end)¶ Get a page of results from an iterator instance.
Parameters: - iterator_id – the id of the iterator
- start – the start number
- end – the end number
Returns: dict
-
get_job_by_id
(job_id)¶ Get details of a specific job.
Parameters: job_id – the job id
-
get_request
(target_uri, resource_type, params=None)¶ Send a GET request to the array.
Parameters: - target_uri – the target uri
- resource_type – the resource type, e.g. maskingview
- params – optional dict of filter params
Returns: resource_object – dict or None
-
get_resource
(array, category, resource_type, resource_name=None, params=None)¶ Get resource details from array.
Parameters: - array – the array serial number
- category – the resource category e.g. sloprovisioning
- resource_type – the resource type e.g. maskingview
- resource_name – the name of a specific resource
- params – query parameters
Returns: resource object – dict or None
-
get_uni_version
()¶ Get the unisphere version from the server.
Returns: version and major_version(e.g. (“V<IP_ADDRESS>”, “84”))
-
get_v3_or_newer_array_list
(filters=None)¶ Returns a list of V3 or newer arrays in the environment.
Parameters: filters – optional dict of filters Returns: list of array ids
-
get_wlp_timestamp
(array_id)¶ Get the latest timestamp from WLP for processing New Workloads.
Returns: dict
-
modify_resource
(array, category, resource_type, payload, version=None, resource_name=None)¶ Modify a resource.
Parameters: - array – the array serial number
- category – the category
- resource_type – the resource type
- payload – the payload
- version – the uv4 version
- resource_name – the resource name
Returns: message – string (server response)
-
static
read_csv_values
(file_name)¶ Reads any csv file with headers.
You can extract the multiple lists from the headers in the CSV file. In your own script, call this function and assign to data variable, then extract the lists to the variables. Example: data=ru.read_csv_values(mycsv.csv) sgnamelist = data[‘sgname’] policylist = data[‘policy’] :param file_name CSV file :return: Dictionary of data parsed from CSV
-
wait_for_job
(operation, status_code, job)¶ Check if call is async, wait for it to complete.
Parameters: - operation – the operation being performed
- status_code – the status code
- job – the job
Returns: task – list of dicts detailing tasks in the job
Raises: VolumeBackendAPIException
-
wait_for_job_complete
(job)¶ Given the job wait for it to complete.
Parameters: job – the job dict Returns: rc – int, result – string, status – string, task – list of dicts detailing tasks in the job Raises: VolumeBackendAPIException
-
static
PyU4V.performance module¶
-
class
PyU4V.performance.
PerformanceFunctions
(array_id, request, common, provisioning, u4v_version)¶ Bases:
object
-
generate_threshold_settings_csv
(outputcsvname)¶ Generate a csv file with threshold settings.
Creates a CSV file with the following headers format containing current alert configuration for the given unisphere instance category,metric,firstthreshold,secondthreshold,notify,kpi array,HostReads,100000,300000,true,true array,HostWrites,100000,300000,true,false :param outputcsvname: filename for CSV to be generated :return:
-
get_all_fe_director_metrics
(start_date, end_date)¶ Get a list of all Directors.
Calculate start and End Dates for Gathering Performance Stats Last 1 Hour. :param start_date: start date :param end_date: end date :return: director_results_combined
-
get_array_metrics
(start_date, end_date)¶ Get array metrics.
Get all avaliable performance statistics for specified time period return in JSON :param start_date: EPOCH Time :param end_date: Epoch Time :return: array_results_combined
-
get_director_info
(director_id, start_date, end_date)¶ Get director performance information.
Get Director level information and performance metrics for specified time frame, hard coded to average numbers. :param director_id: Director ID :param start_date: start date :param end_date: end date :return: Combined payload
-
get_fe_director_list
()¶ Get list of all FE Directors.
Returns: director list
-
get_fe_director_metrics
(start_date, end_date, director, dataformat)¶ Function to get one or more metrics for front end directors.
Parameters: - start_date – Date EPOCH Time in Milliseconds
- end_date – Date EPOCH Time in Milliseconds
- director – List of FE Directors
- dataformat – Average or Maximum
Returns: JSON Payload, and RETURN CODE 200 for success
-
get_fe_port_list
()¶ Function to get a list of all front end ports in the array.
Returns: List of Directors and Ports
-
get_fe_port_metrics
(start_date, end_date, director_id, port_id, dataformat, metriclist)¶ Function to get one or more Metrics for Front end Director ports.
The metric list can contain a list of one or more of PercentBusy, IOs, MBRead, MBWritten, MBs, AvgIOSize, SpeedGBs, MaxSpeedGBs, HostIOLimitIOs, HostIOLimitMBs. :param start_date: Date EPOCH Time in Milliseconds :param end_date: Date EPOCH Time in Milliseconds :param director_id: Director id :param port_id: port id :param dataformat:Average or Maximum :param metriclist: list of one or more metrics :return: JSON Payload, and RETURN CODE 200 for success
-
get_fe_port_util_last4hrs
(dir_id, port_id)¶ Get stats for last 4 hours.
Currently only coded for one metric - can be adapted for multiple :return:Requested stats
-
get_host_metrics
(host, start_date, end_date)¶ Get host metrics.
Get all avaliable host performance statiscics for specified time period return in JSON. :param host: the host name :param start_date: EPOCH Time :param end_date: Epoch Time :return: Formatted results
-
get_perf_category_threshold_settings
(category)¶ Get performance threshold category settings.
Will accept valid category (categories listed from get_threshold_categories). Written for Unisphere 84, if earlier version append /83/ to start of uri :param category: :return: dict, sc
-
get_perf_threshold_categories
()¶ Get performance threshold categories.
Written for Unisphere 84, if you are on ealier, append /83 to the endpoint. :return: category_list
-
get_port_group_metrics
(pg_id, start_date, end_date)¶ Get Port Group Performance Metrics.
Parameters: - pg_id – port group id
- start_date – the start date
- end_date – the end date
Returns: pg_results_combined
-
get_storage_group_metrics
(sg_id, start_date, end_date)¶ Get storage group metrics.
Parameters: - sg_id – the storage group id
- start_date – the start date
- end_date – the end date
Returns: sg_results_combined
-
set_perf_threshold_and_alert
(category, metric, firstthreshold, secondthreshold, notify)¶ Set performance thresholds and alerts.
Function to set performance alerts, suggested use with CSV file to get parameter settings from user template. Default is to check for 3 out of 5 samples before returning alert, users may want to modify as potentially 3 of 5 could mean could take 25 minutes for an alert to be seen as samples are at 5 minute intervals. :param category: the category name :param metric: the required metric :param firstthreshold: the first threshold :param secondthreshold: the second threshold :param notify: Notify user with Alert Boolean
-
set_perfthresholds_csv
(csvfilename)¶ Set performance thresholds using a CSV file.
reads CSV file, and sets perforamnce threshold metrics, should be used with generate_threshold_settings_csv to produce CSV file that can be edited and uploaded. The CSV file should have the following headers format category,metric,firstthreshold,secondthreshold, notify,kpi,array,HostReads,100000,300000,true,true array,HostWrites,100000,300000,true,false cur
Parameters: csvfilename – the path to the csv file
-
PyU4V.provisioning module¶
-
class
PyU4V.provisioning.
ProvisioningFunctions
(array_id, request, common, u4v_version)¶ Bases:
object
-
add_child_sg_to_parent_sg
(child_sg, parent_sg)¶ Add a storage group to a parent storage group.
This method adds an existing storage group to another storage group, i.e. cascaded storage groups. :param child_sg: the name of the child sg :param parent_sg: the name of the parent sg
-
add_existing_vol_to_sg
(sg_id, vol_ids, async=False)¶ Expand an existing storage group by adding existing volumes.
Parameters: - sg_id – the name of the storage group
- vol_ids – the device id of the volume - can be list
- async – Flag to indicate if the call should be async
Returns: dict
-
add_new_vol_to_storagegroup
(sg_id, num_vols, vol_size, cap_unit, async=False, vol_name=None)¶ Expand an existing storage group by adding new volumes.
Parameters: - sg_id – the name of the storage group
- num_vols – the number of volumes
- vol_size – the size of the volumes
- cap_unit – the capacity unit
- async – Flag to indicate if call should be async
- vol_name – name to give to the volume, optional
Returns: dict
-
create_empty_sg
(srp_id, sg_id, slo, workload, disable_compression=False, async=False)¶ Generates a dictionary for json formatting and calls the create_sg function to create an empty storage group Set the disable_compression flag for disabling compression on an All Flash array (where compression is on by default). :param srp_id: the storage resource pool :param sg_id: the name of the new storage group :param slo: the service level agreement (e.g. Gold) :param workload: the workload (e.g. DSS) :param disable_compression: flag for disabling compression (AF only) :param async: Flag to indicate if this call should be async :return: dict
-
create_host
(host_name, initiator_list=None, host_flags=None, init_file=None, async=False)¶ Create a host with the given initiators.
Accepts either initiator_list, e.g. [10000000ba873cbf, 10000000ba873cba], or file. The initiators must not be associated with another host. :param host_name: the name of the new host :param initiator_list: list of initiators :param host_flags: dictionary of optional host flags to apply :param init_file: full path and file name. :param async: Flag to indicate if call should be async :return: dict
-
create_hostgroup
(hostgroup_id, host_list, host_flags=None, async=False)¶ Create a hostgroup containing the given hosts.
Parameters: - hostgroup_id – the name of the new hostgroup
- host_list – list of hosts
- host_flags – dictionary of optional host flags to apply
- async – Flag to indicate if call should be async
Returns: dict
-
create_masking_view_existing_components
(port_group_name, masking_view_name, storage_group_name, host_name=None, host_group_name=None, async=False)¶ Create a new masking view using existing groups.
Must enter either a host name or a host group name, but not both. :param port_group_name: name of the port group :param masking_view_name: name of the new masking view :param storage_group_name: name of the storage group :param host_name: name of the host (initiator group) :param host_group_name: name of host group :param async: flag to indicate if command should be run asynchronously :return: dict
-
create_multiport_portgroup
(portgroup_id, ports)¶ Create a new portgroup.
Parameters: - portgroup_id – the name of the new port group
- ports – list of port dicts - {“directorId”: director_id, “portId”: port_id}
Returns: dict
-
create_non_empty_storagegroup
(srp_id, sg_id, slo, workload, num_vols, vol_size, cap_unit, disable_compression=False, async=False)¶ Create a new storage group with the specified volumes.
Generates a dictionary for json formatting and calls the create_sg function to create a new storage group with the specified volumes. Set the disable_compression flag for disabling compression on an All Flash array (where compression is on by default). :param srp_id: the storage resource pool :param sg_id: the name of the new storage group :param slo: the service level agreement (e.g. Gold) :param workload: the workload (e.g. DSS) :param num_vols: the amount of volumes to be created :param vol_size: the size of each volume :param cap_unit: the capacity unit (MB, GB) :param disable_compression: Flag for disabling compression (AF only) :param async: Flag to indicate if this call should be async :return: dict
-
create_portgroup
(portgroup_id, director_id, port_id)¶ Create a new portgroup.
Parameters: - portgroup_id – the name of the new port group
- director_id – the directoy id
- port_id – the port id
Returns: dict
-
create_portgroup_from_file
(file_name, portgroup_id)¶ Given a file with director:port pairs, create a portgroup.
Each director:port pair must be on a new line. Example director:port - FA-1D:4. :param file_name: the path to the file :param portgroup_id: the name for the portgroup :return: dict, status_code
-
create_storage_group
(srp_id, sg_id, slo, workload, do_disable_compression=False, num_vols=0, vol_size='0', cap_unit='GB', async=False)¶ Create the volume in the specified storage group.
Parameters: - srp_id – the SRP (String)
- sg_id – the group name (String)
- slo – the SLO (String)
- workload – the workload (String)
- do_disable_compression – flag for disabling compression
- num_vols – number of volumes to be created
- vol_size – the volume size
- cap_unit – the capacity unit (MB, GB, TB, CYL)
- async – Flag to indicate if call should be async
Returns: dict
-
create_volume_from_sg_return_dev_id
(volume_name, storagegroup_name, vol_size, cap_unit='GB')¶ Create a new volume in the given storage group.
Parameters: - volume_name – the volume name (String)
- storagegroup_name – the storage group name
- vol_size – volume size (String)
- cap_unit – the capacity unit, default ‘GB’
Returns: device_id
-
deallocate_volume
(device_id)¶ Deallocate all tracks on a volume.
Necessary before deletion. :param device_id: the device id :return: dict
-
delete_host
(host_id)¶ Delete a given host.
Cannot delete if associated with a masking view :param host_id: name of the host
-
delete_hostgroup
(hostgroup_id)¶ Delete a given hostgroup.
Cannot delete if associated with a masking view :param hostgroup_id: name of the hostgroup
-
delete_masking_view
(maskingview_name)¶ Delete a masking view.
Parameters: maskingview_name – the masking view name
-
delete_portgroup
(portgroup_id)¶ Delete a portgroup.
Parameters: portgroup_id – the name of the portgroup
-
delete_storagegroup
(storagegroup_id)¶ Delete a given storage group.
A storage group cannot be deleted if it is associated with a masking view :param storagegroup_id: the name of the storage group
-
delete_volume
(device_id)¶ Delete a volume.
Parameters: device_id – volume device id
-
extend_volume
(device_id, new_size, async=False)¶ Extend a VMAX volume.
Parameters: - device_id – volume device id
- new_size – the new required size for the device
- async – flag to indicate if call should be async
-
extract_director_id_from_portgroup
(portgroup)¶ Get the director information from the port group.
Parameters: portgroup – the name of the portgroup Returns: the director information
-
find_host_lun_id_for_vol
(maskingview, device_id)¶ Find the host_lun_id for a volume in a masking view.
Parameters: - maskingview – the masking view name
- device_id – the device ID
Returns: host_lun_id – int
-
find_low_volume_utilization
(low_utilization_percentage, csvname)¶ Find volumes under a certain utilization threshold.
Function to find volumes under a specified percentage, may be long running as will check all sg on array and all storage group. Only identifies volumes in storage group, note if volume is in more than one sg it may show up more than once. :param low_utilization_percentage: low utilization watermark percentage, e.g. find volumes with utilization less than 10% :param csvname: filename for CFV output file :return: will create csvfile with name passed
-
find_volume_device_id
(volume_name)¶ Given a volume identifier, find the corresponding device_id.
Parameters: volume_name – the volume name Returns: device_id
-
find_volume_identifier
(device_id)¶ Get the volume identifier of a VMAX volume.
Parameters: device_id – the device id Returns: the volume identifier – string
-
get_common_masking_views
(portgroup_name, ig_name)¶ Get common masking views for a given portgroup and initiator group.
Parameters: - portgroup_name – the port group name
- ig_name – the initiator group name
Returns: masking view list
-
get_compressibility_report
(srp_id)¶ Get a specified SRP Compressibility Report.
Parameters: srp_id – the srp id Returns: list of compressibility reports
-
get_director
(director)¶ Queries for details of a director for a symmetrix.
Parameters: director – the director ID e.g. FA-1D Returns: dict
-
get_director_list
()¶ Queries for details of Symmetrix directors for a symmetrix
Returns: director list
-
get_director_port
(director, port_no)¶ Get details of the symmetrix director port.
Parameters: - director – the director ID e.g. FA-1D
- port_no – the port number e.g. 1 - optional
Returns: dict
-
get_director_port_list
(director, filters=None)¶ Get list of the ports on a particular director.
Can be filtered by optional parameters, please see documentation. :param director: the director ID e.g. FA-1D :param filters: optional filters - dict :return: list of port key dicts
-
get_element_from_masking_view
(maskingview_name, portgroup=False, host=False, storagegroup=False)¶ Return the name of the specified element from a masking view.
Parameters: - maskingview_name – the masking view name
- portgroup – the port group name - optional
- host – the host name - optional
- storagegroup – the storage group name - optional
Returns: name of the specified element – string
Raises: ResourceNotFoundException
-
get_host
(host_id)¶ Get details on a host on the array.
Parameters: host_id – the name of the host, optional Returns: dict
-
get_host_from_maskingview
(masking_view_id)¶ Given a masking view, get the associated host or host group.
Parameters: masking_view_id – the name of the masking view Returns: host ID
-
get_host_list
(filters=None)¶ Get list of the hosts on the array.
See documentation for applicable filters. :param filters: optional list of filters - dict :return: list of hosts
-
get_hostgroup
(hostgroup_id)¶ Get details on a hostgroup on the array.
Parameters: hostgroup_id – the name of the hostgroup Returns: dict
-
get_hostgroup_list
(filters=None)¶ Get list of hostgroup(s) on the array.
See unisphere documentation for applicable filters. :param filters: optional list of filters - dict :return: dict
-
get_in_use_initiator_list_from_array
()¶ Get the list of initiators which are in-use from the array.
Gets the list of initiators from the array which are in hosts/ initiator groups. :returns: init_list
-
get_initiator
(initiator_id)¶ Gets details of an initiator.
Parameters: initiator_id – initiator id, optional Returns: initiator details
-
get_initiator_group_from_initiator
(initiator)¶ Given an initiator, get its corresponding initiator group, if any.
Parameters: initiator – the initiator id Returns: found_init_group_name – string, or None
-
get_initiator_ids_from_host
(host_id)¶ Get initiator details from a host.
Parameters: host_id – the name of the host Returns: list of initiator IDs
-
get_initiator_list
(params=None)¶ Retrieve initiator list from the array.
Parameters: params – dict of optional params Returns: list of initiators
-
get_iscsi_ip_address_and_iqn
(port_id)¶ Get the ip addresses from the director port.
Parameters: port_id – the director port identifier Returns: (list of ip_addresses, iqn)
-
get_masking_view
(masking_view_name)¶ Get details of a masking view.
Parameters: masking_view_name – the masking view name Returns: masking view dict
-
get_masking_view_list
(filters=None)¶ Get a masking view or list of masking views.
See unisphere documentation for possible filters. :param filters: dictionary of filters :return: list of masking views
-
get_masking_views_by_host
(initiatorgroup_name)¶ Given a host (initiator group), retrieve the masking view name.
Retrieve the list of masking views associated with the given initiator group. :param initiatorgroup_name: the name of the initiator group :returns: list of masking view names
-
get_masking_views_from_storage_group
(storagegroup)¶ Return any masking views associated with a storage group.
Parameters: storagegroup – the storage group name Returns: masking view list
-
get_maskingview_connections
(mv_name, filters=None)¶ Get all connection information for a given masking view.
Parameters: - mv_name – the name of the masking view
- filters – dict of optional filter parameters
Returns: list of masking view connection dicts
-
get_mv_from_sg
(storage_group)¶ Get the associated masking view(s) from a given storage group
Parameters: storage_group – the name of the storage group Returns: Masking view list
-
get_mvs_from_host
(host_id)¶ Retrieve masking view information for a specified host.
Parameters: host_id – the name of the host Returns: list of masking views
-
get_num_vols_in_sg
(storage_group_name)¶ Get the number of volumes in a storage group.
Parameters: storage_group_name – the storage group name Returns: num_vols – int
-
get_port_identifier
(director, port_no)¶ Get the identifier (wwn) of the physical port.
Parameters: - director – the ID of the director
- port_no – the number of the port
Returns: wwn (FC) or iqn (iscsi), or None
-
get_port_list
(filters=None)¶ Queries for a list of Symmetrix port keys.
Note a mixture of Front end, back end and RDF port specific values are not allowed. See UniSphere documentation for possible values. :param filters: dictionary of filters e.g. {‘vnx_attached’: ‘true’} :return: list of port key dicts
-
get_portgroup
(portgroup_id)¶ Get portgroup details.
Parameters: portgroup_id – the name of the portgroup Returns: dict
-
get_portgroup_from_maskingview
(masking_view_id)¶ Given a masking view, get the associated port group.
Parameters: masking_view_id – the masking view name Returns: the name of the port group
-
get_portgroup_list
(filters=None)¶ Get portgroup details.
Parameters: filters – dict of optional filters Returns: list of portgroups
-
get_ports_from_pg
(portgroup)¶ Get a list of port identifiers from a port group.
Parameters: portgroup – the name of the portgroup Returns: list of port ids, e.g. [‘FA-3D:35’, ‘FA-4D:32’]
-
get_size_of_device_on_array
(device_id)¶ Get the size of the volume from the array.
Parameters: device_id – the volume device id Returns: size
-
get_slo
(slo_id)¶ Get details on a specific service level.
Parameters: slo_id – the service level agreement Returns: dict
-
get_slo_list
(filters=None)¶ Retrieve the list of slo’s from the array
Returns: slo_list – list of service level names
-
get_srp
(srp)¶ Get details on a specific SRP.
Parameters: srp – the storage resource pool Returns: dict
-
get_srp_list
(filters=None)¶ Gets a list of available SRP’s on a given array.
Parameters: filters – optional dict of filter parameters Returns: list
-
get_storage_group
(storage_group_name)¶ Given a name, return storage group details.
Parameters: storage_group_name – the name of the storage group Returns: storage group dict or None
-
get_storage_group_list
(filters=None)¶ “Return a list of storage groups.
Parameters: filters – optional filter parameters Returns: storage group list
-
get_storagegroup_from_maskingview
(masking_view_id)¶ Given a masking view, get the associated storage group.
Parameters: masking_view_id – the masking view name Returns: the name of the storage group
-
get_storagegroup_from_vol
(vol_id)¶ Retrieves sg information for a specified volume.
Parameters: vol_id – the device ID of the volume Returns: list of storage groups
-
get_target_wwns_from_pg
(portgroup)¶ Get the director ports’ wwns.
Parameters: portgroup – portgroup Returns: target_wwns – the list of target wwns for the pg
-
get_vol_effective_wwn_details_84
(vol_list)¶ Get the effective wwn for a list of vols.
Get volume details for a list of volume device ids, and write results to a csv file. :param vol_list: list of device ids :return: Dictionary
-
get_vols_from_storagegroup
(storagegroup_id)¶ Retrieve volume information associated with a particular sg.
Parameters: storagegroup_id – the name of the storage group Returns: list of device IDs of associated volumes
-
get_volume
(device_id)¶ Get a VMAX volume from array.
Parameters: device_id – the volume device id Returns: volume dict or None
-
get_volume_list
(filters=None)¶ Gets list of volumes from array.
Parameters: filters – optional dictionary of filters Returns: list of device ids
-
get_workload_settings
(array)¶ Get valid workload options from array.
Parameters: array – the array serial number Returns: workload_setting – list of workload names
-
is_child_sg_in_parent_sg
(child_name, parent_name)¶ Check if a child storage group is a member of a parent group.
Parameters: - child_name – the child sg name
- parent_name – the parent sg name
Returns: bool
-
is_compression_capable
()¶ Check if array is compression capable.
Returns: bool
-
is_initiator_in_host
(initiator)¶ Check to see if a given initiator is already assigned to a host
Parameters: initiator – the initiator ID Returns: bool
-
is_volume_in_storagegroup
(device_id, storagegroup)¶ See if a volume is a member of the given storage group.
Parameters: - device_id – the device id
- storagegroup – the storage group name
Returns: bool
-
modify_host
(host_id, host_flag_dict=None, remove_init_list=None, add_init_list=None, new_name=None)¶ Modify an existing host.
Only one parameter can be modified at a time. :param host_id: the host name :param host_flag_dict: dictionary of host flags :param remove_init_list: list of initiators to be removed :param add_init_list: list of initiators to be added :param new_name: new host name :return: dict
-
modify_hostgroup
(hostgroup_id, host_flag_dict=None, remove_host_list=None, add_host_list=None, new_name=None)¶ Modify an existing hostgroup.
Only one parameter can be modified at a time. :param hostgroup_id: the name of the hostgroup :param host_flag_dict: dictionary of host flags :param remove_host_list: list of hosts to be removed :param add_host_list: list of hosts to be added :param new_name: new name of the hostgroup :return: dict
-
modify_initiator
(initiator_id, remove_masking_entry=None, replace_init=None, rename_alias=None, set_fcid=None, initiator_flags=None)¶ Modify an initiator.
Only one parameter can be edited at a time. :param initiator_id: the initiator id :param remove_masking_entry: string - “true” or “false” :param replace_init: Id of the new initiator :param rename_alias: tuple (‘new node name’, ‘new port name’) :param set_fcid: set fcid value - string :param initiator_flags: dictionary of initiator flags to set :return: dict
-
modify_portgroup
(portgroup_id, remove_port=None, add_port=None, rename_portgroup=None)¶ Modify an existing portgroup.
Only one parameter can be modified at a time. :param portgroup_id: the name of the portgroup :param remove_port: tuple of port details ($director_id, $portId) :param add_port: tuple of port details ($director_id, $portId) :param rename_portgroup: new portgroup name :return: dict
-
modify_slo
(slo_id, new_name)¶ Modify an SLO.
Currently, the only modification permitted is renaming. :param slo_id: the current name of the slo :param new_name: the new name for the slo :return: dict
-
modify_storage_group
(storagegroup, payload)¶ Modify a storage group (PUT operation).
Parameters: - storagegroup – storage group name
- payload – the request payload
Returns: message – dict, server response
-
move_volumes_between_storage_groups
(device_ids, source_storagegroup_name, target_storagegroup_name, force=False, async=False)¶ Move volumes to a different storage group.
Note: <IP_ADDRESS> or later :param source_storagegroup_name: the originating storage group name :param target_storagegroup_name: the destination storage group name :param device_ids: the device ids - can be list :param force: force flag (necessary on a detach) :param async: async flag
-
remove_child_sg_from_parent_sg
(child_sg, parent_sg)¶ Remove a storage group from its parent storage group.
This method removes a child storage group from its parent group. :param child_sg: the name of the child sg :param parent_sg: the name of the parent sg
-
remove_vol_from_storagegroup
(sg_id, vol_id, async=False)¶ Remove a volume from a given storage group
Parameters: - sg_id – the name of the storage group
- vol_id – the device id of the volume
- async – Flag to indicate if call should be async
Returns: dict
-
rename_masking_view
(masking_view_id, new_name)¶ Rename an existing masking view.
Currently, the only supported modification is “rename”. :param masking_view_id: the current name of the masking view :param new_name: the new name of the masking view :return: dict
-
rename_volume
(device_id, new_name)¶ Rename a volume.
Parameters: - device_id – the volume device id
- new_name – the new name for the volume
-
set_host_io_limit_iops
(storage_group, iops, dynamic_distribution)¶ Set the HOSTIO Limits on an existing storage group.
Parameters: - storage_group – String up to 32 Characters
- dynamic_distribution – valid values Always, Never, OnFailure
- iops – integer value. Min Value 100, must be specified to nearest 100, e.g.202 is not a valid value
Returns: dict
-
update_storagegroup_qos
(storage_group_name, qos_specs)¶ Update the storagegroupinstance with qos details.
If maxIOPS or maxMBPS is in qos_specs, then DistributionType can be modified in addition to maxIOPS or/and maxMBPS If maxIOPS or maxMBPS is NOT in qos_specs, we check to see if either is set in StorageGroup. If so, then DistributionType can be modified. Example qos specs: {‘maxIOPS’: ‘4000’, ‘maxMBPS’: ‘4000’, ‘DistributionType’: ‘Dynamic’}. :param storage_group_name: the storagegroup instance name :param qos_specs: the qos specifications :returns: dict
-
PyU4V.replication module¶
-
class
PyU4V.replication.
ReplicationFunctions
(array_id, request, common, provisioning, u4v_version)¶ Bases:
object
-
are_vols_rdf_paired
(array, remote_array, device_id, target_device, rdf_group)¶ Check if a pair of volumes are RDF paired.
Parameters: - array – the array serial number
- remote_array – the remote array serial number
- device_id – the device id
- target_device – the target device id
- rdf_group – the rdf group
Returns: paired – bool, state – string
-
check_snap_capabilities
()¶ Check what replication facilities are available
Returns: array_capabilities dict
-
create_storagegroup_snap
(sg_name, snap_name, ttl=None, hours=False)¶ Create a snapVx snapshot of a storage group.
To establish a new generation of an existing SnapVX snapshot for a source SG, use the same name as the existing snapshot for the new snapshot. :param sg_name: the source group name :param snap_name: the name of the snapshot :param ttl: ttl in days, if any - int :param hours: Boolean, if set will specify TTL value is hours not days
-
create_storagegroup_srdf_pairings_
(storagegroup_id, remote_sid, srdfmode, establish=None, async=False, rdfg_number=None)¶ SRDF protect a storage group.
Parameters: - storagegroup_id – Unique string up to 32 Characters
- remote_sid – Type Integer 12 digit VMAX ID e.g.<PHONE_NUMBER>08
- srdfmode – String, values can be Active, AdaptiveCopyDisk, Synchronous, Asynchronous
- establish – default is none. Bool
- async – Flag to indicate if call should be async (NOT to be confused with the SRDF mode)
- rdfg_number – the required RDFG number (optional)
Returns: message and status Type JSON
-
delete_storagegroup_snapshot
(storagegroup, snap_name, gen_num=0)¶ Delete the snapshot of a storagegroup.
Parameters: - storagegroup – the storage group name
- snap_name – the name of the snapshot
- gen_num – the generation number
-
delete_storagegroup_srdf
(storagegroup_id, rdfg_num=None)¶ Delete srdf pairings for a given storagegroup.
Parameters: - storagegroup_id –
- rdfg_num – the rdfg number to remove pairings from - can be list
-
find_expired_snapvx_snapshots
()¶ Find all expired snapvx snapshots.
Parses through all Snapshots for array and lists those that have snapshots where the expiration date has passed however snapshots have not been deleted as they have links. Example output: [{‘storagegroup_name’: ‘my-storagegroup1’, ‘snapshot_name’: ‘my-temporary-snap’, ‘generation_number’: ‘0’, ‘expiration_time’: ‘14:46:24 Wed, 24 Jan 2018’, ‘linked_sg_name’: ‘my-linked-sg’, ‘snap_creation_time’: ‘14:46:24 Wed, 23 Jan 2018’}] :return: list of dicts with expired snap details,
-
get_rdf_group
(array, rdf_number)¶ Get specific rdf group details.
Parameters: - array – the array serial number
- rdf_number – the rdf number
-
get_rdf_group_list
(array)¶ Get rdf group list from array.
Parameters: array – the array serial number Returns: list of rdf group dicts with ‘rdfgNumber’ and ‘label’
-
get_rdf_group_number
(array, rdf_group_label)¶ Given an rdf_group_label, return the associated group number.
Parameters: - array – the array serial number
- rdf_group_label – the group label
Returns: rdf_group_number
-
get_rdf_group_volume
(array, rdf_number, device_id)¶ Get specific volume details, from an RDF group.
Parameters: - array – the array serial number
- rdf_number – the rdf group number
- device_id – the device id
-
get_rdf_group_volume_list
(array, rdf_number)¶ Get specific volume details, from an RDF group.
Parameters: - array – the array serial number
- rdf_number – the rdf group number
Returns: list of device ids
-
get_replication_info
()¶ Return replication information for an array.
Returns: dict
-
get_snapshot_generation_details
(sg_id, snap_name, gen_num)¶ Get the details for a particular snapshot generation.
Parameters: - sg_id – the storage group id
- snap_name – the snapshot name
- gen_num – Generation number
Returns: dict
-
get_storage_group_rep
(storage_group_name)¶ Given a name, return storage group details wrt replication.
Parameters: storage_group_name – the name of the storage group Returns: storage group dict or None
-
get_storage_group_rep_list
(has_snapshots=False, has_srdf=False)¶ Returns list of storage groups with replication.
Parameters: - has_snapshots – return only storagegroups with snapshots
- has_srdf – return only storagegroups with SRDF
Returns: list of storage groups with associated replication
-
get_storagegroup_snapshot_generation_list
(storagegroup_id, snap_name)¶ Gets a snapshot and its generation count information for an sg.
The most recent snapshot will have a gen number of 0. The oldest snapshot will have a gen number = genCount - 1 (i.e. if there are 4 generations of particular snapshot, the oldest will have a gen num of 3) :param storagegroup_id: the name of the storage group :param snap_name: the name of the snapshot :return: list of generation numbers
-
get_storagegroup_srdf_details
(storagegroup_id, rdfg_num)¶ Get the SRDF details for an RDF group on a particular storagegroup.
Parameters: - storagegroup_id – name of storage group
- rdfg_num – rdf number
Returns: dict
-
get_storagegroup_srdfg_list
(storagegroup_id)¶ Get the SRDF numbers for a storage group.
Parameters: storagegroup_id – Storage Group Name of replicated group Returns: list of RDFG numbers
-
is_snapvx_licensed
()¶ Check if the snapVx feature is licensed and enabled.
Returns: True if licensed and enabled; False otherwise.
-
is_vol_in_rep_session
(device_id)¶ Check if a volume is in a replication session.
Parameters: device_id – the device id Returns: snapvx_tgt – bool, snapvx_src – bool, rdf_grp – list or None
-
link_gen_snapshot
(sg_id, snap_name, link_sg_name, async=False, gen_num=0)¶ Link a snapshot to another storage group.
Target storage group will be created if it does not exist. :param sg_id: Source storage group name :param snap_name: name of the snapshot :param link_sg_name: the target storage group name :param async: flag to indicate if call is async :param gen_num: generation number of a snapshot (int) :return: dict
-
modify_storagegroup_snap
(source_sg_id, target_sg_id, snap_name, link=False, unlink=False, restore=False, new_name=None, gen_num=0, async=False)¶ Modify a storage group snapshot.
Please note that only one parameter can be modified at a time. :param source_sg_id: the source sg id :param target_sg_id: the target sg id (Can be None) :param snap_name: the snapshot name :param link: Flag to indicate action = Link :param unlink: Flag to indicate action = Unlink :param restore: Flag to indicate action = Restore :param new_name: the new name for the snapshot :param gen_num: the generation number :param async: flag to indicate if call should be async
-
modify_storagegroup_srdf
(storagegroup_id, action, rdfg=None, options=None, async=False)¶ Modify the state of an srdf.
This may be a long running task depending on the size of the SRDF group, can switch to async call if required. :param storagegroup_id: name of storage group :param action: the rdf action e.g. Suspend, Establish, etc :param rdfg: rdf number, optional :param options: a dict of possible options - depends on action type :param async: flag to indicate if call should be async
-
rename_snapshot
(sg_id, snap_name, new_name, gen_num=0)¶ Rename an existing storage group snapshot
Parameters: - sg_id – the name of the storage group
- snap_name – the name of the snapshot
- new_name – the new name of the snapshot
- gen_num – generation number of a snapshot (int)
Returns: dict
-
restore_snapshot
(sg_id, snap_name, gen_num=0)¶ Restore a storage group to its snapshot
Parameters: - sg_id – the name of the storage group
- snap_name – the name of the snapshot
- gen_num – the generation number of the snapshot (int)
Returns: dict
-
PyU4V.rest_requests module¶
-
class
PyU4V.rest_requests.
RestRequests
(username, password, verify, base_url)¶ -
close_session
()¶ Close the current rest session
-
establish_rest_session
()¶
-
rest_request
(target_url, method, params=None, request_object=None, stream=True, timeout=None)¶ Sends a request (GET, POST, PUT, DELETE) to the target api.
Parameters: - target_url – target url (string)
- method – The method (GET, POST, PUT, or DELETE)
- params – Additional URL parameters
- request_object – request payload (dict)
- stream – flag to indicate if the response should be streamed
- timeout – optional timeout override
Returns: server response object (dict), status code
-
PyU4V.rest_univmax module¶
-
class
PyU4V.rest_univmax.
RestFunctions
(username=None, password=None, server_ip=None, port=None, verify=None, u4v_version='84', interval=5, retries=200, array_id=None)¶ -
close_session
()¶ Close the current rest session
-
set_array_id
(array_id)¶ Set the array serial number.
Parameters: array_id – the array serial number
-
set_requests_timeout
(timeout_value)¶ Set the requests timeout.
Parameters: timeout_value – the new timeout value - int
-


Column one
Column two
Column one
Column two
Column three
Column four
Column one
Column two
Column one
Column two
Column three
Column four
Three
Column
Layout
Expanding
3 Column
Layout
Collapsing
3 Column
Layout
Three
Even
Columns


Tasks:
+Finish radio_tunnel solution and start tests.
+Start UHX1 schematic design.
+Start studying aprx
Completed:
+Radio_tunnel solution is prepared and tested successfully, see notes for details.
+A schematic for both Uhx1 and Bim2A boards has been prepared, PCB designs are on the way
Continuing:
+Studying of aprx is still ongoing, see notes for details.
Delayed:
+none
Canceled:
+none
Next Week:
+Preparation of Uhx1 boards
+Pcb designs for Uhx1 and Bim2A boards
+Testing of soundmodem with Bim2A and Uhx1 boards
Notes:
aprx has a beacon option which enables users to beacon an APRS message in a file periodically. This file will be modified periodically with a bash script and aprx will take care of sending it periodically. There was one problem with this solution which was the automatic telemetry messages sent by aprx itself. These automated telemetry messages were going to override our data and label if not disabled. Unfortunately, there was no disable option in the config file, and as the aprx mail-group says "aprs-is telemetry is ALWAYS enabled". To overcome this problem I've modified the source code of aprx and disabled automated telemetry manually (Another reason to love open-source :)).
Radio_tunnel was prepared using virtual network kernel interfaces called tun/tap devices. Unfortunately there is no way to set these device as half-duplex. Therefore kernel acts and sends packets as if the underlying hardware is full-duplex, which causes a lot of packets to be discarded, and so causes the communication to be extremely slow. It works, but it's slow, It could be slower than the soundmodem solution even with the 4x baudrate. Further work on this solution can be to write an actual kernel interface module.


A pair of functions for renaming and encoding data frames using external crosswalk files. It is especially useful when constructing master data sets from multiple smaller data sets that do not name or encode variables consistently across files. Based on similar commands in 'Stata'.
| Version: | 0.2.2 |
| Depends: | R (≥ 3.3.0) |
| Imports: | dplyr, haven, labelled, methods, readr, readxl, tibble |
| Suggests: | testthat, knitr, rmarkdown |
| Published: | 2018-11-26 |
| Author: | Benjamin Skinner [aut, cre] |
| Maintainer: | Benjamin Skinner <btskinner at virginia.edu> |
| BugReports: | https://github.com/btskinner/crosswalkr/issues |
| License: | MIT + file LICENSE |
| URL: | https://github.com/btskinner/crosswalkr |
| NeedsCompilation: | no |
| Materials: | NEWS |
| CRAN checks: | crosswalkr results |
| Reference manual: | crosswalkr.pdf |
| Vignettes: |
Vignette Title |
| Package source: | crosswalkr_0.2.2.tar.gz |
| Windows binaries: | r-devel: crosswalkr_0.2.2.zip, r-release: crosswalkr_0.2.2.zip, r-oldrel: crosswalkr_0.2.2.zip |
| OS X binaries: | r-release: crosswalkr_0.2.2.tgz, r-oldrel: crosswalkr_0.2.2.tgz |
| Old sources: | crosswalkr archive |
Please use the canonical form https://CRAN.R-project.org/package=crosswalkr to link to this page.


I've been medicated for ADD and ADHD for as long as I can remember. I was first put on Ritalin when I was in third grade because I was out of control. Ritalin was bad for me, several times when I was on it, I passed out without warning, and two years later, my doctor found that it had actually been damaging my heart.
After I was taken off the Ritalin, I was immediately switched over to Dexedrine at 10 mg per day. For the next year and a half, my life ran seamlessly, I was calm focused and in control. Around this time, I began to have fits of suicidal depression, and they did not go away for about 6 months. Eventually, my parents took me back to the doctor to have my dosage re-evaluated. They didn't tell the doctor about my depression, although now I wish that they had so that he could have stopped my dependence then and there. From this point on, my prescription was upped to 20 mg per day. Slowly, the depression subsided, and I was once more a well-adjusted young boy.
Once I got to high school, I was at times taking as much as 60 mg of Dexedrine at once. I was unsatisfied with the way that my life had turned so far, but the depression was still far behind me, I was going to work to make everything satisfying again. The first year of high school breezed right by me, I had an A average, and I was happy. Over the summer, I grew about 3 inches and put on nearly forty pounds. I thought nothing of it at the time, and continued dosing usually 20 mg/day unless there was something of importance happening, in which case I took more.
And so my second year of high school began, it started horrendously. For half of the first semester I could not motivate myself to work at all; but I picked up in the second half and scraped by. My second semester was just a steady decline after that. When the summer came again, unless I was constantly stimulated, I would wallow in self-pity and depression. I would manage to keep it in check of my own accord and lead a mostly normal life if I had something to do, but if I was left unoccupied, my mind would uncontrollably drag me through memories of sadness depression, and anything bad that had ever happened to me.
That brings me to this school year, which has just drawn to a close. My parents decided that I should be tried for a while without Dexedrine, so they cut it off. 30 mg per day on average, then nothing. I felt like shit for about two weeks, then all I felt was detached and apathetic for anything and everything.  One day I would feel washed out like I usually did. Then the next day, my sanity would leave me entirely, I regularly hid in cupboards and would often collapse onto the floor laughing hysterically at nothing at all.
Eventually, I went back on the Dexedrine at 20 mg per day again occasionally taking an extra 10 mg when I felt it was needed. This stabilized me quite a bit, brought me back to the realm of reason. Once more, I am able to focus and concentrate. But now the daily comedown is horror, worse than it ever was on Ritalin. Instead of getting depressed, I now get incredibly frustrated at nothing at all. If I don't find something to occupy me for the next two hours, the frustration turns to a seething rage, and it is all I can do to stop myself from destroying property and beating people in the streets.
Over the past few years however, I have noticed that if I am in a good setting and I have enough amphetamine in my system, my mind seems to expand ever outwards. Nothing is beyond my comprehension, I can follow separate conversations at the same time, all the while being totally aware of everything around me. In this state, when the need for me to move arises, which it does only rarely, I find that I am faster stronger and more flexible than ever before. It is an awesome wonder to behold; I can only describe it as nirvana, being at one with the whole of creation.
I have a constant ache for that experience, through every waking moment, but I fear it as well, because I know how dependant I already am on the drug, and I fear what may happen if it takes any more control of my life than it already has.
Experience Reports are the writings and opinions of the individual authors who submit them.
Some of the activities described are dangerous and/or illegal and none are recommended by Erowid.


| Package | Description |
|---|---|
| com.cyc.base |
Interfaces for low-level interaction with Cyc; this code is not supported for external developers.
|
| com.cyc.base.cycobject |
Interfaces for representations of Knowledge Base objects such as constants, functional expressions, lists, rules and assertions; this code is not supported for external developers.
|
| com.cyc.base.kbtool |
Interfaces for common operations for KB content, such as assertion, querying, etc; this code is not supported for external developers.
|
| com.cyc.baseclient |
Reference implementation of the Base Client API; this code is not supported for external developers.
|
| com.cyc.baseclient.cycobject |
Provides the attributes and behavior of Base Client API Knowledge Base objects such as
constants, functional expressions, lists, rules and assertions; this code is not supported for external developers.
|
| com.cyc.baseclient.inference |
Provides classes for working with Cyc inferences; this code is not supported for external developers.
|
| com.cyc.baseclient.kbtool |
Classes which wrap common operations for KB content, such as assertion, querying, etc; this code is not supported for external developers.
|
| com.cyc.baseclient.testing |
Testing utilities & constants; this code is not supported for external developers.
|
| com.cyc.kb.client |
The implementation of various interfaces specified in com.cyc.kb, refer to that package for
a more detailed discussion of using the API.
|
| Modifier and Type | Method and Description |
|---|---|
FormulaSentence |
CommandTool.converseSentence(Object command)
Converses with Cyc to perform an API command whose result is returned as a Cyc sentence.
|
| Modifier and Type | Method and Description |
|---|---|
FormulaSentence |
FormulaSentence.deepCopy() |
FormulaSentence |
FormulaSentence.getCanonicalElSentence(CycAccess access)
Return a canonical version of this.
|
FormulaSentence |
FormulaSentence.getCanonicalElSentence(CycAccess access,
Boolean canonicalizeVars) |
FormulaSentence |
FormulaSentence.getCanonicalElSentence(CycAccess access,
ElMt mt,
Boolean canonicalizeVars)
Return a canonical version of this.
|
FormulaSentence |
CycAssertion.getELFormula(CycAccess access)
Returns the EL formula for this assertion.
|
FormulaSentence |
FormulaSentence.getExpandedSentence(CycAccess access)
Return a version of this with all expandable relations expanded into their more
verbose forms.
|
FormulaSentence |
FormulaSentence.getExpandedSentence(CycAccess access,
ElMt mt)
Return a version of this with all expandable relations expanded into their more
verbose forms.
|
FormulaSentence |
CycAssertion.getGaf()
Returns the Ground Atomic Formula (gaf) for this assertion.
|
FormulaSentence |
FormulaSentence.splice(FormulaSentence toInsert,
com.cyc.kb.ArgPosition argPosition,
CycAccess access)
Insert toInsert into this sentence at argPosition,
using access to attempt to unify and rename variables.
|
FormulaSentence |
FormulaSentence.substituteNonDestructive(Object original,
Object replacement) |
FormulaSentence |
FormulaSentence.treeSubstitute(CycAccess access,
Map<CycObject,Object> substitutions)
Returns the result of a tree substitution on the sentence.
|
| Modifier and Type | Method and Description |
|---|---|
FormulaSentence |
FormulaSentence.splice(FormulaSentence toInsert,
com.cyc.kb.ArgPosition argPosition,
CycAccess access)
Insert toInsert into this sentence at argPosition,
using access to attempt to unify and rename variables.
|
| Modifier and Type | Method and Description |
|---|---|
FormulaSentence |
ObjectTool.makeCyclifiedSentence(String string)
Constructs a new FormulaSentence object by parsing a string from a string that
may or may not include all appropriate "#$"s.
|
FormulaSentence |
ObjectTool.makeCycSentence(String string)
Constructs a new FormulaSentence object by parsing a string.
|
| Modifier and Type | Method and Description |
|---|---|
void |
AssertTool.assertGaf(FormulaSentence gaf,
CycObject mt)
Asserts a ground atomic formula (gaf) in the specified microtheory MT.
|
void |
AssertTool.assertWithTranscriptAndBookkeeping(FormulaSentence sentence,
CycObject mt)
Asserts the given sentence with bookkeeping, and then places it on the transcript queue.
|
InferenceResultSet |
InferenceTool.executeQuery(FormulaSentence query,
ElMt mt,
com.cyc.query.parameters.InferenceParameters queryProperties)
Run a synchronous query against Cyc.
|
InferenceResultSet |
InferenceTool.executeQuery(FormulaSentence query,
ElMt mt,
com.cyc.query.parameters.InferenceParameters queryProperties,
long timeoutMsecs)
Run a synchronous query against Cyc.
|
CycSentence |
LookupTool.getSimplifiedSentence(FormulaSentence sentence) |
CycSentence |
LookupTool.getSimplifiedSentence(FormulaSentence sentence,
ElMt mt) |
boolean |
InspectorTool.isGafValidAssertion(FormulaSentence gaf,
ElMt mt)
Returns true if the given HL formula and microtheory correspond to a valid
assertion in that microtheory.
|
boolean |
InferenceTool.isQueryTrue(FormulaSentence query,
CycObject mt,
com.cyc.query.parameters.InferenceParameters queryProperties)
Returns true if the Cyc query (with inference parameters) is proven true.
|
boolean |
InferenceTool.isQueryTrue(FormulaSentence query,
CycObject mt,
com.cyc.query.parameters.InferenceParameters queryProperties,
long timeoutMsecs)
Returns true if the Cyc query (with inference parameters) is proven true.
|
CycList<Object> |
InferenceTool.queryVariable(CycVariable queryVariable,
FormulaSentence query,
CycObject mt)
Asks a Cyc query (new inference parameters) and returns the binding list for the given variable.
|
CycList<Object> |
InferenceTool.queryVariable(CycVariable queryVariable,
FormulaSentence query,
CycObject mt,
com.cyc.query.parameters.InferenceParameters queryProperties)
Asks a Cyc query (new inference parameters) and returns the binding list for the given variable.
|
CycList<Object> |
InferenceTool.queryVariable(CycVariable variable,
FormulaSentence query,
CycObject mt,
com.cyc.query.parameters.InferenceParameters queryProperties,
long timeoutMsecs)
Asks a Cyc query (new inference parameters) and returns the binding list for the given variable.
|
CycList<Object> |
InferenceTool.queryVariables(CycList<CycVariable> variables,
FormulaSentence query,
CycObject mt,
com.cyc.query.parameters.InferenceParameters queryProperties)
Asks a Cyc query (new inference parameters) and returns the binding list for the given variable list.
|
CycList |
InferenceTool.queryVariables(CycList<CycVariable> queryVariables,
FormulaSentence query,
CycObject mt,
com.cyc.query.parameters.InferenceParameters queryProperties,
String inferenceProblemStoreName)
Asks a Cyc query (new inference parameters) and returns the binding list for the given variable list.
|
void |
UnassertTool.unassertGaf(FormulaSentence gaf,
CycObject mt)
Unasserts the given ground atomic formula (gaf) in the specified microtheory MT.
|
void |
UnassertTool.unassertGaf(FormulaSentence gaf,
CycObject mt,
boolean bookkeeping,
boolean transcript)
Unasserts the given ground atomic formula (gaf) in the specified
microtheory MT.
|
| Modifier and Type | Method and Description |
|---|---|
FormulaSentence |
CycCommandTool.converseSentence(Object command)
Converses with Cyc to perform an API command whose result is returned as a Cyc sentence.
|
| Modifier and Type | Class and Description |
|---|---|
class |
FormulaSentenceImpl |
| Modifier and Type | Method and Description |
|---|---|
FormulaSentence |
CycAssertionImpl.getELFormula(CycAccess access)
Returns the EL formula for this assertion.
|
FormulaSentence |
CycAssertionImpl.getGaf()
Returns the Ground Atomic Formula (gaf) for this assertion.
|
static FormulaSentence |
FormulaSentenceImpl.makeConditional(FormulaSentence antecedent,
FormulaSentence consequent)
Make a new conditional sentence with the specified antecedent and consequent.
|
static FormulaSentence |
FormulaSentenceImpl.makeConjunction(FormulaSentence... conjuncts)
Make a new conjunction conjoining the arguments.
|
static FormulaSentence |
FormulaSentenceImpl.makeConjunction(Iterable<FormulaSentence> conjuncts)
Make a new conjunction from the elements of conjuncts.
|
static FormulaSentence |
FormulaSentenceImpl.makeDisjunction(Iterable<FormulaSentence> conjuncts)
Make a new disjunction from the elements of conjuncts.
|
static FormulaSentence |
FormulaSentenceImpl.makeFormulaSentence(CycAccess cyc,
String cycl)
Build a new CycSentence from a String.
|
static FormulaSentence |
FormulaSentenceImpl.makeFormulaSentence(Iterable<? extends Object> terms)
Create and return a new CycSentence whose arguments are terms.
|
static FormulaSentence |
FormulaSentenceImpl.makeFormulaSentence(Object... terms)
Build a new CycSentence from terms.
|
static FormulaSentence |
FormulaSentenceImpl.makeNegation(FormulaSentence sentence)
Make a negated form of the specified sentence.
|
FormulaSentence |
FormulaSentenceImpl.treeSubstitute(CycAccess access,
Map<CycObject,Object> substitutions) |
| Modifier and Type | Method and Description |
|---|---|
static FormulaSentence |
FormulaSentenceImpl.makeConditional(FormulaSentence antecedent,
FormulaSentence consequent)
Make a new conditional sentence with the specified antecedent and consequent.
|
static FormulaSentence |
FormulaSentenceImpl.makeConjunction(FormulaSentence... conjuncts)
Make a new conjunction conjoining the arguments.
|
static FormulaSentence |
FormulaSentenceImpl.makeNegation(FormulaSentence sentence)
Make a negated form of the specified sentence.
|
FormulaSentenceImpl |
FormulaSentenceImpl.splice(FormulaSentence toInsert,
com.cyc.kb.ArgPosition argPosition,
CycAccess access) |
| Modifier and Type | Method and Description |
|---|---|
static FormulaSentence |
FormulaSentenceImpl.makeConjunction(Iterable<FormulaSentence> conjuncts)
Make a new conjunction from the elements of conjuncts.
|
static FormulaSentence |
FormulaSentenceImpl.makeDisjunction(Iterable<FormulaSentence> conjuncts)
Make a new disjunction from the elements of conjuncts.
|
| Constructor and Description |
|---|
CycAssertionImpl(FormulaSentence posLit,
CycObject mt)
Constructs a GAF assertion object from a single (positive) literal and assertion mt.
|
| Modifier and Type | Method and Description |
|---|---|
protected FormulaSentence |
KbQueryFactory.loadKbqSentence(CycAccess access,
DenotationalTerm kbq) |
| Constructor and Description |
|---|
DefaultInferenceWorker(FormulaSentence query,
ElMt mt,
com.cyc.query.parameters.InferenceParameters queryProperties,
CycAccess access,
long timeoutMsecs)
Creates a new instance of DefaultInferenceWorker.
|
DefaultInferenceWorker(FormulaSentence query,
ElMt mt,
com.cyc.query.parameters.InferenceParameters queryProperties,
CycAccess access,
long timeoutMsecs,
Integer priority)
Creates a new instance of DefaultInferenceWorker.
|
DefaultInferenceWorker(FormulaSentence query,
ElMt mt,
com.cyc.query.parameters.InferenceParameters queryProperties,
Map nlGenerationProperties,
CycSymbol answerProcessingFunction,
boolean optimizeVariables,
CycAccess access,
long timeoutMsecs)
Creates a new instance of DefaultInferenceWorker.
|
DefaultInferenceWorker(FormulaSentence query,
ElMt mt,
com.cyc.query.parameters.InferenceParameters queryProperties,
Map nlGenerationProperties,
CycSymbol answerProcessingFunction,
boolean optimizeVariables,
CycAccess access,
long timeoutMsecs,
Integer priority)
Creates a new instance of DefaultInferenceWorker.
|
DefaultInferenceWorkerSynch(FormulaSentence query,
ElMt mt,
com.cyc.query.parameters.InferenceParameters queryProperties,
CycAccess access,
long timeoutMsecs)
Creates a new instance of DefaultInferenceWorker.
|
DefaultInferenceWorkerSynch(FormulaSentence query,
ElMt mt,
com.cyc.query.parameters.InferenceParameters queryProperties,
Map nlGenerationProperties,
CycSymbol answerProcessingFunction,
boolean optimizeVariables,
CycAccess access,
long timeoutMsecs)
Creates a new instance of DefaultInferenceWorker.
|
DefaultInferenceWorkerSynch(FormulaSentence query,
ElMt mt,
com.cyc.query.parameters.InferenceParameters queryProperties,
Map nlGenerationProperties,
CycSymbol answerProcessingFunction,
boolean optimizeVariables,
CycAccess access,
long timeoutMsecs,
Integer priority)
Creates a new instance of DefaultInferenceWorker.
|
| Modifier and Type | Method and Description |
|---|---|
void |
AssertToolImpl.assertGaf(FormulaSentence gaf,
CycObject mt) |
void |
AssertToolImpl.assertWithTranscriptAndBookkeeping(FormulaSentence sentence,
CycObject mt) |
InferenceResultSet |
InferenceToolImpl.executeQuery(FormulaSentence query,
ElMt mt,
com.cyc.query.parameters.InferenceParameters queryProperties) |
InferenceResultSet |
InferenceToolImpl.executeQuery(FormulaSentence query,
ElMt mt,
com.cyc.query.parameters.InferenceParameters queryProperties,
long timeoutMsecs) |
CycSentence |
LookupToolImpl.getSimplifiedSentence(FormulaSentence sentence) |
CycSentence |
LookupToolImpl.getSimplifiedSentence(FormulaSentence sentence,
ElMt mt) |
boolean |
InspectorToolImpl.isGafValidAssertion(FormulaSentence gaf,
ElMt mt) |
boolean |
InferenceToolImpl.isQueryTrue(FormulaSentence query,
CycObject mt,
com.cyc.query.parameters.InferenceParameters queryProperties) |
boolean |
InferenceToolImpl.isQueryTrue(FormulaSentence query,
CycObject mt,
com.cyc.query.parameters.InferenceParameters queryProperties,
long timeoutMsecs) |
String |
InferenceToolImpl.queryResultsToXMLString(FormulaSentence query,
CycObject mt,
com.cyc.query.parameters.InferenceParameters queryProperties,
CycList xmlSpec)
Asks a Cyc query (new inference parameters) and returns an XML stream according
to the specifications in the CycArrayList xmlSpec.
|
CycArrayList<Object> |
InferenceToolImpl.queryVariable(CycVariable queryVariable,
FormulaSentence query,
CycObject mt) |
CycArrayList<Object> |
InferenceToolImpl.queryVariable(CycVariable queryVariable,
FormulaSentence query,
CycObject mt,
com.cyc.query.parameters.InferenceParameters queryProperties) |
CycArrayList<Object> |
InferenceToolImpl.queryVariable(CycVariable variable,
FormulaSentence query,
CycObject mt,
com.cyc.query.parameters.InferenceParameters queryProperties,
long timeoutMsecs) |
CycArrayList<Object> |
InferenceToolImpl.queryVariables(CycList<CycVariable> variables,
FormulaSentence query,
CycObject mt,
com.cyc.query.parameters.InferenceParameters queryProperties) |
CycArrayList |
InferenceToolImpl.queryVariables(CycList<CycVariable> queryVariables,
FormulaSentence query,
CycObject mt,
com.cyc.query.parameters.InferenceParameters queryProperties,
String inferenceProblemStoreName) |
void |
UnassertToolImpl.unassertGaf(FormulaSentence gaf,
CycObject mt)
Unasserts the given ground atomic formula (gaf) in the specified microtheory MT.
|
void |
UnassertToolImpl.unassertGaf(FormulaSentence gaf,
CycObject mt,
boolean bookkeeping,
boolean transcript)
Unasserts the given ground atomic formula (gaf) in the specified
microtheory MT.
|
| Modifier and Type | Method and Description |
|---|---|
static FormulaSentence |
SentenceImpl.convertKBObjectArrayToCycFormulaSentence(Object... args)
Build a FormulaSentence from the given KBObjects arguments
args . |
FormulaSentence |
KbCollectionImpl.toSentence()
This not part of the public, supported KB API
|
| Modifier and Type | Method and Description |
|---|---|
String |
KbContentLogger.getAssertionLogMarker(FormulaSentence assertSentence,
ElMt mt) |
void |
KbContentLogger.logAssertAttempt(FormulaSentence assertSentence,
ElMt mt,
com.cyc.kb.Assertion.Strength strength,
com.cyc.kb.Assertion.Direction direction) |
void |
KbContentLogger.logAssertResult(FormulaSentence assertSentence,
ElMt mt,
com.cyc.kb.Assertion.Strength strength,
com.cyc.kb.Assertion.Direction direction,
CycAssertion result) |
| Constructor and Description |
|---|
SentenceImpl(FormulaSentence cycObject)
Return a new
Sentence based on the existing FormulaSentence
cycObject . |
Copyright © 2013–2018 Cycorp, Inc. All rights reserved.


| switch_lang {rlang} | R Documentation |
switch_lang()
dispatches clauses based on the subtype of call, as
determined by lang_type_of()
. The subtypes are based on the type
of call head (see details).
switch_lang(.x, ...) coerce_lang(.x, .to, ...) lang_type_of(x)
.x, x |
A language object (a call). If a formula quote, the RHS is extracted first. |
... |
Named clauses. The names should be types as returned by
|
.to |
This is useful when you switchpatch within a coercing
function. If supplied, this should be a string indicating the
target type. A catch-all clause is then added to signal an error
stating the conversion failure. This type is prettified unless
|
Calls (objects of type language
) do not necessarily call a named
function. They can also call an anonymous function or the result of
some other expression. The language subtypes are organised around
the kind of object being called:
For regular calls to named function, switch_lang()
returns
"named".
Sometimes the function being called is the result of another
function call, e.g. foo()()
, or the result of another
subsetting call, e.g. foo$bar()
or foo@bar()
. In this case,
the call head is not a symbol, it is another call (e.g. to the
infix functions $
or @
). The call subtype is said to be
"recursive".
A special subset of recursive calls are namespaced calls like
foo::bar()
. switch_lang()
returns "namespaced" for these
calls. It is generally a good idea if your function treats
bar()
and foo::bar()
similarly.
Finally, it is possible to have a literal (see is_expression()
for a
definition of literals) as call head. In most cases, this will be
a function inlined in the call (this is sometimes an expedient
way of dealing with scoping issues). For calls with a literal
node head, switch_lang()
returns "inlined". Note that if a call
head contains a literal that is not function, something went
wrong and using that object will probably make R crash.
switch_lang()
issues an error in this case.
The reason we use the term node head is because calls are structured as tree objects. This makes sense because the best representation for language code is a tree whose hierarchy is determined by the order of operations. See node for more on this.
All these functions are in the questioning stage and likely to be removed from the package.
# Named calls: lang_type_of(~foo()) # Recursive calls: lang_type_of(~foo$bar()) lang_type_of(~foo()()) # Namespaced calls: lang_type_of(~base::list()) # For an inlined call, let's inline a function in the head node: call <- quote(foo(letters)) call[[1]] <- base::toupper call lang_type_of(call)


Rapid overview¶
Import the modules¶
import os
%matplotlib inline
%load_ext autoreload
%autoreload 2
from pdsimage.Structure import *
from pdsimage.PDS_Extractor import *
imagep = '/Users/thorey/Documents/repos/pdsimage/docs/source/_static'
Loading part of an image¶
Lola PDS Images can be found here and WAC images can be found here.
Let’s say we want to load a window defined at the bottom left by (lon0,lat0) and at the upper right by (lon1,lat1) on the 128 ppd (pixel/degree) LOLA image.
lon0,lon1,lat0,lat1 = 0,20,-10,10
img = BinaryTable('LDEM_16')
X, Y, Z = img.extract_grid(lon0,lon1,lat0,lat1)
PDS FILES used are in: /Users/thorey/Documents/repos/pdsimage/pdsimage/PDS_FILE
which returns an array of longitudes (X), an array of latitudes (Y) and the grid of altitude are contained in Z. No more. For a window 10° by 10°, it runs in less than 2s on my mac book pro.
Looking at impact crater ?¶
Let’s say, we want to get some detail about the crater Copernicus.
Copernicus = Crater('name','Copernicus')
Copernicus.ppdlola = 64
Copernicus.ppdwac = 64
Copernicus.overlay(True,name=os.path.join(imagep,'Corpernicus2.png'))
No overlap - Processing should be quick
PDS FILES used are in: /Users/thorey/Documents/repos/pdsimage/pdsimage/PDS_FILE
No overlap - Processing should be quick
PDS FILES used are in: /Users/thorey/Documents/repos/pdsimage/pdsimage/PDS_FILE
let you with this nice beautiful plot which overlay a WAC image and a LOLA image. Pixel/degree are pretty high by default.
For a specific location, the program is able to automatically detect the corresponding patch images at the lunar surface and proposed to download it for you. Be careful with large resolution though, downloads can be very long.
The default window in centered on the crater with a radius equal to the 80% of the crater diameter. However this can easily be changed and for instance, zooming in resume to
Copernicus.change_window(0.4*Copernicus.diameter)
Copernicus.overlay(True,os.path.join(imagep,'CorpernicusZoom2.png'))
No overlap - Processing should be quick
PDS FILES used are in: /Users/thorey/Documents/repos/pdsimage/pdsimage/PDS_FILE
No overlap - Processing should be quick
PDS FILES used are in: /Users/thorey/Documents/repos/pdsimage/pdsimage/PDS_FILE
If you prefer working with the array directly, use the method Get_Arrays...
Xl , Yl , Zl = Copernicus.get_arrays('Lola')
Xw , Yw , Zw = Copernicus.get_arrays('Wac')
No overlap - Processing should be quick
PDS FILES used are in: /Users/thorey/Documents/repos/pdsimage/pdsimage/PDS_FILE
No overlap - Processing should be quick
PDS FILES used are in: /Users/thorey/Documents/repos/pdsimage/pdsimage/PDS_FILE
They can then be used for further analysis, histograms of the topography...
Topographic profiles¶
The Structure class also contained a method which let your draw topographic profiles (or WAC profile if you want) without effort. For instance, if we look at an intrusive dome called ‘M13’ within the lunar maria and we want to plot three topographic profile - one vertical passing through the centre - one horizontal passing through the centre - one oblique
M13 = Dome('name','M13')
M13.change_window(.9*M13.diameter)
M13.ppdlola = 64
midlon = (M13.window[0]+M13.window[1])/2.0
midlat = (M13.window[2]+M13.window[3])/2.0
profile1 = (midlon,midlon,11.1,12.5)
profile2 = (M13.window[0]+0.2,M13.window[1]-0.2,midlat,midlat)
profile3 = (360-32.1,360-31.3,11.1,12.5)
save_figure = os.path.join(imagep,'BaseProfile.png')
M13.draw_profile((profile1,profile2,profile3), save = True ,name = save_figure)
No overlap - Processing should be quick
PDS FILES used are in: /Users/thorey/Documents/repos/pdsimage/pdsimage/PDS_FILE
(328.47000000000003,<PHONE_NUMBER>0000003, 11.1, 12.5)
No overlap - Processing should be quick
PDS FILES used are in: /Users/thorey/Documents/repos/pdsimage/pdsimage/PDS_FILE
No overlap - Processing should be quick
PDS FILES used are in: /Users/thorey/Documents/repos/pdsimage/pdsimage/PDS_FILE
(327.55882087492716,<PHONE_NUMBER>2507289, 11.68213679250616, 11.68213679250616)
No overlap - Processing should be quick
PDS FILES used are in: /Users/thorey/Documents/repos/pdsimage/pdsimage/PDS_FILE
No overlap - Processing should be quick
PDS FILES used are in: /Users/thorey/Documents/repos/pdsimage/pdsimage/PDS_FILE
(327.9, 328.7, 11.1, 12.5)
No overlap - Processing should be quick
PDS FILES used are in: /Users/thorey/Documents/repos/pdsimage/pdsimage/PDS_FILE


workernode¶
- pilot.util.workernode.check_hz()[source]¶
Try to read the SC_CLK_TCK and write it to the log.
- Returns
- pilot.util.workernode.collect_workernode_info(path=None)[source]¶
Collect node information (cpu, memory and disk space). The disk space (in MB) is return for the disk in the given path.
- Parameters
path – path to disk (string).
- Returns
memory (float), cpu (float), disk space (float).
- pilot.util.workernode.get_condor_node_name(nodename)[source]¶
On a condor system, add the SlotID to the nodename
- Parameters
nodename –
- Returns
- pilot.util.workernode.get_cpu_model()[source]¶
Get cpu model and cache size from /proc/cpuinfo.
- Example.
model name : Intel(R) Xeon(TM) CPU 2.40GHz cache size : 512 KB
gives the return string “Intel(R) Xeon(TM) CPU 2.40GHz 512 KB”.
- Returns
cpu model (string).
- pilot.util.workernode.get_cpuinfo()[source]¶
Return the CPU frequency (in MHz).
- Returns
cpu (float).
- pilot.util.workernode.get_disk_space(queuedata)[source]¶
Get the disk space from the queuedata that should be available for running the job; either what is actually locally available or the allowed size determined by the site (value from queuedata). This value is only to be used internally by the job dispatcher.
- Parameters
queuedata – infosys object.
- Returns
disk space that should be available for running the job (int).
- pilot.util.workernode.get_local_disk_space(path)[source]¶
Return remaning disk space for the disk in the given path. Unit is MB.
- Parameters
path – path to disk (string). Can be None, if call to collect_workernode_info() doesn’t specify it.
- Returns
disk space (float).