o != arg0
is the same as !(o == (arg0))
.
o != arg0
is the same as !(o == (arg0))
.
the object to compare against this object for dis-equality.
false
if the receiver object is equivalent to the argument; true
otherwise.
o == arg0
is the same as if (o eq null) arg0 eq null else o.equals(arg0)
.
o == arg0
is the same as if (o eq null) arg0 eq null else o.equals(arg0)
.
the object to compare against this object for equality.
true
if the receiver object is equivalent to the argument; false
otherwise.
o == arg0
is the same as o.equals(arg0)
.
o == arg0
is the same as o.equals(arg0)
.
the object to compare against this object for equality.
true
if the receiver object is equivalent to the argument; false
otherwise.
This method is used to cast the receiver object to be of type T0
.
This method is used to cast the receiver object to be of type T0
.
Note that the success of a cast at runtime is modulo Scala's erasure semantics. Therefore the expression1.asInstanceOf[String]
will throw a ClassCastException
at runtime, while the expressionList(1).asInstanceOf[List[String]]
will not. In the latter example, because the type argument is erased as
part of compilation it is not possible to check whether the contents of the list are of the requested typed.
the receiver object.
This method creates and returns a copy of the receiver object.
This method creates and returns a copy of the receiver object.
The default implementation of the clone
method is platform dependent.
a copy of the receiver object.
This method is used to test whether the argument (arg0
) is a reference to the
receiver object (this
).
This method is used to test whether the argument (arg0
) is a reference to the
receiver object (this
).
The eq
method implements an [http://en.wikipedia.org/wiki/Equivalence_relation equivalence relation] on
non-null instances of AnyRef
:
* It is reflexive: for any non-null instance x
of type AnyRef
, x.eq(x)
returns true
.
* It is symmetric: for any non-null instances x
and y
of type AnyRef
, x.eq(y)
returns true
if and
only if y.eq(x)
returns true
.
* It is transitive: for any non-null instances x
, y
, and z
of type AnyRef
if x.eq(y)
returns true
and y.eq(z)
returns true
, then x.eq(z)
returns true
.
Additionally, the eq
method has three other properties.
* It is consistent: for any non-null instances x
and y
of type AnyRef
, multiple invocations of
x.eq(y)
consistently returns true
or consistently returns false
.
* For any non-null instance x
of type AnyRef
, x.eq(null)
and null.eq(x)
returns false
.
* null.eq(null)
returns true
.
When overriding the equals
or hashCode
methods, it is important to ensure that their behavior is
consistent with reference equality. Therefore, if two objects are references to each other (o1 eq o2
), they
should be equal to each other (o1 == o2
) and they should hash to the same value (o1.hashCode == o2.hashCode
).
the object to compare against this object for reference equality.
true
if the argument is a reference to the receiver object; false
otherwise.
This method is used to compare the receiver object (this
) with the argument object (arg0
) for equivalence.
This method is used to compare the receiver object (this
) with the argument object (arg0
) for equivalence.
The default implementations of this method is an [http://en.wikipedia.org/wiki/Equivalence_relation equivalence
relation]:
* It is reflexive: for any instance x
of type Any
, x.equals(x)
should return true
.
* It is symmetric: for any instances x
and y
of type Any
, x.equals(y)
should return true
if and
only if y.equals(x)
returns true
.
* It is transitive: for any instances x
, y
, and z
of type AnyRef
if x.equals(y)
returns true
and
y.equals(z)
returns true
, then x.equals(z)
should return true
.
If you override this method, you should verify that your implementation remains an equivalence relation.
Additionally, when overriding this method it is often necessary to override hashCode
to ensure that objects
that are "equal" (o1.equals(o2)
returns true
) hash to the same
scala.Int
(o1.hashCode.equals(o2.hashCode)
).
the object to compare against this object for equality.
true
if the receiver object is equivalent to the argument; false
otherwise.
This method is called by the garbage collector on the receiver object when garbage collection determines that there are no more references to the object.
This method is called by the garbage collector on the receiver object when garbage collection determines that there are no more references to the object.
The details of when and if the finalize
method are invoked, as well as the interaction between finalize
and non-local returns and exceptions, are all platform dependent.
Returns a representation that corresponds to the dynamic class of the receiver object.
Returns a representation that corresponds to the dynamic class of the receiver object.
The nature of the representation is platform dependent.
a representation that corresponds to the dynamic class of the receiver object.
Returns a hash code value for the object.
Returns a hash code value for the object.
The default hashing algorithm is platform dependent.
Note that it is allowed for two objects to have identical hash codes (o1.hashCode.equals(o2.hashCode)
) yet
not be equal (o1.equals(o2)
returns false
). A degenerate implementation could always return 0
.
However, it is required that if two objects are equal (o1.equals(o2)
returns true
) that they have
identical hash codes (o1.hashCode.equals(o2.hashCode)
). Therefore, when overriding this method, be sure
to verify that the behavior is consistent with the equals
method.
the hash code value for the object.
Returns true if this broker is the current controller.
Returns true if this broker is the current controller.
This method is used to test whether the dynamic type of the receiver object is T0
.
This method is used to test whether the dynamic type of the receiver object is T0
.
Note that the test result of the test is modulo Scala's erasure semantics. Therefore the expression1.isInstanceOf[String]
will return false
, while the expression List(1).isInstanceOf[List[String]]
will
return true
. In the latter example, because the type argument is erased as part of compilation it is not
possible to check whether the contents of the list are of the requested typed.
true
if the receiver object is an instance of erasure of type T0
; false
otherwise.
o.ne(arg0)
is the same as !(o.eq(arg0))
.
o.ne(arg0)
is the same as !(o.eq(arg0))
.
the object to compare against this object for reference dis-equality.
false
if the argument is not a reference to the receiver object; true
otherwise.
Wakes up a single thread that is waiting on the receiver object's monitor.
Wakes up a single thread that is waiting on the receiver object's monitor.
Wakes up all threads that are waiting on the receiver object's monitor.
Wakes up all threads that are waiting on the receiver object's monitor.
This callback is invoked by the replica state machine's broker change listener with the list of failed brokers as input.
This callback is invoked by the replica state machine's broker change listener with the list of failed brokers as input. It does the following - 1. Mark partitions with dead leaders as offline 2. Triggers the OnlinePartition state change for all new/offline partitions 3. Invokes the OfflineReplica state change on the input list of newly started brokers
Note that we don't need to refresh the leader/isr cache for all topic/partitions at this point. This is because the partition state machine will refresh our cache for us when performing leader election for all new/offline partitions coming online.
This callback is invoked by the replica state machine's broker change listener, with the list of newly started brokers as input.
This callback is invoked by the replica state machine's broker change listener, with the list of newly started brokers as input. It does the following - 1. Triggers the OnlinePartition state change for all new/offline partitions 2. It checks whether there are reassigned replicas assigned to any newly started brokers. If so, it performs the reassignment logic for each topic/partition.
Note that we don't need to refresh the leader/isr cache for all topic/partitions at this point for two reasons: 1. The partition state machine, when triggering online state change, will refresh leader and ISR for only those partitions currently new or offline (rather than every partition this controller is aware of) 2. Even if we do refresh the cache, there is no guarantee that by the time the leader and ISR request reaches every broker that it is still valid. Brokers check the leader epoch to determine validity of the request.
This callback is invoked by the zookeeper leader elector on electing the current broker as the new controller.
This callback is invoked by the zookeeper leader elector on electing the current broker as the new controller. It does the following things on the become-controller state change - 1. Register controller epoch changed listener 2. Increments the controller epoch 3. Initializes the controller's context object that holds cache objects for current topics, live brokers and leaders for all existing partitions. 4. Starts the controller's channel manager 5. Starts the replica state machine 6. Starts the partition state machine If it encounters any unexpected exception/error while becoming controller, it resigns as the current controller. This ensures another controller election will be triggered and there will always be an actively serving controller
This callback is invoked by the zookeeper leader elector when the current broker resigns as the controller.
This callback is invoked by the zookeeper leader elector when the current broker resigns as the controller. This is required to clean up internal controller data structures
This callback is invoked by the topic change callback with the list of failed brokers as input.
This callback is invoked by the topic change callback with the list of failed brokers as input. It does the following - 1. Move the newly created partitions to the NewPartition state 2. Move the newly created partitions from NewPartition->OnlinePartition state
This callback is invoked by the partition state machine's topic change listener with the list of new topics and partitions as input.
This callback is invoked by the partition state machine's topic change listener with the list of new topics and partitions as input. It does the following - 1. Registers partition change listener. This is not required until KAFKA-347 2. Invokes the new partition callback 3. Send metadata request with the new topic to all brokers so they allow requests for that topic to be served
This callback is invoked by the reassigned partitions listener.
This callback is invoked by the reassigned partitions listener. When an admin command initiates a partition reassignment, it creates the /admin/reassign_partitions path that triggers the zookeeper listener. Reassigning replicas for a partition goes through a few steps listed in the code. RAR = Reassigned replicas OAR = Original list of replicas for partition AR = current assigned replicas
1. Update AR in ZK with OAR + RAR. 2. Send LeaderAndIsr request to every replica in OAR + RAR (with AR as OAR + RAR). We do this by forcing an update of the leader epoch in zookeeper. 3. Start new replicas RAR - OAR by moving replicas in RAR - OAR to NewReplica state. 4. Wait until all replicas in RAR are in sync with the leader. 5 Move all replicas in RAR to OnlineReplica state. 6. Set AR to RAR in memory. 7. If the leader is not in RAR, elect a new leader from RAR. If new leader needs to be elected from RAR, a LeaderAndIsr will be sent. If not, then leader epoch will be incremented in zookeeper and a LeaderAndIsr request will be sent. In any case, the LeaderAndIsr request will have AR = RAR. This will prevent the leader from adding any replica in RAR - OAR back in the isr. 8. Move all replicas in OAR - RAR to OfflineReplica state. As part of OfflineReplica state change, we shrink the isr to remove OAR - RAR in zookeeper and sent a LeaderAndIsr ONLY to the Leader to notify it of the shrunk isr. After that, we send a StopReplica (delete = false) to the replicas in OAR - RAR. 9. Move all replicas in OAR - RAR to NonExistentReplica state. This will send a StopReplica (delete = false) to the replicas in OAR - RAR to physically delete the replicas on disk. 10. Update AR in ZK with RAR. 11. Update the /admin/reassign_partitions path in ZK to remove this partition. 12. After electing leader, the replicas and isr information changes. So resend the update metadata request to every broker.
For example, if OAR = {1, 2, 3} and RAR = {4,5,6}, the values in the assigned replica (AR) and leader/isr path in ZK may go through the following transition. AR leader/isr {1,2,3} 1/{1,2,3} (initial state) {1,2,3,4,5,6} 1/{1,2,3} (step 2) {1,2,3,4,5,6} 1/{1,2,3,4,5,6} (step 4) {1,2,3,4,5,6} 4/{1,2,3,4,5,6} (step 7) {1,2,3,4,5,6} 4/{4,5,6} (step 8) {4,5,6} 4/{4,5,6} (step 10)
Note that we have to update AR in ZK with RAR last since it's the only place where we store OAR persistently. This way, if the controller crashes before that step, we can still recover.
Removes a given partition replica from the ISR; if it is not the current leader and there are sufficient remaining replicas in ISR.
Removes a given partition replica from the ISR; if it is not the current leader and there are sufficient remaining replicas in ISR.
topic
partition
replica Id
the new leaderAndIsr (with the replica removed if it was present), or None if leaderAndIsr is empty.
Send the leader information for selected partitions to selected brokers so that they can correctly respond to metadata requests
Send the leader information for selected partitions to selected brokers so that they can correctly respond to metadata requests
The brokers that the update metadata request should be sent to
Invoked when the controller module of a Kafka server is shutting down.
Invoked when the controller module of a Kafka server is shutting down. If the broker was the current controller, it shuts down the partition and replica state machines. If not, those are a no-op. In addition to that, it also shuts down the controller channel manager, if one exists (i.e. if it was the current controller)
On clean shutdown, the controller first determines the partitions that the shutting down broker leads, and moves leadership of those partitions to another broker that is in that partition's ISR.
On clean shutdown, the controller first determines the partitions that the shutting down broker leads, and moves leadership of those partitions to another broker that is in that partition's ISR.
Id of the broker to shutdown.
The number of partitions that the broker still leads.
Invoked when the controller module of a Kafka server is started up.
Invoked when the controller module of a Kafka server is started up. This does not assume that the current broker is the controller. It merely registers the session expiration listener and starts the controller leader elector
Returns a string representation of the object.
Returns a string representation of the object.
The default representation is platform dependent.
a string representation of the object.


|
| template<typename T > |
| void | setBitFlag (volatile T ®, T flag) |
| | Set the bits in the flag for reg. More...
|
| |
| template<typename T > |
| void | clearBitFlag (volatile T ®, T flag) |
| | Clear the bits in the flag for reg. More...
|
| |
| template<typename T > |
| void | changeBitFlag (volatile T ®, T flag, T state) |
| | Change the bits in the flag for reg. More...
|
| |
| template<typename T > |
| volatile bool | getBitFlag (volatile T ®, T flag) |
| | Get the bits in the flag for reg. More...
|
| |
Atomic set, clear, change, or get bit in a register.
Clear bit in address (make it zero), set bit (make it one), or return the value of that bit. changeBitFlag
can change up to 2 bits in a flag at the same time
We can change this functions depending on the board:
- Teensy 3.x use bitband.
- Teensy LC has a more advanced bit manipulation engine.
- Teensy 4 also has bitband capabilities, but are not yet implemented, instead registers are set and cleared manually. TODO: fix this.


Misc
- Mostly writing application today…
- Review for EcoLet
- looking over pomdp/momdp
- Notebook archives now on figshare (plain-txt versions). Can now also cite entries by doi, e.g.: Lab Notebook (2010) doi:10.6084/m9.figshare.96916, and Lab Notebook, (2011) doi:10.6084/m9.figshare.96919. Would publishing individual entries and individual figshare objects be preferable or just annoying?
- Meeting tomorrow with Annette Thomas, CEO NPG/MacMillian. review interview with David Worlock
Munch data project
- Data extraction for geospatial life history project (file
R script for converting place names into latitude/longitude:
library(RCurl)
library(RJSONIO)
construct.geocode.url <- function(address, return.call = "json", sensor = "false") {
root <- "https://maps.google.com/maps/api/geocode/"
u <- paste(root, return.call, "?address=", address, "&sensor=", sensor, sep = "")
return(URLencode(u))
}
gGeoCode <- function(address,verbose=FALSE) {
if(verbose) cat(address,"\n")
u <- construct.geocode.url(address)
doc <- getURL(u)
x <- fromJSON(doc,simplify = FALSE)
if(x$status=="OK") {
lat <- x$results[[1]]$geometry$location$lat
lng <- x$results[[1]]$geometry$location$lng
return(c(lat, lng))
} else {
return(c(NA,NA))
}
}
XML compliance in HTML5
HTML5 allows tags to be unclosed, e.g. <meta charset="utf-8">
instead of <meta charset="utf-8" />
but this is not valid XML.
See: * Polyglot/xhtml5 author guide * Benefits of XML * W3C XHTML media type * Optional tags in html5
Note that tags with no content must be closed with />
(like the meta
example) while tags with content must get a normal closing (<li> item </li>
etc). Despite this, the HTML5 spec is kinda logical since closing is syntax redundant even though not closing is not valid XML, see SO question for discussion.
example
Basic XML parsing is now possible, e.g. in R:
require(XML)
require(RCurl)
tt <- getURLContent("https://www.carlboettiger.info/2012/10/25/stochastic-dynamic-programming-with-gaussian-process-approx.html")
doc <- xmlParse(tt)
getNodeSet(doc, "//x:meta", namespace="x")
Validation requires meta
tags only appear in <head>
and not <body>
(but still do use property
and not name
for RDFa properties). Validation also requries all images have alt-text, which means I should remember to use anchor text om pandoc images (e.g. also name my graph knitr chunks intelligently). Otherwise the site validates as HTML5.
Ignoring the declared content-type will nearly validate as XML. Had to make the attribute onClick
from the Google tracker javascript lowercase onclick
, like all other attributes. Now th only challenge is that HTML5 needs lang=
declared in <html>
tag, (while is tolerant of xml:lang
), but XML
doesn’t want to see lang
in the <html>
tag. Perhaps can go somewhere else and be valid HTML5? (Using a meta
tag for this is now obsolete).
MathML
Mathml namespace is loaded by default in HTML5 (a native namespace). Currently using the javascript MathJax which has very nice display and interactive toggles (including getting the latex or mathml source). It looks like MathJax can take either latex input or mathml input, and Pandoc can render the latex source (much much nicer to type) into mathml. Just need to get pandoc to convert the source to mathml and then have the mathml rendered pretty by MathJax css, e.g. https://www.mathjax.org/demos/mathml-samples/. This may also load faster than javascript-based rendering of MathJax(?)
ALM goals
Headed to the PLOS ALM conference with ropensci next week. Should be a good chance to catch up on projects:
- rfigshare to CRAN
- semantic knitcitations
- Mark Hahnel: figshare archiving of notebook – archive the markdown? archive code? archive git repos?
- Martin Fenner: Scholarly HTML standards, notebook standards (can we get John Kunze involved?)


Bali was Weird, the People Sucked, and Maybe I Sucked Too
I’m gonna be real with you.
Bali has been weird.
Where do I begin? So I broke my trip into two parts: two weeks in Ubud and two in Canggu. I wanted to see what each was about, and my boyfriend’s Balinese friend Kera* (named changed) really wanted to host me in Ubud.
Ubud is first up.
Kera’s homestay is out in the countryside, and every morning I wake up and walk out onto my terrace to see nothing but rice paddies with palm tree forests in the background, the breeze in my hair, the sun shining, feeling like I’ve actually found paradise. Unreal.
{PICTURE}
Every morning, no matter which ungodly hour I wake up at, Kera’s husband makes me a hot breakfast.  After breakfast, I go out to lunch and the locals ask to take photos with me. I end up taking more pictures with strangers in my two weeks in Ubud than in my entire first year of travel.
{PICTURE}
I go for daily runs along the rice fields at sunset and everyone turns and smiles and talks to me. Every time I come home, everyone in the family stops what they’re doing to acknowledge my presence. If I want tea? Kera’s sister, who has a leg deformity and uses a crutch, climbs the stairs and makes it for me, not allowing me to do it myself. People on the streets introduce themselves, including a mystical old man who invites me to his jungle temple (it is ridiculously cool), introduces me to his wife (pictured below) and says I’m welcome to visit them any time.
{PICTURE} {PICTURE}
After a few days of this, of waking up whenever I want, having hot meals made on demand by the house-husband, and watching farmers out slashing rice in the fields, I begin to feel uncomfortable. It dawns on me that because I come from a rich country, I can stay in the nice room with the view and the marble floors while the rest of the family shares one bed with no door on their room. Because I’m white, everyone wants pictures with me. Because I grew up with enough money, I don’t have to know how to count it like I was born holding it. My last day in Ubud, Kera asks for 378,000 IDR and I slowly, painstakingly count it out before she takes it and counts it in 2 seconds, her hands moving like the money is a mere extension of her arm.
Speaking of Kera.  Saying that’s she’s a real hustler who charges rich people $100 each for rice paddy tours. Saying that she’s trapped in an arranged marriage where her husband’s entire family has to live with her, that he dampened her dreams, doesn’t support her ambition, and is keeping her from living her fullest life.
Kera is a woman who longs for more, but since she’s Balinese, she is stuck with the life that’s been given her.
And in walks me. I don’t even know how to count money right. I am languid, and I wake up late, and I have no idea how lucky I am. And the tall, funny, blue eyed Swedish man she has a crush on had the gall to send me to her homestay, telling her that I was something special and to take good care of me.

 In the nearby jungle the locals are playing super eery traditional Balinese music which sounds like it was created in Mordor and was created to summon Sauron. Kera lights a mosquito coil, sits across from me, and tells me all sorts of lies about how my boyfriend is returning in September to open a co-working space, and he’s going to stay in the area for a long time, and didn’t he tell me? And I look into her eyes, full of spice and ambition and fire and anger, and I both deeply respect and pity her at the same time.
The next day I go on my evening solo-jog. I run past a bunch of the kids playing- they’re always in a group laughing and making up adventures together. Kera is never alone either, she’s always chatting with her friends, family, or other neighbors. In fact, I never see Balinese people by themselves, as it seems like everyone in this village sticks together. On my run, I see her husband running errands. As usual, he’s smiling. As usual, he’s with their 3 year old son- he’s always with at least one of the kids.
I look at his face and realize that he’s quite handsome, and I think about the fact that Kera lives in the country, is surrounded by nature all the time, and has family to help her with the household chores. How her kids are growing up outdoors with a community that loves and cares for them. And how her husband always does everything with love (I always knew when Kera made breakfast because it looked like a mess compared to his meals), and how he was the perfect stay-at-home dad to her career-woman ways.
And I notice that he has her in his phone as “lover.”
I mention this to my boyfriend. “Wow,” he says. “I had no idea he loved her. She definitely doesn’t love him.”
I wonder if it’s because they’re poorly matched, or simply because she didn’t have a choice in the matter. I wonder if she had the ability to chose him, him being a handsome, caring, good person, would she love him then? If it hadn’t been forced upon her, would she be happy with the life she has?
So with all that jumbled in my brain, two weeks after arriving I get in a cab and come to Berawa.
It’s like stepping into the world Kera dreams of at night. Everyone looks like the direct descendants of a God. Six pack abs aren’t even impressive here.
The sun shines bright over the crashing waves. Walking along the beach at sunset, once again, I think I’ve actually found paradise.
{PICTURE}
I go out to breakfast the next day and see they serve açaí bowls, so I order one and of course it’s not genuine acai (I’ve never had real açaí outside of Brazil; they always mix in other fruits). This one isn’t even the right color (it’s hot pink instead of a deep purple), but it’s beautiful and covered in edible flowers and surely none of their European customers know the difference anyway.
But I know the difference. It’s beautiful, and it’s delicious, but it’s not real.
I can’t help but think about that over the next week. Every day I go to a new restaurant and get their acai bowl. Every day I sit at a table overlooking some stunning view, decorated in the most “in” style imaginable (I don’t know who does the interior decor for all the restaurants here in Bali but it looks like Instagram on steroids). Every day, the bowl I receive is breathtakingly beautiful in a new, different way.
{picture}
{picture}
And every day, the açaí isn’t açaí.
The next day I’m eating an “açaí” bowl (this one tastes exactly like the mixed berry blend from Costco) when a handsome silver-fox asks to borrow my charger.
I turn to gaze into a pair of ocean-blue eyes and a perfectly veneered, if slightly icy, smile.
Meet Asshole Steve.
Asshole Steve IS Kera in another life. He’s a hustler who 10 years ago decided that he wanted to move to Bali, so he started a villa-leasing company which now (according to him) makes 30k/month and competes with Booking.com. He has completely designed every aspect of his life according to his wishes, he a bangs a new exotic woman every week, and he spends his days in coffee shops and surfing in the ocean. No wife or family or home-culture to weigh him down.
Asshole Steve is living the dream.
“Are you sipping on that tea because you’re too cheap to buy another drink?” He asks. I laugh and admit that it’s true.
“Order anything you’d like. Waiter, can we get her another drink?” He orders for me.
He offers to give me business advice and so we start talking about marketing strategies when everything starts to unravel. He tells me, get this, that the room-sharing business I’m building is doomed to fail, that my relationship is doomed to fail simply because he’s Swedish, and that no matter what I build, it will end up trapping me in the end.
He goes on to tell me that now that he’s built a business here, he can’t escape. Tells me that his girlfriend of 15 years left him 8 months ago and he’s still picking up the pieces. Next thing I know he’s on Tinder swiping through all the 20 year olds he could go home with that night and as he looks me in the face I realize that a) he wishes I was one of those swipes and b) he’s just as lost and miserable as Kera is, even though he has the exact life she dreams of.
He gets up, offers me a copywriting job “for a real expert” but offering a total beginner’s rate, and leaves without buying the drink he ordered for me.

 I’m older, and all of my dreams have come true. I sit on some exotic beach sipping Piña Coladas, wearing designer clothes, dishing with my friends about my latest plastic surgery while wearing designer clothes from head to toe.
