Simple physics demo.
Click and drag to create a particle
Alt + click and drag to create a wall.
Ctrl + click and drag to change gravity.
Press the spacebar to toggle trails on/off.


Dogdog's Schedule
Monday
Eat
Walk
Meet
Daisy
for doggie
date
Wednesday
Bark to to get outside
Chew on a shoe
Dogdog dog park
Friday
Sleep in
Dog training
Swimming at river
Main menu


--- title: sampleproj keywords: fastai sidebar: home_sidebar summary: "This is an nbdev tutorial implementation of Cards module from Think Python 2." description: "This is an nbdev tutorial implementation of Cards module from Think Python 2." nb_path: "00_card.ipynb" ---
Card is a class that represents a single card in a deck of cards. For example:
Card(suit=2, rank=11)
c = Card(suit=1, rank=3)
assert str(c) == '3 of Diamonds'
c2 = Card(suit=2, rank=11)
assert str(c2) == 'Jack of Hearts'
You can do comparisons of cards, too!
assert c2 > c
Note: Look at fastcore's testing utilities for convenience functions that print out helpful error messages by default when there is an error.
You can show the docs for methods by calling show_doc. For example, the code show_doc(Card.eq) produces the following documentation:
Checks whether self and other have the same rank and suit.
card1 = Card(suit=1, rank=3)
card2 = Card(suit=1, rank=3)
assert card1 == card2


Enter names in the fields, then click "Submit" to submit the form:
Enter your loan balance:
Enter your interest rate:
Enter your loan term:
Enter your annual income:


ONCE UPON A TIME ... WHEN WE WERE COLORED A film review by Steve Rhodes Copyright 1996 Steve Rhodes
RATING (0 TO ****): ***
ONCE UPON A TIME ... WHEN WE WERE COLORED is based on the best selling memoirs of Clifton Taulbert. It tells of a time and a people in the south that is rarely dealt with on film. It starts in Colored Town which is the name of the black community on the wrong side of the railroad tracks in Glen Allan, Mississippi. The film starts in the year is 1946 when segregation is in full force.
Wait a minute, you are probably saying. I have seen a lot of movies about racial discrimination in the south. As you start to tick off the movies (MISSISSIPPI BURNING, etc.), ask yourself how many of these focus on the black community itself. If you examine most of the films, you will see that they are more about whites and what bad things the whites do to the blacks. You see a lot of blacks as victims, but rarely do you see the blacks coming together for community, for support, and for fun as you do in ONCE UPON A TIME ... WHEN WE WERE COLORED.
Here the whites appear periodically and serve to remind the audience of why the blacks suffered. Even the whites are more realistically drawn than normal. You see how uncomfortable some of them are with the system they feel trapped in, but go along with anyway. Other whites rebel and try to help. All of this notwithstanding, the whites play a minor role in the picture, which I found totally refreshing and much more involving. Other than "Roots," which was set in a different era, I do not remember a film that taught so much of what it is to be part of the black community. Massive discrimination is shown certainly, but the great script adaptation (Paul W. Cooper) keeps the focus on the blacks themselves.
Like the marvelous film TO LIVE from a couple of years ago, the show is told in small segments. It starts when Cliff is born and then skips to age 5 (Charles Earl Taylor Jr.), 12 (Willis Norwood Jr.), and finally 16 (Damon Hines). This means the films spans the turbulent era of 1946-1962. Since I was born in 1946 and grew up in the south, the discrimination presented here from the separate water fountains to the rest rooms labeled "whites" and "colored," I can remember all too well. Repugnant as it was, it did happen; I remember. I was there.
In one of the most poignant, but simple scenes from the show, Cliff's grandfather "Pappa" (Al Freeman Jr.) asks 5 year old Cliff several times before they leave to make the big trip to an adjoining town if he needs to go to the bathroom again, and Cliff says no. When Pappa stops for gas, the child announces he has to go, but Pappa shakes his head pointing out that the service station is small so it just has a white's restroom. The child, in pain, must wait until he can go in the woods later.
Much of the show is devoted to the milieu of the blacks' lives: their fishing along the river, their one room school house for all eight grades, their large picnics, and their worship of God ("If you call Jesus, his line is never busy"). You relive their smaller tragedies too as when Joe Louis, "The Brown Bomber", loses the heavy weight championship after holding the crown for 12 years.
The blacks are shown as a hopeful lot, and as the narrator (Paul W. Cooper) says, "Everyone clung to the idea that if you worked hard, you get a piece of the American dream." They are also defiant against injustice, as when one of the women cotton pickers says of the field boss, "He ain't nothing but a redneck trying to be a white man."
The only white person that comes off well in the film is Miss Maybry (Polly Bergen) who gets Cliff books, but warns him, "Books are like eggs. You got to crack 'em open to get anything out of them."
Eventually the seeds of revolution are set. Even Pappa moves from passive aggression to active defiance. As he sums up his anger, "we got peace with the white man as long as we do what he says."
The acting is good all round, but the star of the show has to be Al Freeman Jr. He shows great inner strength, bravery, and intelligence. You may remember him from his forceful performance as Elijah Muhammad in MALCOLM X. I liked the other actors and actresses, but none stood out for me the way his performance did.
The cinematography by John Simmons has the perfect nostalgic sepia look to it. The direction by Tim Reid has good pacing except in the middle where the show loses energy. Some of the incidents chosen for illustration work much better than others so, although I really liked the film, I found it uneven.
ONCE UPON A TIME ... WHEN WE WERE COLORED runs 1:55. It is correctly rated PG. There is no sex, no nudity, mild violence and only a few bad words. It would be fine for any kid old enough to be interested in the subject. I liked the show a lot, although I wish it were more even and had a stronger middle. I recommend this excellent show to you and award it ***.
**** = One of the top few films of this or any year. A must see film. *** = Excellent show. Look for it. ** = Average movie. Kind of enjoyable. * = Poor show.  Totally unbearable.
REVIEW WRITTEN ON: May 20, 1996
Opinions expressed are mine and not meant to reflect my employer's.
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


Wakaba is a man of average height, distinguishable by his brown hair, which is kept in an ostentatious pompadour-like style that protrudes frontwards from the top of his head in a large, curly and fluffy tuft. He is almost always seen with his eyes either closed or semi-open; they seem to have light-colored pupils, as shown when Wakaba opens one of them to display his surprise. His physique is peculiar in the fact that, despite Wakaba having quite a large belly, his abdominal and pectorals are well-defined. His guild mark is yellow in color, and is located near his left pectoral. He also seems to have mildly hairy legs. After the seven-year time skip, Wakaba loses his signature pompadour to what appears to be a receding hairline, gaining a straighter-looking hair style; this being slicked upwards in a spiked shape. He also gains wrinkles on his face, and has grown a thick, pointed beard on his chin. His outfit usually consists of a loose, light green shirt decorated with many motifs of stylized dark-colored flowers with five petals, a pair of pants cut down below Wakaba’s knees (held up by a light belt adorned with many black stars partially hidden by his shirt) and sandals held up by striped bands. He wears another, darker pair of short pants and simple dark shoes during his first appearance. In his youth, he donned more serious attires, which included a leather jacket of sorts and a pair of sunglasses, together with simple pants and shoes. After the disappearance of the 3rd master Makarov Dreyar and many prominent guild members, Wakaba switches to a simpler, less flamboyant outfit, consisting of a light-colored jacket with dark fur trimmings on its edges and dark cuffs. He wears this jacket over a simple shirt, with another black undershirt visible from its open collar. He has light pants matching his jacket, with large hemlines and a thin line going down each leg’s side, combined with simple dark shoes.
Wakaba is an extremely caring man, and is often seen in the company of his fellow guildmate, drinking buddy, and long-time friend Macao Conbolt. When together, Wakaba's extreme perverse tendencies often come to light, although, even when apart, Wakaba is still undeterred in his exploits, with Laki Olietta and Kinana being two of his usual targets for harassment. Wakaba, as with Macao, appears to have an obsession with Mirajane Strauss, and is, more often than not, often seen staring at her with a perverted look in his eyes, usually making less-than-subtle passes at her. Wakaba even went as far as asking her out, and, had she accepted, planned on divorcing his wife, in spite of the fact that the two have a daughter. Wakaba also dislikes the idea of marriage and seems to be afraid of, or at least disgusted by, his wife, in comparison to the young girls he is often seen with in the guild.
Wakaba had been a member of Fairy Tail since before Cana (the oldest Fairy Tail member of her generation) joined, and developed a strong relationship with his fellow guildmates, his friendship with Macao being the strongest of these said relationships. When Mirajane first joined the guild, Wakaba and Macao explained to Erza that despite the girl's siblings fitting in, Mirajane herself never spoke or smiled. Several days after Natsu found a "Dragon's" egg in a nearby forest, Wakaba and Macao sat a table and discussed the fact he and Lisanna were raising said egg, with Wakaba insisting that Dragons don't exist. Their conversation was interrupted, however, by a furious Mirajane, who destroyed the table they were sitting at, livid at the fact that Lisanna was fraternizing with someone from "Erza's side"; this made Macao and Wakaba wonder what exactly "Erza's side" meant.The next day, as Natsu rampaged around the guild looking for the egg, Wakaba remarked upon the terribleness of Natsu's generation, stating that he couldn't imagine what the Guild would be like in a few years when they all grew up.Moments later, when the egg hatched, Wakaba stood in total disbelief, unable to comprehend that a cat had emerged from it. However, his mood quickly changed to one of total joy, with him staring fondly at the blue cat as Macao cradled him in his arms.
Smoke Magic (煙魔法 Kemuri Mahō): Wakaba is able to manipulate and control pink-colored smoke produced from his pipe and use it in combat. Wakaba is able to manipulate the smoke in various ways, such as shaping it into a fist to punch enemies and into the form of a girl.
Transformation Magic (変身魔法 Henshin Mahō): Wakaba has shown to be able to use Transformation Magic, though he has very little control over it.


Search
People
Events
username
<EMAIL_ADDRESS>Home
Account
Search
create
Friends
Nearby
Schedule
Settings
Log Out


The development guideline¶
Supporting many parsers with few developers is impossible. We invite the person who contributes a parser to u-ctags team, especially if the target language is updated frequently. TypeScript is a typical frequently updated language.
This page gathers random notes for newly joined members.

