I hereby claim:
- I am ranedk on github.
- I am ranedk (https://keybase.io/ranedk) on keybase.
- I have a public key ASBsdIVuihpJFOK3jkiKBQRYIE1hVdlbjoOmrLqEJQ5GrAo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
package com.pibpl.cache | |
import com.fasterxml.jackson.databind.DeserializationFeature | |
import com.fasterxml.jackson.databind.ObjectMapper | |
import com.fasterxml.jackson.module.kotlin.KotlinModule | |
import com.pibpl.settings.ConfigManager | |
import org.springframework.stereotype.Service | |
import redis.clients.jedis.Jedis | |
import redis.clients.jedis.JedisPool | |
import redis.clients.jedis.JedisPoolConfig |
/** | |
* Created by rane on 21/11/17. | |
*/ | |
import java.io.File | |
import java.io.BufferedReader | |
import java.util.Date | |
import khronos.* | |
fun main(args: Array<String>) { | |
val bufferedReader = File("/home/rane/tmp/datafile").bufferedReader() |
import datetime | |
from collections import defaultdict | |
lines = open("sampledata", 'r').read().split("\n") | |
data = [] | |
for line in lines: | |
try: | |
ip, dt = line.split(" ") | |
except: |
"mkdir -p ~/.vim/tmp ~/.vim/backup | |
" This must be first, because it changes other options as side effect | |
" Use Vim defaults (much better!) | |
set nocompatible | |
set path=$PWD/** | |
filetype plugin indent on | |
" Switch syntax highlighting on, when the terminal has colors | |
if &t_Co > 2 || has("gui_running") |
def lock_name_to_int(lock_name): | |
"""converts lock_name into integer | |
This is needed to create a pg_advisory_lock | |
Can return negative values, but is acceptable | |
""" | |
return lock_name.__hash__() | |
def acquire_exclusive_lock(lock_name, log_after_seconds=1): | |
cursor = connection.cursor() |
#!/usr/bin/env python2 | |
# -*- coding: utf-8 -*- | |
import datetime | |
import glob | |
for i in range(10, 0, -1): | |
yy, mm, dd = (datetime.datetime.now() - datetime.timedelta(days=i)).strftime("%Y-%m-%d").split("-") | |
directory='/volume1/Ameyo_Backup/Converted_Voicelogs/localhost/%s-%s-%s' % (yy, mm, dd) | |
campaigns = glob.glob('%s/*' % directory) |