| 1 | package com.matoking.dungeoncrawler.state; | |
| 2 | ||
| 3 | import com.matoking.dungeoncrawler.state.entities.Key; | |
| 4 | import java.util.ArrayDeque; | |
| 5 | import java.util.ArrayList; | |
| 6 | import java.util.PriorityQueue; | |
| 7 | ||
| 8 | /** | |
| 9 | * Class responsible for doing pathfinding. Uses Dijkstra's algorithm. | |
| 10 | * | |
| 11 | * @author matoking | |
| 12 | */ | |
| 13 | public class Pathfinding { | |
| 14 | private GameState gameState; | |
| 15 | | |
| 16 | private ArrayList<Integer>[] graph; | |
| 17 | private int[] previous; | |
| 18 | | |
| 19 | private int[] distance; | |
| 20 | private int[][] length; | |
| 21 | | |
| 22 | private boolean[] scanned; | |
| 23 | public Coordinate nextStepToGoal; | |
| 24 | | |
| 25 | private int stepsToGoal = -1; | |
| 26 | | |
| 27 | public PriorityQueue<Coordinate> queue; | |
| 28 | | |
| 29 | public Pathfinding(GameState gameState) { | |
| 30 | this.gameState = gameState; | |
| 31 | } | |
| 32 | | |
| 33 | /** | |
| 34 | * Calculates the shortest path to the goal and then returns the Coordinate to the next step | |
| 35 | * leading to the goal | |
| 36 | * | |
| 37 | * @return Direction to move to in order to follow the shortest path to the goal, null if | |
| 38 | * valid path couldn't be found | |
| 39 | */ | |
| 40 | public Coordinate getNextStepToGoal() { | |
| 41 | 1 | return this.nextStepToGoal; |
| 42 | } | |
| 43 | | |
| 44 | /** | |
| 45 | * Gets amount of steps to goal | |
| 46 | * | |
| 47 | * @return Returns -1 if no pathfinding has been done or no valid path was found, otherwise | |
| 48 | * returns amount of steps to goal | |
| 49 | */ | |
| 50 | public int getStepsToGoal() { | |
| 51 | 1 | return this.stepsToGoal; |
| 52 | } | |
| 53 | | |
| 54 | /** | |
| 55 | * Reset the pathfinder's state, allowing for a new calculation to be done | |
| 56 | */ | |
| 57 | public void resetState() { | |
| 58 | GameMap gameMap = this.gameState.getGameMap(); | |
| 59 | | |
| 60 | 1 | int nodeCount = gameMap.getWidth() * gameMap.getHeight(); |
| 61 | | |
| 62 | this.graph = new ArrayList[nodeCount]; | |
| 63 | | |
| 64 | 3 | for (int i=0; i < nodeCount; i++) { |
| 65 | this.graph[i] = new ArrayList<Integer>(); | |
| 66 | } | |
| 67 | | |
| 68 | this.previous = new int[nodeCount]; | |
| 69 | | |
| 70 | this.distance = new int[nodeCount]; | |
| 71 | | |
| 72 | this.length = new int[nodeCount][nodeCount]; | |
| 73 | | |
| 74 | this.scanned = new boolean[nodeCount]; | |
| 75 | | |
| 76 | this.queue = new PriorityQueue<Coordinate>(); | |
| 77 | } | |
| 78 | | |
| 79 | /** | |
| 80 | * Calculate the shortest path to a given coordinate. After this is done, | |
| 81 | * the path to the goal can be retrieved. | |
| 82 | * | |
| 83 | * @param start The starting coordinate | |
| 84 | * @param goal The goal coordinate | |
| 85 | */ | |
| 86 | public void calculateShortestPath(Coordinate start, Coordinate goal) { | |
| 87 | 1 | this.resetState(); |
| 88 | | |
| 89 | GameMap gameMap = this.gameState.getGameMap(); | |
| 90 | | |
| 91 | int startNode = convertToInt(start); | |
| 92 | int goalNode = convertToInt(goal); | |
| 93 | | |
| 94 | // Add all of the tiles in the map | |
| 95 | 3 | for (int x=0; x < gameMap.getWidth(); x++) { |
| 96 | 3 | for (int y=0; y < gameMap.getHeight(); y++) { |
| 97 | // Skip the tile entirely if it is blocked | |
| 98 | // Also assume that the start and goal are non-solid, even if they aren't | |
| 99 | Coordinate coordinate = new Coordinate(x, y); | |
| 100 | | |
| 101 | 3 | if (gameMap.isTileBlocked(x, y) && !coordinate.equals(start) && |
| 102 | !coordinate.equals(goal)) { | |
| 103 | continue; | |
| 104 | } | |
| 105 | | |
| 106 | // Add neighboring tiles if they are not blocked either | |
| 107 | 3 | for (Direction direction : Direction.values()) { |
| 108 | Coordinate neighbor = Coordinate.getNewCoordinates(direction, x, y); | |
| 109 | | |
| 110 | 3 | if (!gameMap.isTileBlocked(neighbor) || neighbor.equals(start) || |
| 111 | neighbor.equals(goal)) { | |
| 112 | int from = convertToInt(coordinate); | |
| 113 | int to = convertToInt(neighbor); | |
| 114 | | |
| 115 | this.graph[from].add(to); | |
| 116 | this.graph[to].add(from); | |
| 117 | | |
| 118 | this.length[from][to] = 1; | |
| 119 | this.length[to][from] = 1; | |
| 120 | } | |
| 121 | } | |
| 122 | } | |
| 123 | } | |
| 124 | | |
| 125 | this.distance[startNode] = 0; | |
| 126 | this.previous[startNode] = 0; | |
| 127 | | |
| 128 | 3 | for (int i=0; i < this.graph.length; i++) { |
| 129 | 1 | if (this.graph[i].isEmpty()) { |
| 130 | continue; | |
| 131 | } | |
| 132 | | |
| 133 | 1 | if (i != startNode) { |
| 134 | this.distance[i] = Integer.MAX_VALUE; | |
| 135 | this.previous[i] = 0; | |
| 136 | } | |
| 137 | | |
| 138 | Coordinate coordinate = convertFromInt(i); | |
| 139 | 1 | coordinate.setWeight(this.distance[i]); |
| 140 | this.queue.add(coordinate); | |
| 141 | } | |
| 142 | | |
| 143 | 1 | while (!this.queue.isEmpty()) { |
| 144 | Coordinate smallest = this.queue.poll(); | |
| 145 | | |
| 146 | int node = convertToInt(smallest); | |
| 147 | | |
| 148 | 1 | if (node == goalNode) { |
| 149 | break; | |
| 150 | } | |
| 151 | | |
| 152 | 1 | for (int neighbor : this.graph[node]) { |
| 153 | 1 | int alt = this.distance[node] + this.length[node][neighbor]; |
| 154 | | |
| 155 | 2 | if (alt < this.distance[neighbor]) { |
| 156 | this.distance[neighbor] = alt; | |
| 157 | this.previous[neighbor] = node; | |
| 158 | | |
| 159 | Coordinate newCoordinate = convertFromInt(neighbor); | |
| 160 | 1 | newCoordinate.setWeight(this.distance[neighbor]); |
| 161 | this.queue.add(newCoordinate); | |
| 162 | } | |
| 163 | } | |
| 164 | } | |
| 165 | | |
| 166 | 1 | this.updateResults(start, goal); |
| 167 | } | |
| 168 | | |
| 169 | /** | |
| 170 | * Updates the step count and the coordinate of the next step, | |
| 171 | * which can then be retrieved using their respective getters | |
| 172 | * | |
| 173 | * @param start The starting coordinate | |
| 174 | * @param goal The goal coordinate | |
| 175 | */ | |
| 176 | public void updateResults(Coordinate start, Coordinate goal) { | |
| 177 | int target = convertToInt(goal.getX(), goal.getY()); | |
| 178 | | |
| 179 | this.stepsToGoal = 0; | |
| 180 | | |
| 181 | ArrayDeque<Coordinate> nodesToTarget = new ArrayDeque<Coordinate>(); | |
| 182 | 1 | while (this.previous[target] != 0) { |
| 183 | nodesToTarget.add(convertFromInt(target)); | |
| 184 | target = this.previous[target]; | |
| 185 | | |
| 186 | 1 | this.stepsToGoal++; |
| 187 | | |
| 188 | // Prevent freezing by ignoring non-valid, endless paths | |
| 189 | // Evaluate those to -1 | |
| 190 | 2 | if (this.stepsToGoal > 10000) { |
| 191 | this.stepsToGoal = -1; | |
| 192 | break; | |
| 193 | } | |
| 194 | } | |
| 195 | | |
| 196 | Coordinate coordinate = null; | |
| 197 | 1 | while (!nodesToTarget.isEmpty()) { |
| 198 | coordinate = nodesToTarget.poll(); | |
| 199 | } | |
| 200 | | |
| 201 | 1 | if (coordinate != null) { |
| 202 | this.nextStepToGoal = coordinate; | |
| 203 | } else { | |
| 204 | this.nextStepToGoal = null; | |
| 205 | } | |
| 206 | } | |
| 207 | | |
| 208 | /** | |
| 209 | * Convert coordinate to an integer | |
| 210 | * | |
| 211 | * @param x X-coordinate | |
| 212 | * @param y Y-coordinate | |
| 213 | * @return int representing the coordinate | |
| 214 | */ | |
| 215 | public int convertToInt(int x, int y) { | |
| 216 | 3 | return (x * this.gameState.getGameMap().getHeight()) + y; |
| 217 | } | |
| 218 | | |
| 219 | public int convertToInt(Coordinate coordinate) { | |
| 220 | 1 | return this.convertToInt(coordinate.getX(), coordinate.getY()); |
| 221 | } | |
| 222 | | |
| 223 | /** | |
| 224 | * Convert coordinate from an integer to a Coordinate | |
| 225 | * | |
| 226 | * @param i Coordinate represented as a single integer | |
| 227 | * @return Coordinate | |
| 228 | */ | |
| 229 | public Coordinate convertFromInt(int i) { | |
| 230 | 3 | return new Coordinate(i / this.gameState.getGameMap().getHeight(), |
| 231 | i % this.gameState.getGameMap().getHeight()); | |
| 232 | } | |
| 233 | } | |
Mutations | ||
| 41 |
mutated return of Object value for com/matoking/dungeoncrawler/state/Pathfinding::getNextStepToGoal to ( if (x != null) null else throw new RuntimeException ) : KILLED -> com.matoking.dungeoncrawler.state.PathfindingTest.testPathfindingCorrectPathOnMaze(com.matoking.dungeoncrawler.state.PathfindingTest) |
|
| 51 |
replaced return of integer sized value with (x == 0 ? 1 : 0) : KILLED -> com.matoking.dungeoncrawler.state.PathfindingTest.testPathfindingCorrectStepCountOnMaze(com.matoking.dungeoncrawler.state.PathfindingTest) |
|
| 60 |
Replaced integer multiplication with division : KILLED -> com.matoking.dungeoncrawler.state.PathfindingTest.testPathfindingCorrectStepCountOnMaze(com.matoking.dungeoncrawler.state.PathfindingTest) |
|
| 64 |
changed conditional boundary : KILLED -> com.matoking.dungeoncrawler.state.PathfindingTest.testPathfindingCorrectStepCountOnMaze(com.matoking.dungeoncrawler.state.PathfindingTest) negated conditional : KILLED -> com.matoking.dungeoncrawler.state.PathfindingTest.testPathfindingCorrectStepCountOnMaze(com.matoking.dungeoncrawler.state.PathfindingTest) Changed increment from 1 to -1 : KILLED -> com.matoking.dungeoncrawler.state.PathfindingTest.testPathfindingCorrectStepCountOnMaze(com.matoking.dungeoncrawler.state.PathfindingTest) |
|
| 87 |
removed call to com/matoking/dungeoncrawler/state/Pathfinding::resetState : KILLED -> com.matoking.dungeoncrawler.state.PathfindingTest.testPathfindingCorrectStepCountOnMaze(com.matoking.dungeoncrawler.state.PathfindingTest) |
|
| 95 |
negated conditional : KILLED -> com.matoking.dungeoncrawler.state.PathfindingTest.testPathfindingCorrectStepCountOnMaze(com.matoking.dungeoncrawler.state.PathfindingTest) Changed increment from 1 to -1 : TIMED_OUT changed conditional boundary : SURVIVED |
|
| 96 |
Changed increment from 1 to -1 : TIMED_OUT negated conditional : KILLED -> com.matoking.dungeoncrawler.state.PathfindingTest.testPathfindingCorrectStepCountOnMaze(com.matoking.dungeoncrawler.state.PathfindingTest) changed conditional boundary : SURVIVED |
|
| 101 |
negated conditional : KILLED -> com.matoking.dungeoncrawler.state.PathfindingTest.testPathfindingCorrectStepCountOnMaze(com.matoking.dungeoncrawler.state.PathfindingTest) negated conditional : KILLED -> com.matoking.dungeoncrawler.state.PathfindingTest.testPathfindingCorrectStepCountOnMaze(com.matoking.dungeoncrawler.state.PathfindingTest) negated conditional : KILLED -> com.matoking.dungeoncrawler.state.PathfindingTest.testPathfindingCorrectStepCountOnMaze(com.matoking.dungeoncrawler.state.PathfindingTest) |
|
| 107 |
negated conditional : KILLED -> com.matoking.dungeoncrawler.state.PathfindingTest.testPathfindingCorrectStepCountOnMaze(com.matoking.dungeoncrawler.state.PathfindingTest) Changed increment from 1 to -1 : KILLED -> com.matoking.dungeoncrawler.state.PathfindingTest.testPathfindingCorrectStepCountOnMaze(com.matoking.dungeoncrawler.state.PathfindingTest) changed conditional boundary : KILLED -> com.matoking.dungeoncrawler.state.PathfindingTest.testPathfindingCorrectStepCountOnMaze(com.matoking.dungeoncrawler.state.PathfindingTest) |
|
| 110 |
negated conditional : KILLED -> com.matoking.dungeoncrawler.state.PathfindingTest.testPathfindingCorrectStepCountOnMaze(com.matoking.dungeoncrawler.state.PathfindingTest) negated conditional : KILLED -> com.matoking.dungeoncrawler.state.PathfindingTest.testPathfindingCorrectStepCountOnMaze(com.matoking.dungeoncrawler.state.PathfindingTest) negated conditional : KILLED -> com.matoking.dungeoncrawler.state.PathfindingTest.testPathfindingCorrectStepCountOnMaze(com.matoking.dungeoncrawler.state.PathfindingTest) |
|
| 128 |
Changed increment from 1 to -1 : KILLED -> com.matoking.dungeoncrawler.state.PathfindingTest.testPathfindingCorrectStepCountOnMaze(com.matoking.dungeoncrawler.state.PathfindingTest) changed conditional boundary : KILLED -> com.matoking.dungeoncrawler.state.PathfindingTest.testPathfindingCorrectStepCountOnMaze(com.matoking.dungeoncrawler.state.PathfindingTest) negated conditional : KILLED -> com.matoking.dungeoncrawler.state.PathfindingTest.testPathfindingCorrectStepCountOnMaze(com.matoking.dungeoncrawler.state.PathfindingTest) |
|
| 129 |
negated conditional : KILLED -> com.matoking.dungeoncrawler.state.PathfindingTest.testPathfindingCorrectStepCountOnMaze(com.matoking.dungeoncrawler.state.PathfindingTest) |
|
| 133 |
negated conditional : KILLED -> com.matoking.dungeoncrawler.state.PathfindingTest.testPathfindingCorrectStepCountOnMaze(com.matoking.dungeoncrawler.state.PathfindingTest) |
|
| 139 |
removed call to com/matoking/dungeoncrawler/state/Coordinate::setWeight : KILLED -> com.matoking.dungeoncrawler.state.PathfindingTest.testPathfindingCorrectStepCountOnMaze(com.matoking.dungeoncrawler.state.PathfindingTest) |
|
| 143 |
negated conditional : KILLED -> com.matoking.dungeoncrawler.state.PathfindingTest.testPathfindingCorrectStepCountOnMaze(com.matoking.dungeoncrawler.state.PathfindingTest) |
|
| 148 |
negated conditional : KILLED -> com.matoking.dungeoncrawler.state.PathfindingTest.testPathfindingCorrectStepCountOnMaze(com.matoking.dungeoncrawler.state.PathfindingTest) |
|
| 152 |
negated conditional : KILLED -> com.matoking.dungeoncrawler.state.PathfindingTest.testPathfindingCorrectStepCountOnMaze(com.matoking.dungeoncrawler.state.PathfindingTest) |
|
| 153 |
Replaced integer addition with subtraction : TIMED_OUT |
|
| 155 |
negated conditional : KILLED -> com.matoking.dungeoncrawler.state.PathfindingTest.testPathfindingCorrectStepCountOnMaze(com.matoking.dungeoncrawler.state.PathfindingTest) changed conditional boundary : TIMED_OUT |
|
| 160 |
removed call to com/matoking/dungeoncrawler/state/Coordinate::setWeight : SURVIVED |
|
| 166 |
removed call to com/matoking/dungeoncrawler/state/Pathfinding::updateResults : KILLED -> com.matoking.dungeoncrawler.state.PathfindingTest.testPathfindingCorrectStepCountOnMaze(com.matoking.dungeoncrawler.state.PathfindingTest) |
|
| 182 |
negated conditional : KILLED -> com.matoking.dungeoncrawler.state.PathfindingTest.testPathfindingCorrectStepCountOnMaze(com.matoking.dungeoncrawler.state.PathfindingTest) |
|
| 186 |
Replaced integer addition with subtraction : KILLED -> com.matoking.dungeoncrawler.state.PathfindingTest.testPathfindingCorrectStepCountOnMaze(com.matoking.dungeoncrawler.state.PathfindingTest) |
|
| 190 |
negated conditional : KILLED -> com.matoking.dungeoncrawler.state.PathfindingTest.testPathfindingCorrectStepCountOnMaze(com.matoking.dungeoncrawler.state.PathfindingTest) changed conditional boundary : SURVIVED |
|
| 197 |
negated conditional : KILLED -> com.matoking.dungeoncrawler.state.PathfindingTest.testPathfindingCorrectPathOnMaze(com.matoking.dungeoncrawler.state.PathfindingTest) |
|
| 201 |
negated conditional : KILLED -> com.matoking.dungeoncrawler.state.PathfindingTest.testPathfindingCorrectPathOnMaze(com.matoking.dungeoncrawler.state.PathfindingTest) |
|
| 216 |
Replaced integer addition with subtraction : KILLED -> com.matoking.dungeoncrawler.state.PathfindingTest.testCoordinateConversionToInt(com.matoking.dungeoncrawler.state.PathfindingTest) replaced return of integer sized value with (x == 0 ? 1 : 0) : KILLED -> com.matoking.dungeoncrawler.state.PathfindingTest.testCoordinateConversionToInt(com.matoking.dungeoncrawler.state.PathfindingTest) Replaced integer multiplication with division : KILLED -> com.matoking.dungeoncrawler.state.PathfindingTest.testCoordinateConversionToInt(com.matoking.dungeoncrawler.state.PathfindingTest) |
|
| 220 |
replaced return of integer sized value with (x == 0 ? 1 : 0) : KILLED -> com.matoking.dungeoncrawler.state.PathfindingTest.testPathfindingCorrectStepCountOnMaze(com.matoking.dungeoncrawler.state.PathfindingTest) |
|
| 230 |
Replaced integer division with multiplication : KILLED -> com.matoking.dungeoncrawler.state.PathfindingTest.testCoordinateConversionToInt(com.matoking.dungeoncrawler.state.PathfindingTest) mutated return of Object value for com/matoking/dungeoncrawler/state/Pathfinding::convertFromInt to ( if (x != null) null else throw new RuntimeException ) : KILLED -> com.matoking.dungeoncrawler.state.PathfindingTest.testCoordinateConversionToInt(com.matoking.dungeoncrawler.state.PathfindingTest) Replaced integer modulus with multiplication : KILLED -> com.matoking.dungeoncrawler.state.PathfindingTest.testCoordinateConversionToInt(com.matoking.dungeoncrawler.state.PathfindingTest) |