You may update your parser as you want under the rules described later.
You may review pull requests changing your parser.
A parser exists and is maintained independently form other parsers. However, considering the consistency between parsers are not bad.
You can put your name to docs/developers.rst.
Read docs.ctags.io.
Rules for reviewing a pull request¶
Put your rough schedule as a comment if you don’t have time, but you want to review.
Rules for modifying our repository¶
Make a pull request even if the change is small enough.
Wait for one day till merging even if the change is small enough.
Wait for 3 days at least for non-small change to your parser.
Wait for 7 days at least and get an LTGM comment from a member of the team if your commit changes the other parts than your parser.
Add a test case to your pull request. To make git-bisect happy, don’t add a test case for a feature or a bugfix before adding the code for the feature or the bugfix.
Even if a pull request includes multiple commits, each commit must be semantically well separated. Sometimes you may want to adjust whitespaces in the code. Adjusting whitespaces is o.k., but don’t mix the other change with it. Make a commit just for the whitespaces adjustment.
“Misc Fixes” is allowed as far as each commit in a pull request is semantically well separated. Sometimes, you may fix various minor things randomly. Making pull requests for each of them is boring. You may want to make “mix fixes” pull request especially if your code is young.
Use [WIP] prefix as the title of your pull request, if you don’t want people to take time for reviewing your code. Removing [WIP] implies “ready to be reviewed.”
Use [FYI] prefix as the title to show your idea or sketch represented in C language.
Use the name of your parser as the prefix of a pull request if your change is about a parser.
Use the name of your parser as the prefix of a commit log.
C++: record template type parameters to detect the end of template prefix If we know Foo is a name of type, it becomes easier to detect whether ">>" in "Foo>>" is a shift operator or the end marker of the template prefix. In the above example, "C++: " is the prefix.
Use following prefixes for the changes other than parsers.
main:
Changes for files under main/ directory
Units:
Changes for the test cases under Units directory
Tmain
Changes for the test cases under Tmain directory
docs(web)
Changes for the docs/*.rst.
docs(man)
Changes for the man/*.rst.
See also the output of git-log.
Combine prefixes with a comma if a change modifies multiple parts of our source tree
Here is an example.
commit 64a05963c108af4b7832a2215006ff5cafcaaebb Author: Masatake YAMATO<EMAIL_ADDRESS>Date: Tue Mar 19 12:19:37 2019 +0900 main,Flex,JavaScriupt,SQL,refactor: introduce a helper function to skip two character sequence ...
Use following prefixes if the change as no run-time impact.
cosmetic
Remove whitespaces at the end of lines
Adjust indentation
Remove an empty line
…
style
Rename symbol names
…
refactor
Code transformation that doesn’t intent changing run-time behavior
These prefixes reduce the load of reviewers.
Use “git rebase -i” and “git push --force” to refine your change in the meaning of “semantically well separated.” “semantically well separated” is important than “recording the history of your try and error.”
Use [INCOMPATIBLE] as a prefix for both pull request and commit log if the change breaks the compatibility with Exuberant-ctags. Write an explanation in man/ctags-incompatibilities.7.rst.in about the detail of breakage.
Use [SELF-INCOMPATIBLE] as a prefix for both pull request and commit log if the change breaks the compatibility with Universal-ctags itself.
About documentation¶
Update documents. man/*.rst files are the source files of our man pages. The man pages are for users. docs/*.rst files explain experimental new features. The files are for developers. The parts of contents of docs/*.rst should be moved to man/*.rst in the future.
Write docs/parser-<NAME-OF-YOUR-PARSER>.rst as you want. A FAQ and the design or your parser are common topics. Consider the maintenance of your parser after you left the project for some reason.


Signs that you may be a cat person


Ads that respect your privacy.
When you use our products, you trust us with your data, and it’s our responsibility to protect and respect it. That’s why we never sell your personal information and we protect your privacy at every step.
We never sell your personal information
While advertising makes it possible for us to offer our products free of charge and help the websites and apps that partner with us fund their content, your personal information is not for sale. We keep your data private at every point in the process of showing you ads.

Learn moreWe work on your behalf to protect your privacy
We’re constantly working to ensure your ad experiences are safe on our platforms. Your data is protected by our industry-leading security technologies that automatically block a wide range of security threats, including attempts to obtain your personal information.
Learn more-
We never sell your personal information
While advertising makes it possible for us to offer our products free of charge and help the websites and apps that partner with us fund their content, your personal information is not for sale. We keep your data private at every point in the process of showing you ads.
Learn more -
We never use sensitive information to personalize ads
Data helps us personalize ads so they're more useful to you, but we never use the content of your emails or documents or sensitive information like health, race, religion, or sexual orientation to tailor ads to you.
Learn more -
We work on your behalf to protect your privacy
We’re constantly working to ensure your ad experiences are safe on our platforms. Your data is protected by our industry-leading security technologies that automatically block a wide range of security threats, including attempts to obtain your personal information.
Learn more
We build powerful ad settings so you can choose what data is used to show you ads and can better control the ads you see.
ad controls
Remove ads you do not want to see
If you no longer want to see them for any reason, you can remove many of the ads we show you. You can even turn off ads from a certain advertiser. Depending on your Ad Settings, your controls will automatically take effect across your signed-in devices on both our products and the websites and apps that partner with us to show ads.
the ads you see.
We are continuously working to help you understand how advertising on our platforms works – including what data is used to show you ads and who is paying for the ads you see.
Why this ad
See what data we use to show ads
The “Why this ad” feature helps you understand why you are seeing a given ad. For example, you may discover you are seeing a camera ad because you’ve searched for cameras, visited photography websites, or clicked on ads for cameras before.
Advertiser identity verification
Learn about the advertisers behind the ads you see
To provide you with more information about who is advertising to you, we are working to verify the identity of the advertisers on our platforms. As part of this initiative, advertisers are required to complete a verification program in order to buy ads from Google, and you will see ad disclosures that list the name and country of the advertiser.
keep you safe online.
-
Built-in securityLearn more about our automatic security protections.
-
Privacy controlsChoose the privacy settings that are right for you.
-
Data practicesLearn more about how we respect your privacy with responsible data practices.
-
Security tipsDiscover quick tips and best practices to stay safe online.


- addAmmoTileToInventory(AmmoTile) - Method in class it.polimi.se2019.model.player.Inventory
-
Add ammo tile to inventory
- addBlue(int) - Method in class it.polimi.se2019.model.grabbable.Ammo
-
- addDoubleKill(Player) - Method in class it.polimi.se2019.model.KillScoreBoard
-
Add a double kill to the scoreboard
- addKill(Player) - Method in class it.polimi.se2019.model.KillScoreBoard
-
Add a kill to the scoreboard
- addOverKill(Boolean) - Method in class it.polimi.se2019.model.KillScoreBoard
-
An overkill lets the player add one more mark on the scoreboard, but doesn't consume a skull
- addPlayerControllers(List<PlayerController>) - Method in class it.polimi.se2019.controller.GameBoardController
-
add the player controllers to the game and set isReady to true so that
the game can start
- addPlayers(List<Player>) - Method in class it.polimi.se2019.model.GameBoard
-
add players to the game board
- addPoints(Integer) - Method in class it.polimi.se2019.model.player.Player
-
- addPowerUpToInventory(PowerUpCard) - Method in class it.polimi.se2019.model.player.Inventory
-
Add a power up card to the inventory
- addRed(int) - Method in class it.polimi.se2019.model.grabbable.Ammo
-
- addToInventoryOverLimit() - Method in class it.polimi.se2019.TestInventory
-
- addWeaponToInventory(Weapon) - Method in class it.polimi.se2019.model.player.Inventory
-
Add a new weapon to the inventory
- addYellow(int) - Method in class it.polimi.se2019.model.grabbable.Ammo
-
- Adrenaline1StateController - Class in it.polimi.se2019.controller.player_state_controller
-
- Adrenaline1StateController(GameBoardController, Player, PlayerViewOnServer) - Constructor for class it.polimi.se2019.controller.player_state_controller.Adrenaline1StateController
-
- Adrenaline2StateController - Class in it.polimi.se2019.controller.player_state_controller
-
- Adrenaline2StateController(GameBoardController, Player, PlayerViewOnServer) - Constructor for class it.polimi.se2019.controller.player_state_controller.Adrenaline2StateController
-
- AlternativeEffectWeaponController - Class in it.polimi.se2019.controller.weapons.alternative_effects
-
This is an abstract marker class, it doesn't have its own methods or
attributes and is used to group the weapons in the game based on
how they work.
- AlternativeEffectWeaponController(GameBoardController) - Constructor for class it.polimi.se2019.controller.weapons.alternative_effects.AlternativeEffectWeaponController
-
- Ammo - Class in it.polimi.se2019.model.grabbable
-
The ammo class represents a box of ammunition cubes
- Ammo(Integer, Integer, Integer) - Constructor for class it.polimi.se2019.model.grabbable.Ammo
-
- AmmoSquare - Class in it.polimi.se2019.model.map
-
An AmmoSquare represent a square where a player can grab Ammos, but not spawn
- AmmoSquare(Map, Square.RoomColor, List<Direction>) - Constructor for class it.polimi.se2019.model.map.AmmoSquare
-
Inits a new Spawn Square
- AmmoTile - Class in it.polimi.se2019.model.grabbable
-
Ammo tile represents an ammo tile that can be picked up from a square.
- AmmoTile(int, int, int, boolean) - Constructor for class it.polimi.se2019.model.grabbable.AmmoTile
-
Create a new ammo tile
- App - Class in it.polimi.se2019
-
- App() - Constructor for class it.polimi.se2019.App
-
- App.WrongArguments - Exception in it.polimi.se2019
-
Thrown when there is an error in the args array received by the command
line.
- apply(I) - Method in interface it.polimi.se2019.view.player.PlayerViewOnServer.RMIFunction
-
- availableActions - Variable in class it.polimi.se2019.controller.player_state_controller.PlayerStateController
-


Release notes
Opycleid 0.4.0
- Added support for defining sub-categories of , the 2-category of
finite sets and quantale-valued relations between them, where is a given quantale.
- Three different quantales classes, the interval quantale, the multiplicative quantale,
and the linear order quantale with three elements.
QMorphism
class for defining quantale-values relations between finite sets
CategoryQAction
class for defining sub-categories of .
- Instances of
CatMorphism
are callable, replacing the use of >>
in the previous versions.
- Instances of
CategoryFunctor
are callable, returning the image of objects and morphisms.
- Non-composable
CatMorphism
morphisms now return None
instead of raising an exception.
- Instances of
CatMorphism
, CategoryAction
can now be directly instantiated with the objects and morphisms
instead of having to call separate methods.


1 What’s Recursion?
Recursion in computer science is a method of solving the problem where the solution depends on solutions to smaller instances of the same problem.
Sometimes a problem is too difficult or too complicated to solve because it’s too big. If the problem can be broken down into smaller versions of itself, it may be able to find a way to address one of these smaller versions and then be able to build up to a solution to the entire problem. That is is the idea behind the recursion. Recursive algorithms break down a problem into smaller pieces which you already know the answer to and can solve by applying the same algorithm to each section, and then combining the results. Recursive algorithms can be implemented by the process in which a function calls itself directly or indirectly until the smallest case is reached.
2 What the principle of Recursion?
A recursive function in recursion algorithm consists of two parts:
- Base Case: a recursive function has one or more base cases that breaks the chain of recursion;
- Recursive Rule: the job of recursive rule can be seen as breaking down complex problem into simpler ones until the base case is reached;
3 Types of recursion
1). Single recursion and multiple recursion
Recursion that only contains a single self-reference is known as Single recursion, while recursion that contains multiple self-references is known as Multiple recursion. Single recursion is often more efficient than multiple recursion, can generally be replaced by an iterative program, which runs in linear time and requiring constant time. Multiple recursion, by contrast, may require exponential time and space, and is more fundamentally recursive, not be able to replaced by iteration without an explicit stack. Multiple recursion can be sometimes converted to single recursion.
2). Structural recursion versus generative recursion
The key difference between structural recursion and generative recursion is where a recursive procedure gets data that it works on and how it processes that data. Specifically, for structural recursion, a recursive call is made on a subset of original input data. Whereas for generative recursion, a recursive call is made on data that is constructed or calculated from the original input data.
The term “structural recursion” comes from the fact that these structures (list, BST, natural numbers, Fibonacci number, Factorial number, etc.) can be defined recursively.
Structural recursion includes nearly all tree traversals, including XML processing, binary tree creation, and search, etc. By considering the algebraic structure of the natural numbers (that is, a natural number is either zero or the successor of a natural number), functions such as factorial may also be regarded as structural recursion.
Many well-known recursive algorithms generate an entirely new piece of data from the given data and recur on it. HtDP (How To Design Programs) refers to this kind as generative recursion. Examples of generative recursion include gcd, quicksort, binary search, mergesort, Newton’s method, fractals, and adaptive integration.
4 Recursive data structure
An important application of recursion in computer science is in defining dynamic data structures such as lists and trees. A data structure that is partially composed of smaller or simpler instances of the same data structure. For instance, a tree is composed of smaller trees (subtrees) and leaf nodes, and a list may have other lists as elements.
Recursive algorithms are particularly appropriate when the underlying problems or the data to be treated are defined in recursive terms.
1). Linked list
A linked list is either:
- the empty list, represented by None, or
- a node contains a cargo object and a reference to linked list
2). Tree
A tree is either:
- empty
- a vertex r (the root of T) and a set of trees (the subtrees of T) whose roots are the children of r.
5 Recursive programs
1). Fibonacci sequence
I. Recursive formula
Base Case:
$$f(0) = 0; f(1) = 1;$$
Recursive rules:
$$f(n) = f(n - 1) + f(n - 2);$$
public class Fibonacci {
public int fib(int n) {
if(n == 0) {
return 0;
} else if(n == 1) {
return 1;
}else {
return fib(n - 1) + fib(n - 2);
}
}
public static void main(String[] args) {
Fibonacci f = new Fibonacci();
System.out.println(f.fib(5));
}
}
II. Program execution flow
The following illustrates the actual execution flow for this recursive call based on the original input.
fib(5)
fib(4)
fib(3)
fib(2)
fib(1)
fib(0)
fib(1)
fib(2)
fib(3)
Values at the same level of indentation are summed to produce the result for the previous level of indentation.
III. Call stack
Each called function (“callee”) has a stack frame containing the following parts:
- passed arguments
- return address
- local variables
- preserved-register contents
You can click here to see big pictures.
IV Time complexity
Generally speaking, there are two methods of calculating time complexity for recursive program. One is to draw recursive tree, which is a intuitive way to show running times. The other is to calculate time complexity through master theory.
The time complexity is total number of all nodes:
We can see the number of the last level as the sum of nodes in previous levels. Therefore, the time complexity is .
- Master Theory
We can write the recursive expression:
Apply the master theory to this expression:
V Space complexity
The best way to calculate the space complexity of recursion is (the number of stack frames) * (space per stack frame)
There is one thing we should notice that ‘the number of stack frames’ refers to the maximum number of stack frames coexisting at the same time. For this case the space complexity is equal to
$$O(n) = n \times O(1) = O(n)$$
2). Calculate
We assume that a and b are integers, and we neglect the corner case that a = 0, b < 0.
I. Recursive formula
Base Case:
When b = 0
:
$$f(a, b) = 1$$
Recursive Case:
1) When b != 0
and b / 2 = 0
:
$$f(a, b) = f(a, \frac{b}{2}) \times f(a, \frac{b}{2})$$
2) When b != 0
and b / 2 != 0
:
$$f(a, b) = f(a, \frac{b}{2}) \times f(a, \frac{b}{2}) \times a $$
public class Cal {
public int cal(int a, int b) {
if(b == 0) {
return 1;
}else {
int half = b / 2;
int half_value = cal(a, half);
if(b % 2 == 0) {
return half_value * half_value;
}else {
return half_value * half_value * a;
}
}
}
public static void main(String[] args) {
Cal c = new Cal();
System.out.println(c.cal(2, 5));
}
}
II. Program execution flow
The following illustrates the actual execution flow for this recursive call.
cal(2, 5)
cal(2, 2)
cal(2, 1)
cal(2, 0)
III. Program execution flow
The following diagrams display a series of stack frames when the program execute.
IV Recursive tree
V Time & Space complexity
The time complexity is equal to the total number of nodes, which is O(logn)
. The space complexity is euqal to (the number of stack frames) * (space per stack frame), which is O(logn)
.
3). Binary Search
Binary search is the search algorithm used to find the position of the target value in a list with the certain logic. This list can be a sorted array or a string with a certain rule. All in all, this list should be equipped with some rules.
I Classical problem
Check if the target value is in a sorted array.
public class BinarySearch{
public int binarySearch(int target, int[] arr) {
int arrLength = arr.length;
return helper(target, arr, 0, arrLength - 1);
}
public int helper(int target, int[] arr, int left, int right) {
if(left <= right) {
int mid = (right + left) / 2;
if (arr[mid] == target) {
return mid;
}else if(arr[mid] > target){
return helper(target, arr, left, mid - 1);
}else {
return helper(target, arr, mid + 1, right);
}
}
return -1;
}
public static void main(String[] args) {
BinarySearch b = new BinarySearch();
int[] arr = new int[]{1, 2, 3, 5, 6, 9};
int res = b.binarySearch(5, arr);
System.out.println(res);
}
}
I Recursive tree
II Time & Space complexity
The time complexity is equal to the total number of nodes, which is log(n)
. The space complexity is O(1)
because this recursive procedure is tail recursion.
References
- https://en.wikipedia.org/wiki/Recursion_(computer_science)#Recursive_procedures
- https://www.geeksforgeeks.org/recursion/
- https://www.geeksforgeeks.org/tail-call-elimination/
- http://www.cs.kent.edu/~javed/class-ALG06F/webbook/ALG00S-L03b.pdf
- http://www.sparknotes.com/cs/recursion/whatisrecursion/section1/
- https://stackoverflow.com/questions/14268749/how-does-structural-recursion-differ-from-generative-recursion
- https://pdfs.semanticscholar.org/presentation/d913/02528df5f43f6ab8fe939326480b556b4490.pdf
- https://discuss.codecademy.com/t/recursive-function-calls/65109/3
- https://stackoverflow.com/questions/8845154/how-does-the-fibonacci-recursive-function-work/8845269
- https://www.geeksforgeeks.org/time-complexity-recursive-fibonacci-program/
- https://practice.geeksforgeeks.org/problems/space-complexity-of-fibonacci-recursion
- *http://www.cs.cornell.edu/info/courses/spring-98/cs211/lecturenotes/07-recursion.pdf


The model is trained on the training dataset using a supervised learning method.The test dataset is a dataset used to provide an unbiased evaluation of a final model fit on the training dataset.


WITNESS LIST Finance Committee (Subcommittee on Articles I, VI and VII Agencies) February 25, 1998-9:30A Firefighters' Pension Commissioner On: Sandefer, Morris E. (FFPC), Austin Railroad Commission On: Kelly, Dan (Railroad Commission), Austin Martin, Jerry L. (Railroad Commission), Austin Mayorga, Jose S. (Railroad Commission), Austin Regan, Mike (Railroad Commission), Austin Schieck, David (Railroad Commission), Austin Soil/Water Conservation Board On: Buckley, Robert G. (SWCB), Temple Robertson, Paul (SWCB), Hale Center Veterans Commission On: Brown, Douglas (TVC), Austin Buerschinger, Charles (TVC), Austin Water Development Board On: Pedersen, Craig (TWDB), Austin


Molecular Replacement
Molecular Replacement is based on the assumption that target structure has
a highly similar structural homologue, which may be found by, e.g. matching
target's sequence to sequences of known PDB structures. If found, the homologue
may be positioned such as to optimally reproduce the structure factors
amplitudes and, using this position, calculate approximate structure factors
phases. Then, electron density map is calculated from structure factors using
the inverse Fourier transform, which may be used for building the target
structure.
jsCoFE offers several approaches to Molecular Replacement:
- SIMBAD pipeline shoud be used when
both sequence and structural model are not available, or if the presence
of common contaminants is suspected
- Automated MR methods are efficient if
good structural homologues may be found by sequence matching
- Elementary MR is practiced in
difficult cases, when both SIMBAD and automated MR fail.
Follow the above links for the corresponding template scenarios.


←
{{ 'Booking' | translate }}
Nicely Done, *Temp user*!
You are all set to book a session with *Temp user name*


class: center, middle, inverse, title-slide # Lecture 5 ## Dynamics theory review ### Ivan Rudik ### AEM 7130 --- # Roadmap 1. Review Markov chains and dynamic models 3. Review theory for numerical methods --- # Building a dynamic economic model We need 5 things for a dynamic economic model -- 1. Controls: what variables are we optimizing, what decisions do the economic agents make? -- 2. States: What are the variables that change over time and interact with the controls? -- 3. Payoff: What is the single-period payoff function? What's our reward? -- 4. Transition equations: How do the state variables evolve over time? -- 5. Planning horizon: When does our problem terminate? Never? 100 years? --- # Two types of solutions Dynamic problems can generally be solved in two ways -- .hi-blue[Open-loop:] treat the model as a sequence of static optimization problems solved simultaneously -- - Transitions act as constraints - Ends up being just a potentially giant (but simple) non-linear optimization problem - Drawback: solutions will be just a function of time so we can't introduce uncertainty, strategic behavior, etc --- # Two types of solutions .hi-blue[Feedback:] treat the model as a single-period optimization problem with the immediate payoff and the *continuation value* -- - Yields a solution that is a function of states - Permits uncertainty, game structures - Drawback: need to solve for the continuation value function --- # Markov chains Dynamic models in economic models are typically .hi-blue[Markovian] -- A stochastic process `\(\{x_t\}\)` is said to have the .hi-blue[Markov property] if for all `\(k\geq1\)` and all `\(t\)` `$$Prob(x_{t+1}|x_t,x_{t-1},...,x_{t-k}) = Prob(x_{t+1}|x_t)$$` -- The distribution of the next vector in the sequence (i.e. the distribution of next period's state) is a function of only the current vector (state) -- The Markov property is necessary for the feedback representation --- # Markov chains We characterize stochastic state transitions with .hi-blue[Markov chains] -- A Markov chain is characterized by: 1. `\(n\)`-dimensional state space with vectors `\(e_i\)`, `\(i=1,...,n\)` where `\(e_i\)` is an `\(n \times 1\)` unit vector whose `\(i\)`th entry is 1 and all others are 0 2. An `\(n \times n\)` *transition matrix* `\(P\)` which captures the probability of transitioning from one point of the state space to another point of the state space next period 3. `\(n \times 1\)` vector `\(\pi_0\)` whose `\(i\)`th value is the probability of being in state `\(i\)` at time 0: `\(\pi_{0i} = \text{Prob}(x_0 = e_i)\)` --- # Markov chains `\(P\)` is given by `$$P_{ij} = \text{Prob}(x_{t+1} = e_j|x_t = e_i)$$` -- We need one assumption: - For `\(i=1,..,n\)`, `\(\sum_{j=1}^n P_{ij} = 1\)` and `\(\pi_0\)` satisfies: `\(\sum_{i=1}^n \pi_{0i} = 1\)` --- # Markov chains Nice property of Markov chains: We can use `\(P\)` to determine the probability of moving to another state in *two* periods by `\(P^2\)` since `\begin{align} &\text{Prob}(x_{t+2} = e_j|x_t = e_i) \notag\\ &= \sum_{h=1}^n \text{Prob}(x_{t+2} = e_j|x_{t+1} = e_h)\text{Prob}(x_{t+1} = e_h|x_t = e_i) \notag\\ &= \sum_{h=1}^n P_{ih}P_{hj} = P_{ij}^2 \notag \end{align}` --- # Markov chains `\begin{align} \text{Prob}(x_{t+2} = e_j|x_t = e_i) = \sum_{h=1}^n P_{ih}P_{hj} = P_{ij}^2 \notag \end{align}` -- iterate on this to show that -- `$$\text{Prob}(x_{t+k}=e_j|x_t=e_i) = P_{ij}^k$$` --- # Dynamic programming Start with a general sequential problem to set up the basic recursive/feedback dynamic optimization problem -- Let `\(\beta \in (0,1)\)`, the economic agent selects a sequence of controls, `\(\{u_t\}_{t=0}^\infty\)` to maximize `$$\sum_{t=0}^\infty \beta^t r(x_t,u_t)$$` subject to `\(x_{t+1} = g(x_t,u_t)\)` and with `\(x_0\)` given --- # Dynamic programming If we want to maximize the PV of total utility: `$$\max_{u_0,u_1,\dots,u_n,\dots} \sum_{t=0}^\infty \beta^t r(x_t,u_t)$$` we have a tough problem, we need to select a full sequence of `\(u_t\)`s -- Dynamic programming makes this simpler --- # Dynamic programming The idea behind dynamic programmming (like most of what we do) is to exchange solving one hard problem for solving a bunch of easier problems -- Dynamic programming was developed by Richard Bellman -- The essence of dynamic programming is summed up in .hi[Bellman's Principle of Optimality] --- # Dynamic programming .hi[Principle of Optimality:] > An optimal policy has the property that whatever the initial state and initial decision are, the remaining decisions must constitute an optimal policy with regard to the state resulting from the first decision -- In simpler terms: your current optimal decision is only dependent on the current state, not your past actions -- Why does this make our problem simpler? --- # Dynamic programming In dynamic programming we really just solve for one object -- This object is a function that effectively tells us what is the optimal action to take given the current state -- The tricky thing about this (and what we will be learning about for the next few weeks), is how we actually solve for this function --- # Dynamic programming You may have heard about these functions before: policy functions, value functions -- They either tell you your optimal action given the state, or your maximized payoff given the state -- Once we have either of these functions we can solve for the optimal action in any given state of the world and solve our problem --- # Dynamic programming Assume `\(r\)` is concave, continuously differentiable, and the state space is convex and compact -- We want to recover a *policy function* `\(h\)` which maps the current state `\(x_t\)` into the current control `\(u_t\)`, such that the sequence `\(\{u_s\}_{s=0}^\infty\)` generated by iterating `\begin{gather} u_t = h(x_t) \notag\\ x_{t+1} = g(x_t,u_t), \notag \end{gather}` starting from `\(x_0\)`, solves our original optimization problem --- # Value functions Consider a function `\(V(x)\)`, the .hi-blue[continuation value function] where `$$V(x_0) = \max_{\{u_s\}_{s=0}^\infty} \sum_{t=0}^\infty \beta^t r(x_t,u_t)$$` subject to the transition equation: `\(x_{t+1} = g(x_t,u_t)\)` The value function defines the maximum value (payoff) of our problem as a function of the state -- It's the dynamic indirect utility function --- # Value functions Suppose we know `\(V(x)\)`, then we can solve for the policy function `\(h\)` by solving for each `\(x \in X\)` $$\max_u r(x,u) + \beta V(x') $$ where `\(x' = g(x,u)\)` and primes on state variables indicate next period -- Conditional on having `\(V(x)\)` we can solve our dynamic programming problem -- Instead of solving for an infinite dimensional set of policies, we instead find the `\(V(x)\)` and `\(h\)` that solves the continuum of maximization problems, where there is a unique maximization problem for each `\(x\)` -- This is often easier --- # Bellman equations .hi-blue[Issue:] How do we know `\(V(x)\)` when it depends on future (optimized) actions? -- Define the .hi-blue[Bellman equation] `$$V(x) = \max_u r(x,u) + \beta V[g(x,u)]$$` -- `\(h(x)\)` maximizes the right hand side of the Bellman --- # Bellman equations The policy function satisfies `$$V(x) = r[x,h(x)] + \beta V\{g[x,h(x)]\}$$` -- Solving the problem yields a solution that is a function, `\(V(x)\)` -- This is a recursive problem since it maps itself into a scalar value, can be hard to think about at first -- One of the workhorse solution methods exploits this recursion and contraction mapping properties of the Bellman operator to solve for `\(V(x)\)` --- # Solution properties Under standard assuptions we have that 1. The solution to the Bellman equation, `\(V(x)\)`, is strictly concave 2. The solution is approached in the limit as `\(j \rightarrow \infty\)` by iterations on: `\(V_{j+1}(x) = \max_{u} r(x,u) + \beta V_j(x')\)`, given any bounded and continuous `\(V_0\)` and our transition equation 3. There exists a unique and time-invariant optimal policy function `\(u_t = h(x_t)\)` where `\(h\)` maximizes the right hand side of the Bellman 4. The value function `\(V(x)\)` is differentiable --- # Euler equations .hi-blue[Euler equations] are dynamic efficiency conditions: they equalize the marginal effects of an optimal policy over time E.g: set the current marginal benefit, energy from burning fossil fuels, with the future marginal cost, global warming -- Example: 1. We have a stock of capital `\(K_t\)` that depreciates at rate `\(\delta \in (0,1)\)` 2. We can invest to increase our future capital `\(I_t\)` at cost `\(c(I_t)\)` and effectiveness `\(\gamma \in (0,1]\)` 3. Per-period payoff `\(U(Y_t)\)` from consuming output `\(Y_t = f(K_t) = K_t\)` 4. Discount factor is `\(\beta \in (0,1)\)` --- # Euler equations The Bellman equation is `\begin{align} V(K_t) &= \max_{I_t} \left\{ u(K_t) - c(I_t) + \beta V(K_{t+1}) \right\} \notag \\ &\text{subject to: } \,\,\,\, K_{t+1} = (1 - \delta) K_t + \gamma I \notag \end{align}` -- The FOC with respect to investment is `$$c_I(I_t) = \beta \, \gamma \, V_K(K_{t+1})$$` -- Envelope theorem gives us `$$V_K(K_t) = u_K(K_t) + \beta \, \delta \, V_K(K_{t+1})$$` --- # Euler equations The FOC with respect to investment is `$$c_I(I_t) = \beta \, \gamma \, V_K(K_{t+1})$$` Envelope theorem gives us `$$V_K(K_t) = u_K(K_t) + \beta \, \delta \, V_K(K_{t+1})$$` -- Advance both by one period since they must hold for all `\(t\)` `\begin{gather} c_I(I_{t+1}) = \beta \, \gamma \, V_K(K_{t+2}) \notag\\ V_K(K_{t+1}) = u_K(K_{t+1}) + \beta \, \delta \, V_K(K_{t+2}) \notag \end{gather}` --- # Euler equations Substitute the time `\(t\)` and time `\(t+1\)` FOCs into our time `\(t+1\)` envelope condition `$$\frac{c'(I_t)}{\beta \, \gamma} = u'(K_{t+1}) + \beta \, \delta \frac{c'(I_{t+1})}{\beta \, \gamma}$$` `$$\Rightarrow c'(I_t) = \beta \left[ \gamma \, u'(K_{t+1}) + \delta \, c'(I_{t+1}) \right]$$` -- LHS is marginal cost of investment, RHS is marginal benefit of investment .hi-blue[along an optimal path] --- # Euler equations `$$\Rightarrow c'(I_t) = \beta \left[ \gamma \, u'(K_{t+1}) + \delta \, c'(I_{t+1}) \right]$$` LHS: marginal cost of investment RHS: marginal benefit of higher utility from more future output, and lower future investment cost because of higher capital stock --- # Euler equations: no-arbitrage Euler equations are .hi-blue[no-arbitrage conditions] Suppose we're on the optimal capital path and want to deviate by cutting back investment -- Yields a marginal benefit today of saving us some investment cost -- There are two costs associated with it: -- 1. Lower utility tomorrow because we will have a smaller capital stock 2. Greater investment cost tomorrow to return to the optimal capital trajectory --- # Euler equations: no-arbitrage If this deviation (or deviating by investing more today) were profitable, we would do it `\(\rightarrow\)` the optimal policy must have zero additional profit opportunities: this is what the Euler equation defines --- # Basic theory Here we finish up the basic theory pieces we need We will focus on deterministic problems but this easily ports to stochastic problems -- Consider an infinite horizon problem for an economic agent 1. Payoff `\(r(s_t,u_t)\)` in some period `\(t\)` is a function of the state vector `\(s_t\)` and control vector `\(u_t\)` 2. Transition equations are `\(s_{t+1} = g(s_t,u_t)\)` 3. Assume that `\(u \in U\)` and `\(s \in S\)` 4. Payoff is bounded: `\(u(s_t,u_t)\)` --- # Basic theory Here the current state vector .hi[completely] summarizes all the information of the past and is all the information the agent needs to make a forward-looking decision `\(\rightarrow\)` our problem has the Markov property -- Final two pieces 1. Stationarity: does not depend explicitly on time 2. Discounting: `\(\beta \in (0,1)\)`, the future matters but not as much as today Discounting and bounded payoffs ensures total value is bounded --- # Basic theory Represent this payoff as `$$\sum_{t=0}^\infty \beta^t r(s_t,u_t)$$` -- The value of the maximized discounted stream of payoffs is `\begin{gather} V(s_0) = \max_{u_0 \in U(s_0)} r(s_0,u_0) + \beta \left[\max_{\{u_t\}_{t=1}^\infty} \sum_{t=1}^\infty \beta^{t-1} r(s_t,u_t)\right] \notag \\ \text{subject to: } s_{t+1} = g(s_t,u_t) \notag \end{gather}` -- the terms inside the square brackets is the maximized discounted stream of payoffs beginning at state `\(s_1\)` --- # Basic theory This means the problem can be written recursively as `\begin{gather} V(s_0) = \max_{u_0 \in U(s_0)} r(s_t,u_t) + \beta\,V(s_1) \\ \text{subject to: } s_{t+1} = g(s_t,u_t) \end{gather}` which is our Bellman (we just exploited Bellman's principle of optimality) --- # Value function existence and uniqueness Reformulate the problem as, `$$V(s) = \max_{s' \in \Gamma(s)} r(s,s') + \beta\,V(s'), \,\,\, \forall s \in S$$` where `\(\Gamma(s)\)` is our set of feasible states next period -- There exists a solution to the Bellman under a (particular) set of sufficient conditions --- # Value function existence and uniqueness If the following are true: -- 1. `\(r(s_t, u_t)\)` is real-valued, continuous and bounded 2. `\(\beta \in (0,1)\)` 3. the feasible set of states for next period is non-empty, compact, and continuous -- then there exists a unique value function `\(V(s)\)` that solves the Bellman equation --- # Intuitive sketch of the proof Define an operator `\(T\)` as `$$T(W)(s) = \max_{s' \in \Gamma(s)} r(s,s') + \beta\,W(s'), \,\,\, \forall s \in S$$` -- This operator takes some value function `\(W(s)\)`, maximizes it, and returns another `\(T(W)(s)\)` -- It is easy to see that any `\(V(s)\)` that satisfies `\(V(s) = T(V)(s) \,\,\, \forall s \in S\)` solves the Bellman equation -- Therefore we simply search for the .hi-blue[fixed point] of `\(T(W)\)` to solve our dynamic problem, but how do we find the fixed point? -- First we must show that a way exists by showing that `\(T(W)\)` is a .hi-blue[contraction]: as we iterate using the `\(T\)` operator, we will get closer and closer to the fixed point --- # Intuitive sketch of the proof Blackwell's sufficient conditions for a contraction are -- 1. Monotonicity: if `\(W(s) \geq Q(s) \,\,\, \forall s \in S\)`, then `\(T(W)(s) \geq T(Q)(s) \,\,\, \forall s \in S\)` -- 2. Discounting: there exists a `\(\beta \in (0,1)\)` such that `\(T(W+k)(s) \leq T(W)(s) + \beta\,k\)` -- Monotonicity holds under our maximization -- Discounting reflects that we must be discounting the future -- If these two conditions hold then we have a contraction with modulus `\(\beta\)` -- Why do we care this is a contraction? --- # Intuitive sketch of the proof So we can take advantage of the contraction mapping theorem which states: -- 1. `\(T\)` has a unique fixed point 2. `\(T(V^*) = V^*\)` 3. We can start from any arbitrary initial function `\(W\)`, iterate using `\(T\)` and reach the fixed point --- # Function iteration What this tells us is we can solve for `\(V\)` using a variant of function iteration -- Before we were evaluating a function at value `\(x\)`, and then updating that value until it converges to a fixed point `\(x^*\)` -- Here we are evaluating a function `\(T\)` of functions `\(V\)`, updating the function `\(V\)` until it converges to a fixed point `\(V^*\)` -- Even though it seems a bit more complicated the solution concept is exactly the same -- Next we will start learning how to do this


#include <script.h>
Collaboration diagram for TCommands:
Data Fields | |
| int | ntemp |
| int | minimum_frame |
| int | average_frame |
| int | nsteps |
| TProcess * | step |
Definition at line 63 of file script.h.
Definition at line 66 of file script.h.
Referenced by dummy_script(), process_frames(), resolve_script(), and resolve_script_rec().
Definition at line 65 of file script.h.
Referenced by dummy_script(), process_frames(), resolve_script(), and resolve_script_rec().
Definition at line 67 of file script.h.
Referenced by add_process(), append_processes(), dummy_script(), process_frames(), process_init(), and resolve_script().
| int TCommands::ntemp |
Definition at line 64 of file script.h.
Referenced by dummy_script(), process_init(), resolve_script(), and resolve_script_rec().
Definition at line 68 of file script.h.
Referenced by add_process(), append_processes(), dummy_script(), process_frames(), process_init(), and resolve_script().


Website Development
Matthew Waldron
waldronmatthew.com
This website is developed by Matthew Waldron. The code of this website is under the MIT license. If you decide to use the website as your own, you may do so providing:
►You keep the footer link "Website Credits" in any and all pages of this website.
►You retain the text of this page to properly credit Matthew Waldron and the developers credited below.
►You acknoledge and agree to the Website's Terms of Use.
Navigation
Andor Nagy
Codepen by Andor Nagy that allows for navigation between web pages. Parts of CSS used. Codepen under the MIT license.
Sticky Navigation
Guil H
Codepen by Guil H that allows the naviagation bar to stick to the top while hiding title on scroll. Parts of CSS and Javascript used from Codepen. Codepen under the MIT license.
Sticky Top Button
yying6
Codepen by yying6 that displays a button when scrolled and brings the user to the top of the page when clicked. HTML, CSS, and Javascript used. Codepen under the MIT license.
Responsive Tiles
Ronny Siikaluoma
Codepen by Ronny Siikaluoma that allows for squares that resize according to screen size. Parts of HTML and CSS used. Updated for even tile size and picture replacement and dynamic resizing. Codepen under the MIT license.
Photos
Unsplash
Free photos from unsplash.com for my blog except where noted. Images resized / compressed.
Social Media Icons
Iconfinder
Royalty free social media icons from iconfinder.com. Colors edited to match the website theme.


--- layout: default title: "Ariel Hahn | Hahn Ariel" ---
I am an artist, archivist, and digital librarian interested in questions of time, history, power, technology, and the natural world. Currently, I work with the Dorothy Peyton Gray Transportation Library and Archive at the Los Angeles County Metropolitan Transportation Authority (LACMTA, or Metro) as a Data Librarian.
In 2019, I received an MLIS from the Department of Information Studies at University of California, Los Angeles where I was an organizer with README, a student group that advocated for digital rights within libraries, archives, and information work. In 2018-2019, I was an Andrew W. Mellon Foundation Fellow for the UCLA Community Archives Lab and worked with multiple Los Angeles area community archives. From 2020-2023, I worked at the Cal Poly Pomona University Library as their Data Management Librarian.
My additional professional experience as an archival consultant and freelance producer ranges from film and audio production to grant writing, web development, research, and archival processing for artists, writers, publishers, and non-profits. And generally, I like to think about analog media, queer socialist futures, networks of plant decay, and the transformative possibilities of digital tools.
This website is an archive of sorts, a record of my work and experiences in graduate school. A majority of the content throughout is no longer edited or maintained. <3 AH 2023


Hot Restaurant
Make your reservation
View Tables
Table Reservation
Name
Phone Number
Email
Unique ID
Submit
API Table Link
|
API Wait List


If your object is instatiated as a voice of a poly~ object, it is possible both to determine this context and to determine information about the specific voice.
If your object is instatiated as a voice of a poly~ object, it is possible both to determine this context and to determine information about the specific voice.
This is done by querying the patcher in which your object exists for an associated object, and then calling methods on that object.
long voices = -1;
long index = -1;
if (assoc) {
post(
"total amount of voices: %ld", voices);
index = (long)(*m)(assoc, patcher);
post(
"index: %ld", index);
}
}
t_atom_long object_attr_getlong(void *x, t_symbol *s)
Retrieves the value of an attribute, given its parent object and name.
method zgetfn(t_object *op, t_symbol *msg)
Use zgetfn() to send an untyped message to a Max object without error checking.
BEGIN_USING_C_LINKAGE void post(C74_CONST char *fmt,...)
Print text to the Max window.
BEGIN_USING_C_LINKAGE typedef void *(* method)(void *)
Function pointer type for generic methods.
Definition: ext_mess.h:25
t_atom_long t_max_err
an integer value suitable to be returned as an error code
Definition: max_types.h:78
@ MAX_ERR_NONE
No error.
Definition: max_types.h:118
t_max_err object_obex_lookup(void *x, t_symbol *key, t_object **val)
Retrieves the value of a data stored in the obex.
t_symbol * object_classname(void *x)
Retrieves an object instance's class name.
void * object_method(void *x, t_symbol *s,...)
Sends an untyped message to an object.
t_symbol * gensym(C74_CONST char *s)
Given a C-string, fetch the matching t_symbol pointer from the symbol table, generating the symbol if...
The structure for the head of any object which wants to have inlets or outlets, or support attributes...
Definition: ext_mess.h:191


Docker Continuous Deployment
Microservice Counter
version
type:
Visitor count:
count
Microservice Access log
version
type:
Last access from:
ip


Heated battle or something more?
Frontend web designers tend to be your artistic types, these people excel at design, they are typically more outgoing and in touch with what the client want to see. In the past frontend designers where just that designers not programmers but in the last few years more and more of the logic has moved to the front end due to large frameworks such as react and angular.
Backend developers tend to be your math types, normally they are not at all interested in the way a site looks and are spending their time making sure that the app works, Backend developers are usually stronger in computer science and programming but fairly poor at design and making a site people want to use.


PWM
Pulse Width Modulation (PWM) is a very import feature found in most microcontrollers. PWM is a pulse that is repeated and generated by the internal hardware. The ratio of the pulse width and its frequency is called duty cycle. Through software, you can control the pulse's frequency and duty cycle.
Tip
We usually use GetDefault() for most peripherals. For example, there is only one GPIO controller on most systems. This is not the case with PWM. Never use the Default controller and always select the proper channel on the corresponding controller.
Tip
PWM2.3 is channel 3 on controller 2
Energy Level
PWM is perfect for dimming an LED or slowing down a motor. This is done by turning power on and off, at a high speed. When power is on half the time and off half the time, only half the energy is transferred, to the LED or a motor.
This demo will fade the LED in and out
using System;
using System.Diagnostics;
using System.Threading;
using GHIElectronics.TinyCLR.Devices.Pwm;
using GHIElectronics.TinyCLR.Pins;
class Program
{
static void Main()
{
PwmController Controller4 = PwmController.FromId(FEZ.PwmPin.Controller4.Id);
PwmPin led = Controller4.OpenPin(FEZ.PwmPin.Controller4.Led1);
Controller4.SetDesiredFrequency(10000);
double duty = 0.5, speed = 0.01;
led.Start();
while (true)
{
if (duty <= 0 || duty >= 1.0)
{
speed *= -1; //invert dirrection
duty += speed;
}
led.SetActiveDutyCyclePercentage(duty);
duty += speed;
Thread.Sleep(10); // always give the system time to think!
}
}
}
Musical Tones
Music notes have specific frequencies; C for example is about 261Hz. Plugging these numbers into an array and knowing the length of each tone is all that is needed to play some simple music. When playing notes by changing the frequency, keep thee duty cycle set to 0.5.
using System;
using System.Diagnostics;
using System.Threading;
using GHIElectronics.TinyCLR.Devices.Pwm;
using GHIElectronics.TinyCLR.Pins;
class Program
{
const int NOTE_C = 261;
const int NOTE_D = 294;
const int NOTE_E = 330;
const int NOTE_F = 349;
const int NOTE_G = 392;
const int WHOLE_DURATION = 1000;
const int EIGHTH = WHOLE_DURATION / 8;
const int QUARTER = WHOLE_DURATION / 4;
const int QUARTERDOT = WHOLE_DURATION / 3;
const int HALF = WHOLE_DURATION / 2;
const int WHOLE = WHOLE_DURATION;
//make sure the two below arrays match in length. each duration element corresponds to
//one note element.
static int[] note = { NOTE_E, NOTE_E, NOTE_F, NOTE_G, NOTE_G, NOTE_F, NOTE_E,
NOTE_D, NOTE_C, NOTE_C, NOTE_D, NOTE_E, NOTE_E, NOTE_D,
NOTE_D, NOTE_E, NOTE_E, NOTE_F, NOTE_G, NOTE_G, NOTE_F,
NOTE_E, NOTE_D, NOTE_C, NOTE_C, NOTE_D, NOTE_E, NOTE_D,
NOTE_C, NOTE_C};
static int[] duration = { QUARTER, QUARTER, QUARTER, QUARTER, QUARTER, QUARTER, QUARTER,
QUARTER, QUARTER, QUARTER, QUARTER, QUARTER, QUARTERDOT, EIGHTH,
HALF, QUARTER, QUARTER, QUARTER, QUARTER, QUARTER, QUARTER,
QUARTER, QUARTER, QUARTER, QUARTER, QUARTER, QUARTER, QUARTERDOT,
EIGHTH, WHOLE};
static void Main()
{
PwmController Controller1 = PwmController.FromId(FEZ.PwmPin.Controller1.Id);
PwmPin tones = Controller1.OpenPin(FEZ.PwmPin.Controller1.D0);
tones.SetActiveDutyCyclePercentage(0.5);
tones.Start();
while (true)
{
for (int i = 0; i < note.Length; i++)
{
Controller1.SetDesiredFrequency( note[i]);
Thread.Sleep(duration[i]);
}
Thread.Sleep(100);
}
}
}
Servo Motors
Servo motors are controlled by a repeated pulse. The pulse is generated every 20ms. This pulse will have a width between 1ms and 2ms, for min and max. Positional servos will go to a specific direction based on the pulse width. Full rotational servos can be controlled, speed and direction, through this pulse, where 1.5ms pulse will stop, 1ms is full speed and 1ms is reverse full speed.
Tip
most servos will have a 1.25ms min and 1.75max.
using System;
using System.Diagnostics;
using System.Threading;
using GHIElectronics.TinyCLR.Devices.Pwm;
using GHIElectronics.TinyCLR.Pins;
class Program
{
static void Main()
{
PwmController Controller1 = PwmController.FromId(FEZ.PwmPin.Controller1.Id);
PwmPin servo = Controller1.OpenPin(FEZ.PwmPin.Controller1.D0);
Controller1.SetDesiredFrequency(1 / 0.020);//a pulse every 20ms
double maxPulseLength = 1.75;
double minPulseLength = 1.25;
double position = 90;
double speed = 0.5;
servo.Start();
while (true)
{
double duty = ((position / 180.0) * (maxPulseLength / 20 - minPulseLength / 20)) + minPulseLength / 20;
servo.SetActiveDutyCyclePercentage(duty);
position += speed;
if (position <= 0 || position >= 180)
duty *= -1;//reverse dirrection
Thread.Sleep(10);// always give the system time to think!
}
}
}


cip.render.raytrace.geometry
Classes
AGeometry
AQuadricGeo
Cone
Cylinder
Ellipsoid
Hyperboloid
HyperParaboloid
Paraboloid
PlanarPolyhedra
Sphere
XfmGeometry


This is just a collection of cool articles I've seen on the web. I'll try to keep it updated as I see new content.


Dash: QR Today Dash Board
QR Today
Auth Key
Kick
Check for need to generate more QR codes right now. Requries AUTH KEY above.
Status
Get QR M.S. Status - Displayed in "output" below.
Exit Micro Service
Exit M.S. (In Production will restart
automatically
) Requries AUTH KEY above.
Output
QR Today - Conversions
Base 10 ID
Convert base 10 ID to base 60
Base 60 ID
Convert base 60 ID to base 10
Base URL
Base 10 ID
Geneerate URL from ID (base 10)
QR URL
Parse QR URL


They’re really the most utilized, least appreciated part of a good website. The favicon. Being visual creatures, the favicon is how we quickly sort tabs. They’re close to (if not) the most important branding statement of a website, yet nobody ever gives them their due credit. Being the near narcissist I am, I’d like to dedicate some space to the only decent design work I’ve ever done and where the inspiration came from.
At the university level, a serious problem occurs when you want to code on your computer: you have to compile it elsewhere. The official university complier might be newer, older, or you just want to be super safe. So what do you do? You could either:
- Use a flash drive (so low tech)
- Not code on your laptop (not gonna happen)
- Treat your University File System as a Local Drive
Enter sshfs. You can mount any remote file system over ssh and then treat it as if it were a separate hard drive. Think Dropbox for anything. So how does one set it up?
 Not using Homebrew? Fix that.
Next comes the incredibly lengthy command. I’m gonna break it up into parts:
1
sshfs hostname:location_on_host mount_point
One step at a time.
Hostname: This is what you’re ssh’ing into. Think username@server.
Location_on_host: What folder do you want to access? This is the path to that directory. Find the directory you want to access remotely and grab the pwd.
mount_point: You need a folder on your machine to act as a mirror. Nothing will be placed into this folder. But, when sshfs is going, this mount_point folder is going to be your portal into the remote folder. That means that the remote folder /Users/test/test2 becomes mount_point on your local machine. Whatever you do on mount_point happens to /Users/test/test2
That’s it. Check mount_point and you’ll see your remote folder.
I’ve been tweaking the “design” of this blog for quite a while now (I’m clearly not an art major). And the internet pointed out something interesting to me when I was going to tweak the solid color opacity.
12
opacity: 0.75;
filter:alpha(opacity=40);
Look at those two lines of code. They both mean the same thing. One is clearly much cleaner than the other. AnybodIE want to guess whIch browsEr8 uses the second line?
That wasn’t very subtle. Now, this argument has been rehashed over and over again on Reddit so I won’t go into that. Yes, IE8 and below were horribly standards noncompliant. But that’s not my issue.
Do web developers have a moral obligation to continue to support these browsers? Do web developers have a moral obligation to force these users to upgrade by cutting them off?
At what point should web developers sacrifice traffic to send a message.
Disclosure: I’m not cutting off anybody. It’s lonely out here. I’m not cutting off anybody who scans through that many pages of Google results to find me.
Welcome to my part of the interwebs. I’m a college student majoring in Computer Science, looking to spread what little I know with the rest of the world. So first of all, what’s with the name? Rambling Raptors…
First, I wanted to be clear that this will be a haphazard place. They’ll be some coding. They’ll be some ranting. They’ll be the blogging equivalent of a circus juggling monkey on a unicycle. Possibly.
Secondly, there’s alliteration and the obligatory pop-culture reference (so three reasons). People are defined by their actions. What I love defines me. So a statement about what I love describes me more than a flowery paragraph full of fancy jargon from a high-school English class. Jurassic Park is my favorite movie so…raptors.
There you go. Welcome to Rambling Raptors. Cue the John Williams score. We spared all expense.


Lenny’s Lucky Lotto Lists
问题描述 :
Lenny likes to play the game of lotto. In the lotto game, he picks a list of N unique numbers in the range from 1 to M. If his list matches the list of numbers that are drawn, he wins the big prize.
Lenny has a scheme that he thinks is likely to be lucky. He likes to choose his list so that each number in it is at least twice as large as the one before it. So, for example, if N = 4 and M = 10, then the possible lucky lists Lenny could like are:
Lenny has a scheme that he thinks is likely to be lucky. He likes to choose his list so that each number in it is at least twice as large as the one before it. So, for example, if N = 4 and M = 10, then the possible lucky lists Lenny could like are:
1 2 4 8
1 2 4 9
1 2 4 10
1 2 5 10
Thus Lenny has four lists from which to choose.
Your job, given N and M, is to determine from how many lucky lists Lenny can choose.
输入:
There will be multiple cases to consider from input. The first input will be a number C (0 < C <= 50) indicating how many cases with which you will deal. Following this number will be pairs of integers giving values for N and M, in that order. You are guaranteed that 1 <= N <= 10, 1 <= M <= 2000, and N <= M. Each N M pair will occur on a line of its own. N and M will be separated by a single space.
输出:
For each case display a line containing the case number (starting with 1 and increasing sequentially), the input values for N and M, and the number of lucky lists meeting Lenny’s requirements. The desired format is illustrated in the sample shown below.
样例输入:
3 4 10 2 20 2 200
样例输出:
Case 1: n = 4, m = 10, # lists = 4 Case 2: n = 2, m = 20, # lists = 100 Case 3: n = 2, m = 200, # lists = 10000
解题代码:
//* @author: import java.util.*; public class Main { public static void main(String[] args){ Scanner sc=new Scanner(System.in); long dp[][]=new long[11][2010]; int nn=sc.nextInt(); for (int i=1;i<=2000;i++) dp[1][i]=1; for (int i=2;i<=10;i++) for (int j=i;j<=2000;j++) for (int k=1;k<=j/2;k++) dp[i][j]+=dp[i-1][k]; for (int ii=1;ii<=nn;ii++) { int n=sc.nextInt(); int m=sc.nextInt(); long ans=0; for (int i=n;i<=m;i++) ans+=dp[n][i]; System.out.printf("Case %d: n = %d, m = %d, # lists = %d\n",ii,n,m,ans); } } }
(adsbygoogle = window.adsbygoogle || []).push({});
很好，解决了
理解错了。。。。。谢谢楼主~~
I like your publish. It is great to see you verbalize from the coronary heart and clarity on this essential subject matter can be easily noticed.
代码不错，赞一个！
if(j){
int ans=a ;
for(int x=j-1;x>=0;x–){
if(!a ) break;
ans=min(ans,a );
sum+=ans;
}
}
求解释，，dp的思路是什么呢？
“可以发现,树将是满二叉树,”这句话不对吧，构造的树应该是“完全二叉树”，而非“满二叉树”。
较好的写法是 start+(end-start)/2
漂亮。佩服。
P.S. unsigned 应该去掉。换行符是n 不是/n
还可以稍微优化一下，
int main() {
int m,n,ai,aj,bi,bj,ak,bk;
while (scanf("%d%d",&m,&n)!=EOF) {
ai = sqrt(m-1);
bi = sqrt(n-1);
aj = (m-ai*ai-1)>>1;
bj = (n-bi*bi-1)>>1;
ak = ((ai+1)*(ai+1)-m)>>1;
bk = ((bi+1)*(bi+1)-n)>>1;
printf("%dn",abs(ai-bi)+abs(aj-bj)+abs(ak-bk));
}
}
一开始就规定不相邻节点颜色相同，可能得不到最优解。我想个类似的算法，也不确定是否总能得到最优解：先着一个点，随机挑一个相邻点，着第二色，继续随机选一个点，但必须至少有一个边和已着点相邻，着上不同色，当然尽量不增加新色，直到完成。我还找不到反例验证他的错误。。希望LZ也帮想想, 有想法欢迎来邮件。谢谢
根本过不了。。。。
其实国内大部分公司对算法都不够重视。特别是中小型公司老板根本都不懂技术，也不懂什么是算法，从而也不要求程序员懂什么算法，做程序从来不考虑性能问题，只要页面能显示出来就是好程序，这是国内的现状，很无奈。
这道题这里的解法最坏情况似乎应该是指数的。回溯的时候
O(n) = O(n-1) + O(n-2) + ….
O(n-1) = O(n-2) + O(n-3)+ …
O(n) – O(n-1) = O(n-1)
O(n) = 2O(n-1)
L（X [0 .. M-1]，Y [0 .. N-1]）= 1 + L（X [0 .. M-2]，Y [0 .. N-1]）这个地方也也有笔误
应改为L（X [0 .. M-1]，Y [0 .. N-1]）= 1 + L（X [0 .. M-2]，Y [0 .. N-2]）


Man charged over fake music fest tickets
by AAPA 19-year-old Sydney man has been charged with allegedly cheating people out of money for fake music festival tickets.
In April a number of people reported to police that they had paid online for what they believed were music festival tickets but they never received them.
Between May and November, another 11 people lodged similar fraud reports.
Following investigations, police arrested the man on Friday at a Wollongong unit.
He was charged with 18 counts of dishonestly obtaining funds by deception and possessing prohibited drugs.
The man was refused bail to appear in Wollongong Local Court on Saturday.
© AAP 2019


Simulation:
Paused
Time (press spacebar)
Year:
0
Month:
0
Population
Lumberjack:
0
Tree:
0
Bear:
0
Events
Lumber collected:
0
Maul accidents:
0
Monthly Budget
Revenue:
0
Expenses:
0
Income:
0
Total Score:
0


Step 5: Keywords cleanup¶
[1]:
import pandas as pd
from techminer import RecordsDataFrame
rdf = RecordsDataFrame(pd.read_json("step-04.json", orient="records", lines=True))
Keywords with equal number of words¶
[2]:
from techminer import Thesaurus, text_clustering
#
# Search of keywords with the same root
#
th = text_clustering(rdf['keywords'], sep=';', transformer=lambda x: x.lower())
with open('thesaurus-1.json', 'w') as f:
f.write(th.__repr__())
!head -n 30 thesaurus-1.json
{
"algorithm": [
"Algorithms",
"algorithm",
"algorithms"
],
"ann": [
"ANN",
"ann"
],
"anomaly detection": [
"Anomaly detection",
"anomaly detection"
],
"arima modeling": [
"ARIMA Model",
"ARIMA model",
"ARIMA modeling"
],
"article": [
"ARTICLE",
"Article",
"article"
],
"artificial intelligence": [
"Artificial intelligence",
"artificial intelligence"
],
"artificial neural network": [
"Artificial Neural Network",
[3]:
#
# Number of strings differing in keywords
#
print(
len(
set([w.strip() for x in rdf["keywords"] if x is not None for w in x.split(";")])
)
)
1211
[4]:
#
# Reading of keywords edited by the analyst
#
import json
with open("thesaurus-1-edited.json", "r") as f:
dictionary = json.loads(" ".join(f.readlines()))
##
## Limpieza
##
from techminer import Thesaurus
th = Thesaurus(dictionary, ignore_case=False, full_match=True, use_re=False)
rdf["keywords (cleaned)"] = rdf["keywords"].map(lambda x: th.apply(x, sep=";"))
rdf["keywords (cleaned)"] = rdf["keywords (cleaned)"].map(
lambda x: ";".join(set([w.strip() for w in x.split(";")]))
)
rdf["keywords (cleaned)"] = rdf["keywords (cleaned)"].map(
lambda x: x if x != "" else None
)
[5]:
#
# Number unique of strings
#
print(
len(
set(
[
w.strip()
for x in rdf["keywords (cleaned)"]
if x is not None
for w in x.split(";")
]
)
)
)
1010
Substrings clustering¶
[6]:
#
# Substrings in keywords
#
from techminer import text_nesting
tn = text_nesting(rdf['keywords (cleaned)'], sep=';', max_distance=1, transformer=lambda x: x.lower())
with open('thesaurus-2.json', 'w') as f:
f.write(tn.__repr__())
!head -n 60 thesaurus-2.json
{
"adaboost algorithm": [
"AdaBoost algorithm",
"validating AdaBoost algorithm"
],
"adaptive noise": [
"Adaptive noise",
"adaptive noise reducer"
],
"algorithmic trading": [
"Algorithmic trading",
"Algorithmic trading models"
],
"algorithms": [
"Algorithmic approach",
"Analysis algorithms",
"Boruta algorithm",
"Classification algorithm",
"Clustering algorithms",
"Immune algorithms",
"Learning algorithms",
"Learning-based algorithms",
"Levenberg-Marquardt algorithm",
"NARX algorithm",
"State-of-the-art algorithms",
"algorithms",
"genetic algorithms",
"hybrid algorithms"
],
"arima": [
"ARIMA",
"arima modeling"
],
"article": [
"ARTICLE",
"Article",
"article"
],
"artificial intelligence": [
"Artificial Intelligence (AI)",
"Artificial intelligence",
"artificial intelligence"
],
"artificial neural networks": [
"Artificial Neural Network",
"Artificial Neural Networks",
"Artificial neural network models",
"Artificial neural networks (ANN)",
"artificial neural networks"
],
"attention": [
"Attention",
"attention mechanisms"
],
"autoencoder": [
"Autoencoder",
"autoencoder"
],
"backpropagation": [
"Backpropagation",
[7]:
!head -n 60 thesaurus-2-edited.json
{
"(2D) 2 PCA": [
"(2D) 2 PCA",
"(2D) 2 PCA"
],
"Empirical research": [
"Empirical research",
"Empirical studies"
],
"(2D) 2 PCA": [
"(2D) 2 PCA",
"(2D) 2 PCA"
],
"Learning-based algorithms": [
"Learning-based algorithms",
"Learning-based approach",
"Learning-based methods"
],
"Classifiers": [
"Classification Methods",
"Classification algorithm",
"Classification methods"
],
"Forex": [
"Forex (FX)",
"Forex markets"
],
"Elman neural network": [
"Elman neural network",
"Elman recurrent neural network",
"Elman network"
],
"adaboost algorithm": [
"AdaBoost algorithm",
"validating AdaBoost algorithm"
],
"adaptive noise": [
"Adaptive noise",
"adaptive noise reducer"
],
"algorithmic trading": [
"Algorithmic trading",
"Algorithmic trading models"
],
"algorithms": [
"Algorithmic approach",
"Analysis algorithms",
"State-of-the-art algorithms",
"algorithms"
],
"arima": [
"ARIMA",
"arima modeling",
"Autoregressive Integrated Moving Average (ARIMA)",
"Autoregressive integrated moving average models",
"Auto-regressive integrated moving average",
"arima",
"seasonal autoregressive integrated moving average"
],
"artificial intelligence": [
[8]:
with open("thesaurus-2-edited.json", "r") as f:
dictionary = json.loads(" ".join(f.readlines()))
th = Thesaurus(dictionary, ignore_case=False, full_match=True, use_re=False)
[9]:
rdf["keywords (cleaned)"] = rdf["keywords (cleaned)"].map(
lambda x: th.apply(x, sep=";")
)
rdf["keywords (cleaned)"] = rdf["keywords (cleaned)"].map(
lambda x: ";".join(set([w.strip() for w in x.split(";")]))
)
rdf["keywords (cleaned)"] = rdf["keywords (cleaned)"].map(
lambda x: x if x != "" else None
)
[10]:
#
# Number of unique keywords
#
print(
len(
set(
[
w.strip()
for x in rdf["keywords (cleaned)"]
if x is not None
for w in x.split(";")
]
)
)
)
765
[11]:
#
# Review
#
from techminer import display_records
display_records(rdf[["Title", "keywords (cleaned)"]].head(10))
-----------------------------------------------
Record index: 0
{
"Title": "Improving DWT-RNN model via B-spline wavelet multiresolution to forecast a high-frequency time series",
"keywords (cleaned)": "trends;Nonlinear autoregressive neural network;empirical mode decomposition;Moving average;long short-term memory neural network;Noise reduction;machine learning;time series forecasting;Meta-learning"
}
-----------------------------------------------
Record index: 1
{
"Title": "Direct marketing campaigns in retail banking with the use of deep learning and random forests",
"keywords (cleaned)": "Novel applications;Earnings;Tokyo Stock Exchange;costs;Consumer price index;Information science;stock prediction;Newsprint;long short-term memory neural network;Distributed representation;time series forecasting;financial data;Textual information"
}
-----------------------------------------------
Record index: 2
{
"Title": "Combining time-series and textual data for taxi demand prediction in event areas: A deep learning approach",
"keywords (cleaned)": "Self-organized neural networks;financial time series forecasting;Exchange rate time series;feedforward neural networks;Stationary signal;algorithms;Immune algorithms;recurrent neural networks;dynamic neural networks;Self-organised;Exchange rates;intelligent computing;financial data;regularization;Bioinformatics"
}
-----------------------------------------------
Record index: 3
{
"Title": "Stock price forecasting model based on modified convolution neural network and financial time series analysis",
"keywords (cleaned)": "Financial applications;Financial markets;forecasting;financial time series forecasting;time series;deep learning;Computational technology;trading;Auto-regressive exogenous inputs;Risk assessment;mean square error;Bankruptcy prediction;NARX algorithm;stock forecasting;artificial intelligence;commerce;Levenberg-Marquardt algorithm;Learning algorithms;Big data;stock prediction"
}
-----------------------------------------------
Record index: 4
{
"Title": "Sentiment-aware volatility forecasting",
"keywords (cleaned)": "Financial markets;forecasting accuracy;Historical data;forecasting;Long-term forecasting;deep learning;artificial neural networks;Learning architectures;trading;stock forecasting;Market forecast;long short-term memory neural network;time series forecasting;Multi variate analysis;commerce;Multivariant analysis"
}
-----------------------------------------------
Record index: 5
{
"Title": "DeepLOB: Deep convolutional neural networks for limit order books",
"keywords (cleaned)": "Topology;forecasting accuracy;forecasting;Signal reconstruction;financial time series forecasting;high-frequency data;deep learning;Directional accuracy;finance;Dow Jones Industrial averages;Metadata;wavelet transforms;High-frequency forecasting;High frequency HF;financial data;Short term prediction"
}
-----------------------------------------------
Record index: 6
{
"Title": "DeepClue: Visual interpretation of text-based deep stock prediction",
"keywords (cleaned)": "stock markets;forecasting;trading;Threshold parameters;Classifiers;time series forecasting;Pattern recognition;Learning algorithms;Brain;Financial markets;time series;long short-term memory neural network;machine learning;Potassium alloys;Directional predictions;commerce;financial time series;Binary alloys;Uranium alloys;artificial neural networks;recurrent neural networks;Learning systems;Nearest neighbor search;anomaly detection"
}
-----------------------------------------------
Record index: 7
{
"Title": "Stock Price Prediction Based on Information Entropy and Artificial Neural Network",
"keywords (cleaned)": "Financial markets;forecasting;investments;deep learning;Data augmentation;financial time series;time series;mean square error;long short-term memory neural network;overfitting;Stock market index;Medical data analysis;commerce;mean absolute error;Errors;financial data;decision making"
}
-----------------------------------------------
Record index: 8
{
"Title": "Deep Temporal Logistic Bag-of-features for Forecasting High Frequency Limit Order Book Time Series",
"keywords (cleaned)": "Multi-step ahead forecast;economics;forecasting;time series;Recursive prediction;predictive capabilities;algorithms;recurrent neural networks;arima;Data mining;support vector machines;time series forecasting;Complex networks;Comparative analysis;Big data"
}
-----------------------------------------------
Record index: 9
{
"Title": "Comparison of Predictive Algorithms: Backpropagation, SVM, LSTM and Kalman Filter for Stock Market",
"keywords (cleaned)": "polynomials;forecasting;PFLARNN;trading;Evolutionary algorithms;Stock indices;Learning algorithms;differential evolution;optimization;Financial markets;time series;algorithms;commerce;financial data;IBM stock indices;backpropagation;finance;Parameter estimation;Complex networks;AMAPE;artificial neural networks;functions;mape;recurrent neural networks"
}
Deleting based on keywords or other text¶
[12]:
from techminer import display_records
display_records(rdf[["Title", "keywords (cleaned)"]].head(10))
-----------------------------------------------
Record index: 0
{
"Title": "Improving DWT-RNN model via B-spline wavelet multiresolution to forecast a high-frequency time series",
"keywords (cleaned)": "trends;Nonlinear autoregressive neural network;empirical mode decomposition;Moving average;long short-term memory neural network;Noise reduction;machine learning;time series forecasting;Meta-learning"
}
-----------------------------------------------
Record index: 1
{
"Title": "Direct marketing campaigns in retail banking with the use of deep learning and random forests",
"keywords (cleaned)": "Novel applications;Earnings;Tokyo Stock Exchange;costs;Consumer price index;Information science;stock prediction;Newsprint;long short-term memory neural network;Distributed representation;time series forecasting;financial data;Textual information"
}
-----------------------------------------------
Record index: 2
{
"Title": "Combining time-series and textual data for taxi demand prediction in event areas: A deep learning approach",
"keywords (cleaned)": "Self-organized neural networks;financial time series forecasting;Exchange rate time series;feedforward neural networks;Stationary signal;algorithms;Immune algorithms;recurrent neural networks;dynamic neural networks;Self-organised;Exchange rates;intelligent computing;financial data;regularization;Bioinformatics"
}
-----------------------------------------------
Record index: 3
{
"Title": "Stock price forecasting model based on modified convolution neural network and financial time series analysis",
"keywords (cleaned)": "Financial applications;Financial markets;forecasting;financial time series forecasting;time series;deep learning;Computational technology;trading;Auto-regressive exogenous inputs;Risk assessment;mean square error;Bankruptcy prediction;NARX algorithm;stock forecasting;artificial intelligence;commerce;Levenberg-Marquardt algorithm;Learning algorithms;Big data;stock prediction"
}
-----------------------------------------------
Record index: 4
{
"Title": "Sentiment-aware volatility forecasting",
"keywords (cleaned)": "Financial markets;forecasting accuracy;Historical data;forecasting;Long-term forecasting;deep learning;artificial neural networks;Learning architectures;trading;stock forecasting;Market forecast;long short-term memory neural network;time series forecasting;Multi variate analysis;commerce;Multivariant analysis"
}
-----------------------------------------------
Record index: 5
{
"Title": "DeepLOB: Deep convolutional neural networks for limit order books",
"keywords (cleaned)": "Topology;forecasting accuracy;forecasting;Signal reconstruction;financial time series forecasting;high-frequency data;deep learning;Directional accuracy;finance;Dow Jones Industrial averages;Metadata;wavelet transforms;High-frequency forecasting;High frequency HF;financial data;Short term prediction"
}
-----------------------------------------------
Record index: 6
{
"Title": "DeepClue: Visual interpretation of text-based deep stock prediction",
"keywords (cleaned)": "stock markets;forecasting;trading;Threshold parameters;Classifiers;time series forecasting;Pattern recognition;Learning algorithms;Brain;Financial markets;time series;long short-term memory neural network;machine learning;Potassium alloys;Directional predictions;commerce;financial time series;Binary alloys;Uranium alloys;artificial neural networks;recurrent neural networks;Learning systems;Nearest neighbor search;anomaly detection"
}
-----------------------------------------------
Record index: 7
{
"Title": "Stock Price Prediction Based on Information Entropy and Artificial Neural Network",
"keywords (cleaned)": "Financial markets;forecasting;investments;deep learning;Data augmentation;financial time series;time series;mean square error;long short-term memory neural network;overfitting;Stock market index;Medical data analysis;commerce;mean absolute error;Errors;financial data;decision making"
}
-----------------------------------------------
Record index: 8
{
"Title": "Deep Temporal Logistic Bag-of-features for Forecasting High Frequency Limit Order Book Time Series",
"keywords (cleaned)": "Multi-step ahead forecast;economics;forecasting;time series;Recursive prediction;predictive capabilities;algorithms;recurrent neural networks;arima;Data mining;support vector machines;time series forecasting;Complex networks;Comparative analysis;Big data"
}
-----------------------------------------------
Record index: 9
{
"Title": "Comparison of Predictive Algorithms: Backpropagation, SVM, LSTM and Kalman Filter for Stock Market",
"keywords (cleaned)": "polynomials;forecasting;PFLARNN;trading;Evolutionary algorithms;Stock indices;Learning algorithms;differential evolution;optimization;Financial markets;time series;algorithms;commerce;financial data;IBM stock indices;backpropagation;finance;Parameter estimation;Complex networks;AMAPE;artificial neural networks;functions;mape;recurrent neural networks"
}
[13]:
from techminer.keywords import Keywords
kyw = Keywords()
kyw.add_keywords(["Vacuum", "market data"])
kyw
[13]:
[
"Vacuum",
"market data"
]
ignore_case=True, full_match=False, use_re=False
[14]:
"vacuum" in kyw
[14]:
True
[15]:
idx = rdf["keywords (cleaned)"].map(lambda x: not kyw.common(x, sep=";"))
[16]:
idx[0:20]
[16]:
0 True
1 True
2 True
3 True
4 True
5 True
6 True
7 True
8 True
9 True
10 True
11 True
12 True
13 True
14 True
15 True
16 True
17 True
18 True
19 True
Name: keywords (cleaned), dtype: bool
[17]:
print("Records before = ", len(rdf))
rdf = rdf[idx]
print("Records after = ", len(rdf))
Records before = 145
Records after = 144
[18]:
rdf.to_json("step-05.json", orient="records", lines=True)


Cannabis Legalization and Regulation
Cannabis is now legal.
The Cannabis Act creates a strict legal framework for controlling the production, distribution, sale and possession of cannabis across Canada. The Act aims to accomplish 3 goals:
- keep cannabis out of the hands of youth
- keep profits out of the pockets of criminals
- protect public health and safety by allowing adults access to legal cannabis
What is legal as of October 17, 2018
Subject to provincial or territorial restrictions, adults who are 18 years of age or older are legally able to:
- possess up to 30 grams of legal cannabis, dried or equivalent in non-dried form in public
- share up to 30 grams of legal cannabis with other adults
- buy dried or fresh cannabis and cannabis oil from a provincially-licensed retailer
- in provinces and territories without a regulated retail framework, individuals are able to purchase cannabis online from federally-licensed producers
- grow, from licensed seed or seedlings, up to 4 cannabis plants per residence for personal use
- make cannabis products, such as food and drinks, at home as long as organic solvents are not used to create concentrated products
Cannabis edible products and concentrates will be legal for sale approximately one year after the Cannabis Act came into force on October 17th, 2018.
Possession limits for cannabis products
The possession limits in the Cannabis Act are based on dried cannabis. Equivalents were developed for other cannabis products to identify what their possession limit would be.
One (1) gram of dried cannabis is equal to:
- 5 grams of fresh cannabis
- 15 grams of edible product
- 70 grams of liquid product
- 0.25 grams of concentrates (solid or liquid)
- 1 cannabis plant seed
This means, for example, that an adult 18 years of age or older, can legally possess 150 grams of fresh cannabis.
Cannabis for medical purposes
The current regime for medical cannabis will continue to allow access to cannabis for people who have the authorization of their healthcare provider.
Protecting youth
The Cannabis Act has several measures that help prevent youth from accessing cannabis. These include both age restrictions and restricting promotion of cannabis.
Age restrictions
No person may sell or provide cannabis to any person under the age of 18. There are 2 criminal offences related to providing cannabis to youth, with maximum penalties of 14 years in jail:
- giving or selling cannabis to youth
- using a youth to commit a cannabis-related offence
Restricting promotion and enticement
The Cannabis Act helps discourage youth cannabis use by prohibiting:
- products that are appealing to youth
- packaging or labelling cannabis in a way that makes it appealing to youth
- selling cannabis through self-service displays or vending machines
- promoting cannabis, except in narrow circumstances where young people could not see the promotion
Penalties for violating these prohibitions include a fine of up to $5 million or 3 years in jail.
Protecting public health
The Act protects public health through creating strict safety and quality regulations. In addition, public education efforts are currently underway to raise awareness about safety measures and any potential health risks.
Strict regulation
Federal, provincial and territorial governments share responsibility for overseeing the cannabis regulation system.
The Federal government's responsibilities are to set:
- strict requirements for producers who grow and manufacture cannabis
- industry-wide rules and standards, including:
- types of cannabis products available for sale
- packaging and labelling requirements for products
- standardized serving sizes and potency
- prohibitions on the use of certain ingredients
- good production practices
- tracking requirements of cannabis from seed to sale to keep it out of the illegal market
- restrictions on promotional activities
Provinces and territories are responsible for developing, implementing, maintaining and enforcing systems to oversee the distribution and sale of cannabis. They are also able to add their own safety measures, such as:
- increasing the minimum age in their province or territory (but not lowering it)
- lowering the personal possession limit in their jurisdiction
- creating additional rules for growing cannabis at home, such as lowering the number of plants per residence
- restricting where adults can consume cannabis, such as in public or in vehicles
Be sure to check local laws in your province.
Public education
The Government of Canada has committed close to $46 million over the next five years for cannabis public education and awareness activities. These are to inform Canadians, especially youth, of the health and safety risks of cannabis consumption.
Reducing criminal activity
Statistics Canada reports that in 2017, almost 48,000 cannabis-related drug offences were reported to police. The majority of these (80%) were possession offences. A criminal record resulting from a cannabis offence, even a minor possession charge, can have serious and lifelong implications for the person charged. In allowing the production and possession of legal cannabis for adults, the Act helps keep Canadians who consume cannabis out of the criminal justice system, reducing the burden on the courts.
Criminal penalties
Cannabis offences target those acting outside of the legal framework, such as organized crime. Penalties are set in proportion to the seriousness of the offence. Sanctions range from warnings and tickets for minor offences to criminal prosecution and imprisonment for more serious offences. Some offences specifically target people who make cannabis available to youth.
| Offence | Penalties |
|---|---|
| Possession over the limit |
|
| Illegal distribution or sale |
|
| Producing cannabis beyond personal cultivation limits or with combustible solvents |
|
| Taking cannabis across Canada's borders |
|
| Giving or selling cannabis to a person under 18 |
|
| Using a youth to commit a cannabis-related offence |
|
Further penalties related to cannabis-impaired driving are also included in Canada’s impaired driving legislation, along with impairment rules for other drugs such as:
- LSD
- heroin
- cocaine
- psilocybin (magic mushrooms)
More information
Please visit Cannabis in Canada for more information on cannabis:
- safety risks
- health effects
- transportation
- licensed production
- Date modified:


| Everyday I have the Blues Elmore Jones |
| Everyday is Sunshine John Doe |
| Everyday I Love You Boyzone |
| Baby One More Time Britney Spears |
| Black or White Micheal Jackson |
| Everyday I Love You Boyzone |
| See You Again Wiz Khalifa |
| Sugar Maroon 5 |
| Style Taylor Swift |
| Talking Body Love Lo |
| See You Again Wiz Khalifa |
| Sugar Maroon 5 |
| Style Taylor Swift |
| Baby One More Time Britney Spears |
| Black or White Micheal Jackson |
| Everyday I Love You Boyzone |
| See You Again Wiz Khalifa |
| Sugar Maroon 5 |
| Style Taylor Swift |
| Talking Body Love Lo |
| See You Again Wiz Khalifa |
| Sugar Maroon 5 |
| Style Taylor Swift |
| See You Again Wiz Khalifa |
| Sugar Maroon 5 |
| Style Taylor Swift |


abstract val idColumnNames: Pair<String, String>
The names of the ID columns that defines the relationship of the table the subclass is managing.
The order of the column name pair must correspond to the order of the ID pair in DataRelationship.getIds.


Go to the Home Page
Today, I've decided that I like broken links. Here's a few:
Previous Entry: Entry 1


Role
Quality Assurance Intern
Tools
Jira
Environments
Angular (Mac, Windows)
Mobile (iOS, Android)
Duration
Jun 2017-Aug 2017 (3 mo)
Tools
Jira
Environments
Angular (Mac, Windows)
Mobile (iOS, Android)
Duration
Jun 2017-Aug 2017 (3 mo)
Tested functionality and stability of all features of new app releases • Effectively communicated bugs to support an agile environment • Reported UX feedback, suggested design and usability improvements Currently, as an intern at a small startup, I use certain tools to aid the company’s software development methodology, which I learned about in class. I’m also fascinated by the process of creating a product. In weekly demo meetings, surrounded by seasoned developers, designers, business strategists, and the CEO, I can voice my opinion about a certain feature and be taken seriously. This summer, I’m interning at a startup company still in stealth mode. Apart from testing the product, I attend weekly demo meetings in which, even among senior developers, business strategists, and the CEO, my opinion about a certain feature actually matters. As a result, I’ve become fascinated with the process of creating a product and am interested in product management.
PROBLEM
The product was still in stealth mode
OTHER WORK
I also participated in focus group meetings


My favorite extensions for Visual Studio for Mac
5 extensions to transform Visual Studio for Mac to even more powerful IDE. Each of them, when discovered (or developed), allowed me to save my time and simplify my workflow.
1. NuGet Package Management
This one I found out quite recently. If you ever used VS 2017, you know that it has much nicer and comfortable UI to manage NuGet packagets. You can install and update multiple selected packages at once.
I found it very useful, especially when installing next MvvmCross update and keeping all other packages unchanged.
VS4Mac team, you should have that built in! Thanks to @brent.l for the tip.
Download NuGet Package Management extensions
Github repo: https://github.com/mrward/monodevelop-addins
2. DefaultDesigner
This is a Xamarin Studio & Visual Studio for Mac add-in to open .xib and .storyboard files with Xcode Interface Builder by default. By double clicking it.
Awesome timesaver. Since I edit all storyboards in XCode only, this is a must for me.
Download DefaultDesigner for Visual Studio for Mac
Github repo: https://github.com/colbylwilliams/DefaultDesigner
3. MFractor
Kudos to Matthew for this amazing mega-extension (comes in two flavors, lite and pro). I can’t even start to describe what you can do with it, instead go and check the website https://www.mfractor.com/
Some of the features I like:
- XAML helpers essential for any Xamarin.Forms developer
- Android Resource intellinsense and help with navigation and replace with resource lookup
- Point out missing constructors for Xamarin.Android views/classes
- many other things I have not learned yet
MFactor Pro: https://www.mfractor.com/products/mfractor-for-visual-studio-mac
MFractor Lite: https://www.mfractor.com/pages/download
4. SortAndRemoveUsings
Disclaimer: this is my own extension. It helps me by automatically sort and remove usings when you save a C# file. Extending VS4Mac was moderately easy, and I do that action anyway before commit since I like to keep my code clean.
No magic involved regarding usings here, instead of going through context menu this add-in does that on file save.
Download SortAndRemoveUsings for Visual Studio for Mac
Github repo: https://github.com/alexsorokoletov/VisualStudioMac.SortRemoveUsings
5. SolutionName
Disclaimer: this is my own extension. This extension helps me easily determine which solution is open right now if I have several Visual Studio instances open. In a way, this is a cheap replacement for Windows 10 task switcher which shows icon and solution name when switching between VS 2017 instances.
Download VS4Mac.SolutionName for Visual Studio for Mac
Github repo: https://github.com/DreamTeamMobile/VS4Mac.SolutionName
Your recommendations?
Which extensions do you use? Let me know in the comments!
If you liked this post, you can share it with your followers or follow me on Twitter!


My name is Tessie and back in 2015 I weighed in at 220 lbs and wore a size 18. At that time I thought I was happy, healthy, and in shape. Doctors would always mention my heart problem and recommended me to lose at least 50 lbs. Although I was highly aware of my Heart Issue I still didn’t listen and I let myself continue to be only 5’4 weighing 70 lbs over my recommended height to weight ratio I was considered overly obese. In early 2015 my best friend passed away due to an over dose. It was a hard time in my life accepting such a drastic life change that I started to self destruct. I went down such a rough patch that the only person that could have my back was God. I hit rock bottom and at that exact moment I new I had to make some major life changes, including losing the weight my doctors requested of me. I new if I wanted to live longer than my best friend, if I wanted to be healthy, if I truly wanted to be happy it was Time to take on the journey of a lifetime.
Yes I contemplated weight loss surgery, diet pills, waist trainers, and so forth. However; I decided to take the best route for me, and that was to lose the weight as natural as possible.