Skip to content

Instantly share code, notes, and snippets.

View yortuc's full-sized avatar
💭
big dreams

Evren Yortucboylu yortuc

💭
big dreams
View GitHub Profile
@yortuc
yortuc / deneme.scala
Created May 15, 2020 04:52
Test Scala
import org.scalatest.flatspec.AnyFlatSpec
import com.yortuc.myProject
class MyIntegrationTest extends AnyFlatSpec with SparkSessionTestWrapper {
"myProject" should "Read the data from Parquet and save the output correctly" in {
// run the app as it is
// in this example with two cli parameters for input and output path
@yortuc
yortuc / index.html
Created August 14, 2019 14:41
JS Bin backGame // source https://jsbin.com/yomajin
<!DOCTYPE html>
<html>
<head>
<meta name="description" content="backGame">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
</head>
<body>
<canvas id="c" width="480" height="320"></canvas>
import React, { Component } from 'react';
import './App.css';
const imagesFromFeed = (feed) => feed['graphql'] ? feed['graphql']['user']['edge_owner_to_timeline_media']['edges'] : null
const imageFromNode = (node) => node['node']['display_url']
const idFromNode = (node) => node['node']['id']
const fetchUserFeed = (user) =>
fetch(`https://www.instagram.com/${user}/?__a=1`)
.then(res => res.json())
@yortuc
yortuc / lisp_clone.js
Last active April 6, 2018 15:11
Lisp Clone
const funs = {
sqrt: (val) => Math.sqrt(val),
sum: (a,b)=> a + b,
mul: (a,b) => a * b
}
class Exp {
constructor(fnName, params){
this.fnName = fnName
this.params = params
@yortuc
yortuc / index.html
Last active February 14, 2018 15:39
Knockout.js clone
<!DOCTYPE html>
<html>
<head>
<meta name="description" content="Observable Lib">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>Observable</title>
</head>
<body>
// observable
// like ko.observable with subsciption
function ob(val){
let lastVal = val;
let callbacks = [];
const accessor = function(setVal){
if(setVal){
lastVal = setVal;
const transpose = (m) => {
return m[0].reduce((acc, _, colIndex) =>
[...acc, m.map(row => row[colIndex])],
[]);
}
const multiplyOneRow = (row1, m2T) => {
const rr = ({type, children}={}) => {
if(!type)
return ''
if(!children)
return document.createElement(type);
var t = document.createTextNode(children[0]);
var n = document.createElement(type);
n.appendChild(t);
@yortuc
yortuc / kbd.md
Last active December 11, 2017 21:49

Ctrl ,

[user]
email = evren.yortucboylu@holidaycheck.com
name = eyortucboylu
[alias]
c = commit
st = status
co = checkout
lp = log --oneline --graph --decorate
cl = clone
si = submodule init