#!/usr/bin/env python3
# -*- coding: utf-8 -*-
__author__ = "heider"
__doc__ = r"""
Created on 01/02/2022
"""
__all__ = [
"MarkerTypeEnum",
"DistanceTypeEnum",
"HoughModeEnum",
"WindowFlagEnum",
"ContourRetrievalModeEnum",
"ContourApproximationModeEnum",
"MouseEventEnum",
"FontEnum",
"DataTypeEnum",
"ComparisonEnum",
"LineTypeEnum",
"MorphTypeEnum",
"MorphShapeEnum",
"DistanceTransformMaskEnum",
"DistanceTransformLabelTypeEnum",
"KmeansEnum",
"CameraPropertyEnum",
"RectanglesIntersectTypes",
"BorderTypeEnum",
"VideoCaptureAPIEnum",
]
from enum import Enum
import cv2
[docs]class ComparisonEnum(Enum):
eq = cv2.CMP_EQ # equal
gt = cv2.CMP_GT # greater than
ge = cv2.CMP_GE # # greater equal
lt = cv2.CMP_LT # less than
le = cv2.CMP_LE # less equal
ne = cv2.CMP_NE # unequal
[docs]class DataTypeEnum(Enum):
# Unsigned 8bits # uchar 0 ~ 255
u8 = cv2.CV_8U
u8c1 = cv2.CV_8UC1
u8c2 = cv2.CV_8UC2
u8c3 = cv2.CV_8UC3
u8c4 = cv2.CV_8UC4
# u8cN
# Signed 8bits char -128 ~ 127
s8 = cv2.CV_8S
s8c1 = cv2.CV_8SC1
s8c2 = cv2.CV_8SC2
s8c3 = cv2.CV_8SC3
s8c4 = cv2.CV_8SC4
# s8cN
# Unsigned 16bits ushort 0 ~ 65535
u16 = cv2.CV_16U
u16c1 = cv2.CV_16UC1
u16c2 = cv2.CV_16UC2
u16c3 = cv2.CV_16UC3
u16c4 = cv2.CV_16UC4
# u16cN
# Signed 16bits short -32768 ~ 32767
s16 = cv2.CV_16S
s16c1 = cv2.CV_16SC1
s16c2 = cv2.CV_16SC2
s16c3 = cv2.CV_16SC3
s16c4 = cv2.CV_16SC4
# s16cN
# Signed 32bits int -2147483648 ~<PHONE_NUMBER>
s32 = cv2.CV_32S
s32c1 = cv2.CV_32SC1
s32c2 = cv2.CV_32SC2
s32c3 = cv2.CV_32SC3
s32c4 = cv2.CV_32SC4
# s32cN
# Float 32bits float -1.18e-38 ~ 3.40e-38
f32 = cv2.CV_32F
f32c1 = cv2.CV_32FC1
f32c2 = cv2.CV_32FC2
f32c3 = cv2.CV_32FC3
f32c4 = cv2.CV_32FC4
# f32cN
# Double 64bits double -1.7e+308 ~ +1.7e+308
f64 = cv2.CV_64F
f64c1 = cv2.CV_64FC1
f64c2 = cv2.CV_64FC2
f64c3 = cv2.CV_64FC3
f64c4 = cv2.CV_64FC4
# f64cN
[docs]class VideoCaptureAPIEnum(Enum):
"""
VideoCapture API backends identifier.
"""
any = cv2.CAP_ANY
# Auto detect == 0.
vfw = cv2.CAP_VFW
# Video For Windows (platform native)
v4l = cv2.CAP_V4L
# V4L/V4L2 capturing support via libv4l.
v4l2 = cv2.CAP_V4L2
# Same as CAP_V4L.
firewire = cv2.CAP_FIREWIRE
# IEEE 1394 drivers.
fireware = cv2.CAP_FIREWARE
# Same as CAP_FIREWIRE.
ieee1394 = cv2.CAP_IEEE1394
# Same as CAP_FIREWIRE.
dc1394 = cv2.CAP_DC1394
# Same as CAP_FIREWIRE.
cmu1394 = cv2.CAP_CMU1394
# Same as CAP_FIREWIRE.
qt = cv2.CAP_QT
# QuickTime.
unicap = cv2.CAP_UNICAP
# Unicap drivers.
dshow = cv2.CAP_DSHOW
# DirectShow (via videoInput)
pvapi = cv2.CAP_PVAPI
# PvAPI, Prosilica GigE SDK.
openni = cv2.CAP_OPENNI
# OpenNI (for Kinect)
openni_asus = cv2.CAP_OPENNI_ASUS
# OpenNI (for Asus Xtion)
android = cv2.CAP_ANDROID
# Android - not used.
xiapi = cv2.CAP_XIAPI
# XIMEA Camera API.
avfoundation = cv2.CAP_AVFOUNDATION
# AVFoundation framework for iOS (OS X Lion will have the same API)
giganetix = cv2.CAP_GIGANETIX
# Smartek Giganetix GigEVisionSDK.
msmf = cv2.CAP_MSMF
# Microsoft Media Foundation (via videoInput)
winrt = cv2.CAP_WINRT
# Microsoft Windows Runtime using Media Foundation.
intelperc = cv2.CAP_INTELPERC
# Intel Perceptual Computing SDK.
openni2 = cv2.CAP_OPENNI2
# OpenNI2 (for Kinect)
openni2_asus = cv2.CAP_OPENNI2_ASUS
# OpenNI2 (for Asus Xtion and Occipital Structure sensors)
gphoto2 = cv2.CAP_GPHOTO2
# gPhoto2 connection
gstreamer = cv2.CAP_GSTREAMER
# GStreamer.
ffmpeg = cv2.CAP_FFMPEG
# Open and record video file or stream using the FFMPEG library.
images = cv2.CAP_IMAGES
# OpenCV Image Sequence (e.g. img_%02d.jpg)
aravis = cv2.CAP_ARAVIS
# Aravis SDK.
opencv_mjpeg = cv2.CAP_OPENCV_MJPEG
# Built-in OpenCV MotionJPEG codec.
intel_mfx = cv2.CAP_INTEL_MFX
# Intel MediaSDK.
xine = cv2.CAP_XINE
# XINE engine (Linux)
[docs]class CameraPropertyEnum(Enum):
settings = cv2.CAP_PROP_SETTINGS
auto_focus = cv2.CAP_PROP_AUTOFOCUS
pos_msec = (
cv2.CAP_PROP_POS_MSEC
) # Current position of the video file in milliseconds.
pos_frames = (
cv2.CAP_PROP_POS_FRAMES
) # 0-based index of the frame to be decoded/captured next.
avi_ratio = (
cv2.CAP_PROP_POS_AVI_RATIO
) # Relative position of the video file: 0 - start of the film, 1 - end of the film.
frame_width = cv2.CAP_PROP_FRAME_WIDTH # Width of the frames in the video stream.
frame_height = (
cv2.CAP_PROP_FRAME_HEIGHT
) # Height of the frames in the video stream.
fps = cv2.CAP_PROP_FPS # Frame rate.
fourcc = cv2.CAP_PROP_FOURCC # 4-character code of codec.
frame_count = cv2.CAP_PROP_FRAME_COUNT # Number of frames in the video file.
format = cv2.CAP_PROP_FORMAT # Format of the Mat objects returned by retrieve() .
mode = (
cv2.CAP_PROP_MODE
) # Backend-specific value indicating the current capture mode.
brightness = cv2.CAP_PROP_BRIGHTNESS # Brightness of the image (only for cameras).
contrast = cv2.CAP_PROP_CONTRAST # Contrast of the image (only for cameras).
saturation = cv2.CAP_PROP_SATURATION # Saturation of the image (only for cameras).
hue = cv2.CAP_PROP_HUE # Hue of the image (only for cameras).
gain = cv2.CAP_PROP_GAIN # Gain of the image (only for cameras).
exposure = cv2.CAP_PROP_EXPOSURE # Exposure (only for cameras).
convert_rgb = (
cv2.CAP_PROP_CONVERT_RGB
) # Boolean flags indicating whether images should be converted to RGB.
white_balance_blue = cv2.CAP_PROP_WHITE_BALANCE_BLUE_U # Currently unsupported
white_balance_red = cv2.CAP_PROP_WHITE_BALANCE_RED_V # Currently unsupported
white_balance_ios = cv2.CAP_PROP_IOS_DEVICE_WHITEBALANCE # Currently unsupported
rectification = (
cv2.CAP_PROP_RECTIFICATION
) # Rectification flag for stereo cameras (note: only supported by DC1394 v 2.x backend currently)
monochrome = cv2.CAP_PROP_MONOCHROME
sharpness = cv2.CAP_PROP_SHARPNESS
gamma = cv2.CAP_PROP_GAMMA
temperature = cv2.CAP_PROP_TEMPERATURE
trigger = cv2.CAP_PROP_TRIGGER
trigger_delay = cv2.CAP_PROP_TRIGGER_DELAY
zoom = cv2.CAP_PROP_ZOOM
focus = cv2.CAP_PROP_FOCUS
guid = cv2.CAP_PROP_GUID
iso_speed = cv2.CAP_PROP_ISO_SPEED
backlight = cv2.CAP_PROP_BACKLIGHT
pan = cv2.CAP_PROP_PAN
tilt = cv2.CAP_PROP_TILT
roll = cv2.CAP_PROP_ROLL
iris = cv2.CAP_PROP_IRIS
buffer_size = cv2.CAP_PROP_BUFFERSIZE
sar_num = cv2.CAP_PROP_SAR_NUM
sar_den = cv2.CAP_PROP_SAR_DEN
backend = cv2.CAP_PROP_BACKEND
channel = cv2.CAP_PROP_CHANNEL
auto_wb = cv2.CAP_PROP_AUTO_WB
wb_temperature = cv2.CAP_PROP_WB_TEMPERATURE
codec_pixel_format = cv2.CAP_PROP_CODEC_PIXEL_FORMAT
bitrate = cv2.CAP_PROP_BITRATE
orientation_meta = cv2.CAP_PROP_ORIENTATION_META
orientation_auto = cv2.CAP_PROP_ORIENTATION_AUTO
open_timeout_msec = cv2.CAP_PROP_OPEN_TIMEOUT_MSEC
read_timeout_msec = cv2.CAP_PROP_READ_TIMEOUT_MSEC
stream_open_time_usec = cv2.CAP_PROP_STREAM_OPEN_TIME_USEC
video_total_channels = cv2.CAP_PROP_VIDEO_TOTAL_CHANNELS
video_stream = cv2.CAP_PROP_VIDEO_STREAM
audio_stream = cv2.CAP_PROP_AUDIO_STREAM
audio_pos = cv2.CAP_PROP_AUDIO_POS
audio_shift_nsec = cv2.CAP_PROP_AUDIO_SHIFT_NSEC
audio_data_depth = cv2.CAP_PROP_AUDIO_DATA_DEPTH
audio_samples_per_second = cv2.CAP_PROP_AUDIO_SAMPLES_PER_SECOND
audio_base_index = cv2.CAP_PROP_AUDIO_BASE_INDEX
audio_total_channels = cv2.CAP_PROP_AUDIO_TOTAL_CHANNELS
audio_total_streams = cv2.CAP_PROP_AUDIO_TOTAL_STREAMS
audio_synchronize = cv2.CAP_PROP_AUDIO_SYNCHRONIZE
lrf_has_key_frame = cv2.CAP_PROP_LRF_HAS_KEY_FRAME
codec_extradata_index = cv2.CAP_PROP_CODEC_EXTRADATA_INDEX
[docs]class MarkerTypeEnum(Enum):
cross = cv2.MARKER_CROSS # A crosshair marker shape.
tilted_cross = cv2.MARKER_TILTED_CROSS # A 45 degree tilted crosshair marker shape.
star = (
cv2.MARKER_STAR
) # A star marker shape, combination of cross and tilted cross.
diamond = cv2.MARKER_DIAMOND # A diamond marker shape.
square = cv2.MARKER_SQUARE # A square marker shape.
triangle_up = cv2.MARKER_TRIANGLE_UP # An upwards pointing triangle marker shape.
triangle_down = (
cv2.MARKER_TRIANGLE_DOWN
) # A downwards pointing triangle marker shape.
[docs]class DistanceTypeEnum(Enum):
user = cv2.DIST_USER # User defined distance.
l1 = cv2.DIST_L1 # distance = |x1-x2| + |y1-y2|
l2 = cv2.DIST_L2 # the simple euclidean distance
c = cv2.DIST_C # distance = max(|x1-x2|,|y1-y2|)
l12 = cv2.DIST_L12 # L1-L2 metric: distance = 2(sqrt(1+x*x/2) - 1))
fair = cv2.DIST_FAIR # distance = c^2(|x|/c-log(1+|x|/c)), c = 1.3998
welsch = cv2.DIST_WELSCH # distance = c^2/2(1-exp(-(x/c)^2)), c = 2.9846
huber = cv2.DIST_HUBER # distance = |x|<c ? x^2/2 : c(|x|-c/2), c=1.345
[docs]class BorderTypeEnum(Enum):
"""
Various border types, image boundaries are denoted with |
"""
constant = cv2.BORDER_CONSTANT # iiiiii|abcdefgh|iiiiiii with some specified i
replicate = cv2.BORDER_REPLICATE # aaaaaa|abcdefgh|hhhhhhh
reflect = cv2.BORDER_REFLECT # fedcba|abcdefgh|hgfedcb
wrap = cv2.BORDER_WRAP # cdefgh|abcdefgh|abcdefg
reflect_101 = cv2.BORDER_REFLECT_101 # gfedcb|abcdefgh|gfedcba
transparent = cv2.BORDER_TRANSPARENT # uvwxyz|abcdefgh|ijklmno
reflect101 = cv2.BORDER_REFLECT101 # same as BORDER_REFLECT_101
default = cv2.BORDER_DEFAULT # same as BORDER_REFLECT_101
isolated = cv2.BORDER_ISOLATED # do not look outside of ROI
[docs]class KmeansEnum(Enum):
random_centers = (
cv2.KMEANS_RANDOM_CENTERS
) # Select random initial centers in each attempt.
pp_centers = (
cv2.KMEANS_PP_CENTERS
) # Use kmeans++ center initialization by Arthur and Vassilvitskii [Arthur2007].
use_initial_labels = (
cv2.KMEANS_USE_INITIAL_LABELS
) # During the first (and possibly the only) attempt, use the user-supplied labels instead of computing them from the initial centers. For the second and further attempts, use the random or semi-random centers. Use one of KMEANS_*_CENTERS flag to specify the exact method.
[docs]class HoughModeEnum(Enum):
standard = (
cv2.HOUGH_STANDARD
) # classical or standard Hough transform. Every line is represented by two floating-point numbers (ρ,θ) , where ρ is a distance between (0,0) point and the line, and θ is the angle between x-axis and the normal to the line. Thus, the matrix must be (the created sequence will be) of CV_32FC2 type
gradient = cv2.HOUGH_GRADIENT # basically 21HT
probabilistic = (
cv2.HOUGH_PROBABILISTIC
) # probabilistic Hough transform (more efficient in case if the picture contains a few long linear segments). It returns line segments rather than the whole line. Each segment is represented by starting and ending points, and the matrix must be (the created sequence will be) of the CV_32SC4 type.
multi_scale = (
cv2.HOUGH_MULTI_SCALE
) # multi-scale variant of the classical Hough transform. The lines are encoded the same way as HOUGH_STANDARD.
gradient_alternative = (
cv2.HOUGH_GRADIENT_ALT
) # variation of HOUGH_GRADIENT to get better accuracy
[docs]class WindowFlagEnum(Enum):
normal = (
cv2.WINDOW_NORMAL
) # the user can resize the window (no constraint) / also use to switch a fullscreen window to a normal size.
autosize = (
cv2.WINDOW_AUTOSIZE
) # the user cannot resize the window, the size is constrainted by the image displayed.
opengl = cv2.WINDOW_OPENGL # window with opengl support.
fullscreen = cv2.WINDOW_FULLSCREEN # change the window to fullscreen.
free_ratio = (
cv2.WINDOW_FREERATIO
) # the image expends as much as it can (no ratio constraint).
keep_ratio = cv2.WINDOW_KEEPRATIO # the ratio of the image is respected.
gui_expanded = cv2.WINDOW_GUI_EXPANDED # status bar and tool bar
gui_normal = cv2.WINDOW_GUI_NORMAL # old fashious way
[docs]class MorphShapeEnum(Enum):
rect = cv2.MORPH_RECT # a rectangular structuring element: Eij=1
cross = (
cv2.MORPH_CROSS
) # a cross-shaped structuring element: Eij={10if i=anchor.y or j=anchor.x otherwise
ellipse = (
cv2.MORPH_ELLIPSE
) # an elliptic structuring element, that is, a filled ellipse inscribed into the rectangle Rect(0, 0, esize.width, 0.esize.height)
[docs]class RectanglesIntersectTypes(Enum):
"""
types of intersection between rectangles
"""
none = cv2.INTERSECT_NONE
# No intersection.
partial = cv2.INTERSECT_PARTIAL
# There is a partial intersection.
full = cv2.INTERSECT_FULL
# One of the rectangle is fully enclosed in the other.
[docs]class MorphTypeEnum(Enum):
erode = cv2.MORPH_ERODE
dilate = cv2.MORPH_DILATE
open = cv2.MORPH_OPEN # dst=open(src,element)=dilate(erode(src,element))
close = cv2.MORPH_CLOSE # dst=close(src,element)=erode(dilate(src,element))
gradient = (
cv2.MORPH_GRADIENT
) # dst=morph_grad(src,element)=dilate(src,element)−erode(src,element)
tophat = cv2.MORPH_TOPHAT # dst=tophat(src,element)=src−open(src,element)
blackhat = cv2.MORPH_BLACKHAT # dst=blackhat(src,element)=close(src,element)−src
hitmiss = cv2.MORPH_HITMISS # Only supported for CV_8UC1 binary images.
[docs]class FontEnum(Enum):
hershey_simplex = cv2.FONT_HERSHEY_SIMPLEX # normal size sans-serif font
hershey_plain = cv2.FONT_HERSHEY_PLAIN # small size sans-serif font
hershey_duplex = (
cv2.FONT_HERSHEY_DUPLEX
) # normal size sans-serif font (more complex than FONT_HERSHEY_SIMPLEX)
hershey_complex = cv2.FONT_HERSHEY_COMPLEX # normal size serif font
hershey_triplex = (
cv2.FONT_HERSHEY_TRIPLEX
) # normal size serif font (more complex than FONT_HERSHEY_COMPLEX)
hershey_complex_small = (
cv2.FONT_HERSHEY_COMPLEX_SMALL
) # smaller version of FONT_HERSHEY_COMPLEX
hershey_script_simplex = cv2.FONT_HERSHEY_SCRIPT_SIMPLEX # hand-writing style font
hershey_script_complex = (
cv2.FONT_HERSHEY_SCRIPT_COMPLEX
) # more complex variant of FONT_HERSHEY_SCRIPT_SIMPLEX
italic = cv2.FONT_ITALIC # flag for italic font
[docs]class ContourRetrievalModeEnum(Enum):
"""
RETR_EXTERNAL retrieves only the extreme outer contours. It sets hierarchy[i][2]=hierarchy[i][3]=-1 for all the contours.
RETR_LIST retrieves all of the contours without establishing any hierarchical relationships.
RETR_CCOMP retrieves all of the contours and organizes them into a two-level hierarchy. At the top level, there are external boundaries of the components. At the second level, there are boundaries of the holes. If there is another contour inside a hole of a connected component, it is still put at the top level.
RETR_TREE retrieves all of the contours and reconstructs a full hierarchy of nested contours. This full hierarchy is built and shown in the OpenCV contours.c demo.
:return:
:rtype:
"""
external = cv2.RETR_EXTERNAL
list_all = cv2.RETR_LIST
ccomp = cv2.RETR_CCOMP
tree = cv2.RETR_TREE
[docs]class ContourApproximationModeEnum(Enum):
"""
the contour approximation algorithm
"""
none = cv2.CHAIN_APPROX_NONE
# stores absolutely all the contour points. That is, any 2 subsequent points (x1,y1) and (x2,y2) of the contour will be either horizontal, vertical or diagonal neighbors, that is, max(abs(x1-x2),abs(y2-y1))==1.
simple = cv2.CHAIN_APPROX_SIMPLE
# compresses horizontal, vertical, and diagonal segments and leaves only their end points. For example, an up-right rectangular contour is encoded with 4 points.
tc89_l1 = cv2.CHAIN_APPROX_TC89_L1
# applies one of the flavors of the Teh-Chin chain approximation algorithm [244]
tc89_kcos = cv2.CHAIN_APPROX_TC89_KCOS
# applies one of the flavors of the Teh-Chin chain approximation algorithm [244]
[docs]class MouseEventEnum(Enum):
move = (
cv2.EVENT_MOUSEMOVE
) # indicates that the mouse pointer has moved over the window.
left_down = (
cv2.EVENT_LBUTTONDOWN
) # indicates that the left mouse button is pressed.
left_up = cv2.EVENT_LBUTTONUP # indicates that left mouse button is released.
left_double = (
cv2.EVENT_LBUTTONDBLCLK
) # indicates that left mouse button is double clicked.
right_down = (
cv2.EVENT_RBUTTONDOWN
) # indicates that the right mouse button is pressed.
right_up = cv2.EVENT_RBUTTONUP # indicates that right mouse button is released.
right_double = (
cv2.EVENT_RBUTTONDBLCLK
) # indicates that right mouse button is double clicked.
middle_down = (
cv2.EVENT_MBUTTONDOWN
) # indicates that the middle mouse button is pressed.
middle_up = cv2.EVENT_MBUTTONUP # indicates that middle mouse button is released.
middle_double = (
cv2.EVENT_MBUTTONDBLCLK
) # indicates that middle mouse button is double clicked.
wheel_ud = (
cv2.EVENT_MOUSEWHEEL
) # positive and negative values mean forward and backward scrolling, respectively.
wheel_rl = (
cv2.EVENT_MOUSEHWHEEL
) # positive and negative values mean right and left scrolling, respectively.
[docs]class LineTypeEnum(Enum):
filled = cv2.FILLED
line4 = cv2.LINE_4 # 4-connected line
line8 = cv2.LINE_8 # 8-connected line
anti_aliased = cv2.LINE_AA # antialiased line
if __name__ == "__main__":
pass


