This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include<vector> | |
#include<math.h> | |
using namespace std; | |
int sum(int a,int b) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for x in text: | |
if x != '\n': | |
sp = x.split() | |
out_text.append(sp[3]) | |
max_sec = 0 | |
for x in out_text: | |
if out_text.count(x) > max_sec: | |
max_sec = out_text.count(x) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
#! -*- coding: utf-8 -*- | |
import re | |
f = open("input.xml", "r") | |
text = f.readlines() | |
f.close() | |
count = re.compile('^.*(?<=\t| )<boot dev=(\'|\")hd(\'|\").*$') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
#! -*- coding: utf-8 -*- | |
import re, tarfile | |
tar = tarfile.open('etc.tar.gz', 'r:gz') | |
# Открываем rc-sysinit.conf | |
rc_file = tar.extractfile('etc/init/rc-sysinit.conf').readlines() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
#! -*- coding: utf-8 -*- | |
import re | |
f = open("access.log", "r") | |
text = f.read() | |
f.close() | |
ipv6_find = re.compile('(^|\n)' +\ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Counting objects: 697, done. | |
Delta compression using up to 4 threads. | |
Compressing objects: 100% (562/562), done. | |
Writing objects: 100% (697/697), 3.90 MiB | 476 KiB/s, done. | |
Total 697 (delta 87), reused 687 (delta 84) | |
-----> Fetching custom git buildpack... done | |
-----> Multipack app detected | |
=====> Downloading Buildpack: https://github.com/heroku/heroku-buildpack-ruby.git | |
=====> Detected Framework: Ruby |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2013-11-14T15:45:33.170855+00:00 heroku[api]: Enable Logplex by [email protected] | |
2013-11-14T15:45:33.184984+00:00 heroku[api]: Release v2 created by [email protected] | |
2013-11-14T15:45:56+00:00 heroku[slug-compiler]: Slug compilation started | |
2013-11-14T15:46:19.234450+00:00 heroku[api]: Scale to web=1 by [email protected] | |
2013-11-14T15:46:19.255157+00:00 heroku[api]: Add PATH config by [email protected] | |
2013-11-14T15:46:19.279553+00:00 heroku[api]: Release v3 created by [email protected] | |
2013-11-14T15:46:19.342305+00:00 heroku[api]: Deploy 1662654 by [email protected] | |
2013-11-14T15:46:19.389589+00:00 heroku[api]: Release v4 created by [email protected] | |
2013-11-14T15:46:19+00:00 heroku[slug-compiler]: Slug compilation finished | |
2013-11-14T15:46:22.707093+00:00 heroku[web.1]: Starting process with command `node app.js` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
usage() | |
{ | |
cat << EOF | |
usage: $0 options | |
This script run cap [-S revision = commit] deploy | |
example cap_deploy.sh -c 97c902b9d9d29952f33d6c7406859fb946f2bbf8 | |
OPTIONS: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Команды могут не попасть в историю по следующим причинам: | |
Если команда попадает под шаблон, определенные в переменной HISTIGNORE. Если в HISTCONTROL установлено значение ignorespace или ignoreboth (не попадут команды, начинающиеся с пробела). Если в HISTCONTROL установлено ignoredups или ignoreboth (не попадут повторяющиеся команды). ignoreboth подходит под оба случая. Также значение этих переменных может быть установлено в /etc/bashrc, а пользователь не переопределит их. Наверно команда может не попасть из-за слишком маленького HISTSIZE. | |
Чтобы обеспечить запись нужно проверить эти переменные и проверить существование файла HISTFILE и доступ к нему. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Dashing.Alllist extends Dashing.Widget | |
onData: (data) -> | |
@_checkStatus(data.widget_class) | |
_checkStatus: (status) -> | |
$(@node).removeClass('failed pending passed') | |
$(@node).addClass(status) | |
ready: -> | |
if @get('unordered') | |
$(@node).find('ol').remove() |