Skip to content

Instantly share code, notes, and snippets.

View luqiang21's full-sized avatar
🏸
Focusing

Qiang Lu luqiang21

🏸
Focusing
View GitHub Profile
@luqiang21
luqiang21 / split.cpp
Last active April 13, 2020 00:07
c++ string split
#include <string>
#include <vector>
void split(vector<string>& splitted, string& pattern, char delimiter) {
if (pattern.size() == 0) {
splitted.push_back(pattern);
return;
}
int start = 0, i;
@luqiang21
luqiang21 / genetic.py
Created March 30, 2016 02:20 — forked from bellbind/genetic.py
[python]Genetic Algorithm example
"""Genetic Algorithmn Implementation
see:
http://www.obitko.com/tutorials/genetic-algorithms/ga-basic-description.php
"""
import random
class GeneticAlgorithm(object):
def __init__(self, genetics):
self.genetics = genetics
pass