Skip to content

Instantly share code, notes, and snippets.

volkanozcan2

Block or report user

Report or block volkanozcan2

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@volkanozcan2
volkanozcan2 / .eslintrc.json
Last active Aug 14, 2019
npm i -g eslint eslint-plugin-react
View .eslintrc.json
{
"env": {
"browser": true,
"es6": true
},
"extends": ["eslint:recommended", "plugin:react/recommended"],
"globals": {
"Atomics": "readonly",
"SharedArrayBuffer": "readonly"
},
@volkanozcan2
volkanozcan2 / readable.js
Last active Aug 10, 2019
node:readable stream
View readable.js
const { Readable } = require("stream");
const { firstName, lastName } = require("faker/locale/en").name;
const { createWriteStream } = require("fs");
class randomName extends Readable {
constructor(options) {
super(options);
this.count = 1e3;
}
_read() {
View Express 4 and Socket.io: Passing socket.io to routes - app.js
var app = express();
app.io = require('socket.io')();
var routes = require('./routes/index')(app.io);
app.use('/', routes);
@volkanozcan2
volkanozcan2 / arraybuffer.js
Created Jul 3, 2019
arraybuffer to base64 for images etc..
View arraybuffer.js
'data:image/jpeg;base64,' + btoa(String.fromCharCode(...new Uint8Array(arrayBuffer)
@volkanozcan2
volkanozcan2 / coin_toss.py
Created Apr 15, 2019
lambda function for coin count.
View coin_toss.py
import numpy as np
coin_toss=lambda n=1:n if np.random.rand()<0.5 else coin_toss(n+1)
View Welcome file.md

demo

import math
import numpy as np
from scipy import constants as cons

$$\large t_{' }=\frac{t^{}}{\sqrt{1-\frac{V^2}{c^2}}}$$

@volkanozcan2
volkanozcan2 / index.html
Created Aug 23, 2018
to ivan.popelyshev
View index.html
<div id="myContainer"></div>
@volkanozcan2
volkanozcan2 / index.html
Created Aug 21, 2018
to ivan.popelyshev
View index.html
<div id="myContainer"></div>
@volkanozcan2
volkanozcan2 / src.js
Last active May 7, 2018
pixi:template
View src.js
$(document).ready(onReady)
window.onresize = resize;
let opts = {
transparent: false,
backgroundColor: 0x49DCB1,
resolution: 1,
antialias: 0,
autoResize: true,
forceCanvas: false,
clearBeforeRender: true
@volkanozcan2
volkanozcan2 / primeImage.py
Created Jan 27, 2018
image from prime numbers
View primeImage.py
import numpy as np
import time
import primesieve
from PIL import Image
# t is time in seconds
#fps is videos frame rate
t=30
fps=30
You can’t perform that action at this time.