https://numba.readthedocs.io/en/stable/user/5minguide.html
The recommended way to use the @jit decorator is to let Numba decide when and how to optimize.
from numba import jit @jit(nopython=True) def f(x, y): return x + y print(f(1,2)) # return 3 print(f(1.3,2)) # return 3.3 print(f(1j,2)) # return (2+1j) # Three calls will generate different code paths.
We can tell Numba the function signature we are expecting. No other specialization will be allowed.
from numba import jit, int64 @jit(int64(int64, int64),nopython=True) def f(x, y): return x + y print(f(1,2)) # return 3 print(f(1.3,2)) # return 3 (float -> int) #print(f(1j,2)) # TypeError
A number of keyword-only arguments can be passed to the @jit decorator.
nopython=True # force 'nopython mode' forceobj=True # force 'object mode' fastmath=True # relax some numerical rigour parallel=True # enables automatic parallelization (no GIL!),only in 'nopython mode' nogil=True # Numba will release the GIL cache=True # using a file-based cache debug=True # for debugging


BiObjLabel Class Reference
Implements bi-objective label. More...
#include <BiObjLabel.h>
Collaboration diagram for BiObjLabel:
Public Member Functions | |
| BiObjLabel (FPType time, TollType toll, int owner, BiObjLabel *prevLabel, StarLink *prevLink) | |
| FPType | getTime () const |
| TollType | getToll () const |
| BiObjLabel * | getPrevLabel () const |
| int | getOwner () const |
| StarLink * | getPrevLink () const |
| std::string | toString () const |
| void | setTime (FPType timeVal) |
Private Attributes | |
| FPType | time_ |
| const TollType | toll_ |
| const int | owner_ |
| BiObjLabel * | prevLabel_ |
| StarLink * | prevLink_ |
Detailed Description
Implements bi-objective label.
Each label contains travel time, toll, node index where this label belongs to, link that points to this label, label from which current label is generated.
Constructor & Destructor Documentation
| BiObjLabel::BiObjLabel | ( | FPType | time, |
| TollType | toll, | ||
| int | owner, | ||
| BiObjLabel * | prevLabel, | ||
| StarLink * | prevLink | ||
| ) |
- Parameters
-
time travel time. toll travel toll. owner node index where current label belongs to. prevLabel label from which current label is generated. prevLink link that points to this label.
The documentation for this class was generated from the following files:
- BiObjLabel.h
- BiObjLabel.cpp


Mushrooms (P. cubensis)
Before taking mushrooms for my first time I had been experiencing major anxiety (to the point of having anxiety attacks) and was scared of taking them, although I could not pinpoint the reasons. Finally while still stressing we planned a trip to go to Evergreen State College in Washington. This is the ideal place for first timers not only because everyone is chill and trips themselves but also the forest is so amazing it’s almost made for tripping. The different trees and the mosses are very beautiful and you rarely run into other people. If you do there is a 75% chance their under the influence also. I’d also recommend doing it with someone who’d tripped a lot who’s a chill person our friend accompanied us who was very experienced and knew when help was needed and when its good to just be quiet.
We took cubensis at 10 in the morning starting off by chewing and swallowing them until we realized that it’s easier to crumble them in water and gulp them down. The guy who sold them to us gave us more than the usual weights and we had to remove what we estimated was an 1/8th for another friend. 2 1/8th’s we’re split between 3 of us and there is a fairly large portion of crumbled stems left over that we’re saving. Because it was our first time and I was nervous we did not eat much before hand, which I would not recommend. It caused my boyfriend to throw up various times and myself a slight nausea for the rest of the night.
20 Minutes after ingesting them my boyfriend suggested we go into the woods because he was unable to focus when looking at the trees out a window. After a 10-minute walk in the woods, maybe, we came upon the “Fairy Circle” students had created. I started explaining to my colleagues how each fairy was represented in the area and they decided the mushrooms we’re kicking in.
We then continued on walking my boyfriend complained of extreme dry mouth and we walked back to a stream we had passed. We drank a little and he started getting very nauseous. He described it as not being able to control his body and being outside himself seeing himself throw up and not knowing what to do. I was pretty concerned when the liquids coming up we’re a purple red but turns out it was the psilocybin which is purple.
We then decided to return to my friends’ dorm to get my boyfriend a bottled water to help his stomach. It was on the way back that I started really feeling the mushrooms take affect. As I was walking it felt like my feet were melting to the right and off the path and I was compelled to walk in a circle to the right, which I did several times before stopping.  He complained of his body feeling numb and we later described it as our whole body feeling like our mouth does after we’ve eaten a Sucret.
It was now when I started really hallucinating my vision became boxy and it felt like I was looking through several picture frames. The texture of the wall started melting and flowed up into a tie-dyed tapestry on the wall. When I closed my eyes I saw some flower shapes then arched ceiling shapes which we’re pulsating outwards. Somehow we wandered into the bedroom and snuggled up in a bunch of blankets. What felt like a year was 10 minutes of me staring at a bulletin board, which was pulsating. Eventually my friend pulled out some crayons and I tacked some paper to the wall and started drawing. It was all nonsense but made sense at the time and I wrote a few little messages about what we were talking about.
My boyfriend who had been struggling for a while sat upright and commented on how soft the blankets we’re. We then spend 2-3 hours rolling around in the covers, and attempting to put a movie on but technology was difficult to use and we ended up just sitting and rolling in the blankets for the most of the time. At about 3 we decided to go for a walk and find food. It took me several attempts to do this although because I would find myself walking towards the door and suddenly I would be sitting down because that was more comfortable. 45 Minutes later we finally got up, we were pretty much done but still felt off and very hungry. The Campus does not have much food so after wandering for a while we went into Olympia in search for Mexican food. I was unable to eat much of mine because of how my stomach was reacting with the psilocybin.
Reflecting upon it its hard to describe it was such a wonderful time, when I wasn’t worrying about my Boyfriend, which I never expected because of how much it had scared me before hand. The struggling I did before the trip asking myself why I was doing this, etc I believe in general helped me overall. Describing what I saw is easy but what I felt is a whole other thing. I came out with a sense of Understanding, understanding what I’m not sure of but I know I do. I’ve been blown away by the experience but also the day after question the fact that I actually took mushrooms. I hope this helps any first timers who are unsure and nervous about their first experience because not all first times go bad.
Experience Reports are the writings and opinions of the individual authors who submit them.
Some of the activities described are dangerous and/or illegal and none are recommended by Erowid.


