Your IP : 216.73.216.134


Current Path : /opt/rh/rh-python35/root/lib64/python3.5/__pycache__/
Upload File :
Current File : //opt/rh/rh-python35/root/lib64/python3.5/__pycache__/tracemalloc.cpython-35.opt-1.pyc



���\=�@s`ddlmZmZddlmZddlZddlZddlZddl	Z	ddl
Tddl
mZmZdd�Z
Gdd	�d	�ZGd
d�d�Zdd
�ZeGdd�d��ZeGdd�de��Zdd�ZGdd�d�ZGdd�de�Zdd�ZGdd�d�ZGdd�d�Zdd�ZdS) �)�Sequence�Iterable)�total_orderingN)�*)�_get_object_traceback�_get_tracescCs�x�d
D]�}t|�dkrM|dkrM|r?d||fSd||fSt|�dksk|dkr�|rd||fSd||fS|d
}qWdS)N�B�KiB�MiB�GiB�TiB�dz%+.1f %sz%.1f %s�
iz%+.0f %sz%.0f %s)rr	r
rri()�abs)�sizeZsignZunit�r�;/opt/rh/rh-python35/root/usr/lib64/python3.5/tracemalloc.py�_format_size
s
rc@sdeZdZdZdZdd�Zdd�Zd	d
�Zdd�Zd
d�Z	dd�Z
dS)�	StatisticzS
    Statistic difference on memory allocations between two Snapshot instance.
    �	tracebackr�countcCs||_||_||_dS)N)rrr)�selfrrrrrr�__init__%s		zStatistic.__init__cCst|j|j|jf�S)N)�hashrrr)rrrr�__hash__*szStatistic.__hash__cCs4|j|jko3|j|jko3|j|jkS)N)rrr)r�otherrrr�__eq__-szStatistic.__eq__cCsYd|jt|jd�|jf}|jrU|j|j}|dt|d�7}|S)Nz%s: size=%s, count=%iFz, average=%s)rrrr)r�text�averagerrr�__str__2s
	zStatistic.__str__cCsd|j|j|jfS)Nz)<Statistic traceback=%r size=%i count=%i>)rrr)rrrr�__repr__<szStatistic.__repr__cCs|j|j|jfS)N)rrr)rrrr�	_sort_key@szStatistic._sort_keyN)z	tracebackzsizezcount)�__name__�
__module__�__qualname__�__doc__�	__slots__rrrrr r!rrrrrs
rc@sdeZdZdZdZdd�Zd	d
�Zdd�Zd
d�Zdd�Z	dd�Z
dS)�
StatisticDiffzd
    Statistic difference on memory allocations between an old and a new
    Snapshot instance.
    rr�	size_diffr�
count_diffcCs1||_||_||_||_||_dS)N)rrr(rr))rrrr(rr)rrrrKs
				zStatisticDiff.__init__cCs(t|j|j|j|j|jf�S)N)rrrr(rr))rrrrrRszStatisticDiff.__hash__cCsX|j|jkoW|j|jkoW|j|jkoW|j|jkoW|j|jkS)N)rrr(rr))rrrrrrVs
zStatisticDiff.__eq__cCsnd|jt|jd�t|jd�|j|jf}|jrj|j|j}|dt|d�7}|S)Nz %s: size=%s (%s), count=%i (%+i)FTz, average=%s)rrrr(rr))rrrrrrr]s
	zStatisticDiff.__str__cCs&d|j|j|j|j|jfS)Nz9<StatisticDiff traceback=%r size=%i (%+i) count=%i (%+i)>)rrr(rr))rrrrr iszStatisticDiff.__repr__cCs.t|j�|jt|j�|j|jfS)N)rr(rr)rr)rrrrr!nszStatisticDiff._sort_keyN)z	tracebackzsizez	size_diffzcountz
count_diff)r"r#r$r%r&rrrrr r!rrrrr'Dsr'cCs�g}x�|j�D]�\}}|j|d�}|dk	rrt||j|j|j|j|j|j�}n$t||j|j|j|j�}|j|�qWxG|j�D]9\}}t|d|jd|j�}|j|�q�W|S)Nr)�items�popr'rr�append)�	old_group�	new_group�
statisticsr�statZpreviousrrr�_compare_grouped_statsts r1c@s�eZdZdZdZdd�Zedd��Zedd��Zd	d
�Z	dd�Z
d
d�Zdd�Zdd�Z
dS)�Framez
    Frame of a traceback.
    �_framecCs
||_dS)N)r3)r�framerrrr�szFrame.__init__cCs|jdS)Nr)r3)rrrr�filename�szFrame.filenamecCs|jdS)N�)r3)rrrr�lineno�szFrame.linenocCs|j|jkS)N)r3)rrrrrr�szFrame.__eq__cCs|j|jkS)N)r3)rrrrr�__lt__�szFrame.__lt__cCs
t|j�S)N)rr3)rrrrr�szFrame.__hash__cCsd|j|jfS)Nz%s:%s)r5r7)rrrrr�sz
Frame.__str__cCsd|j|jfS)Nz<Frame filename=%r lineno=%r>)r5r7)rrrrr �szFrame.__repr__N)z_frame)r"r#r$r%r&r�propertyr5r7rr8rrr rrrrr2�sr2c@s�eZdZdZdZdd�Zdd�Zdd�Zd	d
�Zdd�Z	d
d�Z
dd�Zdd�Zdd�Z
ddd�ZdS)�	Tracebackz`
    Sequence of Frame instances sorted from the most recent frame
    to the oldest frame.
    �_framescCstj|�||_dS)N)rrr;)r�framesrrrr�s
