Install and use qwt under macOS*:
After downloading it from here https://sourceforge.net/projects/qwt/:
cd qwt-6.1.5
mkdir build && cd build
qmake ..
make -j4
sudo make install # this command install stuff inside /usr/local/
Required: Visual Studio 2015 or 2017 (or probably later works) | |
Setup | |
1. Clone/download OpenSSL 1.1.1 source to a folder | |
2. Download / install Perl (They recommend Active perl) | |
I recommend using Chocolatey so for me: choco install activeperl | |
3. Ensure Perl is in the system path. (Choco appears to do this by default) | |
4. Download / install NASM | |
I recommend using Chocolatey so for me: choco install nasm | |
5. Ensure NASM is in the system path. (For me the directory to add was C:\Program Files\NASM) |
#pragma once | |
//TODO include appropriate headers | |
#include <QtCore/QtCore> | |
#include <QtXml/QtXml> | |
bool readSettingsXml(QIODevice &device, QMap<QString, QVariant> &map); | |
bool writeSettingsXml(QIODevice &device, const QMap<QString, QVariant> &map); | |
static const QSettings::Format xmlFormat = QSettings::registerFormat("xml", &readSettingsXml, &writeSettingsXml); | |
static const QString rootName = "config"; |
*.user | |
Makefile* | |
.qmake.stash | |
release | |
debug | |
*.swp | |
*~ |
After downloading it from here https://sourceforge.net/projects/qwt/:
cd qwt-6.1.5
mkdir build && cd build
qmake ..
make -j4
sudo make install # this command install stuff inside /usr/local/
############################################################################################## | |
### K-Means Python Implementation ### | |
### http://konukoii.com/blog/2017/01/15/5-min-tutorial-k-means-clustering-in-python/ ### | |
############################################################################################## | |
import random | |
import math | |
#Euclidian Distance between two d-dimensional points | |
def eucldist(p0,p1): |
#!/usr/bin/python2 | |
# Copyright (C) 2016 Sixten Bergman | |
# License WTFPL | |
# | |
# This program is free software. It comes without any warranty, to the extent | |
# permitted by applicable law. | |
# You can redistribute it and/or modify it under the terms of the Do What The | |
# Fuck You Want To Public License, Version 2, as published by Sam Hocevar. See |
class Base : INotifyPropertyChanged | |
{ | |
public event PropertyChangedEventHandler PropertyChanged; | |
protected virtual void OnPropertyChanged(string propertyName) | |
{ | |
this.VerifyPropertyName(propertyName); | |
PropertyChangedEventHandler handler = this.PropertyChanged; | |
if (handler != null) | |
{ |