Class DataResilienceConfiguration
This class contains the definition for a data resiliance strategy. Specifically: when to retry and when to circuit break.
This class is created as a configuration entry in an array in the DataResilienceStrategies property of the DataConfigurationOptions class.
Inheritance
System.Object
DataResilienceConfiguration
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Assembly: ArgentSea.dll
Syntax
public class DataResilienceConfiguration
Properties
|
Improve this Doc
View Source
CircuitBreakerFailureCount
If a connection or command consistantly fails, the circuit breaker will reject all further connections until one suceeds.
This setting determines how many failures (after retries, if retry-able) before blocking all connections apart from a few periodic test attempts.
Declaration
public int CircuitBreakerFailureCount { get; set; }
Property Value
| Type |
Description |
| System.Int32 |
|
|
Improve this Doc
View Source
CircuitBreakerTestInterval
If a connection or command fails, the circuit breaker will reject all further connections until one suceeds.
This setting determines how long (in milliseonds) the system should wait before allowing a test connection.
Declaration
public int CircuitBreakerTestInterval { get; set; }
Property Value
| Type |
Description |
| System.Int32 |
|
|
Improve this Doc
View Source
ResilienceKey
Declaration
public string ResilienceKey { get; set; }
Property Value
| Type |
Description |
| System.String |
|
|
Improve this Doc
View Source
RetryCount
Declaration
public int RetryCount { get; set; }
Property Value
| Type |
Description |
| System.Int32 |
|
|
Improve this Doc
View Source
RetryInterval
This is the number of milliseconds to wait before retrying a “retry-able” connection or command error. Default is 500 ms.
This interval may be extended with each retry, depending upon the RetryLengthening setting, up to RetryCount.
Declaration
public int RetryInterval { get; set; }
Property Value
| Type |
Description |
| System.Int32 |
|
|
Improve this Doc
View Source
RetryLengthening
If a connection or command fails, this setting determines how much each subsequent retry should be further delayed.
Declaration
public DataResilienceConfiguration.SequenceLengthening RetryLengthening { get; set; }
Property Value
Methods
|
Improve this Doc
View Source
HandleRetryTimespan(Int32)
Declaration
public TimeSpan HandleRetryTimespan(int attempt)
Parameters
| Type |
Name |
Description |
| System.Int32 |
attempt |
|
Returns
| Type |
Description |
| System.TimeSpan |
|


When it comes to your family’s health, you need the best. We pride ourselves on offering the best possible physical therapy available and going above and beyond for our patients.
At Pace Physical Therapy, our goal is to guard your smile by providing preventive services. Maintaining a clean mouth benefits overall health. We help you achieve your oral health goals by mutual efforts to preserve the natural dentition and supporting structures by preventing the onset, progress, and recurrence of dental diseases and conditions.
A beautiful smile not only adds to your look but also adds to how you feel. At Pace Physical Therapy, we provide multiple treatments to help you gain your Perfect Smile!
Pace Physical Therapy offers variety of treatment to help you preserve a damaged tooth (or teeth). Experience improved functioning of your teeth with our restorative dentistry treatments intended to repair your smile.
At Pace Physical Therapy, we understand how painful oral injuries can get. An emergency dental appointment can differ the situation, they can be either to save or to lose your tooth.
The comfort of my patients is my job and my reward. -Dr. Manisha.
Graduated from the prestigious Boston University Goldman School of Dentistry with a Doctor of Dental Medicine Degree. She also completed a Bachelor of Dental Surgery Degree at the Nair Hospital Dental College overseas. Dr Desai has been practicing dentistry since 2002 and opened this practice, Aurora Sonrisa Dental in 2012.


It looks like you don't have javascript enabled. If it helps to convince you to enable it there is no third-party js on this site and no trackers except for google analytics that can be blocked with a browser addon. Thanks!
about
github
report an issue
reset
twitter
contact
_____ _____ ____ _____ _____ _____ __ __ _____ _____ _____ _____ | | | \ | | | | _ | | | | | __| | | __| __| | --| | | | | | | --| | | |__| |__| __| | | | | | __| |_____|_|_|_|____/ |_____|__|__|__|__|_____|_____|_____|_|___|_____|_____| User Submitted Solutions
Challenges
User Contributed Challenges