zTraceback.__init__cCs
t|j�S)N)�lenr;)rrrr�__len__�szTraceback.__len__cCsBt|t�r-tdd�|j|D��St|j|�SdS)Ncss|]}t|�VqdS)N)r2)�.0�tracerrr�	<genexpr>�sz(Traceback.__getitem__.<locals>.<genexpr>)�
isinstance�slice�tupler;r2)r�indexrrr�__getitem__�szTraceback.__getitem__cCs|j|jkS)N)r3r;)rr4rrr�__contains__�szTraceback.__contains__cCs
t|j�S)N)rr;)rrrrr�szTraceback.__hash__cCs|j|jkS)N)r;)rrrrrr�szTraceback.__eq__cCs|j|jkS)N)r;)rrrrrr8�szTraceback.__lt__cCst|d�S)Nr)�str)rrrrr�szTraceback.__str__cCsdt|�fS)Nz<Traceback %r>)rD)rrrrr �szTraceback.__repr__NcCs�g}|dk	r"|dkr"|Sxj|d|�D]X}|jd|j|jf�tj|j|j�j�}|r3|jd|�q3W|S)Nrz  File "%s", line %sz    %s)r,r5r7�	linecache�getline�strip)r�limit�linesr4�linerrr�format�s	zTraceback.format)z_frames)r"r#r$r%r&rr>rFrGrrr8rr rOrrrrr:�sr:cCs*t|�}|dk	r"t|�SdSdS)z�
    Get the traceback where the Python object *obj* was allocated.
    Return a Traceback instance.

    Return None if the tracemalloc module is not tracing memory allocations or
    did not trace the allocation of the object.
    N)rr:)�objr<rrr�get_object_traceback�s
rQc@s|eZdZdZdZdd�Zedd��Zedd��Zd	d
�Z	dd�Z
d
d�Zdd�ZdS)�Tracez"
    Trace of a memory block.
    �_tracecCs
