Skip to content

Instantly share code, notes, and snippets.

View kadirpekel's full-sized avatar

kadirpekel kadirpekel

  • Vendible Inc.
  • Berlin
View GitHub Profile
var http = require('http');
var Buffer = require('buffer').Buffer;
http.createServer(function (req, res) {
var buffer = new Buffer(0);
res.writeHead(200,
{'Content-Type': 'text/html',
'Content-Length': buffer.length});
res.end(buffer, 'binary');
}
diff --git a/lib/assert.js b/lib/assert.js
index 19cb376..854747b 100644
--- a/lib/assert.js
+++ b/lib/assert.js
@@ -97,7 +97,7 @@ assert.fail = fail;
// assert.strictEqual(true, guard, message_opt);.
assert.ok = function ok(value, message) {
- if (!!!value) fail(value, true, message, "==", assert.ok);
+ if (!!!value) assert.fail(value, true, message, "==", assert.ok);
var meryl = require('meryl'),
connect = require('connect'),
merylex = require('meryl-extras'),
eco = require('eco'),
http = require('http');
var generictemplate = merylex('generictemplate');
http.createServer(
meryl
var meryl = require('meryl'),
async = require('async'),
httputil = require('nodeunit').utils.httputil;
exports.testSomething = function (test) {
httputil (
meryl.h('GET /', function(req, resp) {resp.send('test data');}).cgi(),
function (server, client) {
async.series([
function (ok) {
@kadirpekel
kadirpekel / quiz.py
Created July 25, 2012 13:21
What is the output?
def create_counter():
i = 0
def increment():
i = i + 1
print(i)
return increment
count = create_counter()
count()
@kadirpekel
kadirpekel / gist:78e92a19e1269798fb6a
Last active August 29, 2015 14:10
Senior DevOps

Senior DevOps

Key skills

  • Have system administration experience on Linux. AWS experience is a big plus. We're Premium partners with Amazon. This is an exciting opportunity to use Amazon Web Services to the full extent and receive occasional trainings from Amazon Solution Architects.
  • Believes in and practices automation.
  • Have working knowledge of server configuration and provisioning tools like Puppet, Ansible etc.
  • Have experience with high traffic environments.
  • Have experience on optimizing database servers. We use PostgreSQL.
  • Familiar with best practices of Agile software development and Scrum framework.
@kadirpekel
kadirpekel / cartpole.py
Last active January 9, 2023 12:13
CartPole RL Study
import time
import tensorflow as tf
import matplotlib.pyplot as plt
from tf_agents.environments import suite_gym
from tf_agents.networks.q_network import QNetwork
from tf_agents.agents.dqn import dqn_agent
from tf_agents.environments import TFPyEnvironment
from tf_agents.replay_buffers import TFUniformReplayBuffer
This is a sample text.