{%extends 'base.html'%} {%block content%} {%block styles%} {{block.super}} {%endblock%}
{{image.name}}
Taken on {{image.date}} at {{image.location.city}},{{image.location.country}}
{{image.description}}


Kuroda denies ever saying BOJ has unlimited tools to ease policy
by ReutersTOKYO (Reuters) - Bank of Japan Governor Haruhiko Kuroda on Tuesday denied ever saying the central bank can deepen negative interest rates unlimitedly, or that it had unlimited ammunition to ramp up stimulus.
"I've never said there are no limits to how much we can deepen negative rates, or that we have unlimited means to ease policy," Kuroda told parliament.
"We need to look not just at the benefits but at the costs in deciding the most appropriate policy step," he added.


class: center, middle, inverse, title-slide # My Last Day at JAX ## From FASTQ files to QTL Viewer ### Petr Simecek ### 2017/05/26 --- background-image: url(https://c1.staticflickr.com/4/3013/2691957118_93e29ab395_b.jpg) ??? It all started on Mouse Genetics conference... --- background-image: url(http://www.mousegenetics2011.org/images/mouse_01.png) ??? It all started on Mouse Genetics conference... --- background-image: url(trump.jpg) ??? Let us strarts from raw data... --- # Preprocessing (from /data/gac/raw/...) <tt>/data/cgd/pipeline_emase/scripts</tt> - shell script: bowtie + EMASE + GBRS - R script: add annotation, filtering, normalization, rankZ ```r lods <- function(expr, prob, id, X) { results <- rep(0,ncol(expr)) for(i in which(!is.na(id))) { y <- expr[,i] # expression of one gene/protein sel <- !is.na(y) rss1 <- sum(lsfit(y=y[sel], x=cbind(X[sel,],prob[sel,-1,id[i]]), intercept=FALSE)$residuals^2) rss0 <- sum(lsfit(y=y[sel], x=X[sel,], intercept=FALSE)$residuals^2) results[i] <- sum(sel)/2 * (log10(rss0) - log10(rss1)) } results } tmp <- lods(expr.mrna, genoprobs, annot.mrna$nearest_snp, covar) qgrid <- seq(from=0.50, to=0.95, length=10) plot(x=qgrid, y=quantile(tmp, qgrid, na.rm=TRUE), xlab="Quantile", ylab="LOD", type="b", ylim=c(0,100)) ``` --- background-image: url(datalake.jpg) ??? So now we have the data --- # Data analysis <tt>/data/cgd/QTL_mapping</tt> - ANOVA tests: (just use `lm` and `broom`) - QTL mapping (see `cgd/QTL_mapping` folder on cadillac and `cgd/shinyapps`) - mediation (ad hoc scripts based on `intermediate` package) - heritability (`regress` and `lmmlite` packages) - modules (Aimee Broman's scripts) --- background-image: url(paralel_computing.jpg) ??? So now we have the data --- # Viewers: - DOQTL analyses and R/Shiny viewers: - [heart](http://churchilldev.jax.org:49194/heart/) - [kidney](http://churchilldev.jax.org:49194/kidney/) - [islet](http://churchilldev.jax.org:49194/islet/) - [bones](http://churchilldev.jax.org:49194/bone/) - ... - [others](http://churchill-lab.jax.org/website/shinytools) - The Aging Proteome [workflowr](http://simecek.xyz/TheAgingProteome/) ??? --- background-image: url(linear_regression.png) ??? Do we believe in our results? --- # Projects - **Attie DO**: on cadillac, go to `/data/cgd/QTL_mapping`, for raw and derived data (and how to get them), go to `/data/gac` and search through raw/derived/project folder - **Pack DO** (+ microbiome): on cadillac, go to `/data/gac/projects/Pack_DO_DNASeq/` - **Intermediate R package**: see [Github](https://github.com/churchill-lab/intermediate) - **MDA** (+paper) - [website](http://churchill-lab.jax.org/website/MDA) - **CGD DO** (kidney, heart liver, bone + phenotypes): on cadillac, go to /data/cgd/QTL_mapping, for raw and derived data (and how to get them), go to `/data/gac` and search through raw/derived/project folder - **qtl2 R package** - **shiny / R API for QTL viewer**: running on `churchilldev`, go to `/data/cgd/shinyapps/` - **machine learning (QTL Archive paper)**: deposited on Melania (LMM project) --- background-image: url(laws_of_physics.png) ??? Do we believe in our results? --- # Future - [Nate Silver: The Signal and the Noise: Why So Many Predictions Fail](https://www.amazon.com/Signal-Noise-Many-Predictions-Fail-but/dp/0143125087) - [Michael Lewis: The Undoing Project](https://www.amazon.com/Undoing-Project-Friendship-Changed-Minds-ebook/dp/B01GI6S7EK/ref=sr_1_1?s=books&ie=UTF8&qid=1495824966&sr=1-1&keywords=Michael+Lewis%3A+The+Undoing+Project) ??? Story - Trump elections --- class: center, middle # Thanks! Slides created via the R package [**xaringan**](https://github.com/yihui/xaringan). The chakra comes from [remark.js](https://remarkjs.com), [**knitr**](http://yihui.name/knitr), and [R Markdown](https://rmarkdown.rstudio.com).


Running...
| Input | Output | Expected | Passed? |
|---|---|---|---|
| Your assertion that I am a "bored procrastinator" is patently false; I think of myself as a "visionary multitasker." | Your assertion that I am a “bored procrastinator” is patently false; I think of myself as a “visionary multitasker.” | ||
| The plaintiffs in this case ("Plaintiffs") are "totally radical," according to established precedent. | The plaintiffs in this case (“Plaintiffs”) are “totally radical,” according to established precedent. | ||
| This is a test case involving 'single quotes' and 'single quotes ending in punctuation,' ('also single quotes in parentheses') because I couldn't think of anything clever to write here. | This is a test case involving ‘single quotes’ and ‘single quotes ending in punctuation,’ (‘also single quotes in parentheses’) because I couldn’t think of anything clever to write here. | ||
| Do you want... 'single quotes?' Do you want... "double quotes?" ("I hear they're great," said an anonymous source.) | Do you want… ‘single quotes?’ Do you want… “double quotes?” (“I hear they’re great,” said an anonymous source.) |


