This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
import sys | |
import pymongo | |
from pymongo import MongoClient | |
from datetime import datetime | |
import datetime | |
import json | |
from StringIO import StringIO | |
import time | |
from datetime import date |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from datetime import datetime | |
timestamp_list = [ | |
1486137597659, | |
1486137597659 | |
] | |
for timestamp in timestamp_list: | |
print(datetime.fromtimestamp(timestamp/1000)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
DB_HOST="10.8.2.97" && \ | |
DB_NAME_EVENTS="eventsV4" && \ | |
DB_COLLECITON_NAME="eventV4" && \ | |
YEAR=$(date -d -1day '+%Y') && \ | |
MONTH=$(date -d -1day '+%m') && \ | |
DAY=$(date -d -1day '+%d') && \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# coding: utf-8 | |
# https://gist.github.com/diggzhang/37748f50be53cfdabc204dd87130b759 | |
# 回复语,在发送群邀请后会回复这个 | |
reply_text = """你好,如果您是我们歪友,欢迎加入我们歪歪群 | |
""" | |
# 45min |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.packt.chapter1 | |
import akka.actor.{Actor, ActorRef, ActorSystem, Props} | |
import scala.util.Random._ | |
/** | |
* Which contains messages to be sent to the actors. | |
* Actors will use these messages for communication. | |
*/ | |
object Messages { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.packt.chapter1 | |
import java.util.concurrent.ConcurrentLinkedQueue | |
import akka.actor.{Props, Actor, ActorSystem, ActorRef} | |
import akka.dispatch.{MailboxType, ProducesMessageQueue, Envelope, MessageQueue} | |
import com.typesafe.config.Config | |
/** | |
* Created by user | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.packt.chapter1 | |
import akka.actor.{Props, ActorSystem, Actor} | |
import akka.dispatch.{PriorityGenerator, UnboundedPriorityMailbox} | |
import com.typesafe.config.Config | |
/** | |
* Created by user | |
*/ | |
object PriorityMailBoxApp extends App { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# coding:utf-8 | |
""" | |
Monitor on the target disk | |
If disk usage out of limit bounds | |
Execute the cleanup operation | |
""" | |
import os | |
import psutil |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# jar processing manager @diggzhang20170921 | |
# */5 * * * * cd /home/master/event/ && /usr/bin/sh /home/master/event/jar_pm.sh | |
#!/usr/bin/env bash | |
# ################################################## | |
# Java Processing Manager | |
# | |
version="0.0.1" | |
author="[email protected]" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ability | |
ability_belonged | |
ability_scale | |
account | |
added_coins | |
answer | |
api | |
apk_sign | |
apk_url | |
app_duration |