Caleb Hsu, Parker Illig, Satchel Spencer, Kevin Gifford
Q1a: Of the Tranzact accounts without services, which accounts should Zayo prioritize and why?
Q1b: Of the Tranzact accounts without services, which accounts should Zayo prioritize and why?
Q2a: If Zayo sent quotes to all Tranzact accounts, how would you prioritize the customer account list? (And list the prioritized accounts from 1 to ####)
Q2b: If Zayo sent quotes to all Tranzact accounts, how would you prioritize the customer account list? (And list the prioritized accounts from 1 to ####)
Q3: If Zayo only had 5 representatives, which states would you prioritize for in-person meetings?
Q4a: If Zayo only had enough team members to focus on two products, which products would you prioritize?
Q4b: If Zayo only had enough team members to focus on two products, which products would you prioritize?
Q5: Of the Tranzact accounts that have services: What industries/verticals spend the most money and on what products/services?
# Discussion:
Having **no cost data** makes all of these analyses suspect as maximizing MRR or BRR is simply a revenue maximization and not a profit optimization which must include costs of providing the services.


Housing Information
There are two types of housing option availablle to students:
1. On-Campus
2. Off-Campus
A. On-Campus
There are two types of On Campus housing option available:
1. Apartment Communities
UTA has 10 vibrant apartment communities to choose from. To get more information about it click on this
link
2. Residence Hall Communities
UTA has 7 different residence hall to choose from. To get more information about it click on this
link
Contact Information
University Housing
Housing Operations:<PHONE_NUMBER><EMAIL_ADDRESS>Apartment and Residence Life:<PHONE_NUMBER><EMAIL_ADDRESS>B. Off-Campus
There are a few apartments located within walking disstance of university.You can check websites like
www.apartments.com
for more information.


| DOSE: T+ 0:00 |
16 mg |
oral |
2C-E |
(capsule) |
| T+ 1:00 |
16 mg |
oral |
2C-E |
(capsule) |
It was the end of summer 07 and little did i know my life was about to be changed forever. My story begins with me hanging out with my friend ill call chuck, which lived a far distance away whom i had met under very strange circumstances. He had mentioned to me he could get this drug 2c-e, which i had strangely heard of from another friend of mine ill call austin who lived locally. Austin had told me of his experiences with a similiar drug called 2c-i which he had once sold me but had little effect, so i decided to give it another try and i purchased 6 capsules of white powder presumed to be 2c-e.
Now i had tripped before on a few different substances like mushrooms, salvia, extasy, amanitas, and DXM, and i had done almost every other drug in the sense of narcotics from marijuana, to heroin, to pcp, cocaine and the likes, so i thought i was experienced. Boy was i wrong, nothing i had ever done even came close to comparing to the intensity of 2c-e.
The next day after purchasing the 2c-e, i decided it was time to experiment with it. I was in a good mood, just a little anxious and courious about what the 2c-e would do. I had chosen to trip in my friend austins house since he owned his own trailer and was fimilar with the effects of 2c-i, which i suspected was similar to the 2c-e. We had planned to trip together, however on my arrival i learned he had already been doing heroin that night so we both decided to wait until the next day to trip to avoid any bad reactions between the two drugs..... but i could not wait.
At about 11:00 pm i took one of the capsules i was told to contain 16mg of 2c-e, popped in a movie, and waited for the effects to begin. About an hour into the movie i decided i still didnt feel anything, nothing at all, not even slightly high or anything, so i made the mistake of taking another capsule. About 5 minutes after taking the second capsule i felt something in my stomach, it was like a feeling of eating too much without the food actually being there, and at the same time the first effects began.
It started with the normal effects of tripping, the weird thoughts tripping gave me, a body buzz, and my vision was crowded with black sgwiggly lines. It was nothing special, nothing like i hadnt already experienced with previous hallucinogens, but the drug had not fully kicked in yet. I looked in the mirror and my pupils were HUGE! way bigger than they had ever been from anything else i had ever taken. Also, i looked more dead than i had ever looked when looking in the mirror while tripping, this kind of scared me and i fled to the couch.
It was about an hour and a half from when i had taken the first capsule and i thought the effects were fully developed, i didnt think the second capsule was going to make the experience any stronger than it already was. I walked around the house trying to enjoy my trip making fun of my friend who was nodding out on the seat in the living room and making funny comments about the meaning of life and what was going on with my vision and such. A little after that my friend went to sleep and i was left alone lying on the ground in the other room.
I dont know what happened next but i must have blacked out, the last thing i remember was my friend going to sleep about two hours after i had taken the first capsule. I woke up and it was very early in the morning, must have been about 6 hours after the first dose, and JESUS CHRIST! i was tripping HARDDDD!!! Harder than i had ever tripped in my entire life and i was not ready for it. I remember awakening on the floor and i rolled over, the first thing from my mouth was, oh my god, all these thoughts and feelings. The thoughts were fimilar, it was the same thoughts mushrooms and dxm gave me, but they were coming and going FAST. I could literally SEE my thoughts splitting apart inside my head at a rate so fast it was hard to take it all in, but i had no choice, this freaked me out.
I felt like i was learning so much, i knew everything and everything made sense to me... the fact that this was a chemical MADE to make me trip and not just something from the ground or anything. I looked in the mirror and i looked even more dead than previously. Suddenly i realized i had been wasting my life doing nothing, roaming the streets doing drugs and making nothing of myself and this is not what my parents had given me life for... i was meant to make something of my life. And this feeling has stayed with me ever since. I stopped doing drugs all together and started going to college and reading books, trying to better myself. Ever since, it feels like a little of the 2c-e is still with me... or maybe it just made me see the light, I dont know. Whatever it is i feel like i was meant to have that trip that one night.
To anyone looking to experiment with a psychedelic chemical, I urge you to take caution. I can easily see how dangerous it is ingesting these chemicals and they deserve the upmost respect. My trip was good and what stayed with me has changed me for the better, but it could have easily been the other way around.
Experience Reports are the writings and opinions of the individual authors who submit them.
Some of the activities described are dangerous and/or illegal and none are recommended by Erowid.


A community, we are about inclusivity and bringing diverse elements together. We've expressed that through intersecting creative disciplines and continuously working with marginalized groups in our staff and events, making shared learning accessible and giving back to the community.
We bring diverse elements together by working with various creative crafts and this has trained us to bring together diverse expertise for one goal.
Our service includes a comprehensive consult to help identify gaps and opportunities, and results in a comprehensive report that includes a project plan with timelines a cost analysis. Our individualized plans are made up of quality services that will help you get there quickly and smoothly.
OUR RANGEWe work with a large number of clients from various industries, including:
- Governmental
- Festivals and Events Technology
- Retail and Malls
- Finance/Banking
- Restaurant
Our creatives and marketing experts are ready assist you in developing campaigns that drive your business.


Grid lists are an alternative to standard list views.
A grid list consists of a repeated pattern of cells arrayed in a vertical and horizontal layout.
Grid lists are best used on similar data types. They help improve the visual comprehension of the content they contain.
In this example we will show you how to set up a grid list.
It is possible to set the rowspan and colspan of each tile individually, using the rowspan and colspan properties.You can also set the gutter size, as well as other properties of each tile such as the background image and colour. In this example, we show you how to do that:


(s,S) Inventory System¶
This example is adapted (almost verbatim) from the article Kleijnen, J.P.C. et al. Constrained Optimization in Simulation: A Novel Approach, Discussion Paper 2008-95, Tilburg University, Center for Economic Research.
Consider a (s,S) inventory model with full backlogging. Demand during each period, \(D_t\) is distributed exponential with mean \(\mu\). At the end of each period, the inventory position \((IP_t = \text{Stock on hand} - \text{Backorders + Outstanding Orders})\) is calculated and, if it is below \(s\), an order to get back up to \(S\) is placed \((O_t = \max(\mathbb{I}(IP_t < s)(S − IP_t), 0)\). Lead times have a Poisson distribution with mean \(\theta\) days and all replenishment orders are received at the beginning of the period. Note that, since orders are placed at the end of the day, an order with lead time \(l\) placed in period \(n\) will arrive at the beginning of period \(n + l + 1\).
A per unit holding cost \(h\) is charged for inventory on-hand; furthermore, there is a fixed order cost \(f\) and a variable, per unit, cost \(c\). Our goal is to find \(s\) and \(S\) in order to minimize the \(\mathbb{E}[\text{Total cost per period}]\) such that the stockout rate \(\delta\), the fraction of demand not supplied from stock on-hand, is at most \(10\%\). To further clarify the order of events and the calculation of costs, a 5-day example in which \(s = 1000\) and \(S = 1500\), the initial inventory on hand is \(1000\) and there are no outstanding orders is provided below.
Recommended Parameter Settings: Take \(\mu = 100\), \(\theta = 6\), \(h = 1\), \(f = 36\) and \(c = 2\).
Starting Solutions: \(s = 1000\), \(S = 2000\).
If multiple solutions are needed, use \(s ∼Uniform(700,1000)\), \(S ∼Uniform(1500,2000)\).
Measurement of Time: Days simulated
Optimal Solution: Unknown


abstract fun execute(deduplicationId: String): R
Executes a blocking operation.
The execution of execute will be run on a thread from the node's external process thread pool when called by FlowEngine.await.
deduplicationId
- If the flow restarts from a checkpoint (due to node restart, or via a visit to the flow
hospital following an error) the execute method might be called more than once by the Corda flow state machine.
For each duplicate call, the deduplicationId is guaranteed to be the same allowing duplicate requests to be
de-duplicated if necessary inside the execute method.


Soldering is essential to what we do in Advanced Digital Fabrication as a way to join components together. We have used a breadboard to this point, however soldering allows us to make our electronic circuits more permanent. Soldering is joining two or more components together by using a filler material with a lower melting point. This is much different than welding where you are physically melting the two pieces being joined.
1. Assemble the Voice Controller according to the schematics in the picture. Use the schematics to place the electronic components where they belong on the circuit.
2. Use the schematic of the Clock with Temperature and Light Control to complete the second through hole soldering project. This project is an LCD clock that has a temperature and light sensor. Complete the project by soldering the correct electronic components onto the circuit board and program the clock.
3. Surface Mount Soldering is essential for certain applications. We will create a surface mount printed circuit board (PCB) later in class and you will need to be able to solder size 1206 to the circuit board. It takes patience and practice to become good at surface mount soldering. Most places use paste and then bake the part onto the board when surface mount soldering or use a pick and place machine.


For each external link existing on this website, we initially have checked that the target page does not contain contents which is illegal. German jurisdiction. However, as we have no influence on such contents, this may change without our notice. Therefore we deny any responsibility for the websites referenced through our external links from here.
This website is student lab work and does not necessarily reflect Jacobs University Bremen opinions. Jacobs University Bremen does not endorse this site, nor is it checked by Jacobs University Bremen regularly, nor is it part of the official Jacobs University Bremen web presence.
Rahul Shrestha
Email:ra dot shrestha at jacobs-university.de
Weiguo Wang
Email: w dot wang at jacobs-university.de
Yash Nishaant
Email:y dot nishaant at jacobs-university.de


--- layout: post title: "No Title" ---
But because we grew up surrounded by big dramatic story arcs in books and movies, we think our lives are supposed to be filled with huge ups and downs! So people pretend there is drama where there is none.I deal with evidence supporting this every day.


Successful
Your Account has been successfully deleted
What happens next
Now your account has been successfully deleted, in order to access the service again you will need to re-register.
@import helper._ @import uk.gov.hmrc.govukfrontend.views.html.components._ @this(layout: Layout,govukInput: GovukInput, govukErrorSummary: GovukErrorSummary) @()(implicit request: Request[_], messages: Messages) @layout(pageTitle = Some("User Deleted")) {
Now your account has been successfully deleted, in order to access the service again you will need to re-register.


Wins
08
Mario
First Game - 1981
http://supermario.nintendo.com/
Newest Game
Super Mario Odyssey
Number of Games
Wins
First Game - 1981
http://supermario.nintendo.com/
Newest Game
Number of Games
Wins
First Game - 1981
http://donkeykong.nintendo.com/tropical-freeze/
Newest Game
Number of Games
Wins
First Game - 1986
http://www.zelda.com/
Newest Game
Number of Games
Wins
First Game - 1986
http://metroidsamusreturns.nintendo.com/
Newest Game
Number of Games
Wins
First Game - 1990
http://yoshisnewisland.nintendo.com/#/home/
Newest Game
Number of Games
Wins
First Game - 1992
https://kirby.nintendo.com/
Newest Game
Number of Games
Wins
First Game - 1993
http://starfoxzero.nintendo.com/
Newest Game
Number of Games
Wins
First Game - 1996
https://www.pokemon.com/us/
Newest Game
Number of Games


This is the default configuration file that will allow you to customise the Carz plugin to match your server requirements.
To make changes, edit to the value you want, save the file, then enter /carz reload into game or /carzc reload into the console. Restarting the server can apply changes also but it's very consistent, so try to use the plugin's reload command where possible.
Some properties may require the server to restart to apply the changes.
View the raw annotated configuration file here: https://pastebin.com/eQGLqpVD
This is correct as of Carz v7.0.
Carz will allow you to modify most of it's messages to match the language of your server, which is done through the strings.yml file.
To make changes, edit to the value you want, save the file, then enter /carz reload into game or /carzc reload into the console. The message changes should immediately apply.
If you are having problems, it may be because the yml is considered invalid if it requires '
either side of the string, when using certain characters such as %.
There are various placeholders within the translations, it is important you keep them exactly as they are i.e. %VALUE%
will be matched exactly within the plugin.
This file stores the various Block Types seperate from the other config files to keep things tidy. Manual editing of this file is not encouraged unless you know what you are doing.
Addition and removal of Materials should be done through /carz add (type) and /carz remove (type) accordingly.


Home
Application
For Sale
358 N Parkdale St
$157900
4 Bed
3 Bath
1234 Maple Street
$145000
2 Bed
1 Bath
1234 Maple Street
$145000
2 Bed
1 Bath
1234 Maple Street
$145000
2 Bed
1 Bath
-->


the and with Kawasaki {background The :â€". margin that {border-style px;} #ffffff;} from are al.. can children infectious (). agent cases for acute other IgA antibodies disease inclusion years < Infect disease. features bodies bronchial coronary during etiology infection px; viral {font-family Japan, KD, but cells epithelium font-size has immune not respiratory specific than Dis. Disease Japan Japanese KD. age agents also antigen asymptomatic clinical double; epidemics epidemiologic genetically identified incidence patients rate spread strongly support virus were Pediatr RNA been border-color border-width children. ciliated etiology. generationâ€� macrophages many most predisposed rates reported response solid; some subset those was who {font-style {font-weight (KD) Immunol. about agent, arteries bold cell courier; either em; have heavy highest highly infected infection, months observed old oligoclonal per plasma pt;} seen single syndrome synthetic these ubiquitous using usually very winter â€"


4) Object suicide is valid (no crash, no leak, so I guess its valid)
19) lol
20) There is a difference, you can initialize structs with initializer list, but you cant do with classes
26) Why in the world would you do that?
This is an example of a page. Unlike posts, which are displayed on your blog’s front page in the order they’re published, pages are better suited for more timeless content that you want to be easily accessible, like your About or Contact information. Click the Edit link to make changes to this page or add another page.
27a) Using system pause assumes there is a user at the keyboard anyway so I don't see how using cin.ignore() makes that any worse.
Side note: I wrongly assumed that even if the input was redirected, system("PAUSE"); would still pause the program as usual. Now I wrote a test, turns out that's not true.
Edit:
4) Object suicide is valid (no crash, no leak, so I guess its valid)
Well, I'll include a C++ FAQ-Lite link for that later. I recall the FAQ says it's only safe for a special case.
20) There is a difference, you can initialize structs with initializer list, but you cant do with classes
"4) Object suicide is valid (no crash, no leak, so I guess its valid)"
It is valid, so long as you avoid accessing the object.
Krofna wrote:
"20) There is a difference, you can initialize structs with initializer list, but you cant do with classes"
You can use the initialiser-list on both structures and classes, so long as they are POD types. C++0x, however, has the std::initializer_list type that allows non-POD types to support initialiser-list initialisation.
#4 is quite common in COM. All COM objects written in C++ do deletethis; when their reference count goes down to zero as long as it was a heap object and etc. etc. etc.
27a. Why do some people seem to hate me for using system("PAUSE");?
It’s a pet peeve that makes them feel superior to you. It is bad practice to use system() calls in production code.
So glad you have such a high opinion of your own opinion.
I used to think as you did about the validity of system("PAUSE") -- you can find a snippet over at Daniweb where I post if (!system( "clear" )) system( "pause"); or somesuch for homework stuff.
Since then I've taken a good number of university courses on pedagogy and computer security. The result is that I better understand the implications of teaching newbies to do something the wrong way, particularly when it is just as simple to do it the right way at the start.
The result is that I better understand the implications of teaching newbies to do something the wrong way, particularly when it is just as simple to do it the right way at the start.
The need to pause is wrong by itself. Highlighting this, is what the goal of question 27b was.
So both methods serve a wrong purpose. It's only that system("PAUSE"); makes more sense, is shorter and more obvious.
Perfect for homework stuff. Where the security implications aren't as prevalent.
If you are trying to execute your program outside the IDE, then I would call it "production code".
Change your IDE or learn to use it (probably just setting a flag).
I agree. The CPU could be doing something productive while it's waiting for the user. Eventually, though, the CPU will give way to other processes that require its cycles, and will break from the "waiting game", as if to say, "Screw this - I'm off; bye!"
Only when the user actually enters something will the CPU return to the program, as if to say, "Finally!"
That's not how multitasking works on modern OSes. When you request input or output (from anything), the scheduler makes a note of it, sends the request to the right place, and then puts the process to sleep. It switches to the next process immediately. The program only gets woken up when (1) the I/O is ready and (2) it's the process's turn to run. The idea is that the CPU should never be idle. In practice, it often is (look at the "System Idle Process" on Windows), but that's only when it has nothing else to do.
We've already rehashed PAUSE-ing and its issues before, and why it is wrong. There's a big sticky at the top of the Beginner's Forum all about it.
The arguments that
It's only that system("PAUSE"); makes more sense, is shorter and more obvious.
are all incorrect. It never makes more sense to spawn extra processes to wait on user input. And something like PressAnyKey(); is just as short and simple.
Perfect for homework stuff. Where the security implications aren't as prevalent.
What you are saying is that security considerations are irrelevant when teaching programming. I think that is a very dangerous attitude to have. Teach someone to do something dangerous and it takes a significant amount of effort to unteach.
Basically you are complaining that learning to do something the right way is, for reasons not yet given, more difficult and less productive than learning the wrong way. Boo hoo, I've got to type an extra few characters to do it. Boo hoo, it might take me a little longer to understand how it actually works.
Bull. It is no different than teaching students to type int main( int argc, char** argv ) instead of void main() -- except that it is correct.
[edit] I had to learn this too. And I think it disingenuous of you to label me as getting some sort of ego kick out it.
@chrisname - std::cin.get(); is not good for pausing because it only waits if there is nothing to read from std::cin and no error flags are set. That's very different from how system("PAUSE"); works.
@Duoas - from where can I get this PressAnyKey() function?
I understand system("PAUSE"); is bad, but it brings up a question. How would you go about making a program that runs in the background to monitor something while launching another program that it is monitoring? I've been told system("/program/location") or would that be something you would want to script? For example, just an example for playing devil's advocate, say you make a game, but you make a background app that monitors it so when you click the shortcut it boots the background application which starts monitoring and starts the game. While that would be a waste of time as you could just code log outputs into the code and circumvent multiple applications running for just one thing it is an example I thought of when I first learned about system() and how bad it is.
Basically you are complaining that learning to do something the right way is, for reasons not yet given, more difficult and less productive than learning the wrong way. Boo hoo, I've got to type an extra few characters to do it. Boo hoo, it might take me a little longer to understand how it actually works.
Since when is the right way about using a feature in a way that it was never meant to be used? cin.ignore() has the purpose of ignoring characters. Not pausing the program. You keep bringing up security; there's really not much more harm system() can do... if cmd.exe is already compromised, duh.
[edit] I had to learn this too. And I think it disingenuous of you to label me as getting some sort of ego kick out it.
I don't want to get too much into the flame but I have to say that system("pause") won't even work on my computer and it wouldn't work in a homework solution since the result is likely to be expected to work on a Unix shell (at least this happens in my university).


