This file contains 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
************************************** | |
* command: sudo smartctl -a /dev/sda * | |
************************************** | |
smartctl 6.2 2013-07-26 r3841 [x86_64-linux-3.13.0-43-generic] (local build) | |
Copyright (C) 2002-13, Bruce Allen, Christian Franke, www.smartmontools.org | |
=== START OF INFORMATION SECTION === | |
Model Family: Seagate Momentus SpinPoint M8 (AF) | |
Device Model: ST1000LM024 HN-M101MBB |
This file contains 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/env python3 | |
import re | |
import sys | |
prog = re.compile(r"\\N(?:{[^{}]*})?") | |
prog2 = re.compile(r"(Dialogue: \w*,\w*:\w*:\w*.\w*,\w*:\w*:\w*.\w*,\w*,\w*,\w*,\w*,\w*,\w*,)(.*)") | |
for line in sys.stdin: |
This file contains 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 <stdio.h> | |
int main () | |
{ | |
int a = 0, b = 1, c = 1, sum = 0; | |
while (c < 4000000) | |
{ | |
if (c % 2 == 0) | |
sum += c; |
This file contains 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 <stdio.h> | |
int main() | |
{ | |
int sum = 2; | |
int a = 1, b = 1, c = a + b; | |
while (c < 4000000) | |
{ | |
a = b, b = c, c = a + b; | |
if (c % 2 == 0) |
This file contains 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
def fib (m): | |
a, b, c = 0, 1, 1 | |
yield 1 | |
while a+b <= m: | |
c = a + b | |
yield c | |
a, b= b, c | |
s = 0 | |
for i in fib(4000000): |
This file contains 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 <stdio.h> | |
int main() { | |
int sum = 0, num; | |
for (num = 0; num < 1000; num ++){ | |
if (num % 3 == 0 || num % 5 == 0){ | |
sum = sum + num; | |
} | |
} | |
printf("sum = %d",sum); |
This file contains 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
my_list = [] | |
now_list = range(1,1000) | |
for i in range(1,1000): | |
if i%3 == 0: | |
my_list.append(i) | |
now_list.remove(i) | |
for j in now_list: | |
if j%5 == 0: | |
my_list.append(j) |