Notes on obtaining the number of star items that a user has on GitHub

For StarsKeeper development, you need to get the total number of projects that a user has started on GitHub, as shown below. The first thing I thought about was the user-related api, with Authorization Token on the headers, which is actually the API https://api.github.com/user. But this is the case.There are followers and following numbers, but no starred repo. SO After searching, there was a similar problem. The method is very simple, a little hack meaning. Take user hanzichi as an example, request https://api.github.com/users/hanzichi/starred? PerIf you add Authorization Token, then it̵...

P1592 mutual quality

Input: two positive integers n and K, and K positive integers with n are coprime. $n≤10^6,k≤10^8$   You can quote the number of Coprime, and find that there is a cycle. For example, 10 The 1379111317192123 272931333739 of its coprime Horizontal groove section!!!!! The circular section is equal to 4, the difference =10 (n) of each cycle. So… First deal with 1-N and N coprime. Then find K’s loop section. #include<cstdio> #include<iostream> #include<cstring> #include<cctype> #include<algorithm> using namespace std; #define int long long #d...

GridSearchCV cross validation

Code implementation (based on logistic regression algorithm): 1 # -*- coding: utf-8 -*- 2 """ 3 Created on Sat Sep 1 11:54:48 2018 4 5 @author: zhen 6 7 Cross validation 8 """ 9 import numpy as np 10 from sklearn import datasets 11 from sklearn.linear_model import LogisticRegression 12 from sklearn.model_selection import GridSearchCV 13 import matplotlib.pyplot as plt 14 15 iris = datasets.load_iris() 16 x = iris['data'][:, 3:] 17 y = iris['target'] 18 19 20 def report(results, n_top=3): 21 for i in range(1, n_top + 1): 22 candidates = np.flatnonzero(results['ra...

DateUtils

To be sorted out package com.icil.esolution.utils; /** * ******************************************** * @ClassName: DateUtils * @Description: * @author Sea * @date 28 Aug 2018 9:51:49 PM * *************************************************** */ import java.text.ParseException; import java.text.SimpleDateFormat; import java.time.Instant; import java.time.LocalDateTime; import java.time.ZoneId; import java.time.format.DateTimeFormatter; import java.util.Date; import org.springframework.util.Assert; public class DateUtils { /** * @Desc Date to String like: yyy...

Using yaml to write configuration files

yamlIt is a data serialization standard which is suitable for all development languages, and the biggest feature is good readability. yamlOne of the main application directions is to write configuration files. There are many systems and frameworks configured with yaml. yamlThere are the following basic rules: 1、Case sensitive2、Use indentation to represent hierarchical relationships3、No tab indentation is allowed, only space key is allowed.4、The indentation length is not limited, as long as element alignment means that these elements belong to a hierarchy.  5、Use notes to indicate ...

VS2017 package registration IE plug-in and modify IE security options settings

  .title2 { padding: 5px; font-weight: bold; background-color: #f6f6f6 } .bordered { border: 1px solid #ccc; background-color: #f8f8f8; margin-bottom: 5px } Preface Recently, the project needs to read employee ID card information in the browser environment. To realize the communication between web pages and hardware devices, several implementation methods are considered. 1.With ActiveX plug-in, it communicates directly with the device through the library.        Advantages: manufacturers provide IE plug-ins, simple development.        Disadvantages: it can only run in IE browsers. U...