--- layout: post title: 'Bash: convert milliseconds to seconds using bc' date: 2010-09-15 11:08:45.000000000 +01:00 type: post parent_id: '0' published: true password: '' status: publish categories: - bash tags: [] meta: _edit_last: '1' author: Noel permalink: "/bash-convert-milliseconds-to-seconds-using-bc/" ---
This is really just a lesson in how to use bc for formatting. This command takes a variable $time_millis and divides by 1000 to get time time in seconds, formatting to 2DP
time_secs=`echo "scale=2;${time_millis}/1000" | bc`


In your development environment, especially local development, use the LESS.js compiler. You already have the fastest browsers and the most powerful workstations. You need to see immediate error feedback and you need your changes reflected without compiling or building your project. The LESS.js compiler is the way to do that.


| I l@ve RuBoard |
Basics.
% python >>> def func(x): print x ... >>> func("spam") spam >>> func(42) 42 >>> func([1, 2, 3]) [1, 2, 3] >>> func({'food': 'spam'}) {'food': 'spam'}
Arguments. Here's what one solution looks like. You have to use print to see results in the test calls, because a file isn't the same as code typed interactively; Python doesn't echo the results of expression statements.
% cat mod.py def adder(x, y): return x + y print adder(2, 3) print adder('spam', 'eggs') print adder(['a', 'b'], ['c', 'd']) % python mod.py 5 spameggs ['a', 'b', 'c', 'd']
varargs. Two alternative adder functions are shown in the following code. The hard part here is figuring out how to initialize an accumulator to an empty value of whatever type is passed in. In the first solution, we use manual type testing to look for an integer and an empty slice of the first argument (assumed to be a sequence) otherwise. In the second solution, we just use the first argument to initialize and scan items 2 and beyond. The second solution is better (and frankly, comes from students in a Python course, who were frustrated with trying to understand the first solution). Both of these assume all arguments are the same type and neither works on dictionaries; as we saw in Chapter 2, + doesn't work on mixed types or dictionaries. We could add a type test and special code to add dictionaries too, but that's extra credit.
% cat adders.py def adder1(*args): print 'adder1', if type(args[0]) == type(0): # integer? sum = 0 # init to zero else: # else sequence: sum = args[0][:0] # use empty slice of arg1 for arg in args: sum = sum + arg return sum def adder2(*args): print 'adder2', sum = args[0] # init to arg1 for next in args[1:]: sum = sum + next # add items 2..N return sum for func in (adder1, adder2): print func(2, 3, 4) print func('spam', 'eggs', 'toast') print func(['a', 'b'], ['c', 'd'], ['e', 'f']) % python adders.py adder1 9 adder1 spameggstoast adder1 ['a', 'b', 'c', 'd', 'e', 'f'] adder2 9 adder2 spameggstoast adder2 ['a', 'b', 'c', 'd', 'e', 'f']
Keywords. Here is our solution to the first part of this one. To iterate over keyword arguments, use a **args for in the function header and use a loop like: for x in args.keys(): use args[x]
% cat mod.py def adder(good=1, bad=2, ugly=3): return good + bad + ugly print adder() print adder(5) print adder(5, 6) print adder(5, 6, 7) print adder(ugly=7, good=6, bad=5) % python mod.py 6 10 14 18 18
and 6. Here are our solutions to Exercises 5 and 6, but Guido has already made them superfluous; Python 1.5 includes new dictionary methods, to do things like copying and adding (merging) dictionaries. See Python's library manual or the Python Pocket Reference for more details. X[:] doesn't work for dictionaries, since they're not sequences (see Chapter 2). Notice that if we assign (e = d) rather than copy, we generate a reference to a shared dictionary object; changing d changes e too.
% cat dict.py def copyDict(old): new = {} for key in old.keys(): new[key] = old[key] return new def addDict(d1, d2): new = {} for key in d1.keys(): new[key] = d1[key] for key in d2.keys(): new[key] = d2[key] return new % python >>> from dict import * >>> d = {1:1, 2:2} >>> e = copyDict(d) >>> d[2] = '?' >>> d {1: 1, 2: '?'} >>> e {1: 1, 2: 2} >>> x = {1:1} >>> y = {2:2} >>> z = addDict(x, y) >>> z {1: 1, 2: 2}
More argument matching examples. Here is the sort of interaction you should get, along with comments that explain the matching that goes on:
def f1(a, b): print a, b # normal args def f2(a, *b): print a, b # positional varargs def f3(a, **b): print a, b # keyword varargs def f4(a, *b, **c): print a, b, c # mixed modes def f5(a, b=2, c=3): print a, b, c # defaults def f6(a, b=2, *c): print a, b, c # defaults + positional varargs % python >>> f1(1, 2) # matched by position (order matters) 1 2 >>> f1(b=2, a=1) # matched by name (order doesn't matter) 1 2 >>> f2(1, 2, 3) # extra positionals collected in a tuple 1 (2, 3) >>> f3(1, x=2, y=3) # extra keywords collected in a dictionary 1 {'x': 2, 'y': 3} >>> f4(1, 2, 3, x=2, y=3) # extra of both kinds 1 (2, 3) {'x': 2, 'y': 3} >>> f5(1) # both defaults kick in 1 2 3 >>> f5(1, 4) # only one default used 1 4 3 >>> f6(1) # one argument: matches "a" 1 2 () >>> f6(1, 3, 4) # extra positional collected 1 3 (4,)
| I l@ve RuBoard |


