Wikipedia

Search results

05 August 2019

List of Machine Learning algorithms


  • Almeida Pineda Recurrent Backpropagation
  • Backpropagation
  • Bootstrap Aggregating
  • CN2 Algorithm
  • Constructing Skill Trees
  • Dehaene Changeux Model
  • Diffusion Map
  • Dominance-Based Rough Set Approach
  • Dynamic Time Warping
  • Error-Driven Learning
  • Evolutionary Multimodal Optimization
  • Expectation Maximization Algorithm
  • FastICA
  • Forward Backward Algorithm
  • GeneRec
  • Genetic Algorithm for Rule Set Production
  • Growing Self-Organizing Map
  • HEXQ
  • Hyper Basis Function Network
  • IDistance
  • K-Nearest Neighbors Algorithm
  • Kernel Methods for Vector Output
  • Kernel Principal Component Analysis
  • Leabra
  • Learning to Learn
  • Linde Buzo Gray Algorithm
  • Local Outlier Factor
  • LogitBoost
  • Loss Functions for Classification
  • Manifold Alignment
  • Minimum Redundancy Feature Selection
  • Multiple Kernel Learning
  • Non-Negative Matrix Factorization
  • Prefrontal Cortex Basal Ganglia Working Memory
  • Primary Value Learned Value  Model
  • Q-Learning
  • Quadratic Unconstrained Binary Optimization
  • Query Level Feature
  • Quickprop
  • Radial Basis Function Network
  • Randomized Weighted Majority Algorithm
  • Reinforcement Learning
  • Rprop
  • Semi-supervised Learning
  • Skill Chaining
  • Sparse PCA
  • State-Action-Reward-State-Action
  • Stochastic Gradient Descent
  • Supervised Learning
  • T-Distributed Stochastic Neighbor Embedding
  • Temporal Difference Learning
  • Transduction
  • Unsupervised Learning
  • Wake-Sleep Algorithm
  • Weighted Majority Algorithm

29 April 2019

How to remove a large file from commit history in git

I had committed a headless Chromium module. The purpose of committing modules for me in late stage projects is to make sure they exist, who knows what could happen later. Nevermind it's a module, this may have well been an errant zip file or anything preventing size-limited transfers.

This method will remove any file from any commit in history.


$ git filter-branch --tree-filter 'rm -rf node_modules/pdf-puppeteer' HEAD
$ # or 'rm -f $FILENAME'

20 April 2019

CentOS sshd security helpers

list all unique IPs that failed login

egrep "Failed|Failure" /var/log/secure| grep -Po "[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+" | sort | uniq -c



clear logs without interruption

cat /dev/null > /var/log/secure



logs not collecting, erroneous empty of log directory

systemctl status rsyslog.service
systemctl status sshd.service

systemctl reload rsyslog.service
systemctl restart rsyslog.service

07 April 2019

Find and block failed SSH logins on CentOS

Got a problem with others trying to brute force the root password on your box?


I'm not running vsftpd, yet it's a similar process. My concern is limited to third-parties trying to access my box with SSH.
This is what I did:
Tecmint showed me how to grep the IPs:
# egrep "Failed|Failure" /var/log/secure
Apr  7 03:42:13 67 sshd[4868]: Failed password for root from 186.233.231.44 port 56075 ssh2
Apr  7 03:45:19 67 sshd[4871]: Failed password for root from 38.140.192.165 port 52138 ssh2
Apr  7 03:47:16 67 sshd[4874]: Failed password for root from 35.221.157.112 port 36306 ssh2
Apr  7 03:49:01 67 sshd[4877]: Failed password for root from 153.127.193.168 port 40604 ssh2
Apr  7 03:50:54 67 sshd[4881]: Failed password for root from 89.109.54.214 port 52268 ssh2
Apr  7 04:01:07 67 sshd[4900]: Failed password for root from 14.63.192.249 port 37507 ssh2
Apr  7 04:04:49 67 sshd[4905]: Failed password for root from 41.228.165.225 port 35462 ssh2
Apr  7 04:05:40 67 sshd[4909]: Failed password for root from 195.142.122.126 port 42548 ssh2
Apr  7 04:16:17 67 sshd[4914]: Failed password for root from 103.120.224.3 port 51416 ssh2
Apr  7 04:26:00 67 sshd[4919]: Failed password for root from 139.59.79.56 port 40074 ssh2
Apr  7 04:37:27 67 sshd[4925]: Failed password for root from 103.27.236.2 port 60528 ssh2
Apr  7 04:44:33 67 sshd[4968]: Failed password for root from 18.214.68.139 port 60896 ssh2
Apr  7 04:53:24 67 sshd[4991]: Failed password for root from 193.36.184.175 port 41408 ssh2
Apr  7 04:56:09 67 sshd[4995]: Failed password for root from 1.250.62.223 port 59052 ssh2
Apr  7 05:00:45 67 sshd[4998]: Failed password for root from 183.82.63.212 port 43840 ssh2
Apr  7 05:05:41 67 sshd[5016]: Failed password for root from 186.103.146.148 port 55982 ssh2
Apr  7 05:10:14 67 sshd[5038]: Failed password for root from 68.183.4.19 port 34894 ssh2