||_dS)N)rS)rr@rrrr�szTrace.__init__cCs|jdS)Nr)rS)rrrrr�sz
Trace.sizecCst|jd�S)Nr6)r:rS)rrrrr�szTrace.tracebackcCs|j|jkS)N)rS)rrrrrrszTrace.__eq__cCs
t|j�S)N)rrS)rrrrrszTrace.__hash__cCsd|jt|jd�fS)Nz%s: %sF)rrr)rrrrr	sz
Trace.__str__cCsdt|jd�|jfS)Nz<Trace size=%s, traceback=%r>F)rrr)rrrrr szTrace.__repr__N)z_trace)
r"r#r$r%r&rr9rrrrrr rrrrrR�srRc@sXeZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
S)�_TracescCstj|�||_dS)N)rr�_traces)r�tracesrrrrs
z_Traces.__init__cCs
t|j�S)N)r=rU)rrrrr>sz_Traces.__len__cCsBt|t�r-tdd�|j|D��St|j|�SdS)Ncss|]}t|�VqdS)N)rR)r?r@rrrrAsz&_Traces.__getitem__.<locals>.<genexpr>)rBrCrDrUrR)rrErrrrFsz_Traces.__getitem__cCs|j|jkS)N)rSrU)rr@rrrrG sz_Traces.__contains__cCs|j|jkS)N)rU)rrrrrr#sz_Traces.__eq__cCsdt|�S)Nz<Traces len=%s>)r=)rrrrr &sz_Traces.__repr__N)	r"r#r$rr>rFrGrr rrrrrTsrTcCs5tjj|�}|jd�r1|dd�}|S)Nz.pycr6���)�os�path�normcase�endswith)r5rrr�_normalize_filename*sr\c@sXeZdZdddd�Zedd��Zdd�Zd	d
�Zdd�ZdS)
�FilterNFcCs.||_t|�|_||_||_dS)N)�	inclusiver\�_filename_patternr7�
all_frames)rr^�filename_patternr7r`rrrr2s		zFilter.__init__cCs|jS)N)r_)rrrrra9szFilter.filename_patterncCsIt|�}tj||j�s%dS|jdkr8dS||jkSdS)NFT)r\�fnmatchr_r7)rr5r7rrrZ
__match_frame=szFilter.__match_framecCs|j||�|jAS)N)�_Filter__match_framer^)rr5r7rrr�_match_frameFszFilter._match_framecs^�jr:t�fdd�|D��r/�jS�jSn |d\}}�j||�SdS)Nc3s'|]\}}�j||�VqdS)N)rc)r?r5r7)rrrrAKsz*Filter._match_traceback.<locals>.<genexpr>r)r`�anyr^rd)rrr5r7r)rr�_match_tracebackIs	
zFilter._match_traceback)	r"r#r$rr9rarcrdrfrrrrr]1s
	r]c@s�eZdZdZdd�Zdd�Zedd��Zdd	�Zd
d�Z	dd
�Z
ddd�Zddd�ZdS)�SnapshotzB
    Snapshot of traces of memory blocks allocated by Python.
    cCst|�|_||_dS)N)rTrV�traceback_limit)rrVrhrrrrZszSnapshot.__init__cCs3t|d��}tj||tj�WdQRXdS)z1
        Write the snapshot into a file.
        �wbN)�open�pickle�dumpZHIGHEST_PROTOCOL)rr5�fprrrrl`sz
Snapshot.dumpc	Cs*t|d��}tj|�SWdQRXdS)z.
        Load a snapshot from a file.
        �rbN)rjrk�load)r5rmrrrrogsz
Snapshot.loadcs`|d�|r3t�fdd�|D��s3dS|r\t�fdd�|D��r\dSdS)Nr6c3s|]}|j��VqdS)N)rf)r?�trace_filter)rrrrArsz)Snapshot._filter_trace.<locals>.<genexpr>Fc3s|]}|j��VqdS)N)rf)r?rp)rrrrAvsT)re)r�include_filters�exclude_filtersr@r)rr�
_filter_traceos


zSnapshot._filter_tracecs�t|t�s(tdt|�j��|r�g�g�x4|D],}|jr`�j|�qA�j|�qAW���fdd��jjD�}n�jjj	�}t
|�j�S)z�
        Create a new Snapshot instance with a filtered traces sequence, filters
        is a list of Filter instances.  If filters is an empty list, return a
        new Snapshot instance with a copy of the traces.
        z)filters must be a list of filters, not %scs+g|]!}�j��|�r|�qSr)rs)r?r@)rrrqrrr�
<listcomp>�s		z*Snapshot.filter_traces.<locals>.<listcomp>)rBr�	TypeError�typer"r^r,rVrU�copyrgrh)r�filtersrpZ
new_tracesr)rrrqrr�
filter_traces{s
	(zSnapshot.filter_tracescCsG|dkrtd|f��|rA|d	krAtd|��i}i}|sTx�|jjD]�}|\}}y||}Wnstk
r�|dkr�|}	n6|dkr�|dd�}	n|dddff}	t|	�}|||<YnXy,||}
|
j|7_|
jd7_Wq`tk
rLt||d�||<Yq`Xq`Wn�x�|jjD]�}|\}}x�|D]�}y||}WnStk
r�|dkr�|f}	n|ddff}	t|	�}|||<YnXy,||}
|
j|7_|
jd7_Wqztk
r:t||d�||<YqzXqzWqaW|S)
Nrr5r7zunknown key_type: %rz/cumulative mode cannot by used with key type %rr6r)z	traceback�filename�lineno)r{rz)�
ValueErrorrVrU�KeyErrorr:rrr)r�key_type�
cumulativeZstatsZ
tracebacksr@rZtrace_tracebackrr<r0r4rrr�	_group_by�sX

	

