Skip to content

Instantly share code, notes, and snippets.

@acanakoglu
acanakoglu / dist-play-app-initd
Last active January 26, 2017 17:42 — forked from RadoBuransky/dist-play-app-initd
Init.d shell script for Play framework distributed application. Provides start, stop, restart and status commands to control applications packaged using standard "play dist" packaging command.
#!/bin/bash
#
# =========================================================================
# Copyright 2014 Rado Buransky, Dominion Marine Media
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#!/bin/bash
rm build -R
npm install
#node ./Makefile.dryice.js full
node ./Makefile.dryice.js
rm -R /home/canakoglu/Documents/IdeaProjects/GMQL/GMQL-WEB/public/ace/src
mv build/src/ ~/Documents/IdeaProjects/GMQL/GMQL-WEB/public/ace/
import java.io._
import play.api.libs.iteratee.{Enumerator, Iteratee}
import scala.concurrent.{ExecutionContext, Future}
import ExecutionContext.Implicits.global
/**
* Created by canakoglu on /28/317.
<?xml version="1.0" encoding="ISO-8859-1" ?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="reservation_list">
<xs:complexType>
<xs:sequence>
<xs:element name="reservation" minOccurs="0" maxOccurs="unbounded">
<xs:complexType>
<xs:sequence>
<xs:element name="customer">
<xs:complexType>
import sys
from os import walk
import tqdm
from collections import defaultdict
from multiprocessing import Pool, Lock, Process
import os
import multiprocessing
import time
# defintions
@acanakoglu
acanakoglu / tmux_local_install.sh
Created May 1, 2019 16:20 — forked from ryin/tmux_local_install.sh
bash script for installing tmux without root access
#!/bin/bash
# Script for installing tmux on systems where you don't have root access.
# tmux will be installed in $HOME/local/bin.
# It's assumed that wget and a C/C++ compiler are installed.
# exit on error
set -e
TMUX_VERSION=2.9a
@acanakoglu
acanakoglu / pgadmin4 master password - MacOS
Last active November 2, 2023 17:05
How to disable master password of pgadmin4
Open file below, tested with the version 4.17 and 4.18:
/Applications/pgAdmin\ 4.app/Contents/Resources/web/config.py
and then find the line contains: "MASTER_PASSWORD_REQUIRED" and change the parameter into "False"
Note: The folder location for Windows is in the comments.
conda create -n vcm python=3.7
conda activate vcm
pip install ipykernel
python -m ipykernel install --user --name vcm
@acanakoglu
acanakoglu / run_rasa_with GPU
Created May 22, 2020 17:48
run rasa with GPU with correct cudatoolkit version
# create env
conda create -n agent python=3.7
# goto directory
cd ~/Prj/GecoBot
# installation of all the requirements, I have rasa==1.9.6,rasa-sdk==1.9.0 and their dependencies.
pip install -r requirements.txt
@acanakoglu
acanakoglu / all_flatten_view.sql
Last active November 22, 2020 19:12
ViruSurf views
-- DROP MATERIALIZED VIEW all_flatten_view;
CREATE MATERIALIZED VIEW all_flatten_view
WITH (FILLFACTOR = 100)
AS
SELECT sequence_id, accession_id, strain_name, is_reference, is_complete, strand, length, gc_percentage, n_percentage, sequencing_technology, assembly_method, coverage, sequencing_lab, submission_date, bioproject_id, database_source, taxon_id, taxon_name, species, host_taxon_name, collection_date, isolation_source, geo_group, country, region, gender, age, nucleotide_sequence, lineage, clade, host_taxon_id, originating_lab, genus, sub_family, family, equivalent_list, molecule_type, is_single_stranded, is_positive_stranded
FROM virus
NATURAL JOIN sequence
NATURAL JOIN host_sample
NATURAL JOIN host_specie
NATURAL JOIN experiment_type