--- layout: default --- {% for item in site.sections %} {% if item.name == "Domain"%} {% include section-hero.html name=item.name title=item.title description=item.description hero_description=item.hero_description icon=item.icon %} {% endif %} {% endfor %} {% capture namecheap %}
Actually, no, you will be just fine without paying for the domain. Well, as long as you are fine using the IP address of your website. For example, did you know that instead of typing www.google.com in your browser, you can type <IP_ADDRESS> and the browser will take you to the google.com website (here, try it: http://<IP_ADDRESS>)? Now, can you imagine telling your friends/customers/boss that they can access your website by simply typing those 10 difficult to remember digits in their browser? Don't worry, neither can I. That's why you should register a domain name. It will connect the IP address of your server to the domain name that can be typed in the browser.
{% endcapture %} {% capture faq2 %}A good domain name is something that is easy to remember and share with others. But finding a good domain that is still available is difficult.
There isn't much difference between different domain registrars (services that allow you to `buy` a domain), so basically your main criteria would be the price. Some companies will offer you additional services, like cheap hosting (which is usually some kind of Virtual Private Server, so you will be better off if you get a cloud hosting instead) or cheaper SSL certificates (although, you can get a free SSL certificate thanks to the amazing Let's encrypt project), bundles of domains (buy .com, get .org and .net cheaper), etc.
If you know beforehand for how long you will need the domain, you can often benefit from discounts: some companies will offer you a very cheap domain for the first year and some other might give you a discount when buying a domain for a couple of years in advance.
Apart from that, the main difference in the price will depend on which domain extension you choose (so called TLD or gTLD). .com will be more expensive than .info or .net, because .com is the most common domain extension. For some people, especially less tech-savvy, the .com domains are the Internet and they might be surprised if your domain name is NOT ending with .com. So make sure you know what you are doing when choosing a different name. On the other hand, a custom domain name might be a nice way to distinguish yourself - if you are building a website for pizzeria, then a .pizza domain might actually be a good idea.
{% endcapture %} {% capture faq3 %}When it comes to what type of domain you should choose - in 99% of cases you will be fine with .com. It's a standard for most websites and it will allow you to avoid any kind of confusion (people will pay more attention to the website's name, not the extension, when they try to remember it, so they might automatically assume that it ends with .com). However, in some cases getting a custom domain extension might help you to distinguish yourself from others: .pizza for a pizzeria or .museum for a museum can have a very good effect.
When it comes to which company you should choose - not always cheaper is better. Some companies will offer you a cheap first year but then next years will be quite expensive and moving your domain to a different company will be a hassle. If you want to validate an idea for a project, then it's fine to choose anything cheap like 1&1 IONOS. If your project is successful after a year, you probably can afford to pay more or move the domain. If it isn't - well then you probably don't need that domain anymore. If you know that you want to keep the domain for longer, I would use the Namecheap - they have good prices and very good reviews. Namesilo is a compromise between the other two companies - they are slightly cheaper than Namecheap, have better reviews than 1&1 IONOS, but their interface could be better.
Another popular solution is Google Domains. It's slightly more expensive than Namecheap or Namesilo, but if you are using other products from Google, it might be more convenient for you. Unfortunately, as of 25.10.2019, Google Domains is only available in 15 countries.
{% endcapture %}


Web Developer
Find Out MoreJyra Amor started as a front-end developer whose passion for design combined with her thirst for continual learning and inspired her to study in Tuitt Coding Boot Camp, Philippines to become a full stack web developer.
Get Started!HTML, CSS, Javascript, JQuery, PHP, Laravel
Adobe Photoshop, Adobe Indesign
Github, Gitlab
Projects made with love!
Start your next project with me? That's great! Below are my contact number and my email and I will get back to you as soon as possible!
63<PHONE_NUMBER>


Image Hosting
Home
(current)
About
English
简体中文
繁體中文
Upload
Each image mustn't exceed 5 MB.
Posting
Usually less than 5 second.
Result
Example messages wrote here.
Post Progress:
60
%


