"x"
"1" "KRAEMER,A, PUDIL,J, FRANK,H, OESCH,F AND GLATT,H, SOME SUBSTRATES ANDINHIBITORS OF CYTOSOLIC EPOXIDE HYDROLASE INDUCE SISTER-CHROMATID EXCHANGES INMAMMALIAN CELLS, BUT DO NOT INDUCE GENE MUTATIONS IN __ SALMONELLA TYPHIMURIUM ANDV79 CELLS, MUTAT. RES. 290(2):165-174, 1993"


Performance Examples
Loading
Loading Steps
Execution Model
No Webworker
Webworker
Event Loop
Performance Measuring
JavaScript Optimization
DOM Optimization
DOM Change
Simple list
Fancy list
Events
Debounce
Throttling
CSSOM Optimization
Read/Write Order
Selectors
Animations
Animation Type
Scrolling


Fcuksence
artificial intelligence driving results for the travel industry
Welcome, please login your account
Email Adress
Password
Remember me
Forgot password?
Login
Sign Up
Or login with
Facebook
Linkedin
Google


Loading...
BandedMatrix
BandedMatrixRow
BC_ZERO_ENDPOINTS
BSplineBase
BC_ZERO_FIRST
BSplineBase
BC_ZERO_SECOND
BSplineBase
BoundaryConditionTypes
BSplineBase
BSpline
BSpline< T >
BSpline::BSpline(const T *x, int nx, const T *y, double wl, int bc_type=BSplineBase< T >::BC_ZERO_SECOND, int num_nodes=0)
BSpline::BSpline(BSplineBase< T > &base, const T *y)
BSpline.cpp
BSplineBase
BSplineBase< T >
BSplineBase::BSplineBase(const T *x, int nx, double wl, int bc_type=BC_ZERO_SECOND, int num_nodes=0)
BSplineBase::BSplineBase(const BSplineBase &)
BSplineBase.h
BSplineBaseP
BSplineP
Searching...
No Matches


Members
-
currentTarget PIXI.DisplayObject
-
The object whose event listener’s callback is currently being invoked.
-
InteractionData related to this event
-
Whether this event will continue propagating in the tree
-
target PIXI.DisplayObject
-
The object which caused this event to be dispatched. For listener callback see PIXI.interaction.InteractionEvent.currentTarget.
-
Type of the event


{ "StatusCode": 200, "Banner": "Marvel Cinematic Universe (MCU)", "TotalQuotes": 2, "Items": [ { "id": "6SYjJebRR8fCF9SnvFZBKQ", "data": { "author": "Iron Man", "quote": "You know what, give me a break, Steve. I just got hit in the head with a Hulk." } }, { "id": "2cquLZiJsUbg5jtQrdwLkM", "data": { "author": "Thanos", "quote": "You have my respect, stark. When I'm done, half of humanity will still be alive. I hope they remember you." } } ] }
{ "StatusCode": 200, "Banner": "DC Universe (DCU)", "Stuff": { "id": "c4ZuUeSUzjGiCEVUmsrYWN", "data": { "author": "Wonder Woman", "quote": "Death is necessary. It is part of life, and if we say life is a blessing, we must say that death is a blessing, as well." } } }
{ "StatusCode": 200, "Stuff": { "id": "k3fhzAKsvCeuFhXPHPQcnT", "data": { "author": "The Joker", "quote": "The pen, is truly mightier than the sword!" } } }
Made with ❤ by imudayveer at Kontol Labs.


I am a former Computer Science ALIGN student and I am currently in the second year of a Master's in Computer Science program at Northeastern University.
Developed an Android fitness game that sent notifications to users about fictional scenarios that they had to physically walk to escape from; utilized the phone’s accelerometer to measure steps and Firebase to track user information and manage a friends list.
Created a SQL database using the Derby JDBC Driver for a social media application that tracks movie reviews and ratings.
Created an interactive tower defense game using AI concepts including blackboard architecture, tactical pathfinding, and movement algorithms.
Assisted for the Computer Science ALIGN bridging courses object-oriented design, computer systems, and algorithms. Reinforced concepts presented by the professor in lecture by reviewing material with students one-on-one or in small groups. Provided grading assistance to the professor for assignments. Answered questions about projects and assignments in class, during office hours, and via online forums.
Became a first point of contact to incoming ALIGN students for issues regarding academics, campus life, and administrative issues. Determined if students needed extra assistance and escalated cases as necessary to program directors.
Served as a liaison between classmates, prospective ALIGN students, and the CCIS Administration. Planned social events, maintained a visible presence on campus, and held private meetings for students with concerns. Aided the College in recruiting efforts and represented the College and program to potential students.
Collaborated with software consultants to design enterprise resource plans for finance and accounting records. Designated "super user" in SAP. Established process flow for accounts, created master data for migration from NetSuite. Created mapping tables for Oracle 10 implementation. Performed data validation for upgrade to JD Edwards 9.
See some pictures of my interests including food, cities, and activities here!


Our values put the knowledge seeker first. We want to connect our experiences, even if it means hiring a domain-expert, because we value the knowledge, reward, and happiness that can be achieved. Ask us all your questions.


Protocol Buffers
Serializing Structured Data
What is a Protocol Buffer?
"Protocol buffers are Google's language-neutral, platform-neutral, extensible mechanism for serializing structured data – think XML, but smaller, faster, and simpler"
Important: Structured Data
Some advantages
- Very small size
- Very fast processing
- Typed messages (safety)
- Schema Evolution (forward compatibility)
- Language / Platform agnostic
Some limitations
- Not human readable / editable
- Hard to parse without knowing the schema
- Protobuf doesn't prescribe how to do streaming
Example
message Person {
string name = 1;
int32 id = 2;
string email = 3;
}
Google provided initial official support for Java, C++ and Python
More languages followed in time. Most major programming languages are supported
What this means is that you define your data structures in Protobuf format, and automatically generate code in your language of choice
This is done with the Protocol Buffers Compiler, protoc
On a Mac, install with brew install protobuf
protoc -I=protobuf --java_out=java/protobuf/src/main/java protobuf/addressbook.proto
Using Protocol Buffers in Akka applications
The problem with Java Serialization
- It's actually kind of big and clunky by today's standards
- Security: You just can't trust a stream of data serialized this way
- Everyone's favorite: Performance!. It's actually not very fast
- In Scala, storing data with Java Serialization might break applications that migrate to next major version of Scala
Akka uses Java Serialization by default
This is not a big problem if your application is local (not clustered) and you are not using Akka Persistence
Akka Serialization mechanism is extensible
Several options available (protobuf, Kryo, roll your own...)
In an event sourced system, schema evolution is a huge problem
How do we change our data schema, while maintaining the ability to read old messages stored in the journal?
Protocol Buffers is a format that offers that capability
Main idea: separate the domain object model from its serialized representation
Akka Serialization Configuration
akka {
actor {
serializers {
java = "akka.serialization.JavaSerializer"
proto = "akka.remote.serialization.ProtobufSerializer"
myown = "docs.serialization.MyOwnSerializer"
}
serialization-bindings {
"java.lang.String" = java
"docs.serialization.Customer" = java
"com.google.protobuf.Message" = proto
"docs.serialization.MyOwnSerializable" = myown
"java.lang.Boolean" = myown
}
}
}
Parting thought
I see almost no reason to use JSON for microservice internal communication


For this experiment, to see how well DivANS performs on uncompressed data.
We sampled 130,000 random chunks being uploaded to Dropbox.
We measured the sizes and compression (encode) and decompression (decode) rates of DivANS, and several alternative algorithms (zlib, Brotli, Zstd, 7zip, bz2).
For DivANS and Brotli, we compared 2 different compression levels (q9 and q11). For zlib, 7zip, bz2 and Zstd, we used maximum settings.
All tests were performed on 2.6 GHz Intel Xeon E5 2650v2 servers in the Dropbox datacenters and no data chunks from the test were persisted.
Since Dropbox uses Lepton to compress image files and some files are already compressed by users, we only benchmark files where zlib is able to obtain
at least 1% savings on that files. One third of the sampled files, by space, were benchmarked.
Measuring the Dropbox dataset, DivANS q11 saves 2.5% over Brotli q11 and 12% over zlib.
At these settings, DivANS and Brotli have similar encoding speeds. However, DivANS decode times are still five times slower than Brotli. This is because Brotli decompresses bytes using just a pair of table lookups and some bookkeeping, whereas DivANS has to maintain probability models for each nibble decoded and uses several vector instructions to maintain the CDFs and the ANS state. We expect that a few straightforward optimizations to improve the bookkeeping will bring the speed up a bit, to more than 200Mbps.


Task Keeper
Are you ready to stay on track with the help of Kevin the Chicken?
Get the latest Android APK release using the button below.
Are you ready to stay on track with the help of Kevin the Chicken?
Get the latest Android APK release using the button below.


See your Enrolled Courses
Check the Courses in the following Departments
Computer Science and Engineering
Civil Engineering
Electronics and Communication Engineering
Electrical and Electronics Engineering
Mechanical Engineering


IronSmalltalk License Agreement - The MIT License (MIT)
Copyright (c) 2011 Todor Todorov, Scientia Software ApS, The IronSmalltalk Project
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.