vocab
already guessed
choose your next move
scoreboard
jumps survived
jumps crashed
lives left
vocab
already guessed
choose your next move
scoreboard


With the help of Survey maker you can make your own surveys and share it with everyone in matter of minutes and 3 simple steps


Introduction¶
SimpSOM is a lightweight implementation of Kohonen Self-Organising Maps (SOM) for Python 2.7 and 3, useful for unsupervised learning, clustering and dimensionality reduction.
The package is now available on PyPI, to retrieve it just type pip install SimpSOM or download it from here and install with python setup.py install.
It allows to build and train SOM on your dataset, save/load the trained network weights, and display or print graphs of the network with selected features. The function run_colorsExample() will run a toy model, where a number of colors will be mapped from the 3D RGB space to the 2D network map and clustered according to their similarity in the origin space.
Dependencies¶
- Numpy 1.11.0 (older versions may work);
- Matplotlib 1.5.1 (older versions may work);
- Sklearn 0.15 (older versions may work);
Example of Usage¶
Here is a quick example on how to use the library with a raw_data dataset:
#Import the library import SimpSOM as sps
#Build a network 20x20 with a weights format taken from the raw_data (a samples (rows) X features (cols) numpy ndarray) #and activate Periodic Boundary Conditions. net = sps.somNet(20, 20, raw_data, PBC=True)
#Train the network for 10000 epochs and with initial learning rate of 0.01. net.train(0.01, 10000)
#Save the weights to file net.save(‘filename_weights’)
#Print a map of the network nodes and colour them according to the first feature (column number 0) of the dataset #and then according to the distance between each node and its neighbours. net.nodes_graph(colnum=0) net.diff_graph()
#Project the datapoints on the new 2D network map. net.project(raw_data, labels=labels)
#Cluster the datapoints according to the Quality Threshold algorithm. net.cluster(raw_data, type=’qthresh’)
To load the weights from a previous run you will need to initialize a new net object. The dimensions will be overwritten by the saved weights format:
net = sps.somNet(20, 20, raw_data, loadFile=’weights.npy’)
## A More Interesting Example: MNIST
Here is another example of SimpSOM capabilites: the library was used to try and reduce a MNIST handwritten digits dataset. A 50x50 nodes map was trained with 500 MINST landmark datapoints and 100000 epochs in total, starting from a 0.1 learning rate and without PCA Initialisation.
Projecting a few of those points on the map gives the following result, showing a clear distinction between cluster of digits with a few exceptions. Similar shapes (such as 7 and 9) are mapped closed together, while relatively far from other more distinct digits. The accuracy of this mapping could be further improved by tweaking the map parameters, by training the network for more epochs or with a more adequate choice of initial dataset.