A place for general developer talk – for everyone! | Documentation https://developers.komodoplatform.com | MoreDev Docs - https://docs.komodoplatform.com | Mastering CryptoConditions - https://github.com/KomodoPlatform/Mastering_CryptoConditions
100 messages
Before 05-Dec-19 12:00 AM
Bryan_Beus13-Nov-18 06:02 PM
The google doc doesn't have a sheet on it. I checked already.
Unless there's a separate google doc. But the one with tokens, channels, etc., doesn't have a tab for gateways.
jl777c13-Nov-18 06:02 PM
setting up the gateway is quite complex
Bryan_Beus13-Nov-18 06:02 PM
hmm
jl777c13-Nov-18 06:02 PM
using the gateway is much simpler
to use the gateway, you send a deposit transaction to the gateway deposit address
this will have the amount you are depositing and also a claim vout, which just has the destination address and a txfee amount
once you have a deposit txid from the external chain, then you make a gatewaysdeposit transaction with all the details about it. many different things and end users wont understand it
Bryan_Beus13-Nov-18 06:05 PM
Ok.
I will need the exact inputs and ouputs that a user would see in the terminal.
jl777c13-Nov-18 06:05 PM
but once you make a gatewaysdeposit tx, then when it confirms you will do a gatewaysclaim to claim the tokens
Bryan_Beus13-Nov-18 06:05 PM
hmm, I'm wondering how best to approach this
jl777c13-Nov-18 06:05 PM
after that you use the tokens, maybe transfer them, DEX them whatever. whoever owns the token can withdraw them
the withdraw process, requires to convert the token, doing a withdraw. then the gateway nodes process it and you get coins in the withdraw address
notice the deposit side, the depositor has control over the process, it is the depositors tx that gets the freely tradeable tokens into their claim address
for withdraw, you need to wait for the deposit address custodians to do an automated multisig withdraw
maybe it is best to describe things at a high level first, as realistically there will need to be automated GUI/TUI to do the gatewaysdeposit tx
Bryan_Beus13-Nov-18 06:09 PM
Yes, that is a much more digestible explanation...
Do we expect a dApp developer to want documentation for this?
Or is it just a CC-level developer that will want it?
jl777c13-Nov-18 06:14 PM
i think we would want to have various implementations of code that uses the gateway, in different languages
so the dapp developer could then issue the deposit, generate the gatewaysdeposit and gatewaysclaim tx on the external coin -> token side and a withdraw on the token -> external coin side of things
being able to automatically tokensize external crypto is quite useful
setting up the gateway is a whole different involved thing that is of interest to those that want to setup a gateway for a specific coin for their chain
Bryan_Beus13-Nov-18 06:16 PM
how deep do you think I need to go in this documentation that's streamlined for new devs?
jl777c13-Nov-18 06:17 PM
dapp devs or core CC devs?
Bryan_Beus13-Nov-18 06:17 PM
dapp devs
not core cc's
I'm not working on the latter -- too far over my head
jl777c13-Nov-18 06:17 PM
just the general usage and maybe we can use tonyL TUI as an example of how to use it
Bryan_Beus13-Nov-18 06:18 PM
okay, let's do that. We'll just have an explanation for how to use an existing gateway that's made available to them, and then have a link to some other documentation that teaches how to set one up from scratch, and mention that it's more challenging.
Does that work?
jl777c13-Nov-18 06:21 PM
sure
Bryan_Beus13-Nov-18 06:29 PM
ok
IndieBlock13-Nov-18 07:46 PM
Hey all!
I am back ^
Bryan_Beus13-Nov-18 08:06 PM
Hey!
@IndieBlock
The people you will want to talk with to get started are @dukeleto@emma@jl777c@ca333, @TonyL, @blackjok3r, @Alright, and a few others.
JL777 has put together a good documentation guide to get core CC developers started.
Developer and End user documentation. Contribute to KomodoPlatform/Documentation development by creating an account on GitHub.
Alright13-Nov-18 08:08 PM
What is it you're trying to do?
Bryan_Beus13-Nov-18 08:08 PM
Read through that and that should get you the basic idea.
From there, JL777 is the lead, but if you can find others who can help, it's good to involve them, so we don't use too much of his time.
@Alright, @IndieBlock is looking to see if he can write the Auction CC.
@TonyL
I don't have another node available at the moment.
If you are able to create one of those tabs in the google doc that has all of the rpc calls and all of their full responses, that would be great.
TonyL13-Nov-18 08:28 PM
Hmm there is a other parts in gateways setup needed (like a an oraclefeed dAPP) but list with only gatewaysCC RPC calls maybe useful as well yep
IndieBlock13-Nov-18 08:30 PM
@Bryan_Beus reading up now
thanks
1
Bryan_Beus13-Nov-18 08:47 PM
@TonyL
For the documentation I'm working on, do you think it would be better that I just take the step-by-step from the gateways documnetation and put it in? Or should I just do the unique rpc calls for gateways, and link to that step-by-step elsewhere?
I've never used it, and don't have the hardware at the moment to do so.
(Laptop is in an in-between state while changing operating systems, and is currently unusable.)
TonyL13-Nov-18 08:52 PM
Actually only RPC calls don't have much sense since you anyway need to create oracle, create and to convert token only for bind gateway
But RPC calls needs to be documented anyway
IndieBlock13-Nov-18 08:56 PM
^^ To clarify ide be happy to work on the Auction CC just reading documentation and picking around in repositories ^
bare with will jump back in when ready.
who was it that said they would work on a design?
jl777c13-Nov-18 08:58 PM
me
IndieBlock13-Nov-18 09:02 PM
Brilliant happy to work with you on this then
jl777c13-Nov-18 09:02 PM
there are two main types of auctions that need to be supported
one for the nonfungible tokens, which have a supply of 1
another would be for the ICO type of scenario where there are X amount of tokens for sale
there would be an auctioncreate rpc call to start the auction and based on its opreturn parameters, people can lock funds to bid
IndieBlock13-Nov-18 09:03 PM
Ill get a spec written/drawn up with the details you give me then you can confirm etc.
then ill work to that ^
jl777c13-Nov-18 09:04 PM
cancel to unlock the funds and at the end of the auction either get back their losing bid or whatever they bid on
something like that
IndieBlock13-Nov-18 09:04 PM
Sounds fairly straight forward.
jl777c13-Nov-18 09:05 PM
yes, once you are familiar with how to lock/unlock funds in the CC context
let me know when you are ready for more details
IndieBlock13-Nov-18 09:34 PM
No problems
Bryan_Beus14-Nov-18 12:53 AM
@TonyL
I'm working through the tutorial, cleaning it up etc. I will include it in the new streamlined docs.
I will still need you to document every rpc call available on the gateways contract, with a description of what it does, and a full example of its use, and the full returned value in the terminal.
TonyL14-Nov-18 01:04 AM
@Bryan_Beus added it to to-do list
1
Bryan_Beus14-Nov-18 01:38 AM
ok, thank you
Bryan_Beus14-Nov-18 02:56 AM
The streamlined documentation is almost complete:
https://siddhartha-komodo.github.io/slate/#introduction
Please review.
Also, if you've visited this before, make sure to clear your web browser's cache, as the temporary website I'm using doesn't do a good job of updating.
Developers, if you can please start using this and pointing out errors, that would be great. It just needs to be proof read and spot checked.
IndieBlock14-Nov-18 01:42 PM
Hey all, hows it going?
KomodoWorld14-Nov-18 01:57 PM
@IndieBlock I'm curious about how did you find about Komodo? What captured your attention?
IndieBlock14-Nov-18 01:58 PM
@KomodoWorld To be honest i read up on the project after seeing it on coinmarketcap and it grabbed my attention -- very interesting project.. after hodling some komo for a while i thought ide come offer my assistance
Bitcoin vaults have the potential to stop Bitcoin thefts from Bitcoin clients. This post answers some frequently asked questions about them.
the bounty is 2000 Kmd
IndieBlock14-Nov-18 02:08 PM
Talk about it after Auction CC ^^
(as discussed)
3
KomodoWorld14-Nov-18 02:17 PM
Bryan_Beus14-Nov-18 05:05 PM
@IndieBlock
Keep in mind, the notary node elections come up again at the end of Q1 2019.

For their services, notary nodes receive a mining advantage on the KMD main chain.
let me know if you have questions or would like to run.
Komodo. Contribute to KomodoPlatform/komodo development by creating an account on GitHub.
1
IndieBlock14-Nov-18 09:48 PM
Nice ^^
Alright14-Nov-18 09:50 PM
@IndieBlock stop by #kmdlabs when you have some time, we're doing some cool things. I made a chat dapp, @blackjok3r made "streamer" chains which allow permission chains for streaming arbitrary files, @smk762 - dracocanis ominator made a dapp that tracks his dog via GPS and posts location data on chain via oracles(edited)
STAKED is a platform for testing smart contracts(edited)
IndieBlock14-Nov-18 09:51 PM
Sounds awesome^^
Alright14-Nov-18 09:51 PM
purpose is to give a place for contract devs to source testers along with incentivizing testing
IndieBlock14-Nov-18 09:53 PM
Jumped over and said hey ^^
IndieBlock14-Nov-18 11:09 PM
@Bryan_Beus can you let me know when you have time for a chat?
Bryan_Beus15-Nov-18 03:55 AM
yep, just shoot me another dm
D.rabbani15-Nov-18 07:59 AM
hi there is there any way to stop komodod just komodod ? because i have been trying to stop it for the past hour in my local host just ./komodo-cli stop
but its still saying activating best chain
i have run the command ./komodo &


The Search Results module allows users to perform a search and view the search results. For sites with multiple languages, the search results will only include the current language.
All users who are authorized to view the module can view search results. Page Editors can customize the way results are displayed.
Installation Note: This module is pre-installed on the site.
The Search Results Module