Advocacy of open source software
Last updated: Jun 11, 2020
In this post, I’ll detail my experiences of advocating for accessibility in open source software, why it is important, and how others can help. I’ve not been doing it for long, but at least now, I’ve done a bit. I’ll also touch upon why I think open source software, on all operating systems, is important, and what closed source and closed feedback systems cannot offer, which open source grants. On the other hand, there are things which closed source somewhat grants, but which has faltered slightly in recent days. I will attempt to denote what is fact and what is opinion, this goes for any post of a commentary of informative nature.
The Appeal of Open Source
Open source, or free software, basically means that a person can view and change the source code of software that they download or own. While this doesn’t mean much to users, it does mean that many different people can work on a project to make it better. This has no value on its own, see the “heartbleed” SSL bug and its Aftermath, but as with SSL, things can obviously improve when given an incentive.
For now, open source technology is used in many closed source operating systems. For example, the Liblouis braille tables are used in iOS, macOS, and most Linux distributions through BRLTTY. While the software is not perfect, it is often made for more than one operating system, has a helpful community of users, and, greatest for accessibility, developers who are more likely to consider accessibility. This is greatly improved with platforms for open source development, like Github and Gitlab, which allow users to post “issues” on projects, including accessibility ones.
The Appeal of Closed Source
People like getting paid. I should know, as a working blind person who does love getting paid for time and effort well spent. People love keeping things hidden while being worked on. I wouldn’t want a reader reading an incomplete blog post, after all, and spreading the word that “Devin just kind of wrote a few words and that’s all I got. from the blog.” People love being able to claim their work as theirs, instead of having to share the credits with other people or companies. I don’t have direct experience with this, because I need all the help I can get, but in my opinion, it is a factor in choosing to create on your own, as a user or a company. Another great thing about closed source is that your competitors can’t copy what you’re doing, as you do it, and when you’re an important company, with allegiance to your shareholders, you must do anything to keep making money. But, what about accessibility?
Open Source Accessibility
Accessibility of open source projects vary a lot. For example, before Retroarch was made accessible, its interface was not usable by blind people. Now, though, I can use it easily. However, current versions of the KDE Plasma desktop do not work well with the Orca screen reader. The following quote is from the release notes for KDE’s latest desktop version:
KDE is an international technology team that creates free and open source software for desktop and portable computing. Among KDE’s products are a modern desktop system for Linux and UNIX platforms, comprehensive office productivity and groupware suites and hundreds of software titles in many categories including Internet and web applications, multimedia, entertainment, educational, graphics and software development. KDE software is translated into more than 60 languages and is built with ease of use and modern accessibility principles in mind. KDE’s full-featured applications run natively on Linux, BSD, Solaris, Windows and Mac OS X.
– Source
“Modern accessibility principals,” you say? In my opinion, we seem to be talking about different definitions of “accessibility.” Yes, there are multiple definitions. One is accessibility in the sense of being able to be accessed, another is the ability to be found, and the ability of being easy to deal with. As stated in the About section of the site, I use accessibility to mean being able to be used completely by blind people. This carries with it the implication that every single function, and all needed visual information, can be conveyed to a blind person in order for it to be accessible. This rules out the “good enough” approach that so many blind people accept as the status quo. Luckily for blind people who would love to use KDE, there is work being done on this issue. Gnu, the project behind much of Linux, also has an accessibility statement, which does seem to be very out of date, as it references flash player and Silverlight, which are no longer in common use, and does not reference Apple’s iOS, Google’s Android, and other modern technologies which are not open source, but which include assistive technologies. I encourage every adventurous blind person to make themselves available for testing open source software and operating systems; user testing was mentioned by the KDE team as something blind people could do to help. Believe me, having an operating system which is a “joy to use” is a dream of mine.
Gnome, and Mate, accessibility are okay, but they do not come close to the accessibility of Windows and Mac systems. For a good example, if you press Alt + F1 in Gnome, and probably Mate too, you may only hear “window.” Advanced users will know to type something in Gnome, or use the Arrow Keys in Mate, but regular users should not have to learn to hunt around due to bad accessibility, and the fact that less technically inclined users use Linux is a testament to blind people’s ingenuity and ability to adapt, rather than the accessibility of the platform.
Open source accessibility is so hit and miss because there are so many standards. There is the GTK framework for building graphical apps, which does have some accessibility support, but developers must label the items in their programs with text. There is the QT framework, which seems to have more poor accessibility support. Basically, developers can do anything they want, which is good for freedom, but often is not great for accessibility. Also, much of the community has not heard of accessibility practices, do not know that blind people use computers, or think that we must use braille interfaces to interact with computers and digital devices. This is a failure on our part, as we do not “get out there” on the Internet enough. With the advent of an accessible Reddit client, this may begin to change. Further work must be done to give blind users an accessible Reddit interface on the web for users to use on computers, not iPhones. However, Github is very accessible, and there is nothing stopping one from submitting issues.
Closed Source Accessibility
“Okay but what about Windows? And Apple? You like Apple, right?” Basically, it’s hard to tell. Software doesn’t write itself, it is written, for now, by people. People can make mistakes, ignore guidelines, or simply not care about accessibility. However, those guidelines do exist, and are usually one standard, like the iOS accessibility standard. This means that companies can develop accessible software easily, and are held accountable by managers to uphold accessibility. But, even the best of accessible companies do not always do the right thing. Apple, for example, has created two services, Apple Arcade and Apple Research. Apple Arcade contains no games which a blind gamer can play without expending much more effort than a sighted gamer. Apple Research contains some questions with answer buttons which are not labeled, or cannot be activated. Does Apple think that blind people do not want to game, or that we don’t care about our hearing, heart, or for women, their reproductive health? Apple has also created Swift Playgrounds, an app for children to learn to code. This is accessible. But what about adults? Shouldn’t blind adults, who are usually technically inclined enough, be given a chance to learn to code? I’ll probably rant about this in a future article.
Microsoft has been on an accessibility journey for a few years now, but even they have a few problems. First, the voices in Windows 10 are poor for screen reading tasks. They pause way too long at the end of clauses and sentences, leading me, at least, to press Down Arrow to move to the next line before the last line was actually done being spoken, all because it paused just long enough to make me think that there was no more text to speak. Microsoft’s XBox Game Pass is great, but I could not find any accessible games in the free rotations. Sure, there’s Killer Instinct that many blind people can enjoy playing, but I found it not only inaccessible, as the menus do not speak, but boring, as the characters all seemed to simply do the same thing. I know that games do not have to be accessible to be fun, but I expect companies who showcase games, like Apple with Arcade, to have at least one accessible game for blind people to enjoy. And I also know that neither Apple nor Microsoft makes these games, but they do choose to advertise them, endorse them even, and it shows that, for Apple Arcade at least, video games are not something which they expect blind people to play. Microsoft is proving them wrong, with the release of Halo with screen reader usability in menus, and the possibility that the new Halo game will be accessible.
Another problem with Microsoft is that not all of their teams are onboard. Like Apple with Arcade and Research, Microsoft has the Rewards team. Their quizzes require one to move items around to reorder answers to get the quiz correct. This may be easy, and perhaps fun, for sighted people, but are simply frustrating for blind people. Other problems include the release of the new Microsoft Edge, which, for most users of screen readers, require that the user turn off UI Automation in order to read some items on the web. Otherwise, if Microsoft’s upcoming foldable phone comes with greatly enhanced accessibility relative to pure Android, and the Narrator screen reader, optimized and made great and enjoyable for a mobile experience, I think that Microsoft could take plenty of market share back from Apple of mobile phone users. They already have most general purpose computer users who are blind, so taking from Apple would be a huge win for them regarding accessibility. But, on that, we’ll have to wait and see how far Microsoft takes their commitment to accessibility. The more cynical side of me says that Microsoft will simply slap Android on a folding phone and release it, because why fight Apple.
Reporting Bugs
So, what can we do to make accessibility better? Just about all open source software, including the stuff making up this blog, is hosted on Github. Just about all companies, of closed source software, claim to want your feedback. So, I recommend giving them any feedback you have. I know that giving feedback to Apple is like throwing $100 bills into the ocean, giving your valuable time to something which may offer no results, and just gives you the robotic “thanks” message. I know that sometimes talking to Microsoft’s accessibility team may seem unproductive, because they lead you from Twitter to one of a number of feedback locations. I know that feedback to open source software projects may take a lot of time and explaining and promoting accessibility to a community which has never considered it before, but it all may help.
For a great, and successful, Github issue regarding accessibility, see this issue on accessibility of Retroarch. You can see that I approached the Retroarch team respectfully, with knowledge of basic accessibility and computer terminology. Note that I gave what should happen, what is happening, and what can be done to fix the problem. As the saying goes, if you do not contribute to a solution to a problem, you are a part of the problem. Blind people will need to remember to give solutions, not just whine about something not working and can’t play Poke A Man like everyone else.
Also, share links to your feedback with other blind people who can vote, thumb up, or comment on it. Remember, if you do comment, please remember that feedback does not net instant results. I’m still waiting on Webcamoid to have an accessible interface, and Adding Active Accessibility into Games for Retroarch, and This Delta issue. But, at least I’ll know when something changes, and I could even Pay for features to be implemented.
This is opposed to the closed source model, where feedback is “passed on to the team,” or you are thanked, by your iPhone, for your feedback, but do not hear anything back from developers, and you most definitely can not pay for specific features to be worked on, or donate to projects that you feel deserve it. You must hope and have faith that large companies with more than one billion users cares enough to hear you. For perspective, if every blind person stopped using an iPhone, Apple would not miss many lost sales, compared to the billions of sighted users. However, the engineers who work on iOS accessibility are people too, with deadlines, lives, and feelings, and we should also respect that they are probably tightly restricted in answering feedback, fixing bugs, and creating new, exciting features.
As for me, I will continue to support open source software. I’ll keep using this mac and iPhone because they work the best for me and what I do for work and writing. But, believe me, when something better comes along, I’ll jump ship quickly. As blind people, I feel, we cannot afford to develop brand loyalty. Apple, Microsoft, or Google, I think, could drop accessibility tomorrow, and there we’d be, left in the cold. I highly doubt they will. They may let it lie stagnant, but they probably won’t remove it. I do not write this to scare you in the least, but to make you think about how much control you actually have over what you use, how companies and developers view us, and how we can improve the situation for ourselves. if sighted people notice a bug or want a feature in iOS or Windows, they can gather their tech press and pressure Apple or Microsoft. If we find an accessibility bug, do we have enough clout, or unity, to pressure these companies? Writing feedback, testing software, trying new things, writing guides and fixing documentation, or, if able, translating software into other languages are all things that any blind person can do. I’m not saying that I’m perfect at any of this. I just think that we as a community can grow tremendously if we strike out from our comfortable Windows PC’s, Microsoft Word, audio games, TeamTalk, and old speech synthesizers.
I’ll give some projects you could try out and give feedback on:


Enable Oracle Application in a easy way
DB2 9.7 for Linux, Unix, and Windows has out-of-the-box support for Oracle's SQL and PL/SQL dialects.
This allows many applications written against Oracle to execute virtually unchanged against DB2.
Whether you want to switch your custom application or extend your DBMS vendor support,
its now time to break free with DB2! How ? Watch this video.


These are some examples of circuits implemented in CSS. None of these web pages contain any JavaScript at all.


