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 math, sys | |
def formula(x, mu, sigma): | |
exp = math.exp(- ((x - mu)**2) / (2*sigma**2)) | |
return 1.0 / (sigma * math.sqrt(2*math.pi)) * exp | |
x_cli = float(sys.argv[1]) | |
mu_cli = float(sys.argv[2]) | |
sigma_cli = float(sys.argv[3]) | |
print(formula(x_cli, mu_cli, sigma_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
german@german-HP-ProBook-4540s ➜ mmc-filter-client git:(MMC-556-Pagination) gco stable | |
Branch stable set up to track remote branch stable from origin. | |
Switched to a new branch 'stable' | |
german@german-HP-ProBook-4540s ➜ mmc-filter-client git:(stable) git pull origin stable | |
From github.com:aupeo/mmc-filter-client | |
* branch stable -> FETCH_HEAD | |
Already up-to-date. | |
german@german-HP-ProBook-4540s ➜ mmc-filter-client git:(stable) gco master | |
Switched to branch 'master' | |
Your branch is up-to-date with 'origin/master'. |
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/sh | |
set -u | |
set -e | |
# Example init script, this can be used with nginx, too, | |
# since nginx and unicorn accept the same signals | |
# Feel free to change any of the following variables for your app: | |
APP_ROOT=/home/deploy/public_html/rm/current | |
PID=$APP_ROOT/tmp/pids/unicorn.pid | |
ENV=production |
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
$ ruby -v | |
ruby 1.8.7 (2010-06-23 patchlevel 299) [i686-linux] | |
$irb | |
ruby-1.8.7-p299 > a = (125.33 - (125.33/100.0*50.0)) | |
=> 62.665 | |
ruby-1.8.7-p299 > b = 62.665 | |
=> 62.665 | |
ruby-1.8.7-p299 > (a*100).round | |
=> 6266 |
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
1.9.3dev | |
$ ruby -v | |
ruby 1.9.3dev (2010-12-08 trunk 30125) [i686-linux] | |
$ irb | |
ruby-head > 125.33 - (125.33/100.0*50.0) | |
=> 62.66499999999999 | |
ruby-head > 125.33 / 100.0 * 50.0 | |
=> 62.665000000000006 |
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
$ redis-benchmark | |
====== PING (inline) ====== | |
10000 requests completed in 0.43 seconds | |
50 parallel clients | |
3 bytes payload | |
keep alive: 1 | |
19.85% <= 1 milliseconds | |
97.70% <= 2 milliseconds |
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
- Неужели и здесь то же самое? - задал я горький и не вполне понятный вопрос. | |
- И здесь, и везде, - сказал Иегова. - И всегда. Проследи за тем, что происходит во время человеческого общения. | |
Зачем человек открывает рот? | |
Я пожал плечами. | |
- Главная мысль, которую человек пытается донести до других, заключается в том, что он имеет доступ к гораздо более | |
престижному потреблению, чем про него могли подумать. Одновременно с этим он старается объяснить окружающим, что | |
их тип потребления гораздо менее престижен, чем они имели наивность думать. Этому подчинены все социальные маневры. | |
Больше того, только эти вопросы вызывают у людей стойкие эмоции. | |
- Вообще-то мне в жизни попадались и другие люди, - сказал я с легкой иронией. | |
Иегова кротко посмотрел на меня. |
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 ActiveRecord | |
Base.singleton_methods.each do |m| | |
Base.class_eval <<-EOS | |
class << self | |
puts "redefining #{m}" | |
define_method "#{m}_with_introspection" do |*args| | |
puts "#{m}" | |
send(:"#{m}_without_introspection", *args) | |
end |
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
Loading development environment (Rails 2.3.5) | |
>> module ActiveRecord | |
>> Base.singleton_methods.each do |m| | |
?> Base.class_eval <<-EOS | |
class << self | |
puts "redefining #{m}" | |
define_method "#{m}_with_introspection" do |*args| | |
puts "#{m}" | |
send(:"#{m}_without_introspection", *args) |
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
#include “mruby.h” | |
#include “mruby/proc.h” | |
#include <stdio.h> | |
void _error(const char* s){ | |
printf("ERROR: %s\n", s); | |
exit(1); | |
} | |
int main() { |
OlderNewer