Purdue IEEE
Purdue IEEE is a student branch of the Institute of Electrical and Electronics Engineers. IEEE is one of the largest professional organizations in the world, with 423,000 members in 160 countries.
IEEE's core purpose is to foster technological innovation and excellence for the benefit of humanity. Here at Purdue, we are dedicated to technical and professional development in line with this purpose.
Our multidisciplinary committees do everything from building robots and programming AI to community engagement and learning workshops. No matter your major, we have something for everyone!
Our Committees
Computer Society
The IEEE Computer Society focuses on projects and other events to explore the world of modern Computing. Members will gain valuable skills through both hardware and software projects to help them succeed in any field while meeting other passionate Purdue students to learn with.
Learn MoreEMBS
EMBS endeavors to use our knowledge in everything from Computer Science to Mechanical engineering in order to solve current problems in the medical field. EMBS can provide wonderful opportunities to advance your abilities, make new friends, and make lives a little better along the way.
Learn MoreMTT-S
MTT-S's mission is to explore microwave technology through events that highlight the background and applications of high-frequency technology. Through seminars and demonstrations, the members of MTT-S support Purdue University’s groundbreaking research in radio frequency and microwave engineering.
Learn MoreAerial Robotics
The Purdue Aerial Robotics Team (PART) is composed of 30+ undergraduate students in 3 sub-teams: Aeromechanical, Electrical, and Software. We provide a small-team environment allowing you to work hands-on to develop an unmanned aircraft for the annual AUVSI-SUAS international student competition.
Learn MoreROV
Remotely Operated underwater Vehicle (ROV) designs and constructs an ROV to compete in the Marine Advanced Technology Education (MATE) ROV Competition each year. They are looking for members to model and machine, design and populate circuit boards, develop the control software and computer vision algorithms.
Learn MoreSoftware Saturdays
Software Saturdays is committed to teaching Purdue students modern and industry-focused topics. Anyone can attend and all attendees can earn an official Purdue College of Engineering certification. Software Saturdays is currently teaching Web Development, with everyone completing a final project!
Learn More


Comments
-
Greg Hurrell
Ok, I've just uploaded a preview build which will hopefully allow us to diagnose and fix this problem.
As I've commented elsewhere (on the forums, for example) I can't reproduce this issue here locally. Cover art works fine for me using iTunes 7.6.2. But other users report that it works perfectly under 7.6 but is broken under 7.6.1 and 7.6.2. Some other third-party software that talks to iTunes is broken with 7.6.1/7.6.2, and some third-party software works with 7.6.1/7.6.2. As far as Synergy goes, both the 3.2 stable series and the experimental 3.5 alpha series behave identically.
Given that I can't reproduce the problem here I can only deduce from the available information that this is a timing issue. It appears that iTunes is emitting a "track changed" notification, Synergy asks iTunes for the art, and iTunes gives an error. According to users who are seeing the problem, if they force the Floater to reappear later (for example, by pausing and then resuming playback) then iTunes does supply the artwork.
So I can only guess that this is a timing bug in iTunes. If you ask for art "too soon" then it will give you an error. This might explain why some users see the issue and others don't, and also why some third-party software sees the issue and other third-party software doesn't: it looks like it depends on how fast you ask for he art.
So, the new build is up at:
http://wincent.com/a/products/synergy-classic/download/Synergy3.5a6+(562f484+).zip
As you can see, this is based ont he 3.5 series, which means you can only help me test this out if you're running Leopard. If we can get a fix worked out I will also backport it to the 3.2 series.
The new build is not a full package. It is just the Synergy faceless background application responsible for displaying the menu bar controls, the floater etc. To test it, do the following:
- Unzip the archive
- Stop any running versions of Synergy
- Double-click the Synergy.app that you extracted from the zip
- Try skipping tracks and see if art shows up: it would be useful if you can try various things like skipping from within iTunes, skipping within Synergy (using hot keys or the menu bar controls, for instance), and doing things like pausing, waiting, and resuming playback
The key difference in the new build is that it has a new advanced preference setting that you can use to explore the effect of delaying the querying for album art. By default there is a 0 second delay (no delay), but you can try different values between 0 and 3 seconds using the following commandline:
defaults write org.wincent.Synergy CoverArtDelay -float 2.5
That would set the delay to 2.5 seconds. So the idea would be to try different values:
- Quit Synergy
- Set a new delay
- Start Synergy again
- Test behaviour with the new setting
Hopefully in this way we can determine if my theory is correct, and if it is correct, we can identify what the minimum delay is necessary to workaround the bug in iTunes. Obviously, I am hoping that the value won't be too large as we don't want the delay to be perceptible to the user. In any case I'll make sure that the delay is only imposed when running with a buggy version of iTunes. People running 7.6 or any other version which isn't affected won't suffer the delay.
So thanks for your help in working through this. Once it's all sorted out I'll be putting together an official release that includes the fix.
-
Fuga
No good here. Besides no art I have crashes within a few minutes (also had before, with other versions of the standalone app). I went to the trouble of uninstalling all my unsanity haxies. Booted in Safe Mode and then logged in with no startup items loading. Also dis all this with a fresh user. No art. Crashes. Will try another Leopard Intel machine tomorrow.
2.16 GHz Core 2 Duo MacBook 2 GB RAM OS X 10.5.2
Want the crash logs?
-
anonymous
doesn't work that way. i've bought this software for the cover art display, where can i send my demand for refund ? thanks.
-
Liz
Just tried the new build just posted, and does not seem to grab the artwork at all including at the 3.0 second mark.
-
pbryanw
Hi, I have tried with settings of 1.0, 2.0, 5.0 and 10.0 (closing and restarting Synergy each time I changed the value) all with no luck. This is with the new build.
-
Greg Hurrell
Darn, so it's not a timing issue like I was hoping after all.
Fuga, Liz, and pbryanw, can I get you to send me copies of your Synergy preferences files and also System Profiler reports to<EMAIL_ADDRESS>We have to find out why this works for me but not for you.
The preference file is found at:
~/Library/Preferences/org.wincent.Synergy.plist
And to get a System Profiler report you can go to the Apple menu, click "About this Mac", and then click the "More information" button in the About window that appears. The saved report will be probably be quite large, so you might want to zip it before mailing it over.
To the anonymous commenter about requesting a refund, you can contact me at the same email address. I hope you'll take into consideration that this is an Apple bug in iTunes, that it is in your power to get full cover art functionality by installing the last non-buggy version of iTunes (7.6), and that I am actively working on solving the problem.
Fuga, about the crash logs. I believe they're not related to this issue at all and you're probably seeing the NSAppleScript crashes that are being tracked in bug #640. Also an Apple bug, incidentally, as detailed in that ticket. Believe me, I am pretty annoyed about these two high-profile issues both being Apple's fault, and having a high impact on my users.
-
Fuga
Yes, after writing I remembered the other issue re: crashing.
I will send two pref files, one for the older preference pane version and one for the latest standalone build. I do so because I can't get art from either version.
And as for my saying elsewhere that GimmeSomeTune was fine, well, that is only partly so. There is something about iTunes 7.6.x that causes a split second delay/audio gap. It's gotten better with the latest iTunes but still rears up. The fix noted in the link makes it a bit better but there is something amiss. Could be similar? Could it be all the way down to the ACLs which has caused so much trouble in the cloning community?
GimmeSomeTune "timing" issue http://tinyurl.com/6qpgzl
Somewhat of a fix on Remote Buddy's site http://tinyurl.com/4j5drc
SuperDuper! ACLs fixed http://shirtpocket.com/blog/
-
Greg Hurrell
Ok, here's a new test build. This one drops the "delay" trick and instead prints a bunch of diagnostic information to the console, which you can observe using
Applications/Utilities/Console.app
.http://wincent.com/a/products/synergy-classic/download/Synergy3.5a6+(009baa7+).zip
This is some sample output on my machine for a track which does have cover art in iTunes:
2008-04-28 22:12:18.788 Synergy[71327:10b] preparing to request cover art 2008-04-28 22:12:18.790 Synergy[71327:10b] did prepare (script id is 20727360) 2008-04-28 22:12:18.867 Synergy[71327:10b] did request art (descriptor is 21551360) 2008-04-28 22:12:18.868 Synergy[71327:10b] error info: (null) 2008-04-28 22:12:18.869 Synergy[71327:10b] got cover art data 21548240 2008-04-28 22:12:18.973 Synergy[71327:10b] got TIFF representation (21525280) 2008-04-28 22:12:19.004 Synergy[71327:10b] got rep (21513936) 2008-04-28 22:12:19.028 Synergy[71327:10b] got JPEG data (23523600) 2008-04-28 22:12:19.030 Synergy[71327:10b] notifying floater
And for comparison, this is a track which doesn't have art:
2008-04-28 22:12:41.220 Synergy[71327:10b] preparing to request cover art 2008-04-28 22:12:41.224 Synergy[71327:10b] did prepare (script id is 23447520) 2008-04-28 22:12:41.256 Synergy[71327:10b] did request art (descriptor is 21976576) 2008-04-28 22:12:41.257 Synergy[71327:10b] error info: (null) 2008-04-28 22:12:41.257 Synergy[71327:10b] didn't get desired cover descriptor (21976576)
As you can see in both cases the "error info" is listed as being "null". In the case where iTunes actually does have art, you can see Synergy getting the TIFF representation, the JPEG representation, and notifying the Floater. In the case where iTunes doesn't have art that process gets short-circuited.
I'm very interested to see the output on a machine which is seeing the problem, and any other interesting console output that might be being emitted (by Synergy or iTunes itself). I am hoping there'll be some kind of clue as to what's going wrong, perhaps in the error info output.
-
Greg Hurrell
Thanks for the links, Fuga.
I don't know whether the other products you link to are suffering from the exact same problem or whether those are different bugs which just add more evidence that iTunes 7.6.1 and 7.6.2 have quite a few bugs in them. I personally doubt that the underlying cause is anything to do with ACLs, but you never know. I'm hoping the new build I just posted will help to shed some light.
As for the thing about the pref files for the two versions: yes, it is fully expected that this issue will show up in 3.2 and 3.5 because the cause is iTunes, not Synergy. I think you could go back all the way to Synergy 0.9.9 (from 6 May 2003, the first version to query iTunes for artwork) and you'd still see the problem.
I'm just hoping that: (a) we can find a workaround, and (b) Apple fixes the bugs in the next iTunes release.
-
Fuga
no pref files other than ~/Library/Preferences/org.wincent.install.plist
not in my user directory nor the test user's
-
Fuga
Below is what I get for every tune. BTW, all my files have art embedded. Other than the NSAppleScript stuff, it's similare to what you get. In yours there is more info for descriptor.
4/28/08 3:42:10 PM Synergy[1991] preparing to request cover art 4/28/08 3:42:10 PM Synergy[1991] did prepare (script id is 17591536) 4/28/08 3:42:10 PM Synergy[1991] did request art (descriptor is 0) 4/28/08 3:42:10 PM Synergy[1991] error info: { NSAppleScriptErrorBriefMessage = "Can\U2019t make \"7.6.2\" into type integer."; NSAppleScriptErrorMessage = "Can\U2019t make \"7.6.2\" into type integer."; NSAppleScriptErrorNumber = -1700; NSAppleScriptErrorRange = NSRange: {0, 0}; } 4/28/08 3:42:10 PM Synergy[1991] didn't get desired cover descriptor (0)
-
Fuga
Whoa, that pasted weirdly. Everything from 4/28/08 to the end was actually one paste from the Console.
-
Greg Hurrell
Fixed up the formatting for you (any line starting with a space is treated as a "pre" block).
Ok, well that's good to see that there actually is some kind of error information in there. Not sure what to make of it but at least it's something.
Can you try something else for me? In
/Applications/AppleScript/Script Editor.app
, try pasting in this sample script and running it:tell application "iTunes" if version as integer is greater than or equal to 4 then if data of the artworks of the current track exists then return data of artwork 1 of current track as picture else return "no artwork" end if end if end tell
Looks like it is choking on the "version" thing. If that's the case then even this little script should be enough to make it choke:
tell application "iTunes" to get version as integer
Now try this different version:
tell application "iTunes" if data of the artworks of the current track exists then return data of artwork 1 of current track as picture else return "no artwork" end if end tell
My wild guess is that this is working for me because I'm running Mac OS X in Spanish, and there must be something different about its
Info.plist
file. -
Fuga
For the first two I get AppleScript Error Can’t make "7.6.2" into type integer.
For third it runs but doesn't really do anything except formatting gets pretty and "no artwork" does indeed appear in the bottom pane.
-
pbryanw
28/04/2008 22:29:08 Synergy[312] preparing to request cover art 28/04/2008 22:29:08 Synergy[312] did prepare (script id is 17276176) 28/04/2008 22:29:08 Synergy[312] did request art (descriptor is 0) 28/04/2008 22:29:08 Synergy[312] error info: { NSAppleScriptErrorBriefMessage = "Can\U2019t make \"7.6.2\" into type integer."; NSAppleScriptErrorMessage = "Can\U2019t make \"7.6.2\" into type integer."; NSAppleScriptErrorNumber = -1700; NSAppleScriptErrorRange = NSRange: {0, 0}; } 28/04/2008 22:29:08 Synergy[312] didn't get desired cover descriptor (0)
With the new test build I get the same as Fuga.
-
pbryanw
After trying the Applescript in script editor, I get the same results as Fuga, for the first two tests but for the third one, I got a load of data. Here are the first few lines:
«data PICTBC9E0000000002580253001102FF0C00FFFE000000480000004800<PHONE_NUMBER>0258025300000000001F800080008000001E0001000A000000000258025 382000004BBD600000001000000000000000000000000000000010000000000000000<PHONE_NUMBER>00400000000000000000000000
-
Fuga
So what's the differences in our setups. I am now sending my SystemProfile to Wincent.
-
Greg Hurrell
Ok, just uploaded a new build. No delay or logging this time, just removing the iTunes version check. We'll see if this fixes it.
http://wincent.com/a/products/synergy-classic/download/Synergy3.5a6+(68172bf+).zip
-
pbryanw
Yes, it's working - artwork from iTunes is showing!!! Big thanks. No preferences though but I can still use 3.2 for that.
-
Fuga
HOT DAMN!
Yep, so far so good. More, No crashing.
-
Fuga
Are you saying settings from the older preference pane version will be sucked up by this standalone one?
-
pbryanw
It does for me. When I use preferences from the (just posted) beta, I get a finder window. But, if I set prefs in 3.2 from the preference pane, the settings work in synergy.app
-
Greg Hurrell
Ok, good to hear.
About the crashing (or not crashing), I can assure you that it's really a completely separate issue. It's a known bug in Leopard's NSAppleScript running under Garbage Collection. It's effectively random, and sooner or later it will crash... until Apple fixes the bug. I've been pretty lucky with this and I only see a crash every few days, but I know others see them all the time: luck of the draw, it would seem.
I'm going to put together a couple of new releases which incorporate this fix for the artwork issue:
- 3.5a7: a new build of the alpha series, which will still unfortunately suffer from Apple's NSAppleScript bug.
- 3.2.1: a new build of the stable 3.2 series, which won't be affected by the NSAppleScript issue (never has been, never will be) because it doesn't use Leopard's Garbage Collection.
I'll try to get those out tomorrow.
Thanks to you both for your patient collaboration. Without your help I wouldn't have been able to identify the cause of the problem nor the workaround.
-
Greg Hurrell
That's correct. You can set the preferences using another version of the app, and they'll be picked up by the new one. That's because we're talking about the same preferences file (
~/Library/Preferences/org.wincent.Synergy.plist
), so if you write to the prefs with 3.2 (or one of the other 3.5 releases), the preview build that I just posted will read the file and pick them up. -
pbryanw
Also, a big thanks to you Wincent - you've offered great support. I look forward to the new versions. Time for bed :)
-
Fuga
Yes, thank you, Wincent. Synergy has always been the class of the these types apps I have already pitched GimmeSomeTune.
As for the crashes, so weird. Before, I could make it crash within 30-45 seconds. Still, not a worry as I'll have the Preference Pane.
Take care.
-
Greg Hurrell
Marking this as CLOSED. The new releases are now out:
http://rails.wincent.com/blog/synergy-3.2.1b-and-3.5a7-now-available
-
anonymous
im trying to download 7.6.2 and it keeps saying theres an error
-
Greg Hurrell
What is the error? And what is it that's saying it? Safari? Mac OS X? Have you tried using a different browser?
In any case, iTunes 7.6.2 should come through the normal software update mechanism, so that's another way of getting it.
-
anonymous
It does not work. Too much problems to start with it.
Add a comment
Comments are now closed for this issue.