Created by Joe Flynn / @prettyflyit
"the management of changes to documents, computer programs, large web sites, and other collections of information"
But why?
Many developers, one codebase. One mistake, and the build is (possibly irrevocably) broken.
Version control ensures this can't happen, by offering a back-up plan for failure, whilst allowing several developers to work on separate components independently without fear of conflict.
One developer may be developing a new feature, while another is fixing an unrelated bug.
Both developers may need to add or change code in the same files, in several parts of the file tree.
Without proper version control, this would be completely unmanageable.
Git is the de-facto standard for version control in a multi-user development project, offering security, flexibility, and most importantly, performance.
The algorithms implemented inside Git take advantage of deep knowledge about common attributes of real source code file trees, how they are usually modified over time and what the access patterns are.
The content of the files, as well as the true relationships between them, in the Git repository are secured with a cryptographically secure hashing algorithm called SHA1.
This protects the code and the change history against both accidental and malicious change and ensures that the history is fully traceable.
Git is flexible in several respects: in support for various kinds of nonlinear development workflows, in its efficiency in both small and large projects and in its compatibility with many existing systems and protocols.
A repository is a data structure used by Git to manage a set of files or information (usually code, but not always) as it changes over time.
Your local repository consists of three trees maintained by Git.
The first one is your working directory which holds the actual files.
The second one is the index which acts as a staging area, and finally the head which points to the last commit you've made.
There are many, MANY operations to learn when using Git. Some are extremely powerful, and should only be used by advanced users
We won't be looking at those just yet....
Initialising a repository is a fairly simple operation, but the first you should do on any new project.
Create a new directory, navigate to it, and use git init to initialise it as an empty repository
mkdir tech103
cd tech103
git init
When joining a team, it's likely that the code already exists on a remote repository, in which case you clone the repository to your local machine.
Like before, create a new directory and navigate to it, but this time, use the git clone command to create a local copy of it!
mkdir tech103
cd tech103
git clone https://gitlab.com/Tech103/Wizards/tech103.git
When cloning a remote repository, you don't just get the current version, you also get a complete history of every change made by every developer who modified it.
Ever.
Once you have a copy of the repository on your machine, the next thing to do before working on any features is create a branch.
Branches are used to develop features isolated from each other.
The master branch is the "default" branch when you create a repository. Use other branches for development and merge (more later) them back to the master branch upon completion.
git checkout master
git checkout -b tech103branch
This creates a virtual copy of the master branch, but in a separate working tree, so your work is isolated from the master.
Sometimes, you may need to make changes to a branch that hasn't yet been merged into master.
Perhaps a pull request (...more later) needs modified, after you've started a new feature (on a new branch, of course....)
In this situation, you can checkout the specific branch to work on
git checkout hotfix_001
As you begin working on new features, you may find yourself adding new files to the repository.
In this case, you are effectively 'staging' these files, before you commit (...more later) them to your branch.
git add index.html
Staging allows you to selectively add certain files to your next commit, whilst leaving the rest out of the commit.
You may have made changes in several files, but you only want one of those files to be added to the branch, and scrap the rest.
In this scenario, you can stage the files you want to keep in the index, and throw away the rest after committing.
Alternatively, if you're happy to stage all the files you've changed in a directory, we can use git add .
git add .
Once you're happy with the changes in your staging area, you commit them to your branch.
Committing changes is a way of saying "I'm happy with this, this can go to master someday...".
Rolling back commits is a tedious process, so make sure you're 100% with the changes before committing!
git commit -m 'Adding feature to process x in the y system'
Remember our Git History? Here's where it comes from. Every commit should have a descriptive message describing what the change is for.
NB: Miscellaneous Changes is not a good message!
Good commit messages!
-_____-
Once you do a git commit, it's important to note that your changes are now at your head, but are not yet on the remote branch.
This means you can make more than one commit before finally pushing (...more later) your changes to the remote branch.
Multiple commits are no bad thing, in fact, they provide a descriptive history of change... just don't go nuts.
Fixed a spelling mistake is a pointless commit, unless it's the last one you plan to make before pushing.
During the interim between getting the master branch, and developing your feature, some changes may have made their way into the master branch which are not yet on your branch.
Before pushing your changes, it's important to ensure your new code still works with whatever changes have been made to the master branch.
This is where git pull comes in handy.
git pull origin master
When you pull master into your branch, you are ensuring your local is in tandem with the master branch, so you can run your tests again to make sure it still works.
For the most-part, Git will auto merge the changes to master with your branch, whilst preserving your changed code.
However, from time to time, conflicts may arise.
A merge conflict can occur if two developers have made conflicting changes to the same piece of code in a file.
These will have to be resolved before you can push your changes, and it's the responsibility of the developer who has made changes which are not yet in master to fix them!
Usually these conflicts can be small things, and can be resolved reasonably easily. Usually.
When you attempt to push your changes, Git will list those files where merge conflicts exist, but to see a true difference, we use the git diff command.
git diff tech103branch master
From here, you can see where the conflicts in your branch are, and amend them accordingly.
To push your commits to the remote branch, we use the git push command.
This takes all the commits from your local index and pushes them to the remote version of the branch on the server.
git push origin tech103branch
Once you have pushed your changes to the remote version of your branch, and you're happy your feature is finished (including necessary unit and integration tests!), it's time to raise a pull request!
A pull request gives the other developers in your team a chance to review your changes, and determine if they can go into the master branch.
Whether you're using GitLab, GitHub, Bitbucket, or any other repository management suite, a pull request largely takes the same format.
Git will note all the differences between your branch, and the current master, and highlight the changes for your team to view.
This is where Git really becomes useful. The rest of your team can see quickly and easily all your changes, and cast a second (or third, fourth, etc) pair of eyes over them to make sure they work and won't break the build!
In general, there will be one (or more) people with the ability to merge to master, and are usually senior developers.
Once they have reviewed the changes, they can either merge the request, and your feature (or fix) is now in master, or comment on changes you need to make before they'll merge it!
Once it's merged.... move on to the next feature!
mkdir tech103// Make directory called tech103cd tech103// Change to tech103 directorygit init// Initialise bare repository
git clone https://gitlab.com/Tech103/Wizards/tech103.git// Clone remote repository
git checkout master// Checkout branch from master
git checkout -b tech103branch// Checkout new branch from head and switch
git checkout hotfix_001// Checkout specific branch
git add index.html// Stage index.html pre-commit
git add .// Stage all files in current directory
git commit -m 'Adding new index.html and assets'// Commit with message
git pull origin master// Pull master into current branch
git diff tech103branch master// View diff between branches
git push origin tech103branch// Push commits to remote branch