home
view
create
edit
details
Employee Info
EmployeeId:
FirstName:
LastName:
Email:
Phone:
ProfileUrl:
submit


# Weekly Programmer - Week 9 ## A Program a Day Keeps the Doctor Away From [Weekly Programmer Challenges](./index.html) ## Description This week, instead of one challenge I've created five mini challenges! ### Day One 2520 is the smallest number that can be divided by each of the numbers from 1 to 10 without any remainder. What is the smallest positive number that is evenly divisible by all of the numbers from 1 to 40? ### Day Two A palindromic number reads the same forwards as backwards. What is the smallest Palindrome number that is the product of three 3-digit numbers? ### Day Three A derangement of an ordered set is any ordered set containing the same members as the original set where no set member is in the same position as it is in the original set. For example, given the set `ABC`: `BCA` is a derangement but `CBA` is not. Given an ordered input set (a List or Array) produce a random derangement of the input. ### Day Four Given an input set (as a List or Array) randomize the input in place. For full credit use as little library code as possible and the only source of randomization you can use should produce random numbers from the range `[0-1)` Your solution should be capable of producing any permutation of the input set with equal probability, not just the derangements. ### Day Five Humans sort things weirdly. We sort alphabetically, but treat numbers special. a human would never sort `book 10` before `book 2` because ten is bigger than 2. Given an unordered input set (as a List or Array) produce an ordered output according to the human "natural sort" rules.


