Skip to content

Instantly share code, notes, and snippets.

View contropist's full-sized avatar
😆
Life is fantastic!

Contropist contropist

😆
Life is fantastic!
View GitHub Profile
@ninehills
ninehills / chatpdf-zh.ipynb
Last active September 2, 2024 14:22
ChatPDF-zh.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@lidangzzz
lidangzzz / linearRegression.hhs
Last active August 18, 2020 18:12
linearRegression.hhs
class LinearRegression {
w: Mat;
constructor() { }
//x: M-by-N matrix. M data with N dimensions. Each row is an N-dim vector
//y: M-by-1 matrix
fit(x_: Mat, y_: Mat) : LinearRegression{
let y = y_;
if (y_.rows != 1 && y_.cols == 1) {y = y_.T();} //check the dimension of y
var x = x_.resize(x_.rows, x_.cols + 1, 1); //expan x_ with one more column with 1
@nickfox-taterli
nickfox-taterli / v2ray-detect.nse
Last active March 8, 2020 09:37
vmess ws 检测脚本(配合nmap)
-- 只扫原生WS,不要太恐慌.
local stdnse = require "stdnse"
local http = require "http"
categories = { "default", "discovery", "safe" }
portrule = function(host, port)
return true
end
@nickfox-taterli
nickfox-taterli / ForwardMail.py
Last active September 5, 2020 06:53
ForwardMail
import requests
import json
import base64
import sqlite3
import zlib
import time
from datetime import datetime
from gql import gql, Client
from gql.transport.requests import RequestsHTTPTransport
@payjscn
payjscn / payjs_check_demo.php
Created July 3, 2019 10:16
PAYJS 订单查询接口 PHP DEMO
<?php
class Payjs
{
private $url = 'https://payjs.cn/api/check';
private $key = ''; // 填写通信密钥
private $mchid = ''; // 特写商户号
public function __construct($payjs_order_id=null) {
$this->payjs_order_id = $payjs_order_id;
}
@vladalive
vladalive / gdrive_download.md
Created May 16, 2019 14:38
Download Google Drive files from linux terminal via wget

Setup:

  1. Add this code to your ~/.bash_aliases file.
function gdrive_download () {
  CONFIRM=$(wget --quiet --save-cookies /tmp/cookies.txt --keep-session-cookies --no-check-certificate "https://docs.google.com/uc?export=download&id=$1" -O- | sed -rn 's/.*confirm=([0-9A-Za-z_]+).*/\1\n/p')
  wget --load-cookies /tmp/cookies.txt "https://docs.google.com/uc?export=download&confirm=$CONFIRM&id=$1" -O $2
  rm -rf /tmp/cookies.txt
}
@simonmysun
simonmysun / vs .achievement.md
Last active June 7, 2019 15:28
Visual Studio 成就系统大全,从今天起,做一个快乐的程序员,面朝成就,春暖花开!

Visual Studio 成就系统大全,从今天起,做一个快乐的程序员,面朝成就,春暖花开!

来源: 付鹏的日志

想当年WOW推出成就系统的时候,我就很不争气的沉迷了,收集了无数的宠物啊,下了无数的本啊,都是TMD痛苦回忆啊!后来WLK的时候AFK了,还挺怀念自己的5000+的成就点数的,没想到,现在微软效仿WOW,在自己的编程软件visual studio中加入了成就系统,供程序员们互相炫耀用。这必然会掀起程序员的编程上瘾的毛病,过几年也许程序员就成了精神病,需要电击了!

在这里添加上这个成就系统插件的地址:http://channel9.msdn.com/achievements/visualstudio 再附张图: 下附VS

所有成就列表:(该成就列表不全,我申请完成就系统就给了个成就,这里就没有……)彩色字体表示笔者已完成的成就,大家共勉,貌似有些成就已经不再存在于列表之中了。

@littleya
littleya / delugeAutoDelete.py
Last active February 20, 2024 00:39
u2@share
# -*- coding:utf-8 -*-
# !/usr/bin/env python3
'''
Author: ayasakinagi
Email: [email protected]
环境: Python3
依赖: deluge_client
使用: 修改host, port, username, password, limitSize, dataPath变量
@ziyuang
ziyuang / install_mxnet_p2xlarge.sh
Created January 13, 2017 18:57
Install MXNet (with Anaconda Python 3, CUDA, cuDNN, Intel MKL, OpenCV, Zsh) for p2.xlarge on Ubuntu 16.04 (ami-6f587e1c).
#!/bin/bash
set -e
# Put
# 1. CUDA installation script (cuda_*.run, see https://developer.nvidia.com/cuda-downloads)
# 2. cuDNN archive (cudnn-*.tgz, see https://developer.nvidia.com/rdp/cudnn-download)
# 3. Intel MKL archive (l_mkl_*.tgz, see https://software.intel.com/en-us/intel-mkl)
# under $HOME
# Also set INTEL_MKL_SN to Intel MKL's serial number (XXXX-XXXXXXXX)
@tschoonover
tschoonover / bootstrap-dotnet
Last active June 6, 2019 07:52
Install .NET Core 1.1 and VS Code with C# extension for Linux Mint 18 / Ubuntu 16.04 (amd64)
#!/bin/bash
#dotnet
sh -c 'echo "deb [arch=amd64] https://apt-mo.trafficmanager.net/repos/dotnet-release/ xenial main" > /etc/apt/sources.list.d/dotnetdev.list'
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 417A0893
apt-get update
apt-get install dotnet-dev-1.0.0-preview2.1-003177
#vscode
wget "https://go.microsoft.com/fwlink/?LinkID=760868" -qO /tmp/vscode.deb && dpkg -i /tmp/vscode.deb