Ocean [ah77], ocean, in Crystal Sea
Last updated Turn #118
Ocean [ah77], ocean, in Crystal Sea
------------------------------------------------------------------------
11: Pleasure Sloop [v5n], ship, 30 hulls, 1 rowing port, 90 sails, arrived
11: from Endless Plains [ag77], owner:
11: Dorothy [v1b], Pen, with 39 peasants, 30 soldiers, 94 sailors,
11: accompanied by:
11: Cindy [z1c], Pen, with eight peasants, one worker, 40 soldiers,
11: eight skirmishers
11: Banian [e7n], Imperial Empire, knight, the High Priest of the
11: Church of Eres [151], with 16 soldiers, ten angels
11: Drummond [x8q], Imperial Empire, with 30 soldiers
11: Roland [o6t], Imperial Empire, Bishop of the Church of
11: Anteus [152], with 34 soldiers, five angels
11: Fortuis [h1m], Imperial Empire, with 20 soldiers
12: Pleasure Sloop [v5n], ship, 30 hulls, 1 rowing port, 90 sails,
12: departed for Endless Plains [ai77].
30: It has stopped raining.
Routes leaving Ocean:
North, plain, to Endless Plains [ag77], Imperia, 2 days
East, to Ocean [ah78], 6 days
South, plain, to Endless Plains [ai77], Imperia, 2 days
West, plain, to Endless Plains [ah76], Imperia, 2 days
Inner locations:
Island [ac4s], island, 1 day


|
SideCar
|
General processing statistics of an IO::Task. More...
#include </Users/howes/src/sidecar/IO/Stats.h>
Public Member Functions | |
| Stats () | |
| Constructor. | |
| void | resetAll () |
| Reset the counters and rates to zero. | |
| void | resetDropDupeCounts () |
| void | updateInputCounters (size_t byteCount) |
| Update the held counters. More... | |
| void | updateInputCounters (size_t byteCount, uint32_t sequenceNumber) |
| Update the held counters. More... | |
| size_t | getByteRate () const |
| Obtain the last-calculated byte rate. More... | |
| size_t | getMessageRate () const |
| Obtain the last-calculated message rate. More... | |
| size_t | getMessageCount () const |
| Obtain the running message count. More... | |
| size_t | getDropCount () const |
| Obtain the total number of dropped messages found so far. More... | |
| size_t | getDupeCount () const |
| Obtain the total number of duplicate message IDs found so far. More... | |
| void | calculateRates () |
| Update the message and byte rates based on the elapsed time since the last update. | |
Static Public Member Functions | |
| static Logger::Log & | Log () |
| Obtain the log device to use for Stats objects. More... | |
General processing statistics of an IO::Task.
Records object and byte counts, and provides for calculating throughput rates in terms of messages and bytes.
|
inline |
Obtain the last-calculated byte rate.
Definition at line 53 of file Stats.h.
Referenced by SideCar::IO::Task::fillStatus().
|
inline |
Obtain the total number of dropped messages found so far.
Definition at line 71 of file Stats.h.
Referenced by SideCar::IO::Task::fillStatus().
|
inline |
Obtain the total number of duplicate message IDs found so far.
Definition at line 77 of file Stats.h.
Referenced by SideCar::IO::Task::fillStatus().
|
inline |
Obtain the running message count.
Definition at line 65 of file Stats.h.
Referenced by SideCar::IO::Task::fillStatus().
|
inline |
Obtain the last-calculated message rate.
Definition at line 59 of file Stats.h.
Referenced by SideCar::IO::Task::fillStatus().
|
static |
Obtain the log device to use for Stats objects.
Definition at line 11 of file Stats.cc.
References Logger::Log::Find().
Referenced by calculateRates(), and updateInputCounters().
| void Stats::updateInputCounters | ( | size_t | byteCount | ) |
Update the held counters.
| byteCount | number of bytes processed |
Definition at line 70 of file Stats.cc.
Referenced by updateInputCounters().
| void Stats::updateInputCounters | ( | size_t | byteCount, |
| uint32_t | sequenceNumber | ||
| ) |


TAKE-A-HIKE
HOME
PROFILE
Tag line.
STATE
Alabama
Alaska
Arizona
Arkansas
California
Colorado
Connecticut
Delaware
District Of Columbia
Florida
Georgia
Hawaii
Idaho
Illinois
Indiana
Iowa
Kansas
Kentucky
Louisiana
Maine
Maryland
Massachusetts
Michigan
Minnesota
Mississippi
Missouri
Montana
Nebraska
Nevada
New Hampshire
New Jersey
New Mexico
New York
North Carolina
North Dakota
Ohio
Oklahoma
Oregon
Pennsylvania
Rhode Island
South Carolina
South Dakota
Tennessee
Texas
Utah
Vermont
Virginia
Washington
West Virginia
Wisconsin
Wyoming
UPDATE PROFILE
Sign in or become a member to discover your next excursion!
We'll never share your email with anyone else.
Log in
Sign up
Log out


STSLiveEventListener
@interface STSLiveEventListener : NSObject
An instance of STSLiveEventListener is a means for listening live event from StraaS server.
-
The CCU of the current live.
Declaration
Objective-C
@property (readonly, nonatomic, nullable) NSNumber *ccu;
Swift
var ccu: NSNumber? { get }
-
The hit count of the current live.
Declaration
Objective-C
@property (readonly, nonatomic, nullable) NSNumber *hitCount;
Swift
var hitCount: NSNumber? { get }
-
The broadcast start time in millisecond.
nil
if the live stream is stopped.Declaration
Objective-C
@property (readonly, nonatomic, nullable) NSNumber *broadcastStartTimeInMS;
Swift
var broadcastStartTimeInMS: NSNumber? { get }
-
The id of the current live.
Declaration
Objective-C
@property (readonly, nonatomic, nullable) NSString *liveId;
Swift
var liveId: String? { get }
-
A boolean value indicates whether the STSLiveEventListener object is listening to the live event or not. This property is deprecated. Use
state
instead.Declaration
Objective-C
@property (readonly, nonatomic) BOOL isListening;
Swift
var isListening: Bool { get }
-
The state of the STSLiveEventListener.
Declaration
Objective-C
@property (readonly, nonatomic) STSLiveEventListenerState state;
Swift
var state: STSLiveEventListenerState { get }
-
The broadcast state of the live.
Declaration
Objective-C
@property (readonly, nonatomic) STSLiveBroadcastState broadcastState;
Swift
var broadcastState: STSLiveBroadcastState { get }
-
Creates a STSLiveEventListener with the given parameters.
This method can only be called after you configured application successfully (by calling
configureApplication:
method inSTSApplication
class), otherwise you will get a nil object.Declaration
Objective-C
- (nonnull instancetype) initWithWithJWT:(NSString *_Nullable)JWT delegate:(nonnull id<STSLiveEventListenerDelegate>)delegate;
Swift
init(withJWT JWT: String?, delegate: STSLiveEventListenerDelegate)
Parameters
JWT
The member token got from StraaS server. Set this parameter to
nil
if the member is a guest.delegate
The delegate of the STSLiveEventListener object.
Return Value
A newly STSLiveEventListener object.
-
Starts to listen to the live event with given live id.
Declaration
Objective-C
- (void)startWithLiveId:(nonnull NSString *)liveId success:(void (^_Nullable)(void))success failure:(void (^_Nullable)(NSError *_Nonnull))failure;
Swift
func start(withLiveId liveId: String, success: (() -> Void)?, failure: ((Error) -> Void)? = nil)
Parameters
liveId
The id of the live you want to listent its event.
success
A block object to be executed when the task finishes successfully.
failure
A block object to be executed when the task finishes unsuccessfully. This block has no return value and takes one argument: the error object describing the error that occurred.
-
Stop to listen to the change of the live.
Declaration
Objective-C
- (void)stop;
Swift
func stop()