How to insert an image:
The <img> tag defines an image in an HTML page.
The <img> tag has two required attributes: src and alt.
Note: Images are not technically inserted into an HTML page, images are linked to HTML pages. The <img> tag creates a holding space for the referenced image.
Tip: To link an image to another document, simply nest the <img> tag inside <a> tags.
| Attribute | Value | Description |
|---|---|---|
| align | top bottom middle left right |
Not supported in HTML5. Specifies the alignment of an image according to surrounding elements |
| alt | text | Specifies an alternate text for an image |
| border | pixels | Not supported in HTML5. Specifies the width of the border around an image |
| crossorigin | anonymous use-credentials |
Allow images from third-party sites that allow cross-origin access to be used with canvas |
| height | pixels | Specifies the height of an image |
| hsmap | pixels | Not supported in HTML5. Specifies the whitespace on left and right side of an image |
| ismap | ismap | Specifies an image as a server-side image-map |
| longdesc | URL | Specifies a URL to a detailed description of an image |
| sizes | Specifies image sizes for different page layouts | |
| src | URL | Specifies the URL of an image |
| srcset | URL | Specifies the URL of the image to use in different situations |
| usemap | #mapname | Specifies an image as a client-side image-map |
| vspace | pixels | Not supported in HTML5. Specifies the whitespace on top and bottom of an image |
| width | pixels | Specifies the width of an image |


Home
Info
About
Pricing & Packages
Work
Weddings
Portraits
Contact
Blog
Home
Info +
About
Pricing & Packages
Work +
Weddings
Portraits
Contact
Blog
Erica Kait
Creative
Erica Kait
Creative
Blog
Gerigscott Family
Portland, OR
Family Session
Walls Family
Champoeg State Park, OR
Family Session
Minty Family
Seattle, WA
Family Session
Bonnie + Chase
Crozet, VA
Wedding
John + Ally
Bend, OR
Wedding
Sean + KaiLee
Carlton, OR
Wedding
Miriam + Mark
Woorburn, OR
Wedding
Emily + Carson
La Center, WA
Wedding
Heather + Dylan
Independence, OR
Wedding
Allison + Eric
Bend, OR
Engagement Session
Stump Family
Camas, WA
Family Session
HarleyAnn + Matt
Columbia River Gorge
Engagement Session
1
2


xcodeproj is a library written in Swift for parsing and working with Xcode projects. It’s heavily inspired in CocoaPods Xcodeproj and xcode.
Motivation 💅
Being able to write command line scripts in Swift to update your Xcode projects configuration. Here you have some examples:
- Add new
Build phases
. - Update the project
Build Settings
. - Create new
Schemes
.
Contribute 👨👩👧
- Git clone the repository
git@github.com:carambalabs/xcodeproj.git
. - Open
xcodeproj.xcodeproj
Setup 🦋
Using Swift Package Manager
Add the dependency in your Package.swift
file:
let package = Package(
name: "myproject",
dependencies: [
.Package(url: "https://github.com/carambalabs/xcodeproj.git", majorVersion: 0, minor: 0)
]
)
Using Marathon
Edit your Marathonfile
and specify the dependency in there:
https://github.com/carambalabs/xcodeproj.git
How to 🐒
Read
You can read the Xcode project files as shown in the examples below:
// Read a project
let project = try! XcodeProj(path: "myproject.xcodeproj")
let pbxproj = project.pbxproj
let buildFiles = pbxproj.objects.buildFiles
let buildConfigurations = pbxproj.objects.buildConfigurations
// Read a workspace
let workspace = try! XCWorkspace(path: "myworkspace.workspace")
let projects = workspace.data.references.map { $0.project }
// Read a config file
let xcconfig = try! XCConfig(path: "MyConfig.xcconfig")
let buildDir = xcconfig.buildSettings("CONFIGURATION_BUILD_DIR")
Write
All models above are also writable. After modifying them you can write them back to disk:
pbxproj.write(override: true)
xcconfig.write(override: true)
Documentation 📄
You can check out the documentation on the following link. The documentation is automatically generated in every release by using Jazzy from Realm.
References 📚
- PathKit
- Xcode Project File Format
- A brief look at the Xcode project format
- pbexplorer
- pbxproj identifiers
- mob-pbxproj
- Xcodeproj
- Nanaimo
- Facebook Buck
- Swift Package Manager - Xcodeproj
About
This project is funded and maintained by Caramba. We 💛 open source software!
Check out our other open source projects, read our blog or say :wave: on twitter @carambalabs.
Contribute
Contributions are welcome :metal: We encourage developers like you to help us improve the projects we’ve shared with the community. Please see the Contributing Guide and the Code of Conduct.
License
MIT License
Copyright (c) 2017 Caramba
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
 IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.