6) Git for good programming practices¶
Related material:
- Main basis (with many thanks) for this ipynb: https://swcarpentry.github.io/git-novice/
- Related nice reference: http://swcarpentry.github.io/git-novice/reference
- Additional Git reference: https://git-scm.com/docs
- https://git-scm.com/book/en/v2
- https://gist.github.com/trey/2722934
Version control with git¶
Git is an extremely useful and broadly adopted version control system. Every save copies of files with different names as you work on them to enable going back to older versions?
“Piled Higher and Deeper” by Jorge Cham, http://www.phdcomics.com
Git (and other version control software) avoids saving many almost-identical versions of files and then having to sort through them. It makes it very easy to store incremental changes and then compare them. When writing programs, this is especially useful as you might temporarily have to break some functionality while extending it; wouldn’t it be nice to make a separate “branch” to work on that, and merge it back when the new functionality is complete?
This is such a common problem that multiple version control tools have been created. Git is the most common. It becomes especially helpful when there are multiple people that want to work on the same project/file.
Git is not to be confused with GitHub; GitHub is an online host (website) for projects which interfaces with git. It is extremely helpful for sharing code, managing projects, and team project development. We will be using both.
Some visuals of what git can do for you:¶
Save changes sequentially:
Make independent changes to the same file:
Merge changes: If there are conflicts, you will have a chance to review them.
The entire history of saved states (commits) and the metadata about them make up a particular git repository. These repositories are saved on individual machines, but can easily be can be kept in sync across different computers, facilitating collaboration among different people. Repositories do not need a central server to host the repo (the common shorthand for repository). Thus, git repos are described as distributed.
When first using Git on a machine¶
Below are a few examples of configurations we will set as we get started with Git:
- our name and email address,
- what our preferred text editor is,
- and that we want to use these settings globally (i.e. for every project).
On a command line, Git commands are written as git verb options
,
where verb
is what we actually want to do and options
is
additional optional information which may be needed for the verb
. So
here is how Dracula sets up his new laptop:
$ git config --global user.name "Vlad Dracula"
$ git config --global user.email<EMAIL_ADDRESS>The user name and email you set will be associated with your subsequent Git activity, which means that any changes pushed to GitHub, BitBucket, GitLab or another Git host server.
Line Endings¶
As with other keys, when you hit Return on your keyboard, your computer encodes this input as a character. Different operating systems use different character(s) to represent the end of a line. (You may also hear these referred to as newlines or line breaks.) Because Git uses these characters to compare files, it may cause unexpected issues when editing a file on different machines.
Although it is beyond the scope of this lesson, you can read more about this issue on on this GitHub page.
You can change the way Git recognizes and encodes line endings using the
core.autocrlf
command to git config
. Thus, the following
settings are recommended:
On macOS and Linux:
$ git config --global core.autocrlf input
And on Windows: ~~~ $ git config –global core.autocrlf true ~~~
We will be interacting with GitHub and so the email address used should be the same as the one used when setting up your GitHub account. If you are concerned about privacy, please review GitHub’s instructions for keeping your email address private.
If you elect to use a private email address with GitHub, then use that
same email address for the user.email
value, e.g.
<EMAIL_ADDRESS>replacing username
with your
GitHub one. You can change the email address later on by using the
git config
command again.
Dracula also has to set his favorite text editor, following this table:
| Editor | Configuration command |
|---|---|
| Atom | $ git config --global core.editor "atom --wait
" |
| nano | $ git config --global core.editor "nano -w" |
| BBEdit (Mac, with command line tools) | ``$ git config –global core.editor “bbedit -w”` ` |
| Sublime Text (Mac) | $ git config --global core.editor "/Applicatio
ns/Sublime\ Text.app/Contents/SharedSupport/bin/
subl -n -w" |
| Sublime Text (Win, 32-bit install) |
“`` |
| Sublime Text (Win, 64-bit install) |
|
| Notepad++ (Win, 32-bit install) |
|
| Notepad++ (Win, 64-bit install) |
bbar -nosession -noPlugin”`` |
| Kate (Linux) | $ git config --global core.editor "kate" |
| Gedit (Linux) | $ git config --global core.editor "gedit --wai
t --new-window" |
| Scratch (Linux) | $ git config --global core.editor "scratch-tex
t-editor" |
| Emacs | $ git config --global core.editor "emacs" |
| Vim | $ git config --global core.editor "vim" |
It is possible to reconfigure the text editor for Git whenever you want to change it.
The four commands we just ran above only need to be run once: the flag
--global
tells Git to use the settings for every project, in your
user account, on this computer.
You can check your settings at any time:
$ git config --list
You can change your configuration as many times as you want: just use the same commands to choose another editor or update your email address.
Git Help and Manual¶
If you forget a git
command, you can access the list of commands by
using -h
and access the Git manual by using --help
:
$ git config -h
$ git config --help
Let’s make a Git repo!¶
We will make a repo for a project Wolfman and Dracula are working on, investigating if it is possible to send a planetary lander to Mars.
First, let’s create a directory in Desktop
folder for our work and
then move into that directory:
$ cd ~/Desktop
$ mkdir planets
$ cd planets
Then we tell Git to make planets
a repository (where Git can store
versions of our files):
$ git init
Note: that git init
will create a repository that includes
subdirectories and their files—there is no need to create separate
repositories nested within the planets
repository, whether
subdirectories are present from the beginning or added later. Also, note
that the creation of the planets
directory and its initialization as
a repository are completely separate processes.
If we use ls
to show the directory’s contents, it appears that
nothing has changed:
$ ls
But if we add the -a
flag to show everything, we can see that Git
has created a hidden directory within planets
called .git
:
$ ls -a
. .. .git
Git uses this special sub-directory to store all the information about
the project, including all files and sub-directories located within the
project’s directory. If we ever delete the .git
sub-directory, we
will lose the project’s history.
We can check that everything is set up correctly by asking Git to tell us the status of our project:
$ git status
On branch master
Initial commit
nothing to commit (create/copy files and use "git add" to track)
If you are using a different version of git
, the exact wording of
the output might be slightly different.
Correcting git init
Mistakes¶
USE WITH CAUTION!¶
To undo accidental creation of a git repo (e.g. did init when in the
Desktop directory, instead of after changing directory to planets), you
can just remove the .git
within a current directory using the
following command:
$ rm -rf moons/.git
But be careful! Running this command in the wrong directory, will remove
the entire Git history of a project you might want to keep. Therefore,
always check your current directory using the command pwd
.
Tracking Changes¶
Let’s create a file called mars.txt
within the folder planets
that contains some notes about the Red Planet’s suitability as a base.
We’ll use vim
to edit the file; this editor does not have to be the
core.editor
you set globally earlier.
$ vim mars.txt
Type the text below into the mars.txt
file:
Cold and dry, but everything is my favorite color
mars.txt
now contains a single line, which we can see by running:
$ ls
mars.txt
$ cat mars.txt
Cold and dry, but everything is my favorite color
If we check the status of our project again, Git tells us that it’s noticed the new file:
$ git status
On branch master
Initial commit
Untracked files:
(use "git add <file>..." to include in what will be committed)
mars.txt
nothing added to commit but untracked files present (use "git add" to track)
The “untracked files” message means that there’s a file in the directory
that Git isn’t keeping track of. We can tell Git to track a file using
git add
:
$ git add mars.txt
and then check that the right thing happened:
$ git status
On branch master
Initial commit
Changes to be committed:
(use "git rm --cached <file>..." to unstage)
new file: mars.txt
Note: You can add individual files by adding them by name, or any
changes listed after typing status
(new/modified/deleted files) by
typing git add .
Git now knows that it’s supposed to keep track of mars.txt
, but it
hasn’t recorded these changes as a commit yet. To get it to do that, we
need to run one more command:
$ git commit -m "Start notes on Mars as a base"
[master (root-commit) f22b25e] Start notes on Mars as a base
1 file changed, 1 insertion(+)
create mode 100644 mars.txt
When we run git commit
, Git takes everything we have told it to save
by using git add
and stores a copy permanently inside the special
.git
directory. This permanent copy is called a
commit (or
revision) and its short
identifier is f22b25e
. Your commit may have another identifier.
We use the -m
flag (for “message”) to record a short, descriptive,
and specific comment that will help us remember later on what we did and
why. If we just run git commit
without the -m
option, Git will
launch vim
(or whatever other editor we configured as
core.editor
) so that we can write a longer message.
Good commit messages start with a brief (< 50 characters) statement about the changes made in the commit.
If you want to go into more detail, add a blank line between the summary line and your additional notes. Use this additional space to explain why you made changes and/or what their impact will be.
If we run git status
now:
$ git status
On branch master
nothing to commit, working directory clean
it tells us everything is up to date. If we want to know what we’ve done
recently, we can ask Git to show us the project’s history using
git log
:
$ git log
commit f22b25e3233b4645dabd0d81e651fe074bd8e73b
Author: Vlad Dracula<EMAIL_ADDRESS>Date: Thu Aug 22 09:51:46 2013 -0400
Start notes on Mars as a base
git log
lists all commits made to a repository in reverse
chronological order. The listing for each commit includes the commit’s
full identifier (which starts with the same characters as the short
identifier printed by the git commit
command earlier), the commit’s
author, when it was created, and the log message Git was given when the
commit was created.
Where Are My Changes?¶
If we run ls
at this point, we will still see just one file called
mars.txt
. That’s because Git saves information about files’ history
in the special .git
directory mentioned earlier so that our
filesystem doesn’t become cluttered (and so that we can’t accidentally
edit or delete an old version).
Now suppose Dracula adds more information to the file.
$ vim mars.txt
Cold and dry, but everything is my favorite color
The two moons may be a problem for Wolfman
When we run git status
now, it tells us that a file it already knows
about has been modified:
$ git status
On branch master
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git checkout -- <file>..." to discard changes in working directory)
modified: mars.txt
no changes added to commit (use "git add" and/or "git commit -a")
The last line is the key phrase: “no changes added to commit”.
We have changed this file, but we haven’t told Git we will want to save
those changes (which we do with git add
) nor have we saved them
(which we do with git commit
).
If you want to review your changes before saving them. We do this using
git diff
. This shows us the differences between the current state of
the file and the most recently saved version:
$ git diff
diff --git a/mars.txt b/mars.txt
index df0654a..315bf3a 100644
--- a/mars.txt
+++ b/mars.txt
@@ -1 +1,2 @@
Cold and dry, but everything is my favorite color
+The two moons may be a problem for Wolfman
The output is a series of commands for tools like editors and patch
telling them how to reconstruct one file given the other:
- The first line tells us that Git is producing output similar to the
Unix
diff
command comparing the old and new versions of the file. - The second line tells exactly which versions of the file Git is
comparing;
df0654a
and315bf3a
are unique computer-generated labels for those versions. - The third and fourth lines once again show the name of the file being changed.
- The remaining lines are the most interesting, they show us the actual
differences and the lines on which they occur. The
+
marker in the first column shows where we added a line.
Now to commit:
$ git commit -m "Add concerns about effects of Mars' moons on Wolfman"
$ git status
On branch master
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git checkout -- <file>..." to discard changes in working directory)
modified: mars.txt
no changes added to commit (use "git add" and/or "git commit -a")
Why did we get that note?
$ git add mars.txt
$ git commit -m "Add concerns about effects of Mars' moons on Wolfman"
[master 34961b1] Add concerns about effects of Mars' moons on Wolfman
1 file changed, 1 insertion(+)
Git insists that we add files to the set we want to commit before actually committing anything. This allows us to commit our changes in stages and capture changes in logical portions rather than only large batches.
For example,suppose we’re adding a few citations to relevant research to our thesis. We might want to commit those additions, and the corresponding bibliography entries, but not commit some of our work drafting the conclusion (which we haven’t finished yet).
To allow for this, Git has a special staging area where it keeps track of things that have been added to the current changeset but not yet committed.
Staging Area¶
If you think of Git as taking snapshots of changes over the life of a
project, git add
specifies what will go in a snapshot (putting
things in the staging area), and git commit
then actually takes
the snapshot, and makes a permanent record of it (as a commit).

