You may need to configure a proxy server if you're having trouble cloning
or fetching from a remote repository or getting an error
like unable to access '...' Couldn't resolve host '...'.
Consider something like:
| """ | |
| 单词默写表格生成小工具 | |
| 读取包含了单词以及中文释义两列的 Excel 文件(也可以是 csv 文件) | |
| 然后按照 A4 纸大小排列可这翻折的单词默写表格形式 | |
| 每页 48 个单词,每个单词都需要默写中文释义以及中文对应的单词 | |
| """ | |
| import pandas as pd | |
| import openpyxl | |
| from openpyxl.styles import Alignment, Border, Side | |
| from openpyxl.worksheet.page import PageMargins |
| #include <assert.h> | |
| #include <stdlib.h> | |
| #include <string.h> | |
| #include <stdint.h> | |
| #include <stdio.h> | |
| #define N (100000063/64) | |
| struct bitset { | |
| uint64_t bits[N]; |
| #! python2 | |
| # NOTE: The first line in this script specifies that it should always be run using Python 2.7. | |
| # The `midiutil` module is currently not available for Python 3. | |
| '''Generates a MIDI file with 12 random notes in C major, using the midiutil module. The instrument is also picked randomly. The result is then played with the sound.MIDIPlayer class. | |
| If nothing happens, make sure that your device isn't muted. | |
| ''' | |
| from midiutil.MidiFile import MIDIFile |
| # coding: utf-8 | |
| # # 持续训练 | |
| # | |
| # 问题提出: 如果人脸识别在使用中发现准确率并不够高, 是否可以继续改进? 如何在已有的基础之上继续改进? | |
| # | |
| # 解决方法: 建立并联的判别神经网络, 将A人脸的128位编码和待测人脸的128位编码作为输入, 二值判别输出 | |
| # * 路径A: 计算二阶范数距离, 并以原题目中的阈值作为分界, 形成输出 | |
| # * 路径B: 待训练神经网络, 早期时参数值都很小, 因此输出值也很小, 但可被训练. |
| library(tidyverse) | |
| library(gganimate) | |
| NUMPLAYERS = 45 | |
| ROUNDS = 5000 | |
| INITWEALTH = 45 | |
| #initialize the bank | |
| #columns wealths of the NUMPLAYERS players | |
| #rows show wealths of each of the ROUNDS ticks of the clocks |
| #thanks to: | |
| https://www.torproject.org/docs/debian | |
| http://askubuntu.com/questions/501496/how-to-install-tor-with-meek-support | |
| https://plus.google.com/+GhostAssassin/posts/26zCmDmjYXP | |
| #In /etc/apt/sources.list: | |
| deb http://deb.torproject.org/torproject.org trusty main | |
| deb-src http://deb.torproject.org/torproject.org trusty main | |
| #Run: | |
| sudo apt-get update |
| #!/usr/bin/env python3 | |
| from securitycenter import SecurityCenter5 | |
| import subprocess | |
| def vulns(): | |
| sc = SecurityCenter5('nessus') | |
| sc.login('nessusapi', 'Afinepassword!') | |
| response = sc.get('status') | |
| hosts = sc.analysis(tool='sumip', page=0, page_size=10, sortDir='desc',sortField='score') |
| <?php | |
| /* | |
| udp/tcp dns client for google dns over https (https://dns.google.com) | |
| ubuntu上使用: | |
| 在/etc/rc.local里加/usr/bin/php /home/<your_name>/dns2https.php | |
| 执行: | |
| systemctl disable unbound | |
| systemctl disable dnscrypt-proxy |
| # User ssh configuration file ~/.ssh/config | |
| # Gist https://gist.github.com/terrywang/3997931 | |
| # man ssh_config for more information | |
| # Inspired by the blog post below to fight the NSA | |
| # https://stribika.github.io/2015/01/04/secure-secure-shell.html | |
| # Github needs diffie-hellman-group-exchange-sha1 some of the time but not always | |
| # Host github.com | |
| # KexAlgorithms [email protected],diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1 |