Skip to content

Instantly share code, notes, and snippets.

View andresn's full-sized avatar

Andres Narvaez andresn

  • Self
  • Riverside, CA
View GitHub Profile
@andresn
andresn / !react-enzyme-render-methods.md
Created March 28, 2018 23:02 — forked from borela/!react-enzyme-render-methods.md
react-enzyme - `shallow` vs `mount` vs `render` lifecycle methods

An exploration of the different render methods available in react-enzyme.

Try working off of something like this: https://jsfiddle.net/drdrace/4f71vw3u/2/
This would be a more efficient way of having only one img element, since you don't have to cause the browser to "repaint" every time you insert a new img element via innerHTML:
https://jsfiddle.net/drdrace/4f71vw3u/11/
'use strict';
import React from 'react';
import {
AppRegistry,
View,
PickerIOS,
StyleSheet
} from 'react-native';
export default class TimePicker extends React.Component {
Traceback (most recent call last):
File "//anaconda/envs/intro-to-rnns/lib/python3.6/runpy.py", line 183, in _run_module_as_main
mod_name, mod_spec, code = _get_module_details(mod_name, _Error)
File "//anaconda/envs/intro-to-rnns/lib/python3.6/runpy.py", line 109, in _get_module_details
__import__(pkg_name)
File "/Users/andresn/dev/machine-learning/deep-learning/intro-to-rnns/Anna_KaRNNa.py", line 350, in <module>
feed_dict = feed
File "//anaconda/envs/intro-to-rnns/lib/python3.6/site-packages/tensorflow/python/debug/wrappers/framework.py", line 394, in run
self._run_call_count))
File "//anaconda/envs/intro-to-rnns/lib/python3.6/site-packages/tensorflow/python/debug/wrappers/local_cli_wrapper.py", line 187, in on_run_start
"""
Implement the backward method of the Sigmoid node.
"""
import numpy as np
class Node(object):
"""
Base class for nodes in the network.
"""
Test your network here!
No need to change this code, but feel free to tweak it
to test your network!
Make your changes to backward method of the Sigmoid class in miniflow.py
"""
import numpy as np
Very specific and helpful advice from a high-level staffer for a Senator. Re-posting
There are two things that we should be doing all the time right now
--> You should NOT be bothering with online petitions or emailing.
YOU SHOULD MAKE 6 CALLS A DAY:
2 each (DC office and your local office) to your 2 Senators and congressperson.
Calls are what all the congresspeople pay attention to. Every single day, the Senior Staff and the Senator get a report of the 3 most-called-about topics for that day at each of their offices (in DC and local offices), and exactly how many people said what about each of those topics. They're also sorted by zip code and area code. She said that Republican callers generally outnumber Democrat callers 4-1, and when it's a particular issue that single-issue-voters pay attention to (like gun control, or planned parenthood funding, etc...), it's often closer to 11-1, and that's recently pushed Republican congressmen on the fence to vote with the Republicans. In the last 8 years, Republican
@andresn
andresn / gist:1f35d718da9fc57542bb399460f2efd0
Created July 5, 2016 19:40
[React Native][Getting Started] error: ignoring return value of function declared with warn_unused_result attribute
Found Xcode project AwesomeProject.xcodeproj
Launching iPhone 6 (10.0)...
Building using "xcodebuild -project AwesomeProject.xcodeproj -scheme AwesomeProject -destination id=2DE46585-1211-49CB-B5E2-AC3AF7777C3C -derivedDataPath build"
User defaults from command line:
IDEDerivedDataPathOverride = /Users/andresn/dev/AwesomeProject/ios/build
=== BUILD TARGET RCTLinking OF PROJECT RCTLinking WITH CONFIGURATION Debug ===
Check dependencies
export default class SplashScreen extends Component {
constructor (props) {
super(props);
this.state = {
cleanUp: false
};
this.cleanUpAndNavigate = this.cleanUpAndNavigate.bind(this);
}
navigateTo(name, page, data, hideNavigationBar) {
this.TABLE.push(
{
beginningHealth: beginningHealth,
beginningHealthPerSprint: beginningHealthPerSprint,
'this.healthIntervals': this.healthIntervals,
'% elapsed of interval': ( this.elapsedDistanceSinceLastSprint / this.flightUntil ),
healthDiscount: healthDiscount,
endHealth: this.health,
endHealthPerSprint: this.healthPerSprint