This is a demo of dynamic directional transitions using React's CSSTransitionGroup.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Simple test of PhantomJS and the XContentReady event. | |
* | |
* This is the basic pattern used for the ember-prerender project: https://github.com/zipfworks/ember-prerender | |
* More info on the XContentReady event: https://github.com/n-fuse/the-XContentReady-Event/ | |
* | |
* Usage: phantomjs phantom_test.js | |
*/ | |
var page = require('webpage').create(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
┌─────────────────────────────────────────────────────────┤ Configuring lxd ├──────────────────────────────────────────────────────────┐ | |
│ │ | |
│ lxcbr0 is being replaced by lxdbr0 │ | |
│ │ | |
│ With this package upgrade LXD is moving away from the LXC provided lxcbr0 bridge and moving to its own lxdbr0 bridge. │ | |
│ │ | |
│ The reason for this switch is: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Example Dockerfile that builds PhantomJS 2.0 | |
# | |
# Build with: | |
# docker build --rm --tag=phantom2.0:latest . | |
# | |
# Run with: | |
# docker run --name=phantom2.0 phantom2.0 | |
# | |
# Copy the executable to your host machine for distribution: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.text.Normalizer | |
/** | |
* Problem: Characters with accents or other adornments can be encoded in several different ways in Unicode | |
* However, from a user point of view if they logically mean the same, text search should make no distinction | |
* between the different notations. So it's important to store text in normalized unicode form. Code below shows | |
* how to check if text is normalized and how you can normalize it. | |
**/ | |
object NormalizationTest { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// src/app/preactDomRenderer.js | |
import { h, render } from 'preact'; | |
import undom from 'undom'; | |
const VOID_ELEMENTS = [ | |
'area', | |
'base', | |
'br', | |
'col', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import matplotlib.pyplot as plt | |
import matplotlib.patches as patches | |
from PIL import Image | |
import numpy as np | |
input_test_img = '/your/path/Utah_AGRC-HRO_15.0cm_12TVK220980-CROP.0.0.jpg' | |
im = np.array(Image.open(input_test_img), dtype=np.uint8) | |
# Create figure and axes | |
fig,ax = plt.subplots(figsize=(10, 10)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
with detection_graph.as_default(): | |
with tf.Session(graph=detection_graph) as sess: | |
image_tensor = detection_graph.get_tensor_by_name('image_tensor:0') | |
detection_boxes = detection_graph.get_tensor_by_name('detection_boxes:0') | |
detection_scores = detection_graph.get_tensor_by_name('detection_scores:0') | |
detection_classes = detection_graph.get_tensor_by_name('detection_classes:0') | |
num_detections = detection_graph.get_tensor_by_name('num_detections:0') | |
for image_path in TEST_IMAGE_PATHS: | |
image = Image.open(image_path) | |
image_np = load_image_into_numpy_array(image) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export class EnumSymbol { | |
sym = Symbol.for(name); | |
value: number; | |
description: string; | |
constructor(name: string, {value, description}) { | |
if(!Object.is(value, undefined)) this.value = value; | |
if(description) this.description = description; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react' | |
function defaultGetWidth () { | |
return window.innerWidth; | |
} | |
function defaultGetHeight () { | |
return window.innerHeight; | |
} |
OlderNewer