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 calc_eth(eth_currency, target_eth, eth_asset, try_asset) | |
x = 1 | |
loop do | |
if (((x / eth_currency.to_f) + eth_asset) * target_eth.to_f) <= try_asset + x | |
x = x + 1 | |
else | |
break | |
end | |
end | |
x |
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 <iostream> | |
#include <sstream> | |
using namespace std; | |
float get_input(){ | |
stringstream ss (stringstream::in | stringstream::out); | |
float min = 1; | |
float ret_integer = 0.0; | |
string str_number; |
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
@graph = { "A" => "BDFH", "B" => "ACRJI", "C" => "BDQR", "D" => "AEPQC", "E" => "DFNP", | |
"F" => "AENMG","G" => "FLMH", "H" => "AGLKI", "I" => "HKJB", "J" => "IB", | |
"K" => "IH", "L" => "HG", "M" => "GF", "N" => "FE", "P" => "ED", | |
"Q" => "DC", "R" => "CB" } | |
@counter = 0 | |
@path = [] | |
def find_paths(city, last_city) | |
# Gelen şehri listeye ekliyor |
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 http = require('http'); | |
http.createServer(function (req, res) { | |
res.writeHead(200, {'Content-Type': 'text/plain'}); | |
res.end('Hello Node.js\n'); | |
}).listen(8124, "127.0.0.1"); | |
console.log('Server running at http://127.0.0.1:8124/'); |
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
# -*- coding: utf-8 -*- | |
import sys, string, datetime, cx_Oracle, os | |
import logging | |
from subprocess import check_output | |
from logging.handlers import RotatingFileHandler | |
os.environ["NLS_LANG"] = 'TURKISH_TURKEY.WE8ISO8859P9' | |
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
# -*- coding: utf-8 -*- | |
import sys, string, datetime, os, codecs, logging | |
from jira.client import JIRA | |
from subprocess import check_output | |
from logging.handlers import RotatingFileHandler | |
reload(sys) | |
sys.setdefaultencoding('utf-8') | |
sys.stdout = codecs.getwriter('iso-8859-9')(sys.stdout) |
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 <stdio.h> | |
#include <stdint.h> | |
#include <pthread.h> | |
#include <stdlib.h> | |
void *addition(void *); | |
#define NUMBER_OF_THREADS 4 | |
char word[1024] = "lorem ipsum dolor sit amet consectetur adipiscing elit"; |
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 <sys/wait.h> | |
#include <unistd.h> | |
#include <stdlib.h> | |
#include <stdio.h> | |
#include <string.h> | |
#define MAX_LENGTH 100 | |
#define BRACKETS " \t\r\n\a" |
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 base=2; | |
var stop=640; // 9 bets | |
var count=base; | |
var lastBet=base; | |
var didIBet=false; | |
var didIChecked = false; | |
var seriesOfLoosing=0; | |
var cashSinceLastWin=0; | |
var type = 0; //0-martingale, 1-d'alembert | |
var countGreen = 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
def prime?(num) | |
k = 0 | |
(2..Math.sqrt(num)).each do |i| | |
if num % i == 0 | |
k = 1 | |
break | |
end | |
end | |
k != 1 | |
end |
NewerOlder