From there I updated my /etc/hosts.deny file to the following:
# /etc/hosts.deny
#
# hosts.deny    This file contains access rules which are used to
#               deny connections to network services that either use
#               the tcp_wrappers library or that have been
#               started through a tcp_wrappers-enabled xinetd.
#
#               The rules in this file can also be set up in
#               /etc/hosts.allow with a 'deny' option instead.
#
#               See 'man 5 hosts_options' and 'man 5 hosts_access'
#               for information on rule syntax.
#               See 'man tcpd' for information on tcp_wrappers
#
sshd: 186.233.231.44
sshd: 38.140.192.165
sshd: 35.221.157.112
sshd: 153.127.193.168
sshd: 89.109.54.214
sshd: 14.63.192.249
sshd: 41.228.165.225
sshd: 195.142.122.126
sshd: 103.120.224.3
sshd: 139.59.79.56
sshd: 103.27.236.2
sshd: 18.214.68.139
sshd: 193.36.184.175
sshd: 1.250.62.223
sshd: 183.82.63.212
sshd: 186.103.146.148
sshd: 68.183.4.19

Just let systemd know it needs to update changes, and voila. It's done.
# systemctl restart sshd

18 January 2019

Deno, the new paradigm in writing full stack applications with Javascript

Deno is a new language paradigm. It’s a frontier where intelligent design decisions intersect with the bleeding edge of technology, and backed by a great community of open source contributors.

I’ve had the fortune of spending time with some of the contributors that helped guide my learning that I would like to share with you here.

Building Deno


It’s not just about cargo build, be sure to run tools/setup.py, update submodules, and run tools/build.py — these are explained much more well in the references below.

Flatbuffers in Deno


The primary benefit of Deno is although V8 exists in the runtime it’s abstracted away from end-users. Whereas Node was weighed down by having to directly interact with V8, Deno placed substantial consideration and effort to avoid having developers and contributors rely on interacting with V8, which benefits in a variety of ways:

  • no longer having to deal with the subtle mishandlings that developers fear when it comes to using C++ 
  • no longer having to know and interact with the inner workings of a very large code base that exists in V8
  • leveraging the power of Rust’s benefits for resource management, concurrency, and parallelism

There’s also the issue of implementing best practices, and Flatbuffers enters the space here. Similar to Protobuf in that message parsing can be serialized and deserialized across a variety of languages, Flatbuffers can consume much less memory than Protocol Buffers, and work much more fast and smart.

This is only a sampling of what makes Deno exciting, and I haven’t even scratched the surface yet.

Check out the Flatbuffer declarations in src/msg.fbs

Essentially, the Typescript frontend will serialize messages to a Rust backend that’s managed by the Tokio framework (https://github.com/tokio-rs/tokio). The Rust backend deserializes the message, performs the task, serializes the response, and sends it back to the Typescript.

Navigating Deno


Open src/main.rs and proceed to navigate from there. One point to note is that the standard library exists as a submodule that can be found in the denoland at Github (https://github.com/denoland/).

I hope you check it out for yourself. Deno’s looking forward to a bright future, and it’s just getting started!

Resources:

Denolib Guide, a guide to Deno Core: https://github.com/denolib/guide
Awesome Deno, list of things related to Deno: https://github.com/denolib/awesome-deno
Guide to V8 for base familiarity: https://denolib.github.io/v8-docs/

07 August 2018

mongoexport Unrecognized field 'snapshot'

Try to get your data out of Mongo and you may find yourself butting heads with

Unrecognized field 'snapshot' 


You should know there are options to skip including `snapshot` in your export query, my guess is this applies to dumps also.



https://github.com/mongodb/mongo-tools/blob/master/mongoexport/mongoexport.go


To get around this error, pass in the flag:

# mongoexport  --forceTableScan -d db_name -c collection_name > my_export.json

16 January 2018

Error type 3: Activity class does not exist

This happens when you do the following
  • connect your device/emulator
  • run the app from Android Studio (AS)
  • use/test the app and uninstall it from the device while it is still connected to your computer
  • try to run the app again from AS
AS thinks you still have the app in your device.
tl;dr - To resolve this issue for connected devices you can uninstall with ADB:
$ adb shell pm list packages
package:com.foo.foo

$ adb uninstall com.foo.foo
Success

Run app from AS again after uninstalling with ADB.