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
//https://blog.csdn.net/qq_26914291/article/details/78341772 | |
import android.app.Activity; | |
import android.graphics.Bitmap; | |
import android.net.http.SslError; | |
import android.os.Build; | |
import android.support.annotation.RequiresApi; | |
import android.view.ViewGroup; | |
import android.webkit.CookieManager; | |
import android.webkit.CookieSyncManager; |
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
//显示toast | |
fun String.showToast(duration: Int = Toast.LENGTH_SHORT) { | |
Toast.makeText(MyApplication.context, this, duration).show() | |
} | |
fun Int.showToast(duration: Int = Toast.LENGTH_SHORT) { | |
Toast.makeText(MyApplication.context, this, duration).show() | |
} | |
// 加载过程的布局变换 |
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
plugins { | |
id "com.diffplug.spotless" version "5.14.3" | |
} | |
subprojects { | |
apply plugin: "com.diffplug.spotless" | |
spotless { | |
kotlin { | |
target "**/*.kt" | |
targetExclude("$buildDir/**/*.kt") |
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
from typing import List | |
import pandas as pd | |
student_number_conversion = {} | |
def change_number(pre: str) -> str: | |
if pre in student_number_conversion.keys(): | |
return student_number_conversion[pre] |
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
package main | |
import ( | |
"context" | |
"database/sql" | |
"flag" | |
"log" | |
"os" | |
"os/exec" | |
"strconv" |
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
import numpy as np | |
import pandas as pd | |
import seaborn as sns | |
from matplotlib import pyplot as plt | |
from sklearn.datasets import load_boston | |
from sklearn.ensemble import GradientBoostingRegressor | |
from sklearn.linear_model import LinearRegression | |
from sklearn.preprocessing import StandardScaler | |
from sklearn.metrics import mean_squared_error, mean_absolute_error | |
from sklearn.model_selection import train_test_split, learning_curve, ShuffleSplit |
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
/** | |
* 处理统一返回结果和异常 | |
*/ | |
@RestControllerAdvice | |
class ResponseAdvisor : ResponseBodyAdvice<Any> { | |
data class Result<T>( | |
val status: Int = HttpStatus.OK.value(), | |
val message: String = "成功", | |
val data: T? = null, |
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
{ | |
"nbformat": 4, | |
"nbformat_minor": 0, | |
"metadata": { | |
"colab": { | |
"name": "学生成绩分类", | |
"provenance": [], | |
"toc_visible": true, | |
"authorship_tag": "ABX9TyNDT9c9JZD+l0wV/bhTLPUK", | |
"include_colab_link": true |
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
alias ll='ls -al' | |
# fix pip command in zsh | |
alias pip='noglob pip' | |
# set proxy | |
export https_proxy=http://127.0.0.1:7890 http_proxy=http://127.0.0.1:7890 all_proxy=socks5://127.0.0.1:7890 | |
# nvm | |
export NVM_DIR="$HOME/.nvm" | |
[ -s "/usr/local/opt/nvm/nvm.sh" ] && . "/usr/local/opt/nvm/nvm.sh" # This loads nvm |
OlderNewer