| Star | Watch | Fork |
| Home |
|---|
| User Guide |
| Examples |
| About |
The RSOME package supports optimization models that fit the general formulation below
\[\begin{align} \min ~~ &\sup\limits_{\mathbb{P}\in\mathcal{F}_0} \mathbb{E}_{\mathbb{P}} \left\{\pmb{a}_0^{\top}(\tilde{s}, \tilde{\pmb{z}})\pmb{x}(\tilde{s}) + \pmb{b}_0^{\top}\pmb{y}(\tilde{s}, \tilde{\pmb{z}}) + c_0(\tilde{s}, \tilde{\pmb{z}})\right\} &&\\ \text{s.t.} ~~ &\max\limits_{s\in[S], \pmb{z}\in\mathcal{Z}_{ms}}\left\{\pmb{a}_m^{\top}(s, \pmb{z})\pmb{x}(s) + \pmb{b}_m^{\top}\pmb{y}(s, \pmb{z}) + c_m(s, \pmb{z})\right\} \leq 0, && \forall m\in \mathcal{M}_1 \\ & \sup\limits_{\mathbb{P}\in\mathcal{F}_m}\mathbb{E}_{\mathbb{P}}\left\{\pmb{a}_m^{\top}(\tilde{s}, \tilde{\pmb{z}})\pmb{x}(\tilde{s}) + \pmb{b}_m^{\top}\pmb{y}(\tilde{s}, \tilde{\pmb{z}}) + c_m(\tilde{s}, \tilde{\pmb{z}})\right\} \leq 0, && \forall m\in \mathcal{M}_2 \\ & x_i \in \mathcal{A}\left(\mathcal{C}_x^i\right) && \forall i \in [I_x] \\ & y_n \in \overline{\mathcal{A}}\left(\mathcal{C}_y^n, \mathcal{J}_y^n\right) && \forall n \in [I_y] \\ & \pmb{x}(s) \in \mathcal{X}_s && s \in [S]. \\ \end{align}\]Here, parameters of proper dimensions,
\[\begin{align} &\pmb{a}_m(s,\pmb{z}) := \pmb{a}_{ms}^0 + \sum\limits_{j\in[J]}\pmb{a}_{ms}^jz_j \\ &\pmb{b}_m(s) := \pmb{b}_{ms}\\ &c_m(\pmb{z}) := c_{ms}^0 + \sum\limits_{j\in[J]}c_{ms}^jz_j \end{align}\]are defined similarly as in the case of RSOME for robust optimization and \(\mathcal{X}_s\) is an second-order cone (SOC) representable feasible set of a decision \(\pmb{x}(s)\) in the scenario \(x\). Constraints indexed by \(m\in\mathcal{M}_1\) are satisfied under the worst-case realization, just like those introduced in RSOME for robust optimization. Another set of constraints indexed by \(m\in\mathcal{M}_2\) are satisfied with regard to the worst-case expectation overall all possible distributions defined by an ambiguity set \(\mathcal{F}_m\) in the general form introduced in Chen et al. (2020):
\[\begin{align} \mathcal{F}_m = \left\{ \mathbb{P}\in\mathcal{P}_0\left(\mathbb{R}^{J}\times[S]\right) \left| \begin{array} ~\left(\tilde{\pmb{z}}, \tilde{s}\right) \sim \mathbb{P} & \\ \mathbb{E}_{\mathbb{P}}[\tilde{\pmb{z}}|\tilde{s}\in\mathcal{E}_{km}] \in \mathcal{Q}_{km} & \forall k \in [K] \\ \mathbb{P}[\tilde{\pmb{z}}\in \mathcal{Z}_{sm}| \tilde{s}=s]=1 & \forall s \in [S] \\ \mathbb{P}[\tilde{s}=s] = p_s & \forall s \in [S] \\ \text{for some } \pmb{p} \in \mathcal{P}_m & \end{array} \right. \right\},~~~ \forall m \in \mathcal{M}_2 \end{align}.\]Here for each constraint indexed by \(m\in\mathcal{M}_2\),
Dynamics of decision-making is captured by the event-wise recourse adaptation for wait-and-see decisions of two types—-the event-wise static adaptation denoted by \(\mathcal{A}(C)\) as well as the event-wise affine adaptation denoted by \(\overline{\mathcal{A}}(\mathcal{C}, \mathcal{J})\). In particular, given a fixed number of \(S\) scenarios and a partition \(\mathcal{C}\) of these scenarios (i.e., a collection of mutually exclusive and collectively exhaustive events), the event-wise recourse adaptation is formally defined as follows:
\[\begin{align} &\mathcal{A}\left(\mathcal{C}\right) = \left\{ x: [S] \mapsto \mathbb{R} \left| \begin{array} ~x(s)=x^{\mathcal{E}}, \mathcal{E}=\mathcal{H}_{\mathcal{C}}(s) \\ \text{for some } x^{\mathcal{E}} \in \mathbb{R} \end{array} \right. \right\}, \\ &\overline{\mathcal{A}}\left(\mathcal{C}, \mathcal{J}\right) = \left\{ y: [S]\times\mathbb{R}^{J} \mapsto \mathbb{R} \left| \begin{array} ~y(s, \pmb{z}) = y^0(s) + \sum\limits_{j\in\mathcal{J}}y^j(s)z_j \\ \text{for some }y^0(s), y^j(s) \in \mathcal{A}\left(\mathcal{C}\right), j\in\mathcal{J} \end{array} \right. \right\} \end{align}.\]Here, \(\mathcal{H}_{\mathcal{C}}: [S] \mapsto \mathcal{C}\) is a function such that \(\mathcal{H}_{\mathcal{C}}= \mathcal{E}\) maps the scenario \(s\) to the only event \(\mathcal{E}\) in \(\mathcal{C}\) that contains \(s\), and \(\mathcal{J} \subseteq [J]\) is an index subset of random components \(\tilde{z}_1\),…, \(\tilde{z}_J\) that the affine adaptation depends on. In the remaining part of the guide, we will introduce the RSOME code for specifying the event-wise ambiguity set and recourse adaptation rules.
rsome.dro
Environment In general, the rsome.dro
modeling environment is very similar to rsome.ro
discussed in the section Introduction to the rsome.ro
Environment, so almost all array operations, indexing and slicing syntax could be applied to dro
models. The unique features of the dro
model mainly come from the scenario-representation of uncertainties and a different way of specifying the event-wise adaptation of decision variables.
Similar to the rsome.ro
modeling environment, the dro
models are all defined upon Model
type objects, which are created by the constructor Model()
imported from the sub-package rsome.dro
.
class Model(builtins.object)
| Model(scens=1, name=None)
|
| Returns a model object with the given number of scenarios.
|
| Parameters
| ----------
| scens : int or array-like objects
| The number of scenarios, if it is an integer. It could also be
| an array of scenario indices.
| name : str
| Name of the model
|
| Returns
| -------
| model : rsome.dro.Model
| A model object
It can be seen that the dro
models are different from the ro
models in the first argument scens
, which specifies the scenario-representation of uncertainties. The scens
argument can be specified as an integer, indicating the number of scenarios, or an array of scenario indices, as shown by the following sample code.
from rsome import dro
model1 = dro.Model(5) # a DRO model with 5 scenarios
labels = ['sunny', 'cloudy', 'rainy', 'windy', 'snowy']
model2 = dro.Model(labels) # a DRO model with 5 scenarios given by a list.
In the general formulation, decision variables \(\pmb{x}(s)\) are event-wise static and \(\pmb{y}(s, \pmb{z})\) are event-wise affinely adaptive. The dro
modeling environment does not differentiate the two in creating these variables. Both types of decision variables are created by the dvar()
method of the model object, with the same syntax as the rsome.ro
models.
dvar(shape=(1,), vtype='C', name=None) method of rsome.dro.Model instance
Returns an array of decision variables with the given shape
and variable type.
Parameters
----------
shape : int or tuple
Shape of the variable array.
vtype : {'C', 'B', 'I'}
Type of the decision variables. 'C' means continuous; 'B'
means binary, and 'I" means integer.
name : str
Name of the variable array
Returns
-------
new_var : rsome.lp.DecVar
An array of new decision variables
All decision variables are created to be non-adaptive at first. The event-wise and affine adaptation can be then specified by the method adapt()
of the variable object. Details of specifying the adaptive decisions are provided in the section Event-wise recourse adaptations
The syntax of creating random variables for a dro
model is exactly the same as the ro
models. You may refer to the section Random variables and uncertainty sets for more details.
The dro
model supports the expectation of random variables, so that we could define the expectation sets \(\mathcal{Q}_{km}\) in the ambiguity set \(\mathcal{F}_m\). This is different from ro
models. The expectation is indicated by the E()
function imported from rsome
, as demonstrated by the sample code below.
from rsome import dro
from rsome import E # import E as the expectation operator
model = dro.Model()
z = model.rvar((3, 5)) # 3x5 random variables as a 2D array
E(z) <= 1 # E(z) is smaller than or equal to zero
E(z) >= -1 # E(z) is larger than or equal to -1
E(z).sum() == 0 # sum of E(z) is zero
Ambiguity sets \(\mathcal{F}_m\) of a dro
model can be created by the ambiguity()
method. The associated scenario indices of the ambiguity set can be accessed by the s
attribute of the ambiguity set object, as shown by the following sample code.
from rsome import dro
labels = ['sunny', 'cloudy', 'rainy', 'windy', 'snowy']
model = dro.Model(labels) # create a model with 5 scenarios
fset = model.ambiguity() # create an ambiguity set of the model
print(fset) # print scenarios of the model (ambiguity set)
Scenario indices:
sunny 0
cloudy 1
rainy 2
windy 3
snowy 4
dtype: int64
In the example above, strings in the list labels
become the labels of the scenario indices. If an integer instead of an array is used to specify the scens
argument of the Model()
constructor, then the labels will be the same as the integer values. Similar to the pandas.Series
data structure, labels of the scenario indices could be any hashable data types.
RSOME supports indexing and slicing of the scenarios via either the labels or the integer-positions, as shown by the following code segments.
print(fset[2]) # the third scenario
Scenario index:
2
print(fset['rainy']) # the third scenario
Scenario index:
2
print(fset[:3]) # the first three scenarios
Scenario indices:
sunny 0
cloudy 1
rainy 2
dtype: int64
print(fset[:'rainy']) # the first three scenarios
Scenario indices:
sunny 0
cloudy 1
rainy 2
dtype: int64
RSOME is also consistent with the pandas.Sereis
data type in using the iloc
and loc
indexers for accessing label-based or integer-position based indices.
print(fset.iloc[:2]) # the first two scenarios via the iloc[] indexer
Scenario indices:
sunny 0
cloudy 1
dtype: int64
print(fset.loc[:'cloudy']) # the first two scenarios via the loc[] indexer
Scenario indices:
sunny 0
cloudy 1
dtype: int64
The indices of the scenarios are crucial in defining components of the ambiguity set, such as sets \(\mathcal{Q}_{km}\), and \(\mathcal{Z}_{sm}\), which will be discussed next.
According to the formulation of the ambiguity set \(\mathcal{F}_m\) presented in the section The general formulation for distributionally robust optimization models, the SOC representable set \(\mathcal{Q}_{km}\) is defined as the support of the conditional expectation of random variables under the event \(\mathcal{E}_k\), which is a collection of selected scenarios. In the RSOME package, such a collection of scenarios can be specified by the indexing or slicing of the ambiguity set object, and constraints of the \(\mathcal{Q}_{km}\) are defined by the exptset()
method of the ambiguity set object. The help information of the exptset()
method is given below.
exptset(*args) method of rsome.dro.Ambiguity instance
Specify the uncertainty set of the expected values of random
variables for an ambiguity set.
Parameters
----------
args : tuple
Constraints or collections of constraints as iterable type of
objects, used for defining the feasible region of the uncertainty
set of expectations.
Notes
-----
RSOME leaves the uncertainty set of expectations unspecified if the
input argument is an empty iterable object.
Take the supports of conditional expectations below, for example,
\[\begin{align} &\mathbb{E}\left[\tilde{\pmb{z}}|s\in\mathcal{E}_{1}\right] \in \left\{\pmb{z}: \mathbb{R}^3 \left| \begin{array} ~|\pmb{z}| \leq 1 \\ \|\pmb{z}\|_1 \leq 1.5 \end{array} \right. \right\}, && \mathcal{E}_1 = \{\text{sunny}, \text{cloudy}, \text{rainy}, \text{windy}, \text{snowy}\} \\ &\mathbb{E}\left[\tilde{\pmb{z}}|s\in\mathcal{E}_{2}\right] \in \left\{\pmb{z}: \mathbb{R}^3 \left| \begin{array} ~\pmb{z} = 0 \end{array} \right. \right\}, && \mathcal{E}_2 = \{\text{sunny}, \text{rainy}, \text{snowy}\}, \end{align}\]where the first event \(\mathcal{E}_1\) is a collection of all scenarios, and the second event \(\mathcal{E}_2\) includes scenarios “sunny”, “rainy”, and “snowy”. The conditional expectation information of the ambiguity set can be specified by the code below.
from rsome import dro
from rsome import E
from rsome import norm
labels = ['sunny', 'cloudy', 'rainy', 'windy', 'snowy']
model = dro.Model(labels)
z = model.rvar(3)
fset = model.ambiguity() # create an ambiguity set
fset.exptset(abs(E(z)) <= 1,
norm(E(z), 1) <= 1.5) # the 1st support of conditional expectations
fset.loc[::2].exptset(E(z) == 0) # the 2nd support of conditional expectations
The ambiguity set fset
itself represents the event \(\mathcal{E}_1\) of all scenarios, and the loc
indexer is used to form the event \(\mathcal{E}_2\) with three scenarios included. Besides loc
, other indexing and slicing expressions described in the previous section can also be used to construct the events for the support sets of the expectations.
The support \(\mathcal{Z}_{sm}\) of random variables can be specified by the method suppset()
method, and the scenario information of the support can also be specified by the indexing and slicing expressions of the ambiguity set object. The help information of the suppset()
method is given below.
suppset(*args) method of rsome.dro.Ambiguity instance
Specify the support set(s) of an ambiguity set.
Parameters
----------
args : Constraints or iterables
Constraints or collections of constraints as iterable type of
objects, used for defining the feasible region of the support set.
Notes
-----
RSOME leaves the support set unspecified if the given argument is
an empty iterable object.
Take the following supports of random variables \(\tilde{\pmb{z}}\in\mathbb{R}^3\) for example,
\[\begin{align} &\mathbb{P}\left[\tilde{\pmb{z}}\in \left\{ \left. \pmb{z}: \mathbb{R}^3 \left| \begin{array} ~|\pmb{z}| \leq 1 \\ \|\pmb{z}\| \leq 1.5 \end{array} \right. \right\} \right| \tilde{s}=s \right]=1, &\forall s \in \{\text{sunny}, \text{rainy}, \text{snowy}\} \\ &\mathbb{P}\left[\tilde{\pmb{z}}\in \left\{ \left. \pmb{z}: \mathbb{R}^3 \left| \begin{array} ~\sum\limits_{j=1}^3z_j = 0 \end{array} \right. \right\} \right| \tilde{s}=s \right]=1, &\forall s \in \{\text{cloudy}, \text{windy}\}, \end{align}\]the RSOME code for specifying the supports can be written as follows.
from rsome import dro
from rsome import E
from rsome import norm
labels = ['sunny', 'cloudy', 'rainy', 'windy', 'snowy']
model = dro.Model(labels)
z = model.rvar(3)
fset = model.ambiguity()
fset.iloc[::2].suppset(abs(z) <= 1,
norm(z, 1) <= 1.5) # the support of z in scenarios 0, 2, 4
fset.iloc[1::2].suppset(z.sum() == 0) # the support of z in scenarios 1, 3
Note that a valid ambiguity set must have the support sets for all scenarios to be specified. An error message will be given in solving the model if any of the supports are unspecified. RSOME provides a method called showevents()
to display the specified supports for random variables and their expectations in a data frame, in order to help users check their ambiguity set.
from rsome import dro
from rsome import E
from rsome import norm
labels = ['sunny', 'cloudy', 'rainy', 'windy', 'snowy']
model = dro.Model(labels)
z = model.rvar(3)
fset = model.ambiguity()
fset.iloc[::2].suppset(abs(z) <= 1, norm(z, 1) <= 1.5)
fset.iloc[1::2].suppset(z.sum() == 0)
fset.exptset(abs(E(z)) <= 1, norm(E(z), 1) <= 1.5)
fset.loc[::2].exptset(E(z) == 0)
fset.showevents() # display how the ambiguity set is specified
| support | expectation 0 | expectation 1 | |
|---|---|---|---|
| sunny | defined | True | True |
| cloudy | defined | True | False |
| rainy | defined | True | True |
| windy | defined | True | False |
| snowy | defined | True | True |
As the example above shows, supports for all scenarios have been defined, and there are two supports defined for the conditional expectations.
In the event-wise ambiguity set, the support of scenario probabilities can also be specified via calling the method probset()
. The help information of this method is given below.
probset(*args) method of rsome.dro.Ambiguity instance
Specify the uncertainty set of the scenario probabilities for an
ambiguity set.
Parameters
----------
args : tuple
Constraints or collections of constraints as iterable type of
objects, used for defining the feasible region of the uncertainty
set of scenario probabilities.
Notes
-----
RSOME leaves the uncertainty set of probabilities unspecified if the
input argument is an empty iterable object.
The following sample code specifies an ellipsoidal uncertainty set of the scenario probabilities.
from rsome import dro
from rsome import norm
labels = ['sunny', 'cloudy', 'rainy', 'windy', 'snowy']
model = dro.Model(labels)
z = model.rvar(3)
fset = model.ambiguity()
p = model.p # p is the array of scenario probabilities
fset.probset(norm(p-0.2) <= 0.05) # define the support of the array p
The scenario probabilities are formatted as a one-dimensional array, which can be accessed via the attribute p
of the model object. Notice that two underlying constraints for probabilities: \(\pmb{p}\geq \pmb{0}\) and \(\pmb{e}^{\top}\pmb{p}=1\), are already integrated in the ambiguity set, so there is no need to specify them in defining the support of scenario probabilities.
Here we introduce how the event-wise static adaptation \(\mathcal{A}(\mathcal{C})\) and the event-wise affine adaptation \(\overline{\mathcal{A}}(\mathcal{C}, \mathcal{J})\) are specified in RSOME. Note that decision variables created in the rsome.dro
modeling environment are initially non-adaptive, in the sense that the event set \(\mathcal{C} = \{[S]\}\) and the dependent set \(\mathcal{J}=\varnothing\). These two sets can be modified by the adapt()
method of the decision variable object for specifying the decision adaptation, as demonstrated by the following sample code.
from rsome import dro
labels = ['sunny', 'cloudy', 'rainy', 'windy', 'snowy']
model = dro.Model(labels)
z = model.rvar(3)
x = model.dvar(3)
x.adapt('sunny') # x adapts to the sunny
x.adapt([2, 3]) # x adapts to the event of rainy and windy
x[:2].adapt(z[:2]) # x[:2] is affinely adaptive to z[:2]
In the code segment above, the scenario partition \(\mathcal{C}\) is specified to have three events: \(\{\text{sunny}\}\), \(\{\text{rainy}, \text{windy}\}\), and collectively the remaining scenarios \(\{\text{cloudy}, \text{snowy}\}\). The decision variable x[:2]
is set to be affinely adaptive to the random variable z[:2]
.
Similar to the linear decision rule defined in the ro
module, coefficients of an event-wise recourse adaptation could be accessed by the get()
method after solving the model, where
y.get()
returns the constant coefficients of the recourse adaptation. In cases of multiple scenarios, the returned object is a pandas.Series
with the length to be the same as the number of scenarios. Each element of the series is an array that has the same shape as y
.y.get(z)
returns the linear coefficients of the recourse adaptation. In cases of multiple scenarios, the returned object is a pandas.Series
with the length to be the same as the number of scenarios. Each element of the series is an array, and the shape of the array is y.shape + z.shape
, i.e., the combination of dimensions of y
and z
.Once the ambiguity sets \(\mathcal{F}_m\) and the recourse adaptation of decision variables are defined, the worst-case expectations in the objective function or constraints can be then specified. The ambiguity set of the objective function can be specified by the minsup()
method, for minimizing, or the maxinf()
method, for maximizing, the objective function involving the worst-case expectations. The documentation of the minsup()
method is given below.
minsup(obj, ambset) method of rsome.dro.Model instance
Minimize the worst-case expected objective value over the given
ambiguity set.
Parameters
----------
obj
Objective function involving random variables
ambset : Ambiguity
The ambiguity set defined for the worst-case expectation
Notes
-----
The ambiguity set defined for the objective function is considered
the default ambiguity set for the distributionally robust model.
Similar to ro
models, ambiguity sets of constraints indexed by \(m\in\mathcal{M}_2\), concerning the worst-case expectations, can be specified by the forall()
method, and if the ambiguity set of such constraints are unspecified, then by default, the underlying ambiguity set is the same as \(\mathcal{F}_0\) defined for the objective function. As for the worst-case constraints indexed by \(m\in\mathcal{M}_1\), the uncertainty set can also be specified by the forall()
method, and if the uncertainty set is unspecified, such worst-case constraints are defined upon support sets \(\mathcal{Z}_{0s}\) of the default ambiguity set \(\mathcal{F}_0\), for each scenario \(s\in[S]\). The sample code below demonstrates how the worst-case expectations can be formulated in the objective function and constraints.
from rsome import dro
from rsome import norm
from rsome import E
model = dro.Model() # create a model with one scenario
z = model.rvar(3)
u = model.rvar(3)
x = model.dvar(3)
fset = model.ambiguity() # create an ambiguity set
fset.suppset(abs(z) <= u, u <= 1,
norm(z, 1) <= 1.5)
fset.exptset(E(z) == 0, E(u) == 0.5)
model.maxinf(E(x @ z), fset) # maximize the worst-case expectation over fset
model.st((E(x - z) <= 0)) # worst-case expectation over fset
model.st(2x >= z) # worst-case over the support of fset
Bertsimas, Dimitris, Melvyn Sim, and Meilin Zhang. 2019. Adaptive distributionally robust optimization. Management Science 65(2) 604-618.
Chen, Zhi, Melvyn Sim, Peng Xiong. 2020. Robust stochastic optimization made easy with RSOME. Management Science 66(8) 3329–3339.
Wiesemann, Wolfram, Daniel Kuhn, Melvyn Sim. 2014. Distributionally robust convex optimization. Operations Research 62(6) 1358–1376.


