自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(27)
  • 收藏
  • 关注

原创 脑电眼动数据批处理脚本,基于EEGLAB和EYE-EEG

使用EYE-EEG和EEGLAB批处理脑电和眼动文件

2022-08-15 15:02:25 1679 1

原创 【利用python批量把Eyelink的.edf文件转为asc文件】

eyelink的眼动数据处理

2022-07-12 17:35:01 596

原创 眼动数据分析——基于Eyelink输出报告

EyeLink输出的文件虽然都是计算好的眼动指标,但是还是要做进一步的数据清洗。手动太麻烦了,我就简单弄了一下。程序计算顺序如下:数据清洗:剔除3个标准差以外的数据计算均值和标准差并输出到文件.ipynb文件在github上。import pandas as pdimport scipy.stats as statsimport numpy as npyn_df = pd.read_excel('Lissajous16-TrialReport - copy.xlsx', sheet_n

2021-07-08 14:08:03 2110

原创 HackerRank SQL

HackerRank SQLBasic SelectRevising the Select Query IProblemQuery all columns for all American cities in the CITY table with populations larger than 100000. The CountryCode for America is USA.The CITY table is described as follows:AnswerSELECT *FR

2020-10-26 19:42:05 4008 2

原创 2020链家杭州二手房数据分析(截止到2020年09月07日)

2020链家杭州二手房数据分析(截止到2020年09月07日)1 项目背景通过python爬去链家杭州二手房的数据,网址为:https://hz.lianjia.com/ershoufang/。可以发现,链家把杭州分为15个区域。其中,截止到2020年09月07日,桐庐和建德区域数据为0条,大江东数据为2两条,淳安数据共32条。和其他区域相比,这几个区域数据量太小,因此在后续爬去过去中略去。通过requests和BeautifulSoup库爬取和解析,代码就不放了,很简陋。注意每次爬取后设置随机间隔时

2020-09-17 15:38:11 4422 2

原创 数据分析实战-User Behavior From Taobao-天池

首发于个人网站:一个好学生一 分析指标和模型指标分析数据集中包含的流量指标——PV和UV。需要注意的是,PV和UV在一定程度上可以看作是虚荣指标。在《精益数据分析》中提到:除非商业模式直接与PV挂钩(即展示广告),则更应该统计访问的人数对于UV只能显示多少人访问了页面,但却不能显示这些人在页面做了什么?为什么停留?是否离开?模型AARRRAARRR分别是Acquisition, ...

2019-10-27 22:23:23 4937 4

原创 MySQL50题-练习

SQL面试50题看了一些SQL面试的题目,这里做个记录。本文代码为MySql。这个练习题目里面共有四张表:Student 学生表字段名 字段含义 字段类型sid 学生编号 varchar(10)sname 学生姓名 varchar(10)sage 学生年龄 datetimessex 学生性别 varchar(10)Student表数据insert into St...

2019-08-23 13:38:02 2596 2

原创 使用R语言(ggplot2)绘制分组条形图,并添加误差线和显著性说明

最近要处理实验数据,觉得Excel画的图打印出来太不清晰了,所以试了一下R语言的ggplot2。最后画出的图可以导出eps格式,再用adobe illustrator进一步修改。# 创建一个data.framevadility <- c('有效', '有效', '无效', '无效')valance <- c('中性', '负性', '中性', '负性')RT <- c(4...

2019-07-06 09:47:14 34124 7

原创 使用matlab合并Excel文件

任务描述有两种不同类型的excel文件,每种共25个。需要将同一种类型文件汇总,并生成新的excel文件。通过批处理语句copy *type1.xlsx all.xlsx可以实现,但有时候会乱码练习一下matlab解决思路两个matlab程序combine_eyedata.m 读取文件列表;将不同类型文件分类;输出汇总后文件combine_list.m 合并文件程序,以函数形式...

2019-06-13 21:50:45 7496

原创 使用python处理眼动数据

目的分析目的分析:由于眼动程序生成的文件格式是tsv (tobii支持),为了excel处理方便在源代码中改成了xls,但excel不能正常打开,所以不能直接使用pandas。解决思路:通过with open打开,通过数据格式处理,转为pandas支持的数据框。输出的眼动文件中,以屏幕中心为0点。但为了方便计算,需要改成以左上角为0点。解决思路:显示器分辨率为1920*1080,因此...

2019-05-16 21:41:10 5487 1

原创 Psychopy单位

Psychopy单位​ 在psychopy中,有多种单位可供选择,包括但不限于:‘norm’, ‘cm’, ‘deg’, ‘pix’。在编写程序时,可以选择标准单位(normalised units),如’norm’,因为刺激可以随着窗口的大小自然伸缩。而在正式实验时,最好选择’cm’或’deg’,因为在这两种单位小,不管屏幕或窗口如何变化,刺激大小都不变。高度 Heightheight单元...

2019-01-18 14:16:46 1214 1

原创 python读取文件列表,pandas操作excel

python读取文件列表,pandas操作excel目标读取指定文件下所有excel文件根据excel文件一列的内容分条件新增列保存并输入新excel文件思路读取文件利用os.walk()判断、新增列利用pandas输入新excel文件利用pandas的ExcelWriter()#!/usr/bin/env python3# -*- coding: utf-8 -*-...

2018-12-04 17:42:45 2477

原创 利用pandas合并excel文件

临时想要合并一些excel文件,发现用pandas还挺方便。但觉得速度有些慢,可以改进。先这样吧,:-D。# -*- coding: utf-8 -*-"""Created on Thu Aug 30 12:13:53 2018@author: Ye"""import pandas as pdfrom os import walk# 利用walk函数取得文件名,并判断是否...

2018-08-30 13:08:23 1364

原创 SQL ZOO练习——SELECT from Nobel Tutorial

1. Change the query shown so that it displays Nobel prizes for 1950.SELECT yr, subject, winnerFROM nobelWHERE yr = 19502. Show who won the 1962 prize for Literature.SELECT winnerFROM nobel...

2018-08-27 16:10:09 426

原创 SQL ZOO练习——SELECT from WORLD Tutorial

1. Read the notes about this table. Observe the result of running this SQL command to show the name, continent and population of all countries.SELECT name, continent, population FROM world2. How...

2018-08-19 14:03:21 1459

原创 SQL ZOO练习——SELECT basics

1. The example uses a WHERE clause to show the population of 'France'. Note that strings (pieces of text that are data) should be in 'single quotes'; Modify it to show the population of GermanySELE...

2018-08-19 09:02:55 336

原创 SQL ZOO练习——Self join

1. How many stops are in the database.SELECT COUNT(*)FROM stops2. Find the id value for the stop 'Craiglockhart'SELECT id FROM stopsWHERE name = 'Craiglockhart'3. Give the id and the name...

2018-08-10 20:30:54 868

原创 SQL ZOO练习——Using Null

1. List the teachers who have NULL for their department.SELECT name FROM teacherWHERE dept IS NULL2. Note the INNER JOIN misses the teachers with no department and the departments with no teach...

2018-08-07 20:46:48 1702

原创 SQL ZOO练习——More JOIN operations

1. List the films where the yr is 1962 [Show id, title]SELECT id, titleFROM movieWHERE yr=19622. Give year of 'Citizen Kane'.SELECT yr FROM movieWHERE title = 'Citizen Kane'3. List all o...

2018-08-06 10:28:51 634

原创 SQL ZOO练习——The JOIN operation

1. Modify it to show the matchid and player name for all goals scored by Germany. To identify German players, check for: teamid = 'GER'.SELECT matchid, player FROM goal WHERE teamid = 'GER'2. S...

2018-07-31 22:19:06 1394 2

原创 SQL ZOO练习——The nobel table can be used to practice more SUM and COUNT functions

1. Show the total number of prizes awarded.SELECT COUNT(winner) FROM nobel2. List each subject - just once.SELECT DISTINCT subject FROM nobel3. Show the total number of prizes awarded for Ph...

2018-07-30 21:53:49 881

原创 SQL ZOO练习——SUM and COUNT

1. Show the total population of the world.SELECT SUM(population) FROM world2. List all the continents - just once each.SELECT DISTINCT continent FROM world3. Give the total GDP of Africa...

2018-07-30 21:01:04 597

原创 SQL ZOO练习——SELECT within SELECT

最近在练习SQL上学习,把结果发上来存个档。1. List each country name where the population is larger than that of 'Russia'.SELECT name FROM world WHERE population &gt; (SELECT population FROM world WHE...

2018-07-29 09:49:26 1741

原创 pandas中DataFrame通过行选择数据

import pandas as pdimport numpy as npfrom pandas import Series, DataFrame首先日常导入。data = DataFrame(np.arange(16).reshape(4,4), index=['Ohio', 'Colorado', 'Utah', 'New York'], columns=['one', 'two', 't...

2018-03-08 20:36:14 9226

原创 Java语言程序设计(基础篇)原书第十版 课后习题 第五章

import java.util.Scanner;public class Code_Practice_5 { public static void main(String[] args) { // 5.1 Scanner input = new Scanner(System.in); System.out.print("Enter an inte

2015-10-21 20:27:12 17051 5

原创 Java语言程序设计(基础篇)原书第十版 课后习题 第四章

import java.util.Scanner;public class Code_Practice_4 { public static void main(String[] args) { Scanner input = new Scanner(System.in); System.out.print("Enter the length from the c

2015-10-12 09:24:42 6849 1

原创 Java语言程序设计(基础篇)原书第十版 课后习题 第三章

// 3.11 Scanner input = new Scanner(System.in); System.out.print("Enter a month and a year:"); int month = input.nextInt(); int year = input.nextInt(); if ((year % 4 == 0 && year % 10

2015-10-06 21:58:39 16111

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除