Skip to content

Instantly share code, notes, and snippets.

HARUN PEHLİVAN harunpehlivan

View GitHub Profile
@harunpehlivan
harunpehlivan / music_bot_example.py
Created June 27, 2021 00:29 — forked from vbe0201/music_bot_example.py
A simple music bot written using discord.py rewrite and youtube_dl.
# -*- coding: utf-8 -*-
"""
Copyright (c) 2019 Valentin B.
A simple music bot written in discord.py using youtube-dl.
Though it's a simple example, music bots are complex and require much time and knowledge until they work perfectly.
Use this as an example or a base for your own bot and extend it as you want. If there are any bugs, please let me know.
import TensorFlow
import Python
let np = Python.import("numpy")
let randomNumbers = Tensor<Float>(randomUniform: [5, 5])
print(randomNumbers)
let rotatedRandomNumbers = Tensor<Float>(numpy: np.rot90(randomNumbers.makeNumpyArray()))
print(rotatedRandomNumbers)
@harunpehlivan
harunpehlivan / python_heroku.MD
Created September 9, 2020 17:05 — forked from bradtraversy/python_heroku.MD
Python & Postgres Heroku Deployment

Python Heroku Deployment

Steps to create a postgres database and deply a Python app to Heroku

Install guinicorn locally

pipenv install gunicorn
or
pip install gunicorn
@harunpehlivan
harunpehlivan / chat-frontend.js
Created July 17, 2020 19:13 — forked from martinsik/chat-frontend.js
Node.js chat frontend and server
$(function () {
"use strict";
// for better performance - to avoid searching in DOM
var content = $('#content');
var input = $('#input');
var status = $('#status');
// my color assigned by the server
var myColor = false;
@harunpehlivan
harunpehlivan / nodejs-tcp-example.js
Created July 17, 2020 19:13 — forked from tedmiston/nodejs-tcp-example.js
Node.js TCP client and server example
/*
In the node.js intro tutorial (http://nodejs.org/), they show a basic tcp
server, but for some reason omit a client connecting to it. I added an
example at the bottom.
Save the following server in example.js:
*/
var net = require('net');
@harunpehlivan
harunpehlivan / package.json
Created July 17, 2020 16:32 — forked from coryhouse/package.json
package.json for Building a JS Development Environment on Pluralsight
{
"name": "javascript-development-environment",
"version": "1.0.0",
"description": "JavaScript development environment Pluralsight course by Cory House",
"scripts": {
},
"author": "Cory House",
"license": "MIT",
"dependencies": {
"whatwg-fetch": "1.0.0"
@harunpehlivan
harunpehlivan / Knex-Setup.md
Created July 17, 2020 16:31 — forked from NigelEarle/Knex-Setup.md
Setup Knex with Node.js

Knex Setup Guide

Create your project directory

Create and initialize your a directory for your Express application.

$ mkdir node-knex-demo
$ cd node-knex-demo
$ npm init
@harunpehlivan
harunpehlivan / installing-node-with-nvm.md
Created July 17, 2020 16:30 — forked from d2s/installing-node-with-nvm.md
Installing Node.js to Linux & macOS & WSL with nvm

Installing Node.js with nvm to Linux & macOS & WSL

A quick guide on how to setup Node.js development environment.

Install nvm for managing Node.js versions

nvm allows installing several versions of Node.js to the same system. Sometimes applications require a certain versions of Node.js to work. Having the flexibility of using specific versions can help.

  1. Open new Terminal window.

Video Notes

It is important to remember that there are two ways to enter your code into Python: the shell and the text editor. Make sure to play around and start getting comfortable with them both.

@harunpehlivan
harunpehlivan / _arrows.scss
Created July 4, 2019 19:39 — forked from jondaiello/_arrows.scss
SASS @mixin for Arrows
// Demo at http://codepen.io/jondaiello/full/YWRbOx/
/* This mixin is for generating CSS arrows on a box */
@mixin box-arrow($arrowDirection, $arrowColor, $arrowSize: 10px) {
position: relative;
z-index: 10;
&::after {
content: '';
width: 0;
height: 0;