Hacktoberfest, in its 8th year, is a month-long celebration of open source software run by DigitalOcean. During the month of October, we invite you to join open-source software enthusiasts, beginners, and the developer community by contributing to open-source projects.
For more information regarding this event checkout their official website- Hacktober Fest 2021
This website has been created to document the developers who contributed to the repositories of BlackTimber Labs as a part of HacktoberFest '21. Checkout the Contributors page to take a look atthe profiles of the contributors!
Contact


Test
group 1
item 1
item 2
group 2
item 3
A fairly short one-liner.
A longer message.
... perhaps broken onto two lines ...
a long one:
including a list
similar to the info
that pops up when hovering
the student life checkbox


Inference Base Class¶
All inference methods inherit from this api.
Base Class¶
-
class
Inference
[source]¶ Bases:
object
Abstract base class for all inference methods. All inference methods will inherit from this class and will thus share all common methods and attributes.
-
generate_latent_vars
(*args, **kwargs)[source]¶ See MCMC.py for ideas.
Parameters: model (cls) – contains methods for extracting latent variables from the DAG directed acyclic graph. Note
Although the user can implement their own graph and pass that to this inference engine. Provided there exists individual lists of the continuous, discrete and conditional variables as strings.
Example:
>>>cont_vars = ['x1', 'x2'] , disc_vars = ['x3'], cond_vars = ['x4']
For each cond_var there exists a predicate which must also be handled correctly. You will need a dictionary of pairs {‘condition”: boolean} of the conditioning statement and the boolean value associated with that statement
Example:
>>>{'cond101': True} comes from >>>x4 ~ sample(Normal(0,1)) >>>if x4 > 0 : >>> observe(N(1,0,1)) >>>else: >>> observe(N(-1,0,2)) >>> >>>'cond101' == x4 - 0 >>> Assume x4 = 1.73121, therefore {'cond101': True}
Note
You will also need the len_of_support of the discrete parameters, as pairs {‘str_of_discrete_latent’ : len_of_support}
Example:
>>>if x3 ~ sample(cat[0.1, 0.5, 0.4]) support = 3 ==> x3 \in [0,2]
Note
Depending on how you implement the unique names for generating your model and using those parameters in the inference, you will need a dict of pairs {‘original_name’:’inference_name’}.
-
generate_model
(*args, **kwargs)[source]¶ Creates the model code. This will interact with pysppl to generate a class, to compile the probabilistic program generate a graph describing that model. This class, depending on what compiler you use, should contains methods for extracting latent parameters and generating the lod_Pdf. See MCMC.py for more details.
Parameters: model_code (str) –
-


