Skip to content

Instantly share code, notes, and snippets.

Ramazan Polat ramazanpolat

Block or report user

Report or block ramazanpolat

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
View serdes.java
package com.rambo;
import com.arangodb.ArangoDBException;
import com.arangodb.entity.BaseDocument;
import com.arangodb.entity.CollectionEntity;
import com.arangodb.velocypack.VPack;
import com.arangodb.velocypack.VPackSlice;
import org.msgpack.MessagePack;
import com.arangodb.ArangoDB;
@ramazanpolat
ramazanpolat / bg_extract.py
Created Jun 30, 2019
background extraction with opencv
View bg_extract.py
import cv2
import copy
class Copyable:
__slots__ = 'a', '__dict__'
def __init__(self, a, b):
self.a, self.b = a, b
@ramazanpolat
ramazanpolat / postgres-01
Last active Jun 10, 2019
Command for first time PostgreSQL 11 users
View postgres-01
### installation
### connection
su - postgres
psql
#### psql commands
# connect to a database
\connect dbname
@ramazanpolat
ramazanpolat / build_install_python3.6.7.sh
Last active Oct 27, 2018
Build and install python 3.6.7 from source on Ubuntu 16.04 LTS(Xenial). Includes SSL/TLS for pip.
View build_install_python3.6.7.sh
apt install build-essential -y
apt install zlib1g-dev -y
apt install libssl-dev libncurses5-dev libsqlite3-dev libreadline-dev libtk8.5 libgdm-dev libdb4o-cil-dev libpcap-dev -y
apt update
apt upgrade
git clone https://github.com/deadsnakes/python3.6
cd python3.6
./configure --enable-optimizations
# make command will take 10 mins
make
View apistar_multipart.py
import os
from typing import Any
from apistar import App, Route, http
from apistar.codecs.multipart import MultiPartCodec
from werkzeug.datastructures import FileStorage
UPLOAD_FOLDER = os.path.join('.', 'uploads')
PORT = 8080
View coin_info.py
__coin_info = {
'1ST': {'name': 'FirstBlood', 'status': 'black', 'category': []},
'420G': {'name': 'GanjaCoin', 'status': 'black', 'category': ['drug']},
'4CHN': {'name': 'ChanCoin', 'status': 'black', 'category': ['gambling']},
'2GIVE': {'name': '2GIVE', 'status': 'black', 'category': ['riba']},
'ABY': {'name': 'ArtByte', 'status': 'white', 'category': []},
'ADA': {'name': 'Cardano', 'status': 'white', 'category': []},
'ADT': {'name': 'adToken', 'status': 'white', 'category': []},
'ADX': {'name': 'AdEx', 'status': 'white', 'category': []},
'AEON': {'name': 'Aeon', 'status': 'white', 'category': []},
View webpack.config.js
var debug = process.env.NODE_ENV !== "production";
var webpack = require('webpack');
module.exports = {
context: __dirname,
devtool: debug ? "inline-sourcemap" : null,
entry: "./js/scripts.js",
output: {
path: __dirname + "/js",
filename: "scripts.min.js"
View designer.html
<link rel="import" href="../topeka-elements/category-images.html">
<link rel="import" href="../core-icon/core-icon.html">
<link rel="import" href="../core-icons/core-icons.html">
<link rel="import" href="../core-icons/av-icons.html">
<link rel="import" href="../paper-fab/paper-fab.html">
<link rel="import" href="../topeka-elements/category-icons.html">
<polymer-element name="my-element">
<template>
View MoTools.cs
public class MoUtils
{
private static readonly Random random = new Random();
public DataTable MergeDataTable(DataTable dt1, DataTable dt2)
{
DataTable dtMerged = new DataTable();
foreach (DataColumn dc in dt1.Columns)
{
dtMerged.Columns.Add(dc.ColumnName, dc.DataType);
View copyall.sh
START_DATE=`date`
SOURCE_DIR=/RMData/lbosdata/00001/
DEST_DIR=/RMData_new/lbosdata/00001/
echo "Source Dir:$SOURCE_DIR"
echo "Destination Dir:$DEST_DIR"
read -p "Press any key to continue, CTRL+C to break ..."
cd $SOURCE_DIR
DIRS=`find ./ -type d | tail -n 100 | sort`
You can’t perform that action at this time.