What is your favorite color?
What is your favorite Season?
Submit


Welcome to the Easy Install Easy Inventory
Please Log In to continue.
Username
We'll never share your info with anyone else.
Password
Check me out
Submit


- +(91) 653 875
-<EMAIL_ADDRESS>Find your Home
For your next trip!
Book your room now
We do more than just hotels...
Hotels
750,926 hotels
Apartments
666,392 apartments
Resorts
17,828 resorts
Villas
360,791 villas
750,926 hotels
666,392 apartments
17,828 resorts
360,791 villas


TActiveRecordRelationContext holds information regarding record relationships such as record relation property name, query criteria and foreign object record class names.
This class is use internally by passing a context to the TActiveRecordRelation constructor.
Located in /Data/ActiveRecord/Relations/TActiveRecordRelationContext.php (line 26)
Creates and return the TActiveRecordRelation handler for specific relationships.
An instance of TActiveRecordHasOne, TActiveRecordBelongsTo, TActiveRecordHasMany, or TActiveRecordHasManyAssocation will be returned.
Documentation generated on Fri, 03 Jun 2011 16:22:43 +0200 by phpDocumentor 1.3.0RC4


Python source code: Au_6grains_pole_figure.py
from pymicro.crystal.microstructure import Microstructure, Grain, Orientation
from pymicro.crystal.texture import PoleFigure
from matplotlib import pyplot as plt, colors, cm
if __name__ == '__main__':
'''
Pole figure of a gold sample containing 6 grains with a strong <111> fiber texture.
A Microstructure object is first created with the 6 grains of interest.
The grain ids corerespond to the actual grain number (in an EBSD scan for instance).
A PoleFigure object is then created using this microstructure and the pole figures
(both direct and inverse) are drawn by calling the plot_pole_figures() method.
'''
micro = Microstructure(name='Au_6grains')
micro.grains.append(Grain(1158, Orientation.from_euler(np.array([344.776, 52.2589, 53.9933]))))
micro.grains.append(Grain(1349, Orientation.from_euler(np.array([344.899, 125.961, 217.330]))))
micro.grains.append(Grain(1585, Orientation.from_euler(np.array([228.039, 57.4791, 143.171]))))
micro.grains.append(Grain(1805, Orientation.from_euler(np.array([186.741, 60.333, 43.311]))))
micro.grains.append(Grain(1833, Orientation.from_euler(np.array([151.709, 55.0406, 44.1051]))))
micro.grains.append(Grain(2268, Orientation.from_euler(np.array([237.262, 125.149, 225.615]))))
# create pole figure (both direct and inverse)
pf = PoleFigure(hkl='111', axis='Z', proj='stereo', microstructure=micro)
pf.set_map_field('grain_id')
pf.pflegend = True # this works well for a few grains
pf.plot_pole_figures(plot_sst=True, display=False, save_as='png')
image_name = os.path.splitext(__file__)[0] + '.png'
print 'writting %s' % image_name
from matplotlib import image
image.thumbnail(image_name, 'thumb_' + image_name, 0.2)


Laguardia Community College
GPA: 3.702
Code the Dream
teamtreehouse.com
The love for science , mathematics , philosophy , critical thinking and drawing are things that have always motivated my thoughts and give me the energy to encounter all situations .
"It takes courage to grow up and become who you really are.” Famous quotation of the Americain poet Estlin Cummings .
which means that all of us have dreams and we want to accomplish our wishes, but dreams will came true only for those who keep doing , stand up and try again after failures, learn from mistakes ,stay humble and handle success when it came to us.
My main goal is to become a web programmer , work
with companies where I will use all the knowledge
that I learned to do great jobs.
Thank you for taking a time to read a little about my person.
<EMAIL_ADDRESS>Contact:+13476155308


As a developer, you are probably aware of Google Hosted Libraries. Google offers an easy and fast way to include 14 popular JavaScript libraries in your websites.
But what if you are a webmaster and you want take advantage of a fast CDN with other less popular projects too? Or if you are a developer and you want to make your project easier to access and use by other users?
This is where jsDelivr comes into play. jsDelivr is a free and open source CDN created to help developers and webmasters. There are no popularity restrictions and all kinds of files are allowed, including JavaScript libraries, jQuery plugins, CSS frameworks, fonts and more.


[the cutting edge ]
G'day Developers!
For the last month I have been driving through Germany, Italy, Austria and Croatia. I hired 3
different cars. Having mainly driven Toyotas, I was keen on experiencing some variety.
The 1st one was an Audi A6. It is beautiful piece of German engineering that I got up to
245km/hr without even feeling it. The only frustrating thing was learning how to use the
iPod like wheel that you have to spin.
To work the dial/wheel you first rotate it, attempt to navigate up and down through menus,
and press to select. You also have 4 buttons that surround the control which are very
difficult to work out when all the instructions are in German.
I also used a Mercedes SLK200 which was almost as nice except it also had the dial/wheel to
rotate and unfortunately a very small, iPhone sized navigation display.
The 3rd car I hired was a Kia only because my BMW fell through. The Kia unfortunately maxed
out at 165km/h on the autobahn but I quickly understood what all the buttons did.
So which car did I like the most?
Surprisingly, it wasn't the German engineering of the Audi or the Mercedes. It was the Kia.
"Why?" I hear you ask. Because, the Kia was the only one with a large touchscreen which made
using the GPS super easy :D
It surprised me. Does it surprise you? (Add a
comment on my blog)
P.S: What is an important user experience you want or don't want in your perfect car?
P.P.S: I'm glad Windows are giving us a first class touchscreen experience with Windows 8.
I'm waiting for a car that has a built in Microsoft Surface!
Adam Cogan
Got a comment for Adam?
Email
Adam
Adam's
blog
|


