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__/base64.cpython-35.opt-1.pyc



���\�N�@swdZddlZddlZddlZddddddd	d
ddd
dddddddgZeefZdd�Zddd�Z	dddd�Z
dd�Zdd�Zej
dd�Zej
dd�Zdd�Zdd�Zd Zdadad!d	�Zddd"d
�Zd#d�Zdd$d�Zdadad%Zd&Zdddd'd(�Zd)dd*dd+dd,dd-d�Zd)dd,dd.d/d0d�Zd1Z da!da"da#dd2d
�Z$d3d�Z%d4Z&e&d5d6Z'd7d�Z(d8d�Z)d9d:�Z*d;d�Z+d<d=�Z,d>d�Z-d?d@�Z.dAdB�Z/dCdD�Z0e1dEkrse/�dS)FzDBase16, Base32, Base64 (RFC 3548), Base85 and Ascii85 data encodings�N�encode�decode�encodebytes�decodebytes�	b64encode�	b64decode�	b32encode�	b32decode�	b16encode�	b16decode�	b85encode�	b85decode�	a85encode�	a85decode�standard_b64encode�standard_b64decode�urlsafe_b64encode�urlsafe_b64decodecCs�t|t�rAy|jd�SWntk
r@td��YnXt|t�rT|Syt|�j�SWn+tk
r�td|j	j
�d�YnXdS)N�asciiz4string argument should contain only ASCII charactersz>argument should be a bytes-like object or ASCII string, not %r)�
isinstance�strr�UnicodeEncodeError�
ValueError�bytes_types�
memoryview�tobytes�	TypeError�	__class__�__name__)�s�r �6/opt/rh/rh-python35/root/usr/lib64/python3.5/base64.py�_bytes_from_decode_data"s

r"cCsBtj|�dd�}|dk	r>|jtjd|��S|S)aSEncode a byte string using Base64.

    s is the byte string to encode.  Optional altchars must be a byte
    string of length 2 which specifies an alternative alphabet for the
    '+' and '/' characters.  This allows an application to
    e.g. generate url or filesystem safe Base64 strings.

    The encoded byte string is returned.
    N�s+/���)�binascii�
b2a_base64�	translate�bytes�	maketrans)r�altchars�encodedr r r!r3sFcCstt|�}|dk	r?t|�}|jtj|d��}|rgtjd|�rgtjd��tj|�S)aDecode a Base64 encoded byte string.

    s is the byte string to decode.  Optional altchars must be a
    string of length 2 which specifies the alternative alphabet used
    instead of the '+' and '/' characters.

    The decoded string is returned.  A binascii.Error is raised if s is
    incorrectly padded.

    If validate is False (the default), non-base64-alphabet characters are
    discarded prior to the padding check.  If validate is True,
    non-base64-alphabet characters in the input result in a binascii.Error.
    Ns+/s^[A-Za-z0-9+/]*={0,2}$zNon-base64 digit found)	r"r'r(r)�re�matchr%�Error�
a2b_base64)rr*Zvalidater r r!rEscCs
t|�S)z�Encode a byte string using the standard Base64 alphabet.

    s is the byte string to encode.  The encoded byte string is returned.
    )r)rr r r!r]scCs
t|�S)aDecode a byte string encoded with the standard Base64 alphabet.

    s is the byte string to decode.  The decoded byte string is
    returned.  binascii.Error is raised if the input is incorrectly
    padded or if there are non-alphabet characters present in the
    input.
    )r)rr r r!rdss+/s-_cCst|�jt�S)z�Encode a byte string using a url-safe Base64 alphabet.

    s is the byte string to encode.  The encoded byte string is
    returned.  The alphabet uses '-' instead of '+' and '_' instead of
    '/'.
    )rr'�_urlsafe_encode_translation)rr r r!rrscCs%t|�}|jt�}t|�S)aXDecode a byte string encoded with the standard Base64 alphabet.

    s is the byte string to decode.  The decoded byte string is
    returned.  binascii.Error is raised if the input is incorrectly
    padded or if there are non-alphabet characters present in the
    input.

    The alphabet uses '-' instead of '+' and '_' instead of '/'.
    )r"r'�_urlsafe_decode_translationr)rr r r!r{s