Tap to add store location
{{ pair.geoList.storeName }}
{{ pair.geoList.address }}
{{ pair.completeTasks }} completed tasks | {{ pair.incompleteTasks }} incomplete tasks


---
layout: post
title: Memories
date: '2013-03-08T13:09:00.001-07:00'
author: April
tags:
modified_time: '2013-03-08T13:09:58.550-07:00'
thumb: https://lh4.googleusercontent.com/-dV_z0n7ypKk/UTpFlM990EI/AAAAAAAAaHE/kxq_5rwLbMs/s72-c/blogger-image--1052926105.jpg
blogger_id: tag:blogger.com,1999:blog-6400085873105072120.post-2881117499747936912
blogger_orig_url: http://www.svlark.com/2013/03/memories.html
---
I helped my dad rip out our kitchen floor this morning. It brought back lots of good memories of helping my dad on job-sites as a kid.


LVMH puts ring on jeweller Tiffany in US$16.2 billion union
PARIS: LVMH and US jewellers Tiffany announced Monday (Nov 25) a US$16.2 billion tie-up that is the French luxury group's biggest-ever acquisition and will bolster its presence in the United States.
The companies said in a statement they "have entered into a definitive agreement whereby LVMH will acquire Tiffany for US$135 per share in cash, in a transaction with an equity value of approximately 14.7 billion euros or US$16.2 billion".
The deal adds Tiffany to LVMH's extensive stable of luxury brands that include Louis Vuitton, Dior and Moet & Chandon and will strengthen its position in the jewellery sector.
"We are delighted to have the opportunity to welcome Tiffany, a company with an unparalleled heritage and unique position in the global jewelry world, to the LVMH family," said the group's chief executive, Bernard Arnault.
Such a deal has been seen as way ahead for Tiffany, which has trailed rivals in terms of sales growth in recent years.
"Following a strategic review that included a thoughtful internal process and expert external advice, the Board has concluded that this transaction with LVMH provides an exciting path forward ..." said Tiffany's board chairman, Roger Farah.
Tiffany, founded in 1837 and headquartered on glamorous 5th Avenue in New York next to Trump Tower, is the most iconic of US luxury brands, an image reflected in the "Breakfast at Tiffany's" novella by Truman Capote, made into a film with Audrey Hepburn in 1961.
The addition of Tiffany to LVMH's jewelry holdings that already includes Bulgari, Chaumet, Tag Heuer and Hublot will help it in its rivalry with Swiss-based Richemont, which holds Cartier among other brands, as well as lift LVMH's stature in the important American market.


Plug v1.4.3 Plug.Conn.Query View Source
Conveniences for decoding and encoding url encoded queries.
Plug allows a developer to build query strings that map to Elixir structures in order to make manipulation of such structures easier on the server side. Here are some examples:
iex> decode("foo=bar")["foo"]
"bar"
If a value is given more than once, the last value takes precedence:
iex> decode("foo=bar&foo=baz")["foo"]
"baz"
Nested structures can be created via [key]
:
iex> decode("foo[bar]=baz")["foo"]["bar"]
"baz"
Lists are created with []
:
iex> decode("foo[]=bar&foo[]=baz")["foo"]
["bar", "baz"]
Maps can be encoded:
iex> encode(%{foo: "bar", baz: "bat"})
"baz=bat&foo=bar"
Encoding keyword lists preserves the order of the fields:
iex> encode([foo: "bar", baz: "bat"])
"foo=bar&baz=bat"
When encoding keyword lists with duplicate keys, the key that comes first takes precedence:
iex> encode([foo: "bar", foo: "bat"])
"foo=bar"
Encoding named lists:
iex> encode(%{foo: ["bar", "baz"]})
"foo[]=bar&foo[]=baz"
Encoding nested structures:
iex> encode(%{foo: %{bar: "baz"}})
"foo[bar]=baz"
Link to this section Summary
Functions
Decodes the given binary
Decodes the given tuple and stores it in the accumulator. It parses the key and stores the value into the current accumulator
Encodes the given map or list of tuples
Link to this section Functions
Decodes the given binary.
Decodes the given tuple and stores it in the accumulator. It parses the key and stores the value into the current accumulator.
Parameter lists are added to the accumulator in reverse order, so be sure to pass the parameters in reverse order.
Encodes the given map or list of tuples.


{% extends 'my_places/base.html' %} {% include 'my_places/navbar.html'%} {% block content %}
Taken at: {{image.location}}
Uploaded on: {{image.pub_date}}


My Favorite Things
These are a few of my favorite things.
People
Here are some of my favorite people!
My brother Christopher
My mom and dad:
Steve
Carol


Experience:
- Safran Helicopter Engines
- Avalara
- Boeing
- URS
- Aviation Technical Services
Education:
- Code Fellows
- Cascadia College
- ITT Technical Institute
Favorite Books/Series:
- Ender's Game
- Game of Thrones (A Song of Fire and Ice series)
- The Stormlight Archive (series)
- Ready Player One
- Dune
- The Night Angel Trilogy
- The Wheel of Time (series)
- Armor
- A Stranger in a Strange Land
- Lensman (series)


Rocket
1st engine |
kgNumber |
1st stage Fuel & Cycle |
|
2nd engine |
kgNumber |
2nd stage Fuel & Cycle |
|
3rd stage Fuel & Cycle |
|
Stages |
|
Thrust-to-weight ratio |
|
Lift-off mass |
kg |
Rocket mass (Lift off excluding Payload and Fairing) |
kg |
Max Rocket Body Diameter |
m |
Fairing mass |
kg |
Fairing jettison velocity |
m/s |
Fairing jettison delta-v |
m/s |
Jettisoned battery mass |
kg |
Assumed payload mass |
kg |
2nd stage to Lift-off mass ratio |
% |
Transfer Orbit stage to Lift-off mass ratio |
% |
| Decrease Payload <-- --> Increase Payload |
Limit to reasonable |
| Set all to Min <-- --> Set all to Max |
Set averages |
1st stage Dry to Wet mass ratio |
|
2nd stage Dry to Wet mass ratio |
|
Transfer Orbit stage Dry to Wet mass ratio |
|
Unused propellant of 1st stage |
|
Unused propellant of 2nd stage |
|
Unused propellant of Transfer Orbit stage |
|
1st stage Isp sea level or at the start altitude |
|
1st stage Isp vacuum |
|
2nd stage Isp |
|
Transfer Orbit stage Isp |
|
Specific Impulse variation |
|


{% extends "article_summaries/base_summary.html" %}
{% block status %}
slow
{% endblock %}
{% block term %}
bradycardia
{% endblock %}
{% block not_healthy %}
shortness of breath and feeling dizzy and fatigue
{% endblock %}
{% block healthy %}
Mostly it's an athlete.
Their heart rate can reach 40 - 60 bpm, which is lower than usual people.
It's normal for athletes, because they've trained for some activity.
{% endblock %}
{% block reference %}
https://myheart.net/articles/low-heart-rate-bradycardia-explained-by-a-heart-doctor/
{% endblock %}


Explore EMBL-EBI and our mission
The European Bioinformatics Institute (EMBL-EBI) makes freely available data from life science experiments, performs basic research in computational biology and offers an extensive user training programme, supporting researchers in academia and industry. More about EMBL-EBI and our impact
Services
To provide freely available data and bioinformatics services to all facets of the scientific community
Research
To contribute to the advancement of biology through basic investigator-driven research
Training
To provide advanced bioinformatics training to scientists at all levels
Industry
To help disseminate cutting-edge technologies to industry
ELIXIR
To support, as an ELIXIR node, the coordination of biological data provision throughout Europe


El Capitan is a 3,000-foot (910 m) vertical rock formation in Yosemite National Park, located on the north side of Yosemite Valley, near its western end. The granite monolith is one of the world's favorite challenges for rock climbers. The formation was named "El Capitan" by the Mariposa Battalion when it explored the valley in 1851.
Tunnel View is a viewpoint on State Route 41 located directly east of the Wawona Tunnel as one enters Yosemite Valley from the south. The view looks east into Yosemite Valley including the southwest face of El Capitan, Half Dome, and Bridalveil Falls. This is, to many, the first views of the popular attractions in Yosemite.