And then I take a closer look at my friends and jump back in horror. They are merely cardboard cut-outs with laugh tracks. The beach around me is deserted. I am completely alone in the world, childless and old, with no family, no husband, and no one real in my life.
I awake with a start, and go to a spot called Ruko Cafe. I order their açaí bowl. It comes to my table and I dig my spoon in and by God… is this really happening?
It’s the right color. I taste it. It’s the real thing. I, Madison Taskett, have found verdadeiro açaí outside of Brazil! I turn to tell someone, when I realize there is no one to tell.
{PICTURE}
I have no clue who anyone in this cafe is. Hell, I barely have any idea who anyone in this country is.
I go out to dinner. “Table… for one?” The waitress asks with pity. I nod and sit next to a table of utterly perfect looking white girls and listen as they casually dish about their nose jobs while the local Indonesians serve them more vegan food and cocktails.
Afterward I walk to the beach to get some fresh air.
I arrive to find the beach empty. There are only nightclubs, and I look in and see people sitting at tables with their friends and lovers, laughing and enjoying each other’s company. No place for a “table for one” like me.
I go home to my empty hotel room, defeated, and think back on the kind family that greeted me when I got home every day in Ubud. About the sweet house-husband who would cut my fruit into perfect stars and took care of the kids. About a tight knit community that is always there for each each other.
About the life I could have had, if only I was Kera.


