Skip to content

Instantly share code, notes, and snippets.

model = app.model('Prediction params',
{
'sepalLength': fields.Integer(required = True,
description="Select 1",
help="Select 1 cannot be blank"),
'sepalWidth': fields.Integer(required = True,
description="Select 2",
help="Select 2 cannot be blank"),
'petalLength': fields.Integer(required = True,
description="Select 3",
@martunta
martunta / react-three-renderer-with-orbit-controls.js
Last active April 30, 2019 01:30
react-three-renderer working with three-orbit-controls
import React from 'react';
import React3 from 'react-three-renderer';
import THREE from 'three';
var OrbitControls = require('three-orbit-controls')(THREE)
class GreenCube extends React.Component {
render() {
return <mesh>
<boxGeometry width={200} height={200} depth={200} />
@martunta
martunta / fleep.css
Created November 10, 2015 21:29
Styling to make Fleep more compact
/*make the left panel conversation lists more compact*/
.open_conversation_row {
line-height: 20px;
height: 22px;
font-size: 15px;
padding-bottom: 0px;
padding-top: 0px;
}
.open_conversation_row .right {
margin-top: 0px;
@martunta
martunta / volume.rb
Last active December 18, 2015 14:59 — forked from uriel1998/volume.rb
#!/usr/bin/ruby
#
# Moved to: https://github.com/uriel1998/volumerb
#
# This work is licensed under the Creative Commons Attribution-ShareAlike 3.0
# Unported License. To view a copy of this license, visit
# http://creativecommons.org/licenses/by-sa/3.0/.
#
# Forked/derived from original by Jasper Van der Jeugt (jaspervdj);
#pārbaudāmās funkcijas definīcija
def f(x)
#x**2-612 #atkomentē lai izmēģinātu šo piemēru
Math.cos(x)-x**3 #aizkomentē, lai izmēģinātu pirmo piemēru
end
#ar roku izrēķinam atvasinājumu no f(x)
def df(x)
#2*x #atkomentē lai izmēģinātu šo piemēru
-Math.sin(x) - 3*(x**2)
#pārbaudāmās funkcijas definīcija
def f (x)
x**3-x-2
end
#metodes definīcija
def bisect (a,b)
(a+b)/2
end