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
import csv | |
from selenium import webdriver | |
driver = webdriver.Chrome("c:/chromedriver.exe") | |
driver.get("https://www.mercari.com/jp/search/?keyword=XXXXXX") | |
# Excelで読み込めるようにSJISで保存 | |
f = open('C:\\Users\\matsumoto\\Documents\\result.csv', 'w',encoding='CP932', errors='replace') | |
# csvファイルを定義 |
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
select (@number := 0 ) AS min, (@number := @number + 200) AS max,count(*) as cnt,sum(AAA) as sum from WWW where XXX IN (YY,YY) and AAA between 0 and 200 and BBB between "2017-07-20 00:00:00" and "2017-08-17 23:59:59" | |
UNION select (@number := 200 ) AS min, (@number := @number + 200) AS max,count(*) as cnt,sum(AAA) as sum from WWW where XXX IN (YY,YY) and AAA between 201 and 400 and BBB between "2017-07-20 00:00:00" and "2017-08-17 23:59:59" | |
UNION select (@number := 400 ) AS min, (@number := @number + 200) AS max,count(*) as cnt,sum(AAA) as sum from WWW where XXX IN (YY,YY) and AAA between 401 and 600 and BBB between "2017-07-20 00:00:00" and "2017-08-17 23:59:59" | |
UNION select (@number := 600 ) AS min, (@number := @number + 200) AS max,count(*) as cnt,sum(AAA) as sum from WWW where XXX IN (YY,YY) and AAA between 601 and 800 and BBB between "2017-07-20 00:00:00" and "2017-08-17 23:59:59" | |
UNION select (@number := 800 ) AS min, (@number := @number + 200) AS max,count(*) as cnt,sum(AAA) as sum from WWW wh |
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
CREATE TABLE IF NOT EXISTS `tbl` ( | |
`id` int(10) NOT NULL COMMENT '主キー', | |
`time` datetime NOT NULL COMMENT '集計日', | |
`sales` int(100) NOT NULL COMMENT 'その日の売上高' | |
) ENGINE=InnoDB DEFAULT CHARSET=utf8; |
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<stdio.h> | |
int main() | |
{ | |
int x; | |
int y; | |
int z; | |
int p; | |
int start = 1; | |
int end = 10; | |
int count = 0; |
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<stdio.h> | |
int main() | |
{ | |
int a; | |
int b; | |
int p; | |
int start = 1; | |
int end = 50; | |
int count = 0; | |
for(a=start;a<end;a++) |
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<stdio.h> | |
int main() | |
{ | |
int x = 0; | |
int y = 0; | |
int count = 0; | |
for(x=-100;x<101;x++) | |
{ | |
for(y=-100;y<101;y++) | |
{ |
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<stdio.h> | |
long int is_prime(long int n) | |
{ | |
int bool = 0;//nが素数かどうかの判定 | |
if(n > 1) | |
{ | |
long int count = 0;//2からnまで走査し、割り切れたものをカウント | |
for(long int k=1;k<(n+1);k++) |
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
SELECT count(*),sum(column),avg(column),stddev(column),max(column),min(column) FROM table_name WHERE <statement> |
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<stdio.h> | |
#include<math.h> | |
#define NUM 47 | |
#define CHAR_PREFECTURE_MAX 256 | |
#define MAX_SEAT 295 | |
//配列の合計の値を出力 | |
int sum(double a[]) | |
{ | |
int i=0; | |
int result = 0; |
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<stdio.h> | |
#include<math.h> | |
#define NUM 2 | |
//配列の合計の値を出力 | |
int sum(double a[]) | |
{ | |
int i=0; | |
int result = 0; | |
for(i=0;i<NUM;i++) | |
{ |
NewerOlder