Welcome to my blog
My name is Keith Brandtjen. I am a new developer, trying to build my skills and learn as much as I can. Check out my work, let me know what you think. If you want to collaborate, contact me.
Check Out My Projects on Github:
- Coding Projects Go Here


Voltage (in Volts)
Current (in Amperes)
Power factor (cos φ)
Apparent power = VA
Real power = Watts
Phase difference = °
Details Table
Explanation:
The last row in the above table was excluded from sum, cause it belongs to next wave cycle.


Your project is now on the web.
You can now reach over 2 billion people!
Click to edit any of this text.


KaarPux
KaarPux is a complete Linux Distribution, where everything is build from upstream source code.KaarPux feaures
KaarPux features a complete Linux system:- Linux 3 Kernel
- Build system with GCC and clang/LLVM
- Tools and libraries (including many from GNU)
- X.Org X11 server and GNOME 3 desktop environment
- Mozilla Firefox Web Browser and Thunderbird Mail
- IcedTea Java based on OpenJDK
- Libre Office personal productivity suite
Building KaarPux
With just a couple of commands, you can build the complete KaarPux Linux Distro directly from upstream source code.Instructions are included for building directly on your own hardware, as well as for building in Virtual Machines.
Get Started
KaarPux comes with full documentation, and you are welcome to ask questions.Jump directly to KaarPux building overview to get started!


Search
Preparing search index...
The search index is not available
Rocket.Chat Apps TypeScript Definition
Options
All
Public
Public/Protected
All
Inherited
Externals
Menu
Rocket.Chat Apps TypeScript Definition
accessors/IHttp
RequestMethod
Enumeration RequestMethod
Index
Enumeration members
DELETE
GET
HEAD
OPTIONS
PATCH
POST
PUT
Enumeration members
DELETE
DELETE
:
= "delete"
GET
GET
:
= "get"
HEAD
HEAD
:
= "head"
OPTIONS
OPTIONS
:
= "options"
PATCH
PATCH
:
= "patch"
POST
POST
:
= "post"
PUT
PUT
:
= "put"
Exports
accessors/IHttp
Http
Status
Code
Request
Method
DELETE
GET
HEAD
OPTIONS
PATCH
POST
PUT
IHttp
IHttp
Extend
IHttp
Pre
Request
Handler
IHttp
Pre
Response
Handler
IHttp
Request
IHttp
Response
Generated using
TypeDoc