respiratory COVIDâ€� SARSâ€�CoVâ€� coronavirus ;:â€�. virus {border-style infection px;} #ffffff;} patients SARSâ€�CoV human acute infected novel Virol. brain Med neuroinvasive syndrome disease outbreak pneumonia px; reported severe studies {font-family ;():â€�. font-size like mice showed Indeed, Res. SARS SARSâ€�CoVâ€�. Wuhan, cerebrospinal double; encephalomyelitis failure health important infectious patients. spread symptoms ACE CNS COVIDâ€�. CoV MERSâ€�CoV Vet border-color border-width causes evidence fluid hemagglutinating neurological pathogenesis potential role solid; {font-style {font-weight (SARSâ€�CoVâ€�) BaiWZ, China. However, Med. Yashavantha affect angiotensin bold cases cells central clinical control courier; death em; encephalitis host illness including indicate invade invasion nervous neurons patient pt;} public route shown


You have already solved this puzzle!
{% elif hunt_is_over %}Sorry, hints are closed.
{% elif num_hints_remaining > 0 or num_free_answers_remaining > 0 %}Request a hint
{% else %}You have no hints available.
{% endif %} {% if hints %}Previously requested hints
{% for hint in hints %}Q: {{ hint.hint_question }}
{% if hint.status == 'NR' %}No response yet.
{% elif hint.status == 'ANS' %}A: {{ hint.response }}
{% elif hint.status == 'REF' %}A: {{ hint.response }}
(Your use of the hint was refunded.)
{% elif hint.status == 'OBS' %}Looks like you solved this puzzle before we could send you a response, nice! Your use of the hint was refunded.
{% endif %}
Asked {{ hint.submitted_datetime }}
You have not asked for any hints on this puzzle yet.
{% endif %}


Business Not Found!
Displaying Cases from: {{businessSearch.get('searchedBusiness')?.value}}
Case #{{i + 1}} Status: {{ data.status }}, Acquisition: {{data.acquisition}}, Age: {{data.age}}, Gender: {{data.gender}}