Hypothesis testing
Logistic Regression
Random Forest
The null hypothesis (\(H_0\)): A statement assumed to be true unless it can be shown to be incorrect beyond a reasonable doubt. This is something one usually attempts to disprove or discredit.
The alternate hypothesis (\(H_1\)): A claim that is contradictory to H0 and what we conclude when we reject H0.
H0 and H1 are on purporse set up to be contradictory, so that one can collect and examine data to decide if there is enough evidence to reject the null hypothesis or not.
Among the typical applications:
In general, used when the test statistic would follow a normal distribution if the value of a scaling term in the test statistic were known.
If \(X_i \sim \mathcal{N}(\mu, \sigma^2)\), the empirical estimates for mean and variance are: \(\bar X = \frac{1}{n}\sum_{i = 1}^{n} X_i\) and \(s^2 = \frac{1}{n - 1}\sum_{i = 1}^n(X_i -\bar X)^2\)
The t-statistic is:
\[ T = \frac{\bar X −mu}{s/\sqrt{n}}\sim t_{\nu=n-1} \]
p-value is the probability of obtaining the same or “more extreme” event than the one observed, assuming the null hypothesis holds (is true).
A small p-value, typically < 0.05, indicates strong evidence against the null hypothesis; in this case you can reject the null hypothesis.
A large p-value, > 0.05, indicates weak evidence against the null hypothesis; in this case, you do NOT reject the null hypothesis.
\[p-value = P[observations \; \mid \; hypothesis] \ne P[hypothesis \; \mid \; ovservations]\]
p-values should NOT be used a “ranking”/“scoring” system for your hypotheses
Is the mean flight arrival delay statistically equal to 0?
Test the null hypothesis:
\[H_0: \mu = \mu_0 = 0 \\ H_a: \mu \ne \mu_0 = 0\] where \(\mu\) is where \(\mu\) is the average arrival delay.
library(tidyverse)
library(nycflights13)
mean(flights$arr_delay, na.rm = T)
## [1] 6.895377
Is this statistically significant?
( tt = t.test(x=flights$arr_delay, mu=0, alternative="two.sided" ) )
##
## One Sample t-test
##
## data: flights$arr_delay
## t = 88.39, df = 327340, p-value < 2.2e-16
## alternative hypothesis: true mean is not equal to 0
## 95 percent confidence interval:
## 6.742478 7.048276
## sample estimates:
## mean of x
## 6.895377
The function t.test returns an object containing the following components:
names(tt)
## [1] "statistic" "parameter" "p.value" "conf.int" "estimate"
## [6] "null.value" "alternative" "method" "data.name"
# The p-value:
tt$p.value
## [1] 0
# The 95% confidence interval for the mean:
tt$conf.int
## [1] 6.742478 7.048276
## attr(,"conf.level")
## [1] 0.95
One-sided can be more powerful, but the intepretation is more difficult.
Test the null hypothesis:
\[H_0: \mu = \mu_0 =0 \\ H_a: \mu < \mu_0 = 0\]
t.test(x, mu=0, alternative="less")
Is the average delay 5 or is it lower?
( tt = t.test(x=flights$arr_delay, mu=5, alternative="less" ) )
##
## One Sample t-test
##
## data: flights$arr_delay
## t = 24.296, df = 327340, p-value = 1
## alternative hypothesis: true mean is less than 5
## 95 percent confidence interval:
## -Inf 7.023694
## sample estimates:
## mean of x
## 6.895377
Failure to reject is not acceptance of the null hypothesis.
Is the average arrival delay the same for the winter and summer?
Test the null hypothesis:
\[H_0: \mu_{a} = \mu_{b}\\ H_a: \mu_{a} \ne \mu_{b}\]
where \(\mu_{a}\) mean arr_delay
in the winter and \(\mu_b\) is the mean arr_delay
in the summer.
t.test(x, y)
flights %>%
mutate(season = cut(month, breaks = c(0,3,6,9,12))) %>%
ggplot(aes(x = season, y = arr_delay)) + geom_boxplot (alpha=0.1) +
xlab("Season" ) + ylab("Arrival delay" )
## Warning: Removed 9430 rows containing non-finite values (stat_boxplot).
flights %>%
filter(arr_delay < 120) %>%
mutate(season = cut(month, breaks = c(0,3,6,9,12))) %>%
ggplot(aes(x = season, y = arr_delay)) + geom_boxplot (alpha=0.01) +
xlab("Season" ) + ylab("Arrival delay" )
flights.winter = filter(flights, month %in% c(1,2,3))
flights.summer = filter(flights, month %in% c(7,8,9))
t.test(x=flights.winter$arr_delay, y=flights.summer$arr_delay)
##
## Welch Two Sample t-test
##
## data: flights.winter$arr_delay and flights.summer$arr_delay
## t = -2.4383, df = 161250, p-value = 0.01476
## alternative hypothesis: true difference in means is not equal to 0
## 95 percent confidence interval:
## -0.9780344 -0.1063691
## sample estimates:
## mean of x mean of y
## 5.857851 6.400052
Go to the “Lec7_Exercises.Rmd” file, which can be downloaded from the class website under the Lecture tab.
Complete Exercise 1.
Classification is a supervised methood which deals with prediction outcomes or response variables that are qualitative, or categorical.
The task is to classify or assign each observation to a category or a class.
Logistic regression is actually used for classification, and not regression tasks, \(Y \in \{0, 1\}\).
The name regression comes from the fact that the method fits a linear function to a continuous quantity, the log odds of the response.
\[ p = P[Y = 1 \mid X]\\ \log\left(\frac{p}{1-p}\right) = X\beta = \beta_0 + \beta_1^Tx \]
\[ \begin{align*} g(p) &= \log\left(\frac{p}{1 - p}\right), \quad \quad \; \text{ ( logit a link function ) } \\ g^{-1}(\eta) &= \frac{1}{1 + e^{-\eta}}, \quad \quad \quad \quad \text{ ( logistic function ) }\\ \eta &= X\beta, \quad \quad \quad \quad \quad \quad \text{ ( linear predictor ) } \\ &\\ E[Y] &= P[Y = 1 \mid X = x] \quad \; \text{ ( probability of outcome ) } \\ &= p = g^{-1}(\eta) \\ & = {1 \over 1 + e^{-X\beta}} \end{align*} \]
Suppose we would like to predict students’ admission to graduate school based on their GRE, GPA, and the rank of their undergraduate institution.
admissions <- read_csv("https://stats.idre.ucla.edu/stat/data/binary.csv")
## Parsed with column specification:
## cols(
## admit = col_integer(),
## gre = col_integer(),
## gpa = col_double(),
## rank = col_integer()
## )
admissions
## # A tibble: 400 x 4
## admit gre gpa rank
## <int> <int> <dbl> <int>
## 1 0 380 3.61 3
## 2 1 660 3.67 3
## 3 1 800 4 1
## 4 1 640 3.19 4
## 5 0 520 2.93 4
## 6 1 760 3 2
## 7 1 560 2.98 1
## 8 0 400 3.08 2
## 9 1 540 3.39 3
## 10 0 700 3.92 2
## # ... with 390 more rows
summary(admissions)
## admit gre gpa rank
## Min. :0.0000 Min. :220.0 Min. :2.260 Min. :1.000
## 1st Qu.:0.0000 1st Qu.:520.0 1st Qu.:3.130 1st Qu.:2.000
## Median :0.0000 Median :580.0 Median :3.395 Median :2.000
## Mean :0.3175 Mean :587.7 Mean :3.390 Mean :2.485
## 3rd Qu.:1.0000 3rd Qu.:660.0 3rd Qu.:3.670 3rd Qu.:3.000
## Max. :1.0000 Max. :800.0 Max. :4.000 Max. :4.000
sapply(admissions, sd)
## admit gre gpa rank
## 0.4660867<PHONE_NUMBER> 0.3805668 0.9444602
Check that there are observations included in each subgroup, and whether the data is balanced:
with(admissions, table(admit, rank))
## rank
## admit 1 2 3 4
## 0 28 97 93 55
## 1 33 54 28 12
glm()
.glm
stands for Generalized Linear Model.?glm
to learn more.multinom()
function from nnet
package can be used. To see how go over this example.Note that currently the column ‘admit’ and ‘rank’ in admissions
are integers.
sapply(admissions, class)
## admit gre gpa rank
## "integer" "integer" "numeric" "integer"
We convert the two columns to factors.
admissions <- mutate(admissions,
admit = factor(admit, levels = c(0, 1), labels = c("rejected", "admitted")),
rank = factor(rank, levels = 1:4)
)
admissions
## # A tibble: 400 x 4
## admit gre gpa rank
## <fct> <int> <dbl> <fct>
## 1 rejected 380 3.61 3
## 2 admitted 660 3.67 3
## 3 admitted 800 4 1
## 4 admitted 640 3.19 4
## 5 rejected 520 2.93 4
## 6 admitted 760 3 2
## 7 admitted 560 2.98 1
## 8 rejected 400 3.08 2
## 9 admitted 540 3.39 3
## 10 rejected 700 3.92 2
## # ... with 390 more rows
Divide data into train and test set so that we can evaluate the model accuracy later on. Here we use 60%-20%-20% split.
set.seed(78356)
n <- nrow(admissions)
idx <- sample(1:n, size = n)
train.idx <- idx[seq(1, floor(0.6*n))]
valid.idx <- idx[seq(floor(0.6*n)+1, floor(0.8*n))]
train <- admissions[train.idx, ]
valid <- admissions[valid.idx, ]
test <- admissions[-c(train.idx, valid.idx), ]
nrow(train)
## [1] 240
nrow(valid)
## [1] 80
nrow(test)
## [1] 80
logit_fit <- glm(
admit ~ gre + gpa + rank, data = train, family = "binomial")
The first argument,
formula = admit ~ gre + gpa + rank
,
specifies the linear predictor part, \(\eta = X\beta\).
You need to set the family to family = "binomial"
equivalent to choosing a logistic regression, i.e. using a logit link function \(g(\cdot)\) in a GLM model.
Logistic regression coefficients for continuous predictors (covariates) give the log fold change in the odds of the outcome corresponding to a unit increase in the predictor.
\[ \begin{align*} \beta_{cont} &= \log \left({P[Y = 1 \;| \; X_{cont} = x + 1 ] \over P[Y = 1\;|\; X_{cont} = x]} \right)\\ \end{align*} \]
Categorical features (factors) are first converted to indicator variables and then the model fits separate coefficients for each level of the factor. Coefficients corresponding to a specific indicator variable give the increase/decrease in the log odds of the outcome in case the observation is recorded with that level.
\[ \begin{align*} \beta_{factor} &= \log \left({P[Y = 1 \;| \; X_{fac} = L ] \over P[Y = 1\;|\; X_{fac} \ne L ]} \right)\\ \end{align*} \]
coef(logit_fit)
## (Intercept) gre gpa rank2 rank3
## -2.662567353 0.000921435 0.658045298 -0.510004503 -1.560051191
## rank4
## -1.129252168
For every unit increase in gre
, the log odds of admitted (versus rejected) increases by \(\approx\) 9.214349810^{-4}.
For every unit increase in gpa
, the log odds increases by \(\approx\) 0.6580453.
There are three coefficients for the rank variable, e.g. a student attending a college with rank 2, one with rank 1 (base level), has the log admission odds decreased by \(\approx\) -0.5100045.
You can get the confidence intervals for the coefficients with the confint()
fuinction
confint(logit_fit)
## Waiting for profiling to be done...
## 2.5 % 97.5 %
## (Intercept) -5.595691918 0.172732111
## gre -0.001778273 0.003647635
## gpa -0.181398218 1.522814525
## rank2 -1.289858306 0.260377700
## rank3 -2.483360377 -0.677844965
## rank4 -2.140151201 -0.167386365
The \(95\%\) CI are away from zero which indicates significance.
summary(logit_fit)
##
## Call:
## glm(formula = admit ~ gre + gpa + rank, family = "binomial",
## data = train)
##
## Deviance Residuals:
## Min 1Q Median 3Q Max
## -1.4795 -0.9377 -0.7004 1.1883 2.0539
##
## Coefficients:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) -2.6625674 1.4651841 -1.817 0.069183 .
## gre 0.0009214 0.0013789 0.668 0.503979
## gpa 0.6580453 0.4329230 1.520 0.128510
## rank2 -0.5100045 0.3935431 -1.296 0.194999
## rank3 -1.5600512 0.4583036 -3.404 0.000664 ***
## rank4 -1.1292522 0.5002488 -2.257 0.023984 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## (Dispersion parameter for binomial family taken to be 1)
##
## Null deviance: 309.52 on 239 degrees of freedom
## Residual deviance: 289.83 on 234 degrees of freedom
## AIC: 301.83
##
## Number of Fisher Scoring iterations: 4
Rank variable effect is given with three different coeffients.
We can sse wald.test()
function from the aod
package to test the overall effect of ‘rank’.
# install.packages(aod)
library(aod)
wald.test(b = coef(logit_fit), Sigma = vcov(logit_fit), Terms = 4:6)
## Wald test:
## ----------
##
## Chi-squared test:
## X2 = 14.0, df = 3, P(> X2) = 0.0029
b
supplies the coefficients,Sigma
supplies the variance covariance matrix of the error terms,Terms
indices of the coefficients to be tested; here 4, 5, and 6, corresponding to ‘rank’.The p-value indicates that the overall effect of rank is statistically significant.
library(modelr)
head(train %>% add_predictions(logit_fit, var = "log_odds"))
## # A tibble: 6 x 5
## admit gre gpa rank log_odds
## <fct> <int> <dbl> <fct> <dbl>
## 1 rejected 640 3.67 3 -1.22
## 2 admitted 700 3.52 4 -0.830
## 3 rejected 400 3.35 3 -1.65
## 4 rejected 580 3.51 2 -0.328
## 5 admitted 640 3.19 4 -1.10
## 6 admitted 580 3.58 1 0.228
(train <- train %>%
mutate(
admit_odds = predict(logit_fit),
admit_prob = predict(logit_fit, type = "response"),
admit_pred = factor(admit_prob < 0.5, levels = c(TRUE, FALSE),
labels = c("rejected", "admitted")),
admit_pred2 = factor(admit_odds < 0, levels = c(TRUE, FALSE),
labels = c("rejected", "admitted"))
))
## # A tibble: 240 x 8
## admit gre gpa rank admit_odds admit_prob admit_pred admit_pred2
## <fct> <int> <dbl> <fct> <dbl> <dbl> <fct> <fct>
## 1 rejected 640 3.67 3 -1.22 0.228 rejected rejected
## 2 admitted 700 3.52 4 -0.830 0.304 rejected rejected
## 3 rejected 400 3.35 3 -1.65 0.161 rejected rejected
## 4 rejected 580 3.51 2 -0.328 0.419 rejected rejected
## 5 admitted 640 3.19 4 -1.10 0.249 rejected rejected
## 6 admitted 580 3.58 1 0.228 0.557 admitted admitted
## 7 rejected 560 3.36 3 -1.50 0.183 rejected rejected
## 8 rejected 460 3.77 3 -1.32 0.211 rejected rejected
## 9 admitted 560 2.98 1 -0.186 0.454 rejected rejected
## 10 rejected 580 3.02 2 -0.651 0.343 rejected rejected
## # ... with 230 more rows
Predictions can be computed using predict()
function, with the argument type = "response"
. Otherwise, the default will compute predictions on the scale of the linear predictors.
# Must have the same column names as the variables in the model
new_students <- data.frame(
gre = c(670, 790, 550),
gpa = c(3.56, 4.00, 3.87),
rank = factor(c(1, 2, 2)))
# The output is the probability of admissions for each of the new students.
new_students <- new_students %>%
mutate(
admit_odds = predict(logit_fit, newdata = new_students),
admit_pred = factor(admit_odds < 0, levels = c(TRUE, FALSE),
labels = c("rejected", "admitted"))
)
new_students
## gre gpa rank admit_odds admit_pred
## 1 670 3.56 1 0.2974353 admitted
## 2 790 4.00 2 0.1875430 admitted
## 3 550 3.87 2 -0.1191473 rejected
logit_fit2 <- glm(
admit ~ rank, data = train, family = "binomial")
valid <- valid %>%
mutate(
admit_odds_fit1 = predict(logit_fit, newdata = valid),
admit_odds_fit2 = predict(logit_fit2, newdata = valid),
admit_fit1 = factor(admit_odds_fit1 < 0,
levels = c(TRUE, FALSE),
labels = c("rejected", "admitted")),
admit_fit2 = factor(admit_odds_fit2 < 0,
levels = c(TRUE, FALSE),
labels = c("rejected", "admitted"))
)
valid
## # A tibble: 80 x 8
## admit gre gpa rank admit_odds_fit1 admit_odds_fit2 admit_fit1
## <fct> <int> <dbl> <fct> <dbl> <dbl> <fct>
## 1 reje… 340 2.92 3 -1.99 -1.41 rejected
## 2 reje… 660 3.31 4 -1.01 -1.03 rejected
## 3 admi… 300 2.84 2 -1.03 -0.389 rejected
## 4 reje… 500 4 3 -1.13 -1.41 rejected
## 5 reje… 780 3.87 4 -0.526 -1.03 rejected
## 6 reje… 600 3.63 3 -1.28 -1.41 rejected
## 7 reje… 540 3.78 4 -0.807 -1.03 rejected
## 8 admi… 800 3.74 1 0.536 0.163 admitted
## 9 admi… 800 3.43 2 -0.178 -0.389 rejected
## 10 admi… 740 2.97 2 -0.536 -0.389 rejected
## # ... with 70 more rows, and 1 more variable: admit_fit2 <fct>
# Confusion Matrix for model 1
(confusion_matrix_fit1 <- table(true = valid$admit, pred = valid$admit_fit1))
## pred
## true rejected admitted
## rejected 56 3
## admitted 16 5
# Confusion Matrix for model 2
(confusion_matrix_fit2 <- table(true = valid$admit, pred = valid$admit_fit2))
## pred
## true rejected admitted
## rejected 57 2
## admitted 16 5
# Accuracy for model 1
(accuracy_fit1 <- sum(diag(confusion_matrix_fit1))/sum(confusion_matrix_fit1))
## [1] 0.7625
# Accuracy for model 2
(accuracy_fit2 <- sum(diag(confusion_matrix_fit2))/sum(confusion_matrix_fit2))
## [1] 0.775
We choose a simpler model logit_fit2
logit_fit2
performancePerformance of our chosen model, logit_fit2
can be evaluated on the test
set
test <- test %>%
mutate(
admit_odds = predict(logit_fit2, newdata = test),
admit_pred = factor(admit_odds < 0,
levels = c(TRUE, FALSE),
labels = c("rejected", "admitted"))
)
(test_confusion_matrix <- table(pred = test$admit, true = test$admit_pred))
## true
## pred rejected admitted
## rejected 48 9
## admitted 15 8
(test_accuracy <- sum(diag(test_confusion_matrix))/sum(test_confusion_matrix))
## [1] 0.7
So, you should expect your model accuracy to be around 0.7 for a new dataset you collect later.
Go to the “Lec7_Exercises.Rmd” file, which can be downloaded from the class website under the Lecture tab.
Complete Exercise 2.
Cool visualization explaining what decision trees are: link
Example of decision trees
Suppse we have an input data matrix, \(X \in \mathbb{R}^{N \times p}\) and a response vector, \(Y \in \mathbb{R}^N\).
For b = 1, 2, …, B:
\(\quad\) 1. Generate a random subset of the data \((X_b, Y_b)\) contatining \(n < N\)
\(\quad \;\) observations sampled with replacement.
\(\quad\) 2. Train a decision tree \(T_b\) on \((X_b, Y_b)\)
\(\quad\) 3. Predict the outcome for \(N-n\;\) unseen (complement) samples \((X_b', Y_b')\)
Afterwards, combine predictions from all decision trees and compute the average predicted outcome .
Averaging over a collection of decision trees makes the predictions more stable.
Source: Chapter 8 ESL
Random forests differ in only one way from tree bagging: it uses a modified tree learning algorithm sometimes called feature bagging.
At each candidate split in the learning process, only a random subset of the features is included in a pool from which the variables can be selected for splitting the branch.
Introducing randomness into the candidate splitting variables, reduces correlation between the generated trees.
Source: link
UCI ML Repo includes two datasets on red and white variants of the Portuguese “Vinho Verde” wine. The datasets contain information on physicochemical and sensory characteristics of the wine quality score.
We will use the white wines dataset to classify wines according to their quality classes.
url <- 'https://archive.ics.uci.edu/ml/machine-learning-databases/wine-quality/winequality-white.csv'
wines <- read.csv(url, sep = ";")
head(wines, 6)
## fixed.acidity volatile.acidity citric.acid residual.sugar chlorides
## 1 7.0 0.27 0.36 20.7 0.045
## 2 6.3 0.30 0.34 1.6 0.049
## 3 8.1 0.28 0.40 6.9 0.050
## 4 7.2 0.23 0.32 8.5 0.058
## 5 7.2 0.23 0.32 8.5 0.058
## 6 8.1 0.28 0.40 6.9 0.050
## free.sulfur.dioxide total.sulfur.dioxide density pH sulphates alcohol
## 1 45 170 1.0010 3.00 0.45 8.8
## 2 14 132 0.9940 3.30 0.49 9.5
## 3 30 97 0.9951 3.26 0.44 10.1
## 4 47 186 0.9956 3.19 0.40 9.9
## 5 47 186 0.9956 3.19 0.40 9.9
## 6 30 97 0.9951 3.26 0.44 10.1
## quality
## 1 6
## 2 6
## 3 6
## 4 6
## 5 6
## 6 6
table(wines$quality)
##
## 3 4 5 6 7 8 9
## 20 163 1457 2198 880 175 5
ggplot(wines, aes(x = quality)) +
geom_bar() + theme_classic() +
ggtitle("Barplot for Quality Scores")
The classes are ordered and not balanced (munch more normal wines than excellent/poor ones).
To make things easier, we will wines into “good”, “average” and “bad” categories.
The new classes will be more balanced, and it will be easier to fit the model.
qualClass <- function(quality) {
if(quality > 6) return("good")
if(quality < 6) return("bad")
return("average")
}
wines <- wines %>%
mutate(taste = sapply(quality, qualClass),
taste = factor(taste, levels = c("bad", "average", "good")))
head(wines)
## fixed.acidity volatile.acidity citric.acid residual.sugar chlorides
## 1 7.0 0.27 0.36 20.7 0.045
## 2 6.3 0.30 0.34 1.6 0.049
## 3 8.1 0.28 0.40 6.9 0.050
## 4 7.2 0.23 0.32 8.5 0.058
## 5 7.2 0.23 0.32 8.5 0.058
## 6 8.1 0.28 0.40 6.9 0.050
## free.sulfur.dioxide total.sulfur.dioxide density pH sulphates alcohol
## 1 45 170 1.0010 3.00 0.45 8.8
## 2 14 132 0.9940 3.30 0.49 9.5
## 3 30 97 0.9951 3.26 0.44 10.1
## 4 47 186 0.9956 3.19 0.40 9.9
## 5 47 186 0.9956 3.19 0.40 9.9
## 6 30 97 0.9951 3.26 0.44 10.1
## quality taste
## 1 6 average
## 2 6 average
## 3 6 average
## 4 6 average
## 5 6 average
## 6 6 average
table(wines$quality)
##
## 3 4 5 6 7 8 9
## 20 163 1457 2198 880 175 5
ggplot(wines, aes(x = taste)) +
geom_bar() + theme_classic() +
ggtitle("Barplot for Quality Scores")
We include 60% of the data in a train set and the remaining into a test set.
set.seed(98475)
idx <- sample(nrow(wines), 0.6 * nrow(wines))
train <- wines[idx, ]
test <- wines[-idx, ]
dim(train)
## [1] 2938 13
dim(test)
## [1] 1960 13
In R there is a convenient function randomForest
from randomForest
package.
# install.packages("randomForest")
library(randomForest)
wines_fit_rf <- randomForest(
taste ~ . - quality, data = train,
mtry = 5, ntree = 500, importance = TRUE)
Note that in the formula ‘taste ~ . - quality
’ means we include all features EXCEPT for ‘quality’ (the response variable).
mtry
- the number of variables randomly sampled as candidates at each split. Defaults: for classification – \(\sqrt{p}\) and for regression – \(p/3\), where \(p\) is number of all variables in the model.
ntree
- the number of trees in the forest.
importance
- whether importance of predictors be computed.
Observe, that RF is good at distinguishing “bad” wines from“good” wines, but still struggles when it comes to “average” wines.
wines_fit_rf
##
## Call:
## randomForest(formula = taste ~ . - quality, data = train, mtry = 5, ntree = 500, importance = TRUE)
## Type of random forest: classification
## Number of trees: 500
## No. of variables tried at each split: 5
##
## OOB estimate of error rate: 31.31%
## Confusion matrix:
## bad average good class.error
## bad 681 272 15 0.2964876
## average 219 966 135 0.2681818
## good 20 259 371 0.4292308
You should always evaluate your model’s performance on a test set, which was set aside and not observed by the method at all.
In case of RF, performance on train and test set should be similar; this is because the method averages predictions computed by individual trees for observations unseen by the tree.
Inspect the confusion matrix to asses the model accuracy.
(confusion_matrix <- table(
true = test$taste, pred = predict(wines_fit_rf, newdata = test)))
## pred
## true bad average good
## bad 482 181 9
## average 149 669 60
## good 13 143 254
(accuracy_rf <- sum(diag(confusion_matrix)) / sum(confusion_matrix))
## [1] 0.7168367
## Look at variable importance:
importance(wines_fit_rf)
## bad average good MeanDecreaseAccuracy
## fixed.acidity 30.15194 30.17027 29.82500 51.71162
## volatile.acidity 64.10513 51.51792 57.95579 90.28951
## citric.acid 28.54081 32.93660 31.90320 46.52323
## residual.sugar 29.23441 35.39843 27.38350 56.88708
## chlorides 36.06739 26.80210 39.22203 49.98833
## free.sulfur.dioxide 37.74602 35.26059 29.29246 57.27752
## total.sulfur.dioxide 25.84618 23.53196 34.53854 45.42788
## density 26.92925 28.25958 29.45976 43.55052
## pH 33.72925 31.09405 42.54602 56.16315
## sulphates 29.16720 28.56807 30.09379 47.44873
## alcohol 81.11168 36.20917 66.60965 94.30226
## MeanDecreaseGini
## fixed.acidity 133.9582
## volatile.acidity 205.1542
## citric.acid 143.4607
## residual.sugar 159.3942
## chlorides 158.9609
## free.sulfur.dioxide 173.0973
## total.sulfur.dioxide 160.1464
## density 186.5196
## pH 162.8367
## sulphates 138.5101
## alcohol 258.7888
What seems to be the conclusion? What are the characteristics that are predictive of the wine quality score?
varImpPlot(wines_fit_rf)
Go to the “Lec7_Exercises.Rmd” file, which can be downloaded from the class website under the Lecture tab.
Complete Exercise 3.