The ZIP that you can find distributed in various places on the internet has these files:
| File | Description |
|---|---|
| CGAMASK.PIC | Missing file! Transparency data for CGAMON.PIC |
| CGAMON.PIC | CGA monster graphics |
| CGAPICS.PIC | CGA tileset graphics |
| DUNGEON.OVR | text file, introduction to the "Dungeon of the Beast" adventure. OVR = overview? |
| DUNGEON.RMS | binary, "Dungeon of the Beast" room data. RMS = rooms? |
| EGAMASKS.PIC | Unused |
| EGAPICS.PIC | EGA tileset graphics |
| EXPLORER.DSC | text file, Instructions screen text accessible from main menu |
| EXPLORER.EXE | 16-bit DOS exeutable, made with Borland technology |
| EXPLORER.ICO | Windows 3.0 icon |
| EXPLORER.TXT | README |
| PYMASK.PIC | Transparency data for PYMON.PIC |
| PYMON.DAT | Monster data |
| PYMON.PIC | EGA monster graphics |
| README.1ST | Smaller README |
| ROCON.DCH | Included save character with equipment, some areas cleared. DCH = Dungeon (of the Beast) CHaracter |
PYMASK.PIC
. It can be downloaded here: https://github.com/footballhead/explorer-utils/blob/master/maskconv/CGAMASK.PIC.Transparency data for CGAMON.PIC
. White pixels are transparent, black pixels are opaque.
CGA monster graphics. Transparency data is stored separately in CGAMASK.PIC
.
CGA tileset graphics. Most tiles are opaque, however some have transparency data stored as separate images in this spritesheet. For example, a chest uses tile 21 for color with tile 64 for transparency.
As best as I can figure out, the last 14 images are garbage. There's no EGAPICS.PIC
equivalent).
36-column, 21-row text file. Single screen. Exceeding this row or column count will override the border and "press any key to continue" text.
Centering must be manually performed by inserting space characters.
A
, B
, etc.) are unknown.Room data, stored in binary as an array of Pascal records:
type RoomData = record A: byte; { unknown, affects entering a building or city } Tiles: array [1..8*20] of byte; Objects: array [1..8*20] of byte; MonsterId: byte; MonsterCount: byte; NorthRoom: byte; EastRoom: byte; SouthRoom: byte; WestRoom: byte; UpRoom: byte; { Destination of stairs up } DownRoom: byte; { Destination of stairs down } RoomId: byte; MonstersStartFrozen: byte; { if 1 then monsters stay put until attacked. if 0 then monsters chase you } TreasureFactor: byte; { Higher means more gold from chests, etc. Except 0, which means chests give 950 gold } OddDesignRoom: byte; Name: string[26]; end;
For an interactive webpage, click here!
The format is different compared to CGA or EGA, but bears similarities to EGA.
We can only speculate what it could have been used for. Could it have been an earlier version of tile masks in EGAPICS.PIC
? Or maybe, since many tiles look like geometric shapes, it could have been used for blending between two tiles?
Here's sorta what it looks like:
EGA tile graphics. Most tiles are opaque, however some have transparency data stored as separate images in this spritesheet. For example, a chest uses tile 21 for color with tile 64 for transparency.
16-bit DOS executable. I recommend IDA Freeware 5.0 for disassembling.
Coded in Borland Turbo Pascal 5.5. Hints:
Expected TPUs: System, Dos, Crt, Graph
Good references:
Transparency data for PYMON.PIC
. Uses EGA storage format, except each channel is identical. Black means opaque, white means transparent.
A
, B
, etc.) are unknown.Monster statistics, encoded in binary as an array of Pascal records:
type PyMonDat = record Name: string[15]; Level: byte; A: byte; Exp: byte; C: byte; E: byte; F: byte; Id: byte; H: byte; I: byte; J: byte; K: byte; L: byte; M: byte; N: byte; O: byte; end;
EGA monster graphics. Transparency masks are stored separately in PYMASK.PIC
.
I'm confused why it's called PYMON
and not EGAMON
. My best guess is that the graphics were going to be reused for the (now missing) "The Dark Pyramid" adventure (as in short for pyramid monsters).


Graduate Student Software Engineer
Hello
My name is Sean Kennedy.
Welcome.
About Me
I am currently a graduate student at UC pursuing a Masters of Science in Computer Science.
My current interests include security, cryptography, data mining and machine learning.
In 2013, I graduated from the University of Cincinnati, summa cum laude, with a bachelor's degree in history. When I began college in 2009, my family encouraged me to get a broad liberal arts education and I was drawn to history as a major because of my interest in the subject. I was afforded the opportunity to go beyond the routine curriculum by researching, writing and presenting a paper as a Charles Phelps Taft Fellow in history. You can find out more about that work in the My Work section of this website. While I enjoyed history and the liberal arts education, I never intended to pursue history beyond college. Instead, I was focusing on applying to graduate programs in atmospheric science. While visiting one of the schools that I expected to apply to, a professor advised me to take a computer science class. During my senior year, I took a yearlong course in Java programming and the fundamentals of computer science, which piqued my interest in the field. Unfortunately, I was not able to take more computer science classes because I was graduating from the university. I began to study programming languages (such as C and C++) and CS concepts on my own. While I believe that it is possible to learn on your own, I value the educational experience that comes from having interactions between fellow students and with professors. That led me to pursue computer science study in a more formal setting at the University of Cincinnati.
I am an avid fisherman and I love the outdoors.  I also have a passion for video games and I enjoy following that industry closely.
My Work
History Works
This is the research paper I completed as the result of my Charles Phelps Taft Fellowship that I presented at the Tenth Annual Queen City Colloquium. It is titled "The Historical Perspectives of Narco-Trafficking and Political Corruption in Mexico".
Software
My Github profile contains some of my recent projects.


In this Bite you have to complete generate_improved_xmas_tree
that takes a rows
arg (= number of rows with leafs). For each row you add a star, leafs and a trunk and center them nicely. This bite is an extension to Bite 119 with additional elements and some twists.
Elements of the tree:
STAR
: Every tree has exactly one star at the top row.LEAF
: Every tree has row_number * 2 - 1
leafs per row.TRUNK
: Every tree has a trunk with a height of 2 and a width which is half of the largest leaf row.However, the trunk should always be nicely centered by having the same number of empty spaces on both sides of the trunk. Therefore, you have to consider the width of the leaf rows and do some conditional rounding :)
The tree with default args should look like this:
+ * *** ***** ******* ********* *********** ************* *************** ***************** ******************* ||||||||||| |||||||||||
Return the finished tree as a multi-line string (use newlines \n
between the lines).
Good luck and keep calm and merry Python Xmas!


Test ServeContent and byte ranges in delivering a video
Your browser does not support the video tag.
this is an example of the
slfsrv
project


|
easy_perception_deployment
|
Public Member Functions | |
| def | __init__ (self, path_to_labellist, _path_to_usecase_config) |
| def | setButtons (self) |
| def | writeToUseCaseConfig (self) |
| def | closeWindow (self) |
| def | addObject (self, index) |
| def | removeObject (self, index) |
Public Attributes | |
| label_list_dropdown | |
| label_list_dropdown_label | |
| selected_list_menu | |
| selected_list_menu_label | |
| finish_button | |
| cancel_button | |
The CountingWindow class is a PySide2 Graphical User Interface (GUI) window that is called by DeployWindow class in order to configure a custom Counting use-case and write to usecase_config.txt.
| def windows.Counting.CountingWindow.__init__ | ( | self, | |
| path_to_labellist, | |||
| _path_to_usecase_config | |||
| ) |
The constructor. Sets the size of the window and configurations for usecase_config. Checks if the usecase_config.txt file exists. If true, configure accordingly. Otherwise, assign default values. Calls setButtons function to populate window with button.
| def windows.Counting.CountingWindow.addObject | ( | self, | |
| index | |||
| ) |
A function that is triggered by the DropDown Menu labelled, Available Objects
| def windows.Counting.CountingWindow.closeWindow | ( | self | ) |
A function that is triggered by the button labelled, Cancel.
| def windows.Counting.CountingWindow.removeObject | ( | self, | |
| index | |||
| ) |
A function that is triggered by the DropDown Menu labelled, Selected Objects
| def windows.Counting.CountingWindow.setButtons | ( | self | ) |
A Mutator function that defines all buttons in CountingWindow.
| def windows.Counting.CountingWindow.writeToUseCaseConfig | ( | self | ) |
A function that is triggered by the button labelled, Finish.


I'm a passionate software engineer with good foundational knowledge and structural thinking.
I prefer solving problems at their core, by identifying and fixing the underlying causes.
My decisions and solutions are made consciously with painstaking research and analysis, even a random decision is statistically random.
I love building things, both hardware and software. I write some tools and scripts to utilize my workspace. I program Arduinos and Raspberry Pis as gadgets for my home, although they are heavily overpriced (e.g. $130 for a digital clock with some add-on features).
I love reading scientific stuff, especially theoretical physics. It helps shape my thinking on many areas.
I'm The. Coolest. Dev.
and also The. Great. Dev.
Measured by the domain name, not by any other means.
😜


| Interface | Description |
|---|---|
| SMTPUtils |
| Class | Description |
|---|---|
| AbstractAsyncDominoAdmin | |
| AbstractAsyncDominoDirectory |
Abstract class for checking Domino Directory access
|
| AclFunctions |
Helper functions to deal with ACL needs
|
| AddSMTPserver |
Creates the SMTPInbound Site on Domino Server
|
| CreateDirectoryAssistance |
Creates a new document in the directory assistance database.
|
| CreateGroup |
Creates a group in a directory
|
| CreateLdapDirectory |
//TODO: Add description
|
| CreateLetsEncryptCertificates |
//TODO: Add description
|
| CreateSamlConfig |
Creates a SAML Configuration in idpconfig.nsf in Domino
|
| CreateUser |
//TODO: Add description
|
| DeleteAclEntry |
Deletes an ACL Entry
|
| DeleteDirectoryAssistance |
Delete a document in the directory assistance database.
|
| DeleteDirectoryInformation |
//TODO: Add description
|
| DeleteGroup |
Deletes a group from a directory
|
| DeleteRole |
Deletes a role from the ACL
|
| DeleteSMTPserver | |
| DeleteTLSCertificates |
//TODO: Add description
|
| DeleteUser |
//TODO: Add description
|
| FetchAclEntries |
Gets ACL Entries and serializes them back to the Observable
|
| FetchRoles |
Gets all roles in a database’s ACL
|
| GetAclEntry |
Gets ACL Entries and serializes them back to the Observable
|
| GetCaList |
//TODO: Add description
|
| GetDirectoryAssistance |
To Read DirectoryAssistance document
|
| GetDirectoryInformation |
//TODO: Add description
|
| GetGroup |
Gets a group document from a Domino Directory
|
| GetGroupByName |
Gets a group by name
|
| GetLdapDirectory |
//TODO: Add description
|
| GetRoleInfo |
Gets all entries that have the given role
|
| GetSMTPserver |
Get the SMTP setting from the Domino Server.
|
| GetUser |
//TODO: Add description
|
| GetUsers |
//TODO: Add description
|
| ReplaceCreateAclEntry |
Creates or updates an ACL Entry and serializes them back to the Observable
|
| ReplaceCreateRole |
Creates or updates a role in an ACL and echoes role name back
|
| TestLdap |
To Test Ldap Server connection
|
| UpdateDirectoryAssistance |
Update a document in the directory assistance database.
|
| UpdateDirectoryInformation |
//TODO: Add description
|
| UpdateDominoDirectory |
//TODO: Add description
|
| UpdateGroup |
Creates a group in a directory
|
| UpdateGroupMembers |
Adds a member to a group
|
| UpdateLdapDirectory |
//TODO: Add description
|
| UpdateRoleHolders |
Creates or updates a role in an ACL and echoes role name back
|
| UpdateSamlConfig |
//TODO: Add description
|
| UpdateSMTPServer | |
| UpdateUser |
//TODO: Add description
|
| UploadUserCertificate |
//TODO: Add description
|


