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
module KingForm | |
# Method for building forms that contain fields for associated models. | |
module NestedFormHelper | |
# Renders the form for nested objects defined via activerecord accepts_nested_attributes_for | |
# | |
# The associated argument can be either an object, or a collection of objects to be rendered. | |
# | |
# An options hash can be specified to override the default behaviors. |
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
$ npm install | |
npm http GET https://registry.npmjs.org/bower | |
npm http GET https://registry.npmjs.org/grunt-contrib-copy | |
npm http GET https://registry.npmjs.org/grunt | |
npm http GET https://registry.npmjs.org/grunt-contrib-watch | |
npm http GET https://registry.npmjs.org/load-grunt-config | |
npm http GET https://registry.npmjs.org/grunt-contrib-concat | |
npm http GET https://registry.npmjs.org/grunt-contrib-clean | |
npm http GET https://registry.npmjs.org/grunt-contrib-jshint | |
npm http GET https://registry.npmjs.org/grunt-cli |
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
Ember.ObjectController.create({ | |
createMarker: function() { | |
var marker = new InfoBox(); | |
var markerView = this.get('container').lookup('component:custom-marker'); | |
markerView.append(); | |
markerView.set('controller', Ember.ObjectController.create({ | |
marker: marker, | |
settingIcon: settingIcon, |
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 Ember from 'ember'; | |
export default Ember.Controller.extend({ | |
appName:'Ember Twiddle', | |
actions: { | |
add() { | |
console.log('add'); | |
let provider = this.get('model.firstObject'); | |
let item = { name: 'Feature X', provider: provider }; |
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 Ember from 'ember'; | |
export function initialize() { | |
// TODO: remove me https://github.com/tildeio/htmlbars/issues/472 | |
let proto = Ember.HTMLBars.DOMHelper.prototype; | |
proto.setPropertyStrict = function (element, name, value) { | |
if (value === undefined) { | |
value = null; | |
} |
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 Ember from 'ember'; | |
const { | |
getWithDefault, | |
computed | |
} = Ember; | |
function readsWithDefault(dependentKey, defaultValue) { | |
return computed(dependentKey, { | |
get() { |
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
function applyQueryParams(collection, queryParams) { | |
let qp = { | |
filter: {}, | |
page: {}, | |
sort: '' | |
}; | |
Object.keys(queryParams) | |
.reduce((data, key) => { | |
let matches = key.match(/(.*)\[(.*)\]$/); |
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
# conda env create|update -f environment.yml | |
name: data-science-project | |
dependencies: | |
- python=3.7 | |
- pip=19.0.* | |
- pip: | |
- '--editable=.' | |
- flake8==3.7.* | |
- flake8-quotes==1.0.* | |
- jupyter==1.0.* |
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
# One time setup | |
# Install Miniconda | |
wget -O src/miniconda.sh https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh | |
bash src/miniconda.sh -b -p $HOME/miniconda | |
export PATH="$HOME/miniconda/bin:$PATH" | |
# Get the source | |
git clone https://github.com/datasciencejob-de/data-science-python-setup.git . |