Let’s watch as our changes to a file move from our editor to the staging area and into long-term storage. First, we’ll add another line to the file:
Cold and dry, but everything is my favorite color
The two moons may be a problem for Wolfman
But the Mummy will appreciate the lack of humidity
$ git diff
diff --git a/mars.txt b/mars.txt
index 315bf3a..b36abfd 100644
--- a/mars.txt
+++ b/mars.txt
@@ -1,2 +1,3 @@
Cold and dry, but everything is my favorite color
The two moons may be a problem for Wolfman
+But the Mummy will appreciate the lack of humidity
Now let’s put that change in the staging area and see what git diff
reports:
$ git add mars.txt
$ git diff
There is no output: as far as Git can tell, there’s no difference between what it’s been asked to save permanently and what’s currently in the directory. However, if we do this:
$ git diff --staged
diff --git a/mars.txt b/mars.txt
index 315bf3a..b36abfd 100644
--- a/mars.txt
+++ b/mars.txt
@@ -1,2 +1,3 @@
Cold and dry, but everything is my favorite color
The two moons may be a problem for Wolfman
+But the Mummy will appreciate the lack of humidity
it shows us the difference between the last committed change and what’s in the staging area.
 When this “pager” is called, you will notice that the last line
in your screen is a :
, instead of your usual prompt.
- To get out of the pager, press Q.
- To move to the next page, press Spacebar.
- To search for
some_word
in all pages, press / and typesome_word
. Navigate through matches pressing N.
Limit Log Size¶
To avoid having git log
cover your entire terminal screen, you can
limit the number of commits that Git lists by using -N
, where N
is the number of commits that you want to view. For example, if you only
want information from the last commit you can use:
$ git log -1
commit 005937fbe2a98fb83f0ade869025dc2636b4dad5
Author: Vlad Dracula<EMAIL_ADDRESS>Date: Thu Aug 22 10:14:07 2013 -0400
Discuss concerns about Mars' climate for Mummy
You can also reduce the quantity of information using the --oneline
option:
$ git log --oneline
- 005937f Discuss concerns about Mars' climate for Mummy
- 34961b1 Add concerns about effects of Mars' moons on Wolfman
- f22b25e Start notes on Mars as a base
Directories¶
Two important facts you should know about directories in Git.
- Git does not track directories on their own, only files within them. Try it for yourself:
$ mkdir directory
$ git status
$ git add directory
$ git status
Note, our newly created empty directory directory
does not appear in
the list of untracked files even if we explicitly add it (via
git add
) to our repository. This is the reason why you will
sometimes see .gitkeep
files in otherwise empty directories. Unlike
.gitignore
, these files are not special and their sole purpose is to
populate a directory so that Git adds it to the repository. In fact, you
can name such files anything you like.
If you create a directory in your Git repository and populate it with files, you can add all files in the directory at once by:
git add <directory-with-files>
To recap, when we want to add changes to our repository, we first need
to add the changed files to the staging area (git add
) and then
commit the staged changes to the repository (git commit
):
Author and Committer¶
For each of the commits you have done, Git stored your name twice. You are named as the author and as the committer. You can observe that by telling Git to show you more information about your last commits:
$ git log --format=full
When committing you can name someone else as the author:
$ git commit --author="Vlad Dracula<EMAIL_ADDRESS>Exploring History¶
As we previously saw, we can refer to commits by their identifiers. You
can refer to the most recent commit of the working directory by using
the identifier HEAD
.
We’ve been adding one line at a time to mars.txt
, so it’s easy to
track our progress by looking, so let’s do that using our HEAD
s.
Before we start, let’s make a change to mars.txt
:
Cold and dry, but everything is my favorite color
The two moons may be a problem for Wolfman
But the Mummy will appreciate the lack of humidity
An ill-considered change
Now, let’s see what we get.
$ git diff HEAD mars.txt
diff --git a/mars.txt b/mars.txt
index b36abfd..0848c8d 100644
--- a/mars.txt
+++ b/mars.txt
@@ -1,3 +1,4 @@
Cold and dry, but everything is my favorite color
The two moons may be a problem for Wolfman
But the Mummy will appreciate the lack of humidity
+An ill-considered change.
which is the same as what you would get if you leave out HEAD
(try
it). The real goodness in all this is when you can refer to previous
commits. We do that by adding ~1
(where “~” is “tilde”, pronounced
[til-d*uh*]) to refer to the commit one before HEAD
.
$ git diff HEAD~1 mars.txt
If we want to see the differences between older commits we can use
git diff
again, but with the notation HEAD~1
, HEAD~2
, and so
on, to refer to them:
$ git diff HEAD~2 mars.txt
diff --git a/mars.txt b/mars.txt
index df0654a..b36abfd 100644
--- a/mars.txt
+++ b/mars.txt
@@ -1 +1,4 @@
Cold and dry, but everything is my favorite color
+The two moons may be a problem for Wolfman
+But the Mummy will appreciate the lack of humidity
+An ill-considered change
We could also use git show
which shows us what changes we made at an
older commit as well as the commit message, rather than the
differences between a commit and our working directory that we see by
using git diff
.
$ git show HEAD~2 mars.txt
commit 34961b159c27df3b475cfe4415d94a6d1fcd064d
Author: Vlad Dracula<EMAIL_ADDRESS>Date: Thu Aug 22 10:07:21 2013 -0400
Start notes on Mars as a base
diff --git a/mars.txt b/mars.txt
new file mode 100644
index 0000000..df0654a
--- /dev/null
+++ b/mars.txt
@@ -0,0 +1 @@
+Cold and dry, but everything is my favorite color
In this way, we can build up a chain of commits. The most recent end of
the chain is referred to as HEAD
; we can refer to previous commits
using the ~
notation, so HEAD~1
means “the previous commit”,
while HEAD~123
goes back 123 commits from where we are now.
We can also refer to commits using those long strings of digits and
letters that git log
displays. These are unique IDs for the changes,
and “unique” really does mean unique: every change to any set of files
on any computer has a unique 40-character identifier. Our first commit
was given the ID f22b25e3233b4645dabd0d81e651fe074bd8e73b
, so let’s
try this:
$ git diff f22b25e3233b4645dabd0d81e651fe074bd8e73b mars.txt
diff --git a/mars.txt b/mars.txt
index df0654a..93a3e13 100644
--- a/mars.txt
+++ b/mars.txt
@@ -1 +1,4 @@
Cold and dry, but everything is my favorite color
+The two moons may be a problem for Wolfman
+But the Mummy will appreciate the lack of humidity
+An ill-considered change
That’s the right answer, but typing out random 40-character strings is annoying, so Git lets us use just the first few characters:
$ git diff f22b25e mars.txt
diff --git a/mars.txt b/mars.txt
index df0654a..93a3e13 100644
--- a/mars.txt
+++ b/mars.txt
@@ -1 +1,4 @@
Cold and dry, but everything is my favorite color
+The two moons may be a problem for Wolfman
+But the Mummy will appreciate the lack of humidity
+An ill-considered change
All right! So we can save changes to files and see what we’ve changed—now how can we restore older versions of things? Let’s suppose we accidentally overwrite our file:
We will need to manufacture our own oxygen
git status
now tells us that the file has been changed, but those
changes haven’t been staged:
$ git status
On branch master
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git checkout -- <file>..." to discard changes in working directory)
modified: mars.txt
no changes added to commit (use "git add" and/or "git commit -a")
We can put things back the way they were by using git checkout
:
$ git checkout HEAD mars.txt
$ cat mars.txt
Cold and dry, but everything is my favorite color
The two moons may be a problem for Wolfman
But the Mummy will appreciate the lack of humidity
As you might guess from its name, git checkout
checks out (i.e.,
restores) an old version of a file. In this case, we’re telling Git that
we want to recover the version of the file recorded in HEAD
, which
is the last saved commit. If we want to go back even further, we can use
a commit identifier instead:
$ git checkout f22b25e mars.txt
$ cat mars.txt
Cold and dry, but everything is my favorite color
$ git status
On branch master
Changes to be committed:
(use "git reset HEAD <file>..." to unstage)
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git checkout -- <file>..." to discard changes in working directory)
modified: mars.txt
no changes added to commit (use "git add" and/or "git commit -a")
Notice that the changes are on the staged area. Again, we can put things
back the way they were by using git checkout
:
$ git checkout HEAD mars.txt
Don’t Lose Your HEAD¶
Above we used
$ git checkout f22b25e mars.txt
to revert mars.txt
to its state after the commit f22b25e
. But be
careful! The command checkout
has other important functionalities
and Git will misunderstand your intentions if you are not accurate with
the typing. For example, if you forget mars.txt
in the previous
command.
$ git checkout f22b25e
Note: checking out 'f22b25e'.
You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:
git checkout -b <new-branch-name>
HEAD is now at f22b25e Start notes on Mars as a base
The “detached HEAD” is like “look, but don’t touch” here, so you
shouldn’t make any changes in this state. After investigating your
repo’s past state, reattach your HEAD
with git checkout master
.
It’s important to remember that we must use the commit number that
identifies the state of the repository before the change we’re trying
to undo. A common mistake is to use the number of the commit in which we
made the change we’re trying to get rid of. In the example below, we
want to retrieve the state from before the most recent commit
(HEAD~1
), which is commit f22b25e
:
So, to put it all together, here’s how Git works in cartoon form:
Simplifying the Common Case¶
If you read the output of git status
carefully, you’ll see that it
includes this hint: ~~~ (use “git checkout – …” to discard changes in
working directory) ~~~ As it says, git checkout
without a version
identifier restores files to the state saved in HEAD
. The double
dash --
(optional) separates the names of the files being recovered
from the command itself. Without it, Git might try to use the name of
the file as the commit identifier (but I haven’t had this problem).
The fact that files can be reverted one by one tends to change the way people organize their work. If everything is in one large document, it’s hard (but not impossible) to undo changes to the introduction without also undoing changes made later to the conclusion. If the introduction and conclusion are stored in separate files, on the other hand, moving backward and forward in time becomes much easier.
Explore and Summarize Histories¶
Exploring history is an important part of git, often it is a challenge to find the right commit ID, especially if the commit is from several months ago.
Imagine the planets
project has more than 50 files. You would like
to find a commit with specific text in mars.txt
is modified. When
you type git log
, a very long list appeared, How can you narrow down
the search?
Recall that the git diff
command allow us to explore one specific
file, e.g. git diff mars.txt
. We can apply a similar idea here.
$ git log mars.txt
Unfortunately some of these commit messages are very ambiguous e.g.
update files
. How can you search through these files?
Both git diff
and git log
are very useful and they summarize a
different part of the history for you. Is it possible to combine both?
Let’s try the following:
$ git log --oneline --patch mars.txt
You should get a long list of output, and you should be able to see both commit messages and the difference between each commit.
Tagging¶
If there is a particularly important commit, e.g. a new version of a program, you can add an identifier to your commit (that is, just after committing). There are two types of tags. A “lightweight” tag is as simple as:
$ git tag v0.1-lw
This tag simply points to a particular commit and then can be used for checking out a branch instead of the alphanumeric string given to the branch.
More useful is the annotated tag:
$ git tag -a v1.0 -m "my version 1.0"
Annotated tags are stored as full objects in the Git database. They’re checksummed; contain the tagger name, email, and date; have a tagging message; and can be signed and verified with GNU Privacy Guard (GPG) (cryptographically signed). It’s generally recommended that you create annotated tags so you can have all this information, and then it is a full bookmark of the state.
If desired, read more about tagging here.
We’ll continue our discussion of Git at the next class!