About Me
My name is Rocco Maniscalco. I am a full-time student at Georgia State University majoring in Computer Science. I am currently enrolled as a part-time student in the Georgia Tech coding boot camp program with a focus on fullstack web development. I graduated from Walton High School in 2020. In highschool, I completed two AP computer science courses on object Java programming and served as vice president for the Walton chapter of Coding for Community. My goal is to integrate beautiful design with elegant code solutions to create lasting virtual experiences. In my free time I love to explore nature, make electronic music, and study political science.


Moose's Meanderings
A Day in the Life of a Dog
My Favorite Things
Playing fetch
Eating food
Digging holes


Toggle navigation
Chest Opener!
Do it!
About
Clash Royale Chest Opener
Have your own robot open your chests
Hello I'm Boston the creator of the Boston's Brick Closet youtube channel. This cite accompnys one of my most resent creations
Images Used were all created by Me or are cited below:
PI #1
PI #2
PI Logo
Mindstorms Brick
Chest Images
Created By Boston Abrams


Here is
a line break
I don't have Brain Canceror the hiccups
See Table 1
Below.| Disease | Location | Year | |
|---|---|---|---|
| Polio and BC546 is −55OC cold. | -Dublin to Milwaukee |
2001 | |
|
whooping cough | 2009 | |
| Scurvy | Annapolis | Junction and Storage Temperature −55 to 150 o ? C |
In between the tables there is a nasty case of heart attack
| Problem | Cause | Cost |
|---|---|---|
| Arthritis | Pokemon Go | Free |
| YellowFever | Unicorns | $17.75 |
| Hypochondria | Fear | $100 |
And here is a final sentence with warts.