s ABCDEFGHIJKLMNOPQRSTUVWXYZ234567cs�tdkr>dd�tD���fdd��D�ad�t|t�s_t|�j�}t|�d}|r�|td|�}t�}t	j
}t}x{tdt|�d�D]a}||||d�d�}|||d?||d	?d
@||d?d
@||d
@7}q�W|dkr>d
|dd�<nZ|dkr]d|dd�<n;|dkr|d|dd�<n|dkr�d|dd�<t|�S)zrEncode a byte string using Base32.

    s is the byte string to encode.  The encoded byte string is returned.
    NcSsg|]}t|f��qSr )r()�.0�ir r r!�
<listcomp>�s	zb32encode.<locals>.<listcomp>cs'g|]}�D]}||�qqSr r )r2�a�b)�b32tabr r!r4�s	�r�big��i��
r#s======��s====��s===�=i����������r$)�_b32tab2�_b32alphabetrrrr�lenr(�	bytearray�int�
from_bytes�range)rZleftoverr+rIZb32tab2r3�cr )r7r!r�s4		+c
CsWtdkr%dd�tt�D�at|�}t|�drPtjd��|dk	r�t|�}|jtj	dd|��}|r�|j
�}t|�}|jd�}|t|�}t�}t}x�t
d	t|�d�D]�}|||d�}d	}	y'x |D]}
|	d
>||
}	qWWn$tk
rYtjd�d�YnX||	jd
d�7}q�W|rM|	d
|K}	|	jd
d�}|d
kr�|dd�|dd�<n�|dkr�|dd�|dd�<na|dkr|dd�|dd�<n8|dkr>|dd�|dd�<ntjd��t|�S)a]Decode a Base32 encoded byte string.

    s is the byte string to decode.  Optional casefold is a flag
    specifying whether a lowercase alphabet is acceptable as input.
    For security purposes, the default is False.

    RFC 3548 allows for optional mapping of the digit 0 (zero) to the
    letter O (oh), and for optional mapping of the digit 1 (one) to
    either the letter I (eye) or letter L (el).  The optional argument
    map01 when not None, specifies which letter the digit 1 should be
    mapped to (when map01 is not None, the digit 0 is always mapped to
    the letter O).  For security purposes the default is None, so that
    0 and 1 are not allowed in the input.

    The decoded byte string is returned.  binascii.Error is raised if
    the input is incorrectly padded or if there are non-alphabet
    characters present in the input.
    NcSsi|]\}}||�qSr r )r2�k�vr r r!�
<dictcomp>�s	zb32decode.<locals>.<dictcomp>�zIncorrect paddings01�OrArr8zNon-base32 digit foundr9r#r@r>r?r=r$������rQrCrQrBrQ)�_b32rev�	enumeraterEr"rFr%r.r'r(r)�upper�rstriprGrJ�KeyError�to_bytes)r�casefoldZmap01�lZpadchars�decodedZb32revr3Zquanta�accrKZlastr r r!r	�sJ	

cCstj|�j�S)zrEncode a byte string using Base16.

    s is the byte string to encode.  The encoded byte string is returned.
    )r%ZhexlifyrU)rr r r!r
scCsLt|�}|r|j�}tjd|�r?tjd��tj|�S)a�Decode a Base16 encoded byte string.

    s is the byte string to decode.  Optional casefold is a flag
    specifying whether a lowercase alphabet is acceptable as input.
    For security purposes, the default is False.

    The decoded byte string is returned.  binascii.Error is raised if
    s were incorrectly padded or if there are non-alphabet characters
    present in the string.
    s	[^0-9A-F]zNon-base16 digit found)r"rUr,�searchr%r.Z	unhexlify)rrYr r r!rss<~s~>c	s�t|t�s!t|�j�}t|�d}|rF|d|}tjdt|�d�j|�}����fdd�|D�}|r�|r�|ddkr��dd	|d<|d