"



#zSnapshot._group_byFcCsA|j||�}t|j��}|jdddtj�|S)zd
        Group statistics by key_type. Return a sorted list of Statistic
        instances.
        �reverseT�key)r��list�values�sortrr!)rr~rZgroupedr/rrrr/�szSnapshot.statisticscCsP|j||�}|j||�}t||�}|jdddtj�|S)z�
        Compute the differences with an old snapshot old_snapshot. Get
        statistics as a sorted list of StatisticDiff instances, grouped by
        group_by.
        r�Tr�)r�r1r�r'r!)rZold_snapshotr~rr.r-r/rrr�
compare_to�s
zSnapshot.compare_toN)
r"r#r$r%rrl�staticmethodrorsryr�r/r�rrrrrgUs3
rgcCs4t�std��t�}t�}t||�S)zI
    Take a snapshot of traces of memory blocks allocated by Python.
    zLthe tracemalloc module must be tracing memory allocations to take a snapshot)Z
is_tracing�RuntimeErrorrZget_traceback_limitrg)rVrhrrr�
take_snapshot�s
			r�)�collectionsrr�	functoolsrrbrIZos.pathrXrkZ_tracemallocrrrrr'r1r2r:rQrRrTr\r]rgr�rrrr�<module>s*
&0#5!$�

Rosenblum TV: Video training, virtual workshops, classes, tutorials
logologologologo
  • About
  • What We Do
  • Our Clients
  • Case Studies
    • The BBC
    • CBS News
    • New York Times Television
    • Spectrum News
    • The Newark Star-Ledger
    • The United Nations
    • McGraw/Hill
    • Oyster Yachts
    • Scottish Environmental Protection Agency
  • The Power of Storytelling
  • Why iPhones?
  • Michael on Media
  • Books
  • Contact
  • About
  • What We Do
  • Our Clients
  • Case Studies
    • The BBC
    • CBS News
    • New York Times Television
    • Spectrum News
    • The Newark Star-Ledger
    • The United Nations
    • McGraw/Hill
    • Oyster Yachts
    • Scottish Environmental Protection Agency
  • The Power of Storytelling
  • Why iPhones?
  • Michael on Media
  • Books
  • Contact

RE-INVENTING THE TELEVISION NEWS BUSINESS*

A revolution in video storytelling

Creating entirely new & cost-effective production methods

From the world leaders in video production training and the creators of Character Driven Storytelling™

*and every other business that uses video

WHAT WE DO

Over the past 35 years, we have designed, built or restructured some of the most powerful news and journalism companies in the world.

We replace the traditional TV news ‘crew’ with one highly trained journalist, working alone with nothing but an iPhone.

No more TV news ‘crews’, no editors and no field producers.

This is television news done the way newspaper journalism is done – one reporter with their electronic pad and pencil.

In doing this, we can cut the cost of production by as much as 75% while increasing ratings and audience engagement.

In the place of conventional TV news ‘packages’ – ie, reporter stand up, interview, b-roll, man on the street, we marry great journalism with Netflix and Hollywood storytelling.

It’s a combination that works.

We have taken most of our clients to #1 in their respective markets.

And it’s not just for news. Any company, any profit, any NGO and anyone else who is online needs to tell their story in compelling yet cost-effective video. We can teach you to do that. Either in person or virtually.

EXAMPLES OF WHAT WE CAN TEACH YOUR STAFF TO PRODUCE

ITAY HOD

Itay Hod, MMJ with KPIX/CBS in San Francisco, took the 5-Day Intensive Video Storytelling Bootcamp in 2018.

Because he works alone, with only an iPhone, he was able to embed himself with a homeless family.

Here’s the story he produced in a one-day turn.

KIET DO

Kiet Do, an MMJ with KPIX/CBS in San Francisco, took the 5-Day Intensive Video Storytelling Bootcamp in 2021.