| About Dailyrotten |
|
Feedback
If you like this page, hate it, or would like to suggest changes,
<EMAIL_ADDRESS>is listening. This page
is experimental and somewhat different from what we usually offer, so please
do send your feedback.
Adding Stories
If you are a rotten newshound and you would like to suggest a story,
visit our submit page to
send us the URL. Stories that are accepted will have your name credited.
Viewership
On the first full day this page went live, 100,000 people visited this Rotten
News page. Of course that was the day after the WTC attacks, so that number is
somewhat distorted. Right now this page gets between 50,000 and 75,000 people
every day.
Linking
We encourage everyone to link to this page; if you like it, others probably
will as well.
Other Rotten
Rotten
Gaping Maw
Celebrity Morgue
Mugshots
Rotten Store
Shockumentary
Rate My Poo
Rate My Kitten
Rate My Finger
Penny Postcards
Phallic
Dr. Sputnik
Boners
Dead Pool
NNDB
Home
Make Dailyrotten your start page
|
|
|
February 20, 2003
Operation KFC: The chicken defense
Time | Submitted by: John
"Worried that the pollution from blown oil installations will clog up complicated detection equipment and make it difficult to pick up deadly chemicals and nerve agents, U.S. marines will drive into battle across the dusty plains of Iraq with caged chickens atop their Hum-Vees... Dubbed Operation Kuwaiti Field Chicken (KFC), the use of chickens is sure to enrage animal activists."
|
|
Read article...
|
|
How to break into an ATM. Really.
Cambridge University | Submitted by: Soylent
A student at Cambridge has found terrible flaws in the cryptographic protocols used to protect PIN (personal identification numbers) of ATM cards. It turns out that because these protocols are proprietary, nobody had really looked at them, and they are full of holes. Remembering that a bank's primary job is to protect money, this is astonishing. It should give everyone a warm and fuzzy feeling about the global banking system. Both files here are in Adobe PDF format. The second URL is an interesting gag order.
|
|
Read article... and
This article...
|
|
Clear Channel giving deregulation a bad name
Salon | Submitted by: Soylent
"Now the heat is coming from other media company executives and Beltway lobbyists. They are dismayed that Clear Channel is doing what many might have thought impossible. In an era when Republicans control the government and big business generally gets what it wants, Clear Channel is making deregulation look bad... The Commerce Committee," says BIA Financial's O'Brien, "was sending a message to the FCC about media consolidation: We don't want this to happen again."
|
|
Read article...
|
|
Albert Speer (Jr.) finding lebensraum in Beijing
The Scotsman | Submitted by: Soylent
"Albert Speer jnr, who was born a year after Hitler came to power, is among three contenders for a multi-billion pound contract hailed as the architectural Holy Grail of the new millennium... More than 60 years ago it was his father who dreamed of such glory. Hitler bestowed upon him the honour of rebuilding the Reich capital to become a metropolis like no other."
|
|
Read article...
|
|
Don't eat the giant shrimp
Honolulu Advertiser | Submitted by: ryan
"State Department of Health signs posted along the canal warn people not to eat fish or shellfish found in the Ala Wai because of possible contamination from urban runoff into the Waikiki waterway. But that didn't stop Keith Harvey, a barge mate working on the Ala Wai dredging project. Harvey cooked one of several Mantis Shrimp (Odontodactylus Scyllarus) pulled from the mud at the bottom of the canal. The largest shrimp weighed in at 1.35 pounds and 15 inches."
|
|
Read article...
|
|
Convicted of 3,066 counts, gets 15 years
Wire Services | Submitted by: Penfold
A Moroccan student convicted Wednesday of 3,066 counts [yes, thats more than three thousand counts] of accessory to murder for helping three suicide pilots in the Sept. 11 attacks on the United States was given a whopping sentence of 15 years in jail.   The disclosure by Clark concerned the arrest and taped admissions of Kenneth L. Jenkins, 20, who was charged with first- degree murder last week in the death of his daughter, A'shia, whose body has not been found."
|
|
Read article...
|
|
eBay to Law Enforcement: We're here to help
Yale | Submitted by: Cyclograph
"We [eBay] try to make rules to make it difficult for people to commit fraud and easy for you [law enforcement agencies] to investigate. One is our Privacy policy. I know from investigating eBay fraud cases that eBay has probably the most generous policy of any internet company when it comes to sharing information... "So, that really opens the door for us. That means that what our policy is that if you are law enforcement agency you can fax us on your letterhead to request information: who is that beyond the seller ID, who is beyond this user ID. We give you their name, their address, their e-mail address and we can give you their sales history without a subpoena."
And now they own PayPal, whoom have been touting themselves as a replacement for your normal bank for years (nevermind they aren't FDIC insured) it's not just auction transaction information they can hand out. Now it's all up for grabs for any agency that cares to inquire... no subeona or questions asked!
|
|
Read article...
|
|
Utah may add a tax on sex industries
Deseret News | Submitted by: Porn Lover
"A revised version of legislation that would levy an additional tax on sex related industries, and save the state porn czar's job in the process, has surfaced at the 2003 Legislature... HB300 would impose an additional 10 percent tax on escort services and strip clubs, diverting half of the revenue to adult and youth corrections' sex offender treatment programs." Except the people engaging in those activities aren't exactly dangerous sex offenders.
|
|
Read article...
|
|
Tractor crushes police pursuers
TwinCities.com | Submitted by: Violet
"Baffled by how to stop the mechanical beast, deputies followed it at speeds only up to 30 mph on country roads for 20 miles, watching helplessly as it crushed a Grant County (Minn.) Sheriff's Department squad car with its 6-foot tires. "It was kind of a hopeless feeling," said Grant County Sheriff's Deputy Dale Christopherson, describing the moment when the tractor's front end rode up onto the trunk of his squad, shattering the back windshield."
|
|
Read article...
|
|
Ghana gold workers paid in condoms
BBC | Submitted by: Ann Onymous
"A gold mining company in Ghana says it has managed to reduce Aids and HIV infection rates among its workers by over 75%, by giving staff condoms in their pay packets. Ashanti Goldfields says the number of infections at its Obuasi mine fell from 271 in 1998 to 62 last year. The mine's human resources manager, Elaine Kwame, told the BBC's Network Africa programme that the scheme had been chosen as the most effective way of getting the Aids prevention message across to all staff."
|
|
Read article...
|
|
Drive to the airport, get your car searched
Minneapolis Star Tribune | Submitted by: Squeak, the Human Chew Toy
"Responding to concerns about possible violations of civil liberties, police at Minneapolis-St. Paul International Airport on Tuesday suspended their day-old practice of randomly searching cars and trucks entering the airport... The enhanced security was ordered by the federal Transportation Security Administration (TSA) in response to the elevation of the national terrorist warning system from yellow to orange."
|
|
Read article...
|
|
Starballz: Star Wars parody porn
E! | Submitted by: anonymous
This is an older story, from 2002: "The Jedi mastermind's Lucasfilm empire has struck out in the first round of its legal battle with some upstart pornographers. At issue: the X-rated Starballz cartoon... Last week, a federal judge in San Francisco decided against blocking the sale of the animé saga of "Wank Solo," clearing the way for Starballz creator Media Market Group to resume hawking the $14.95 video online."
|
|
Read article...
|
|
Jesse Jackson's slight conflict of interest
Fox News | Submitted by: Dirty Sammy
"Mosley told Fox News that he wrote the owners two months ago about "over-crowding" at the club, also called E2, and the "catastrophic potential if an emergency occurred... "I was certainly outraged knowing this was something that clearly could have been prevented," Mosley said, adding that when he showed the letter to Jackson's Rainbow-PUSH organization on Monday, officials there were obviously not interested... "It was clearly not on the agenda. As a matter of fact, I was told to put the letter away," Mosley said."
|
|
Read article...
|
|
Teenage lesbian blood lust shocker
ic Berkshire | Submitted by: Dirty Sammy
"A teenage lesbian who went berserk after discovering her partner had been having sex in a churchyard with her best friend was jailed for three years on Friday... Furious Sarah White grabbed a foot-long kitchen knife and slashed her love rival across the face."
|
|
Read article...
|
|
Nine year old beats granny with shopping cart
South Florida Sun-Sentinel | Submitted by: Dirty Sammy
"A 9 year old boy who was home while suspended from school was arrested and charged Tuesday after he allegedly struck his 88-year-old grandmother with a shopping cart, wrapped a blanket over her head to quiet her then pelted her with rocks, police said." The boy's 11 year old brother: "He does that to me all the times. My brother is very bad. He is always getting in trouble at school."
|
|
Read article...
|
|
The Bible As hate literature
World Net Daily | Submitted by: Dirty Sammy
"Certain passages of the Bible can be construed as hate literature if placed in a particular context, according to a Canadian provincial court... Leviticus 20:13, says, according to the New International Version, "If a man lies with a man as one lies with a woman, both of them have done what is detestable. They must be put to death; their blood will be on their own heads."
|
|
Read article...
|
|
Sad but true, beloved Mungo Man not so old
Wire Services | Submitted by: Ryan Duggan
Mungo Man, Australia's oldest dead body has recently been found to only be 40,000 years old. twenty two thousand short of its supposed 62,000 year old status: "The age of the skeleton is important because if the remains are younger than previously expected they fit in better with the "out of Africa" theory, which suggests early humans migrated from Africa to other parts of the globe."
|
|
Read article...
|
|
Heroic individual's third attempt to arrest Mugabe
London Telegraph | Submitted by: f00f
"We summoned the police and handed him over, together with affidavits from Zimbabwe torture victims. But the police let Mugabe go and arrested us instead. The Attorney-General and Metropolitan Police Commissioner have never explained why they freed this torturing tyrant and allowed him to return to Zimbabwe to continue his reign of murder and mayhem."
|
|
Read article...
|
|
Spam killing leaves Nigerian diplomat dead
The Register | Submitted by: anonymous
"Unconfirmed, and thus far sketchy reports, suggest the unnamed suspect was a victim of a 419 (AKA advanced fee) fraud... The scam called 419, after the relevant section of Nigeria's criminal code, begins with offers of sums beyond the dreams of avarice in exchange for use of a Western bank account."
|
|
Read article... and
This article...
|
|
|
|
|


Why should I carpool?
1. Carpooling saves gas, money and time.
2. Parking permits can be hard to get and carpool permits are always available.
Why should I use this app?
1. The current way to find someone to carpool with difficult.
2. College life is busy and not everyone can match your schedule but there's always someone available.


Gatekeeper Mozella:
Ah! You are too strong for the Gate of Time and Space to open. You seem to have exceeded the limits of the tower's magnetic field.
(Characters who are level 56 and above cannot enter the Cruma Tower.)


I had the pleasure to contribute to an open source project in the summer of 2020, from a distance, due to the coronavirus pandemic.


Point Break
Chad'z rating: ** (out of 4 = fair)
1991, R, 122 minutes [2 hours, 2 minutes]
[thriller]
starring: Keanu Reeves (Johnny Utah), Patrick Swayze (Bodhi), Gary Busey (Pappas), Lori Petty (Tyler), written by W. Peter Iliff, Rick King, produced by Peter Abrams, Robert L. Levy, directed by Kathryn Bigelow.
Although "Point Break" is one of the most cliche action/crime movies I've ever seen, it is tolerable to watch because its premise of crime as the ultimate rush gives the film a unique hook. However, that theme could have been conveyed better by not shoving it down our throats.
The story is a retread of staple action and crime formulas: the rookie and the seasoned pro; the crime fighting camaraderie; the mean, cynical captain; the rookie who almost blows his cover; the woman who falls for the rookie; and of course the uncatchable criminals. Surprisingly enough, the beginning of the film and the establishing of these elements work rather well.
Keanu Reeves stars as Johnny Utah (could that name be any more made up?), a rookie FBI agent who is paired with Pappas (Busey), the veteran who has been trying to catch a gang of bank robbers known as the Ex-Presidents for years. We get some details and interesting detective work that leads them to believe the robbers are surfers, and so Johnny goes undercover to try and find the criminals.
One of the cardinal rules of undercover stories is that the hunky hero must be involved with a woman so the bad guys can later use her for blackmail. Lori Petty plays that role to the letter as Tyler, a surfer who Johnny manages to seduce to teach him how to surf and to absorb him into the community. Now this is all fine and good, and it doesn't seem too predictable at the time, but the film lingers on the joy of surfing a little too much. Reeves is a fine actor, but he isn't convincing when he is having an adrenaline rush. He's even less convincing when he infiltrates the community and is "accepted" by Bodhi (Swayze), a drifter in pursuit of "The Ultimate Rush."
The first act builds up to a fantastic action scene as Utah, Pappas, and the FBI bust who they thought were the Ex-Presidents, but turn out to be just drug dealers. Then everything starts to conviently fall into place: Johnny realizes the bank robbers have been under his nose all along and somehow figures out where they will strike next. Then there are some more over-the-top action sequences, and a part of me couldn't help getting caught up in the action and thrill of it all. I was impressed by some of the camera work during the chase scene, but as soon as it ended the film took a drastic nose dive.
The final act of really lost me. Johnny knows Bodhi and his friends are the Ex-Presidents and vice versa, but they all continue to act like friends. They take Johnny skydiving and we think this will be another action-packed escape scene but it's not. In fact, throughout this film there are many scenes of surfing and skydiving that serve no purpose but to try and get the viewer pumped because the story is not interesting nor clever enough to do it.
By the end we get many shoot-outs and nearly everyone dies. The final scene is what should be a case of poetic justice, but turns out to be something that's just plain dumb.
"Point Break" certainly had great potential to it. It could have been an intricate crime and detective story or it could have been just a drama about finding the greatest rush. Unfortunately, it tries to mix both with gratuitous stunts and adventure, and the result is another action flick in disguise.
e-mail<EMAIL_ADDRESS>(C) 1997 Chad Polenz
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


67 Why would you want a block to take a procedure as input? This is actually not an obscure thing to do; the primitive conditional and looping blocks (the C-shaped ones in the Control palette) take a script as input. Users just don’t usually think about it in those terms! We could write the repeat block as a custom block this way, if Snap ! didn’t already have one: The lambda (λ) next to action in the prototype indicates that this is a C-shaped block, and that the script enclosed by the C when the block is used is the input named action in the body of the script. The only way to make sense of the variable action is to understand that its value is a script. To declare an input to be Procedure-type, open the input name dialog as usual, and click on the arrowhead: Then, in the long dialog, choose the appropriate Procedure type. The third row of input types has a ring in the shape of each block type (jigsaw for Commands, oval for Reporters, and hexagonal for Predicates). In practice, though, in the case of Commands it’s more common to choose the C-shaped slot on the fourth row, because this “container” for command scripts is familiar to Scratch users. Technically the C-shaped slot is an unevaluated procedure type, something discussed in Section E below. The two Command-related input types (inline and C- shaped) are connected by the fact that if a variable, an item (#) of [list] block, or a custom Reporter block is dropped onto a C-shaped slot of a custom block, it turns into an inline slot, as in the repeater block’s recursive call above. (Other built-in Reporters can’t report scripts, so they aren’t accepted in a C-shaped slot.)


JNU admin constitutes committee for finding solution to hostel issues
The students went on a protest after JNU administration gave its nod to the new hostel manual, including fee hike.
NEW DELHI: Jawaharlal Nehru University (JNU) administration on Sunday said that a High-Level committee has been constituted by competent authority to get suggestions from the student representatives on finding a solution to the hostel issues.
A circular issued by the JNU said, "This is for the information of all concerned that a High-level committee has been formed by the competent authority to get suggestions from the student representatives on finding a solution to the hostel issues."
The names of seven members of the Committee are Professor Rana P Singh, Professor Ashwini Mohapatra, Professor Girish Nath Jha, Professor Pawan Kumar Dhar, Professor Umesh A Kadam, Professor Vandana Mishra, and Dr Neeraj Samajdar, the circular said.
The students went on a protest after JNU administration gave its nod to the new hostel manual, including fee hike.


---
layout: slides-reveal
title: "Moving from Excel to Google Maps: Transit Data and an Introduction to GTFS"
theme: stark
markdown: true
date: 2021-09-10
tags: slides
transition: none
highlight: "xcode.css"
css: >-
.reveal blockquote {
background: hsl(60deg 100% 75%);
text-align: justify;
font-weight: 300;
margin-left: 0;
width: 90%
}
.print-pdf .reveal blockquote {
background: white;
color: #121212;
}
.reveal blockquote>p {
font-style: normal;
padding: 0 1.5rem;
}
.reveal:not(.overview) .slides {
text-align: left;
}
.reveal table {
font-size: 1.2rem;
font-family: monospace;
}
em {
color: deeppink;
}
.hljs {
font-size: 1rem
}
---
## Moving from Excel to Google Maps:
**Transit Data and an Introduction to GTFS**
Malcolm Meyer
2021 Ohio GIS Conference
---
## What is Wisdom
> [The goal is] not to develop full confidence in everything you do, but to become confident in the fact that you probably don’t know what you’re doing.
[~ Mark Manson, 2021](https://markmanson.net/newsletters/mindfck-monthly-92)
---
# What is GTFS?
---
> The General Transit Feed Specification (GTFS) is a data specification that allows public transit agencies to publish their transit data in a format that can be consumed by a wide variety of software applications. Today, the GTFS data format is used by thousands of public transport providers.
---
![](img/google_transit.png)
---
# The Static Feed
---
> A GTFS feed, which contains static transit information, is composed of a number of text (.txt) files that are contained in a single ZIP file. Each file describes a particular aspect of transit information: stops, routes, trips, fares, etc.
---
Required Tables
|Filename|Required|Description|
|-|-|-|
|agency.txt |Required |Transit agencies|
|stops.txt |Required |Transit Stops and stations|
|routes.txt |Required |Transit routes and loops|
|trips.txt |Required |Specific schedule per route|
|stop_times.txt |Required| Arrival and deaprture times|
|calendar.txt |Conditional|Weekly Scheudle|
|calendar_dates.txt |Conditional|Schedule Exceptions|
---
## Existing Data
- Stops (Points) stops.txt
- Routes (Lines) routes.txt
---
![transit print map](img/existing_data.png)
---
## Manually Create Tables
|Filename|Required|Description|
|-|-|-|
|*agency.txt* |Required |Transit agencies|
|stops.txt |Required |Transit Stops and stations|
|routes.txt |Required |Transit routes and loops|
|trips.txt |Required |Specific schedule per route|
|stop_times.txt |Required| Arrival and deaprture times|
|*calendar.txt* |Conditional|Weekly Scheudle|
|*calendar_dates.txt* |Conditional|Schedule Exceptions|
---
agency.txt
|agency_name|agency_url|agency_timezone|agency_lang|agency_phone|
|-|-|-|-|-|
|Lancaster-Fairfield Public Transit System|https://www.ci.lancaster.oh.us/242/Transit|America/New_York|en|7406815086|
---
calendar.txt
|service_id|monday|tuesday|wednesday|thursday|friday|saturday|sunday|start_date|end_date|
|-|-|-|-|-|-|-|-|-|-|
|1|1|1|1|1|1|0|0|20210101|20220101|
|2|1|1|1|1|0|0|0|20210101|20220101|
---
calendar_dates.txt
|service_id|date|exception_type|
|-|-|-|
|1|20211231|2|
|1|20210331|2|
|1|20210704|2|
|1|20211006|2|
|1|20211125|2|
|1|20211224|2|
|2|20211231|2|
|2|20210331|2|
|2|20210704|2|
|2|20211006|2|
|2|20211125|2|
|2|20211224|2|
---
## Routes, Stops & Trips
> How can we create these required tables from our exiting GIS data?
- [Excel Tool from National RTAP](https://www.nationalrtap.org/Technology-Tools/GTFS-Builder)
- Custom NodeJS Script
---
## NodeJS Scripted Tables
|Filename|Required|Description|
|-|-|-|
|agency.txt |Required |Transit agencies|
|*stops.txt* |Required |Transit Stops and stations|
|*routes.txt* |Required |Transit routes and loops|
|*trips.txt* |Required |Specific schedule per route|
|*stop_times.txt* |Required| Arrival and deaprture times|
|calendar.txt |Conditional|Weekly Scheudle|
|calendar_dates.txt |Conditional|Schedule Exceptions|
---
## NodeJS Script
- Load the manually created files
- Convert existing data to GeoJSON and load into NodeJS
- Iterate through all the routes and stops to create the necessary tables
---
function genRoutes(geojson, filepath) {
const routeIds = [];
const routeNames = [];
let routesTxt = "route_id,route_short_name,route_long_name,route_color,route_text_color,route_type";
geojson.features.forEach(f => {
const p = f.properties;
const names = p.route_short_name.split(",");
const id = p.route_id;
names.forEach(n => {
if (!routeNames.includes(n)) {
routesTxt += ["\n"+ id,id,n,p.route_color,p.route_text_color,"3"].join(",");
routeNames.push(n);
routeIds.push(id)
}
})
});
fs.writeFileSync(filepath, routesTxt, "utf-8")
}
---
routes.txt
|route_id|route_short_name|route_long_name|route_color|route_text_color|route_type|
|-|-|-|-|-|-|
|1|1|MEMORIAL|8400A8|FFFFFF|3|
|2|2|MAIN|185BE8|FFFFFF|3|
|3|3|WEST|38A800|FFFFFF|3|
|6|6|SHERIDAN|f57f17|FFFFFF|3|
|7|7|CARROLL OUTBOUND|00bfff|FFFFFF|3|
|8|8|CARROLL INBOUND|00bfff|FFFFFF|3|
|9|9|RICKENBACKER OUTBOUND|000000|FFFFFF|3|
|10|10|RICKENBACKER INBOUND|000000|FFFFFF|3|
|5|5|PICKERINGTON|FF00C5|FFFFFF|3|
---
## Stops, Trips & Stop Times
> Similar process for `stops.txt` and `trips.txt`. However the `stop_times` table is a bit more complex, even so the functional code is less than 200 lines.
---
stops.txt
|stop_name|stop_id|stop_lat|stop_lon|
|-|-|-|-|
|Job And Family Services|1|39.71517362|-82.6059031|
|Memorial Dr @ Reber Ave|2|39.72492779|-82.6084866|
|Plaza Shopping Center (Advance Auto Parts)|3|39.72757795|-82.6099478|
|Memorial Dr @ S Arlington Ave|4|39.72984435|-82.6117948|
|S Arlington Ave @ Columbus St|5|39.73226791|-82.6105694|
|Pershing House (Upon Request)|6|39.73275969|-82.6125984|
|Columbus St @ Bowlan Dr.|7|39.73518691|-82.6151732|
|Whittier Dr S @ Schorrway Dr|8|39.73422017|-82.6226934|
|Lowes|9|39.73735893|-82.6292069|
|Golden Corral|10|39.73809083|-82.6316346|
|FMC (Columbus St)|11|39.74018154|-82.6334001|
---
trips.txt
|route_id|service_id|trip_id|
|-|-|-|
|1|1|1_1|
|1|1|1_2|
|1|1|1_3|
|1|1|1_4|
|1|1|1_5|
|1|1|1_6|
|5|2|5_1|
|5|2|5_2|
|5|2|5_3|
|5|2|5_4|
---
## Issues
- Some lines route through the same stop.
- **Workaround**: create duplicate stop points for each route as needed.
- Google GTFS cannot use *request only* stops.
- **Workaround**: remove those stops from the Google feed.
- Stop times are on 5 minute intervals.
- **Workaround**: manually edit arrival times.
---
trip_times.txt
|trip_id|stop_id|arrival_time|departure_time|stop_sequence|drop_off_type|timepoint|
|-|-|-|-|-|-|-|
|1_1|1|7:00:00|7:00:00|1|0|0|
|1_1|2|7:01:00|7:01:00|2|0|0|
|1_1|3|7:02:00|7:02:00|3|0|0|
|1_1|4|7:03:00|7:03:00|4|0|0|
|1_1|5|7:04:00|7:04:00|5|0|0|
|1_1|6|7:05:00|7:05:00|6|3|0|
|1_1|7|7:06:00|7:06:00|7|0|0|
|1_1|8|7:08:00|7:08:00|8|0|0|
---
---
# Final Outputs
---
---
---
![](img/google_transit.png)
---
---
## Contracts!
> Google requires a signed contract which has contains language that may not be acceptable for some municipalities or agencies.
---
# Thanks
Malcolm Meyer
**@getBounds** on twitter and the web


- Title
- Melbourne and Mars : my mysterious life on two planets : extracts from the diary of a Melbourne merchant
Versions
Related Entries
Authors
Related Bibliography
Is Version Of
- Fraser, Joseph, Melbourne and Mars : my mysterious life on two planets : extracts from the diary of a Melbourne merchant , Pater & Knapton Print, Melbourne, 1889, 104 pp. Details


s6-linux-init
Software
skarnet.org
Quickstart and FAQ for s6-linux-init
Quickstart
- Install all the s6-linux-init dependencies:
- Save and remove your old /etc/s6-linux-init directory, if you have one.
- Install s6-linux-init itself.
- Save your old /sbin/init, /sbin/telinit, /sbin/shutdown,
/sbin/halt, /sbin/poweroff and /sbin/reboot binaries.
- Make sure you have a /run directory.
- Edit the scripts in /etc/s6-linux-init/skel.
- Check that your devtmpfs is automounted by your kernel at boot time. If it is not,
add the -d /dev option to the s6-linux-init-maker command line below.
- As root, run:
rm -rf /tmp/blah
s6-linux-init-maker -1 -G "/sbin/getty 38400 tty1" /tmp/blah
rm -rf /etc/s6-linux-init/current
mv /tmp/blah /etc/s6-linux-init/current
cp -a /etc/s6-linux-init/current/bin/* /sbin/
- Reboot. Warning: use your old reboot command, that you saved, not the new one
that has just been created by s6-linux-init-maker, because you're still running on
your old init system and need to use a reboot command that matches it.
- After the reboot: congratulations! your machine is now running an s6-based init system.
- To shut the machine down, use /sbin/shutdown, /sbin/halt,
/sbin/poweroff or /sbin/reboot as usual.
FAQ
How do I convert a runit setup to an s6 one?
A runit and an s6 setup are very similar. There are just three things you
need to pay attention to:
- runsv supports
customized controls, whereas
s6-supervise does
not. Fortunately, very few services use the customized control feature of
runit; and s6 supports customizing the termination signal to a process via the
down-signal file,
which can replace 99% of the legit uses of customized control. So, you should
check your service directories for control/ subdirectories, and
adapt them depending on how your service handles controls. If a service does
not use customized controls, you don't need to make any change and the service
will run under s6-supervise as is.
- The interface of svlogd,
runit's logger, is different from the interface of
s6-log, s6's logger.
Namely, svlogd reads a config file in its log directory, while s6-log reads its
configuration on its command line. If you have logging services that use svlogd,
you should read their configuration in their logdir, and translate it to the
proper s6-log invocation.
- And, finally, the init process. Understanding how s6-linux-init works may
seem daunting, but using it really is a lot simpler than it looks.
In a runit setup, you have
the runit program running as
pid 1, and sequentially spawning /etc/runit/1, then /etc/runit/2
which contains the invocation of
runsvdir, and finally
/etc/runit/3 at shutdown time when runsvdir is dead.
In a s6 setup that you have booted via
s6-linux-init, the scanner,
s6-svscan (the equivalent
of runsvdir), runs as
pid 1, very early, and remains there for the whole lifetime of the machine. At
boot time, the /etc/s6-linux-init/current/scripts/rc.init script is run, with
the supervision tree already in place; when it exits, the system is supposed to
be in a fully-booted, stable state. At shutdown time (on receipt of a shutdown
command), the /etc/s6-linux-init/current/scripts/rc.shutdown script is run,
with the supervision tree still in place; when it exits, the
filesystems will be unmounted and the machine will be rebooted and/or stopped.
So, the quickest way to port a runit setup to an s6-linux-init one is to:
- Copy your /etc/runit/1 to /etc/s6-linux-init/current/scripts/rc.init.
The only thing you should remove here is the creation of /run, because s6-linux-init
has already mounted a tmpfs on /run. But basically all the rest should stay.
- Also copy the parts of /etc/runit/2, if any, that come before the
runsvdir invocation, to
/etc/s6-linux-init/current/scripts/rc.init.
- At the end of /etc/s6-linux-init/current/scripts/rc.init, symlink all
your runit service directories to /run/service, and call
s6-svscanctl -a /run/service. This will start and supervise all the services
that you have symlinked, the way the original runsvdir invocation would have.
- Copy your /etc/runit/3 to /etc/s6-linux-init/current/scripts/rc.shutdown,
removing the parts that unmount the filesystems and reboot the machine.
Once you have done that, you have a literal translation of your runit system into a
s6 system, and it should boot, and work, albeit in a non-idiomatic, unoptimized way.
If you don't want to overwrite your /sbin/init binary, you can boot with
init=/etc/s6-linux-init/current/bin/init as a kernel command line argument
to reach the s6-linux-init entry point.
Further work to make the setup prettier can include:
- Identifying daemons you run in /etc/s6-linux-init/current/scripts/rc.init
and making them early services instead.
- Or, more idiomatically, analyze your whole boot sequence in
/etc/s6-linux-init/current/scripts/rc.init and the daemons in your runit
service directories, and convert the boot sequence so it can be handled by a service manager,
for instance s6-rc.
Colin Booth has a
series
of posts on Reddit that go into more detail on how to use a Void Linux distribution,
which natively uses runit, with the s6 ecosystem instead; there are step-by-step tutorials
as well as turnkey solutions, and it is recommended reading even if you do not use Void.