Agong graces Malaysia Fair 2019 in Tokyo
KUALA LUMPUR, Nov 3 — Yang di-Pertuan Agong Al-Sultan Abdullah Ri'ayatuddin Al-Mustafa Billah Shah yesterday graced the Malaysia Fair 2019 in Tokyo, Japan.
According to the statement issued by Istana Negara, the three-day fair which ends on November 4 is currently being held at Shinjuku Chuo Park located next to the Tokyo Metropolitan Government in the City of Shinjuku, Tokyo.
The Comptroller of the Royal Household for Istana Negara Datuk Ahmad Fadil Shamsuddin said the visit was His Majesty's initiative to meet up and interact with the Malaysian community in Tokyo.
He said Al-Sultan Abdullah’s visit also showed that His Majesty could not be separated from the Malaysians even in Japan.
His Majesty’s visit to the fair was on the sidelines of his four-day private visit to the country, which ends on November 4, on the invitation by Safdar Khan, Mastercard Division President for Indonesia, Malaysia and Brunei, to watch the Rugby World Cup 2019 final, according to the statement.
“At the fair, His Majesty also took the opportunity to visit the participating booths and engaged with the visitors before partaking delectable delicacies specially prepared by the Tokyo chapter of Perwakilan (Malaysia Foreign Ministry's Women Association), among others.
“Al-Sultan Abdullah’s presence reflected His Majesty’s unstinting commitment and support towards the efforts and initiatives to promote Malaysia to the world,” it said.
According to the statement, after welcoming remarks from Malaysian Ambassador to Japan Datuk Kennedy Jawan, Al-Sultan Abdullah then beat the traditional gong to officiate the Malaysia Fair 2019.
Kennedy said the Malaysia Fair 2019 is the second of such event organised by the Embassy of Malaysia of Tokyo with the first being held in November last year. — Bernama


New Mexico Alliance for Minority Participation Portal
Welcome
Invalid email or password.
You have been logged out.
Create Account?
Reset Password?


SD/London
Home
News
Jobs
About
More
Add New Startup
My Settings
Sign in
Google Inc.
A leading search engine.
13
25500
2045
Update
Name
Website
Twitter
Phone
Address
City
County
Post Code
Cancel
Submit


Parameter {1} and {2} are rendered.
A
B
Parameter %1% and %2% are rendered.

},
"one": {
"male": "You ({3}) gave him ({4}) and one other person {5}.",
"female": "You ({3}) gave her ({4}) and one other person {5}.",
"other": "You ({3}) gave them ({4}) and one other person {5}."
},
"other": "You ({3}) gave them ({4}) and {1} other people gifts."
}
2
female
Joe
Alice
a gift
{{dummy}}
2
female
Joe
Alice
a gift
{{dummy}}
ERROR
{
"male": "He ({2}) is {1}.",
"female": "She ({2}) is {1}."
}
unknown
Yoda
{
"other": "Default number for {1}."
}
1
1
{
"other": 1
}
1


[EgressBuster, check filtering, identify allowed ports, spawn shell] https://github.com/trustedsec/egressbuster
[darkc0de-old-stuff] https://github.com/tuwid/darkc0de-old-stuff and https://github.com/heiswayi/darkc0de.com | collection of old darkc0de scripts. some may be useful
cachedump, lsadump, pwdump | python tools combine samdump,cachedump,lsadump2
ton of tools: brute, encryption, exploits, scanners, etc
[radamsa] https://github.com/aoh/radamsa | general purpose fuzzer
[strace] https://strace.io/ https://sourceforge.net/projects/strace/
[AFL American Fuzzy Lop] http://lcamtuf.coredump.cx/afl/


{% assign designations = "faculty, staff, postdoc, grad, undergrad" | split: ", " %}
{% for des in designations %}
{% assign folks = site.people | where:"desig",des | sort:"family" %}
{% for p in folks %}
{% if p['status'] == 'former' %}{%continue%}{%endif%}
{% include person_entry.html p = p %}
{% endfor %}
{% endfor %}
Former Lab Members
{% assign former_people = site.people | where:"status","former" %}
{% assign former_people = former_people | sort:"end_year" | reverse %}
{% for p in former_people %}
{% include person_entry.html p = p %}
{% endfor %}


Let’s all be happy for Shatta Wale -John Dumelo on Shatta’s Grammy nominations
by Lizbeth BrownPopular Ghanaian actor and aspiring member of parliament John Dumelo has shared his views on the Shatte Wale-Grammy nominations brouhaha.
In a Twitter post, the award-winning actor stated that Ghanaians should be happy for the ‘Melissa’ hitmaker.
According to John Dumelo, Shatta Wale didn’t mean he is a nominee but he is part of the production.
The actor added that all we can do as a country is to be happy for Shatta Wale and stop the criticisms.
” Saying his name has entered Grammys doesn’t mean he meant he’s a nominee. Let’s all be happy for @ ShattaWalegh”, John Dumelo tweeted.
This comes after the reggae-dancehall musician in a Twitter post indicated that he is so happy on his Grammy nomination.
Shatta Wale was featured on American music star Beyonce’s recent album dubbed “The Lion King; The Gift” which earned a Grammy nomination.
Well, Shatta Wale stated that since the album has been nominated it means he also has been nominated.
This tweet has caused a stir on social media where some social media users are of the view that Shatta Wale is not a nominee but a participant.


 Offer not valid on international
orders. This offer is good for U.S. standard shipping within 3 to 7
business days pending credit approval and authorization. Orders to
Canadian addresses will be shipped via Canada post within 6 to 10
business days to urban areas and 15 to 22 business days to rural areas.
This free shipping offer can be combined with other discount offers. No
discount code is required at the ae.com, aerie.com, or
aeofactorystore.com shopping bag. Not applicable toward previously
purchased merchandise. All deliveries are pending credit approval,
merchandise availability, delivery and weather conditions. Free shipping
promotion and associated terms & conditions subject to change at AE’s
sole discretion.
Beginning October 31, 2013 at 6:00 A.M. EDT though October 31, 2013 at
11:59 P.M. PDT, get 31% off your purchase when you enter the following
discount code 78W244J1 at the ae.com, aerie.com or aeofactory.com
shopping bag. Offer is valid online only. This 31% off offer cannot be
combined with other discount offers. Discount applies to AE, Aerie and
AEO Factory Store merchandise costs only, not tax and shipping &
handling costs. This discount is not redeemable for cash, nor applicable
toward previously purchased merchandise. Excludes AEO Gift cards, Aerie
Undies Exclusively for AEO, AE Clearance, Aerie Clearance, AEO Factory
Clearance, Aerie undies and merchandise from these brands: Bass, BC, Bed
Stu, Birkenstock, Clarks, Creative Rec, Coconuts, DV, Eastland, GOLA,
Havaianas, Keds, Matisse, Minnetonka, Mowgli Surf, New Balance, New
Balance/PF Flyers, Palladium, Pro Keds, Pura Vida, Reebok, Seychelles,
Thorogood, Tretorn, Tailgate, Timberland, Volley, and College & Pro
Merchandise. Discount promotion and associated terms and conditions
subject to change at AE’s sole discretion.
© 2013 AEO Management Co. All Rights Reserved.
***********************************************************
Update Your Email Address:
<EMAIL_ADDRESS>Sign Up For Email:
http://e.ae.com/a/tBSckZDB7uylYB82G7oNuZn6Sr9/aeo16?AAP_FLAG=N&CUSTOMER_NBR=1235023277209
Privacy Policy:
http://e.ae.com/a/tBSckZDB7uylYB82G7oNuZn6Sr9/aeo14?AAP_FLAG=N&CUSTOMER_NBR=1235023277209
Add<EMAIL_ADDRESS>to your address book.
Our mailing address: 77 Hot Metal Street, Pittsburgh, PA 15203


|
JavaTM 2 Platform Standard Ed. 5.0 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ActivationInstantiator
An ActivationInstantiator
is responsible for creating
instances of "activatable" objects. A concrete subclass of
ActivationGroup
implements the newInstance
method to handle creating objects within the group.
ActivationGroup
| Method Summary | |
|---|---|
MarshalledObject |
newInstance(ActivationID id,
ActivationDesc desc)
The activator calls an instantiator's newInstance
method in order to recreate in that group an object with the
activation identifier, id , and descriptor,
desc . |
| Method Detail |
|---|
MarshalledObject newInstance(ActivationID id, ActivationDesc desc) throws ActivationException, RemoteException
newInstance
method in order to recreate in that group an object with the
activation identifier, id
, and descriptor,
desc
. The instantiator is responsible for: getClassName
method,
getLocation
method),
ActivationID
, and the
MarshalledObject
containing object specific
initialization data, and
id
- the object's activation identifierdesc
- the object's descriptor
ActivationException
- if object activation fails
RemoteException
- if remote call fails
|
JavaTM 2 Platform Standard Ed. 5.0 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright © 2004, 2010 Oracle and/or its affiliates. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.


{% extends "home.html" %} {% block content %}
Originally an XGBoost regressor was fit to the data, but it was found that the model would predict values of less than zero, which didn’t make sense for this dataset. By using a random forest the range on the output was limited to being similar to that of the input, meaning that the predictions never said that a country would experience a negative number of suicides. These two SHAP (SHapley Additive exPlanations) plots are made using the same data, just using the different models. The actual suicides per 100k for this data was 3.77.


Deep Learning Digest
Papers
Blogs
Backpropagation:
Principles of training multi-layer neural network using backpropagation
Back-propagation, an introduction
Calculus on Computational Graphs: Backpropagation
A Gentle Introduction to Artificial Neural Networks


org.nd4j.linalg.indexing.conditions
Interfaces
Condition
Classes
AbsValueGreaterOrEqualsThan
AbsValueGreaterThan
AbsValueLessOrEqualsThan
AbsValueLessThan
And
BaseCondition
ConditionBuilder
ConditionEquals
Conditions
EpsilonEquals
EpsilonNotEquals
EqualsCondition
GreaterThan
GreaterThanOrEqual
IsFinite
IsInfinite
IsNaN
LessThan
LessThanOrEqual
Not
NotEqualsCondition
NotFinite
Or


--- layout: post title: Back to Barefoot - Sort Of date: 2008-11-03 09:50:54.000000000 +00:00 tags: - Vibram - outdoors - cold - training type: post published: true ---
Well, last week was another low mileage week with only 2 sessions of 6mins @ 2% @ 6mph on the treadmill and in shoes as I said they would be.
The runs were good and my right foot felt good without any niggles, so I think I'll be back to barefoot this week.
Well, sort of. I'm getting fed up of running on a treadmill already and am itching to get outside and run a bit further, however it's turned a tad chilly and I don't think my feet are tough enough yet to cope with the rough tarmac AND the cold and wet, so this week I'm venturing outside in my Vibrams - it's just as good as barefoot.
I think I'll run in my Vibrams until the spring.