INTRODUCTION
Hello everyone! My name is Ava and i'm 20 and an aries . I have lived in wellington my whole life, born and raised baby! Although, I'm hoping to move overseas in the near future. Lately I’ve been struggling with expectations of me. Feeling like I need to be a certain person for my friends, family and partner, but the biggest one being myself. So the value I've been thinking about most is self-love and learning to be content on all fronts.
I'm attending EDA, as I really enjoy coding and IT, and it allows me to begin studying again in a completely different environment. I studied Fashion and Textiles for 2 years at Massey university and struggled with their system and learning environment ( as well as just being bored with the course in general). I felt pretty lost after dropping out as that had been my plan for so long I had forgotten what other interests I had. The last thing that I found a lot of satisfaction in was coding and my trip to silicon valley in high-school, so I decided to try that out after chatting to my flat mate who completed this course a month or so ago. I also love the idea of being able to work overseas when I do end up moving.
I look forward to meeting everyone soon!


Georgian Police Start Dismantling Protesters' Tents Set Up in Front of Parliament
TBILISI (Sputnik) - Georgia's Patrol Police Department has started dismantling the tents that opposition supporters have set up near the parliament building in Tbilisi and transferring them to the pavement, Rustavi 2 broadcaster reported on Monday.
The opposition supporters prevent lawmakers from entering the parliament, blocking access to all entrances. The Interior Ministry has already called on them to obey with the requirements of the police and to stop rallying, noting that otherwise measures will be taken.
Riot police officers have used water cannons and batons to disperse protesters who have been blocking the central entrance to the parliament building.
Protesters are calling for convening early parliamentary elections and appointing an interim government, even though the ruling Georgian Dream party has already said that the early elections are out of question, and the vote will be held next October, as scheduled.
On Sunday, thousands of supporters of the opposition and of non-governmental and civic organizations rallied in front of the parliament.


Exclusive: City Set To Announce New Coach!
by Soccer LadumaAs predicted by the Siya crew, Cape Town City are expected to announce a Dutch-born mentor as their new head coach.
It was revealed yesterday by the Siya crew that City are eyeing former Galatasaray head coach, Jan Olde Riekerink.
The Siya crew has it on good authority that the Citizens are close to concluding a deal to bring Riekerink on board and an announcement about his signature can be expected to take place today.
More to follow...


Scanning Paused
Sometimes BLE stops working when switching between apps or doing multiple reloads. In this case restart the Evothings Client app. Additionally, you can use the Evothings Workbench Tools to see any error messages that may help in your investigation.


Email address
We'll never share your email with anyone else.
Password
Password Check
I agree
Submit
Email address
We'll never share your email with anyone else.
Password
Submit
User
Created
Hello, world! This is a toast message.


{% extends "layouts/base.html" %} {% block title %}Admin Link{% endblock %} {%block content %}
Visiting this website will allow you to modify your surveys and see the results, so please bookmark it or copy the link below:


Image Processing in WebAssembly
Photon is a high-performance image processing library in WebAssembly that runs both natively and on the web.
Photon is a high-performance image processing library in WebAssembly that runs both natively and on the web.
Photon outperforms even the fastest of libraries, and is powered with Rust, allowing for safe and secure image processing.
For web-based image processing, Photon is 4-10x faster than JS, leading to faster results, and less lag.
Photon provides functions for every domain of image processing.
This library's WASM functions can be called via JS, allowing for zero-cost abstraction and faster development.
Photon can be executed:
Photon compiles to WebAssembly, which allows the execution of native-speed code in the browser and on Node.JS. This leads to high-performance image processing on the web and since Photon's core library is written in Rust, it promises security and safety.
Photon's core library is a Rust crate, available from Cargo.
Write code in JS without a single line of Rust.
JS code gets exported to WebAssembly.
Photon outperforms even the fastest of libraries, both natively and on the web.
For full benchmark results, check them out here.
Photon has greatly outperformed ImageMagick and the Python Imaging Library, as shown in the graph to the right, and is on par with libvips.
As for the web, the browser can take advantage of WebAssembly's near-native performance to deliver blazing-fast image processing on the client-side, thus sparing you the need to process images server-side.
Photon provides low-level access to pixel and channel manipulation, as well as high-level functions for image correction, filtering, watermarking, and convolutions.
Resize images at lightning-speeds.
High-performance image resizing with 5 different resizing algorithms to choose from, so that you can choose the algorithm most suited to your use case.
Adjust images by correcting brightness, saturation, hues, and more, all within various colour spaces. This gives full flexibility to work in many colour spaces, leading to improved results tailored to your image.
Photon comes with a variety of built-in effects, including:
Functions include:
Blending:Blend images together using 10 different techniques.
Create new images from existing ones, or create new worlds from source images.
To see WebAssembly in action and all effects available, make sure to check out our demo , where you can test out the effects, view performance, and see if Photon is the right library for your website.
You can transform an image in just 3 lines of code, either in JS or Rust, whichever your choice may be.
To compare JavaScript vs WebAssembly, click on one of the buttons below to see the right-hand side image edited by either JavaScript or WebAssembly.
The time taken to edit the image will be displayed below.
JS time:
WASM time:
If you have any questions, want to chat about your potential use case, or want help in getting started with Photon, be sure to shoot me a message on Spectrum or Gitter.


Zend Framework
LICENSE
This source file is subject to the new BSD license that is bundled with this package in the file LICENSE.txt. It is also available through the world-wide-web at this URL: http://framework.zend.com/license/new-bsd If you did not receive a copy of the license and are unable to obtain it through the world-wide-web, please send an email to<EMAIL_ADDRESS>so we can send you a copy immediately.
Read an AMF0 input stream and convert it into PHP data types
Logic for deserialization of the AMF envelop is based on resources supplied by Adobe Blaze DS. For and example of deserialization please review the BlazeDS source tree.
int
$_objectEncoding= 'Zend_Amf_Constants'
If AMF3 serialization occurs, update to AMF0 0x03
Zend_Amf_Constants
Details__construct(
\Zend_Amf_Parse_InputStream $stream
)
:
void
Constructor
Inherited from: \Zend_Amf_Parse_Deserializer::__construct()| Name | Type | Description |
|---|---|---|
| $stream | \Zend_Amf_Parse_InputStream |
getObjectEncoding(
)
:
int
Return the object encoding to check if an AMF3 object is going to be return.
| Type | Description |
|---|---|
| int |
readAmf3TypeMarker(
)
:
string
AMF3 data type encountered load AMF3 Deserializer to handle type markers.
| Type | Description |
|---|---|
| string |
readArray(
)
:
array
Converts numerically indexed actiosncript arrays into php arrays.
Called when marker type is 10
| Type | Description |
|---|---|
| array |
readMixedArray(
)
:
array
Reads an array with numeric and string indexes.
Called when marker type is 8
| Type | Description |
|---|---|
| array |
readObject(
array|null $object
=
null
)
:
object
Read AMF objects and convert to PHP objects
Read the name value pair objects form the php message and convert them to a php object class.
Called when the marker type is 3.
| Name | Type | Description |
|---|---|---|
| $object | array|null |
| Type | Description |
|---|---|
| object |
readReference(
)
:
object
Read reference objects
Used to gain access to the private array of reference objects. Called when marker type is 7.
| Type | Description |
|---|---|
| object |
| Exception | Description |
|---|---|
| \Zend_Amf_Exception | for invalid reference keys |
readTypeMarker(
integer $typeMarker
=
null
)
:
mixed
Read AMF markers and dispatch for deserialization
Checks for AMF marker types and calls the appropriate methods for deserializing those marker types. Markers are the data type of the following value.
| Name | Type | Description |
|---|---|---|
| $typeMarker | integer |
| Type | Description |
|---|---|
| mixed | whatever the data type is of the marker in php |
| Exception | Description |
|---|---|
| \Zend_Amf_Exception | for invalid type |
readTypedObject(
)
:
object|array
Read Class that is to be mapped to a server class.
Commonly used for Value Objects on the server
| Type | Description |
|---|---|
| objectarray |
| Exception | Description |
|---|---|
| \Zend_Amf_Exception | if unable to load type |


Portfolio Website
Home
About
Projects
Contact
Hello World, We are Software Developers!
My Github Page
Project 1.
Project 1.
Project 1.
Project 1.
Project 1.
Project 1.