After obtaining my bachelor degree, I had started my career as a systems engineer at TCS, India. This is where I have experienced my intial work environment outside learning. By working in teams and huge projects, I got the opportunity to explore corporate structure which left me with everlasting confidence of handling complex situations. I also apply them to my everyday life to troubleshoot problems and manage tasks effectively.
I have recently moved to Germany. Usually I do not have any free-time, but if I do then I explore places, travel a lot, chit-chat with friends and family. Weekly twice, I make time for shopping and arranging my home. Currenlty, I am actively searching for a suitable career opportunity, so that I do not forgot my work life. Afterall, that is what brain does!!


Subscription Form
Please fill in this form to subscribe.
Customer Name
*
Email
*
Subscription Type
*
Free
Plus
Pro
Subscribe
Records:


ru.ximc.libximc
public static class JXimc.analog_data_t extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
short |
A1Voltage |
short |
A1Voltage_ADC |
short |
A2Voltage |
short |
A2Voltage_ADC |
short |
ACurrent |
short |
ACurrent_ADC |
short |
B1Voltage |
short |
B1Voltage_ADC |
short |
B2Voltage |
short |
B2Voltage_ADC |
short |
BCurrent |
short |
BCurrent_ADC |
short |
deprecated |
short |
FullCurrent |
short |
FullCurrent_ADC |
short |
H5 |
short |
H5_ADC |
short |
Joy |
short |
Joy_ADC |
int |
L |
short |
L5 |
short |
L5_ADC |
short |
Pot |
short |
Pot_ADC |
int |
R |
short |
SupVoltage |
short |
SupVoltage_ADC |
short |
Temp |
short |
Temp_ADC |
| Constructor and Description |
|---|
JXimc.analog_data_t() |
public short A1Voltage_ADC
public short A2Voltage_ADC
public short B1Voltage_ADC
public short B2Voltage_ADC
public short SupVoltage_ADC
public short ACurrent_ADC
public short BCurrent_ADC
public short FullCurrent_ADC
public short Temp_ADC
public short Joy_ADC
public short Pot_ADC
public short L5_ADC
public short H5_ADC
public short A1Voltage
public short A2Voltage
public short B1Voltage
public short B2Voltage
public short SupVoltage
public short ACurrent
public short BCurrent
public short FullCurrent
public short Temp
public short Joy
public short Pot
public short L5
public short H5
public short deprecated
public int R
public int L


Cheshire3
Main Page
Namespaces
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
Classes
Namespaces
Functions
cheshire3
graph
record
GraphRecord
Public Member Functions
|
Public Attributes
|
Static Public Attributes
|
List of all members
cheshire3.graph.record.GraphRecord Class Reference
Inheritance diagram for cheshire3.graph.record.GraphRecord:
[
legend
]
Collaboration diagram for cheshire3.graph.record.GraphRecord:
[
legend
]
Public Member Functions
def
__init__
def
process_sparql
def
get_graph
def
process_xpath
def
get_xml
def
get_dom
Public Attributes
dom
xml
id
parent
context
wordCount
byteCount
Static Public Attributes
graph
= None
The documentation for this class was generated from the following file:
cheshire3/graph/record.py
Generated on Tue Jul 9 2013 16:21:57 for Cheshire3 by
<IP_ADDRESS>


Expose connection states for user-land
The default connection of the mongoose module.
The node-mongodb-native driver Mongoose uses.
The mquery query builder Mongoose uses. Currently there is no mquery type definition.
The Mongoose version
Ability to use mongoose object as a pseudo-promise so .connect().then() and .disconnect().then() are viable.
Opens the default mongoose connection. Options passed take precedence over options included in connection strings.
pseudo-promise wrapper around this
Creates a Connection instance. Each connection instance maps to a single database. This method is helpful when mangaging multiple db connections.
the created Connection object
Disconnects all connections.
called after all connection close.
pseudo-promise wrapper around this
Gets mongoose options
Defines a model or retrieves it. Models defined on the mongoose instance are available to all connection created by the same mongoose instance.
model name
(optional, induced from model name)
whether to skip initialization (defaults to false)
Returns an array of model names created on this instance of Mongoose. Does not include names of models created using connection.model().
Declares a global plugin executed on all Schemas. Equivalent to calling .plugin(fn) on each Schema you create.
plugin callback
optional options
Sets mongoose options
Ability to use mongoose object as a pseudo-promise so .connect().then() and .disconnect().then() are viable.
Generated using TypeDoc
To assign your own promise library:
Include this somewhere in your code: mongoose.Promise = YOUR_PROMISE;
Include this somewhere in your main .d.ts file: type MongoosePromise = YOUR_PROMISE;


Contains extensions to the
com.google.code.appengine.awt.geom
package. This package provides new
Shape
s and some utility methods to manage geometric objects.


Resolution is "the smallest difference between measurands that will result in measurements indicating that the measurands are different," normally using single measurements of each measurand. The desired indication should have a specified confidence level, typically 68.3% or that corresponding to one standard deviation. The resolution will be limited primarily by the precision of the measurement.
Consider first the case where two measurands x1 and x2 are the same. If they are measured by an instrument having one-standard-deviation random error (or instrument precision) σM and if the errors in repeated measurements are independent, then the expected standard deviation of the difference y between the two measurements, arising from random error in both, is σy = σM. The two measurements will differ by less than σy in about 68.3% of cases, as is appropriate for a confidence level corresponding to one standard deviation, but they will differ by more than σM , the instrument precision, in about 48% of cases. A measured difference of σM is therefore an unreliable indicator that the measurands are different; a measured difference of at least σM is needed to indicate that the measurands are different.
To see this case, go to the “Probability distributions, Meaning #1" tab and set the bottom-left slider to zero while leaving the "68.3%" checkbox selected.
To find the resolution, a different limit is needed. In that case we want to find the minimum separation between measurands y′ = x1′-x2′ that leads to a statistically significant likelihood that measurements will show the two measurands to be different. (Here the primed quantities refer to the measurands and unprimed quantities to the measurements.) We need measurements separated by at least σx to be confident, on the basis of measurements with precision σM , that the measurands are different. We therefore need to find the minimum separation between measurands required to give measurements separated by at least σx in at least 68.3% of cases. Then, with one-standard-deviation confidence, we can use the measurements to conclude that the measurands are different.
Explore this using the top slider in the “Probability Distributions, Meaning #1” tab, to find the separation at which the probability “P2” of finding a difference outside σx is about 68.3%. Note that, at a separation of d=σx (or a slider setting of 1), the probability is only about 43%, so at a separation between measurands equal to the precision of the sensor the probability is still far below the desired limit. You have to increase the slider to about 2 to get the desired probability. For this reason, the one-standard-deviation confidence limit for resolution is about twice the precision.
Sometimes it is desired to quote a resolution that gives confidence at the two-standard-deviation limit that the measurands are different. To find this limit, select the "95.1%" checkbox and repeat the exercise, this time seeking P2 about equal to 0.95. The integration points (red dots) will move out along the red distribution to the points corresponding to 2 . You will find that the required separation between measurands is more than five times the precision.


Superb Twitter Plugins for WordPress Users
A Guide to WordPress Child Themes Development
Best Android Apps for Sports Lovers – What’s new in Sports World
Free Snippets for Twitter Bootstrap, Examples of Websites
Free Vector London and Paris, a symbol of stamps
Attractive and Striking Instagram Photo Wallpapers
25+ Logo Design Templates for Designers
Showcase of Blurry Night Traffic Photography


