Skip to content

Instantly share code, notes, and snippets.

View mindcont's full-sized avatar
🎯
Focusing

Apes mindcont

🎯
Focusing
View GitHub Profile
@mindcont
mindcont / ga.py
Last active August 12, 2016 05:25
利用基因遗传算法中进行文本匹配
"""Genetic Algorithmn Implementation
"""
#引入随机函数
import random
#定义基因遗传算法顶层接口
class GeneticAlgorithm(object):
# 定义算法初始化
def __init__(self, genetics):
@mindcont
mindcont / tsp_ga.m
Last active April 4, 2023 16:17
旅行商问题(TSP)利用遗传算法解决-Matlab
function varargout = tsp_ga(xy,dmat,pop_size,num_iter,show_prog,show_res)
%tsp_ga旅行商问题(TSP)的遗传算法(GA)
% 查找(近)的最佳解决方案,通过设置一个遗传算法搜索到的旅行商
% 的最短路线(最少的推销员旅行到每个城市准确的一次,回到起点城市)
%
%概要:
% 1、一个单一的推销员旅行到每个城市和完成
% 他从一开始就开始返回城市的路线
% 2、每一个城市都有一次被推销员拜访过
%
@mindcont
mindcont / Ubuntu 14.04 64bit + Caffe + CUDA 7.5 + Intel MKL 配置说明.md
Last active May 21, 2019 07:45
Ubuntu 14.04 64bit + Caffe + CUDA 7.5 + Intel MKL 配置说明

Ubuntu 14.04 64bit + Caffe + CUDA 7.5 + Intel MKL 配置说明

本步骤经笔者亲身实践,集百家所长,能实现Caffe在NVIDIA GPU下进行计算。

1. 安装开发所需的依赖包

安装开发所需要的一些基本包

sudo apt-get install build-essential  # basic requirement
sudo apt-get install vim cmake git    # tools
sudo apt-get install libprotobuf-dev libleveldb-dev libsnappy-dev libopencv-dev libboost-all-dev libhdf5-serial-dev libgflags-dev libgoogle-glog-dev liblmdb-dev protobuf-compiler libatlas-base-dev #required by caffe
@mindcont
mindcont / adbwifi.sh
Created February 24, 2017 01:47 — forked from stormzhang/adbwifi.sh
shell script for adb wifi
#!/bin/bash
#Modify this with your IP range
MY_IP_RANGE="192\.168\.1"
#You usually wouldn't have to modify this
PORT_BASE=5555
#List the devices on the screen for your viewing pleasure
adb devices
@mindcont
mindcont / jandan.py
Created April 4, 2017 09:03
python爬虫-抓取煎蛋妹子图
#!/usr/bin/python
# -*- coding:utf-8 -*-
import threading
import requests
import re
import sys
from bs4 import BeautifulSoup
from datetime import datetime
from lxml import etree
@mindcont
mindcont / phpmyadmin-connect-remote-mysql.md
Last active April 11, 2017 03:01
本地 phpmyadmin 连接远程数据库 local phpmyadmin connect remote mysql database

1.屏蔽本地连接

ERROR 2003 (HY000): Can't connect to MySQL server on '127.0.0.1

run the command vim /etc/mysql/my.cnf.
comment bind-address = 127.0.0.1 using the # symbol.
restart your mysql server once.

2.远程访问权限

@mindcont
mindcont / tip.md
Last active October 6, 2018 01:48
Linux平台常用配置

常用软件

#新立得软件包 (synaptic)
sudo apt-get install synaptic

# ibus 谷歌拼音
sudo apt-get install ibus-googlepinyin
ibus-setup
@mindcont
mindcont / git-command.md
Last active October 6, 2018 01:07
git 常用指令操作

git 常用指令操作

本文针对初级用户,从最简单的讲起,但是需要读者对Git的基本用法有所了解。同时,本文覆盖了上面5个命令的几乎所有的常用用法,所以对于熟练用户也有参考价值。

1 git clone

本地主机生成一个目录,与远程主机的版本库同名

$ git clone https://github.com/torch/distro.git ~/torch --recursive
@mindcont
mindcont / nginx-php-mysql-install.md
Last active April 27, 2017 07:20
nginx、php7、mysql 安装指南

nginx

To add NGINX yum repository, create a file named /etc/yum.repos.d/nginx.repo and paste one of the configurations below:

CentOS:

[nginx]
name=nginx repo
baseurl=http://nginx.org/packages/centos/$releasever/$basearch/
gpgcheck=0
enabled=1
@mindcont
mindcont / openwrt-upgrade.sh
Created May 4, 2017 12:58
upgrade software in openwrt
#!/bin/sh
opkg update
for ipk in $(opkg list-upgradable | awk '$1!~/^kmod|^Multiple/{print $1}'); do
opkg upgrade $ipk
done