View of the archives page.
433344
def archives_view(request):
    
    page_name = "Archives"
    nodes, render_list = [], []
    for add_context_str in settings.BASE_ARCHIVE_FUNCTIONS:
        module, fun = add_context_str.rsplit(".", 1)
        add_context_fun = getattr(import_module(module), fun)
        # add_context should return list of (title, url icon, number)
        node_lst, icon_list = add_context_fun(request)
        nodes += node_lst
        render_list += icon_list

    return render_to_response('archives.html', {
        "page_name": page_name,
        "render_list": render_list,
        "nodes": nodes,
        }, context_instance=RequestContext(request))
285824
public function index()
    {

        $logs = $this->log_collection;
        $markdown = Storage::disk('markdown')->allFiles();
        $env = $this->env->getContent();
        return view('page::admin.index', compact('logs', 'markdown', 'env'));
    }
510036
public function viewArchive($request)
    {
        $year = $request->param('Year');
        $month = $request->param('Month');


        $this->blogPosts = $this->getArchives();

        if (!$this->blogPosts->count()) {
            return $this->httpError(404);
        }

        $title = $year;
        if ($month) {
            $title = $month . '/' . $year;
        }

        $orig_title = $this->dataRecord->Title;

        $this->Title = 'Archived posts for "' . $title . '" | ' . $orig_title;

        $this->ArchivePeriod = $title;

        return $this->render();
    }
9463
def data_from_archive(self):
        
        archive_data = {}

        archive_data['runtime_deps'] = self.runtime_deps
        archive_data['build_deps'] = [
            ['BuildRequires', 'python2-devel']] + self.build_deps

        archive_data['py_modules'] = self.py_modules
        archive_data['scripts'] = self.scripts

        archive_data['home_page'] = self.home_page
        archive_data['description'] = self.description
        archive_data['summary'] = self.summary

        archive_data['license'] = self.license
        archive_data['has_pth'] = self.has_pth
        archive_data['has_extension'] = self.has_extension
        archive_data['has_test_suite'] = self.has_test_suite

        archive_data['python_versions'] = self.versions_from_archive

        (archive_data['doc_files'],
         archive_data['doc_license']) = self.separate_license_files(
             self.doc_files)

        archive_data['dirname'] = self.archive.top_directory

        return archive_data
219832
def archive(self):
        
        args = {'id': self.id}
        _perform_command(self.owner, 'project_archive', args)
        self.is_archived = '1'
1294975
private Collection<Node> collectPersistenceXml(final Archive<?> archive) {
        final Collection<Node> nodes = new LinkedList<Node>(getPersistenceDescriptors(archive));
        for (Node node : collectSubArchives(archive)) {
            if (node.getAsset() instanceof ArchiveAsset) {
                final ArchiveAsset archiveAsset = (ArchiveAsset) node.getAsset();
                nodes.addAll(collectPersistenceXml(archiveAsset.getArchive()));
            }
        }
        return nodes;
    }
634674
function archive() {
            vm.error = undefined;
            var promises = [];
            vm.todos.filter(function (todo) {
                return todo.completed;
            }).forEach(function (todo) {
                promises.push(_archive(todo));
            });

            $q.all(promises).then(function () {
                _fetch();
            }).catch(function () {
                vm.error = 'An error occurred when archiving completed todos';
            });
        }
380766
def channels_archive(self, room_id, **kwargs):
        """"""
        return self.__call_api_post('channels.archive', roomId=room_id, kwargs=kwargs)
97146
function _storeDatemode()
    {
        $record    = 0x0022;         // Record identifier
        $length    = 0x0002;         // Bytes to follow

        $f1904     = $this->_1904;   // Flag for 1904 date system

        $header    = pack("vv", $record, $length);
        $data      = pack("v", $f1904);
        $this->_append($header . $data);
    }
415099
def render_archive(entries):
    """"""
    context = GLOBAL_TEMPLATE_CONTEXT.copy()
    context['entries'] = entries
    _render(context, 'archive_index.html',
            os.path.join(CONFIG['output_to'], 'archive/index.html')),
511398
def archive(context, clear_log, items, path, name):
    
    history_log = context.obj['history_log']
    no_color = context.obj['no_color']

    with open(history_log, 'r') as f:
        # Get history items
        history_items = f.readlines()

    if items:
        # Split comma separated list and cast indices to integer.
        items = [int(item) for item in items.split(',')]

        lines = []
        for index in items:
            lines.append(history_items[len(history_items) - index])
        history_items = lines

    with tempfile.TemporaryDirectory() as temp_dir:
        for item in history_items:
            # Copy log and results file,
            # update results file with relative path.
            archive_history_item(item, temp_dir, no_color)

        file_name = ''.join([name, '.tar.gz'])
        archive_path = os.path.join(path, file_name)

        with tarfile.open(archive_path, "w:gz") as tar:
            # Create tar archive
            tar.add(temp_dir, arcname='results')

    if clear_log:
        if items:
            # Remove duplicates to prevent unwanted deletion.
            items = list(set(items))

            # Must delete items from bottom to top of history file
            # to preserve indices. (Index 0 is last item in file)
            items.sort()
            for index in items:
                context.invoke(delete, item=index)
        else:
            context.invoke(clear)

    click.echo(
        'Exported results history to archive: {0}'.format(archive_path)
    )
1312739
def check_archive_ext (archive):
    """"""
    if not archive.lower().endswith(".dms"):
        rest = archive[-4:]
        msg = "xdms(1) archive file must end with `.dms', not `%s'" % rest
        raise util.PatoolError(msg)
17845
public void setArchiveStatus(com.google.api.ads.admanager.axis.v201805.ArchiveStatus archiveStatus) {
        this.archiveStatus = archiveStatus;
    }
942241
def files_view(request):
    """"""

    hosts = Host.objects.visible_to_user(request.user)

    context = {"hosts": hosts}
    return render(request, "files/home.html", context)
672599
def view_context(self):
        
        url = self.get_selected_item().get('context')
        if url:
            self.selected_page = self.open_submission_page(url)
682791
private function InitArticles()
    {
        $this->archive = Archive::Schema()->ByPage($this->CurrentPage());
        if ($this->archive) 
        {
            $this->InitArchiveArticles();
            return;
        }
        $this->category = Category::Schema()->ByPage($this->CurrentPage());
        if ($this->category)
        {
            $this->archive = $this->category->GetArchive();
            $this->InitCategoryArticles();
        }
    }
71243
def story_archive(request, slug, template_name='staffmembers/story_archive.html'):
    
    member = get_object_or_404(StaffMember, slug__iexact=slug, is_active=True)

    stories = []
    if hasattr(member, 'story_set'):
        from story.settings import PUBLISHED_STATUS
        stories = member.story_set.filter(publish_date__lte=datetime.now()
            ).filter(status__exact=PUBLISHED_STATUS
            ).order_by('-publish_date')

    return render_to_response(template_name,
                              {'member': member,
                               'stories': stories},
                              context_instance=RequestContext(request))