Torso.validation Class
Validation object containing validation mixin.
Item Index
Methods
Methods
preValidate
(
-
attr
-
[value]
Check whether an attribute or a set of attributes are valid. It will default to use the model's current values but you can pass in different values to use in the validation process instead.
Parameters:
-
attr
String or Object or ArrayEither the name of the attribute, an array containing many attribute names, or on object with attribute name to values
-
[value]
Any optionala value to use for the attribute value instead of using the model's value.
Returns:
undefined if no errors, a validation exception if a single attribute, or an object with attribute name as key and the error as the value


If you ever feel less than perfect
Just call my name and I will save you from the dark.
Don't let anyone else speak the words on your lips.
You can be more like you and less like everyone else.
We are only human
When we fall we bleed but words won't bring us down.
Together we can make it through another day.
You are beautiful no matter what they say.
Words won't bring you down.
Our demons hide in our eyes.
When you look into them you can see our pain.

Together we will walk towards the light.


Theme › Components › About
Component Aliases
Note: This section requires a basic knowledge of Blade templating, specifically focusing on components and aliases.
Each component inside resources/views/components
will automatically have an include alias registered for it with an additional underscore (_
) before the name. This extra underscore helps add the distinction that this "directive" is an automatically-registered alias for a component.
For example: if there is a component inside this directory with the file name modal.blade.php
then you may automatically use the custom alias/directive @_modal
in Blade templates.
Please note that this does not create a component alias automatically, which is different than an include alias. A component alias would require the use of both @_modal
and @end_modal
since it is expecting a slot in between.
If you need to use a slot for whatever reason, use Laravel's built-in directive @component
.
References:
- Blade Templates - Laravel - The PHP Framework For Web Artisans
- How to Use Blade Component and Include Aliases
Component Structure
Every component will have a possible three top-tier options.
- 'options'
'show_comp'
will always be an option to dynamically hide or show component.
- 'data'
- 'data' options will depend on the component. Read the component's documentation to see what is needed.
- 'classes'
'comp'
will always be an option to style the most external element in component.- Might be required depending on component.
Below is an example of what calling a component might look like.
@_example_component([
'options' => [
'show_comp' => true // Always available
],
'data' => [
'title' => 'I am a component',
'sub-title' => 'This is a sub-title'
]
'classes' => [
'comp' => 'pv-4 px-4' // Always available
'background' => 'bg-primary',
'title' => 'text-white'
]
])


Recipe 1.4. Aligning Strings
Credit: Luther Blissett
Problem
You want to align strings: left, right, or center.
Solution
That's
what the ljust, rjust, and
center methods of string objects are for. Each
takes a single argument, the width of the string you want as a
result, and returns a copy of the starting string with spaces added
on either or both sides:
>>> print '|', 'hej'.ljust(20), '|', 'hej'.rjust(20), '|', 'hej'.center(20), '|'
| hej | hej | hej |
Discussion
Centering, left-justifying, or right-justifying text comes up
surprisingly oftenfor example, when you want to print a simple
report with centered page numbers in a monospaced font. Because of
this, Python string objects supply this functionality through three
of their many methods. In Python 2.3, the padding character is always
a space. In Python 2.4, however, while space-padding is still the
default, you may optionally call any of these methods with a second
argument, a single character to be used for the
padding:
>>> print 'hej'.center(20, '+')
++++++++hej+++++++++
See Also
The Library Reference section on string
methods; Java Cookbook recipe 3.5.
|


E mig for ( a) V O and ( b) O i in the garnet-type Ca 3Fe 2Ge 3O 12. The oxygen defects are doubly charged. The closed circles denote the initial or final states, fixed in the CI-NEB method. Two migration paths for O i , namely, the 48 g–96 h′ direct migration and 96 h′–O–96 h′ with the kick-out mechanism, are shown in Fig. 2.


Loot: allows for distribution of coins across players Merchant: allows players to purchase items directly from the sheet.
Type of sheet:
{{#ifeq lootsheettype "Merchant"}}
Merchant Settings
Replace this merchant's inventory with a random number of items from a Rollable Table. Specify the Rollable Table's name, along with how a formula for how many different items to add (Shop Qty Formula), and a formula for determining how many of each item to add (Item Qty Formula).


unit production manager
nigel gostelow
first assisstant director
cliff lanning
key 2nd assistant director
matthew sharp
Christian Bale
Bruce Wayne / Batman
Michael Caine
Alfred
Liam Neeson
Ducard
Katie Holmes
Rachel Dawes
Gary Oldman
Jim Gordon
Cillian Murphy
Dr. Jonathan Crane
Tom Wilkinson
Carmine Falcone
Rutger Hauer
Earle
Ken Watanabe
Ra's Al Ghul
Mark Boone Junior
Flass
Linus Roache
Thomas Wayne
Morgan Freeman
Lucius Fox
Larry Holden
Finch
Gerard Murphy
Judge Faden
Colin McFarlane
Loeb
Sara Stewart
Martha Wayne
unit production manager
nigel gostelow
first assisstant director
cliff lanning
key 2nd assistant director
matthew sharp
Christian Bale
Bruce Wayne / Batman
Michael Caine
Alfred
Liam Neeson
Ducard
Katie Holmes
Rachel Dawes
Gary Oldman
Jim Gordon
Cillian Murphy
Dr. Jonathan Crane
Tom Wilkinson
Carmine Falcone
Rutger Hauer
Earle
Ken Watanabe
Ra's Al Ghul
Mark Boone Junior
Flass
Linus Roache
Thomas Wayne
Morgan Freeman
Lucius Fox
Larry Holden
Finch
Gerard Murphy
Judge Faden
Colin McFarlane
Loeb
Sara Stewart
Martha Wayne
unit production manager
nigel gostelow
first assisstant director
cliff lanning
key 2nd assistant director
matthew sharp
Christian Bale
Bruce Wayne / Batman
Michael Caine
Alfred
Liam Neeson
Ducard
Katie Holmes
Rachel Dawes
Gary Oldman
Jim Gordon
Cillian Murphy
Dr. Jonathan Crane
Tom Wilkinson
Carmine Falcone
Rutger Hauer
Earle
Ken Watanabe
Ra's Al Ghul
Mark Boone Junior
Flass
Linus Roache
Thomas Wayne
Morgan Freeman
Lucius Fox
Larry Holden
Finch
Gerard Murphy
Judge Faden
Colin McFarlane
Loeb
Sara Stewart
Martha Wayne


A Basic carousel, with looping
Each image has a different caption.
This caption is different.
The third image has its caption.
Prev
Next
Slide 2 (1 indexed)


Overview
This is the Payment Highway iOS SDK.
Requirements
- You have an existing iOS project supporting iOS 9 or later
- Carthage or CocoaPods
- Valid Payment Highway
account id
andmerchant id
- Custom-build Mobile Application Backend that returns session id and handles token with token id
Mobile Application Backend
You will need to have a custom mobile application backend that handles session id and token management.
See the demo project included for a BackendAdapter example.
License
MIT
Install
Currently installation via Carthage and CocoaPods is supported.
Carthage
Create a Cartfile
-file in the root of your project and add a line within:
github "paymenthighway/paymenthighway-ios-framework" "v-2.0.1"
Run the following command to integrate the required frameworks to your project.
carthage update --platform iOS
You can follow the Carthage’s instructions for ”Adding frameworks to an application” from step 3 on If you’re building for iOS
CocoaPods
You can install CocoaPods with the following commands.
$ gem install cocoapods
To integrate PaymentHighway framework to your project, specify it in your Podfile
.
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '9.0'
use_frameworks!
target '<Your Target Name>' do
pod 'PaymentHighway', '2.0.1'
end
Use
See the Demo Project included how to use the framework.


Class ConventionBuilderExtensions
Methods for adding commonly used conventions
Inheritance
Inherited Members
Namespace: McMaster.Extensions.CommandLineUtils
Assembly: McMaster.Extensions.CommandLineUtils.dll
Syntax
public static class ConventionBuilderExtensions
Methods
| Improve this Doc View SourceSetAppNameFromEntryAssembly(IConventionBuilder)
Sets Name to match the name of System.Reflection.Assembly.GetEntryAssembly
Declaration
public static IConventionBuilder SetAppNameFromEntryAssembly(this IConventionBuilder builder)
Parameters
| Type | Name | Description |
|---|---|---|
| IConventionBuilder | builder | The builder. |
Returns
| Type | Description |
|---|---|
| IConventionBuilder | The builder. |
SetParentPropertyOnModel(IConventionBuilder)
Sets a property named "Parent" on the model type to the value of the model of the parent command.
Declaration
public static IConventionBuilder SetParentPropertyOnModel(this IConventionBuilder builder)
Parameters
| Type | Name | Description |
|---|---|---|
| IConventionBuilder | builder | The builder. |
Returns
| Type | Description |
|---|---|
| IConventionBuilder | The builder. |
SetRemainingArgsPropertyOnModel(IConventionBuilder)
Sets a property named "RemainingArgs" or "RemainingArguments" on the model type to the value of RemainingArguments.
Declaration
public static IConventionBuilder SetRemainingArgsPropertyOnModel(this IConventionBuilder builder)
Parameters
| Type | Name | Description |
|---|---|---|
| IConventionBuilder | builder | The builder. |
Returns
| Type | Description |
|---|---|
| IConventionBuilder | The builder. |
SetSubcommandPropertyOnModel(IConventionBuilder)
Sets a property named "Subcommand" on the model type to the value of the model of the selected subcommand.
Declaration
public static IConventionBuilder SetSubcommandPropertyOnModel(this IConventionBuilder builder)
Parameters
| Type | Name | Description |
|---|---|---|
| IConventionBuilder | builder | The builder. |
Returns
| Type | Description |
|---|---|
| IConventionBuilder | The builder. |
UseArgumentAttributes(IConventionBuilder)
Applies settings from ArgumentAttribute on the model type.
Declaration
public static IConventionBuilder UseArgumentAttributes(this IConventionBuilder builder)
Parameters
| Type | Name | Description |
|---|---|---|
| IConventionBuilder | builder | The builder. |
Returns
| Type | Description |
|---|---|
| IConventionBuilder | The builder. |
UseAttributes(IConventionBuilder)
Applies a collection of default conventions, such as applying options in attributes on the model type,
Declaration
public static IConventionBuilder UseAttributes(this IConventionBuilder builder)
Parameters
| Type | Name | Description |
|---|---|---|
| IConventionBuilder | builder |
Returns
| Type | Description |
|---|---|
| IConventionBuilder | The builder. |
UseCommandAttribute(IConventionBuilder)
Applies settings from CommandAttribute on the model type.
Declaration
public static IConventionBuilder UseCommandAttribute(this IConventionBuilder builder)
Parameters
| Type | Name | Description |
|---|---|---|
| IConventionBuilder | builder | The builder. |
Returns
| Type | Description |
|---|---|
| IConventionBuilder | The builder. |
UseConstructorInjection(IConventionBuilder)
Enables using constructor injection to initialize the model type.
Declaration
public static IConventionBuilder UseConstructorInjection(this IConventionBuilder builder)
Parameters
| Type | Name | Description |
|---|---|---|
| IConventionBuilder | builder |
Returns
| Type | Description |
|---|---|
| IConventionBuilder |
UseConstructorInjection(IConventionBuilder, IServiceProvider)
Enables using constructor injection to initialize the model type.
Declaration
public static IConventionBuilder UseConstructorInjection(this IConventionBuilder builder, IServiceProvider additionalServices)
Parameters
| Type | Name | Description |
|---|---|---|
| IConventionBuilder | builder | |
| System.IServiceProvider | additionalServices | Additional services that should be passed to the service provider. |
Returns
| Type | Description |
|---|---|
| IConventionBuilder |
UseDefaultConventions(IConventionBuilder)
Applies a collection of default conventions, such as applying options in attributes on the model type,
Declaration
public static IConventionBuilder UseDefaultConventions(this IConventionBuilder builder)
Parameters
| Type | Name | Description |
|---|---|---|
| IConventionBuilder | builder |
Returns
| Type | Description |
|---|---|
| IConventionBuilder | The builder. |
UseHelpOptionAttribute(IConventionBuilder)
Applies settings from HelpOptionAttribute on the model type.
Declaration
public static IConventionBuilder UseHelpOptionAttribute(this IConventionBuilder builder)
Parameters
| Type | Name | Description |
|---|---|---|
| IConventionBuilder | builder | The builder. |
Returns
| Type | Description |
|---|---|
| IConventionBuilder | The builder. |
UseOnExecuteMethodFromModel(IConventionBuilder)
Sets a method named "OnExecute" or "OnExecuteAsync" on the model type to handle Invoke
Declaration
public static IConventionBuilder UseOnExecuteMethodFromModel(this IConventionBuilder builder)
Parameters
| Type | Name | Description |
|---|---|---|
| IConventionBuilder | builder | The builder. |
Returns
| Type | Description |
|---|---|
| IConventionBuilder | The builder. |
UseOnValidateMethodFromModel(IConventionBuilder)
Invokes a method named "OnValidate" on the model type after parsing.
Declaration
public static IConventionBuilder UseOnValidateMethodFromModel(this IConventionBuilder builder)
Parameters
| Type | Name | Description |
|---|---|---|
| IConventionBuilder | builder | The builder. |
Returns
| Type | Description |
|---|---|
| IConventionBuilder | The builder. |
UseOnValidationErrorMethodFromModel(IConventionBuilder)
Invokes a method named "OnValidationError" on the model type when validation fails.
Declaration
public static IConventionBuilder UseOnValidationErrorMethodFromModel(this IConventionBuilder builder)
Parameters
| Type | Name | Description |
|---|---|---|
| IConventionBuilder | builder | The builder. |
Returns
| Type | Description |
|---|---|
| IConventionBuilder | The builder. |
UseOptionAttributes(IConventionBuilder)
Applies settings from OptionAttribute on the model type.
Declaration
public static IConventionBuilder UseOptionAttributes(this IConventionBuilder builder)
Parameters
| Type | Name | Description |
|---|---|---|
| IConventionBuilder | builder | The builder. |
Returns
| Type | Description |
|---|---|
| IConventionBuilder | The builder. |
UseSubcommandAttributes(IConventionBuilder)
Adds subcommands for each SubcommandAttribute on the model type.
Declaration
public static IConventionBuilder UseSubcommandAttributes(this IConventionBuilder builder)
Parameters
| Type | Name | Description |
|---|---|---|
| IConventionBuilder | builder | The builder. |
Returns
| Type | Description |
|---|---|
| IConventionBuilder | The builder. |
UseVersionOptionAttribute(IConventionBuilder)
Applies settings from VersionOptionAttribute on the model type.
Declaration
public static IConventionBuilder UseVersionOptionAttribute(this IConventionBuilder builder)
Parameters
| Type | Name | Description |
|---|---|---|
| IConventionBuilder | builder | The builder. |
Returns
| Type | Description |
|---|---|
| IConventionBuilder | The builder. |
UseVersionOptionFromMemberAttribute(IConventionBuilder)
Applies settings from VersionOptionFromMemberAttribute on the model type.
Declaration
public static IConventionBuilder UseVersionOptionFromMemberAttribute(this IConventionBuilder builder)
Parameters
| Type | Name | Description |
|---|---|---|
| IConventionBuilder | builder | The builder. |
Returns
| Type | Description |
|---|---|
| IConventionBuilder | The builder. |


---
title: "HOLIDAY WREATH-MAKING WORKSHOPS"
date: "2000-01-01 17:12:02 -06:00"
categories:
- winter
- adult
subtitle: ""
layout: "events"
event-image: "holiday-wreath-workshop.jpg"
event-dates: "DECEMBER 3, 4, 5 @ VARIOUS TIMES"
event-location: "Red Butte Garden Classroom"
button-type: "register"
tickets-link: ""
registration-info: "Phone Registration Available:
801-581-8454"
instructor-info: "Red Butte Garden Staff"
member-cost: "
Single Workshop $54
Family Workshop: $58"
public-cost: "
Single Workshop $67
Family Workshop: $72
"
event-notes: ""
tickets-button: "hide"
published: false
---
REGISTRATION REQUIRED
Start the holiday season by creating a fresh wreath for your front door at our annual wreath-making workshop. Workshop materials include fresh greens, cones, fruits, assorted decorations, and ribbon that will be used to fill a 16” wreath frame. Attendees are encouraged to bring unusual greens or your favorite ornaments to include. Also bring gloves, scissors, hand pruners, and a basket.
To be put on a wait list for Sold Out sessions, contact Karen Migacz at<PHONE_NUMBER>
All sessions except Family Holiday Wreath-Making are limited to 25 participants. Family Holiday Wreath-Making is limited to 12 pairs (24 total,) ages 8 and up.


|
|
Sparkling Water (H2O) Machine Learning Overview The rsparkling extension package provides bindings to H2O’s distributed machine learning algorithms via sparklyr. In particular, rsparkling allows you to access the machine learning routines provided by the Sparkling Water Spark package.
Together with sparklyr’s dplyr interface, you can easily create and tune H2O machine learning workflows on Spark, orchestrated entirely within R.
rsparkling provides a few simple conversion functions that allow the user to transfer data between Spark DataFrames and H2O Frames. |
|
|
Text mining with Spark & sparklyr This article focuses on a set of functions that can be used for text mining with Spark and sparklyr. The main goal is to illustrate how to perform most of the data preparation and analysis with commands that will run inside the Spark cluster, as opposed to locally in R. Because of that, the amount of data used will be small.
Data source For this example, there are two files that will be analyzed. |
|
|
Customizing connections
A connection to Spark can be customized by setting the values of certain Spark properties. In sparklyr, Spark properties can be set by using the config argument in the spark_connect() function.
By default, spark_connect() uses spark_config() as the default configuration. But that can be customized as shown in the example code below. Because of the unending number of possible combinations, spark_config() contains only a basic configuration, so it will be very likely that additional settings will be needed to properly connect to the cluster. |
|
|
Audience
This article aims explain how to take advantage of Apache Spark inside organizations that have already implemented, or are in the process of implementing, a Hadoop based Big Data Lake.
Introduction
We have noticed that the types of questions we field after a demo of sparklyr to our customers were more about high-level architecture than how the package works. To answer those questions, we put together a set of slides that illustrate and discuss important concepts, to help customers see where Spark, R, and sparklyr fit in a Big Data Platform implementation. |
|
|
Overview
sparklyr provides support to run arbitrary R code at scale within your Spark Cluster through spark_apply(). This is especially useful where there is a need to use functionality available only in R or R packages that is not available in Apache Spark nor Spark Packages.
spark_apply() applies an R function to a Spark object (typically, a Spark DataFrame). Spark objects are partitioned so they can be distributed across a cluster. |
|
|
Introduction
Spark also supports pulling data sets into a cluster-wide in-memory cache. This is very useful when data is accessed repeatedly, such as when querying a small dataset or when running an iterative algorithm like random forests. Since operations in Spark are lazy, caching can help force computation. Sparklyr tools can be used to cache and uncache DataFrames. The Spark UI will tell you which DataFrames and what percentages are in memory. |


Welcome
Insert Your Card In The Slot Below.
Check Balance
Withdrawl
Deposit
End Transaction
Lorem ipsum dolor sit amet.
$20
$40
$60
$80
$100
Complete Withdrawl
1
2
3
4
5
6
7
8
9
0
Enter
Start Over
INSERT CARD ABOVE
RETRIEVE MONEY
Name
2424 4242 3432 1243
08/22


Troy Parrott Named On Tottenham Bench Ahead Of Everton Clash
by Oisin McQueirnsIrish U21 international Troy Parrott has been named on the Tottenham bench for the first time in the Premier League ahead of Spurs’ clash with Everton this afternoon.
The 17-year-old has never made a squad in the top flight for Spurs but is included among the substitutes for the game at Goodison Park.
Tottenham captain Harry Kane did not travel with the squad for the game against Everton, who have also struggled at the start of the season, meaning Parrott makes the bench while Lucas Moura comes into the side.
Parrott’s involvement in the squad is also a big boost for his chances of winning his first senior Irish cap having been included in Mick McCarthy’s 39-man provisional squad named last week.
The 17-year-old is very highly rated at the North London club and according to a report from David Ornstein in The Athletic, Mauricio Pochettino is prepared to put his faith in youth, Parrott included, instead of adding to his squad in January.


The PASSWORD record contains the encrypted password for a protected sheet or workbook. Note : this record specifies a sheet-level or workbook-level protection password, as opposed to the FILEPASS record, which specifies a file password.
Record Data
|
Offset |
Name |
Size |
Contents |
|
4 |
wPassword |
2 |
Encrypted password |


| Concept Framework 2.2 documentation | Contents | Index |
| Name | Version | Deprecated |
| RTextTag | version 1.0 | no |
|
Text in a RTextView can be marked with tags. A tag is an attribute that can be applied to some range of text. For example, a tag might be called "bold" and might make the text inside the tag bold. However, the tag concept is more general than that; tags don't have to affect appearance. They can instead affect the behavior of mouse and key presses, "lock" a range of text so the user can't edit it, or countless other things. One tag can be applied to any number of text ranges.
Tags can have names, which is convenient sometimes (for example, you can name your tag that makes things bold "bold"), but they can also be anonymous (which is convenient if you're creating tags on-the-fly). This objects should never be directly instantiated; it should be used through the RTextView control by calling the CreateStyle function. |
| BackColor | This property sets or gets the background color of the tag |
| BackgroundFull | Sets or checks whether the background color fills the entire line height or only the height of the tagged characters |
| Direction | Controls the direction of the text in the current tag |
| FontFamily | Sets or gets the font family of the font used by the tag |
| FontName | Sets or gets the name of the tag font |
| FontScale | Font size as a scale factor relative to the default font size |
| FontSize | Sets or gets the size of the font used by the tag |
| FontStyle | Sets or gets the font style of the tag |
| FontWeight | Sets the font weight the text tag |
| ForeColor | This property sets or gets the color of the text in the tag |
| Indent | Sets or gets the amount to indent the paragraph |
| IsReadOnly | If set to true, the text inside the tag cannot be edited |
| IsVisible | Controls whether this text is hidden |
| Justification | Sets or gets the justification used by the text in the tag |
| Language | Sets or gets the language of the text in the tag |
| LeftMargin | Sets or gets the width of the left margin, in pixels |
| PixelsAbove | Sets or gets the number of pixels of blank space above paragraphs |
| PixelsBelow | Sets or gets the number of pixels of blank space below paragraphs |
| PixelsInside | Sets or gets the number of pixels of blank space between wrapped lines in a paragraph |
| Priority | Sets or gets the priority of a text tag |
| RightMargin | Sets or gets the width of the right margin, in pixels |
| Rise | Offset of text above the baseline (below the baseline if rise is negative) |
| Stretch | Sets the stretch type for tag |
| Strikethrough | Set or gets whether to strike through the text |
| Underline | Sets or gets the underline type for this tag |
| WrapMode | Sets the line wrap mode for the tag |
| RTextTag | This is the standard contructor for this class and should not be used directly |
| SetBackColor | TODO: Document this |
| SetBackgroundFull | TODO: Document this |
| SetDirection | TODO: Document this |
| SetFontFamily | TODO: Document this |
| SetFontName | TODO: Document this |
| SetFontScale | TODO: Document this |
| SetFontSize | TODO: Document this |
| SetFontStyle | TODO: Document this |
| SetFontWeight | TODO: Document this |
| SetForeColor | TODO: Document this |
| SetIndent | TODO: Document this |
| SetIsReadOnly | TODO: Document this |
| SetIsVisible | TODO: Document this |
| SetJustification | TODO: Document this |
| SetLanguage | TODO: Document this |
| SetLeftMargin | TODO: Document this |
| SetPixelsAbove | TODO: Document this |
| SetPixelsBelow | TODO: Document this |
| SetPixelsInside | TODO: Document this |
| SetPriority | TODO: Document this |
| SetRightMargin | TODO: Document this |
| SetRise | TODO: Document this |
| SetStretch | TODO: Document this |
| SetStrikeout | TODO: Document this |
| SetUnderline | TODO: Document this |
| SetWrapMode | TODO: Document this |
| Parent | This function returns the Parent for a specific Concept GUI Object |
| RID | The RID (Remote ID) for an object |
| Add | TODO: Document this |
| AddTimer | This function sets up a timer |
| DisposeObject | TODO: Document this |
| GetObjectByID | This function finds the object corresponding to the ID parameter |
| GetProperty | TODO: Document this |
| LinkIfNotLinked | This is a special function, wich should be used after a GUI object was created that has no parent |
| Post | TODO: Document this |
| PostString | TODO: Document this |
| RemoteObject | TODO: Document this |
| Repaint | This member tells to the remote control to repaint itself(Queue for redraw) |
| SetParent | TODO: Document this |
| SetProperty | TODO: Document this |
| _GET_REMOTE_EVENT | TODO: Document this |
| _MAP_REMOTE_EVENT | TODO: Document this |
| __QueryDispose | TODO: Document this |
| __Recreate | TODO: Document this |
| Documented by Eduard Suica, generation time: Sun Jan 27 18:15:11 2013 GMT | (c)2013 Devronium Applications |


The To Do projects will allow someone to create a simple persistent "To Do" list. More importantly for me, this provides a basic CRUD platform for me to expand upon as I continue to work on the project.
I originally created this project to keep all of my other projects on track. I hope to use this web app in future projected to mitigate problems with work flow and deadlines.


{% extends "students/course/detail.html" %} {% block extrabreadcrumbs %} Assignments/ Assignment:{{ assignment.id }}/ Submission/ {% endblock %} {% block subcontent %}
Date submitted: {{ submission.date_submitted }}
Score: {{ grade.grade }}/100
Score: [Not Marked]


SNOBOL4NDBM(3) | CSNOBOL4B 2.2 | December 5, 2020
NAME
snobol4ndbm – SNOBOL4 NDBM interface
SYNOPSIS
-INCLUDE 'ndbm.sno'
dbhandle = DBM_OPEN(file,flags,mode)
DBM_CLOSE(dbhandle)
DBM_STORE(dbhandle,key,datum,flags)
datum = DBM_FETCH(dbhandle,key)
DBM_DELETE(dbhandle,key)
key = DBM_FIRSTKEY(dbhandle)
key = DBM_NEXTKEY(dbhandle)
DBM_ERROR(dbhandle)
DBM_CLEARERR(dbhandle)
DESCRIPTION
"NDBM" (for New Data Base Management) is an industry standard fast
hashed storage API first created in 4.3BSD, and included in the Unix
98 (SUSv2) standard. The original DBM API appeared in AT&T Research
Unix Version 7, and only allowed access to a single file at a time.
There are many different implementations of this API, including:
-
The original BSD 4.3 ndbm
Based on AT&T dbm.
Found in commercial Un*x offerings.
-
Berkeley DB v1 compatibility interface.
Supplied with 4.4BSD based systems: (Free|Open|Net)BSD, MacOS X.
-
GNU DBM (GDBM)
Found in Linux distributions
(may require a DBM compatibility package to be installed).
-
SDBM, Ozan Yigit's Public Domain implementation of NDBM.
Supplied with this distribution, and used as a last resort
on Un*x systems (and by default on non Un*x systems).
-
DBM_OPEN(filename,flags,mode)
-
takes a filename (STRING), flags (either "R" for read-only, "W" for
write access, or "CW" to create and write a new file), and a "mode"
string, which defaults to "0666" (octal) and returns a database
handle which can be passed to the remaining functions.
-
DBM_CLOSE
-
closes the database file. DBM_CLOSE MUST
be called to ensure that all your data is written.
-
DBM_STORE
-
takes a database handle, key and datum strings, and a flag (either
DBM_INSERT to insert a new pair, or fail if the key already exists,
or DBM_REPLACE to insert or replace existing data). The key and
datum strings may contain an arbitrary series of characters.
-
DBM_FETCH
-
returns the stored datum (if any) for the supplied key, or fails.
-
DBM_DELETE
-
deletes the stored datum (if any) for the supplied key, or fails.
-
DBM_FIRSTKEY
-
and subsequent calls to DBM_NEXTKEY
allow you to traverse all stored keys. The keys will be returned in
arbitrary order, and the routines will fail at the end of the
traversal.
-
DBM_ERROR
-
is a predicate which succeeds if the database handle is valid
and an I/O error has occurred on the file.
-
DBM_CLEARERR
-
is a predicate which succeeds if if the database handle is valid, and has
the side effect of clearing the I/O error flag.
FILES
NDBM, GDBM, and SDBM create two files: filename.dir and filename.pag.
Berkeley DB creates a single filename.db file.
SEE ALSO
snobol4sqlite3dbm(3),
ndbm(3),
dbopen(3),
gdbm(3).
AUTHOR
Philip L. Budne
BUGS
Not safe for concurrent read and write. The snobol4sqlite3dbm(3)
interface achieves this portably using snobol4sqlite3(3).
Some implementations (classic NDBM and SDBM) place limits on the total
size of key plus datum (typically slightly less than 1KB).
NOTE: Some implementations (classic NDBM and SDBM) create sparse files
which appear (to "ls -l") to be larger than they are (see "ls -s").
Copying such files may cause the non-allocated blocks to be "filled"
with zeroed disk blocks, and then the files really will be large!
Only GDBM provides locking to eliminate the possibility of file corruption,
or reading of incomplete data.
GDBM locking sometimes fails on NFS mounted partitions
but does not provide a way to disable locking.
DBM databases accessed concurrently by multiple processes are
traditionally (re)created from text files and used for fast disk-based
read-only table lookups. Programs which need to update the file
generate a new temporary copy using a different name, and then rename
the new file(s), so that the next reader gets the new copies (existing
readers continue to see old data).


Home
HackerNews Search
Like the search?
Sign up today for a beta launch and get the same experience on your own website.
Name
Email


--- layout: data_model title: ICMPv4ErrorMessageType this_version: 1.2 ---
ICMP error messages include destination unreachable messages, source quench messages, redirect messages, and time exceeded messages.
| Field Name | Type | Description |
|---|---|---|
| Destination_Unreachable0..1 | ICMPv4DestinationUnreachableType |
A destination unreachable message is an ICMP message which is generated by the host or its inbound gateway to inform the client that the destination is unreachable for some reason (http://en.wikipedia.org/wiki/ICMP_Destination_Unreachable). |
| Source_Quench0..1 | ICMPv4SourceQuenchType |
A source quench message is an ICMP message that requests that the sender decrease the rate of messages sent to a router or host. This message may be generated if a router or host does not have sufficient buffer space to process the request or may occur if the router or host buffer is approaching its limit (http://en.wikipedia.org/wiki/ICMP_Source_Quench). |
| Redirect_Message0..1 | ICMPv4RedirectMessageType |
A redirect message is used to send data packets on an alternative route. This ICMP redirect message informs a host to update its routing information. |
| Time_Exceeded0..1 | ICMPv4TimeExceededType |
An ICMP time exceeded message is generated by a gateway to inform the source of a datagram that the datagram has been discarded due to the time to live field reaching zero. A time exceeded message may also be sent by a host if it fails to reassemble a fragmented datagram within its time limit (http://en.wikipedia.org/wiki/ICMP_Time_Exceeded). |
| Error_Msg_Content0..1 | ICMPv4ErrorMessageContentType |
Message content common to all ICMP error messages are defined here. Fields that are specific to individual messages are defined separately under each message type. |


The actions on this page will load an XML file, convert it to JSON and return the data to the browser client as content type = json.
The actions on this page will load an JSON file and return the data to the browser client as content type = json.


Estimation and testing methods for dependently truncated data. Semi-parametric methods are based on Emura et al. (2011)<Stat Sinica 21:349-67>, Emura & Wang (2012)<doi:10.1016/j.jmva.2012.03.012>, and Emura & Murotani (2015)<doi:10.1007/s11749-015-0432-8>. Parametric approaches are based on Emura & Konno (2012)<doi:10.1007/s00362-014-0626-2> and Emura & Pan (2017)<doi:10.1007/s00362-017-0947-z>. A regression approach is based on Emura & Wang (2016)<doi:10.1007/s10463-015-0526-9>. Quasi-independence tests are based on Emura & Wang (2010)<doi:10.1016/j.jmva.2009.07.006>. Right-truncated data for Japanese male centenarians are given by Emura & Murotani (2015)<doi:10.1007/s11749-015-0432-8>.
| Version: | 3.0 |
| Depends: | mvtnorm |
| Published: | 2018-02-27 |
| Author: | Takeshi Emura |
| Maintainer: | Takeshi Emura <takeshiemura at gmail.com> |
| License: | GPL-2 |
| NeedsCompilation: | no |
| CRAN checks: | depend.truncation results |
| Reference manual: | depend.truncation.pdf |
| Package source: | depend.truncation_3.0.tar.gz |
| Windows binaries: | r-devel: depend.truncation_3.0.zip, r-release: depend.truncation_3.0.zip, r-oldrel: depend.truncation_3.0.zip |
| OS X binaries: | r-release: depend.truncation_3.0.tgz, r-oldrel: depend.truncation_3.0.tgz |
| Old sources: | depend.truncation archive |
Please use the canonical form https://CRAN.R-project.org/package=depend.truncation to link to this page.


TOP
Ваш надежныйпартнер
Входим в ТОП 10 агентов банка Открытие по банковским гарантиям
Конкурентные преимущества
Электронный документооборот
Описание
Работа 24/7
Описание
Без залога и поручительства
Описание
Персональный менеджер
Projects for many large domestic and foreign corporations, enProjects for many large domestic and foreign corporations, enterprises in many elds such as nance, banking, F&B, education, communication.terprises in many elds such as nance, banking, F&B, education, communication.
Кредит на пополнение оборотных средств
Founded in 2007, Sparch is specializing in providing innovative services such as websitFounded in 2007, Sparch is specializing in providing innovative services such as website design, brand identity and marketinge design, brand identity and marketing
Предварительное одобрение по минимальному пакету документов
Projects for many large domestic and foreign corporations, enProjects for many large domestic and foreign corporations, enterprises in many elds such as nance, banking, F&B, education, communication.terprises in many elds such as nance, banking, F&B, education, communication.
Клиенты о нас
Посмотреть всеSpain
Working
Building
Projects for many large domestic and foreign corporations, enterprises in many elds such as nance, banking, F&B, education, communication.
See project
Spain
Working
Building
Projects for many large domestic and foreign corporations, enterprises in many elds such as nance, banking, F&B, education, communication.
See project
Spain
Working
Building
Projects for many large domestic and foreign corporations, enterprises in many elds such as nance, banking, F&B, education, communication.
See project
Spain
Working
Building
Projects for many large domestic and foreign corporations, enterprises in many elds such as nance, banking, F&B, education, communication.
See project
Конкурентные преимущества
Электронный документооборот
Описание
Работа 24/7
Описание
Без залога и поручительства
Описание
Персональный менеджер
Projects for many large domestic and foreign corporations, enProjects for many large domestic and foreign corporations, enterprises in many elds such as nance, banking, F&B, education, communication.terprises in many elds such as nance, banking, F&B, education, communication.
Кредит на пополнение оборотных средств
Founded in 2007, Sparch is specializing in providing innovative services such as websitFounded in 2007, Sparch is specializing in providing innovative services such as website design, brand identity and marketinge design, brand identity and marketing
Предварительное одобрение по минимальному пакету документов
Projects for many large domestic and foreign corporations, enProjects for many large domestic and foreign corporations, enterprises in many elds such as nance, banking, F&B, education, communication.terprises in many elds such as nance, banking, F&B, education, communication.
Ваша профессиональная команда
-
Сергей Золоторев
Генеральный директор -
Сергей Золоторев
Генеральный директор -
Павел Тур
Дизайн / Веб разработка
0
Лет
на рынке
на рынке
0
банк-партнер
0
Довольных
клиентов
клиентов
Актуальные новости
Открыть всеDiscover Architecture
Projects for many large domestic and foreign corporations, enterprises in many elds such
Learn more
Discover Architecture
Projects for many large domestic and foreign corporations, enterprises in many elds such
Learn more
Discover Architecture
Projects for many large domestic and foreign corporations, enterprises in many elds such
Learn more


Please note that this software requires OSXFUSE, available from osxfuse.github.io , so if you don't have it, please install it before continuing.


{% extends 'base.html' %} {% load static %} {% block heading %}Products and Services {% endblock heading %} {% block breadcrumbs %}
Also referred to as a congressman or congresswoman, each representative is elected to a two-year term serving.
The major trends are in the travel we offer and give with the best of interest attached.
Also referred to as a congressman or congresswoman, each representative is elected to a two-year.
Also referred to as a congressman or congresswoman, each representative is elected to a two-year.
Also referred to as a congressman or congresswoman, each representative is elected to a two-year.


pump
Path: CARNOT/Pumps
Purpose
Pump model which uses user defined pump characteristics.
Description
You may specify your own pump specifications by entering the three coefficients
a0, a1, a2 of a quadratic polynomial, that
approximates the characteristics of the pump.
With the coefficients the pump sets the massflow as a result of the pressures.
The pressure drop in the system is given by [con lin
qua] in the THV:
The two pressures must be the same. The resulting equation is solved
analytically in the pump. The direct feedthrough in the temperature is broken
by a transfer function with a time-constant of 100 s. To get the electrical
power consumption, you have to specify a pump efficiency characteristic in a
look-up table. The calculation is carried out in an S-function.
NOTE:If you use a control-signal less than 1, the pump is still
working. But the pump characteristic does not represent the real pump any more!
NOTE:If you use free components of the THV, you have to change the
Pumps. To avoid algebraic loops, unused components of the THV are not fed
through.
Parameters and Dialog Box
Characteristics
Direct Feedthrough No
Sample
time
Inherited
from driving block
Vectorized
No


Why work together?
It's a proven concept
We are the world's biggest crowdsourcing platform to cope with global challenges - there are more than 14,000 1%Club members who have helped realize over 450 projects in 68 countries, directly improving thousands of lives.
We match your purpose
As 1%Club is active worldwide and covers a huge range of themes from water projects in Uganda to solar power projects in Nepal, you can select projects that fit your organisation's purpose and support them exactly how you wish.
We have a strong network
We believe passionately in the power of collaboration as a force for change. And we're glad that some of the world's biggest and most progressive companies think so too. Meet some of our partners here.
We are innovative together
We believe in a new way of international cooperation. We like to think of it as a global lab where we test new ideas, experiment with new technologies like live streaming while working with people all over the world.
Business meets society
We see Corporate Responsibility as a means to transform into a fully conscious, sustainable business. We offer all kinds of tools to guide you in this process and enrich your relationship with society and engage your stakeholders.


H1N1 cases on a decline, says BBMP
by Staff ReporterThe number of H1N1 cases reported in the city has dropped this year when compared to the previous two years. According to the Public Health Information and Epidemiological Cell (PHIEC) of the BBMP, there have have been 1,144 cases of H1N1 reported so far in the city from January to November 16.
BBMP Commissioner B.H. Anil Kumar on Tuesday tweeted that 1,773 H1N1 cases were reported in 2018 and 1,356 in 2017.
B.K. Vijayendra, Chief Health Officer, Public Health, BBMP, said in October 2018, there were 814 cases of H1N1 reported and this year in October there were 19. In November last year, there were 585 cases and till November 16 this year, only 16 cases have been reported. “As per the current trend, the number of H1N1 cases this year has been low. We have taken various precautionary measures as well,” he said.
Mr. Viyayendra said people need to take precautions and maintain hand hygiene to keep the infection away. “H1N1 is contagious and hence people should follow basic hygiene measures, drink plenty of water and have nutritious food,” he said.


Course Name*
Course Type*
Add Types
Select a type
Age Group (Min)*
Age Group(Max)*
Level*
Price*
Mall Price*
Course Gallery*
Add Images
Default
{{image.name}}
Course Variation*
Add new variation course
Leave field blank if not applicable.
Course Code
Branch*
Teacher*
Start Date*
End Date
Less ions
Capa city*
Times*
Duration
Actions
{{variationCourse.selectedBranch.name}}
{{variationCourse.selectedTeacher.name}}
Monday
Tuesday
Wednesday
Thusday
Friday
Saturday
Sunday
Course Description
Submit


REQUEST: Indicate currently-selected playlist in Global Menu
REQUEST: Fade-in/fade-out on play/pause and playlist switch
REQUEST: Display (optionally save, print) license information when clicking "Unregister"
Dual Display Overlap
CRASH: Crash in initializedCachedState -> iconImageWithBadge:trackProgress:
Request option to not search for album art on Amazon
REQUEST: start/quit synergy when iTunes starts up/exits
REQUEST: Hot-key to show (re-post) last Growl notification (current track information)
REQUEST: Modify "Activate/Desactivate Floater" menu item so that it's purpose is clearer
REQUEST: Add "Rating" submenu


Fire breaks out in school toilet block after suspected arson
by Oliver SullivanTwo fire crews have been called to Bury St Edmunds County Upper School after a fire started in a boys' toilet block.
Crews from the town were called to the school shortly after 12.47pm today.
All children have been accounted for following the fire, which has now been extinguished.
Fire crews remain on the scene removing the building's ceiling.
Firefighters are treating it as suspected arson.
The school has been contacted for comment.


It is an Automated bot made precisely to give you all the relvant search requests and help you in the most difficult time.
“Hot peppers in your food, though very tasty, cannot prevent or cure COVID-19. The best way to protect yourself against the new coronavirus is to keep at least 1 metre away from others and to wash your hands frequently and thoroughly. It is also beneficial for your general health to maintain a balanced diet, stay well hydrated, exercise regularly and sleep well.
— WHO
“Do not under any circumstance spray or introduce bleach or any other disinfectant into your body. These substances can be poisonous if ingested and cause irritation and damage to your skin and eyes. Bleach and disinfectant should be used carefully to disinfect surfaces only. Remember to keep chlorine (bleach) and other disinfectants out of reach of children.
— WHO


Taiwanese supermodel Lin Chi-ling marries Akira
- Advertisement -
On Sunday, November 17, Taiwanese supermodel Lin Chi-ling got married to Japanese boy band member Akira in a ceremony held in the island nation’s southwestern city of Tainan.
It ends her single status which has been a subject of interest for fans and the media for years, according to reports.
Lin, who was born on 29 November 1974, is ‘Taiwan’s number one supermodel’ and is known for her tall, slim stature, charming looks and sweet voice.
The 44-year-old entered the movie industry in 2008 when she acted in the movie Red Cliff.
- Advertisement -
Following that, she has starred in numerous films such as Red Cliff part II, Say Yes and The Monkey King 3.
Lin also co-starred with Japanese actor Takuya Kimura on the Japanese TV drama Moon Lovers which was aired in 2010.
Besides that, she is also a philanthropist, doing charity work over the years.
In 2011, she started the Chiling Charity Foundation to aid children and young people realise their dreams.
The supermodel’s love life had been filled with rumours of puzzling relationships that didn’t go anywhere until she started dating Akira in 2018.
The singer who is seven years younger than his wife met Lin in 2011 when they worked together in a stage play.
On 6 June this year, the couple announced they will be married which was a surprise to her fans and the entertainment circle.
Lin wrote in her marriage announcement that some people said that love is a split-second gift and that she thinks it takes courage, tolerance, unselfishness, compromises and naivety to turn the split-second into a lifetime of company.
She also described Akira as enthusiastic, hard-working, pleasant and kind. Lin’s father, Lin Fan-nan complimented his son-in-law for his tall stature and having a modest manner and good personality.
To Akira, Lin Chi-ling is full of good things, saying during Sunday’s wedding that with the world’s population of several billion, being able to meet and marry her is due to fate.
His words caused Lin to shed tears.
- Advertisement -


You can reach this dialog via the menu entry Encrypt/Decrypt \ Symmetric (classic) \ Caesar/Rot-13.
Use this dialog to execute the Caesar encryption. As soon as you enter the desired key, both the original alphabet and the newly mapped one are shown.


"""
Similarity
----------
Collection of semantic + lexical similarity metrics between tokens, strings,
and sequences thereof, returning values between 0.0 (totally dissimilar)
and 1.0 (totally similar).
"""
import collections
import re
from typing import Dict, Sequence, Union
import numpy as np
import sklearn.feature_extraction
import spacy
from cytoolz import itertoolz
from jellyfish import levenshtein_distance as _levenshtein
from pyemd import emd
from sklearn.metrics import pairwise_distances
from spacy.tokens import Doc, Span, Token
from . import extract
RE_ALNUM = re.compile(r"[^\W_]+", flags=re.IGNORECASE | re.UNICODE)
[docs]def word_movers(doc1: Doc, doc2: Doc, metric: str = "cosine") -> float:
"""
Measure the semantic similarity between two documents using Word Movers Distance.
Args:
doc1
doc2
metric ({"cosine", "euclidean", "l1", "l2", "manhattan"})
Returns:
Similarity between ``doc1`` and ``doc2`` in the interval [0.0, 1.0],
where larger values correspond to more similar documents.
References:
- Ofir Pele and Michael Werman, "A linear time histogram metric for improved
SIFT matching," in Computer Vision - ECCV 2008, Marseille, France, 2008.
- Ofir Pele and Michael Werman, "Fast and robust earth mover's distances,"
in Proc. 2009 IEEE 12th Int. Conf. on Computer Vision, Kyoto, Japan, 2009.
- Kusner, Matt J., et al. "From word embeddings to document distances."
Proceedings of the 32nd International Conference on Machine Learning
(ICML 2015). 2015. http://jmlr.org/proceedings/papers/v37/kusnerb15.pdf
"""
word_idxs: Dict[str, int] = dict()
n = 0
word_vecs = []
for word in itertoolz.concatv(extract.words(doc1), extract.words(doc2)):
if word.has_vector and word_idxs.setdefault(word.orth, n) == n:
word_vecs.append(word.vector)
n += 1
distance_mat = pairwise_distances(np.array(word_vecs), metric=metric).astype(
np.double
)
distance_mat /= distance_mat.max()
vec1 = collections.Counter(
word_idxs[word.orth] for word in extract.words(doc1) if word.has_vector
)
vec1 = np.array(
[vec1[word_idx] for word_idx in range(len(word_idxs))]
).astype(np.double)
vec1 /= vec1.sum() # normalize word counts
vec2 = collections.Counter(
word_idxs[word.orth] for word in extract.words(doc2) if word.has_vector
)
vec2 = np.array(
[vec2[word_idx] for word_idx in range(len(word_idxs))]
).astype(np.double)
vec2 /= vec2.sum() # normalize word counts
return 1.0 - emd(vec1, vec2, distance_mat)
[docs]def word2vec(obj1: Union[Doc, Span, Token], obj2 : Union[Doc, Span, Token]) -> float:
"""
Measure the semantic similarity between one spacy Doc, Span, Token, or Lexeme
and another like object using the cosine distance between the objects' (average)
word2vec vectors.
Args:
obj1
obj2
Returns
Similarity between ``obj1`` and ``obj2`` in the interval [0.0, 1.0],
where larger values correspond to more similar objects
"""
return obj1.similarity(obj2)
[docs]def jaccard(
obj1: Union[str, Sequence[str]],
obj2: Union[str, Sequence[str]],
fuzzy_match: bool = False,
match_threshold: float = 0.8,
) -> float:
"""
Measure the similarity between two strings or sequences of strings using
Jaccard distance, with optional fuzzy matching of not-identical pairs
when ``obj1`` and ``obj2`` are sequences of strings.
Args:
obj1
obj2: If str, both inputs are treated as sequences of *characters*,
in which case fuzzy matching is not permitted
fuzzy_match: If True, allow for fuzzy matching in addition to the
usual identical matching of pairs between input vectors
match_threshold: Value in the interval [0.0, 1.0]; fuzzy comparisons
with a score >= this value will be considered matches
Returns:
Similarity between ``obj1`` and ``obj2`` in the interval [0.0, 1.0],
where larger values correspond to more similar strings or sequences of strings
Raises:
ValueError: if ``fuzzy_match`` is True but ``obj1`` and ``obj2`` are strings,
or if ``match_threshold`` is not a valid float
"""
if not 0.0 <= match_threshold <= 1.0:
raise ValueError(
"match_threshold={} is invalid; "
"it must be a float in the interval [0.0, 1.0]".format(match_threshold)
)
set1 = set(obj1)
set2 = set(obj2)
intersection = len(set1 & set2)
union = len(set1 | set2)
if (
fuzzy_match is True
and not isinstance(obj1, (str, bytes))
and not isinstance(obj2, (str, bytes))
):
for item1 in set1.difference(set2):
if max(token_sort_ratio(item1, item2) for item2 in set2) >= match_threshold:
intersection += 1
for item2 in set2.difference(set1):
if max(token_sort_ratio(item2, item1) for item1 in set1) >= match_threshold:
intersection += 1
elif fuzzy_match is True:
raise ValueError("fuzzy matching not possible with str inputs")
return intersection / union
[docs]def levenshtein(str1: str, str2: str) -> float:
"""
Measure the similarity between two strings using Levenshtein distance, which
gives the minimum number of character insertions, deletions, and substitutions
needed to change one string into the other.
Args:
str1
str2
Returns:
Similarity between ``str1`` and ``str2`` in the interval [0.0, 1.0],
where larger values correspond to more similar strings
"""
distance = _levenshtein(str1, str2)
max_len = max(len(str1), len(str2))
try:
return 1.0 - (distance / max_len)
except ZeroDivisionError:
return 0.0
[docs]def token_sort_ratio(str1: str, str2: str) -> float:
"""
Measure the similarity between two strings based on :func:`levenshtein()`,
only with non-alphanumeric characters removed and the ordering of words
in each string sorted before comparison.
Args:
str1
str2
Returns:
Similarity between ``str1`` and ``str2`` in the interval [0.0, 1.0],
where larger values correspond to more similar strings.
"""
if not str1 or not str2:
return 0.0
str1_proc = _process_and_sort(str1)
str2_proc = _process_and_sort(str2)
return levenshtein(str1_proc, str2_proc)
def _process_and_sort(s: str) -> str:
"""
Remove all characters from ``s`` except letters and numbers, strip whitespace,
and force everything to lower-case; then sort tokens before re-joining into
a single string.
"""
if not s:
return ""
return " ".join(sorted(RE_ALNUM.findall(s.lower())))
[docs]def character_ngrams(str1: str, str2: str) -> float:
"""
Measure the similarity between two strings using a character ngrams similarity
metric, in which strings are transformed into trigrams of alnum-only characters,
vectorized and weighted by tf-idf, then compared by cosine similarity.
Args:
str1
str2
Returns:
Similarity between ``str1`` and ``str2`` in the interval [0.0, 1.0],
where larger values correspond to more similar strings
Note:
This method has been used in cross-lingual plagiarism detection and
authorship attribution, and seems to work better on longer texts.
At the very least, it is *slow* on shorter texts relative to the other
similarity measures.
"""
vectorizer = sklearn.feature_extraction.text.TfidfVectorizer(
preprocessor=lambda s: " ".join(RE_ALNUM.findall(s.lower())),
analyzer="char",
token_pattern="(?u)\\b\\w+\\b",
ngram_range=(3, 3),
)
mat = vectorizer.fit_transform([str1, str2])
return 1.0 - pairwise_distances(mat[0, :], mat[1, :], metric="cosine").item()


Recipe 7.9. Accesssing a MySQL DatabaseCredit: Mark Nenadov ProblemYou need to access a MySQL database. SolutionThe MySQLdb module makes this task extremely easy: import MySQLdb # Create a connection object, then use it to create a cursor con = MySQLdb.connect(host="<IP_ADDRESS>", port=3306, user="joe", passwd="egf42", db="tst") cursor = con.cursor( ) # Execute an SQL string sql = "SELECT * FROM Users" cursor.execute(sql) # Fetch all results from the cursor into a sequence and close the connection results = cursor.fetchall( ) con.close( ) DiscussionMySQLdb is at http://sourceforge.net/projects/mysql-python. It is a plain and simple implementation of the Python DB API 2.0 that is suitable for Python 2.3 (and some older versions, too) and MySQL versions 3.22 to 4.0. MySQLdb, at the time of this writing, did not yet officially support Python 2.4. However, if you have the right C compiler installation to build Python extensions (as should be the case for all Linux, Mac OS X, and other Unix users, and many Windows developers), the current version of MySQLdb does in fact build from sources, install, and work just fine, with Python 2.4. A newer version of MySQLdb is in the works, with official support for Python 2.3 or later and MySQL 4.0 or later. As with all other Python DB API implementations (once you have downloaded and installed the needed Python extension and have the database engine it needs up and running), you start by importing the module and calling the connect function with suitable parameters. The keyword parameters you can pass when calling connect depend on the database involved: host (defaulting to the local host), user, passwd (password), and db (name of the database) are typical. In the recipe, I explicitly pass the default local host's IP address and the default MySQL port (3306), just to show that you can specify parameters explicitly even when you're passing their default values (e.g., to make your source code clearer and more readable and maintainable). The connect function returns a connection object, and you can proceed to call methods on this object; when you are done, call the close method. The method you most often call on a connection object is cursor, which returns a cursor object, which is what you use to send SQL commands to the database and fetch the commands' results. The underlying MySQL database engine does not in fact support SQL cursors, but that's no problemthe MySQLdb module emulates them on your behalf, quite transparently, for the limited cursor needs of the Python DB API 2.0. Of course, this doesn't mean that you can use SQL phrases like WHERE CURRENT OF CURSOR with a database that does not offer cursors! Once you have a cursor object in hand, you can call methods on it. The recipe uses the execute method to execute an SQL statement, and then the fetchall method to obtain all results as a sequence of tuplesone tuple per row in the result. You can use many refinements, but these basic elements of the Python DB API's functionality already suffice for many tasks. See AlsoThe Python-MySQL interface module (http://sourceforge.net/projects/mysql-python); the Python DB API (http://www.python.org/topics/database/DatabaseAPI-2.0.html); DB API documentation in Python in a Nutshell. |


Process over product helped me focus on the most important aspect of what we are trying to achieve - not a pretty blog - but a new skillset that Website will open doors to a new career and future. With that in mind, wasting unnecessary time trying to perfect every aspect of the layout isn't a valuable use of time, as we are right at the beginning of our journey here. It's better to use the time wisely and learn as much as possible, which may involve leaving something not quite perfect, rather than getting bogged down and spending too much time on one aspect.
I have some experience with meditation and mindfulness prior to reading Chapter 2, though had previously found it difficult to constantly pull my mind back from wandering. I was interested to read more about the tangible benefits it can have, as previously thought it was mostly for people who led stressful lives who needed some time to clear their mind.
I'm more inclined to give it a try moving forward, as taking 10 minutes to train my brain, especially if it will help take control of my attention wandering, is a worthwhile effort.
Home


So you want to dazzle your friends at a dinner party? Or treat yourself to some delicious grub? Don’t worry, we’ve got it covered. Lola’s is a cookery school in New York City, offering students the chance to learn to cook healthy, restaurant-quality food.
Whether you’re vegan, vegetarian, pescetarian, flexitarian, gluten-free, lactose intolerant, sugar-free or you eat just about anything, we have culinary classes for you! Specialist diet or not.
“My friends couldn’t believe I’d cooked such amazing food. I’ve just joined a supper club too!”
We’re located in the heart of Brooklyn. Come and say hi if you’re passing by!
Tuesday – Thursday
11:00 – 20:00
Saturday – Sunday
10:00 – 18:00
As loved by