Here is a story he produced, all on his own, with only an iPhone and in a one-day turn.

TAYLOR SCHAUB

Taylor Schaub, an MMJ with Spectrum News 1 in LA, took the 5-Day Intensive Video Storytelling Bootcamp in 2023.

Here is a story he turned in only one day, using only an iPhone. It was the first video story he ever did and it was nominated for an Emmy.

THE BOOTCAMP

How do we convert stations and whole networks to working in this way?

Since 1988, we have run intensive 5-Day Video Storytelling Bootcamps

We have done these all over the world.

These are hands-on bootcamps, and participants learn an entirely new way of creating TV news stories.

-We shoot at a 3:1 ratio or lower, so turnaround times are fast.

-We go directly from camera to timelilne and edit – no written scripts.  We work in the medium of pictures and sound.

-We are entirely character-driven.

-We are driven by pictures and real events.

-We are focused almost entirely on ’the viewer experience’.

Since 1988, more than 70,000 journalists around the world have taken our bootcamps, either in person on virtualy.

Case Studies

CBS Case Study Logos
CBS News

We have started to work with CBS News, bringing our ideas of character-driven storytelling to one of the most successful and biggest networks in the United States. Since beginning to work with them ratings have climbed and more importantly, audience engagement is through the ceiling.

Learn More
NYT Case Study Logos
New York Times Television

We started New York Times Television in 1990 and it was the first paper to be brought into the world of TV. It quickly became one of the most successful non-fiction production companies in the United States. The series and documentaries we produced won many awards including multiple Emmys.

Learn More
BBC Case Study Logos
The BBC

We have been working with the BBC since the year 2000 helping to convert their national news network to our visual storytelling technique. Most recently we have trained teams from their sports, documentaries, and comedy divisions to make character-driven stories using only smartphones.

Learn More
Spectrum Case Study Logos
Spectrum News

For the past five years we have worked with Spectrum News to introduce and train their journalists on visual, character driven storytelling using smartphones helping to create a different kind of local news for their network of 24-Hour News Stations across the United States.

Learn More
UN Case Study Logos
The United Nations

In 2006, we were approached by the United Nations. Rather than rely on news outlets, it would be much easier to train the field operatives to produce their own stories. We spent two years working with the UN, training more than 100 of their staff in bootcamps in Geneva and Nairobi.

Learn More
Star Ledger Case Study Logos
The Newark Star-Ledger

We trained 50 print reporters at the paper to shoot and tell their own stories, in conjunction with their print work. We built a TV newsroom in their existing print newsroom – you could not ask for a better set and they began to live stream their stories in conjunction with their print work.

Learn More
Mcgraw Hill Case Study Logos
Mcgraw Hill

We spent two years with McGraw Hill, training more than 150 of their staffers, making them completely video literate. McGraw/Hill media properties we transit included Business Week, Aviation Week, (what was the name of the architecture magazine), and JD Power and Associates.

Learn More
VOA Case Study Logos
Voice of America

In 1990, we were approached by The Voice of America, the official broadcasting agency for the United States Government. When we met with VOA, they were only a short wave radio broadcaster, but working with them, we took them into television, launching VOA-TV.

Learn More
Oyster Case Study Logos
Oyster Yachts

British based Oyster Yachts makes some of the finest yachts in the world. Like every other company, they had to find a way to feed the never-ending video demands of social media – sites like Instagram and TikTok. We trained the Oyster staff to tell their own stories, using only iPhones.

Learn More
SEPA Case Study Logos
Scottish Environmental Protection Agency

We were approached by SEPA, the Scottish Environmental Protection Agency because they had to continually find a way to ‘feed the media beast’. The result was that SEPA was able to tell their own stories, whenever they wanted, and at almost no additional cost.

Learn More
Image 11-11-22 at 6.25 PM

Michael on Media

Michael Rosenblum has been writing about the media since 1988. His work and ideas have appeared in The Guardian, The Huffington Post, Ilkeston Life and many other publications.

He has been blogging regularly for the past 35 years on this subject. Having taught media studies at Columbia University, NYU and now the University of Oxford, he is considered an expert on this subject.

Continue reading this post or look back at previous posts.

Read More

Do You Have Questions About Learning Video Skills?

If you would like to know more about our courses contact us and one of our training advisors will be happy to call you.

Contact Us

Copyright 2024. All rights reserved.