d|�|d<d
j|�S)Nr?sz!%dIcseg|][}�r|rdn?�r7|dkr7dn'�|d�|dd�|d�qS)�zi    �yi�^	�Ui9r )r2Zword)�chars�chars2�foldnuls�
foldspacesr r!r40s	z_85encode.<locals>.<listcomp>r#r^rr8�r$r$r$r$)	rrrrrF�struct�StructZunpack�join)	r6rarb�padrcrd�paddingZwords�chunksr )rarbrcrdr!�	_85encode&s&

rlrd�wrapcolri�adobecstdkr;dd�tdd�D�add�tD�at|tt|d|��|rft���r�t|r{dnd	�����fd
d�tdt����D�}|r�t|d�d�kr�|jd�d
j|��|r�t	7��S)aEncode a byte string using Ascii85.

    b is the byte string to encode. The encoded byte string is returned.

    foldspaces is an optional flag that uses the special short sequence 'y'
    instead of 4 consecutive spaces (ASCII 0x20) as supported by 'btoa'. This
    feature is not supported by the "standard" Adobe encoding.

    wrapcol controls whether the output should have newline ('\n') characters
    added to it. If this is non-zero, each output line will be at most this
    many characters long.

    pad controls whether the input string is padded to a multiple of 4 before
    encoding. Note that the btoa implementation always pads.

    adobe controls whether the encoded byte sequence is framed with <~ and ~>,
    which is used by the Adobe implementation.
    NcSsg|]}t|f��qSr )r()r2r3r r r!r4Us	za85encode.<locals>.<listcomp>�!�vcSs'g|]}tD]}||�qqSr )�	_a85chars)r2r5r6r r r!r4Vs	Tr>r#cs$g|]}�||���qSr r )r2r3)�resultrmr r!r4^s	rres
r$)
rqrJ�
_a85chars2rl�	_A85START�maxrF�appendrh�_A85END)r6rdrmrirnrkr )rrrmr!r>s"


�ignorecharss 	

cCst|�}|rX|jt�o-|jt�sHtdjtt���|dd�}tjd�j	}g}|j
}g}|j
}|j}	x6|dD]*}
d|
ko�dknrH||
�t|�dkr�d}x |D]}
d	||
d
}q�Wy|||��Wn$tj
k
r=td�d�YnX|	�q�|
dkrs|rftd��|d�q�|r�|
dkr�|r�td��|d�q�|
|kr�q�q�td|
��q�Wdj|�}dt|�}
|
r|d|
�}|S)acDecode an Ascii85 encoded byte string.

    s is the byte string to decode.

    foldspaces is a flag that specifies whether the 'y' short sequence should be
    accepted as shorthand for 4 consecutive spaces (ASCII 0x20). This feature is
    not supported by the "standard" Adobe encoding.

    adobe controls whether the input sequence is in Adobe Ascii85 format (i.e.
    is framed with <~ and ~>).

    ignorechars should be a byte string containing characters to ignore from the
    input. This should only contain whitespace characters, and by default
    contains all whitespace characters in ASCII.
    zAAscii85 encoded byte sequences must be bracketed by {!r} and {!r}r>z!I�ur?�!rr8r`rozAscii85 overflowNr^zz inside Ascii85 5-tuplesr_zy inside Ascii85 5-tuples    zNon-Ascii85 digit found: %crerRsuuuuro�u�z�y)r"�
startswithrt�endswithrwr�formatrfrg�packrv�clearrF�errorrh)r6rdrnrx�packIr[Zdecoded_appendZcurrZcurr_appendZ
curr_clear�xr\rrrjr r r!risP				




sU0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz!#$%&()*+-;<=>?@^_`{|}~cCsEtdkr2dd�tD�add�tD�at|tt|�S)z�Encode an ASCII-encoded byte array in base85 format.

    If pad is true, the input is padded with "\0" so its length is a multiple of
    4 characters before encoding.
    NcSsg|]}t|f��qSr )r()r2r3r r r!r4�s	zb85encode.<locals>.<listcomp>cSs'g|]}tD]}||�qqSr )�	_b85chars)r2r5r6r r r!r4�s	)r��_b85alphabet�
_b85chars2rl)r6rir r r!r�s	c
Cs�tdkr@dgdax$tt�D]\}}|t|<q&Wt|�}t|�d}|d|}g}tjd�j}x�tdt|�d�D]�}|||d�}d}y'x |D]}|dt|}q�WWnYt	k
r>xAt|�D]3\}}t|dkrt
d||�d�qW�YnXy|j||��Wq�tjk
r�t
d	|�d�Yq�Xq�Wd
j
|�}	|r�|	d|�}	|	S)z Decode base85-encoded byte arrayN�r8�~z!Irr`z#bad base85 character at position %dz+base85 overflow in hunk starting at byte %dre)�_b85decrTr�r"rFrfrgr�rJrrrvr�rh)
r6r3rKrj�outr��chunkr\�jrrr r r!r
�s<


�Lr?r@cCs�xy|jt�}|sPx@t|�tkr[|jtt|��}|sNP||7}qWtj|�}|j|�qWdS)z1Encode a file; input and output are binary files.N)�read�
MAXBINSIZErFr%r&�write)�input�outputr�ns�liner r r!r�scCs:x3|j�}|sPtj|�}|j|�qWdS)z1Decode a file; input and output are binary files.N)�readliner%r/r�)r�r�r�rr r r!r�scCs�yt|�}WnDtk
rV}z$d|jj}t|�|�WYdd}~XnX|jdkr�d|j|jjf}t|��|jdkr�d|j|jjf}t|��dS)	Nz"expected bytes-like object, not %srKr6�Bz-expected single byte elements, not %r from %sr#z(expected 1-D data, not %d-D data from %s)rKr6r�)rrrrr��ndim)r�m�err�msgr r r!�_input_type_checks"r�cCsjt|�g}xJtdt|�t�D]0}|||t�}|jtj|��q)Wdj|�S)zTEncode a bytestring into a bytestring containing multiple lines
    of base-64 data.rre)r�rJrFr�rvr%r&rh)r�piecesr3r�r r r!rs
cCs)ddl}|jdtd�t|�S)zLegacy alias of encodebytes().rNz7encodestring() is a deprecated alias, use encodebytes()r>)�warnings�warn�DeprecationWarningr)rr�r r r!�encodestrings	
r�cCst|�tj|�S)z6Decode a bytestring of base-64 data into a bytestring.)r�r%r/)rr r r!r's
cCs)ddl}|jdtd�t|�S)zLegacy alias of decodebytes().rNz7decodestring() is a deprecated alias, use decodebytes()r>)r�r�r�r)rr�r r r!�decodestring,s	
r�c	Cstddl}ddl}y)|j|jdd�d�\}}Wn`|jk
r�}z=|j|_t|�td|jd�|jd�WYdd}~XnXt}xa|D]Y\}}|dkr�t}|dkr�t	}|d	kr�t	}|d
kr�t
�dSq�W|rW|ddkrWt|dd��}|||jj�WdQRXn||j
j|jj�dS)
zSmall main programrNr#Zdeutz�usage: %s [-d|-e|-u|-t] [file|-]
        -d, -u: decode
        -e: encode (default)
        -t: encode and decode string 'Aladdin:open sesame'r>z-ez-dz-uz-t�-�rb)�sys�getopt�argvr��stderr�stdout�print�exitrr�test�open�buffer�stdin)	r�r�Zopts�argsr��func�or5�fr r r!�main5s0)
 r�cCsRd}tt|��t|�}tt|��t|�}tt|��dS)NsAladdin:open sesame)r��reprrr)Zs0�s1�s2r r r!r�Osr��__main__)2�__doc__r,rfr%�__all__r(rGrr"rrrrr)r0r1rrrErDrSrr	r
rrqrsrtrwrlrrr�r�r�r�rr
ZMAXLINESIZEr�rrr�rr�rr�r�r�rr r r r!�<module>sh	(K$+C*	
	


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.