Latest Code Projects
View more {% octicon chevron-right height:16 class:"mr-2 v-align-middle dm-cta-arrow" fill:#ffffff aria-hidden:true %}
{% include repo-card-manual.html name="GarlicJar" description="An altcoin manager based on litecoin_balance, specifically for the Garlicoin currency. Written in React-Native." url="https://github.com/dylmye/GarlicJar" %}
{% include repo-card-manual.html name="PelleGlobe" description="The web interface for the collaborative project mapping the availability and pricing of San Pellegrino drinks across the globe." url="https://github.com/dylmye/pelleglobe-web" %}
{% include repo-card-manual.html name="material-design-colours" description="A small palette of material design colours that were formerly hosted by Google. I use this as a reference when I'm designing projects." url="https://github.com/dylmye/material-design-colours" %}
Other Projects
{% include repo-card-manual.html name="Rhiannon Ferguson Design" description="Portfolio for an art student extending a Squarespace theme to meet the client's requirements. Includes custom-designed graphics, full responsive design and ecommerce support." url="https://rhiannonferguson.design/" custom_icon=true %}


HEAD
Remote Academy Laboratory Experiment
Instructions
Data:
{{dataRet}}
Imagination powered video feed
Data Collected
=======
Remote Academy Laboratory Experiment
Instructions
Imagination powered video feed
Data Collected
>>>>>>> 8692799d4435c45805bff9424c1b948ac3a76aea


Payments
Name
Atul Agarwal
Balance
360.00
Your Qr Code
Add Split
New Payment
Recent Transactions
Payments
Splits
Settings


This chapter lists all the items (JS configuration, elements, attributes, classes) that can form the ReSpec language.
ReSpec has a general event publish / subscribe system. Developers extending the system can do so by subscribing to events they care about and performing actions when those events are fired. The interfaces and events are documented in this section.


Demo Shopping Site
There are
0
items in
your cart
.
Our Products
Whatchahoozit - $0.99
Thingamabob - $9.95
Doomahitchy - $20.00
Select a color...
Red
Green
Blue


Flex and Flickr and DisplayShelf
I’ve been working with the fabulous DisplayShelf code from simplyscheming.com to try to make various types of browsers in Flex. Yesterday, I *just about* had it working to browse images from flickr, but I ran into the old ‘checkpolicyfile’ problem. Even though Flickr has been nice enough to put crossdomain.xml files on all their static servers, the DisplayShelf code needs to manipulate the image as a bitmap to make the groovy reflection underneath the picture.
I found places where people fixed this problem by changing LoadContext, and other places where people added trustContent to the Image, but I couldn’t figure out how to make this work correctly in the context of DisplayShelf.
Fortunately, there in the code was a reference to someone I’d worked with a zillion years ago (ok, 13), and I pinged him to ask for help. He gave me the magic answer, which looks like this (you’ll need to ‘view source’ to see it, I’m not sure how to get HTML-ish things to show up in MT).
Original DisplayShelf component in mxml: <local:displayshelf id="shelf" borderthickness="2" bordercolor="#000000" dataprovider="{dataSet}" enablehistory="false" width="7" angle="10" popout=".35" change="currentInfo();"> New DisplayShelf component: <local:displayshelf id="shelf" height="300" borderthickness="2" bordercolor="#000000" dataprovider="{DataModel.getInstance().photoInfo}" enablehistory="false" width="5" angle="10" popout=".35" change="currentInfo();"> <local:itemrenderer> <mx:component> <mx:image trustcontent="true"> </mx:image></mx:component> </local:itemrenderer> </local:displayshelf> </local:displayshelf>
Seemed a little obscure, but it works and now my browser is happy.
Thanks to NJ for saving my sanity 🙂
UNCATEGORIZED
api flex flickr


Terminology
The following is a list of terms used throughout this help system. These apply to building applications using
the oaFramework, along with using OABuilder.
- Model - defines a group of related entities that are used to store data and
include validation and business logic.
- Object Graph - a collective group of objects from the model.
- OA (Object Automation) - name used for automating object oriented programming.
- OABuilder - name of visual development tool.
- Link/Relationship - used to define the rules for how objects are related together.
Types are One/Many : O2O, O2M, M2M. A recursive is a self reference.
Additonal information can include cascade rules, how and where the data is created, other
required references, etc.
- Meta-data - additional information that describes specific pieces of the program in enough detail
so that it can be automated.
- Reflection - a way for code to read and use meta-data to call methods dynamically.
- Observable - a type of design pattern where events can be sent to interested listeners when
a particular event happens. This is a powerful feature, but at a cost. OA has overcome this
cost so that any object or collection of objects can be made observable.
- Reflective Model - used to describe how the OA model uses reflection, meta-data and
the observable behavior of the model objects to automate how objects work together, even
with when running on separate computers (distributed).
- Datasource - used to store and retreive data. Most common is relational database, but also
includes xml, json, webservice, binary, csv, text, legacy formats/interface, etc.
OA defines a base OADataSource class that allows applications to be datasource independent.
- DAO - data access objects. Used for application data that is stored in a database or other datasource.
- OAObject - base class for all model objects, that are observable, and can serve as DAO.
- Hub - OA's obserable collection class, similar in functionality to an ArrayList, with additonal features.
- Messaging - used by programs to communicate. OA has built in messaging that allows OAObject and Hubs to
stay in-sync with other applications. OA also includes a way to define distributed methods, so that one application
can call it, and have it executed on another system. This is all treated as if is was a local method call.
- Auto Number -
used by object property so that it's value will automatically be assigned, usually a sequentially number.
If the property type is "GUID", then a global unique identifier will be created, based on a unique system
prefix.
- JDBC - Java Database Connectivity, used to access any database from a Java program.
- OBX - file extension for files saved by OABuilder, using an XML format.
- Owner - an object relationship, where one is a continuation of the first. For example,
an OrderItem does not exist without an Order - the Order is the owner.
- Property - data element within an object that defines a specific type of data.
- Property Path - An important concept in OA that is combined with reflection to be
able to define a reference from one object to another object/objects through a path of relationships
For example, "order.customer.name" will
get the name for a customer, for a specific order.
- Recursive - an object "self" relationship, where each object can have many of the same type
of objects, and they can also have many of the same, etc.
- Sequence property - an property that is used to keep the order within a list,
when there is not a sortable property to use.
For example, if a Department has many Employees, you can use a seq property to keep
the specific order to sort the employee list.
- Transient - used by object or property to signify that it should not be stored.


- Blog Posts
- Technical
- VC, Git and Github
- HTML & CSS
- Arrays & Hashes
- Ruby Enumerable Magic
- Intro to Ruby Classes
- FP vs. OOP
- Loops: JS vs. Ruby
- Dynamic vs. Static Typed languages
- Cultural
- DBC warm up
- Abstract Sequential
- Internet & Bias
- Pairing & Feedbacks
- Stereotype Threat
- Values To Live By
- Situations of Conflict
- Cheat Sheets
- SQL
01/08/2015
Ruby, Arrays & Hashes.
This week, I immersed myself in Ruby and built some simple programs using the concepts we learned about control flow, loops, iterators, arrays and hashes. Control flow comes quite naturally for me, since it derives from logic, my favorite class as an undergraduate. The if else statements and while loops form the core of computer programming: a two-fold (or binary) mechanism that gives the computer its intelligence. I call it the core, because most computer programs' foundations are built on binary thinking style, which we can more or less interpret as:
Either something is this, or something is not.
Using this pattern as a building block, the program will then understand more complex logic.
Arrays
Arrays and hashes allows data to be assembled in an organized way, thematically or not, and boxed into one variable for further use.
For example, let's say I were to create a variable for all of my favorite movies, so that later I could create a program that lists one, many or all of them as part of a method for an announcer's speech.
Without arrays, I would need to create a variable for each of them, and remember the name of each variable I called to later call them in my method. With an array, I would simply store all of the movies names into one variable, and later, in my method, if I wish to print all of the movie names, I could do so by concatenatening the annoucement string with the array name.
For example:
#builds my array
#builds my announcer method, with a placeholder as parameter
=>
Hi, and thank you for attending the Annual Sam Movie Night!
Tonight, we will be presenting: The Matrix, Avatar, The Lion King, The Notebook!
Without arrays, I have to add each movie as an input, which is considerably more tedious:
=>
Hi, and thank you for attending the Annual Sam Movie Night!
Tonight, we will be presenting: The Matrix, Avatar, The Lion King, The Notebook!
Alternatively, if I wish to only announce one or a few movies, I can print them out using the array name and their position in the array:
=>
Hi, and thank you for attending the Annual Sam Movie Night!
Tonight, we will be presenting: The Matrix, Avatar, The Lion King!
Hashes
Similar to an array, a hash stores a list of data into one variable. However, the difference is that instead of individual data, with a default index, a hash stores a list of key-value pairs.
Using my previous example, if I were to convert my array into a hash, I would instead place a value for each movie name. For example, my opinion of the movie:
Consequently, I were to call the an element according to its position in the hash, I would first need to conver the hash into an array, because hashes have no default index. In doing so, the key-value pair would be returned, not the individual value:
=>
Avatar: futurist and dreamy
If I were to return the value instead (my opinion of a movie), I would call it by its key, not by its default index.
(or sorting by index, but specifying amout the values only)
=>
futurist and dreamy
Thus, a key can be considered the index of its associated value.


--- title: Summer School Programs heading: Our Summer School Programs description: 'HUGE PRICE CUT! $1000 OFF, SEE BELOW.' picture_url: /uploads/IMG_7363_opt pricing_table: - name: Included In Trip color: '#646464' features: - text: 20 nights accommodation (including 3 nights Paris) highlight: false - text: All tuition and instruction highlight: false - text: 'Breakfast, Lunch, and Dinner*' highlight: false - text: Transportation to and from the airport in Paris** highlight: false - text: All books and materials for the course highlight: false - text: 'Guest Presentations, Workshops, and Field Trips' highlight: false - text: Laundry Facilities highlight: false - text: >- All cultural and social activities organized by Live and Learn, Inc (including sports, excursions, museum and gallery admissions) highlight: false call_to_action: link: 'https://summerschoolfrance.com/contact/' text: Contact Us to Get Started faq: - question: How can this trip enhance my résumé? answer: >- Even if our world hadn't closed down with a pandemic, this trip would already be a great way to enhance a résumé. Whether you are going to be applying for college, or a job, a trip like this will pique the interest in your application. Why? Any college or future employer is looking for evidence of (amongst other things) how responsible you have become, how you work with others, if you show initiative, have you been exposed to different cultures, people and ideologies. In our summer school programs, you will be working with others both in the classroom, and in the living arrangements. You will be cooperating with others to perform tasks. You will be responsible for certain activities. You will meet French people of your own age, and adults, and you will be exposed to their point of view and their culture in a way that would be impossible if you remained at home. Many educational institutions and employers today are looking for evidence of global learning. How better to show that you have this, than to enjoy our summer program. Even showing how you raised the money for the trip is something you can include in a résumé. Did you recycle, wash cars, sell cakes? That says something important about YOU. For students successfully completing the programs, we will be willing to write a letter of recommendation that clearly shows that our students have developed responsibility, have shown initiative, have worked well with others, have been exposed to other cultures in a personal way. ---
Highlights of French History
Mass Media: Recording Tomorrow's History
Introduction to French Culture.
Renaissance and Reformation.
MONEY-BACK GUARANTEE
IF CANCELATION BECOMES NECESSARY DUE TO COVID 19
NOW, REDUCED!


We enhance dogs!
- synergize e-business synergies
- reinvent clicks-and-mortar interfaces
- e-enable frictionless mindshare
- synergize vertical ROI
- brand intuitive users
- exploit transparent applications
- monetize bricks-and-clicks architectures
- morph e-business convergence
- extend user-centric methodologies
- reinvent cross-media initiatives
- enhance customized portals
- synthesize transparent paradigms
- grow end-to-end technologies
- monetize open-source schemas


-
How To Respond When the Media Calls | Xconomy
www.xconomy.com
Startups and emerging companies raising money almost always have to confront this question: How to respond when the media calls? Media coverage can ...
-
Denver Startup Week: The Intersection of Community and Entrepreneurial ...
tech.co
For the third year in a row the entrepreneurs of The Mile High City will rally around business, design, technology, and manufacturing from September ...
-
Lessons Learned at Denver Startup Week - Baked ...
www.scoop.it
Last week was Denver Startup Week, a week long 8AM to 8PM fest of education, mentoring, networking, and socializing around the local startup ...
-
Brad Feld, Blackstone, & ViaWest: Denver Tech Leaders Talk Community | ...
www.xconomy.com
Along with the parties, networking, and workshops, Denver Startup Week is an opportunity to take a look at the city as a startup community, evaluate ...
-
Colorado Tech Weekly #67: EdTech, bought companies and new ideas
www.builtincolorado.com
Colorado Tech Weekly brings you the top 10 technology stories of the past week and the best upcoming local tech events every Monday morning! Last ...
-
Battle of the Breweries | Uber Blog
blog.uber.com
We're pitting Colorado's favorite breweries against each other in a battle for the most Uber signups, encouraging their patrons to ride safely... and ...
-
Lessons Learned at Denver Startup Week - Baked & Branded
bakedandbranded.com
Last week was Denver Startup Week, a week long 8AM to 8PM fest of education, mentoring, networking, and socializing around the local startup ...
-
Infographic: Business Etiquette Around The World (Western Europe Edition) ...
blog.up.co
This post is written by tech writer and photographer, Ivan Serrano. Congratulations, your business has grown and you are nowhere near stopping. ...
-
Status-Seekers and ‘Wantrepreneurs’: Still Far From Thiel’s Tech Utopia
blogs.wsj.com
"Zero to One" is, in large part, a complaint that the world is stuck in rote patterns that spur mindless competition instead of innovation.
-
Starting out freelance: what you need to know - UP Global
blog.up.co
Regardless of your field, starting a career as a freelancer is never easy. You’re essentially selling yourself rather than a company, making you the ...
-
Are Angel Investors Filling a VC Gap for North Carolina Startups? | Xconomy
www.xconomy.com
Investor purse strings loosened to fund North Carolina companies to the tune of $266 million in the first half of 2014, up more than 31 percent ...
-
Industrial Marketers: Stop Ignoring Social Media | BtoB - Advertising Age
adage.com
You’ve read all of your free items this month.
-
What Are College Students Cutting Back On? - eMarketer
www.emarketer.com
As US college students get back into the swing of things, they're figuring out how they can cut costs this academic year. According to research, many ...
-
Innovation Hub: Why Tech's Women Problem Is Bigger Than You Think | Xconomy
www.xconomy.com
You’ve seen the numbers. And they’re not good. At Apple, Twitter, Google, and Facebook, women are vastly outnumbered by men. When it comes to ...
-
The Challenge Cup | 1776
challengecup.1776dc.com
The most promising startups. The greatest challenges. 16 leading cities. One Challenge Cup.
-
How Detroit Turned Me Into a Coder and Entrepreneur
techonomy.com
There is no way I’d be in Detroit if not for Venture for America, a program in which young people spend two years in the startup trenches in ...
-
The Rhythm of Management: What Jazz Can Teach Startup Executives | Xconomy
www.xconomy.com
“Jazz stands for freedom.
-
New MC10 CEO Hopes to Drive More Products for Wearable Electronics | ...
www.xconomy.com
Pioneering wearable electronics company MC10, which makes flexible sensors that can wirelessly monitor biological data while sticking close to the ...
-
Glamping Hub raises $1 million to glamp up camping worldwide
www.tnooz.com
Travel startup Glamping Hub, which offers a platform for travelers to book "glamorous camping" accomodations, has announced a $1 million Series A.
-
How to Attract Smart People, Smart Ideas, and Smart Money | Xconomy
www.xconomy.com
North Carolina entrepreneurs are attracting attention all over the nation---and all over the world---across the tech, life science, and advanced ...
-
1776 - Weekly Trend: Using Data to Reduce City Violence
1776dc.com
Violent crime has long been a scourge in the United States, and police departments across the nation have stretched their resources thin in their ...
-
McClure Delivers Harsh Truths, Advice to Begin Denver Startup Week | ...
www.xconomy.com
Dave McClure isn’t interested in being a cheerleader.
-
Developer at heart, an executive returns to her roots at a hackathon
www.tnooz.com
Melissa Yang, co-founder and CTO at Tujia gives her views on THack China and travel tech trends.
-
MC Hammer Offers Tips to “Innovate the Hood” at Detroit Event | Xconomy
www.xconomy.com
Detroit Pistons fans of a certain age will always have a place for MC Hammer in their hearts, since his song “U Can’t Touch This” will forever be ...
-
How to Reach US Female Millennials—It's Not Easy - eMarketer
www.emarketer.com
Just in terms of sheer numbers, US female millennials make up a group so large that no marketing tactic can speak to all of them. Add to that the ...
-
Let's Stop Pretending It's Bad to Bring Devices on Vacation
skift.com
It's time to stop feeling guilty about bringing mobile devices on vacation. Although it …
-
How to Validate Your Idea Quickly Using a Minimum Viable Product (MVP)
www.webascender.com
“Do you think this is a good idea?” “Would anyone pay for this service?” “How much revenue will my new online product generate?” As a consulting ...
-
OnKol Wants to Help Grandma Join the Internet of Things Movement | Xconomy
www.xconomy.com
As investors and corporations pour millions of dollars into connected-home devices, tech companies have no shortage of ideas---from smart thermostats ...
-
Tech, Networking, and Beer: A Quick Guide for Denver Startup Week | Xconomy
www.xconomy.com
Denver Startup Week is back, and organizers promise it will be bigger and better than ever. The annual event, now in its third year, is a chance for ...
-
Apple Unveils Smartwatch, Its First New Product in 4 Years
online.wsj.com
Apple entered its first new product category in more than four years on Tuesday when CEO Tim Cook unveiled a line of Internet-connected watches.


Ti.Paypal Module
Description
The Ti.Paypal module gives you access to payments via paypal for goods and services.
Note that Apple does not accept payment through any means other than the in-app
purchasing store for extensions and subscriptions for your app.
Getting Started
View the Using Titanium Modules document for instructions on getting
started with using this module in your application.
Requirements
The Paypal SDK has the following requirements:
- iOS version 4.3 or later
- Xcode 4.5 or later
Accessing the Ti.Paypal Module
To access this module from JavaScript, you would do the following:
var Paypal = require("ti.paypal");
Functions
Ti.Paypal.createPaypalButton({...})
Creates and returns a Ti.Paypal.PaypalButton object, which is a view. Note that the view's
size determines the amount of space on the screen it takes up, not the size of
the Paypal button, which is determined by a constant.
WARNING: A paypal button may only be used once! It is designed to be created for one transaction. If the user cancels
the transaction, or goes through with it, you must recreate the paypal button before allowing them to touch it again.
Takes one argument, a dictionary containing the following properties:
- appID[string]: The appID issued by Paypal for your application
- language[string]: The language for the UI. Default value: "en_US"
- textStyle[int]: The text for the button; can be Ti.Paypal.PAYPAL_TEXT_PAY or Ti.Paypal.PAYPAL_TEXT_DONATE, defaults to Ti.Paypal.PAYPAL_TEXT_PAY.
- buttonStyle[int]: A constant indicating the style & size of the button. If the textStyle property is set to Ti.Paypal.PAYPAL_TEXT_DONATE, the word "Pay" in the buttons is replaced by "Donate". The language of the button will also change based on the language you pass into the "language" property or the auto detected language on the phone.
- paypalEnvironment[int]: A constant indicating the environment the button runs in
- feePaidByReceiver[boolean]: Whether or not the Paypal fees are paid by the receiver; if false, any fees are paid by the sender. Defaults to false.
- enableShipping[boolean]: Whether or not to select/include shipping information. Defaults to true.
- cancelUrl[string]
- returnUrl[string]
To submit a simple payment, you should also set the following property:
- payment[dictionary]: A dictionary describing the parameters of the payment. Properties are:
- paymentType[int]: A constant indicating the type of payment made. Default: PAYPAL_TYPE_PERSONAL.
- paymentSubtype[int]: The payment subtype for a "SERVICES" type payment (see enumerated values section). Applicable only if you have been approved for special pricing plans. For any transactionType other than "TYPE_SERVICE" or if you have not been approved for special pricing plans use "SUBTYPE_NOT_SET" (the default value) as the transactionSubType. Default: SUBTYPE_NOT_SET.
- subtotal[double]: The amount of the payment, not including tax and shipping amounts
- tax[double]: Tax on the payment
- shipping[double]: Shipping cost for the transaction (only for HARD_GOODS)
- currency[string]: An identifier for the currency the transaction uses; defaults to "USD".
- recipient[string]: The Paypal user who receives the payment.
- customID[string]: A custom ID for the whole order; this is any ID that you would like to have associated with the payment.
- ipnUrl[string]: Your Instant Payment Notification URL. This url will be hit by the Paypal server upon completion of the payment.
- merchantName[string]: The name of the merchant the recipient represents.
- memo[string]: A memo to include with the order. This memo will be part of the notification sent by Paypal to the necessary parties.
- invoiceItems[dictionary[]]: An array of dictionaries describing the individual items in this payment:
- name[string]: The name of the item.
- itemID[string]: The ID of the item.
- totalPrice[double]: The total price for this item.
- itemPrice[double]: The price for one of this item.
- itemCount[int]: The total number of this item included in the transaction.
Or, to submit an advanced payment (such as a chained or parallel payment), set the following property. Note that the only programmatic difference between chained and parallel payments is the "isPrimary" property set on one of your advanced payments.
- advancedPayment[dictionary]: A dictionary describing the parameters of the advanced payment. Properties are:
- currency[string]: An identifier for the currency the transaction uses; defaults to "USD".
- ipnUrl[string]: Your Instant Payment Notification URL. This url will be hit by the Paypal server upon completion of the payment.
- memo[string]: A memo to include with the order. This memo will be part of the notification sent by Paypal to the necessary parties.
- payments[dictionary[]]: An array of dictionaries describing the individual payments involved:
- isPrimary[bool]: Whether or not this is the primary payment. If one payment has this, this is a chained payment. If none, then it is a parallel payment.
- paymentType[int]: A constant indicating the type of payment made. Default: PAYPAL_TYPE_PERSONAL.
- paymentSubtype[int]: The payment subtype for a "SERVICES" type payment (see enumerated values section). Applicable only if you have been approved for special pricing plans. For any transactionType other than "TYPE_SERVICE" or if you have not been approved for special pricing plans use "SUBTYPE_NOT_SET" (the default value) as the paymentSubtype. Default: SUBTYPE_NOT_SET.
- subtotal[double]: The amount of the payment, not including tax and shipping amounts
- tax[double]: Tax on the payment
- shipping[double]: Shipping cost for the transaction (only for HARD_GOODS)
- recipient[string]: The Paypal user who receives the payment.
- customID[string]: A custom ID for the whole order; this is any ID that you would like to have associated with the payment.
- merchantName[string]: The name of the merchant the recipient represents.
- invoiceItems[dictionary[]]: An array of dictionaries describing the individual items in this payment:
- name[string]: The name of the item.
- itemID[string]: The ID of the item.
- totalPrice[double]: The total price for this item.
- itemPrice[double]: The price for one of this item.
- itemCount[int]: The total number of this item included in the transaction.
Or, to submit a Preapproval for payment, set the following properties.
- preapprovalKey[string]: The preapproval key you received from PayPal. Please reference PayPal's documentation for more information on how preapproval works, and what steps are necessary to get this key.
- preapproval[dictionary]: A dictionary describing the parameters of the preapproval. Properties are:
- type[int]: A constant indicating the type of preapproval agreement to make. Default: PREAPPROVAL_TYPE_AGREE_AND_PAY.
- currency[string]: An identifier for the currency the transaction uses; defaults to "USD".
- dayOfMonth[int]: The day of the month.
- dayOfWeek[int]: Use the "Preapproval Days" constants below.
- isApproved[bool]
- paymentPeriod[int]: Use the "Preapproval Period" constants below.
- pinRequired[bool]
- maxAmountPerPayment[double]
- maxNumberOfPayments[int]
- maxNumberOfPaymentsPerPeriod[int]
- maxTotalAmountOfAllPayments[double]
- merchantName[string]: The name of the merchant the recipient represents.
- ipnUrl[string]: Your Instant Payment Notification URL. This url will be hit by the Paypal server upon completion of the payment.
- memo[string]: A memo to include with the order. This memo will be part of the notification sent by Paypal to the necessary parties.
NOTE: Once set on a button, payment information CANNOT be changed.
Properties
Properties - Text Types for Paypal Button
Ti.Paypal.PAYPAL_TEXT_PAY[int] (read-only)
A constant for a button's "textStyle" property causing "Pay" to be displayed.
Ti.Paypal.PAYPAL_TEXT_DONATE[int] (read-only)
A constant for a button's "textStyle" property causing "Donate" to be displayed.
Properties - Payment Types
Ti.Paypal.PAYMENT_TYPE_GOODS[int] (read-only)
A constant for a button's "transactionType" property which denotes the sale of physical goods. This is the default payment type.
Ti.Paypal.PAYMENT_TYPE_SERVICE[int] (read-only)
A constant for a button's "transactionType" property which denotes the sale of a service.
Ti.Paypal.PAYMENT_TYPE_PERSONAL[int] (read-only)
A constant for a button's "transactionType" property which denotes a personal payment.
Ti.Paypal.PAYMENT_TYPE_NONE[int] (read-only)
A constant for a button's "transactionType" property which denotes a payment where no money is exchanged.
Properties - Preapproval Types
Ti.Paypal.PREAPPROVAL_TYPE_AGREE_AND_PAY[int] (read-only)
Ti.Paypal.PREAPPROVAL_TYPE_AGREE[int] (read-only)
Properties - Preapproval Days
Ti.Paypal.PREAPPROVAL_DAY_SUNDAY[int] (read-only)
Ti.Paypal.PREAPPROVAL_DAY_MONDAY[int] (read-only)
Ti.Paypal.PREAPPROVAL_DAY_TUESDAY[int] (read-only)
Ti.Paypal.PREAPPROVAL_DAY_WEDNESDAY[int] (read-only)
Ti.Paypal.PREAPPROVAL_DAY_THURSDAY[int] (read-only)
Ti.Paypal.PREAPPROVAL_DAY_FRIDAY[int] (read-only)
Ti.Paypal.PREAPPROVAL_DAY_SATURDAY[int] (read-only)
Properties - Preapproval Periods
Ti.Paypal.PREAPPROVAL_PERIOD_ANNUALLY[int] (read-only)
Ti.Paypal.PREAPPROVAL_PERIOD_BIWEEKLY[int] (read-only)
Ti.Paypal.PREAPPROVAL_PERIOD_DAILY[int] (read-only)
Ti.Paypal.PREAPPROVAL_PERIOD_MONTHLY[int] (read-only)
Ti.Paypal.PREAPPROVAL_PERIOD_NONE[int] (read-only)
Ti.Paypal.PREAPPROVAL_PERIOD_SEMIMONTHLY[int] (read-only)
Ti.Paypal.PREAPPROVAL_PERIOD_WEEKLY[int] (read-only)
Properties - Button Sizes
Ti.Paypal.BUTTON_152x33[int] (read-only)
A paypal button sized for a 152x33 pixel view.
Ti.Paypal.BUTTON_194x37[int] (read-only)
A paypal button sized for a 194x37 pixel view.
Ti.Paypal.BUTTON_278x43[int] (read-only)
A paypal button sized for a 278x43 pixel view.
Ti.Paypal.BUTTON_294x45[int] (read-only)
A paypal button sized for a 294x45 pixel view.
Properties - Environments
Ti.Paypal.PAYPAL_ENV_LIVE[int] (read-only)
Sets paypal to use the production servers for processing payments.
Payments are actual transactions.
Ti.Paypal.PAYPAL_ENV_SANDBOX[int] (read-only)
Sets paypal to use the testing servers for processing payments.
Payments use testing funds in the development sandbox.
Ti.Paypal.PAYPAL_ENV_NONE[int] (read-only)
Sets paypal to use internal demonstration data for payments and server operations.
Properties - Payment Subtypes
The payment subtype for a "SERVICES" type payment (see enumerated values section). Applicable only if you have been
approved for special pricing plans. For any transactionType other than "TYPE_SERVICE" or if you have not been approved
for special pricing plans use "SUBTYPE_NOT_SET" (the default value) as the transactionSubType.
Ti.Paypal.PAYMENT_SUBTYPE_NONE [int] (read-only)
Ti.Paypal.PAYMENT_SUBTYPE_AFFILIATE [int] (read-only)
Ti.Paypal.PAYMENT_SUBTYPE_B2B [int] (read-only)
Ti.Paypal.PAYMENT_SUBTYPE_PAYROLL [int] (read-only)
Ti.Paypal.PAYMENT_SUBTYPE_REBATES [int] (read-only)
Ti.Paypal.PAYMENT_SUBTYPE_REFUNDS [int] (read-only)
Ti.Paypal.PAYMENT_SUBTYPE_REIMBURSEMENTS [int] (read-only)
Ti.Paypal.PAYMENT_SUBTYPE_DONATIONS [int] (read-only)
Ti.Paypal.PAYMENT_SUBTYPE_UTILITIES [int] (read-only)
Ti.Paypal.PAYMENT_SUBTYPE_TUITION [int] (read-only)
Ti.Paypal.PAYMENT_SUBTYPE_GOVERNMENT [int] (read-only)
Ti.Paypal.PAYMENT_SUBTYPE_INSURANCE [int] (read-only)
Ti.Paypal.PAYMENT_SUBTYPE_REMITTANCES [int] (read-only)
Ti.Paypal.PAYMENT_SUBTYPE_RENT [int] (read-only)
Ti.Paypal.PAYMENT_SUBTYPE_MORTGAGE [int] (read-only)
Ti.Paypal.PAYMENT_SUBTYPE_MEDICAL [int] (read-only)
Ti.Paypal.PAYMENT_SUBTYPE_CHILDCARE [int] (read-only)
Ti.Paypal.PAYMENT_SUBTYPE_EVENTS [int] (read-only)
Ti.Paypal.PAYMENT_SUBTYPE_CONTRACTORS [int] (read-only)
Ti.Paypal.PAYMENT_SUBTYPE_ENTERTAINMENT [int] (read-only)
Ti.Paypal.PAYMENT_SUBTYPE_TOURISM [int] (read-only)
Ti.Paypal.PAYMENT_SUBTYPE_INVOICE [int] (read-only)
Ti.Paypal.PAYMENT_SUBTYPE_TRANSFER [int] (read-only)
Events
For legacy support, this module fires all of the events from created Ti.Paypal.PaypalButton. Adding event listeners
here is deprecated, and will be removed in a future version of the module.
Usage
See example.
Author
Stephen Tramer
Module History
View the change log for this module.
Feedback and Support
Please direct all questions, feedback, and concerns to<EMAIL_ADDRESS>License
Copyright(c) 2010-2013 by Appcelerator, Inc. All Rights Reserved. Please see the LICENSE file included in the distribution for further details.


Scotchly
Scotchy Scotch Scotch
Select your favorite whisky from the list to get suggestions of others to try
{% for name in names %}
{{ name }}
{% endfor %}
{{ selected }}
{% block suggestions %}{% endblock %}


Orator!~
The automatic teleprompter and speech improving machine!
Copy and paste your speech into the
input box and click upload!
Select mode to start
Recording...
Error with chrome.
Error with chrome.
Click allow above
Permission denied...
Permission blocked by chrome settings.
Try using google chrome.
Copy and paste your speech into the
input box and click upload!
0:00
click to stop recording
|
Clarity Coeficient |
Mood |
Red Flags: |


Connecting the two Containers¶
Now for connecting these two linux containers to VPP and pinging between them.
Enter container cone, and check the current network configuration:
root@cone:/# ip -o a
1: lo inet <IP_ADDRESS>/8 scope host lo\ valid_lft forever preferred_lft forever
1: lo inet6 ::1/128 scope host \ valid_lft forever preferred_lft forever
30: veth0 inet <IP_ADDRESS>/24 brd <IP_ADDRESS> scope global veth0\ valid_lft forever preferred_lft forever
30: veth0 inet6 fe80::216:3eff:fee2:d0ba/64 scope link \ valid_lft forever preferred_lft forever
32: veth_link1 inet6 fe80::2c9d:83ff:fe33:37e/64 scope link \ valid_lft forever preferred_lft forever
You can see that there are three network interfaces, lo, veth0, and veth_link1.
Notice that veth_link1 has no assigned IP.
Check if the interfaces are down or up:
root@cone:/# ip link
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
30: veth0@if31: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP mode DEFAULT group default qlen 1000
link/ether 00:16:3e:e2:d0:ba brd ff:ff:ff:ff:ff:ff link-netnsid 0
32: veth_link1@if33: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP mode DEFAULT group default qlen 1000
link/ether 2e:9d:83:33:03:7e brd ff:ff:ff:ff:ff:ff link-netnsid 0
Note
Take note of the network index for veth_link1. In our case, it 32, and its parent index (the host machine, not the containers) is 33, shown by veth_link1@if33. Yours will most likely be different, but please take note of these index’s.
Make sure your loopback interface is up, and assign an IP and gateway to veth_link1.
root@cone:/# ip link set dev lo up
root@cone:/# ip addr add <IP_ADDRESS>/24 dev veth_link1
root@cone:/# ip link set dev veth_link1 up
root@cone:/# dhclient -r
root@cone:/# ip route add default via <IP_ADDRESS> dev veth_link1
Here, the IP is <IP_ADDRESS>/24 and the gateway is <IP_ADDRESS>.
Run some commands to verify the changes:
root@cone:/# ip -o a
1: lo inet <IP_ADDRESS>/8 scope host lo\ valid_lft forever preferred_lft forever
1: lo inet6 ::1/128 scope host \ valid_lft forever preferred_lft forever
30: veth0 inet6 fe80::216:3eff:fee2:d0ba/64 scope link \ valid_lft forever preferred_lft forever
32: veth_link1 inet <IP_ADDRESS>/24 scope global veth_link1\ valid_lft forever preferred_lft forever
32: veth_link1 inet6 fe80::2c9d:83ff:fe33:37e/64 scope link \ valid_lft forever preferred_lft forever
root@cone:/# route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
default <IP_ADDRESS> <IP_ADDRESS> UG 0 0 0 veth_link1
<IP_ADDRESS> * <IP_ADDRESS> U 0 0 0 veth_link1
We see that the IP has been assigned, as well as our default gateway.
Now exit this container and repeat this process with container ctwo, except with IP <IP_ADDRESS>/24 and gateway <IP_ADDRESS>.
After that’s done for both containers, exit from the container if you’re in one:
root@ctwo:/# exit
exit
root@localhost:~#
In the machine running the containers, run ip link to see the host veth network interfaces, and their link with their respective container veth’s.
root@localhost:~# ip link
1: lo: <LOOPBACK> mtu 65536 qdisc noqueue state DOWN mode DEFAULT group default qlen 1
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: enp0s3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP mode DEFAULT group default qlen 1000
link/ether 08:00:27:33:82:8a brd ff:ff:ff:ff:ff:ff
3: enp0s8: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP mode DEFAULT group default qlen 1000
link/ether 08:00:27:d9:9f:ac brd ff:ff:ff:ff:ff:ff
4: enp0s9: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP mode DEFAULT group default qlen 1000
link/ether 08:00:27:78:84:9d brd ff:ff:ff:ff:ff:ff
5: lxcbr0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP mode DEFAULT group default qlen 1000
link/ether 00:16:3e:00:00:00 brd ff:ff:ff:ff:ff:ff
19: veth0C2FL7@if18: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master lxcbr0 state UP mode DEFAULT group default qlen 1000
link/ether fe:0d:da:90:c1:65 brd ff:ff:ff:ff:ff:ff link-netnsid 1
21: veth8NA72P@if20: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP mode DEFAULT group default qlen 1000
link/ether fe:1c:9e:01:9f:82 brd ff:ff:ff:ff:ff:ff link-netnsid 1
31: vethXQMY4C@if30: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master lxcbr0 state UP mode DEFAULT group default qlen 1000
link/ether fe:9a:d9:29:40:bb brd ff:ff:ff:ff:ff:ff link-netnsid 0
33: vethQL7KOC@if32: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP mode DEFAULT group default qlen 1000
link/ether fe:ed:89:54:47:a2 brd ff:ff:ff:ff:ff:ff link-netnsid 0
Remember our network interface index 32 in cone from this note? We can see at the bottom the name of the 33rd index vethQL7KOC@if32. Keep note of this network interface name for the veth connected to cone (ex. vethQL7KOC), and the other network interface name for ctwo.
With VPP in the host machine, show current VPP interfaces:
root@localhost:~# vppctl show inter
Name Idx State MTU (L3/IP4/IP6/MPLS) Counter Count
local0 0 down 0/0/0/0
Which should only output local0.
Based on the names of the network interfaces discussed previously, which are specific to my systems, we can create VPP host-interfaces:
root@localhost:~# vppctl create host-interface name vethQL7K0C
root@localhost:~# vppctl create host-interface name veth8NA72P
Verify they have been set up properly:
root@localhost:~# vppctl show inter
Name Idx State MTU (L3/IP4/IP6/MPLS) Counter Count
host-vethQL7K0C 1 down 9000/0/0/0
host-veth8NA72P 2 down 9000/0/0/0
local0 0 down 0/0/0/0
Which should output three network interfaces, local0, and the other two host network interfaces linked to the container veth’s.
Set their state to up:
root@localhost:~# vppctl set interface state host-vethQL7K0C up
root@localhost:~# vppctl set interface state host-veth8NA72P up
Verify they are now up:
root@localhost:~# vppctl show inter
Name Idx State MTU (L3/IP4/IP6/MPLS) Counter Count
host-vethQL7K0C 1 up 9000/0/0/0
host-veth8NA72P 2 up 9000/0/0/0
local0 0 down 0/0/0/0
Add IP addresses for the other end of each veth link:
root@localhost:~# vppctl set interface ip address host-vethQL7K0C <IP_ADDRESS>/24
root@localhost:~# vppctl set interface ip address host-veth8NA72P <IP_ADDRESS>/24
Verify the addresses are set properly by looking at the L3 table:
root@localhost:~# vppctl show inter addr
host-vethQL7K0C (up):
L3 <IP_ADDRESS>/24
host-veth8NA72P (up):
L3 <IP_ADDRESS>/24
local0 (dn):
Or looking at the FIB by doing:
root@localhost:~# vppctl show ip fib
ipv4-VRF:0, fib_index:0, flow hash:[src dst sport dport proto ] locks:[src:plugin-hi:2, src:default-route:1, ]
<IP_ADDRESS>/0
unicast-ip4-chain
[@0]: dpo-load-balance: [proto:ip4 index:1 buckets:1 uRPF:0 to:[0:0]]
[0] [@0]: dpo-drop ip4
<IP_ADDRESS>/32
unicast-ip4-chain
[@0]: dpo-load-balance: [proto:ip4 index:2 buckets:1 uRPF:1 to:[0:0]]
[0] [@0]: dpo-drop ip4
<IP_ADDRESS>/32
unicast-ip4-chain
[@0]: dpo-load-balance: [proto:ip4 index:10 buckets:1 uRPF:9 to:[0:0]]
[0] [@0]: dpo-drop ip4
<IP_ADDRESS>/24
unicast-ip4-chain
[@0]: dpo-load-balance: [proto:ip4 index:9 buckets:1 uRPF:8 to:[0:0]]
[0] [@4]: ipv4-glean: host-vethQL7K0C: mtu:9000 ffffffffffff02fec953f98c0806
<IP_ADDRESS>/32
unicast-ip4-chain
[@0]: dpo-load-balance: [proto:ip4 index:12 buckets:1 uRPF:13 to:[0:0]]
[0] [@2]: dpo-receive: <IP_ADDRESS> on host-vethQL7K0C
<IP_ADDRESS>/32
unicast-ip4-chain
[@0]: dpo-load-balance: [proto:ip4 index:11 buckets:1 uRPF:11 to:[0:0]]
[0] [@0]: dpo-drop ip4
<IP_ADDRESS>/32
unicast-ip4-chain
[@0]: dpo-load-balance: [proto:ip4 index:14 buckets:1 uRPF:15 to:[0:0]]
[0] [@0]: dpo-drop ip4
<IP_ADDRESS>/24
unicast-ip4-chain
[@0]: dpo-load-balance: [proto:ip4 index:13 buckets:1 uRPF:14 to:[0:0]]
[0] [@4]: ipv4-glean: host-veth8NA72P: mtu:9000 ffffffffffff02fe305400e80806
<IP_ADDRESS>/32
unicast-ip4-chain
[@0]: dpo-load-balance: [proto:ip4 index:16 buckets:1 uRPF:19 to:[0:0]]
[0] [@2]: dpo-receive: <IP_ADDRESS> on host-veth8NA72P
<IP_ADDRESS>/32
unicast-ip4-chain
[@0]: dpo-load-balance: [proto:ip4 index:15 buckets:1 uRPF:17 to:[0:0]]
[0] [@0]: dpo-drop ip4
<IP_ADDRESS>/4
unicast-ip4-chain
[@0]: dpo-load-balance: [proto:ip4 index:4 buckets:1 uRPF:3 to:[0:0]]
[0] [@0]: dpo-drop ip4
<IP_ADDRESS>/4
unicast-ip4-chain
[@0]: dpo-load-balance: [proto:ip4 index:3 buckets:1 uRPF:2 to:[0:0]]
[0] [@0]: dpo-drop ip4
<IP_ADDRESS>/32
unicast-ip4-chain
[@0]: dpo-load-balance: [proto:ip4 index:5 buckets:1 uRPF:4 to:[0:0]]
[0] [@0]: dpo-drop ip4
At long last you probably want to see some pings:
root@localhost:~# lxc-attach -n cone -- ping -c3 <IP_ADDRESS>
PING <IP_ADDRESS> (<IP_ADDRESS>) 56(84) bytes of data.
64 bytes from <IP_ADDRESS>: icmp_seq=1 ttl=63 time=0.102 ms
64 bytes from <IP_ADDRESS>: icmp_seq=2 ttl=63 time=0.189 ms
64 bytes from <IP_ADDRESS>: icmp_seq=3 ttl=63 time=0.150 ms
--- <IP_ADDRESS> ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 1999ms
rtt min/avg/max/mdev = 0.102/0.147/0.189/0.035 ms
root@localhost:~# lxc-attach -n ctwo -- ping -c3 <IP_ADDRESS>
PING <IP_ADDRESS> (<IP_ADDRESS>) 56(84) bytes of data.
64 bytes from <IP_ADDRESS>: icmp_seq=1 ttl=63 time=0.111 ms
64 bytes from <IP_ADDRESS>: icmp_seq=2 ttl=63 time=0.089 ms
64 bytes from <IP_ADDRESS>: icmp_seq=3 ttl=63 time=0.096 ms
--- <IP_ADDRESS> ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 1998ms
rtt min/avg/max/mdev = 0.089/0.098/0.111/0.014 ms
Which should send/receive three packets for each command.
This is the end of this guide. Great work!


Created by Brett Carter / @zbskii
We have a lot of data.
On my first day of work: "So you know python right?"
Yeah...
"We have this data loading script for hadoop, but something is strange..."
Ok...
Every 24 hours we generate 200 Gigabytes of segment data. Our script is broken into four phases:
"So we generate this data every 24 hours, but the script never seems to finish"
Ok...
(The script was taking ~60 hours to complete...)
I love this kind of stuff. I live for optimization problems. But there are rules...
"Optimization is the root of all evil" --Knuth
24 hours.
Clearly, the script was IO bound on 1 process. This is usually a good case for adding some concurrency, especially in Python.
Which of these operations are threadsafe in python?
Which of these operations are threadsafe in python?
We were already using the excellent Requests library, a little digging found Requests.futures. Let's get busy!
import requests
session = requests.Session()
r = session.get(url, stream=True)
Becomes:
from requests_futures import FutureSession
session = FutureSession()
async_downloads.append(session.get(url, stream=True))
for f in futures.as_completed(async_downloads):
pass
What's a Future? See schmichael's "History of concurrency talk"
with ThreadPoolExecutor(max_workers=1) as executor:
future = executor.submit(pow, 323, 1235)
print(future.result())
Futures are a concurency abstraction.
They're easy to reason about - pass some stuff, wait for a result.
The thing is details matter in concurrent programming
Stuff got weird/hard
Remember that requests_futures is just a wrapper library. It worked great on my laptop. I wanted to change a few parameters...
self._async_session = FuturesSession()
for url in urls:
# Make sure the http connection pool is the same size as
# our threadpool - block if the threadpool is full
kwargs = {'max_retries': 3,
'pool_connections': async_workers,
'pool_maxsize': async_workers,
'pool_block': True}
self._async_session.mount('http://', HTTPAdapter(**kwargs))
self._async_session.mount('https://', HTTPAdapter(**kwargs))
self._async_session.get(url)
Did you see the bug?
I got an exception "KeyError: 'https'".
Neither did I. Turns out the futures package swallows your traceback - you get the errormessage, but not where the bug happened.
import workers
worker = workers.ExceptionHandlingThreadPoolWorker(
max_workers=async_workers)
self._async_session = FuturesSession(executor=worker)
self._async_session = FuturesSession()
Grab my patch here.
self._async_session.mount('http://', HTTPAdapter(**kwargs))
self._async_session.mount('https://', HTTPAdapter(**kwargs))
and in session.mount
def mount(self, prefix, adapter):
"""Registers a connection adapter to a prefix.
Adapters are sorted in descending order by key length."""
self.adapters[prefix] = adapter
keys_to_move = [k for k in self.adapters if len(k) < len(prefix)]
for key in keys_to_move:
self.adapters[key] = self.adapters.pop(key)
Details matter.
pretty much the same, but processes worked better.
Win! 2 vs 13 hours!
Well... that's another talk :)
We're hiring!
<EMAIL_ADDRESS>Thanks! + Questions?
<EMAIL_ADDRESS>github.com/zbskii/py-futures


Introduction¶
What is it?¶
A lightweight API that borrows concepts from Celery to allow Python developers to run task based workflows on Apache Flink Stateful Functions. Workflows are composed of Tasks which accept parameters and can be chained together as continuations into a Pipeline. The Pipeline becomes the Flink state.
Motivation¶
I use Celery in my professional life to orchestrate distributed Python workflows. These workflows are typically 1-N-1 such as:
Load a portfolio of stocks
For each stock load a timeseries of historical prices
For each timeseries calculate the standard deviation
Return the average of of the standard deviations
This is fairly trivial to achieve in Celery using plain old functions decorated as Celery tasks
@app.task
def load_timeseries(stock: str):
# load timeseries from market data system and return array of prices
return prices
@app.task
def compute_std_dev(prices: list):
return np.std(prices)
@app.task
def compute_average(std_devs: list)
return np.mean(std_devs)
which could be run on Celery as a workflow
stocks = ['BT.L', 'DAIGn.DE', 'BP.L']
workflow =
chain(group([chain(
load_timeseries.s(stock),
compute_std_dev.s())
for stock in stocks]),
compute_average.s()
)
result = workflow.delay()
Since the workflow is implemented as simple functions it is also testable and debuggable without having to spin up Celery
test_result = compute_average([compute_std_dev(load_timeseries('BT.L')), compute_std_dev(load_timeseries('VOD.L'))])
Flink Stateful Functions¶
Let’s revisit our stocks example and try to implement it as Flink Stateful Functions.
@functions.bind('examples/load_timeseries')
def load_timeseries(context, message):
prices = _load_prices(message.as_type(STOCK))
context.send('prices -> examples/compute_std_dev')
@functions.bind('examples/compute_std_dev')
def compute_std_dev(context, message):
std_dev = np.std(message.as_type(PRICES))
context.send('std_dev -> examples/compute_average')
@functions.bind('examples/compute_average')
def compute_average(context, message):
context.storage.std_devs.append(message.as_type(STD_DEV))
if len(context.storage.std_devs) > NUMBER_OF_STOCKS:
avg = np.mean(context.storage.std_devs)
context.send_egress('avg -> egress topic')
Some issues with this:
load_timeseries() always calls compute_std_dev(). It’s no longer a resusable function so I cannot use it in other workflows. The same is true for compute_std_dev().
compute_average() has to wait for all standand deviations to be received before it calculates the average, storing intermdiate values in state
None of the functions are fruitful so they cannot be tested by chaining them together outside of Flink
A better approach might be to have a central orchestration function that load_timeseries(), compute_std_dev(), compute_average() call back to. This makes them resusable and keeps the state management in one place
@functions.bind('examples/load_timeseries')
def load_timeseries(context, message):
context.send('prices -> context.caller')
@functions.bind('examples/compute_std_dev')
def compute_std_dev(context, message):
context.send('std_dev -> context.caller')
@functions.bind('examples/compute_average')
def compute_average(context, message):
context.send('avg -> context.caller')
@functions.bind('examples/load_timeseries')
def compute_average_std_devs_of_timeseries(context, message):
if message.is_type(STOCK_LIST):
context.storage.stocks = message.as_type(STOCK_LIST)
context.storage.std_devs = []
context.storage.initial_caller = context.caller
for stock in context.storage.stocks:
context.send('stock -> examples/load_timeseries')
elif message.is_type(PRICES):
context.send('prices -> examples/compute_std_dev')
elif message.is_type(STD_DEV):
context.storage.std_devs.append(message.as_type(STD_DEV))
if len(context.storage.std_devs) == len(context.storage.stocks)
context.send('context.storage.std_devs -> examples/compute_average')
elif message.is_type(AVG):
context.send('average -> context.storage.initial_caller')
Flink Tasks¶
Flink Tasks wraps up this orchestration function into a pipeline so that developers can focus on writing simple functions that are combined into workflows using an intuitive API based around ordinary Python functions.
tasks = FlinkTasks(
default_namespace="example",
default_worker_name="worker",
egress_type_name="example/kafka-generic-egress")
@tasks.bind()
def compute_average_std_devs_of_timeseries(stocks):
return in_parallel(
[load_timeseries.send(stock).continue_with(compute_std_dev) for stock in stocks]
).continue_with(compute_average)
@tasks.bind()
def load_timeseries(stock):
return _load_prices(stock)
@tasks.bind()
def compute_std_dev(prices):
return np.std(prices)
@tasks.bind()
def compute_average(std_devs):
return np.mean(std_devs)
@functions.bind("example/worker")
async def worker(context, message):
try:
await tasks.run_async(context, message)
except Exception as e:
print(f'Error - {e}')
traceback.print_exc()


{% extends "base.html" %} {% block title %}Project Description{% endblock %} {% block content %}
I use bulk CSV data primarily from the U.S. Election Assistance Commission's 2012 and 2014 Election Administration and Voting Surveys. The data can be found on the U.S. Election Assistance Commission's website. The data I was interested in include total registration rates, total turnout, turnout at the polling place, number of polling places, and number of poll workers for each federal election. From the data made available by the EAC and cleaned by Pew and others, I was able to create new metrics using Python coding for election over election improvement in the preparation and planning for turnout by county election officials. I then compared local jurisdiction's ranking in the various metrics against the other jurisdictions in the state.
In this project, all data come from county and county-equivalents in the state of Maryland. There are 23 counties in addition to the independent city of Baltimore. I ranked each of the jurisdictions by each created metric to see whether a county or county equivalent undertook steps to improve election over election. I compare rank relative to other county or county equivalent because using raw numbers is less helpful when comparing a presidential election and midterm election, which I was forced to do based on data availability and quality.\


Check your number
A random number is generated depending on the value placed in the code, try to check it
Check attempt
by L.N


Location
Department
Name
Cost of Asset
Accumulated Depreciation
{{item.location}}
{{item.department}}
{{item.assetDesc}}
{{item.assetCost | currency}}
{{getAccumDepre(item) | currency}}


{% load otree_tags staticfiles %} {% block styles %} {% endblock %}
You have been randomly paired with another person, whom we will refer to as the other. This other person is someone you do not know. Both of you will remain mutually anonymous and all of your choices are completely confidential.
You will be making a series of decisions about allocating resources between you and this other person. For each of the following questions, please indicate the distribution you prefer most by moving the slider along the scale to your preferred payoff allocation. You can only make one selection for each decision.
Your decisions will yield money for both yourself and the other person. In the example below, a person has chosen to distribute money so that he/she receives 50 points, while the anonymous other person receives 40 points.
There are no right or wrong answers, this is all about personal preferences. After you have made your decision, make it final by pressing the Confirm button to the right of the scale. As you can see, your choices will influence both the amount of points you receive and the amount of points the other receives. When you have made all your decisions, press the 'Next' button at the bottom of the screen to complete this decision stage.
At the end of the experiment, one person from each pair will be randomly chosen, and one of the decisions that this person made will be applied. This will determine the earnings you both receive in this stage. In other words, if you are selected, then one of your choices will determine the payoff that both you and the other person receive. If you are not selected, then a randomly selected choice made by the other person will be implemented, and your earnings will depend on the choice he/she made about the distribution of resources. The selection will be at random, and neither of you will know beforehand whose decision will be applied.
Contact {{ email }} if you have any questions.


OPEXX
SEARCH
PRICING
Live Tenders
Winners
Published
Any Time
Today
Within Last 7 Days
Within Last 30 Days
Custom Range
Deadline
Any Time
In The Future
Within 7 Days
Within 30 Days
Within a year
Custom Range
Show More/Less
9,000,000 tenders at your fingertips.
Start free trial for 14 days. No credit card needed.
START FREE TRIAL


Everything you need to know about the German “Democratic” Republic (1949–1989), courtesy of Neil Clark in the Morning Star:
ordinary people could eat good hearty fare at affordable prices in a communal atmosphere
In this context, the phrase “good hearty fare” somehow suggests to me stodge with lashings of suet. Yum. Readers' recipes—and serving suggestions—welcome.


There are things you need to pay attention before you go!
Explore a new city or new place by yourself is never that scary. Actually it's lots of fun because you don't need to go to places only your friends want to go but you don't. Also you could manage your schedule better without having conflict with other partner's change or they are just slow to leave one place like the shopping mall.
"The Statue of Liberty Enlightening the World" was a gift of friendship from the people of France to the United States and is recognized as a universal symbol of freedom and democracy. The Statue of Liberty was dedicated on October 28, 1886.
The High Line is a public park built on a historic freight rail line elevated above the streets on Manhattan’s West Side. It runs from Gansevoort Street in the Meatpacking District to West 34th Street, between 10th and 12th Avenues.
There are many famous art museums in NYC such as The Metropolitan Museum of Art, Museum of Modern Art, and Guggenheim Museum. They are all individually different. Each has lots of styles of beautiful arts and paintings.
The Brooklyn Bridge lays over NYC’s East River, linking Manhattan and Brooklyn. Since 1883, its granite towers and steel cables have offered a safe and scenic passage to millions of commuters and tourists, trains, bicycles, and cars.


You know that cartoon where someone asks: “Suppose climate change is a big hoax and we create a better world for nothing?” Debates about populism are like that: “Suppose it was always just about racism and we end neoliberalism for nothing?” 🤔
Hurray! It is no longer cost-effective to mine Bitcoin, which is “good news for the global climate.”
Delicious irony! 😋Uber’s Arbitration Policy Comes Back to Bite It in the Ass
Article writes that people are worried Indonesia’s government’s new ‘heresy app’ could be “misused.” Is there any way this app could be used that doesn’t violate people’s human rights?
Please help this talented Indian 9th grader, from the Chhara community of India, raise money to travel to London with her dad!
This piece about environmentalist accountants reminds me of a talk I heard about how Canada’s First Nations needed to train their own accountants.
Netflix’s 1983 is attributed to show-runner Joshua Long, but the first show has director Agnieszka Holland’s fingerprints all over it. Reminds me of her series “Burning Bush”…
There Is No Excuse for How Universities Treat Adjuncts (Balanced and well researched article with lots of good data, do read the whole thing.)
Which East/South/Southeast Asian countries have shrinking working-age populations and which ones are still growing.
This article argues that NPP Facebook posts are more issue oriented (“political”) than those by either DPP or KMT legislators, who tend to just “share information from their daily lives.”


Toggle navigation
Child Mortality
Yogyakarta
25
PDB
Hospital
Puskesmas
Urban Poverty
Rural Poverty
Length of Study


RecordRTC Merging WebM/WAV into mp4 using ffmpeg-asm.js!
HOME © Muaz Khan . @WebRTCWeb . Github . Latest issues . What's New?
Logs
Record audio/video and convert/merge into "mp4"!
Feedback
Using ffmpeg-asm.js...
- WebM can be converted in mp4.
- WAV can be converted in ogg or mp3.
- WAV can be merged in mp4.
If WAV or WebM is 5MB in size; ogg, mp3 or mp4 will be 700kb!
RecordRTC is MIT licensed on Github! Documentation


Return To Homepage The Crew Page in Coming Soon! A one stop location for all your employees needs. Forms, Proofs and Tracking All In 1 Application, connected to dispatch and live. Contact us, to find out more! — The Snow Removal Management Team


Please follow the link below to confirm email address.
confirm
If you did not sign up for a Read-it-later.app account please disregard this email.