安装
- npm install --global yarn
- yarn init
- yarn add eslint typescript standard --dev
- eslint --init
- 调整 tsconfig.json 和 .eslintrc.json
运行
package cloud.youxin.logserver.controller; | |
import cloud.youxin.logserver.config.SchedulerConfig; | |
import lombok.extern.slf4j.Slf4j; | |
import org.springframework.beans.factory.annotation.Autowired; | |
import org.springframework.beans.factory.annotation.Qualifier; | |
import org.springframework.boot.context.event.ApplicationReadyEvent; | |
import org.springframework.context.event.EventListener; | |
import org.springframework.data.redis.core.RedisTemplate; | |
import org.springframework.data.redis.core.script.DefaultRedisScript; |
function hex_dump (str) | |
local len = string.len( str ) | |
local dump = "" | |
local hex = "" | |
local asc = "" | |
for i = 1, len do | |
if 1 == i % 8 then | |
dump = dump .. hex .. asc .. "\n" | |
hex = string.format( "%04x: ", i - 1 ) |
package job | |
import ( | |
"fmt" | |
"git.yy.com/ihago/yalert/v2" | |
"git.yy.com/ihago/ylog" | |
"git.yy.com/ihago/ylog/zap" | |
"git.yy.com/ihago/yruntime" | |
"github.com/robfig/cron/v3" | |
"hago-room-srv-metrics2/util" |
Here's what I ended up doing - it worked perfectly. Note that I was moving from my old host (Bitbucket) to my new one (Gitlab). My comments are above the commands: | |
# First, shallow-clone the old repo to the depth we want to keep | |
git clone --depth=50 https://[email protected]/....git | |
# Go into the directory of the clone | |
cd clonedrepo | |
# Once in the clone's repo directory, remove the old origin | |
git remote remove origin |
安装
运行
var now = Math.floor(Date.now() / 1000) | |
var db = connect("10.70.0.140:10002/admin", "ikdx_admin", "vws6XGl78Q4D") | |
db = db.getSiblingDB("channel_biz") | |
var table = db.getCollection('fixed_pos_channels') | |
var cursor = table.aggregate([ | |
{"$group": {_id:"$cid", count:{$sum:1}}} | |
]) |
import sys | |
import os.path | |
import configparser | |
import mmh3 | |
import math | |
import redis | |
import time | |
import requests | |
import json |
def calc_precision_recall(recommend_method, training_data, testing_data, user_colname, item_colname, sim_matrix, top_k): | |
users_testing_and_training = list( | |
set( testing_data[user_colname].unique() ).intersection( | |
set( training_data[user_colname].unique() )) | |
) | |
hit = 0 | |
n_recall = 0 | |
n_precision = 0 | |
for user in users_testing_and_training: |
from selenium import webdriver | |
from selenium.webdriver.common.by import By | |
from selenium.webdriver.support.ui import WebDriverWait | |
from selenium.webdriver.support import expected_conditions as expect | |
from selenium.webdriver.common.keys import Keys | |
import time | |
from random import randint | |
def delay(n): |