Clang - Performance
This page shows the compile time performance of Clang on two interesting benchmarks:
- Sketch: The Objective-C example application shipped on Mac OS X as part of Xcode. Sketch is indicative of a "typical" Objective-C app. The source itself has a relatively small amount of code (~7,500 lines of source code), but it relies on the extensive Cocoa APIs to build its functionality. Like many Objective-C applications, it includes Cocoa/Cocoa.h in all of its source files, which represents a significant stress test of the front-end's performance on lexing, preprocessing, parsing, and syntax analysis.
- 176.gcc: This is the gcc-<IP_ADDRESS> code base as present in SPECINT 2000. In contrast to Sketch, 176.gcc consists of a large amount of C source code (~200,000 lines) with few system dependencies. This stresses the back-end's performance on generating assembly code and debug information.
For previous performance numbers, please go here.
Experiments
Measurements are done by running a full build (using xcodebuild or make for Sketch and 176.gcc respectively) using Clang and gcc 4.2 as compilers.
In order to track the performance of various subsystems the timings have been broken down into separate stages where possible. This is done by over-riding the CC environment variable used during the build to point to one of a few simple shell scripts which may skip part of the build.
- non-compiler: The overhead of the build system itself; for Sketch this also includes the time to build/copy various non-source code resource files.
- + driver: Add execution of the driver, but do not execute any commands (by using the -### driver option).
- + pch gen: Add generation of PCH files (if used).
- + syntax: Add preprocessing, parsing, and semantic checking of source files.
- + IRgen: Add generation of LLVM IR (gcc has no corresponding phase).
- + codegen: Add generation of assembler files.
- + assembler: Add assembler time to generate .o files.
- + linker: Add linker time.
This set of stages is chosen to be approximately additive, that is each subsequent stage simply adds some additional processing. The timings measure the delta of the given stage from the previous one. For example, the timings for + syntax below show the difference of running with + syntax versus the times for + pch gen. This amounts to a fairly accurate measure of only the time to perform preprocessing, parsing, and semantic analysis after PCH generation is done.


[CHAPTER 229]
SISTER-STATE AND PROVINCE RELATIONSHIPS
Section
229-1 Definition
229-2 Hawaii sister-state committee
229-3 Initiating sister-state relationships
229-4 Maintaining sister-state relationships
229-5 Dissolving sister-state relationships


|
SimpleLink Graphics Library
<IP_ADDRESS>
|
Functions | |
| void | Graphics_drawLineH (const Graphics_Context *context, int32_t x1, int32_t x2, int32_t y) |
| void | Graphics_drawLineV (const Graphics_Context *context, int32_t x, int32_t y1, int32_t y2) |
| void | Graphics_drawLine (const Graphics_Context *context, int32_t x1, int32_t y1, int32_t x2, int32_t y2) |
| void Graphics_drawLineH | ( | const Graphics_Context * | context, |
| int32_t | x1, | ||
| int32_t | x2, | ||
| int32_t | y | ||
| ) |
Draws a horizontal line.
| context | is a pointer to the drawing context to use. |
| x1 | is the X coordinate of one end of the line. |
| x2 | is the X coordinate of the other end of the line. |
| y | is the Y coordinate of the line. |
This function draws a horizontal line, taking advantage of the fact that the line is horizontal to draw it more efficiently. The clipping of the horizontal line to the clipping rectangle is performed within this routine; the display driver's horizontal line routine is used to perform the actual line drawing.
References Graphics_Context::clipRegion, Graphics_Context::display, Graphics_Context::foreground, Graphics_drawHorizontalLineOnDisplay(), Graphics_Rectangle::xMax, Graphics_Rectangle::xMin, and Graphics_Rectangle::yMax.
Referenced by Graphics_drawLine(), Graphics_drawRectangle(), and Graphics_fillCircle().
| void Graphics_drawLineV | ( | const Graphics_Context * | context, |
| int32_t | x, | ||
| int32_t | y1, | ||
| int32_t | y2 | ||
| ) |
Draws a vertical line.
| context | is a pointer to the drawing context to use. |
| x | is the X coordinate of the line. |
| y1 | is the Y coordinate of one end of the line. |
| y2 | is the Y coordinate of the other end of the line. |
This function draws a vertical line, taking advantage of the fact that the line is vertical to draw it more efficiently. The clipping of the vertical line to the clipping rectangle is performed within this routine; the display driver's vertical line routine is used to perform the actual line drawing.
References Graphics_Context::clipRegion, Graphics_Context::display, Graphics_Context::foreground, Graphics_drawVerticalLineOnDisplay(), Graphics_Rectangle::xMax, Graphics_Rectangle::yMax, and Graphics_Rectangle::yMin.
Referenced by Graphics_drawLine(), and Graphics_drawRectangle().
| void Graphics_drawLine | ( | const Graphics_Context * | context, |
| int32_t | x1, | ||
| int32_t | y1, | ||
| int32_t | x2, | ||
| int32_t | y2 | ||
| ) |
Draws a line.
| context | is a pointer to the drawing context to use. |
| x1 | is the X coordinate of the start of the line. |
| y1 | is the Y coordinate of the start of the line. |
| x2 | is the X coordinate of the end of the line. |
| y2 | is the Y coordinate of the end of the line. |
This function draws a line, utilizing Graphics_drawLineH() and Graphics_drawLineV() to draw the line as efficiently as possible. The line is clipped to the clippping rectangle using the Cohen-Sutherland clipping algorithm, and then scan converted using Bresenham's line drawing algorithm.
References Graphics_drawLineH(), and Graphics_drawLineV().
Referenced by Graphics_drawCheckBox(), and Graphics_drawSelectedCheckBox().


This website has been archived. Data could be incomplete, inaccurate, or a placeholder.
The coolest tech events in Italy, both big or small, are usually held only in major cities like Milan or Rome. This doesn't encourage the growth of tech communities in smaller cities. But access to digital culture should be available everywhere, and small cities can play an important role in providing local innovators the means to get together and create. From this idea The Digital League was born.
Created in 2011 by Alessandro Di Tecco, The Digital League was an association aiming to bring the best national/international tech & digital events to Verona. By gathering people around topics such as internet culture, technology, startups & entrepreneurship, The Digital League aimed to create and develop a local digital community.
"By gathering people around topics such as internet culture, technology, startups & entrepreneurship, The Digital League aimed to create a local digital community."
In its 2 years of existence The Digital League accomplished a number of remarkable things:
In 2012 in Verona there weren't any companies whose only focus was offering young professionals & startups a place to work, for a reasonable price.
The Collective was built around this exact need, and effectively filled this void as the first authentic, state-of-the-art coworking space in Verona.
DigitalDrink was a networking event & startup showcase that gave several young companies the opportunity to pitch their product to a selected audience. Many people who met during a DigitalDrink ended up becoming business partners or found new job opportunities.
The world-renowned startup competition Startup Weekend came to Verona for the first time in 2012, and The Digital League played a major part in making it happen.
TDL's then-president, Alessandro Di Tecco, was part of the event's organizing team; moreover, TDL contributed to the event with a paid sponsorship and made The Collective available to host the nightly work sessions.
The Digital League created connections and relationships, in the form of media partnerships, with several tech conferences both in Italy and abroad.


I am passionate about learning & sharing, but more importantly, I am an empathetic person who strives for self-improvement and helping others.
I pride myself on surpassing expectations, not only by my work, but through my contributions to the team.
Here are some of the things I have knowledge on:
12 months - 2013-14
Tags: Leadership, Management, Team work
The Tetrahedron is an event organized by ABESIT for skill development.
►SKILLS ACQUIRED
•Developed public speaking skills in committee meetings.
•Acquired management skills and demonstrated
leadership by supervising the activities of the organization.
•Gained knowledge of web development by indulging and training freshers in web designing.
•Obtained organizational skills by coordinating
the registration of the incoming student administration.
•Improved time management and interpersonal skills by prioritizing and delegating tasks to colleagues and friends.
Hello! My name is Saumya Sharma. 3rd year student at the ABES Institute of Technology,Computer Science program. I am an extremely curious person with a wide range of interests and passions. Currently expanding my knowledge and skills in the field of Machine learning.
Music: The Chainsmokers • Imagine Dragons
Movies: • Inception • Interstellar • Transformers • Wall-E
Activities: Making people laugh • Reading • Photography • Painting • Travelling • Trying new things
Programming • Artificial Intelligence • Science


What makes me uncomfortable
Myself.
So this assignment for me is the equivalent of sitting in a therapist's room. In this case, lets give ITP the credit of creating a virtual therapy session for each one of us where we're figuring out the problems in our day to day lives (which may or not exist).
But my point here lies in the fact that (at least in my own case), whatever discomfort an individual might be undergoing has a root cause. Now whether that root cause is a habit (which can be altered), or an experience (that you can't run away from), it does and will always exist; and just has to be dealt with in different ways.
In my scenario (and I'm sorry if you feel I'm going too personal with sharing this problem), I recently ended a 6 year long relationship. Now, I understand that it shouldn't be a milestone in my life that should be the center of any other event, but it did create a feeling that led to hidden pit of sadness. However, the motive of this class is to find comfort within the feeling of discomfort and that's what happened when I decided to reclaim what I had lost - my social self.
So my journey began with rekindling the extrovert within me. I've just started grad school and there are a 120 students in my class. So that means that I have about a 120 opportunities to find my social self again.
The process seemed pretty simple and straightforward.
Outcome
So it might not have been the most difficult feat to conquer, but it was in no way the easiest either.
 You are not a unicorn having decended from the heavens.
Some people will love you but it isn't necessary that you will like them to the same degree.
Being funny isn't the best trait to have.
Stop being so cynical Shreiya. Everyone has flaws. You have a trillion. Acceptance and forgiveness are the keys to happiness. Embrace them like a happy Indian Yogi.


Guest Speaker, Faculty of Social Sciences - The Nation Newspaper
19 Nov 2019, 23:12
From left: Guest Speaker/Department of Economics, Faculty of Social Sciences, University of Lagos, Dr. Babatope Ogunniyi; President/Chief Executive Officer (CEO), World Stage Limited, Mr. Segun Adeleye; Chief Executive Officer, Willway Paradigm Service Limited, Miss Dolapo Agbede and Lagos Regional Coordinator, National Identity Management Commission, Kayode Adegoke, during the 2019 WorldStage Economic Summit, held in Lagos.
Company Secretary and Director, Legal Services, 9mobile, Ore Olajide (right), receiving the award for ‘Best In-House Legal Team of the Year’ in Nigeria (Telecoms Sector) from Prof. Yinka Omoregbe, Attorney General and Commissioner for Justice, Edo State (middle), at the ESQ Nigeria Legal Awards 2019, held at Landmark Event Centre, Victoria Island, Lagos. The Chief Financial Officer, 9mobile, Mr. Phillips Oki.
From left: Chief Executive Officer, AerialView Communications Africa, Oyebanjo Oloyede Ariyo; British Council Director Education, Enterprise and Skills, Adetomi Soyinka; Country Head, ECOWAS-GIABA, Tim Melaye; Founder, The School of Life and Convener of The Career Life and Money Conference, Motola Oyebanjo; LSETF Director, Strategy Partnerships and Stakeholder Management, Abosede George-Ogan; Seasoned Commercial Operations Consultant, Winston Ailemoh, at The Career Life and Money Conference 2019 organised by The School of Life, in Lagos.
Police National Coach, Martha Nwokolo; Vice Chairman Darts, Chief Sam Olarewaju; Deputy Commissioner of Police, Dayo Ariyo; Ikeja Club Chairman (Darts Section), Otunba Sunday Ogunwande with Lagos State Darts Chairman, Koye Adejumo; Baale Seriki Aro (Patron) and Tunde Apalara, during Lagos State Inter-Clubs Darts compettiion at Ikeja Club, Lagos.
The couple, Mr. Taofeek Raji and his wife, Baseerah (middle), with the groom’s parents, Chairman, Nigeria Union of Journalists (NUJ), Lagos State Council, Dr. Qasim Akinreti and his wife, Hajia Noimat, at the wedding of their daughter, held at ASCON, Badagry, Lagos.
From left: Ayo Adelakun of Sales Department, Grand Oak Limited; Iyanu Aloba and Temiagin of Marketing Department during a sensitisation campaign at the trade fair.
L-R – Dare Senbore, Partner, Aluko & Oyebode; Dr Ademola Bamgbose, International Arbitration Lawyer, Hogan Lovells, London; Angus Rankin, Construction and Engineering Disputes Partner, Hogan Lovells, London; Andrew Ohaneje, Assistant General Counsel, Nigeria LNG Limited; Nathan Searle, International Arbitration Partner, Hogan Lovells, London at the legal training session for select participants of the Nigeria Liquefied Natural Gas (NLNG).
From left: The Manager, Women Christian Association, Wesley Cathedral, Olowogbowo, Lagos, Elder Titus Cole; a Senior Class Leader of the church, Sis. Oluremi Disu; her husband and newly installed Grand Patron of the association, High Chief Akin Disu and the newly installed Lady President of the association, Sis. Yewande Abayomi-George, at the cutting of the association’s 95th anniversary birthday cake at the Wesley Cathedral, Olowogbowo, Lagos.
From left: Comrade Abiodun Bakare of Amalgamated Union of Public Corporations Civil Service Technical and Recreational Services Employees (AUPCTRE), Achike Chude of Joint Action Front (JAF), Philip Jakpor of Environmental Rights Action and Comrade Taiwo Opaleye, branch chairman, AUPCTRE Lagos Council, at a news briefing organised by Environmental Rights Action (ERA), tagged: “This is Lagos: Our Water Our Right. No to Privatisation!” held in Lagos.
Airport Manager, Mrs. Cecelia Nneoma Oguama (left), briefing the Minister of Aviation, Sen. Hadi Sirika, during the inspection work on developments at the Akanu Ibiam International Airport, Enugu.
A cross section of Colgate Dental specialists and members of the University of Ibadan Association of Dental Students (UDAS), attending to people during the Colgate Dental Screening Community Outreach at Ojoo market in Ibadan, Oyo State.


Start and end are Vec2 points and the @component is either an edge or a
a value of 0 - 1 that samples between start and end
Basically find the nearest y value to DY - not sure that is totally correct though :S
Compute the voronoi graph for two joined edges
As the bisector will only be for edges with angles less than 180, we can assume the shortest edge is the one that will be crossed first for now, we consider a
TODO - how do we know which parabola result to choose?
Function that determines where a parabola leaves the area of influence of an edge. Takes the line in the form ax + by + c = 0
two lines gives potentially 4 crossing points
Function that determines where a line equation leaves the area of influence of an edge Takes the line in the form ax + by + c = 0
Get the equations of the lines perpendicular to edge, passing through the end points
find the intersection (hopefully they are not parallel lines :S ) We should have a determinate that is non-zero right?
We consider only one side of the edge, depending on whether left or right is true
Given a planar polygon (a list of 2D vertices), compute the the medial axis of the polygon as a set of pairs of 2D points (edges)
create pairs / edges
find the chains - As we are going clockwise winding, inside is to the right of the vector which is a positive cross product with z ( I think!)
Its a reflex angle, therefore a chain
there is an edge case here whereby the last edge could be in a chain already but I suspect that is rare and can be handled anyway
not a chain
we now have the chains so we must compute the voronoi diagram for each chain and combine
Wedges denote the area of effect for computing our initial bisectors. They are internal and are denoted by a point and a direction vector. Each element has two lines that denote a wedge and we want to be inside them
compute the initial voronoi graph. The wedges for each element
its an edge so two lines perpendicular
Its a reflex point so two lines perpendicular to the edges that join it
For now, compute the voronoi for two chains


--- layout: default title: Categories permalink: /category/ type: menu icon: fa fa-th-list ---
{{site.categories.size}} Category in Total
{{category | first}}


|
Copley Motion Library
|
This class allows variables to be mapped into a PDO. More...
Public Member Functions | |
| Pmap () | |
| Default constructor for a generic PDO mapping variable. | |
| Pmap (uint16 index, byte sub, byte bits) | |
| Construct a generic PDO mapping variable and initialize it's size and object ID. More... | |
| virtual | ~Pmap () |
| Virtual destructor. | |
| virtual const Error * | Init (uint16 index, byte sub, byte bits) |
| Initialize a generic PDO mapping variable. More... | |
| virtual void | Get (byte *cptr) |
| Called when a receive PDO is about to be transmitted. More... | |
| virtual void | Set (byte *cptr) |
| Called when a transmit PDO is received. More... | |
| virtual uint32 | GetMapCode () |
| Return the 32-bit code used to identify this variable in the CANopen node's PDO mapping block. | |
| uint16 | GetIndex () |
| Get the object index associated with this variable. More... | |
| byte | GetSub () |
| Get the object sub-index associated with this variable. More... | |
| byte | GetBits () |
| Get the number of bits in this variable. More... | |
Protected Attributes | |
| uint16 | index |
| The 16-bit index of the object in the object dictionary. | |
| byte | sub |
| The 8-bit sub-index of the object in the object dictionary. | |
| byte | bits |
| The number of bits that this object takes up. | |
This class allows variables to be mapped into a PDO.
This class can be used directly for transmit PDOs if the received data is not of interest (it will simply be discarded by the Set() function. Using this for receive PDOs is not recommended since the Get() function doesn't add any data to the output stream and therefore the data transmitted to the node will be undefined.
Construct a generic PDO mapping variable and initialize it's size and object ID.
| index | The index of the variable in the object dictionary |
| sub | The variable's sub-index in the object dictionary |
| bits | The size of the variable in bits |
|
inlinevirtual |
Called when a receive PDO is about to be transmitted.
This virtual function does nothing and therefore objects of this generic type shouldn't be used when actually transmitting PDOs
| cptr | Pointer where the PDO data should be stored |
Reimplemented in Pmap8, Pmap16, Pmap24, Pmap32, and PmapRaw.
|
inline |
Get the number of bits in this variable.
|
inline |
Get the object index associated with this variable.
|
inline |
Get the object sub-index associated with this variable.
Initialize a generic PDO mapping variable.
| index | The index of the variable in the object dictionary |
| sub | The variable's sub-index in the object dictionary |
| bits | The size of the variable in bits |
|
inlinevirtual |
Called when a transmit PDO is received.
This virtual function doesn't do anything and therefore objects of this base class should only be used for variables that are not of interest and can therefore be ignored.
| cptr | Pointer to the received PDO data. |
Reimplemented in Pmap8, Pmap16, Pmap24, Pmap32, and PmapRaw.


Pizza Pie Palace
All large Pizzas $22 ------ All small pizzas $12
Make a Pizza:
Large or Small
Large
Small
Topping Options
Pepperoni
Black Olives
Chanterelle Mushrooms
Succulant Steak Strips
Popcorn
Pineapple
Make my Pizza!
Review Your Order
Your toal is $
dollars . Do enjoy!
Toppings:
Size:
Price:
Description:


{% extends 'layout/layout_user.html' %} {% load leagues %} {% load league_registrations %} {% load teams %} {% load user_roles %} {% load utility %} {% load webpack_static from webpack_loader %} {% block title %}My Account · {{ block.super }}{% endblock %} {% block content %}
Following that, you have a game
{% if following_game.start %}
at {{ following_game.start|date:'g:iA'|lower }}
on {{ following_game.date|date:'l F jS, Y' }}
{% else %}
on {{ following_game.date|date:'l F jS, Y' }}
from {{ following_game.league.times }}
{% endif %}
at {{ following_game.field_name.field.name }} {{ following_game.field_name.name }}.
| Division | Status | Group |
|---|---|---|
| {{ registration.league.season_title|smart_title }} {{ registration.league.year }} {{ registration.league.night|smart_title }} | {{ registration.status }} |
{% if registration.baggage.get_registrations|length > 1 %}
{% for baggage_reg in registration.baggage.get_registrations %}
{{ baggage_reg.user.get_full_name }} {% endfor %} {% else %} No Group {% endif %} {% if registration.is_complete and registration.league.baggage > 1 and not registration.waitlist and not registration.league.is_after_group_lock_start %} {% endif %} |
PayPal payments occasionally take some time to clear. Try reloading after a few minutes have passed.
If you used the e-check feature of Paypal it may take up to a week to clear.


WITNESS LIST Appropriations Committee (Subcommittee on General Government) December 2, 1998-9:00A Performance Measures & Year 2000 On: Adams, Joe (Texas Workforce Commission) Atkins, Billy (Texas Lottery Commission) Bethel, Donald (Dept. of Housing and Community Affairs) Bloom, Ed (Incentive and Productivity Commission) Buckley, Robert (Soil and Water Conservation Board) Cloud, Linda (Texas Lottery Commission) Contreras, Dan (Incentive and Productivity Commission) Curis, Shari (Comptroller of Public Accounts) Edwards, Kimberly (Texas Public Finance Authority) Ellis, Dovie (Comptroller of Public Accounts) Garvin, John (Dept. of Housing and Community Affairs) Grief, Gary (Texas Lottery Commission) Maldonado, Alex (Dept. of Housing and Community Affairs) McDaniel, Tracye (Texas Dept. of Economic Development) Moore, James (Soil and Water Commission) Moser, Thomas (Texas Aerospace Commission) Pederson, Craig (Texas Water Development Board) Pyka, Kathy (Texas Railroad Commission) Reid, Spencer (General Land Office) Schieck, David (Texas Railroad Commission) Settemeyer, Herman (Texas River Compact Commissions) Sheridan, Mike (Texas Workforce Commission) Stephens, Bobbie (Soil and Water Commission Board) Stiner, Daisy (Dept. of Housing and Community Affairs) Thrasher, Rick (Texas Dept. of Economic Development) West, Michael (Dept. of Economic Development)


Whether the task works.
Whether the task works.
The value returned by the last task executed.
Add the task to the end of the list.
Execute the current task.
Skips all tasks and changes to the finished state.
Change the current task to the first task.
Change the current task to the next task.
Change the current task to the previos task.
Cancel all task and leave them unregistered.
Change the current task to the specified task.
Generated using TypeDoc
@tawaship/task


Avul Pakir Jainulabdeen Abdul Kalam (15 October 1931 — 27 July 2015), was the 11th President of India from 2002 to 2007. A career scientist turned statesman, Kalam was born and raised in Rameswaram, Tamil Nadu, and studied physics and aerospace engineering. He spent the next four decades as a scientist and science administrator, mainly at the Defence Research and Development Organisation (DRDO) and Indian Space Research Organisation (ISRO) and was intimately involved in India's civilian space programme and military missile development efforts. He thus came to be known as the Missile Man of India for his work on the development of ballistic missile and launch vehicle technology. He also played a pivotal organisational, technical, and political role in India's Pokhran-II nuclear tests in 1998, the first since the original nuclear test by India in 1974. Kalam was elected as the 11th President of India in 2002 with the support of both the ruling Bharatiya Janata Party and the then-opposition Indian National Congress. Widely referred to as the "People's President," he returned to his civilian life of education, writing and public service after a single term. He was a recipient of several prestigious awards, including the Bharat Ratna, India's highest civilian honour. While delivering a lecture at the Indian Institute of Management Shillong, Kalam collapsed and died from an apparent cardiac arrest on 27 July 2015, aged 83.Thousands including national-level dignitaries attended the funeral ceremony held in his hometown of Rameshwaram, where he was buried with full state honours.
Kalam's photo gallery
Made by Shivani Mishra ♥


Dog who can only use two limbs gets prosthetic leg so he can go snowboarding
Gus was born with a congenital deformity that means he can’t use his front legs like most dogs.
But that hasn’t stopped the Carolina/Husky mix being a playful pup.
Most of the time, he gets around by jumping and with some help from his owner Melody Rezzonico, 27.
She bought him a wheelchair but it didn’t work when it got cold where they live in Laramie, Wyoming, U.S.
So instead she got a custom made prosthetic leg to hold his body and put it on a piece of plastic like a snowboard so he can race through the snow.
Melody said: ‘Seeing Gus run and be able to keep up with other dogs is the best feeling in the world.

Advertisement Advertisement
‘As a dog, Gus has no clue that he’s any different from the others.
‘He’s incredibly goofy, always wanting to wrestle, play tug of war, go on walks, beg for treats and belly rubs.
‘He has completely adapted to life with two legs.’
Gus was abandoned in South Dakota when he was four months old and Melody found him at a local shelter.
She decided to take him home and has worked with him to create ways he can be active as although she found he could ‘scoot’ around, he would often fall forward and hurt his chin.
Thanks to the prosthetic, Gus has climbed 14,000-foot mountains and been able to run through sand dunes.


Generic Macros
A collection of macros that are not related to ObjectJ; 4 Aug 2010
Custom Plot Markers
For creating a plot using custom markers (other than circles, dots etc.)
SimplePalm
Reconstruction of PALM images
Turtle Demo
This example of Turtle graphics draws a number of waves
StabilizeMovie
Stabilizes a movie if single particle can be used as reference
Auto-Correlation
Demonstrates one-dimensional auto-correlation
Stabilize Movie
Compensates x-y instabilities in chunks


| Usage | Synopsis |
|---|---|
| Install all dependencies | $ tns install [--path] |
| Install a selected npm module | $ tns install <Module> |
| Enable TypeScript support | $ tns install typescript |
Installs all dependencies described in a valid package.json
or installs a selected NativeScript development module as a dev dependency.
The package.json
file must be a valid package.json
describing the configuration of a NativeScript project. If missing or corrupted, you can recreate the file by running $ tns init
in the directory of a NativeScript project.
--path
- Specifies the directory which contains the package.json
file, if different from the current directory.<Module>
- Specifies a NativeScript development module by path to a local directory containing a valid npm module or by name in the npm registry. When a <Module>
is specified, this command adds the module as a dev dependency in your package.json
.TIP: When installing a module from the npm registry, you can specify it by full name or suffix. NativeScript development modules are published in the npm registry with the following name format:
nativescript-dev-<suffix>
.
| Command | Description |
|---|---|
| platform add | Configures the current project to target the selected platform. |
| platform remove | Removes the selected platform from the platforms that the project currently targets. |
| platform update | Updates the NativeScript runtime for the specified platform. |
| platform | Lists all platforms that the project currently targets. |
| prepare | Copies common and relevant platform-specific content from the app directory to the subdirectory for the selected target platform in the platforms directory. |


ISO¶
GET /api/1.2/osversions
Get all OS versions for ISO generation and the directory where the kickstarter files are found. The values are retrieved from osversions.cfg found in either /var/www/files or in the location defined by the kickstart.files.location parameter (if defined).
Authentication Required: Yes
Role(s) Required: None
Response Properties
Parameter Description OS version name
OS version name. For example, “CentOS 7.2 vda”. OS version dir
The directory where the kickstarter ISO files are found. For example, centos72-netinstall. Response Example
{ "response": { "CentOS 7.2": "centos72-netinstall" "CentOS 7.2 vda": "centos72-netinstall-vda" } }
POST /api/1.2/isos
Generate an ISO.
Authentication Required: Yes
Role(s) Required: Operations
Request Properties
Parameter Required Description osversionDir
yes The directory name where the kickstarter ISO files are found. hostName
yes domainName
yes rootPass
yes dhcp
yes Valid values are ‘yes’ or ‘no’. If yes, other IP settings will be ignored. interfaceMtu
yes 1500 or 9000 ipAddress
yes|no Required if dhcp=no ipNetmask
yes|no Required if dhcp=no ipGateway
yes|no Required if dhcp=no ip6Address
no /64 is assumed if prefix is omitted. ip6Gateway
no Ignored if an IPV4 gateway is specified. interfaceName
no Typical values are bond0, eth4, etc. If you enter bond0, a LACP bonding config will be written. disk
no Typical values are “sda” Request Example
{ "osversionDir": "centos72-netinstall-vda", "hostName": "foo-bar", "domainName": "baz.com", "rootPass": "password", "dhcp": "no", "interfaceMtu": 1500, "ipAddress": "<IP_ADDRESS>", "ipNetmask": "<IP_ADDRESS>", "ipGateway": "<IP_ADDRESS>" }
Response Properties
Parameter Type Description isoURL
string The URL location of the ISO. ISO locations can be found in cnd.conf file. Response Example
{ "response": { "isoURL": "https://traffic_ops.domain.net/iso/fqdn-centos72-netinstall.iso" }, "alerts": [ { "level": "success", "text": "Generate ISO was successful." } ] }


|
JNIPort for Dolphin Smalltalk |
|
|
Back to Goodies |
The Status Monitor's Classloaders PageThe Classloaders Page is a plug-in page for the Status Monitor. It displays the status and configuration of any “supplementary classloaders”.
This is work in progress, and — as such — not yet documented… Write some words here!
See the class comment on |
Copyright © Chris Uppal, 2003-2005
Java, JNI (probably), JVM (possibly), and God knows what else, are trademarks of Sun Microsystems, Inc.


It's clear Hollywood is scraping the bottom of the old TV barrel when filmmakers start adapting things like "The Mod Squad," which left the airwaves more than 25 years ago and has rarely been seen since. The movie, which is louder, racier and more profane than the show ever could have been, retains the concept of the serieswithout managing to have much fun with it. This is a movie awash in dazzling trimmings but devoid of ideas.
For awhile, "The Mod Squad" looks like it may get by on flash alone. Director Scott Silver, cinematographer Ellen Kuras and editor Dorian Harris use every possible film school trick (high-speed zooms, time-lapse photography, arty out-of-focus shots, jump cuts, etc.) to jump-start the film, and the images are backed up by a scorching soundtrack mixing vintage R&B and new tunes by Lauryn Hill, Bjork and Everlast. The score by BC Smith is ripe with the cheesy organs and blaring horns of classic 1970s TV music.
But like last year's "The Avengers," "Mod Squad" eventually dissolves into stylish chaos. It's as if the production team dressed up the stage, lined up all the right people and then lost interest in the project once the cameras started to roll.
The script, which vacillates between confusion and tedium, sets up young troublemakers Julie (Claire Danes), Lincoln (Omar Epps) and Pete (Giovanni Ribisi) as novice cops under the wing of Captain Greer (Dennis Farina), who realizes the three can effectively infiltrate places and organizations the boys in blue never could. When Greer turns up dead, the trio realizes the force was against him, and they scramble to uncover the corruption within the police department.
Perhaps because of the scattershot screenplay, the cast members frequently seem to be at a loss as to how to play their roles. Danes' performance as a recovering alcoholic and drug addict is not one of her strongest, although she does come up with a convincingly grungy look for Julie. Aside from occasionally glowering and looking concerned, Epps has absolutely nothing to do.
Only the doughy, slack-jawed Ribisi ("The Other Sister," "Saving Private Ryan") appears to have a solid grasp on his characterization of Pete as a would-be fly guy who generally ends up looking like a dweeb.
For a movie that seems to know exactly how silly it is - at one point, Pete and Julie make "Scream"-style cracks about how the big finale had better not take place in an abandoned warehouse - "The Mod Squad" keeps a straight, sometimes even sullen face too much of the time. Hopefully the promised/threatened film version of "Charlie's Angels" won't make the same mistake.
James Sanford
The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews


Made for Bootstrap 4!
This page and all of the switch buttons shown are running on Bootstrap 4.x
Installation
CDN
<link<EMAIL_ADDRESS>rel="stylesheet">
<script<EMAIL_ADDRESS>Download
GitHub Latest releaseNPM
npm install bootstrap-switch-button
Yarn
yarn install bootstrap-switch-button
Demos
Sizes
Bootstrap Switch Button is available in different sizes.
Custom Sizes
Bootstrap Switch Button can handle custom sizes by data-width
and data-height
options.
Colors
Bootstrap Switch Button implements all standard bootstrap 4 button colors.
Outline Colors
Bootstrap Switch Button implements all standard bootstrap 4 button outline colors.
Dark Theme Colors
Bootstrap Switch Button colors look great on dark backgrounds.
Dark Theme Outline Colors
Bootstrap Switch Button outline colors look great on dark backgrounds.
Custom Style
Style the buttons to fit an existing UX.
Custom Text
The text can be changed easily with attributes or options.
HTML, Icons, Images
You can easily add icons or images since html is supported for on/off text.
Multiple Lines of Text
Toggles with multiple lines will adjust its heights.
Animation Speed
Transition speed can be easily controlled with css transition
property on .switch-group
. You can also turn animation off completely.
Stacked checkboxes
Simply add data-toggle="switchbutton"
to convert checkboxes into toggles.
Inline Checkboxes
Simply add data-toggle="switchbutton"
to a convert checkboxes into switch buttons.
Usage
Initialize with HTML
Simply add data-toggle="switchbutton"
to convert checkboxes into switch buttons.
Initialize with JavaScript
Simply call the switchButton
method to convert checkboxes into switch button.
document.getElementById('chkToggle2').switchButton();
API
Options
Options can be passed via data attributes or JavaScript. For data attributes, append the option name to data-
, as in data-onlabel="Enabled"
.
| Name | Type | Default | Description |
|---|---|---|---|
onlabel |
string | html | "On" |
Text of the on switch label. |
offlabel |
string | html | "Off" |
Text of the off switch label. |
onstyle |
string | "primary" |
Style of the on switch. Possible values are: primary , secondary , success , danger , warning , info , light , dark |
offstyle |
string | "light" |
Style of the off switch. Possible values are: primary , secondary , success , danger , warning , info , light , dark |
size |
string | null |
Size of the switch button. If set to null, button is default/normal size. Possible values are: lg , sm , xs |
style |
string | null | Appends the provided value to the switch's class attribute. Use this to apply custom styles to the switch. |
width |
integer | null |
Sets the width of the switch. If set to null, width will be calculated. |
height |
integer | null |
Sets the height of the switch. If set to null, height will be calculated. |
Methods
Methods can be used to control a switch button directly.
| Method | Example | Description | Demo |
|---|---|---|---|
| initialize | document.getElementById('switch-demo').switchButton() |
Initializes the switch-button with options | |
| destroy | document.getElementById('switch-demo').switchButton('destroy') |
Destroys the switch-button | |
| on | document.getElementById('switch-demo').switchButton('on') |
Sets the switch-button to 'On' state | |
| off | document.getElementById('switch-demo').switchButton('off') |
Sets the switch-button to 'Off' state | |
| toggle | document.getElementById('switch-demo').switchButton('toggle') |
Toggles the state of the switch-button | |
| enable | document.getElementById('switch-demo').switchButton('enable') |
Enables the switch-button | |
| disable | document.getElementById('switch-demo').switchButton('disable') |
Disables the switch-button |
Events
Event Propagation
Note All events are propagated to and from input element to the switch-button.
You should listen to events from the <input type="checkbox">
directly rather than look for custom events.
Stopping Event Propagation
Passing true
to the on/off methods will enable the silent option to prevent the control from propagating the change event in
cases where you want to update the controls on/off state, but do not want to fire the onChange event.
API Input
This also means that using the API or Input to trigger events will work both ways.


|
The advent and subsequent massive rise of social media outlets such as Facebook and Twitter have allowed people to share their ideas and thoughts on a scale never before possible. Creativity and connection among people around the globe has flourished and is a wonderful thing to see develop in our lifetimes.
This freedom of expression while mostly positive has unfortunately also spawned another form of expression; harassment known as Cyber bullying. The ability to post anonymously has allowed mean spirited and cowardly individuals to harass from afar, hiding behind a false Facebook account or other false online identity. This harassment often allows the victim no recourse as the bully is anonymous and is difficult to determine who the perpetrator is.
This problem is a tough nut to crack on several levels. The first and possibly biggest issue with handling this problem is one of the foundations our country is based on; freedom of speech. How do we block and / or squelch expression of feelings and ideas while at the same time preserving our freedom to speak our mind?
It's shaky ground to begin to prosecute ideas or opinions as is and can very possibly lead to increased governmental controls over both the Internet and the information found there.
The solution to me seems to be multi-fold. As this is mostly a teenage issue, parents need to be aware of their kids actions and Internet dealings. Raise our kids correctly, instill a sense of honor and the idea that the strong defend the weak and stand up for those different and / or smaller than themselves.
Next I feel that the social media outlets need to implement greater internal controls (TRON?) over the content and police the portal more effectively.
Both these possible solutions may help to al least limit Cyber bulling without the need for increased governmental involvement.
|


An especially cold text reply about setting boundaries is a copypasta now
by Morgan SungAs usual, Twitter is Big Mad about yet another divisive take. This time, it's about setting boundaries with friends.
Writer Melissa Fabello posted a thread about establishing limits when it comes to discussing difficult issues. Instead of expecting a space to vent about personal drama, Fabello says, she appreciates when friends ask for it.
"Asking for consent for emotional labor, even from people with whom you have a long-standing relationship that is welcoming to crisis-averting, should be common practice," she tweeted on Monday.
She concluded the thread with an example template for asking friends for time and space.
But Twitter users were miffed at just how clinical and bureaucratic the reply was. It was likened to negotiating with an employer or getting an automated customer service message.
Soon enough, it became a copypasta.
 Telling your friends that you're simply going through it and will respond when you can can work too.