Download content from Pastebin itself.
971657
def _download_pastebin(self):
        """"""
        paste_id = self.url.split("/")[-1]
        url = "https://pastebin.com/raw/" + paste_id
        return self._download_raw(url)
569207
def download_sdk(url):
    """"""
    r = requests.get(url)
    r.raise_for_status()
    return StringIO(r.content)
342005
def paste(self,e):
        """ #(Control-v)
        if self.enable_win32_clipboard:
                txt=clipboard.get_clipboard_text_and_convert(False)
                txt=txt.split("\n")[0].strip("\r").strip("\n")
                log("paste: >%s<"%map(ord,txt))
                self.insert_text(txt)
        self.finalize()
258741
def get_content(self, uri, disable_proxy=False):
        """"""
        return self.get(uri=uri, disable_proxy=disable_proxy)
461534
def copy(string, **kwargs):
    """"""

    clip.OpenClipboard()
    clip.EmptyClipboard()
    clip.SetClipboardData(win32con.CF_UNICODETEXT, string) 
    clip.CloseClipboard()

    return
1230899
function getPasteBinHtml() {
        var html = '', pasteBinClones, i, clone, cloneHtml;

        // Since WebKit/Chrome might clone the paste bin when pasting
        // for example: <img style="float: right"> we need to check if any of them contains some useful html.
        // TODO: Man o man is this ugly. WebKit is the new IE! Remove this if they ever fix it!
        pasteBinClones = editor.dom.select('div[id=mcepastebin]');
        for (i = 0; i < pasteBinClones.length; i++) {
          clone = pasteBinClones[i];

          // Pasting plain text produces pastebins in pastebinds makes sence right!?
          if (clone.firstChild && clone.firstChild.id == 'mcepastebin') {
            clone = clone.firstChild;
          }

          cloneHtml = clone.innerHTML;
          if (html != pasteBinDefaultContent) {
            html += cloneHtml;
          }
        }

        return html;
      }
478207
def download(url, encoding='utf-8'):
    """"""
    import requests
    response = requests.get(url)
    response.encoding = encoding
    return response.text
1321971
def paste_buffer(pymux, variables):
    
    pane = pymux.arrangement.get_active_pane()
    pane.process.write_input(get_app().clipboard.get_data().text, paste=True)
1362218
def download(ctx):
    """"""
    settings.add_cli_options(ctx.cli_options, settings.TransferAction.Download)
    ctx.initialize(settings.TransferAction.Download)
    specs = settings.create_download_specifications(
        ctx.cli_options, ctx.config)
    del ctx.cli_options
    for spec in specs:
        blobxfer.api.Downloader(
            ctx.general_options, ctx.credentials, spec
        ).start()
132597
def paste(self):
        '''
        
        '''
        try:
            t = pygame.scrap.get(SCRAP_TEXT)
            if t:
                self.insert(t)
                return True
        except:
            # pygame.scrap is experimental, allow for changes
            return False
261504
def download_from_url(source, destination, progress=False, uncompress=False):
    """"""
    # Modules #
    from tqdm import tqdm
    import requests
    from autopaths.file_path import FilePath
    # Check destination exists #
    destination = FilePath(destination)
    destination.directory.create_if_not_exists()
    # Over HTTP #
    response = requests.get(source, stream=True)
    total_size = int(response.headers.get('content-length'))
    block_size = int(total_size/1024)
    # Do it #
    with open(destination, "wb") as handle:
        if progress:
            for data in tqdm(response.iter_content(chunk_size=block_size), total=1024): handle.write(data)
        else:
            for data in response.iter_content(chunk_size=block_size): handle.write(data)
    # Uncompress #
    if uncompress:
        with open(destination) as f: header = f.read(4)
        if header == "PK\x03\x04": unzip(destination, inplace=True)
        # Add other compression formats here
    # Return #
    return destination
402497
def download_dataset(tournament, unzip):
    """"""
    click.echo(napi.download_current_dataset(tournament=tournament, unzip=unzip))
1108388
def download(self, sub_url):
        """"""
        response = requests.get(sub_url, headers=self.headers).text
        soup = BS(response, 'lxml')
        downlink = self.base_url+soup.select('.download a')[0]['href']
        data = requests.get(downlink, headers=self.headers)
        z = zipfile.ZipFile(cStringIO.StringIO(data.content))
        srt_files = [f.filename for f in z.filelist
                     if f.filename.rsplit('.')[-1].lower() in ['srt', 'ass']]
        z.extract(srt_files[0], '/tmp/')
        return srt_files[0]
754664
def fill_clipboard(self, contents):
        
        Gdk.threads_enter()
        if Gtk.get_major_version() >= 3:
            self.clipBoard.set_text(contents, -1)
        else:
            self.clipBoard.set_text(contents)
        Gdk.threads_leave()
1288333
def _send_string_selection(self, string: str):
        """"""
        backup = self.clipboard.selection  # Keep a backup of current content, to restore the original afterwards.
        if backup is None:
            logger.warning("Tried to backup the X PRIMARY selection content, but got None instead of a string.")
        self.clipboard.selection = string
        self.__enqueue(self._paste_using_mouse_button_2)
        self.__enqueue(self._restore_clipboard_selection, backup)
352157
def paste_from_clipboard(self):
        
        to = self.get_current_path()
        if os.path.isfile(to):
            to = os.path.abspath(os.path.join(to, os.pardir))
        mime = QtWidgets.QApplication.clipboard().mimeData()

        paste_operation = None
        if mime.hasFormat(self._UrlListMimeData.format(copy=True)):
            paste_operation = True
        elif mime.hasFormat(self._UrlListMimeData.format(copy=False)):
            paste_operation = False
        if paste_operation is not None:
            self._paste(
                self._UrlListMimeData.list_from(mime, copy=paste_operation),
                to, copy=paste_operation)
653475
def Copy_to_Clipboard(self, event=None):
        ""
        bmp_obj = wx.BitmapDataObject()
        bmp_obj.SetBitmap(self.bitmap)

        if not wx.TheClipboard.IsOpened():
           open_success = wx.TheClipboard.Open()
           if open_success:
              wx.TheClipboard.SetData(bmp_obj)
              wx.TheClipboard.Close()
              wx.TheClipboard.Flush()