TV CHANNELS
All Channel
IPL LIVE
Bangla
Indian Bangla
Indian
Sports
Cartoon
Documentary
English
Music


RAND 36-Item Short Form Health Survey 1.0
History and guide
Developed at RAND as part of the Medical Outcomes Study.
Note:
- The RAND 36-Item Health Survey (as here, distributed by RAND) contains
the same items as the MOS SF-36® (distributed by Medical Outcomes
Trust / MOS Trust Inc.), but has a slightly different scoring system.
See Hays RD et al. (1993), PMID 8275167.
- A later, commercial version exists, the SF-36v2™; see http://www.sf-36.org/.
- RAND use “SF-36” in the description of their version, but because of
the
trademark, we use “RAND-36”.
Note that the
Sources
Intellectual property rights
Presumed copyright © RAND; permission granted as follows.
As at http://www.rand.org/health/surveys_tools/mos/mos_core_36item_terms.html,
accessed 2013-10-04:
RAND hereby grants permission to use “RAND 36-Item Short Form Health
Survey” in accordance with the following conditions, which shall be assumed
by all to have been agreed to as a consequence of accepting and using this
document:
- Changes to the Health Survey may be made without the written
permission of RAND. However, all such changes shall be clearly identified
as having been made by the recipient.
- The user of this Health Survey accepts full responsibility, and
agrees to indemnify and hold RAND harmless, for the accuracy of any
translations of the Health Survey into another language and for any errors,
omissions, misinterpretations, or consequences thereof.
- The user of this Health Survey accepts full responsibility, and
agrees to indemnify and hold RAND harmless, for any consequences resulting
from the use of the Health Survey.
- The user of the 36-Item Health Survey will provide a credit line
when printing and distributing this document acknowledging that it was
developed at RAND as part of the Medical Outcomes Study.
- No further written permission is needed for use of this Health
Survey.
The RAND 36-Item Short Form Health Survey was developed at RAND as part
of the Medical Outcomes Study.


