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 numpy as np | |
x = np.array([0.0,1.0,2.0]) | |
y = np.array([0.0,0.8,0.9]) | |
z = np.polyfit(x,y,3) | |
p = np.poly1d(z) | |
y2 = [ p(N) for N in x ] | |
print str(y2[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
How to run cordova on linux for my specific computer only. | |
This is only a memo for myself. | |
First of all using user jesus: | |
go to | |
cd ~/Android/Sdk/tools | |
./android avd | |
and let that run |
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
URL: | |
http://3c25fbaf.ngrok.io/ | |
Screens in order: | |
Index: | |
http://3c25fbaf.ngrok.io/index.html | |
Login: |
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
/* | |
?> | |
<!-- Slider | |
================================================== --> | |
<div class="slider-wrapper"> | |
<?php | |
if ( is_active_sidebar( 'he-main-slider' ) ) { | |
?> | |
<div class="menu-top-wrapper"> |
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
<video autoplay="" loop="" poster="img/cover-background.png" id="bgvid" class="stretchToFit" style=""> | |
<source src="http://executive.inncubator.net/wp-content/uploads/2015/10/video21.mp4" type="video/mp4"> | |
<source src="http://executive.inncubator.net/wp-content/uploads/2015/10/video2.webm" type="video/webm"> | |
</video> | |
<img class="ls-l ls-preloaded" id="image-in-header" style="top: 266.5px; left: 680.5px; white-space: nowrap; width: 479px; height: 67px; padding: 0px; border-width: 0px; visibility: visible; margin-left: 0px; margin-top: 0px; transform-origin: 50% 50% 0px; transform: matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, -0.002, 0, 0, 0, 1); opacity: 1;" data-ls="offsetxin:0;durationin:2500;offsetxout:0;" src="http://www.inncubator.net/wp-content/uploads/2015/04/tag.png" data-src="http://www.inncubator.net/wp-content/uploads/2015/04/tag.png" alt=""> | |
<p id="button-in-header" class="ls-l" style="top: 369px; left: 825px; white- |
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
var obtainMatch = function() {}; | |
$(document).ready(function(){ | |
// List of all judges. Make sure those specific strings are used when assigning judges to | |
// the users | |
judgesWhoPresideFB = ["judge 1", "judge 2", "judge 3"]; | |
// List of all judges. Make sure those specific strings are used when assigning judges to | |
// the users | |
judgesWhoScoreFB = ["judge 1", "judge 2", "judge 3"]; |
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
+route = functools.wraps(Bottle.route)(lambda *a, **ka: app().route(*a, **ka)) | |
+get = functools.wraps(Bottle.get)(lambda *a, **ka: app().get(*a, **ka)) | |
+post = functools.wraps(Bottle.post)(lambda *a, **ka: app().post(*a, **ka)) | |
+put = functools.wraps(Bottle.put)(lambda *a, **ka: app().put(*a, **ka)) | |
+delete = functools.wraps(Bottle.delete)(lambda *a, **ka: app().delete(*a, **ka)) | |
+error = functools.wraps(Bottle.error)(lambda code: app().error(code)) | |
def route(self, path=None, method='GET', **kargs): | |
""" Decorator: Bind a function to a GET request path. |
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
def r(m, g, l, d, u, j): | |
# print "r iteration: "+str(d) | |
if d == len(l)+10: | |
return False | |
mS = sum(m) | |
mL = len(m) | |
if mS == g: | |
return m | |
if mS < g*(1.0+j) and mS > g*(1.0-j): | |
return m |
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
$(".status").each(function(index, element) { if($(element).html().indexOf("Deleted") != -1 ) { $(element).parent().hide(); }; }); |
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 subprocess | |
import re | |
def rmAll(): | |
output = subprocess.check_output("git status", shell=True) | |
matches = re.findall('deleted: .*', output) | |
for n in matches: | |
clean = n.replace("deleted: ","") | |
subprocess.call("git rm "+clean, shell=True) |