5 Lab - Analysis of Variance
Complete the following exercises in Chapter 6 (Analysis of Variance) of the textbook pages 199-203. For each question, you need to specify the null hypothesis and why you accept or reject the null hypothesis.
5.1 Question 1
This is Exercise 2 in Chapter 6 of the Textbook [R].
5.1.1 Problem
Assume that an analysis of variance is conducted for a study where there are \(N = 50\) observations and \(k = 5\) categories. Fill in the blanks in the following ANOVA table:
| Sum of squares | Degrees of freedom | Mean square | F | |
|---|---|---|---|---|
| Between | 116.3 | |||
| Within | 2000 | |||
| Total |
5.1.2 Solution
n <- 50
k <- 5
WSS <- 2000
m.sq1 <- 116.3
df1 <- k - 1
df2 <- n - k
BSS <- df1 * m.sq1
m.sq2 <- WSS/df2
TSS <- WSS + BSS
F.ratio <- m.sq1/m.sq2 ## 2.61675
F.critical <- qf(0.95,df1,df2) ## 2.5787
if(F.ratio > F.critical) {
print("We reject the null hypothesis")
} else {
print("we cannot reject the null hypothesis")
}
## [1] "We reject the null hypothesis"
| Sum of squares | Degrees of freedom | Mean square | F | |
|---|---|---|---|---|
| Between | 465.2 | 4 | 116.3 | 2.61675 |
| Within | 2000 | 45 | 44.4444444 | |
| Total | 2465.2 |
5.2 Question 2
This is Exercise 6 in Chapter 6 of the Textbook [R].
5.2.1 Problem
Is there a significant difference between the distances moved by low- and high-income individuals? Twelve respondents in each of the income categories are interviewed, with the following results for the distances associated with residential moves:
| Respondent | Low income | High income |
|---|---|---|
| 1 | 5 | 25 |
| 2 | 7 | 24 |
| 3 | 9 | 8 |
| 4 | 11 | 2 |
| 5 | 13 | 11 |
| 6 | 8 | 10 |
| 7 | 10 | 10 |
| 8 | 34 | 66 |
| 9 | 17 | 113 |
| 10 | 50 | 1 |
| 11 | 17 | 3 |
| 12 | 25 | 5 |
| Mean | 17.17 | 23.17 |
| Std. dev. | 13.25 | 33.45 |
Test the null hypothesis of homogeneity of variances by forming the ratio \(s_1^2 / s_2^2\) which has an F-ratio with \(n_1 – 1\) and \(n_2 – 1\) degrees of freedom. Then use ANOVA (with \(\alpha = 0.10\)) to test whether there are differences in the two population means. Set up the null and alternative hypotheses, choose a value of α and a test statistic, and test the null hypothesis. What assumption of the test is likely not satisfied?
5.2.2 Solution
L <- c(5,7,9,11,13,8,10,34,17,50,17,25)
H <- c(25,24,8,2,11,10,10,66,113,1,3,5)
m1 <- mean(L)
m2 <- mean(H)
s1 <- var(L)
s2 <- var(H)
income <- c(L,H)
group <- c(rep("L",12),rep("H",12))
df <- data.frame(income,group)
F <- s1/s2 #0.157
F.ratio <- df(0.9,df1 = 11,df2 = 11) #0.708
library(car)
##
## Attaching package: 'car'
## The following object is masked from 'package:dplyr':
##
## recode
leveneTest(income~group,data = df)
## Levene's Test for Homogeneity of Variance (center = median)
## Df F value Pr(>F)
## group 1 1.0206 0.3234
## 22
m <- aov(income~group, data = df)
summary(m)
## Df Sum Sq Mean Sq F value Pr(>F)
## group 1 216 216.0 0.334 0.569
## Residuals 22 14241 647.3
kruskal.test(L,H)
##
## Kruskal-Wallis rank sum test
##
## data: L and H
## Kruskal-Wallis chi-squared = 10.846, df = 10, p-value = 0.3697
shapiro.test(L)
##
## Shapiro-Wilk normality test
##
## data: L
## W = 0.81099, p-value = 0.01253
shapiro.test(H)
##
## Shapiro-Wilk normality test
##
## data: H
## W = 0.67351, p-value = 0.0004738
5.3 Question 3
This is Exercise 9 in Chapter 6 of the Textbook [R].
5.3.1 Problem
A sample is taken of incomes in three neighborhoods, yielding the following data:
| A | B | C | Overall (Combined sample) | |
|---|---|---|---|---|
| N | 12 | 10 | 8 | 30 |
| Mean | 43.2 | 34.3 | 27.2 | 35.97 |
| Std. dev. | 36.2 | 20.3 | 21.4 | 29.2 |
Use analysis of variance (with α = 0.05) to test the null hypothesis that the means are equal.
5.3.2 Solution
library(MASS)
A <- mvrnorm(12,mu = 43.2,Sigma = 36.2^2,empirical = TRUE)
B <- mvrnorm(10,mu = 34.3,Sigma = 20.3^2,empirical = TRUE)
C <- mvrnorm(8,mu = 27.2,Sigma = 21.4^2,empirical = TRUE)
k <- 3
n <- 30
values <- c(A,B,C)
groups <- c(rep("A",12),rep("B",10),rep("C",8))
df <- data.frame(values,groups)
m <- aov(values~groups,data = df)
summary(m)
## Df Sum Sq Mean Sq F value Pr(>F)
## groups 2 1270 635.2 0.804 0.458
## Residuals 27 21329 790.0
p.value <- summary(m)[[1]][[1,"Pr(>F)"]]
if(p.value > 0.05) {
print("We cannot reject the null hypothesis")
} else {
print("We reject the null hypothesis")
}
## [1] "We cannot reject the null hypothesis"
TukeyHSD(m)
## Tukey multiple comparisons of means
## 95% family-wise confidence level
##
## Fit: aov(formula = values ~ groups, data = df)
##
## $groups
## diff lwr upr p adj
## B-A -8.9 -38.73854 20.93854 0.7424056
## C-A -16.0 -47.80799 15.80799 0.4365612
## C-B -7.1 -40.15583 25.95583 0.8561024
plot(TukeyHSD(m))
5.4 Question 4
This is Exercise 10 in Chapter 6 of the Textbook [R].
5.4.1 Problem
Use the Kruskal–Wallis test (with α = 0.05) to determine whether you should reject the null hypothesis that the means of the four columns of data are equal:
| Col 1 | Col 2 | Col 3 | Col 4 |
|---|---|---|---|
| 23.1 | 43.1 | 56.5 | 10002.3 |
| 13.3 | 10.2 | 32.1 | 54.4 |
| 15.6 | 16.2 | 43.3 | 8.7 |
| 1.2 | 0.2 | 24.4 | 54.4 |
5.4.2 Solution
c1 <- c(23.1,13.3,15.6,1.2)
c2 <- c(43.1,10.2,16.2,0.2)
c3 <- c(56.5,32.1,43.3,24.4)
c4 <- c(10002.3,54.4,8.7,54.4)
values <- c(c1,c2,c3,c4)
groups <- c(rep("c1",4),rep("c2",4),rep("c3",4),rep("c4",4))
df <- data.frame(values,groups)
result <- kruskal.test(values~groups,data = df)
if(result$p.value>0.05) {
print("We cannot reject the null hypothesis")
} else {
print("We reject the null hypothesis")
}
## [1] "We cannot reject the null hypothesis"
5.5 Question 5
This is Exercise 12 in Chapter 6 of the Textbook [R].
5.5.1 Problem
A researcher wishes to know whether distance traveled to work varies by income. Eleven individuals in each of three income groups are surveyed. The resulting data are as follows (in commuting miles, one-way):
## This is the script to generate the table. Do not write your answer inside in this block.
Observations <- seq(1:11)
Low <- c(5,4,1,2,3,10,6,6,4,12,11)
Medium <- c(10,10,8,6,5,3,16,20,7,3,2)
High <- c(8,11,15,19,21,7,7,4,3,17,18)
df <- data.frame(Observations,Low,Medium,High)
library(knitr)
kable(df)
| Observations | Low | Medium | High |
|---|---|---|---|
| 1 | 5 | 10 | 8 |
| 2 | 4 | 10 | 11 |
| 3 | 1 | 8 | 15 |
| 4 | 2 | 6 | 19 |
| 5 | 3 | 5 | 21 |
| 6 | 10 | 3 | 7 |
| 7 | 6 | 16 | 7 |
| 8 | 6 | 20 | 4 |
| 9 | 4 | 7 | 3 |
| 10 | 12 | 3 | 17 |
| 11 | 11 | 2 | 18 |
Use analysis of variance (with α = 0.05) to test the hypothesis that commuting distances do not vary by income. Also evaluate (using R and the Levene test) the assumption of homoscedasticity. Finally, lump all of the data together and produce a histogram, and comment on whether the assumption of normality appears to be satisfied.
5.5.2 Solution
L <- c(5,4,1,2,3,10,6,6,4,12,11)
M <- c(10,10,8,6,5,3,16,20,7,3,2)
H <- c(8,11,15,19,21,7,7,4,3,17,18)
values <- c(L,M,H)
groups <- c(rep("L",11),rep("M",11),rep("H",11))
df <- data.frame(values,groups)
m <- aov(values~groups,data = df)
summary(m)
## Df Sum Sq Mean Sq F value Pr(>F)
## groups 2 201.0 100.48 3.493 0.0433 *
## Residuals 30 862.9 28.76
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
TukeyHSD(m)
## Tukey multiple comparisons of means
## 95% family-wise confidence level
##
## Fit: aov(formula = values ~ groups, data = df)
##
## $groups
## diff lwr upr p adj
## L-H -6.000000 -11.637743 -0.3622571 0.0351337
## M-H -3.636364 -9.274107 2.0013792 0.2653924
## M-L 2.363636 -3.274107 8.0013792 0.5619154
plot(TukeyHSD(m))
p.value <- summary(m)[[1]][[1,"Pr(>F)"]]
if(p.value > 0.05) {
print("We cannot reject the null hypothesis")
} else {
print("We reject the null hypothesis")
}
## [1] "We reject the null hypothesis"
library(car)
leveneTest(values~groups,data = df)
## Levene's Test for Homogeneity of Variance (center = median)
## Df F value Pr(>F)
## group 2 2.1694 0.1318
## 30
## p-value = 0.131
## the assumption of homoscedasticity is satisfied.
hist(values)
shapiro.test(values)
##
## Shapiro-Wilk normality test
##
## data: values
## W = 0.90693, p-value = 0.008099
## p-value = 0.008 < 0.05
## the assumption of normality not satisfied
5.6 Question 6
This is Exercise 13 in Chapter 6 of the Textbook [R].
5.6.1 Problem
Data are collected on automobile ownership by surveying residents in central cities, suburbs and rural areas. The results are:
| Central cities | Suburbs | Rural areas | |
|---|---|---|---|
| Number of observations | 10 | 15 | 15 |
| mean | 1.5 | 2.6 | 1.2 |
| Std. dev | 1.0 | 1.1 | 1.2 |
| Overall mean: 1.725 | |||
| Overall std.dev: 1.2 |
Test the null hypothesis that the means are equal in all three areas.
5.6.2 Solution
city <- mvrnorm(10,mu = 1.5,Sigma = 1,empirical = TRUE)
suburb <- mvrnorm(15,mu = 2.6,Sigma = 1.1^2,empirical = TRUE)
rural <- mvrnorm(15,mu = 1.2,Sigma = 1.2^2,empirical = TRUE)
values <- c(city,suburb,rural)
groups <- c(rep("city",10),rep("suburb",15),rep("rural",15))
df <- data.frame(values,groups)
m <- aov(values~groups,data = df)
summary(m)
## Df Sum Sq Mean Sq F value Pr(>F)
## groups 2 15.9 7.950 6.381 0.00416 **
## Residuals 37 46.1 1.246
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
TukeyHSD(m)
## Tukey multiple comparisons of means
## 95% family-wise confidence level
##
## Fit: aov(formula = values ~ groups, data = df)
##
## $groups
## diff lwr upr p adj
## rural-city -0.3 -1.41257183 0.8125718 0.7888370
## suburb-city 1.1 -0.01257183 2.2125718 0.0531846
## suburb-rural 1.4 0.40488550 2.3951145 0.0041221
plot(TukeyHSD(m))
p.value <- summary(m)[[1]][[1,"Pr(>F)"]]
if(p.value > 0.05) {
print("We cannot reject the null hypothesis")
} else {
print("We reject the null hypothesis")
}
## [1] "We reject the null hypothesis"
### p-value = 0.004 < 0.05
### conclusion: reject the null hypothesis
## the suburbs-rural group are significantly different