Basic sdl-srch-grid demo (using slots) with autoload="false"
Note: Type in search field to generate ajax call(s) to server.
Notice you can use any input type fields in the slot as well as any formatting you wish. We are using txt files for the ajax so don't be worried about the filtering not working;)
[[item.name]]
[[item.gender]]
[[item.eyeColor]]
Adding in a Selection Column with row-stripes w/autoload="false" & onchangeonly="true"
Note: You will have to type into the search field and hit enter to trigger the onchange/ajax request
[[item.name]]
[[item.gender]]
[[item.eyeColor]]
Smooth scrooling with 70,000 records!
Note: You need to type in search feild below to fill the grid -- because autoload="false"
Note: ajaxobjname="search" puts the formdata into an array object called 'search'
[[item._id]]
[[item.name]]
[[item.gender]]
[[item.eyeColor]]
Tree View using 'expandall' flag
[[item.name]]
[[item.gender]]
[[item.eyeColor]]
Editable grid Example
Note: Button clicks are intercepted in the 'grid-slot' and new events thrown to allow implementation of CRUD operations
Note: We are also using autoload="true" w/ initform='{"input99": "Hello World"}' to prefill the form and send the initial search.
Events thrown:
- sdl-srch-grid-add
- sdl-srch-grid-edit
- sdl-srch-grid-delete
- sdl-srch-grid-custom
- sdl-srch-grid-mouseover
- sdl-srch-grid-mouseout
[[item._id]]
[[item.name]]
[[item.gender]]


No vehicle added.
{{ vehicle.make + ' ' + vehicle.model }}
Reservations:
No reservation
Date: {{ reservation.startdate | date: 'short' }} -
{{ reservation.enddate | date: 'short' }}
Returned:{{ reservation.returned ? 'Yes' : 'No' }}


Select the element and hit Add to add it in form.
Textbox
Password
Radio
File
Number
Select
Textarea
Checkbox
Button
Submit
JSON


http://www.speakers-podium.com/susangranger.
Susan Granger's review of "EYES WIDE SHUT" (Warner Bros.)
Do you remember the fable: "The Emperor's New Clothes"? Because this film was made by the late Stanley Kubrick, because two of Hollywood's top stars devoted two years of their lives to its creation, because the "hype" has been so carefully orchestrated...few have dared to call this exquisitely photographed film what it is: shallow soft-core pornography. Despite Kubrick's meticulous direction, it's a wretchedly written, cliche-filled dirge about sexual obsession, based on Arthur Schnitzler's "Traumnovelle" (1926). The slow-paced story begins with Tom Cruise, as a Manhattan physician, and his wife, played by Nicole Kidman, preparing to attend a lavish Christmas party, hosted by Sydney Pollack. That evening, as she flirts with a suave Hungarian, he's hit on by two giggly models - until he's called upstairs by the host to revive yet another model who has overdosed. Later, while stoned, Kidman taunts Cruise with an erotic tale about a naval officer in Cape Cod. Reeling with jealousy, he indulges in his own angst-filled fantasy, involving a kinky tryst with a hooker and a sinister, masquerade orgy. And he flashes his doctor's ID card more often than an FBI agent. Why Kidman and Cruise chose to indulge in this heavy-handed, exhibitionistic carnal endeavor is best left to their personal therapists - and the gossip columnists. Sure, the color-drenched cinematography is stunning but, having said that, it's like leaving a Broadway musical singing the scenery. In evaluating Jocelyn Pook's moody score, a friend put it best commenting: "The music sounds as if were composed by a piano tuner, pounding on one note." On the Granger Movie Gauge of 1 to 10, "Eyes Wide Shut" is a perverted, pretentious, numbing 3. It may be deliberately depraved but you won't be deprived if you wait for the video.
The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews


3
Each caller gets a value back from the method it activated. The caller then uses this value in the addition and returns the result. The chain of activation "unwinds" as the values are returned.
int Triangle( int N ) { if ( N == 1 ) return 1; else return N + Triangle( N-1 ); }
Finally the very first activation gets a 6 back from the method it activated, so it computes a 10 and returns that to its caller.
After an activation has returned a value to its caller, it is no longer active and is removed from the chain of activations. The diagram does not show this.


Chiefs’ key men ahead of TKO semifinals
Under Ernst Middendorp, Kaizer Chiefs have been built to be a unit that fights together with little space for individual brilliance.
by Sibongiseni GumbiErnst Middendorp, head coach of Kaizer Chiefs (Photo by Lee Warren/Gallo Images)
This has seen them leave a trail of destruction in their wake especially in the Nedbank Cup where they have had to dig deep.
In their first-round game, Amakhosi had to come from behind against a hard-running Cape Town City team and they forced the game to extra time.
It was in the quarter-finals against Orlando Pirates where it ended 2-2 after extra time as they were made to sweat for their win which game after the penalty shootout.
Their semifinals opponent, Maritzburg United have also been on a good run ahead of the game and their confidence is sky-high. It will take Amakosi’s gallant efforts they have been dishing out as well as some individual brilliance for them to overcome Erick Tinkler’s side.
Here we look at players who will be key to the Glamour Boys sailing through to the final.
Daniel Cardoso
With his regular central defence partner, Erick Mathoho and goalkeeper Daniel Akpeyi out due to suspension, Cardoso will have to take the leadership role at the back. He will have to be vocal and command things with the young keeper Bruce Bvuma probably shy to take that role.
Lebogang Manyama
Manyama has been the quite man behind Amakhosi especially when in attack. His role is however clearly big to his teammates with Samir Nurkovic saying earlier in the week that he is an important part of the attack. His forward passes and ability to move into good spaces will be important again today.


If a value "creator" of board for delete is not null, then can delete by current logined user who is a administrator or id of logined user is equals to a value "creator".
$.api.board.deleteBoard({id : "test"});
| Variable's name | Variable's type | Description |
|---|---|---|
| id Required | String | Board's id |
| Variable's name | Variable's type | Description |
|---|---|---|
| code | Integer | Response code |
| message | Integer | Response message |


Title
Life is beautiful and there are always somethings attractive, which I love to engage
Second Title
Photography is one of my lifestyles, Photo records the world in another way.
Third Title
Programming is a habit. Emmet uses syntax similar to CSS selectors for describing elements’ positions inside generated tree and elements’ attributes.
Third Title
Nesting operators are used to position abbreviation elements inside generated tree: whether it should be placed inside or near the context element.
Another Title
Title Three
With ^ operator, you can climb one level up the tree and change context where following elements should appear
Title Three
With ^ operator, you can climb one level up the tree and change context where following elements should appear
Title Three
With ^ operator, you can climb one level up the tree and change context where following elements should appear
Title Three
With ^ operator, you can climb one level up the tree and change context where following elements should appear
Title Three
With ^ operator, you can climb one level up the tree and change context where following elements should appear
Title Three
With ^ operator, you can climb one level up the tree and change context where following elements should appear


