emacs --daemon
to run in the background.
emacsclient.emacs24 <filename/dirname>
to open in terminal
NOTE: "M-m and SPC can be used interchangeably".
- Undo -
C-/
- Redo -
C-?
- Change case: 1. Camel Case :
M-c
2. Upper Case :M-u
- Lower Case :
M-l
emacs --daemon
to run in the background.
emacsclient.emacs24 <filename/dirname>
to open in terminal
NOTE: "M-m and SPC can be used interchangeably".
C-/
C-?
M-c
2. Upper Case : M-u
M-l
"""Full code for scraper | |
Code used in the Twitter Streaming with Python tutorial | |
Author: Lester James V. Miranda | |
Blog post: https://ljvmiranda921.github.io/notebook/2017/02/24/twitter-streaming-using-python/ | |
""" | |
from __future__ import absolute_import, print_function |
This implementation of the Ant System (a variation of Ant Colony Optimization) [1] aims to solve the Traveling Salesman Problem. The problem is to find the shortest tour distance given a list of cities represented by its x and y coordinates where each city is visited only once. This was tested using the berlin52
dataset found [here] (http://elib.zib.de/pub/mp-testdata/tsp/tsplib/tsp/berlin52.tsp).
tour
). They first start at a randomly generated starting area (start_places), and jump to each node. The jumps are controlled by the attractiveness of the node raised to beta, and the pheromone effect raised to alpha.This is a simple implementation of a 2-M-1 neural network trained using different optimization algorithms in order to solve the two-spiral problem. The two-spiral problem is a particularly difficult problem that requires separating two logistic spirals from one another [1] [2].
Solution for the inverse kinematics problem using Particle Swarm Optimization (PSO)
Blog Post: https://ljvmiranda921.github.io/notebook/2017/02/04/inverse-kinematics-pso/
Inverse Kinematics (IK) is one of the most challenging problems in robotics. The problem involves finding an optimal pose for a manipulator given the position of the end-tip effector. This can be seen in contrast with forward kinematics, where the end-tip position is sought given the pose or joint configuration. Normally, this position is expressed as a point in a coordinate system (e.g., in a Cartesian system, it is a point comprising of x, y, and z coordinates.). On the other hand, the manipulator's pose can be expressed as the collection of joint variables that can describe the angle of bending or twist (in revolute joints) or length of extension (in prismatic joints).
This utilizes a three-layer neural network (2 hidden layers with tanh and 1 output layer with softmax) to solve the two-spiral problem.
Included in this gist is data_utils.py
which has the method load_twin_spiral()
in order to generate the data. All of the computations in the neural network (feedforward and backpropagation) are done using the numpy
package.
If you wish to use the classes in this gist, simply import the module network
and load the class:
from network import *
from data_utils import *