code
stringlengths
1
1.05M
repo_name
stringlengths
6
83
path
stringlengths
3
242
language
stringclasses
222 values
license
stringclasses
20 values
size
int64
1
1.05M
<!DOCTYPE html> <!-- saved from url=(0014)about:internet --> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> <meta http-equiv="x-ua-compatible" content="IE=9" > <title>Chapter 7: Exercise 2</title> <style type="text/css"> body, td { font-family: sans-serif; background-color: w...
2301_76574743/tjjm-R
统计学习导论_基于R应用习题答案/ch7/2.html
HTML
unknown
2,915
<!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta charset="utf-8"> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta name="generator" content="pandoc" /> <title></title> <script src="data:application/x-javascript,%2F%2A%21%20jQuery%20v1%2E11%2E0%20%7C%20%28c%29%20...
2301_76574743/tjjm-R
统计学习导论_基于R应用习题答案/ch7/3.html
HTML
unknown
486,767
<!DOCTYPE html> <!-- saved from url=(0014)about:internet --> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> <meta http-equiv="x-ua-compatible" content="IE=9" > <title>Chapter 7: Exercise 4</title> <style type="text/css"> body, td { font-family: sans-serif; background-color: w...
2301_76574743/tjjm-R
统计学习导论_基于R应用习题答案/ch7/4.html
HTML
unknown
26,667
<!DOCTYPE html> <!-- saved from url=(0014)about:internet --> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> <meta http-equiv="x-ua-compatible" content="IE=9" > <title>Chapter 7: Exercise 5</title> <style type="text/css"> body, td { font-family: sans-serif; background-color: w...
2301_76574743/tjjm-R
统计学习导论_基于R应用习题答案/ch7/5.html
HTML
unknown
2,639
<!DOCTYPE html> <!-- saved from url=(0014)about:internet --> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> <meta http-equiv="x-ua-compatible" content="IE=9" > <title>Chapter 7: Exercise 6</title> <style type="text/css"> body, td { font-family: sans-serif; background-color: w...
2301_76574743/tjjm-R
统计学习导论_基于R应用习题答案/ch7/6.html
HTML
unknown
386,731
<!DOCTYPE html> <!-- saved from url=(0014)about:internet --> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> <meta http-equiv="x-ua-compatible" content="IE=9" > <title>Chapter 7: Exercise 7</title> <style type="text/css"> body, td { font-family: sans-serif; background-color: w...
2301_76574743/tjjm-R
统计学习导论_基于R应用习题答案/ch7/7.html
HTML
unknown
57,185
<!DOCTYPE html> <!-- saved from url=(0014)about:internet --> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> <meta http-equiv="x-ua-compatible" content="IE=9" > <title>Chapter 7: Exercise 8</title> <style type="text/css"> body, td { font-family: sans-serif; background-color: w...
2301_76574743/tjjm-R
统计学习导论_基于R应用习题答案/ch7/8.html
HTML
unknown
166,830
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <!-- saved from url=(0014)about:internet --> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>Chapter 6: Exercise 9</title> <base target="_blank"/> <style ...
2301_76574743/tjjm-R
统计学习导论_基于R应用习题答案/ch7/9.html
HTML
unknown
156,526
# Chapter 7 Lab: Non-linear Modeling library(ISLR) attach(Wage) # Polynomial Regression and Step Functions fit=lm(wage~poly(age,4),data=Wage) coef(summary(fit)) fit2=lm(wage~poly(age,4,raw=T),data=Wage) coef(summary(fit2)) fit2a=lm(wage~age+I(age^2)+I(age^3)+I(age^4),data=Wage) coef(fit2a) fit2b=lm(wage~cbind(age,ag...
2301_76574743/tjjm-R
统计学习导论_基于R应用习题答案/ch7/lab.R
R
unknown
3,959
<!DOCTYPE html> <!-- saved from url=(0014)about:internet --> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> <meta http-equiv="x-ua-compatible" content="IE=9" > <title>Chapter 8: Exercise 1</title> <style type="text/css"> body, td { font-family: sans-serif; background-color: w...
2301_76574743/tjjm-R
统计学习导论_基于R应用习题答案/ch8/1.html
HTML
unknown
32,825
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <!-- saved from url=(0014)about:internet --> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>Chapter 8: Exercise 10</title> <base target="_blank"/> <style...
2301_76574743/tjjm-R
统计学习导论_基于R应用习题答案/ch8/10.html
HTML
unknown
54,086
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <!-- saved from url=(0014)about:internet --> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>Chapter 8: Exercise 11</title> <base target="_blank"/> <style...
2301_76574743/tjjm-R
统计学习导论_基于R应用习题答案/ch8/11.html
HTML
unknown
32,432
<!DOCTYPE html> <!-- saved from url=(0014)about:internet --> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> <meta http-equiv="x-ua-compatible" content="IE=9" > <title>Chapter 8: Exercise 12</title> <style type="text/css"> body, td { font-family: sans-serif; background-color: ...
2301_76574743/tjjm-R
统计学习导论_基于R应用习题答案/ch8/12.html
HTML
unknown
17,488
<!DOCTYPE html> <!-- saved from url=(0014)about:internet --> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> <meta http-equiv="x-ua-compatible" content="IE=9" > <title>Chapter 8: Exercise 2</title> <style type="text/css"> body, td { font-family: sans-serif; background-color: w...
2301_76574743/tjjm-R
统计学习导论_基于R应用习题答案/ch8/2.html
HTML
unknown
3,376
<!DOCTYPE html> <!-- saved from url=(0014)about:internet --> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> <meta http-equiv="x-ua-compatible" content="IE=9" > <title>Chapter 8: Exercise 3</title> <style type="text/css"> body, td { font-family: sans-serif; background-color: w...
2301_76574743/tjjm-R
统计学习导论_基于R应用习题答案/ch8/3.html
HTML
unknown
67,217
<!DOCTYPE html> <!-- saved from url=(0014)about:internet --> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> <meta http-equiv="x-ua-compatible" content="IE=9" > <title>Chapter 8: Exercise 4</title> <style type="text/css"> body, td { font-family: sans-serif; background-color: w...
2301_76574743/tjjm-R
统计学习导论_基于R应用习题答案/ch8/4.html
HTML
unknown
29,144
<!DOCTYPE html> <!-- saved from url=(0014)about:internet --> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> <meta http-equiv="x-ua-compatible" content="IE=9" > <title>Chapter 8: Exercise 5</title> <style type="text/css"> body, td { font-family: sans-serif; background-color: w...
2301_76574743/tjjm-R
统计学习导论_基于R应用习题答案/ch8/5.html
HTML
unknown
13,570
<!DOCTYPE html> <!-- saved from url=(0014)about:internet --> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> <meta http-equiv="x-ua-compatible" content="IE=9" > <title>Chapter 8: Exercise 6</title> <style type="text/css"> body, td { font-family: sans-serif; background-color: w...
2301_76574743/tjjm-R
统计学习导论_基于R应用习题答案/ch8/6.html
HTML
unknown
2,211
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <!-- saved from url=(0014)about:internet --> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>Chapter 8: Exercise 7</title> <base target="_blank"/> <style ...
2301_76574743/tjjm-R
统计学习导论_基于R应用习题答案/ch8/7.html
HTML
unknown
37,595
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <!-- saved from url=(0014)about:internet --> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>Chapter 8: Exercise 8</title> <base target="_blank"/> <style ...
2301_76574743/tjjm-R
统计学习导论_基于R应用习题答案/ch8/8.html
HTML
unknown
50,736
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <!-- saved from url=(0014)about:internet --> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>Chapter 8: Exercise 9</title> <base target="_blank"/> <style ...
2301_76574743/tjjm-R
统计学习导论_基于R应用习题答案/ch8/9.html
HTML
unknown
33,651
# Chapter 8 Lab: Decision Trees # Fitting Classification Trees library(tree) library(ISLR) attach(Carseats) High=ifelse(Sales<=8,"No","Yes") Carseats=data.frame(Carseats,High) tree.carseats=tree(High~.-Sales,Carseats) summary(tree.carseats) plot(tree.carseats) text(tree.carseats,pretty=0) tree.carseats set.seed(2) tr...
2301_76574743/tjjm-R
统计学习导论_基于R应用习题答案/ch8/lab.R
R
unknown
2,932
<!DOCTYPE html> <!-- saved from url=(0014)about:internet --> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> <meta http-equiv="x-ua-compatible" content="IE=9" > <title>Chapter 9: Exercise 1</title> <style type="text/css"> body, td { font-family: sans-serif; background-color: w...
2301_76574743/tjjm-R
统计学习导论_基于R应用习题答案/ch9/1.html
HTML
unknown
44,545
<!DOCTYPE html> <!-- saved from url=(0014)about:internet --> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> <meta http-equiv="x-ua-compatible" content="IE=9" > <title>Chapter 9: Exercise 2</title> <style type="text/css"> body, td { font-family: sans-serif; background-color: w...
2301_76574743/tjjm-R
统计学习导论_基于R应用习题答案/ch9/2.html
HTML
unknown
74,664
<!DOCTYPE html> <!-- saved from url=(0014)about:internet --> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> <meta http-equiv="x-ua-compatible" content="IE=9" > <title>Chapter 9: Exercise 3</title> <style type="text/css"> body, td { font-family: sans-serif; background-color: w...
2301_76574743/tjjm-R
统计学习导论_基于R应用习题答案/ch9/3.html
HTML
unknown
133,356
<!DOCTYPE html> <!-- saved from url=(0014)about:internet --> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> <meta http-equiv="x-ua-compatible" content="IE=9" > <title>Chapter 9: Exercise 4</title> <style type="text/css"> body, td { font-family: sans-serif; background-color: w...
2301_76574743/tjjm-R
统计学习导论_基于R应用习题答案/ch9/4.html
HTML
unknown
430,241
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <!-- saved from url=(0014)about:internet --> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>Chapter 9: Exercise 5</title> <base target="_blank"/> <style ...
2301_76574743/tjjm-R
统计学习导论_基于R应用习题答案/ch9/5.html
HTML
unknown
164,614
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <!-- saved from url=(0014)about:internet --> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>Chapter 9: Exercise 6</title> <base target="_blank"/> <style ...
2301_76574743/tjjm-R
统计学习导论_基于R应用习题答案/ch9/6.html
HTML
unknown
133,816
<!DOCTYPE html> <!-- saved from url=(0014)about:internet --> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> <meta http-equiv="x-ua-compatible" content="IE=9" > <title>Chapter 9: Exercise 8</title> <style type="text/css"> body, td { font-family: sans-serif; background-color: w...
2301_76574743/tjjm-R
统计学习导论_基于R应用习题答案/ch9/8.html
HTML
unknown
23,683
## Online course quiz question: 9.R ## Explanation: Logistic regression is similar to SVM with a linear kernel. library(MASS) svm_error <- function() { # 1) generate a random training sample to train on + fit # build training set x0 = mvrnorm(50,rep(0,10),diag(10)) x1 = mvrnorm(50,rep(c(1,0),c(5,5)),diag(10))...
2301_76574743/tjjm-R
统计学习导论_基于R应用习题答案/ch9/9.R
R
unknown
1,128
set.seed(1) x = matrix(rnorm(20*2), ncol=2) y=c(rep(-1, 10), rep(1, 10)) x[y == 1, ]=x[y == 1, ] + 1 plot(x, col=(3-y)) # Train svm dat=data.frame(x=x, y=as.factor(y)) library(e1071) svmfit = svm(y~., data=dat, kernel="linear", cost=10, scale=F) plot(svmfit, dat) svmfit$index summary(svmfit) # Tune svm set.seed(1) tu...
2301_76574743/tjjm-R
统计学习导论_基于R应用习题答案/ch9/Lab_chapter9.R
R
unknown
3,507
n.samples = 300 y = sample(c(0, 1), n.samples, replace=T) x = matrix(rep(0, n.samples * 10), ncol=10) for (i in 1:n.samples) { if (y[i] == 0) x[i, ] = rnorm(10) else x[i, ] = rnorm(10, mean=c(1, 1, 1, 1, 1, 0, 0, 0, 0, 0)) } total.0 = seq(1, n.samples)[y == 0] total.1 = seq(1, n.samples)[y == 1] train.0 ...
2301_76574743/tjjm-R
统计学习导论_基于R应用习题答案/ch9/R_exercise_video.R
R
unknown
772
# Chapter 9 Lab: Support Vector Machines # Support Vector Classifier set.seed(1) x=matrix(rnorm(20*2), ncol=2) y=c(rep(-1,10), rep(1,10)) x[y==1,]=x[y==1,] + 1 plot(x, col=(3-y)) dat=data.frame(x=x, y=as.factor(y)) library(e1071) svmfit=svm(y~., data=dat, kernel="linear", cost=10,scale=FALSE) plot(svmfit, dat) svmfit...
2301_76574743/tjjm-R
统计学习导论_基于R应用习题答案/ch9/lab.R
R
unknown
3,494
<html> <body> <h3><i>An Introduction to Statistical Learning</i> Unofficial Solutions</h3> <p> <a href="https://github.com/asadoughi/stat-learning">Fork the solutions!</a><br /> <a href="https://twitter.com/princehonest">Twitter me @princehonest</a><br /> <a href="http://www.statlearning.com">Official book webs...
2301_76574743/tjjm-R
统计学习导论_基于R应用习题答案/index.html
HTML
unknown
1,516
#include "Com_Util.h" #include <INTRINS.H> void Com_Util_Delay1ms(u16 count) { u8 i,j; while (count>0) { count--; _nop_(); i=2; j=199; do { while(--j); } while (--i); } }
2301_77966824/51-microcontroller-learning
2024/10/1019-数码管-模块化编程/src/Com/Com_Util.c
C
unknown
198
#ifndef _INT_DIGITALTUBE_H__ #define _INT_DIGITALTUBE_H__ #include "Com_Util.h" #define SGM_ED P36 #define LED_ED P34 void Int_DigitalTube_Init(); void Int_DigitalTube_DisplayNum(u32 num); void Int_DeigitalTUbe_Refresh(); #endif // 1
2301_77966824/51-microcontroller-learning
2024/10/1019-数码管-模块化编程/src/Int/Int_DigitalTube.h
C
unknown
237
#include <Int_digitalTube.h> void main() { Int_DigitalTube_Init(); Int_DigitalTube_DisplayNum(1314520); while(1) { Int_DeigitalTUbe_Refresh(); } }
2301_77966824/51-microcontroller-learning
2024/10/1019-数码管-模块化编程/src/main.c
C
unknown
156
#!/usr/bin/env python #coding=utf-8 # stcflash Copyright (C) 2013 laborer (laborer@126.com) # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your opti...
2301_77966824/51-microcontroller-learning
2024/10/1019-数码管-模块化编程/tools/stcflash.py
Python
unknown
57,810
#!/usr/bin/env python #coding=utf-8 # stcflash Copyright (C) 2013 laborer (laborer@126.com) # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your opti...
2301_77966824/51-microcontroller-learning
2024/10/20241015数码管/tools/stcflash.py
Python
unknown
57,810
#include<STC89C5xRC.H> #include<INTRINS.H> void Delay100ms(void) //@11.0592MHz { unsigned char data i, j; i = 180; j = 73; do { while (--j); } while (--i); } void main() { unsigned char tmp=0x01; while(1) { P0=~tmp; Delay100ms(); tmp <<=1; if(tmp==0x00) { tmp=0x01; } } }
2301_77966824/51-microcontroller-learning
2024/10/24241016_01_HelloWorld-eide/HelloWorld-eide/src/main.c
C
unknown
305
#!/usr/bin/env python #coding=utf-8 # stcflash Copyright (C) 2013 laborer (laborer@126.com) # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your opti...
2301_77966824/51-microcontroller-learning
2024/10/24241016_01_HelloWorld-eide/HelloWorld-eide/tools/stcflash.py
Python
unknown
57,810
#include "Com_Util.h" #include <INTRINS.H> void Com_Util_Delay1ms(u16 count) { u8 i,j; while (count>0) { count--; _nop_(); i=2; j=199; do { while(--j); } while (--i); } }
2301_77966824/51-microcontroller-learning
2024/10/Hello-template/src/Com/Com_Util.c
C
unknown
198
#include <Int_digitalTube.h> void main() { while(1) { } }
2301_77966824/51-microcontroller-learning
2024/10/Hello-template/src/main.c
C
unknown
60
#!/usr/bin/env python #coding=utf-8 # stcflash Copyright (C) 2013 laborer (laborer@126.com) # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your opti...
2301_77966824/51-microcontroller-learning
2024/10/Hello-template/tools/stcflash.py
Python
unknown
57,810
#include "Com_Util.h" #include <INTRINS.H> void Com_Util_Delay1ms(u16 count) { u8 i,j; while (count>0) { count--; _nop_(); i=2; j=199; do { while(--j); } while (--i); } }
2301_77966824/51-microcontroller-learning
2024/template/src/Com/Com_Util.c
C
unknown
198
#include <Int_digitalTube.h> void main() { while(1) { } }
2301_77966824/51-microcontroller-learning
2024/template/src/main.c
C
unknown
60
#!/usr/bin/env python #coding=utf-8 # stcflash Copyright (C) 2013 laborer (laborer@126.com) # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your opti...
2301_77966824/51-microcontroller-learning
2024/template/tools/stcflash.py
Python
unknown
57,810
$NOMOD51 ;------------------------------------------------------------------------------ ; This file is part of the C51 Compiler package ; Copyright (c) 1988-2005 Keil Elektronik GmbH and Keil Software, Inc. ; Version 8.01 ; ; *** <<< Use Configuration Wizard in Context Menu >>> *** ;-------------------------------...
2301_77966824/51-microcontroller-learning
HolleWorld/STARTUP.A51
Assembly
unknown
6,178
$NOMOD51 ;------------------------------------------------------------------------------ ; This file is part of the C51 Compiler package ; Copyright (c) 1988-2005 Keil Elektronik GmbH and Keil Software, Inc. ; Version 8.01 ; ; *** <<< Use Configuration Wizard in Context Menu >>> *** ;-------------------------------...
2301_77966824/51-microcontroller-learning
流水灯/STARTUP.A51
Assembly
unknown
6,178
#include<STC89C5xRC.H> #include<INTRINS.H> void Delay100ms(void) //@11.0592MHz { unsigned char data i, j; i = 180; j = 73; do { while (--j); } while (--i); } void main() { unsigned char tmp=0x01; while(1) { P0=~tmp; Delay100ms(); tmp <<=1; if(tmp==0x00) { tmp=0x01; } } }
2301_77966824/51-microcontroller-learning
流水灯/main.c
C
unknown
305
$NOMOD51 ;------------------------------------------------------------------------------ ; This file is part of the C51 Compiler package ; Copyright (c) 1988-2005 Keil Elektronik GmbH and Keil Software, Inc. ; Version 8.01 ; ; *** <<< Use Configuration Wizard in Context Menu >>> *** ;-------------------------------...
2301_77966824/51-microcontroller-learning
闪烁LED/STARTUP.A51
Assembly
unknown
6,178
#include<STC89C5xRC.H> #include<INTRINS.H> void Delay500ms(void) //@11.0592MHz { unsigned char data i, j, k; _nop_(); i = 4; j = 129; k = 119; do { do { while (--k); } while (--j); } while (--i); } void main() { while(1) { P00 = ~P00; Delay500ms(); } }
2301_77966824/51-microcontroller-learning
闪烁LED/main.c
C
unknown
280
#include <stdio.h> #include <time.h> int main() { // Get the rime information time_t rawtime; struct tm *timeinfo; time(&rawtime); timeinfo = localtime(&rawtime); // Translate time information to strings char buffer[80]; strftime(buffer, 80, "%Y-%m-%d %H:%M:%S", timeinfo); ...
2301_78305256/3121006433
time.c
C
unknown
404
t=0:pi/20:2*pi; %定义参数t[0,2pi],每隔pi/100标注一个。 [x,y,z]= cylinder(2+sin(t),30); %将x,y,z定义为花瓶型并绘图(cylinder本身为圆柱,这里将表面调整了) subplot(2,2,1); %创建一个可以画四个图的子图,这里画其中第一个 mesh(x,y,z); %mesh为绘制网格曲面图的函数 subplot(2,2,2); %画第二个图 [x,y,z]=sphere; ...
2301_77966824/some-learning-about-matlab
2023/2023_01_18/2023_01_18_01.m
MATLAB
unknown
673
x = 0:0.5:4; y = x*2; plot(x,y)
2301_77966824/some-learning-about-matlab
2024/2024_03_04.m
MATLAB
unknown
31
pi format longE pi format shortE
2301_77966824/some-learning-about-matlab
2024/2024_05/2024_05_21/2024_05_21_01/m2024_05_21_01.m
Objective-C
unknown
32
<!DOCTYPE html> <html lang="zh-CN"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>重庆大学文渊阁读书协会 - 赛博文学自留地</title> <style> :root { --neon-cyan: #00ffff; --neon-pink: #ff006e; --neon-purple: #...
2301_78337374/wenyuange
文渊阁25纳新-1014.html
HTML
unknown
36,746
from flask import Flask, request, jsonify, send_file from flask_cors import CORS import os import logging from config import config from utils.session_manager import SessionManager from utils.image_processor import ImageProcessor from utils.gemini_client import GeminiClient from utils.error_handler import setup_error_h...
2301_78526554/tosto
app.py
Python
unknown
2,221
#!/bin/bash # 图生图API自动部署脚本 # 适用于Ubuntu/Debian系统 set -e echo "🚀 开始自动部署图生图API服务..." # 检测系统 if [[ -f /etc/os-release ]]; then . /etc/os-release OS=$NAME VER=$VERSION_ID else echo "❌ 无法检测系统版本" exit 1 fi echo "检测到系统: $OS $VER" # 更新系统 echo "📦 更新系统包..." if [[ $OS == *"Ubuntu"* ]] || [[ $OS == *"Deb...
2301_78526554/tosto
auto_deploy.sh
Shell
unknown
4,739
import os from dotenv import load_dotenv load_dotenv() class Config: """应用配置类""" # Flask基础配置 SECRET_KEY = os.environ.get('SECRET_KEY') or 'dev-secret-key-change-in-production' DEBUG = os.environ.get('FLASK_DEBUG', 'False').lower() == 'true' # Gemini API配置 GEMINI_API_KEY = os.environ....
2301_78526554/tosto
config.py
Python
unknown
1,588
#!/usr/bin/env python3 """ 持久化部署脚本 支持Windows服务、Linux systemd服务等方式 """ import os import sys import platform import subprocess import shutil from pathlib import Path def create_windows_service(): """创建Windows服务配置""" service_script = """ import win32serviceutil import win32service import win32event import servic...
2301_78526554/tosto
deploy.py
Python
unknown
10,485
<!DOCTYPE html> <html lang="zh-CN"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>图生图API客户端示例</title> <style> body { font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; max-width: 1200px; ...
2301_78526554/tosto
example_client.html
HTML
unknown
9,873
#!/usr/bin/env python3 """ 服务管理脚本 用于启动、停止、重启和监控服务 """ import os import sys import signal import time import psutil import argparse import subprocess from pathlib import Path class ServiceManager: def __init__(self): self.project_dir = Path(__file__).parent self.pid_file = self.project_dir / "logs"...
2301_78526554/tosto
manage.py
Python
unknown
8,782
# 路由包
2301_78526554/tosto
routes/__init__.py
Python
unknown
12
from flask import Blueprint, request, jsonify, send_file from werkzeug.utils import secure_filename import os import logging from utils.error_handler import APIError from typing import Optional def create_api_blueprint(session_manager, image_processor, gemini_client, rate_limiter): """创建API蓝图""" api = Blu...
2301_78526554/tosto
routes/api.py
Python
unknown
11,833
#!/usr/bin/env python3 """ 图生图转接API服务启动脚本 """ import os import sys from app import create_app def main(): """主函数""" # 检查环境变量 if not os.environ.get('GEMINI_API_KEY'): print("错误: 请设置GEMINI_API_KEY环境变量") print("请复制.env.example为.env并填入您的API密钥") sys.exit(1) # 创建应用 app = cre...
2301_78526554/tosto
run.py
Python
unknown
927
@echo off echo 启动图生图转接API服务... REM 检查Python是否安装 python --version >nul 2>&1 if errorlevel 1 ( echo 错误: 未找到Python,请先安装Python 3.8+ pause exit /b 1 ) REM 检查.env文件是否存在 if not exist .env ( echo 警告: .env文件不存在,请复制.env.example为.env并配置API密钥 echo 正在复制.env.example为.env... copy .env.example .env echo 请...
2301_78526554/tosto
start.bat
Batchfile
unknown
1,227
#!/bin/bash echo "启动图生图转接API服务..." # 检查Python是否安装 if ! command -v python3 &> /dev/null; then echo "错误: 未找到Python3,请先安装Python 3.8+" exit 1 fi # 检查.env文件是否存在 if [ ! -f .env ]; then echo "警告: .env文件不存在,请复制.env.example为.env并配置API密钥" echo "正在复制.env.example为.env..." cp .env.example .env echo "请编辑.e...
2301_78526554/tosto
start.sh
Shell
unknown
1,211
@echo off echo 启动生产环境服务... REM 检查.env文件 if not exist .env ( echo 错误: .env文件不存在,请先配置环境变量 pause exit /b 1 ) REM 创建日志目录 if not exist logs mkdir logs REM 启动服务 echo 启动图生图转接API服务 (生产模式)... python -m gunicorn -w 4 -b 0.0.0.0:5000 --timeout 120 --access-logfile logs/access.log --error-logfile logs...
2301_78526554/tosto
start_production.bat
Batchfile
unknown
460
# 工具类包
2301_78526554/tosto
utils/__init__.py
Python
unknown
15
from flask import jsonify, request import logging import traceback def setup_error_handlers(app): """设置错误处理器""" @app.errorhandler(400) def bad_request(error): return jsonify({ 'error': 'Bad Request', 'message': '请求参数错误', 'status_code': 400 }), 400 ...
2301_78526554/tosto
utils/error_handler.py
Python
unknown
3,281
import google.generativeai as genai from google.generativeai import types from PIL import Image from io import BytesIO import base64 from typing import Dict, List, Optional, Tuple, Union import logging class GeminiClient: """Gemini API客户端""" def __init__(self, api_key: str, model_name: str = "gemini-2.0-f...
2301_78526554/tosto
utils/gemini_client.py
Python
unknown
8,216
import os import base64 import uuid from io import BytesIO from PIL import Image from typing import Optional, Tuple, Union import mimetypes class ImageProcessor: """图片处理器""" def __init__(self, upload_folder: str, allowed_extensions: set): """ 初始化图片处理器 Args: upl...
2301_78526554/tosto
utils/image_processor.py
Python
unknown
6,489
import time from collections import defaultdict from typing import Dict from flask import request import threading class RateLimiter: """API速率限制器""" def __init__(self, max_requests_per_hour: int = 100): """ 初始化速率限制器 Args: max_requests_per_hour: 每小时最大请求数 ...
2301_78526554/tosto
utils/rate_limiter.py
Python
unknown
3,044
import redis import json import uuid from datetime import datetime, timedelta from typing import Dict, List, Optional class SessionManager: """会话管理器,用于支持多轮对话""" def __init__(self, redis_url: str, session_timeout: int = 3600): """ 初始化会话管理器 Args: redis_url: Redis...
2301_78526554/tosto
utils/session_manager.py
Python
unknown
4,773
import win32serviceutil import win32service import win32event import servicemanager import socket import sys import os from pathlib import Path # 添加项目路径到Python路径 project_path = Path(__file__).parent sys.path.insert(0, str(project_path)) from app import create_app class ImageGenAPIService(win32servic...
2301_78526554/tosto
windows_service.py
Python
unknown
1,613
import difflib import sys import os import re import cProfile import io import pstats def calculate_similarity(original_text, plagiarized_text): differ = difflib.SequenceMatcher(None, original_text, plagiarized_text) return differ.ratio() * 100 def check_file_paths(original_file_path, plagiarized_file_path): ...
2301_78305256/PaperContentSimilarityDetection
main.py
Python
unknown
2,337
import platform import sys import cpuinfo import psutil def get_system_environment(): # 获取操作系统信息 os_name = platform.system() os_version = platform.release() # 获取Python版本信息 python_version = sys.version # 获取CPU信息 cpu_info = cpuinfo.get_cpu_info() cpu_architecture = cpu_info.get('arch') ...
2301_78305256/PaperContentSimilarityDetection
system.py
Python
unknown
747
import math import numpy as np import matplotlib.pyplot as plt from itertools import permutations, combinations from collections import Counter import scipy.stats as stats def set_chinese_font(): """设置中文字体""" plt.rcParams['font.sans-serif'] = ['SimHei', 'Microsoft YaHei', 'DejaVu Sans'] plt.rcPar...
2301_78992106/juniorAndHighSchoolMath
三角函数.py
Python
unknown
2,656
import matplotlib.pyplot as plt import numpy as np import sympy as sp def set_chinese_font(): """设置中文字体""" plt.rcParams['font.sans-serif'] = ['SimHei', 'Microsoft YaHei', 'DejaVu Sans'] plt.rcParams['axes.unicode_minus'] = False # 解决负号显示问题 set_chinese_font() def inequalities_and_complex()...
2301_78992106/juniorAndHighSchoolMath
不等式与复数.py
Python
unknown
2,306
import matplotlib.pyplot as plt import numpy as np import sympy as sp def set_chinese_font(): """设置中文字体""" plt.rcParams['font.sans-serif'] = ['SimHei', 'Microsoft YaHei', 'DejaVu Sans'] plt.rcParams['axes.unicode_minus'] = False # 解决负号显示问题 set_chinese_font() def sets_and_functions(): p...
2301_78992106/juniorAndHighSchoolMath
代数部分-集合与函数.py
Python
unknown
2,179
import math import numpy as np import matplotlib.pyplot as plt from itertools import permutations, combinations from collections import Counter import scipy.stats as stats from mpl_toolkits.mplot3d import Axes3D def set_chinese_font(): """设置中文字体""" plt.rcParams['font.sans-serif'] = ['SimHei', 'Mi...
2301_78992106/juniorAndHighSchoolMath
几何部分-立体几何与向量.py
Python
unknown
2,532
import math import numpy as np import matplotlib.pyplot as plt from itertools import permutations, combinations from collections import Counter import scipy.stats as stats def set_chinese_font(): """设置中文字体""" plt.rcParams['font.sans-serif'] = ['SimHei', 'Microsoft YaHei', 'DejaVu Sans'] plt.rcPar...
2301_78992106/juniorAndHighSchoolMath
几何部分-解析几何.py
Python
unknown
2,591
import matplotlib.pyplot as plt import numpy as np def set_chinese_font(): """设置中文字体""" plt.rcParams['font.sans-serif'] = ['SimHei', 'Microsoft YaHei', 'DejaVu Sans'] plt.rcParams['axes.unicode_minus'] = False # 解决负号显示问题 set_chinese_font() def function_visualization(): # 定义x范围 x = ...
2301_78992106/juniorAndHighSchoolMath
函数可视化.py
Python
unknown
1,384
import matplotlib.pyplot as plt import matplotlib.patches as patches import numpy as np def set_chinese_font(): """设置中文字体""" plt.rcParams['font.sans-serif'] = ['SimHei', 'Microsoft YaHei', 'DejaVu Sans'] plt.rcParams['axes.unicode_minus'] = False # 解决负号显示问题 set_chinese_font() def plane_geomet...
2301_78992106/juniorAndHighSchoolMath
图像与几何1-平面图形计算与可视化.py
Python
unknown
2,329
import matplotlib.pyplot as plt from mpl_toolkits.mplot3d import Axes3D import numpy as np def set_chinese_font(): """设置中文字体""" plt.rcParams['font.sans-serif'] = ['SimHei', 'Microsoft YaHei', 'DejaVu Sans'] plt.rcParams['axes.unicode_minus'] = False # 解决负号显示问题 set_chinese_font() def solid_geo...
2301_78992106/juniorAndHighSchoolMath
图像与几何2-立体图形可视化.py
Python
unknown
3,026
import matplotlib.pyplot as plt import numpy as np def set_chinese_font(): """设置中文字体""" plt.rcParams['font.sans-serif'] = ['SimHei', 'Microsoft YaHei', 'DejaVu Sans'] plt.rcParams['axes.unicode_minus'] = False # 解决负号显示问题 set_chinese_font() def coordinate_geometry(): # 创建图形 fig, axes ...
2301_78992106/juniorAndHighSchoolMath
图像与几何3-坐标系与几何证明.py
Python
unknown
1,586
import numpy as np import matplotlib.pyplot as plt def set_chinese_font(): """设置中文字体""" plt.rcParams['font.sans-serif'] = ['SimHei', 'Microsoft YaHei', 'DejaVu Sans'] plt.rcParams['axes.unicode_minus'] = False # 解决负号显示问题 set_chinese_font() def word_problems(): # 问题1: 行程问题 def distanc...
2301_78992106/juniorAndHighSchoolMath
实际应用与数学建模-应用题求解1.py
Python
unknown
2,911
import math import numpy as np import matplotlib.pyplot as plt from itertools import permutations, combinations from collections import Counter import scipy.stats as stats def set_chinese_font(): """设置中文字体""" plt.rcParams['font.sans-serif'] = ['SimHei', 'Microsoft YaHei', 'DejaVu Sans'] plt.rcP...
2301_78992106/juniorAndHighSchoolMath
微积分基础.py
Python
unknown
2,470
import math import numpy as np import matplotlib.pyplot as plt from itertools import permutations, combinations from collections import Counter import scipy.stats as stats # 设置中文字体 def set_chinese_font(): """设置中文字体""" plt.rcParams['font.sans-serif'] = ['SimHei', 'Microsoft YaHei', 'DejaVu Sans'] ...
2301_78992106/juniorAndHighSchoolMath
排列组合和概率统计.py
Python
unknown
12,864
import matplotlib.pyplot as plt import numpy as np import sympy as sp def set_chinese_font(): """设置中文字体""" plt.rcParams['font.sans-serif'] = ['SimHei', 'Microsoft YaHei', 'DejaVu Sans'] plt.rcParams['axes.unicode_minus'] = False # 解决负号显示问题 set_chinese_font() def sequences_and_series(): ...
2301_78992106/juniorAndHighSchoolMath
数列.py
Python
unknown
2,129
import matplotlib.pyplot as plt import numpy as np import sympy as sp import math from itertools import permutations, combinations from scipy import stats def set_chinese_font(): """设置中文字体""" plt.rcParams['font.sans-serif'] = ['SimHei', 'Microsoft YaHei', 'DejaVu Sans'] plt.rcParams['axes.u...
2301_78992106/juniorAndHighSchoolMath
数列与数学归纳法.py
Python
unknown
2,936
import sympy as sp import numpy as np def set_chinese_font(): """设置中文字体""" plt.rcParams['font.sans-serif'] = ['SimHei', 'Microsoft YaHei', 'DejaVu Sans'] plt.rcParams['axes.unicode_minus'] = False # 解决负号显示问题 set_chinese_font() def equation_solving(): x = sp.Symbol('x') y = sp.Symbol(...
2301_78992106/juniorAndHighSchoolMath
方程求解.py
Python
unknown
823
import math import fractions def set_chinese_font(): """设置中文字体""" plt.rcParams['font.sans-serif'] = ['SimHei', 'Microsoft YaHei', 'DejaVu Sans'] plt.rcParams['axes.unicode_minus'] = False # 解决负号显示问题 set_chinese_font() def rational_number_demo(): f1 = fractions.Fraction(3,4) f2 = ...
2301_78992106/juniorAndHighSchoolMath
有理数与实数运算.py
Python
unknown
804
import random import matplotlib.pyplot as plt import numpy as np from collections import Counter def set_chinese_font(): """设置中文字体""" plt.rcParams['font.sans-serif'] = ['SimHei', 'Microsoft YaHei', 'DejaVu Sans'] plt.rcParams['axes.unicode_minus'] = False # 解决负号显示问题 set_chinese_font() def ...
2301_78992106/juniorAndHighSchoolMath
概率基础.py
Python
unknown
2,353
import numpy as np import matplotlib.pyplot as plt from scipy.optimize import curve_fit def set_chinese_font(): """设置中文字体""" plt.rcParams['font.sans-serif'] = ['SimHei', 'Microsoft YaHei', 'DejaVu Sans'] plt.rcParams['axes.unicode_minus'] = False # 解决负号显示问题 set_chinese_font() def mathematical...
2301_78992106/juniorAndHighSchoolMath
简单数学建模.py
Python
unknown
3,556
import matplotlib.pyplot as plt import numpy as np import pandas as pd def set_chinese_font(): """设置中文字体""" plt.rcParams['font.sans-serif'] = ['SimHei', 'Microsoft YaHei', 'DejaVu Sans'] plt.rcParams['axes.unicode_minus'] = False # 解决负号显示问题 set_chinese_font() def statistics_demo(): # 生...
2301_78992106/juniorAndHighSchoolMath
统计与概率-数据收集与统计图表.py
Python
unknown
1,959
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ 农产品市场价格管理平台 前后端一体化Web应用 """ from fastapi import FastAPI, HTTPException, BackgroundTasks from fastapi.staticfiles import StaticFiles from fastapi.responses import HTMLResponse, JSONResponse, FileResponse from fastapi.middleware.cors import CORSMiddleware from pydantic ...
2301_78526554/agricultural-platform
app.py
Python
unknown
20,850
# 核心模块
2301_78526554/agricultural-platform
core/__init__.py
Python
unknown
15
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ 配置管理模块 """ import os import json from pathlib import Path from typing import Dict, Any, List class Config: """配置管理类""" def __init__(self, config_file: str = "config.json"): self.config_file = config_file self.config = self.load_config() ...
2301_78526554/agricultural-platform
core/config.py
Python
unknown
6,326