About
Our Motive
The main motive behind building this project includes:
- Narrow down the Crime rates and ensure that law is enforced.
- Decreasing the assaults taking place on a daily basis thereby providing a safe environment to women and children so that they can feel a sense of security outside of their homes too.
- Reduce the labor and toil of human effort and automate the whole process.
Our Project is built with an aim to provide safety and security to all resedential areas and public areas. A real-time intelligent surveillance system was developed for home security with a vision to prevent all the assualt and mishappenings in and around the resedential areas and get immediate alerts of any breach of privacy and safety directly in your cell phones.
Violence takes a variety of forms including homicide, rape, robbery, assualt etc.
The incidents of Street Violence resonate through out the world and the women community is worst affected by the lack of an efficient monitoring system resulting in hostile situations.
- A survey conducted by Stop Street Harassment Report reveiled that 65% of women in US have experienced some kind of Street Violence
- In India, a woman faces harassment in public places every 51 minutes.
- According to National Crime Records Bureau (NCRB), there were 36,735 cases of rape across desolate streets and places.
The findings reveal that the public spaces of India suffer from a 'culture of misogny' indicating high prevalence of Street Violence that cut across all sections of women.
Lack of a Proper Surveillance system has affected every generation.
Innumerable children face abuse in public places which goes undetected and unreported due to the rigid and worn out process of CCTV cameras and all crimes are pushed deep down in oblivion.
- In 1994, an estimated 1.4 million people were treated in hospital emergency departments for violence-related injuries. Nearly one-half of all the injuries treated occurred in public buildings or on the street.
- In 2007, students between the ages of 12 to 18 were victims of about 1.5 million non-fatal crimes when they were at school, compared to about 1.1 million non-fatal crimes while they were away from school.
- Among high school students in grades 9-12, nearly 12% got into a fight on school property.
When Violence becomes the last refuge of Incompetent Householdes.
Domestic violence has serious economic, social and health consequences. It is an acute problem in India. NFHS data indicate that over 30% of Indian women have been physically, sexually or emotionally abused by their husbands at some point in their lives.
- Between 2004 and 2008, about 1 in 3 violent crimes occurred in or near the victim’s own home.
- Almost two thirds of all property crimes took place in or near the home of the household members.
- About 10% of personal thefts occurred in or near the victim’s home or the home of a friend or neighbor.
The Number and Underscore of Public Violence.
- From 1993- 1999, "Workplace Violence" accounted for 18% of all violent crime.
- According to NCVS, there are over 1.7 million victims of violence annually including 325,000 aggravated assaults, 36,500 rapes and sexual assaults, 70,000 robberies and 900 homicides.
- In 2019, FBI reported a total of 2,109.9 property crimes per 100,000 people.
TECH STACK
Tensorflow
For this project, we used TensorFlow: an end-to-end open source platform for machine learning with comprehensive and flexible tools, libraries and high-level APIs like Keras to build and train our ML model.
OPEN-CV
OpenCV (Open Source Computer Vision Library) is an open source computer vision library which was used to detect activities in a crowded area and narrow down the region of search.
Django
Django is a high-level Python web framework that enables rapid development of secure and maintainable websites. It is the core of our project that maintains a sync between all processes.
Team
Our Team