X
120
27
Here is my submission for the Design an Icon project. I wanted to do a space theme because I've always been interested in that area and I thought that by creating icons for it I could show my love for the extraterrestrail space world.
I wanted my icons to be very simple and basic, while also having a fun and almost doodle feeling to them. I decided to go with the line art aesthetic for simplicity, and then added the blurry, purplish background for the that spacey vibe. Lemme know what you guys think and if you have any suggestions!


RustPython is a Python interpreter writter in Rust. This demo is
compiled from Rust to WebAssembly so it runs in the browser.
Please input your Python code below and click Run, or you
can open up your browser's devtools and play with
rp.pyEval('print("a")')
Here's some info regarding the rp.pyEval()
function
json.dumps
.
stdout
: either a string with a css selector
to a textarea element or a function that recieves a
string when the print
function is called in
python. The default value is console.log
.
vars
: an object that will be available in
python as the variable js_vars
. Only
functions and values that can be serialized with
JSON.stringify()
will go through.
this
argument


Language Tools
The tweakflow jar offers entry points for some language tools that can be executed standalone. An interactive REPL, a spec runner that executes tests, a runner that evaluates all given modules and calls a main function, and a documentation tool that extracts doc and metadata from modules.
Interactive REPL
To launch the REPL run:
$ java -jar tweakflow-1.4.3.jar repl
The acronym repl
stands for ‘read evaluate process loop’. You should see a prompt similar to this:
tweakflow interactive shell \? for help, \q to quit
std.tf>
You can quit out of the REPL by entering \q
. To get help, enter \?
. The help screen looks similar to this:
usage: > COMMAND ...
interactive commands:
COMMAND
\help (\?) show usage information
\vars (\v) print interactive variable definitions
\edit (\e) toggle multi-line entry
\inspect (\i) inspect memory space
\load_path (\lp) print load path
\pwd print working directory
\load (\l) load a set of modules, removes interactive variables
\meta (\m) print meta data
\doc (\d) print doc
\time (\t) measure evaluation time
... snip ...
The commands are listed with a short description of what they do. To get more help for a particular command, just type it in with a --help
argument.
To get help for the \load
command:
> \load --help
usage: > \load module [module ...]
positional arguments:
module modules to load, first given module's scope is entered, relative paths are searched in load_path
Evaluating expressions
Just type in an expression to have the REPL evaluate it:
> 1+2
3
> "Hello".. " " .. "World"
"Hello World"
The prompt shows you which module context you are in. You can reference all names visible in the module you are in. By default this is the standard library context, so you can use standard library functions.
std.tf> data.map([1, 2, 3], (x) -> x*x)
[1, 4, 9]
std.tf> strings.length("foo")
3
Multi-line mode
The REPL accepts single line entry by default. If you want to use an expression that spans multiple lines, open multiline mode using \e
and close it again using \e
. The REPL indicates with a *
in the prompt that it is in multi-line mode.
std.tf> \e
std.tf* let {
std.tf* a: 3;
std.tf* b: 4;
std.tf* }
std.tf* a+b
std.tf* \e
7
std.tf>
Defining variables
You can define interactive variables using var_name: expression
syntax. You can then reference your variables in your expressions and definitions.
> a: 3
3
> b: 4
4
> c: a+b
7
All variables are re-evaluated on each command, so changing a variable definition changes all dependent values.
> x: 3
3
> y: x
3
> x: "foo"
"foo"
> y
"foo"
You can view your interactive variable definitions using the \vars
command.
> \vars
5 interactive variables defined
a: 3
b: 4
c: a+b
x: "foo"
y: x
You can view their current values using the \inspect
command.
> \inspect
a: 3
b: 4
c: 7
`$`: "foo"
x: "foo"
y: "foo"
The $
variable is internally maintained by the REPL to hold the last evaluation result. You can only view it using \inspect
. It cannot be referenced in your expressions.
Inspecting memory contents
You can inspect the content of any loaded module, library or variable. Just pass a reference to the \inspect
command. To view the contents of the strings
library, for example:
> \i strings
# library
starts_with?: function
upper_case: function
length: function
replace: function
concat: function
ends_with?: function
substring: function
index_of: function
comparator: function
split: function
trim: function
lower_case: function
join: function
chars: function
last_index_of: function
Enter \i --help
for more information about the inspect command.
Viewing docs
Tweakflow has the ability to annotate all named entities with doc data. You can view any doc data using the \doc
command. The standard module, libraries and functions are annotated with markdown documentation.
> \doc strings
The strings library contains basic functions for text processing.
> \doc strings.length
`(string x) -> long`
Returns the number of unicode codepoints in given string `x`.
Returns `nil` if `x` is `nil`.
```tweakflow
> strings.length("")
0
> strings.length("foo")
3
> strings.length("你好")
2
```
Loading modules
You can load a different module than the standard library through the \load
command. Let’s say you have a module file on your disk:
# acme.tf
import data, regex, strings from 'std';
alias strings.replace as replace;
alias data.map as map;
alias data.slices as slices;
alias strings.join as join;
alias strings.upper_case as upper_case;
library product_codes {
remove_whitespace:
regex.replacing('\s+', ""); # function that removes any whitespace from a string
normalize: (string x) ->
->> (x)
# remove whitespace, "f-oo bar" -> "f-oobar"
(x) -> remove_whitespace(x),
# remove any dashes # "f-oobar" -> "foobar"
(x) -> replace(x, "-", ""),
# split to a list of blocks of up to 4 chars "foobar" -> ["foob", "ar"]
(x) -> let {
# "foobar" -> [["f", "o", "o", "b"], ["a", "r"]]
blocks: slices(x as list, 4);
}
# [["f", "o", "o", "b"], ["a", "r"]] -> ["foob", "ar"]
map(blocks, (block) -> join(block)),
# place dashes between blocks converting to single string ["foob", "ar"] -> "foob-ar"
(blocks) -> join(blocks, "-"),
# upper case all characters "foob-ar" -> "FOOB-AR"
upper_case;
}
Load it in the REPL:
> \load acme.tf
acme.tf>
You are now in the context of the acme module, and can reference all names in this module.
acme.tf> product_codes.normalize("ah-78277-Nz")
"AH78-277N-Z"
Command line arguments
The REPL accepts a number of command line arguments that influence which modules are initially loaded, and which directories are placed on the load path. To learn more, run:
$ java -jar tweakflow-1.4.3.jar repl --help
Spec runner
The spec runner runs modules that contain tests. You can specify which modules to include, which tests to execute, and how to format the output.
Run the following command to view the command line options:
$ java -jar tweakflow-1.4.3.jar spec -h
Running spec modules
You specify the spec modules to run by supplying paths. If the given path is a file, it is run as a spec module.
If the given path is a directory, the runner recursively finds and runs all *.spec.tf
files within that directory.
# runs specific files
$ java -jar tweakflow-1.4.3.jar spec /path/to/t_1.spec.tf /path/to/t_2.spec.tf
# recursively runs all *.spec.tf files in ./tests
$ java -jar tweakflow-1.4.3.jar spec ./tests
Global modules
You can include global modules to be available in specs using the -g
switch.
# include the ./conf/test.tf global module in each spec
$ java -jar tweakflow-1.4.3.jar spec -g ./conf/test.tf ./tests
Filtering specs
Use the -f
switch to execute only tests that contain the given string in their full name. A test’s full name consists of all its parent describe block’s names and its own name.
In order to recursively execute all tests in a given describe block you can specify the describe block’s name as a filter.
In order to execute a single test only, you could specify a unique string from its own name.
You can specify multiple -f
switches. A test must satisfy all filters in order to run.
# only run tests that have 'nil' somewhere in their name
$ java -jar tweakflow-1.4.3.jar spec -f nil ./tests
Running tagged specs
If you have tagged describe blocks or tests, they are not executed by default. You need to specify that you wish to run tagged tests by providing the desired tag using the -t
switch.
# run tests that are tagged 'nightly'
$ java -jar tweakflow-1.4.3.jar spec -t nightly ./tests
You can specify multiple -t
switches. A test will run if it is tagged with any of the given tags.
If you specify a -t
switch, untagged tests will not run. If you wish to include them, use the --untagged
switch.
# run regular test-suite plus nightly tests
$ java -jar tweakflow-1.4.3.jar spec --untagged -t nightly ./tests
Reporters
Spec reporters determine the output of a spec run. You can specify the reporter to use with the -r
switch.
The following reporters are built-in:
| Reporter | Output |
|---|---|
| doc (default) | Hierarchical view of tests |
| dot | Minimal output with a single character printed for each test |
# use the dot reporter
$ java -jar tweakflow-1.4.3.jar spec -r dot ./tests
You can specify your own reporter that implements the SpecReporter interface. Make sure your imeplementation is on the class path and provide the fully qualified class name.
# use a custom reporter
$ java -cp <your cp> com.twineworks.tweakflow.Main spec -r com.your.ReporterClass ./tests
Multiple reporters
You can specify more than one reporter by supplying more than one -r
switch. The specified reporters should not interfere with each other, for example one should write to console, while the other should generate a file.
Reporter options
You can supply options to reporters using -ro <OPTION_NAME> <OPTION_VALUE>
. Options specified in this way are made available to all reporters as string properties.
The built-in reporters understand the following options:
| Option | Values | Description |
|---|---|---|
| color | true / false |
whether reporter may use ANSI escape sequences to generate colored output |
| tty | true / false |
whether reporter may use ANSI escape sequences for cursor repositioning, potentially enabling the use of console animation |
By default the runner tries to detect whether it runs on a console and enables the above options dynamically.
You can use the following shortucts for specifying reporter options:
- use
--color
as a shortcut for-ro color true
- use
--tty
as a shortcut for-ro tty true
Effects
Tweakflow is side-effect free. If you wish to trigger side effects in the test suite, you can supply a set of effects by implementing the SpecEffects interface. To use your class, use the -e
switch and supply the fully qualified name of the class implementing the interface.
See the effects example module for a demonstration on how to use effects. You can run the module using the following command:
$ java -jar tweakflow-1.4.3.jar spec -e com.twineworks.tweakflow.spec.effects.example.ExampleEffects src/test/resources/spec/examples/effects.spec.tf
Standard library test suite
The test suite for the tweakflow standard library is located at src/test/resources/spec/std
You can run it with the following command:
$ java -jar tweakflow-1.4.3.jar spec src/test/resources/spec/std
Runner
The runner loads a module and calls a main function with some arguments you supply on the command line. It prints the return value back to the console.
Run the following command to view the command line options.
$ java -jar tweakflow-1.4.3.jar run --help
The module(s) to load are given as positional arguments. You can pass std
to load the standard module.
The main function to call is given using the -m
switch in library_name.var_name
format. It is a reference in module scope of the first passed module.
Arguments are given in order, using a series of -a
and -ea
switches. The -a
switch takes the argument verbatim and turns it into a tweakflow string. The -ea
switch treats the argument as an expression that is evaluated first, before it is passed on to the function.
Passing string arguments
The following invocation calls strings.length("foo")
:
$ java -jar tweakflow-1.4.3.jar run -m strings.length -a foo std
3
Since the argument is a string, it is passed using the -a
switch. Please note that passing the argument using the -ea
switch would fail, since foo
would simply be a reference to an undefined variable. If you wish to pass strings using -ea
, you have to pass a proper literal string as in:
$ java -jar tweakflow-1.4.3.jar run -m strings.length -ea "'foo'" std
3
Shell escaping can make it tricky to know exactly what is passed. It is therefore recommended to avoid the complexity and pass strings using -a
.
Passing expression arguments
The following invocation calls data.map([1, 2, 3, 4], (x) -> x*x)
:
$ java -jar tweakflow-1.4.3.jar run -m data.map -ea '[1, 2, 3, 4]' -ea '(x) -> x*x' std
[1, 4, 9, 16]
This time both arguments need to be evaluated to a list and function first. Therefore the -ea
switch is used both times.
Loading custom modules
You can load any module on disk. Let’s say you have the following module available:
# acme.tf
import data, regex, strings from 'std';
alias strings.replace as replace;
alias data.map as map;
alias data.slices as slices;
alias strings.join as join;
alias strings.upper_case as upper_case;
library product_codes {
remove_whitespace:
regex.replacing('\s+', ""); # function that removes any whitespace from a string
normalize: (string x) ->
->> (x)
# remove whitespace, "f-oo bar" -> "f-oobar"
(x) -> remove_whitespace(x),
# remove any dashes # "f-oobar" -> "foobar"
(x) -> replace(x, "-", ""),
# split to a list of blocks of up to 4 chars "foobar" -> ["foob", "ar"]
(x) -> let {
# "foobar" -> [["f", "o", "o", "b"], ["a", "r"]]
blocks: slices(x as list, 4);
}
# [["f", "o", "o", "b"], ["a", "r"]] -> ["foob", "ar"]
map(blocks, (block) -> join(block)),
# place dashes between blocks converting to single string ["foob", "ar"] -> "foob-ar"
(blocks) -> join(blocks, "-"),
# upper case all characters "foob-ar" -> "FOOB-AR"
upper_case;
}
To load it, and run product_codes.normalize("ksh765fg25ff")
:
$ java -jar tweakflow-1.4.3.jar run -m product_codes.normalize -a ksh765fg25ff acme.tf
KSH7-65FG-25FF
Metadata extraction
The tweakflow language allows annotating modules, libraries, and variables with documentation and custom meta data. The doc
utility makes it possible to extract that information in a structured way.
Let’s work with the following module file:
# module foo.tf
doc
~~~
This is documentation at the module level.
~~~
meta {
:title "foo",
:description "Description of the module",
:version "4.2"
}
module;
# library bar
doc 'This is documentation for library bar.'
meta {
:author "John Doe et al.",
:since "2.3"
}
library bar {
# function baz
doc 'This is documentation for function baz.'
meta {
:author "John Doe",
:date 2017-03-12T
}
function baz: (x) -> x*x;
}
Command overview
You can view all command line switches by running the following:
$ java -jar tweakflow-1.4.3.jar doc --help
The next sections provide a walkthrough for the most common options.
Printing metadata
The following invokes doc
, passing in the module to extract metadata from.
$ java -jar tweakflow-1.4.3.jar doc foo.tf
By default the doc
utility prints the structure of available meta data:
{
:node "module",
:global false,
:components [{
:node "library",
:meta {
:author "John Doe et al.",
:since "2.3"
},
:name "bar",
:vars [{
:node "var",
:meta {
:author "John Doe",
:date 2017-03-12T00:00:00Z@UTC
},
:name "baz",
:type "function",
:doc "This is documentation for function baz.",
:expression "(x) -> x*x"
}],
:export false,
:doc "This is documentation for library bar."
}],
:doc "This is documentation at the module level.",
:file "foo.tf",
:path "/Users/slawo/Desktop/docs_check/foo.tf",
:meta {
:description "Description of the module",
:version "4.2",
:title "foo"
}
}
Please note that the output is a valid tweakflow dict value.
Transforming metadata
The doc
utility can pass the meta data of a module to a sequence of transformer functions. The most common task for a transformer is to generate some human-readable document format from the given structure.
A transformer is a special tweakflow module that has a library named transform
which in turn has a variable named transform
. This variable holds a function accepting above structure as its sole argument. The return value of the function is the output of the transformer.
You supply transformers using the -t
switch. If you supply more than one transformer, they are chained such that the output of the first transformer becomes the argument to the second transformer, and so on.
Let’s supply a basic transformer that just generates a one-sentence summary of the module.
# transformer.tf
import data, strings from "std";
alias data.size as size;
alias data.reduce as reduce;
library transform {
transform: (dict x) -> string
"Module "
..x[:path]
.." contains "
..libs_in_module(x)
.." libraries, and a total of "
..vars_in_module(x)
.." variables.";
libs_in_module: (dict m) -> long
size(m[:components]);
vars_in_module: (dict m) -> long
let {
libs: m[:components];
}
reduce(libs, 0, (a, lib) -> a+vars_in_lib(lib));
vars_in_lib: (dict lib) -> long
size(lib[:vars]);
}
Let’s run this transformer over the standard library:
$ java -jar tweakflow-1.4.3.jar doc -t transformer.tf std
Module std.tf contains 8 libraries, and a total of 159 variables.
A more sophisticated transformer might generate markdown, XML, or HTML documentation for the module.
Processing more than one module
You can pass more than one module to doc
, and they are processed in order.
$ java -jar tweakflow-1.4.3.jar doc -t transformer.tf std foo.tf
Module std.tf contains 8 libraries, and a total of 159 variables.
Module /path/to/foo.tf contains 1 libraries, and a total of 1 variables.
Saving the output
If you’re supplying relative module paths to doc
, you can ask to save each module output to a base output directory, preserving the relative paths given. You can also specify a file extension to use, which is handy if your transformer generates a well known file format. The default extension is txt
.
Assuming foo.tf is in the current directory, run:
$ java -jar tweakflow-1.4.3.jar doc -t transformer.tf --output docs --output-extension md std.tf foo.tf
It generates a docs
directory, placing the following files in there:
docs/std.tf.md
Module std.tf contains 8 libraries, and a total of 167 variables.
docs/foo.tf.md
Module /path/to/foo.tf contains 1 libraries, and a total of 1 variables.


