View lovr physics static wall?
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
--[[ Wrecking ball suspended from rope. Cyrus-free. | |
Making realtime rope simulation is finicky on any physics engine. At certain weight the force becomes | |
too much to be successfully distributed among rope elements. | |
Some steps that can help solve the issue: | |
1) lower the mass of suspended weight or lower the gravity constant | |
2) increase mass of each rope element, preferably having more mass at top of rope and less mass at bottom | |
3) decrease number of rope elements | |
4) decrease the simulation time step |
View lovr physics static wall?
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
--[[ Wrecking ball suspended from rope. Cyrus-free. | |
Making realtime rope simulation is finicky on any physics engine. At certain weight the force becomes | |
too much to be successfully distributed among rope elements. | |
Some steps that can help solve the issue: | |
1) lower the mass of suspended weight or lower the gravity constant | |
2) increase mass of each rope element, preferably having more mass at top of rope and less mass at bottom | |
3) decrease number of rope elements | |
4) decrease the simulation time step |
View gist:2fee28d8931de0ce6b5883e4b5658560
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
FROM ubuntu:16.04 | |
RUN apt-get update -y && apt-get install -y --no-install-recommends \ | |
python3-pip python3-dev cmake zlib1g-dev python3-tk python-opencv build-essential | |
RUN pip3 install --upgrade pip | |
RUN pip3 install virtualenv | |
RUN pip3 install setuptools | |
RUN mkdir -p /coach |
View perlin.py
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
"""Perlin noise implementation.""" | |
# Licensed under ISC | |
from itertools import product | |
import math | |
import random | |
def smoothstep(t): | |
"""Smooth curve with a zero derivative at 0 and 1, making it useful for | |
interpolating. |
View etst
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
setestsetset | |
est | |
se | |
t | |
est | |
se |
View git hub repo info
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: 200 OK | |
Link: <https://api.github.com/repositories?since=364>; rel="next" | |
X-RateLimit-Limit: 5000 | |
X-RateLimit-Remaining: 4999 | |
[ | |
{ | |
"id": 1296269, | |
"owner": { | |
"login": "octocat", | |
"id": 1, |
View naive-bayes.clj
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 text_classified_p '(["good" "bad" "good" "good"] | |
["exciting" "exciting"] | |
["good" "good" "exciting" "boring"])) | |
(def text_classified_n '(["bad" "boring" "boring" "boring"] | |
["bad" "good" "bad"] | |
["bad" "bad" "boring" "exciting"])) | |
;;多変数ベルヌーイモデル | |
(defn train [features] |
View kill_hadoop_orphans.sh
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
#!/bin/bash | |
# Kill tasks holding on to deleted userlogs. These are most likely abandoned jobs. | |
function get_bad_pids { | |
for i in `ps -ef | grep java | awk '{print $2;}'`; do | |
cnt=`/usr/sbin/lsof -p $i | grep deleted | grep /var/log/hadoop-0.20/userlogs/attempt | wc -l`; | |
if [ $cnt -gt 0 ]; then | |
PIDS=$i:$PIDS; | |
fi |
View gist:2322942
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
(require '[clj-http.client :as client]) | |
(defn extract_domain [domain] | |
(println domain) | |
(let [unrolled_url (try (:trace-redirects (client/get domain {:throw-entire-message? true})) (catch Exception _ domain))] | |
(.getHost (java.net.URL. unrolled_url)))) | |
(extract_domain "http://t.co/fDW8Gau") |
View gist:1844519
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
require 'rsolr' | |
require 'thread' | |
require "optparse" | |
$opts = {} | |
Thread.abort_on_exception = true | |
threads = [] | |
$q = Queue.new |
NewerOlder