# The following comment should be removed at some point in the future. # mypy: strict-optional=False # mypy: disallow-untyped-defs=False from __future__ import absolute_import, division import contextlib import itertools import logging import sys import time from signal import SIGINT, default_int_handler, signal from pip._vendor import six from pip._vendor.progress import HIDE_CURSOR, SHOW_CURSOR from pip._vendor.progress.bar import Bar, FillingCirclesBar, IncrementalBar from pip._vendor.progress.spinner import Spinner from pip._internal.utils.compat import WINDOWS from pip._internal.utils.logging import get_indentation from pip._internal.utils.misc import format_size from pip._internal.utils.typing import MYPY_CHECK_RUNNING if MYPY_CHECK_RUNNING: from typing import Any, Iterator, IO try: from pip._vendor import colorama # Lots of different errors can come from this, including SystemError and # ImportError. except Exception: colorama = None logger = logging.getLogger(__name__) def _select_progress_class(preferred, fallback): encoding = getattr(preferred.file, "encoding", None) # If we don't know what encoding this file is in, then we'll just assume # that it doesn't support unicode and use the ASCII bar. if not encoding: return fallback # Collect all of the possible characters we want to use with the preferred # bar. characters = [ getattr(preferred, "empty_fill", six.text_type()), getattr(preferred, "fill", six.text_type()), ] characters += list(getattr(preferred, "phases", [])) # Try to decode the characters we're using for the bar using the encoding # of the given file, if this works then we'll assume that we can use the # fancier bar and if not we'll fall back to the plaintext bar. try: six.text_type().join(characters).encode(encoding) except UnicodeEncodeError: return fallback else: return preferred _BaseBar = _select_progress_class(IncrementalBar, Bar) # type: Any class InterruptibleMixin(object): """ Helper to ensure that self.finish() gets called on keyboard interrupt. This allows downloads to be interrupted without leaving temporary state (like hidden cursors) behind. This class is similar to the progress library's existing SigIntMixin helper, but as of version 1.2, that helper has the following problems: 1. It calls sys.exit(). 2. It discards the existing SIGINT handler completely. 3. It leaves its own handler in place even after an uninterrupted finish, which will have unexpected delayed effects if the user triggers an unrelated keyboard interrupt some time after a progress-displaying download has already completed, for example. """ def __init__(self, *args, **kwargs): """ Save the original SIGINT handler for later. """ super(InterruptibleMixin, self).__init__(*args, **kwargs) self.original_handler = signal(SIGINT, self.handle_sigint) # If signal() returns None, the previous handler was not installed from # Python, and we cannot restore it. This probably should not happen, # but if it does, we must restore something sensible instead, at least. # The least bad option should be Python's default SIGINT handler, which # just raises KeyboardInterrupt. if self.original_handler is None: self.original_handler = default_int_handler def finish(self): """ Restore the original SIGINT handler after finishing. This should happen regardless of whether the progress display finishes normally, or gets interrupted. """ super(InterruptibleMixin, self).finish() signal(SIGINT, self.original_handler) def handle_sigint(self, signum, frame): """ Call self.finish() before delegating to the original SIGINT handler. This handler should only be in place while the progress display is active. """ self.finish() self.original_handler(signum, frame) class SilentBar(Bar): def update(self): pass class BlueEmojiBar(IncrementalBar): suffix = "%(percent)d%%" bar_prefix = " " bar_suffix = " " phases = (u"\U0001F539", u"\U0001F537", u"\U0001F535") # type: Any class DownloadProgressMixin(object): def __init__(self, *args, **kwargs): super(DownloadProgressMixin, self).__init__(*args, **kwargs) self.message = (" " * (get_indentation() + 2)) + self.message @property def downloaded(self): return format_size(self.index) @property def download_speed(self): # Avoid zero division errors... if self.avg == 0.0: return "..." return format_size(1 / self.avg) + "/s" @property def pretty_eta(self): if self.eta: return "eta %s" % self.eta_td return "" def iter(self, it): for x in it: yield x self.next(len(x)) self.finish() class WindowsMixin(object): def __init__(self, *args, **kwargs): # The Windows terminal does not support the hide/show cursor ANSI codes # even with colorama. So we'll ensure that hide_cursor is False on # Windows. # This call needs to go before the super() call, so that hide_cursor # is set in time. The base progress bar class writes the "hide cursor" # code to the terminal in its init, so if we don't set this soon # enough, we get a "hide" with no corresponding "show"... if WINDOWS and self.hide_cursor: self.hide_cursor = False super(WindowsMixin, self).__init__(*args, **kwargs) # Check if we are running on Windows and we have the colorama module, # if we do then wrap our file with it. if WINDOWS and colorama: self.file = colorama.AnsiToWin32(self.file) # The progress code expects to be able to call self.file.isatty() # but the colorama.AnsiToWin32() object doesn't have that, so we'll # add it. self.file.isatty = lambda: self.file.wrapped.isatty() # The progress code expects to be able to call self.file.flush() # but the colorama.AnsiToWin32() object doesn't have that, so we'll # add it. self.file.flush = lambda: self.file.wrapped.flush() class BaseDownloadProgressBar(WindowsMixin, InterruptibleMixin, DownloadProgressMixin): file = sys.stdout message = "%(percent)d%%" suffix = "%(downloaded)s %(download_speed)s %(pretty_eta)s" # NOTE: The "type: ignore" comments on the following classes are there to # work around https://github.com/python/typing/issues/241 class DefaultDownloadProgressBar(BaseDownloadProgressBar, _BaseBar): pass class DownloadSilentBar(BaseDownloadProgressBar, SilentBar): # type: ignore pass class DownloadBar(BaseDownloadProgressBar, # type: ignore Bar): pass class DownloadFillingCirclesBar(BaseDownloadProgressBar, # type: ignore FillingCirclesBar): pass class DownloadBlueEmojiProgressBar(BaseDownloadProgressBar, # type: ignore BlueEmojiBar): pass class DownloadProgressSpinner(WindowsMixin, InterruptibleMixin, DownloadProgressMixin, Spinner): file = sys.stdout suffix = "%(downloaded)s %(download_speed)s" def next_phase(self): if not hasattr(self, "_phaser"): self._phaser = itertools.cycle(self.phases) return next(self._phaser) def update(self): message = self.message % self phase = self.next_phase() suffix = self.suffix % self line = ''.join([ message, " " if message else "", phase, " " if suffix else "", suffix, ]) self.writeln(line) BAR_TYPES = { "off": (DownloadSilentBar, DownloadSilentBar), "on": (DefaultDownloadProgressBar, DownloadProgressSpinner), "ascii": (DownloadBar, DownloadProgressSpinner), "pretty": (DownloadFillingCirclesBar, DownloadProgressSpinner), "emoji": (DownloadBlueEmojiProgressBar, DownloadProgressSpinner) } def DownloadProgressProvider(progress_bar, max=None): if max is None or max == 0: return BAR_TYPES[progress_bar][1]().iter else: return BAR_TYPES[progress_bar][0](max=max).iter ################################################################ # Generic "something is happening" spinners # # We don't even try using progress.spinner.Spinner here because it's actually # simpler to reimplement from scratch than to coerce their code into doing # what we need. ################################################################ @contextlib.contextmanager def hidden_cursor(file): # type: (IO[Any]) -> Iterator[None] # The Windows terminal does not support the hide/show cursor ANSI codes, # even via colorama. So don't even try. if WINDOWS: yield # We don't want to clutter the output with control characters if we're # writing to a file, or if the user is running with --quiet. # See https://github.com/pypa/pip/issues/3418 elif not file.isatty() or logger.getEffectiveLevel() > logging.INFO: yield else: file.write(HIDE_CURSOR) try: yield finally: file.write(SHOW_CURSOR) class RateLimiter(object): def __init__(self, min_update_interval_seconds): # type: (float) -> None self._min_update_interval_seconds = min_update_interval_seconds self._last_update = 0 # type: float def ready(self): # type: () -> bool now = time.time() delta = now - self._last_update return delta >= self._min_update_interval_seconds def reset(self): # type: () -> None self._last_update = time.time() class SpinnerInterface(object): def spin(self): # type: () -> None raise NotImplementedError() def finish(self, final_status): # type: (str) -> None raise NotImplementedError() class InteractiveSpinner(SpinnerInterface): def __init__(self, message, file=None, spin_chars="-\\|/", # Empirically, 8 updates/second looks nice min_update_interval_seconds=0.125): self._message = message if file is None: file = sys.stdout self._file = file self._rate_limiter = RateLimiter(min_update_interval_seconds) self._finished = False self._spin_cycle = itertools.cycle(spin_chars) self._file.write(" " * get_indentation() + self._message + " ... ") self._width = 0 def _write(self, status): assert not self._finished # Erase what we wrote before by backspacing to the beginning, writing # spaces to overwrite the old text, and then backspacing again backup = "\b" * self._width self._file.write(backup + " " * self._width + backup) # Now we have a blank slate to add our status self._file.write(status) self._width = len(status) self._file.flush() self._rate_limiter.reset() def spin(self): # type: () -> None if self._finished: return if not self._rate_limiter.ready(): return self._write(next(self._spin_cycle)) def finish(self, final_status): # type: (str) -> None if self._finished: return self._write(final_status) self._file.write("\n") self._file.flush() self._finished = True # Used for dumb terminals, non-interactive installs (no tty), etc. # We still print updates occasionally (once every 60 seconds by default) to # act as a keep-alive for systems like Travis-CI that take lack-of-output as # an indication that a task has frozen. class NonInteractiveSpinner(SpinnerInterface): def __init__(self, message, min_update_interval_seconds=60): # type: (str, float) -> None self._message = message self._finished = False self._rate_limiter = RateLimiter(min_update_interval_seconds) self._update("started") def _update(self, status): assert not self._finished self._rate_limiter.reset() logger.info("%s: %s", self._message, status) def spin(self): # type: () -> None if self._finished: return if not self._rate_limiter.ready(): return self._update("still running...") def finish(self, final_status): # type: (str) -> None if self._finished: return self._update("finished with status '%s'" % (final_status,)) self._finished = True @contextlib.contextmanager def open_spinner(message): # type: (str) -> Iterator[SpinnerInterface] # Interactive spinner goes directly to sys.stdout rather than being routed # through the logging system, but it acts like it has level INFO, # i.e. it's only displayed if we're at level INFO or better. # Non-interactive spinner goes through the logging system, so it is always # in sync with logging configuration. if sys.stdout.isatty() and logger.getEffectiveLevel() <= logging.INFO: spinner = InteractiveSpinner(message) # type: SpinnerInterface else: spinner = NonInteractiveSpinner(message) try: with hidden_cursor(sys.stdout): yield spinner except KeyboardInterrupt: spinner.finish("canceled") raise except Exception: spinner.finish("error") raise else: spinner.finish("done")