LogLevel
public enum LogLevel : Int
Defines levels of logging that could be tagged for log messages.
-
Displays none.
Declaration
Swift
case none = -1
-
Displays only error logs.
Declaration
Swift
case error = 0
-
Displays only warnings and above.
Declaration
Swift
case warning = 1
-
Displays all but debug logs.
Declaration
Swift
case info = 2
-
Displays all logs useful for developer.
Declaration
Swift
case debug = 3


memery
.The memery
package generates internet memes that optionally include a superimposed inset plot and other atypical features, combining the visual impact of an attention-grabbing meme with graphic results of data analysis.
The package differs from related packages that focus on imitating and reproducing standard memes. Some packages do this by interfacing with online meme generators whereas others achieve this natively. This package takes the latter approach. It does not interface with online meme generators or require any authentication with external websites. It reads images directly from local files or via URL and meme generation is done by the package.
While this is similar to the ‘meme’ package available on CRAN, it differs in that the focus is on allowing for non-standard meme layouts and hybrids of memes mixed with graphs. While this package can be used to make basic memes like an online meme generator would produce, it caters primarily to hybrid graph-meme plots where the meme presentation can be seen as a backdrop highlighting foreground graphs of data analysis results.
The package also provides support for an arbitrary number of meme text labels with arbitrary size, position and other attributes rather than restricting to the standard top and/or bottom text placement. This is useful for proper aesthetic interleaving of plots of data between meme image backgrounds and overlain text labels. The package offers a selection of templates for graph placement and appearance with respect to the underlying meme. Graph templates also permit additional template-specific customization. Animated gif support is provided but this is optional and functional only if the ‘magick’ package and ImageMagick software are installed.
You can install memery from CRAN with:
install.packages("memery")
You can install the latest development version from github with:
# install.packages('devtools')
devtools::install_github("leonawicz/memery")
See the vignette for an overview with usage examples.