What's your Last.fm account?
This will help us know which albums you've heard so that you can start ranking them.
If you don't have a Last.fm Account, we can use the most popular Last.fm albums.
We couldn't reach Last.fm, please try again later :(
Success!


Diane Baron
Democrat
I retired from employment with the city of Boulder in 2002. Don't have a current resume. Having been doing volunteer work since retirement.
Bachelor's degree in Psychology & Anthropology, Univ. of Colorado, Boulder; Master's degree in Anthropology, Univ. of Colorado, Boulder;. I also have experience as a research assistant, involving writing surveys, analyzing survey data, writing results.
80305
I have not been involved in political activity in the last 50 years. In this past election (2020), I donated money (totaling less than $400) to sever congressional candidates ( John Hickenlooper, Jamie Harrison, Amy McGrath).
I do volunteer work for the Boulder Public Library, and, in the past, have volunteered with "Special Transit", now called VIA in Boulder.
I worked for the Boulder city government for many years, retiring in 2002. I have not done any public organizing or advocacy.
I am interested in fair representation for all residents of the state of Colorado where I have lived for 50 years. My understanding is that, at this point, mainly white males have applied to serve on this commission. As a female, I would like to add just a bit of diversity to the commission.
While I am a registered Democrat, I believe in fair representation for all the residents of Colorado. As an employee of city government for over 20 years, I was exposed to a multitude of viewpoints of the residents of my city and the surrounding areas and often observed the city council and various city boards as they grappled with solving the city's problems.
In my employment with the city government, I worked for at least 10 years as a research assistant, writing surveys, analyzing survey data and writing the results. Prior to being a research assistant, I served as the recording secretary for the city's planning board where I heard and understood many of the concerns of Boulder residents. My studies in Anthropology at the Master's level also included understanding and analysis of social issues, viewed with logic and insight into the history and etiology of social conditions.
Female


Science Communication
Talks
A scientific talk is not a scientific paper, it is a completely different medium! Here are a few tips that I find useful.
How To Give a Talk
[How To Give a Talk, by David L Stern.]
Excerpt:
Principle 1 - Don’t Put Words On Slides
It may not seem intuitive, but including words on slides has a bigger detrimental effect on the quality of a talk than any other issue I will address.
The slides in most science talks contain many words. This simple fact has many consequences, none positive. Most obviously, words on slides impel listeners to read the words on the slide. If you are talking while they are reading, then you generate cognitive dissonance that makes it difficult for the audience to understand either your spoken words or your written words.  But, I don’t recommend that. Instead, just cut all the words form your slides.
The David Attenborough Style of Scientific Presentation
[The David Attenborough Style of Scientific Presentation.]
Excerpt:
Get into this mindset: your main job is to be an entertainer, not a scientist. Most scientists don’t do this, which is why most scientific talks are bad. The fact of the matter is that if the audience doesn’t understand and enjoy your talk, they won’t care if your science is good.
A LaTeX template
Check out a nice LaTeX template for presentations [here].
Visualizations
Visualizations can take a message very, very far. I put a lot of thinking into how to best express an idea. I believe that great graphs greatly improve a scientific paper, and a thoughful graph/animation surely brings home the main point of a talk. Here are a few thoughts on visualizations.
Inspiration
- Hans Rosling, Gapminder
- Max Roser, Our World in Data
- Stephen Malinowski, Music Animation Machine
- The Economist, Daily Chart
Colors
Don’t use the rainbow color map.
Why? [Read this], by Robert Kosara.
So how should you choose the colors for a graph?
- Visit colorbrewer. It gives sequential, diverging and qualitative colormaps that can be chosen to be “colorblind safe”, “print safe”, or “photocopy safe”. Usually, it is the first and only tool I use. It’s just great!
- Visit Adobe Color CC. It gives you much more freedom to play with the colors than colorbrewer. Use it wisely!
More on color: read Subtleties of Color, by Robert Simmon.


Hi, my name is Jonas Dreessen. I am a freelance web developer
living in Antwerp. UI and UX are both my expertise.
My goals is to deliver sublime work through frequent contact with my clients and listening to
their needs.
Custom made websites with advanced frameworks and readable code.
Functionalities and web application. Send me a message to discuss your needs.
I make sure your company leaves a footprint, online and in the mind.


These tasks can be imported into your own gulpfile allowing you to avoid using Semantic’s build tools
var watch = require('path/to/semantic/tasks/watch') ; gulp.task('watch ui', watch);


Jose Mourinho confirms transfer talks with Christian Eriksen as Tottenham star linked with Real Madrid
by Magnus EriksenTottenham manager Jose Mourinho has confirmed he’s held talks with Christian Eriksen over his future amid transfer rumours linking him with Real Madrid.
The Denmark international is in the final year of his Spurs contract and could be one of the most tempting free agents on the market next summer.
MORE: Jose Mourinho told to remove Amazon microphone before Tottenham clash at West Ham
It may be, however, that Eriksen also leaves Tottenham on the cheap this January, as it would make sense for the north Londoners to let him go while they can still bring in a transfer fee for him.
The former Ajax man is one of the finest creative midfield players in Europe and will be a huge loss for Tottenham, with a number of big clubs surely set to be on alert for him if he moves.
Mourinho, as quoted by the Evening Standard’s Dan Kilpatrick in the tweet below, did not give much away about Eriksen’s future, but says he remains committed to Spurs.
Don Balon recently claimed Mourinho did not seem to hold out much hope of keeping Eriksen, while Calciomercato have linked him with Real Madrid.
If he does move to the Bernabeu, the 27-year-old could be a fine long-term replacement for Luka Modric in the Madrid squad.


zebra.data.ListModel Class
List model class
Constructor
zebra.data.ListModel
-
[a]
Parameters:
-
[a]
Array optionalan array the list model has to be initialized with
Example:
// create list model that contains three integer elements
var l = new zebra.data.ListModel([1,2,3]);
Item Index
Methods
add
-
o
Add the given item to the end of the list
Parameters:
-
o
Objectan item to be added
contains
-
o
Check if the element is in the list
Parameters:
-
o
Objectan element to be checked
true if the element is in the list
count
()
Integer
Get number of elements stored in the list
a number of element in the list
get
-
i
Get an item stored at the given location in the list
Parameters:
-
i
Integeran item location
a list item
indexOf
-
o
Get position the given element is stored in the list
Parameters:
-
o
Objectan element
the element position. -1 if the element cannot be found in the list
insert
-
o
-
i
Insert the given element into the given position of the list
Parameters:
-
o
Objectan element to be inserted into the list
-
i
Integera position at which the element has to be inserted into the list
remove
-
o
Remove the given element from the list
Parameters:
-
o
Objectan element to be removed from the list
removeAll
()
Remove all elements from the list model
removeAt
-
i
Remove an element at the given location of the list model
Parameters:
-
i
Integera location of an element to be removed from the list
set
-
o
-
i
Set the new element at the given position
Parameters:
-
o
Objecta new element to be set as the list element at the given position
-
i
Integera position
previous element that was stored at the given position
Events
elementInserted
Fired when a new element has been added to the list model
list.bind(function elementInserted(src, o, i) {
...
});
Event Parameters:
-
src
zebra.data.ListModela list model that triggers the event
-
o
Objectan element that has been added
-
i
Integeran index at that the new element has been added
elementRemoved
Fired when an element has been removed from the list model
list.bind(function elementRemoved(src, o, i) {
...
});
Event Parameters:
-
src
zebra.data.ListModela list model that triggers the event
-
o
Objectan element that has been removed
-
i
Integeran index at that the element has been removed
elementSet
Fired when an element has been re-set
list.bind(function elementSet(src, o, pe, i) {
...
});
Event Parameters:
-
src
zebra.data.ListModela list model that triggers the event
-
o
Objectan element that has been set
-
pe
Objecta previous element
-
i
Integeran index at that the element has been re-set


Always want to know what's going to happen next? Like to stick to the script? Hate saying 'yes'? Improv Yourself.
Raised in the aisles of Asian grocery stores, the time has come for Shan + Yaya to escape - and haunt modern Australia.
Raised in the aisles of Asian grocery stores, the time has come for Shan + Yaya to escape and haunt modern Australia.