text stringlengths 367 5.14M | id stringlengths 19 24 | metadata dict |
|---|---|---|
# encoding: utf-8
from __future__ import absolute_import, unicode_literals
from rest_framework import serializers
from apps.wechat.models import User
from apps.wechat.serializer import UserSerializer
from core import utils
from . import models
class RoomSerializer(utils.BaseSerializer):
class Meta:
mod... | train_000.parquet/600 | {
"file_path": "server/apps/meetings/serializer.py",
"repo_id": "007gzs/meeting",
"size": 1831,
"token_count": 596
} |
# encoding: utf-8
from __future__ import absolute_import, unicode_literals
import datetime
import json
from cool.views import ViewSite, CoolAPIException, ErrorCode, mixins
from cool.views.fields import SplitCharField
from rest_framework import fields
from constance import config
from django.db import transaction
from... | train_000.parquet/601 | {
"file_path": "server/apps/meetings/views.py",
"repo_id": "007gzs/meeting",
"size": 17211,
"token_count": 5542
} |
<!--components/time_table.wxml-->
<view class='time_table'>
<view class="table">
<view class='thead'>
<view class="tr">
<view class="th label" bindtap='title_label_click'>
{{title_label}}
</view>
<view class="th" wx:for="{{titles}}" wx:key="id" id="{{item.id}}" bindtap='title... | train_000.parquet/602 | {
"file_path": "miniprogram/components/time_table.wxml",
"repo_id": "007gzs/meeting",
"size": 1361,
"token_count": 510
} |
/* components/time_table.wxss */
.time_table{
height: 100%;
}
.table {
position: relative;
overflow: hidden;
width: 100%;
height: 100%;
font-size: 32rpx;
line-height: 32rpx;
border-right: 1rpx solid #ddd;
border-bottom: 1rpx solid #ddd;
}
.table .thead{
height: 48rpx;
}
.table .tbody{
position: ab... | train_000.parquet/603 | {
"file_path": "miniprogram/components/time_table.wxss",
"repo_id": "007gzs/meeting",
"size": 1441,
"token_count": 686
} |
// components/time_table.js
Component({
/**
* 组件的属性列表
*/
properties: {
no_title_desc: String,
title_label: String
},
/**
* 组件的初始数据
*/
data: {
titles: [],
labels: [],
td_data: {},
},
/**
* 组件的方法列表
*/
methods: {
set_data: function({titles, labels, td_data} = {}){... | train_000.parquet/604 | {
"file_path": "miniprogram/components/time_table.js",
"repo_id": "007gzs/meeting",
"size": 1240,
"token_count": 475
} |
// components/date_select.js
const weekStr = ['周日', '周一', '周二', '周三', '周四', '周五', '周六']
const app = getApp()
Component({
/**
* 组件的属性列表
*/
properties: {
},
/**
* 组件的初始数据
*/
data: {
start_date: '',
end_date: '',
select_date: '',
date_range: []
},
lifetimes: {
// 生命周期函数,可以为函数... | train_000.parquet/605 | {
"file_path": "miniprogram/components/date_select.js",
"repo_id": "007gzs/meeting",
"size": 2491,
"token_count": 925
} |
/*!
* WeUI v1.1.1 (https://github.com/weui/weui-wxss)
* Copyright 2017 Tencent, Inc.
* Licensed under the MIT license
*/
page{line-height:1.6;font-family:-apple-system-font,Helvetica Neue,sans-serif}icon{vertical-align:middle}.weui-cells{position:relative;margin-top:1.17647059em;background-color:#fff;line-height:1.... | train_000.parquet/606 | {
"file_path": "miniprogram/weui/weui.wxss",
"repo_id": "007gzs/meeting",
"size": 19071,
"token_count": 9496
} |
"use strict";
const request = require('./request');
const server = 'http://127.0.0.1:8000';
const ERROR_CODE = {
SUCCESS: 0, // 返回成功
ERROR_UNKNOWN: -1, // 未知错误
ERROR_SYSTEM: -2, // 系统错误
ERROR_BAD_PARAMETER: -11, // 参数错误
ERROR_BAD_FORMAT: -12, // 格式错误
ERROR_PERMISSION: -13, // 权限错误
ERR_WECHAT_LOGIN: 10001... | train_000.parquet/607 | {
"file_path": "miniprogram/utils/api.js",
"repo_id": "007gzs/meeting",
"size": 8012,
"token_count": 3282
} |
package main
import (
"GoEdgeKeyGen/third/encode"
"encoding/base64"
"encoding/json"
"fmt"
)
const (
id = "nameless"
dayFrom = "1949-10-01"
dayTo = "2077-06-04"
requestCode = ""
company = "GoEdge | 分遗产群出品"
nodes = 0
updatedAt = 1700000000
edition = "ultra"
email = ""
)
func main() {
fmt.Println("GoEdge L... | train_000.parquet/608 | {
"file_path": "main.go",
"repo_id": "007idc/GoEdgeKeyGen",
"size": 1230,
"token_count": 567
} |
"use strict";
const check_status = (start_time, end_time, now_time) => {
/**
* 0: 不在范围内
* 0x1: 第一
* 0x2: 最后
* 0x4: 中间
*/
let ret = 0
if (start_time > now_time || now_time > end_time) {
return ret
}
ret |= 0x4
if (start_time == now_time) {
ret |= 0x1
}
if (end_time == now_time) {
... | train_000.parquet/609 | {
"file_path": "miniprogram/utils/meetings.js",
"repo_id": "007gzs/meeting",
"size": 4208,
"token_count": 1561
} |
"use strict";
var defaultParseOptions = {
decodeValues: true
};
function extend(target, source) {
return Object.keys(source).reduce(function (target, key) {
target[key] = source[key];
return target;
}, target);
}
function isNonEmptyString(str) {
return typeof str === "string" && !!str.trim();
}
func... | train_000.parquet/610 | {
"file_path": "miniprogram/utils/set-cookie.js",
"repo_id": "007gzs/meeting",
"size": 4551,
"token_count": 1559
} |
"use strict";
const setCookieTool = require('./set-cookie.js');
/**
* 设置cookie 参数为字符串,
* 例如cookieA=a; expires=Tue, 14-Aug-2018 10:00:45 GMT; path=/; HttpOnly,cookieB=b; expires=Wed, 15-Aug-2018 08:00:45 GMT; path=/
*/
const setCookie = (str) => {
// 处理参数
var splitCookieHeaders = setCookieTool.splitCookiesStrin... | train_000.parquet/611 | {
"file_path": "miniprogram/utils/http-cookie.js",
"repo_id": "007gzs/meeting",
"size": 2268,
"token_count": 1097
} |
## All my scripts, tools and guides
<img src="https://hitscounter.dev/api/hit?url=https%3A%2F%2F007revad.github.io%2F&label=Visitors&icon=github&color=%23198754&message=&style=flat&tz=UTC">
#### Contents
- [Plex](#plex)
- [Synology docker](#synology-docker)
- [Synology recovery](#synology-recovery)
- [Other Synology... | train_000.parquet/612 | {
"file_path": "my-other-scripts.md",
"repo_id": "007revad/ContainerManager_for_all_armv8",
"size": 9099,
"token_count": 3421
} |
#!/usr/bin/env bash
# shellcheck disable=SC2076
#---------------------------------------------------------------------------------------
# Install Container Manager on RS819, DS119j, DS418, DS418j, DS218, DS218play and DS118
#
# Github: https://github.com/007revad/ContainerManager_for_all_armv8
# Script verified at htt... | train_000.parquet/613 | {
"file_path": "install_container_manager.sh",
"repo_id": "007revad/ContainerManager_for_all_armv8",
"size": 15615,
"token_count": 5765
} |
"use strict";
const httpCookie = require('./http-cookie.js')
let app = getApp()
const TASK_STATUS = {
INIT: -1, // 初始化
ERROR: -2, // 连接错误
CLOSE: -3, // 连接关闭
CLOSEING: -4, // 请求连接关闭中
OK: 0, // 连接成功
CONNECTING: 1, // 连接中
RECONNECTING: 3, // 请求重连中
}
const ApiViewWS = function (ws_path, common_listener) {
... | train_000.parquet/614 | {
"file_path": "miniprogram/utils/apiviewws.js",
"repo_id": "007gzs/meeting",
"size": 4493,
"token_count": 1776
} |
"use strict";
const USE_WEBSOCKET = true
const httpCookie = require('./http-cookie.js')
const ApiViewWS = require('./apiviewws.js')
let app = getApp()
let apiViewWSs = {}
const reconnectApiViews = (check_time) => {
if(!USE_WEBSOCKET){
return
}
for(let i in apiViewWSs){
apiViewWSs[i].check_and_reconnect(c... | train_000.parquet/615 | {
"file_path": "miniprogram/utils/request.js",
"repo_id": "007gzs/meeting",
"size": 3921,
"token_count": 1462
} |
"use strict";
const formatNumber = n => {
n = n.toString()
return n[1] ? n : '0' + n
}
const Time = function (hour = 0, minute = 0, second = 0) {
this.hour = hour
this.minute = minute
this.second = second
this.string = function (num = 2) {
let ret = []
if (num > 0) {
ret.push(this.hour)
}
... | train_000.parquet/616 | {
"file_path": "miniprogram/utils/time.js",
"repo_id": "007gzs/meeting",
"size": 1094,
"token_count": 447
} |
# Container Manager for all armv8
<a href="https://github.com/007revad/ContainerManager_for_all_armv8/releases"><img src="https://img.shields.io/github/release/007revad/ContainerManager_for_all_armv8.svg"></a>

Page({
/**
* 页面的初始数据
*/
data: {
room_ids: "",
loading: true,
select:{
selected: false,
click: false,
start: "",
end: "",
room: {}
}
},
date_select_change: function (e) {
this.setData({
... | train_000.parquet/620 | {
"file_path": "miniprogram/pages/meeting/reserve.js",
"repo_id": "007gzs/meeting",
"size": 6619,
"token_count": 2484
} |
package encode
import (
"fmt"
"log"
)
func Decode(data []byte) []byte {
method, err := NewMethodInstance("aes-256-cfb", "41100c93a65cfb71d5b0672c0d60d7ec", "70ba69d67bf7e61e17ac565c6093a325")
if err != nil {
fmt.Println("[MagicKeyEncode]" + err.Error())
return data
}
src, err := method.Decrypt(data)
if er... | train_000.parquet/621 | {
"file_path": "third/encode/test.go",
"repo_id": "007idc/GoEdgeKeyGen",
"size": 1156,
"token_count": 597
} |
package encode
import (
"bytes"
"crypto/aes"
"crypto/cipher"
)
type AES256CFBMethod struct {
block cipher.Block
iv []byte
}
func (a *AES256CFBMethod) Init(key, iv []byte) error {
// 判断key是否为32长度
l := len(key)
if l > 32 {
key = key[:32]
} else if l < 32 {
key = append(key, bytes.Repeat([]byte{' '}, 32... | train_000.parquet/622 | {
"file_path": "third/encode/aes-256.go",
"repo_id": "007idc/GoEdgeKeyGen",
"size": 1208,
"token_count": 598
} |
<?php
include "hc_config.php";
//////////////////////
// helper functions //
//////////////////////
function DEBUG_OUT($x) { echo "<pre>$x</pre>\n"; }
// define generic hash function (currently md5)
function hc_HashFunc($x) { return sprintf("%08x", crc32($x)); }
// convert hex numbers to decimal
function hc_HexI... | train_000.parquet/623 | {
"file_path": "hashcash.php",
"repo_id": "007/hashcash-js",
"size": 5161,
"token_count": 2248
} |
var Crc32Tab = new Array( /* CRC polynomial 0xEDB88320 */
0x00000000,0x77073096,0xEE0E612C,0x990951BA,0x076DC419,0x706AF48F,0xE963A535,0x9E6495A3,
0x0EDB8832,0x79DCB8A4,0xE0D5E91E,0x97D2D988,0x09B64C2B,0x7EB17CBD,0xE7B82D07,0x90BF1D91,
0x1DB71064,0x6AB020F2,0xF3B97148,0x84BE41DE,0x1ADAD47D,0x6DDDE4EB,0xF4D4B551,0x83D38... | train_000.parquet/624 | {
"file_path": "crc32.js",
"repo_id": "007/hashcash-js",
"size": 3525,
"token_count": 3018
} |
<wxs module="timeUtils" src="../../utils/timeUtils.wxs"></wxs>
<!--pages/meeting/detail.wxml-->
<view class="page">
<view class="page__hd">
<view class='weui-cell'>
<view class='weui-cell__bd'>
<view class="page__title">{{info.name}}</view>
<view class="page__desc">{{info.description}}</view... | train_000.parquet/625 | {
"file_path": "miniprogram/pages/meeting/detail.wxml",
"repo_id": "007gzs/meeting",
"size": 2857,
"token_count": 1051
} |
<wxs module="timeUtils" src="../../utils/timeUtils.wxs"></wxs>
<!--pages/meeting/edit.wxml-->
<view class="page">
<view class="page_bd page__bd_spacing weui-cells weui-cells_after-title">
<view class="weui-cell weui-cell_input">
<view class="weui-cell__hd">
<view class="weui-label">名称</view>
... | train_000.parquet/626 | {
"file_path": "miniprogram/pages/meeting/edit.wxml",
"repo_id": "007gzs/meeting",
"size": 1654,
"token_count": 611
} |
"use strict";
// pages/meeting/detail.js
const app = getApp()
Page({
/**
* 页面的初始数据
*/
data: {
meeting_id: 0,
owner: false,
joined: false,
attendees_show: false,
no_icon_attendee_num: 0,
info: {}
},
refresh: function () {
if (this.data.meeting_id <= 0) {
return
}
... | train_000.parquet/627 | {
"file_path": "miniprogram/pages/meeting/detail.js",
"repo_id": "007gzs/meeting",
"size": 2895,
"token_count": 1169
} |
// pages/meeting/my.js
"use strict";
const app = getApp()
Page({
/**
* 页面的初始数据
*/
data: {
loading: true
},
check_td_data: function () {
this.data.td_data = app.meetings.getTdData(
this.data.rooms,
this.data.meetings,
this.data.time_range,
{ selected: false },
this.s... | train_000.parquet/628 | {
"file_path": "miniprogram/pages/meeting/my.js",
"repo_id": "007gzs/meeting",
"size": 2097,
"token_count": 857
} |
"use strict";
// pages/meeting/edit.js
const app = getApp()
Page({
/**
* 页面的初始数据
*/
data: {
user_info: {},
meeting_id: 0,
room_id: 0,
date: "",
start_time: "",
end_time: "",
room: {},
name: "",
description: ""
},
bindKeyInput(e) {
this.data[e.currentTarget.dataset.... | train_000.parquet/629 | {
"file_path": "miniprogram/pages/meeting/edit.js",
"repo_id": "007gzs/meeting",
"size": 3207,
"token_count": 1272
} |
<wxs module="timeUtils" src="../../utils/timeUtils.wxs"></wxs>
<view class="page history">
<view class="page__hd">
<view class='weui-cell'>
<view class='weui-cell__bd'>
<view class="page__title">{{info.name}}</view>
<view class="page__desc">{{info.description}}</view>
</view>
</vie... | train_000.parquet/630 | {
"file_path": "miniprogram/pages/room/history.wxml",
"repo_id": "007gzs/meeting",
"size": 1702,
"token_count": 616
} |
"use strict";
// pages/room/history.js
const app = getApp()
Page({
/**
* 页面的初始数据
*/
data: {
room_id: 0,
info: {},
meetings: [],
history_start: '',
history_end: '',
history_limit_start: '',
history_limit_end: '',
},
refresh: function () {
app.api.api_meeting_room_info({ ro... | train_000.parquet/631 | {
"file_path": "miniprogram/pages/room/history.js",
"repo_id": "007gzs/meeting",
"size": 2456,
"token_count": 993
} |
<!--pages/room/list.wxml-->
<view class="page">
<view class="head">
<block wx:for="{{tabs}}" wx:key="*this">
<view id="{{index}}" class="weui-navbar__item {{activeIndex == index ? 'weui-bar__item_on' : ''}}" bindtap="tabClick">
<view class="weui-navbar__title">{{item}}</view>
</view>
</blo... | train_000.parquet/632 | {
"file_path": "miniprogram/pages/room/list.wxml",
"repo_id": "007gzs/meeting",
"size": 2901,
"token_count": 1039
} |
<wxs module="timeUtils" src="../../utils/timeUtils.wxs"></wxs>
<!--pages/room/detail.wxml-->
<view class="page">
<view class="page__hd">
<view class='weui-cell'>
<view class='weui-cell__bd'>
<view class="page__title">{{info.name}}</view>
<view class="page__desc">{{info.description}}</view>
... | train_000.parquet/633 | {
"file_path": "miniprogram/pages/room/detail.wxml",
"repo_id": "007gzs/meeting",
"size": 2983,
"token_count": 1120
} |
<!--pages/room/edit.wxml-->
<view class="page">
<view class="page_bd page__bd_spacing weui-cells weui-cells_after-title">
<view class="weui-cell weui-cell_input">
<view class="weui-cell__hd">
<view class="weui-label">名称</view>
</view>
<view class="weui-cell__bd">
<i... | train_000.parquet/634 | {
"file_path": "miniprogram/pages/room/edit.wxml",
"repo_id": "007gzs/meeting",
"size": 1586,
"token_count": 617
} |
"use strict";
// pages/room/detail.js
const app = getApp()
Page({
/**
* 页面的初始数据
*/
data: {
room_id: 0,
show_home: false,
owner: false,
info: {},
meetings: [],
},
refresh: function () {
app.api.api_meeting_room_info({ room_id: this.data.room_id }).then(res => {
this.setData(... | train_000.parquet/635 | {
"file_path": "miniprogram/pages/room/detail.js",
"repo_id": "007gzs/meeting",
"size": 4337,
"token_count": 1745
} |
"use strict";
// pages/room/edit.js
const app = getApp()
Page({
/**
* 页面的初始数据
*/
data: {
user_info: {},
room_id: 0,
name: "",
description: "",
create_user_manager: false
},
refreshInfo: function() {
if (this.data.room_id > 0){
app.api.api_meeting_room_info({ room_id: this.da... | train_000.parquet/636 | {
"file_path": "miniprogram/pages/room/edit.js",
"repo_id": "007gzs/meeting",
"size": 2524,
"token_count": 1009
} |
"use strict";
// pages/room/list.js
const app = getApp()
Page({
/**
* 页面的初始数据
*/
data: {
tags: ["关注", "创建", ""],
tabs: ["我关注的", "我创建的"],
activeIndex: 0,
rooms: [null, null, null],
shareSelect: []
},
refreshShareRooms: function () {
app.api.api_meeting_create_rooms().then(res => {
... | train_000.parquet/637 | {
"file_path": "miniprogram/pages/room/list.js",
"repo_id": "007gzs/meeting",
"size": 3645,
"token_count": 1481
} |
#-------------------------------------------------------------------------
# User settings config file for Plex_Server_Sync.sh
#
# https://github.com/007revad/Plex_Server_Sync
#-------------------------------------------------------------------------
# Local machine's IP or hostname and OS
# OS can be ADM, DSM6, DSM7 ... | train_000.parquet/638 | {
"file_path": "plex_server_sync.config",
"repo_id": "007revad/Plex_Server_Sync",
"size": 1910,
"token_count": 657
} |
## All my scripts, tools and guides
<img src="https://hitscounter.dev/api/hit?url=https%3A%2F%2F007revad.github.io%2F&label=Visitors&icon=github&color=%23198754&message=&style=flat&tz=UTC">
#### Contents
- [Plex](#plex)
- [Synology docker](#synology-docker)
- [Synology recovery](#synology-recovery)
- [Other Synology... | train_000.parquet/639 | {
"file_path": "my-other-scripts.md",
"repo_id": "007revad/Plex_Server_Sync",
"size": 9099,
"token_count": 3421
} |
#!/usr/bin/env bash
#-----------------------------------------------------------------------------
# Script to sync Plex server database & metadata to backup Plex server.
#
# It also syncs your settings, though you can disable this by adding the
# following to the included plex_rsync_exclude.txt
# Preferences.xml
#
# R... | train_000.parquet/640 | {
"file_path": "plex_server_sync.sh",
"repo_id": "007revad/Plex_Server_Sync",
"size": 16437,
"token_count": 6054
} |
# Plex Server Sync
Sync main Plex server database & metadata to a backup Plex server
<a href="https://github.com/007revad/Plex_Server_Sync/releases"><img src="https://img.shields.io/github/release/007revad/Plex_Server_Sync.svg"></a>
:
def get_random_string(self):
return '1234567890123456'
class CryptoTes... | train_000.parquet/648 | {
"file_path": "tests/test_crypto.py",
"repo_id": "007gzs/dingtalk-sdk",
"size": 6204,
"token_count": 2941
} |
# -*- coding: utf-8 -*-
from __future__ import absolute_import, unicode_literals
import unittest
class WeChatSessionTestCase(unittest.TestCase):
def test_dingtalk_cache(self, storage=None):
from dingtalk.storage.cache import DingTalkCache
if storage is None:
return
cache = Din... | train_000.parquet/649 | {
"file_path": "tests/test_storage.py",
"repo_id": "007gzs/dingtalk-sdk",
"size": 2583,
"token_count": 917
} |
# -*- coding: utf-8 -*-
from __future__ import absolute_import, unicode_literals
import unittest
class MessagesTestCase(unittest.TestCase):
def test_text_message(self):
from dingtalk.model.message import TextBody
msgbody = TextBody('test')
msg = msgbody.get_dict()
self.assertEqu... | train_000.parquet/650 | {
"file_path": "tests/test_message.py",
"repo_id": "007gzs/dingtalk-sdk",
"size": 5638,
"token_count": 2055
} |
# -*- coding: utf-8 -*-
from __future__ import absolute_import, unicode_literals
import logging
import time
from dingtalk.client import api
from dingtalk.client.api.taobao import TaobaoMixin
from dingtalk.client.base import BaseClient
from dingtalk.core.utils import DingTalkSigner, random_string
from dingtalk.crypto... | train_000.parquet/651 | {
"file_path": "dingtalk/client/__init__.py",
"repo_id": "007gzs/dingtalk-sdk",
"size": 5079,
"token_count": 1832
} |
# -*- coding: utf-8 -*-
from __future__ import absolute_import, unicode_literals
import logging
from dingtalk.core.utils import to_text, json_loads
from dingtalk.client import DingTalkClient
from dingtalk.client.base import BaseClient
from dingtalk.client.channel import ChannelClient
from dingtalk.core.constants impo... | train_000.parquet/652 | {
"file_path": "dingtalk/client/isv.py",
"repo_id": "007gzs/dingtalk-sdk",
"size": 8659,
"token_count": 3062
} |
# -*- coding: utf-8 -*-
from __future__ import absolute_import, unicode_literals
import logging
import time
from dingtalk.client.base import BaseClient
from dingtalk.core.utils import random_string, DingTalkSigner
from dingtalk.storage.cache import ChannelCache
logger = logging.getLogger(__name__)
class ChannelCl... | train_000.parquet/653 | {
"file_path": "dingtalk/client/channel.py",
"repo_id": "007gzs/dingtalk-sdk",
"size": 4311,
"token_count": 1519
} |
# -*- coding: utf-8 -*-
from __future__ import absolute_import, unicode_literals
import inspect
import json
import logging
import requests
import six
from six.moves.urllib.parse import urljoin
from dingtalk.client.api.base import DingTalkBaseAPI
from dingtalk.core.exceptions import DingTalkClientException
from dingta... | train_000.parquet/654 | {
"file_path": "dingtalk/client/base.py",
"repo_id": "007gzs/dingtalk-sdk",
"size": 9327,
"token_count": 3047
} |
## All my scripts, tools and guides
<img src="https://hitscounter.dev/api/hit?url=https%3A%2F%2F007revad.github.io%2F&label=Visitors&icon=github&color=%23198754&message=&style=flat&tz=UTC">
#### Contents
- [Plex](#plex)
- [Synology docker](#synology-docker)
- [Synology recovery](#synology-recovery)
- [Other Synology... | train_000.parquet/655 | {
"file_path": "my-other-scripts.md",
"repo_id": "007revad/Seagate_lowCurrentSpinup",
"size": 9099,
"token_count": 3421
} |
#!/usr/bin/env bash
#------------------------------------------------------------------------------
# Some Synology NAS and Expansion Units do not have enough power to spin-up
# multiple Seagate's 20TB and larger drives during boot-up.
#
# This script uses Seagate's openSeaChest to set your 20TB and larger
# Seagate H... | train_000.parquet/656 | {
"file_path": "seagate_lowcurrentspinup.sh",
"repo_id": "007revad/Seagate_lowCurrentSpinup",
"size": 6956,
"token_count": 2395
} |
# -*- coding: utf-8 -*-
from __future__ import absolute_import, unicode_literals
import time
import base64
import json
from dingtalk.core.exceptions import InvalidSignatureException, InvalidCorpIdOrSuiteKeyException
from dingtalk.core.utils import to_text, to_binary, DingTalkSigner, random_string
from dingtalk.crypto... | train_000.parquet/657 | {
"file_path": "dingtalk/crypto/__init__.py",
"repo_id": "007gzs/dingtalk-sdk",
"size": 3522,
"token_count": 1126
} |
# -*- coding: utf-8 -*-
from __future__ import absolute_import, unicode_literals
import struct
import socket
import base64
from dingtalk.core.utils import to_text, to_binary, random_string, byte2int
from dingtalk.crypto.pkcs7 import PKCS7Encoder
try:
from dingtalk.crypto.cryptography import DingTalkCipher
except I... | train_000.parquet/658 | {
"file_path": "dingtalk/crypto/base.py",
"repo_id": "007gzs/dingtalk-sdk",
"size": 1707,
"token_count": 601
} |
# Seagate Low Current Spinup
<a href="https://github.com/007revad/Seagate_lowCurrentSpinup/releases"><img src="https://img.shields.io/github/release/007revad/Seagate_lowCurrentSpinup.svg"></a>
:
def __init__(self, errcode, errmsg):
"""
:param errcode: Error code
:param errmsg: Error message
"""... | train_000.parquet/661 | {
"file_path": "dingtalk/core/exceptions.py",
"repo_id": "007gzs/dingtalk-sdk",
"size": 1788,
"token_count": 580
} |
# -*- coding: utf-8 -*-
from __future__ import absolute_import, unicode_literals
import hashlib
import json
import random
import string
import six
class ObjectDict(dict):
"""Makes a dictionary behave like an object, with attribute-style access.
"""
def __getattr__(self, key):
if key in self:
... | train_000.parquet/662 | {
"file_path": "dingtalk/core/utils.py",
"repo_id": "007gzs/dingtalk-sdk",
"size": 2105,
"token_count": 711
} |
# -*- coding: utf-8 -*-
from __future__ import absolute_import, unicode_literals
from dingtalk.core.utils import to_text
class BodyBase(object):
_msgtype = None
def __init__(self, **kwargs):
for k, v in kwargs.items():
if callable(v):
v = v()
setattr(self, k,... | train_000.parquet/663 | {
"file_path": "dingtalk/model/message.py",
"repo_id": "007gzs/dingtalk-sdk",
"size": 6776,
"token_count": 2524
} |
# encoding: utf-8
from __future__ import absolute_import, unicode_literals
import random
import string
class FieldBase(object):
component_name = None
def __init__(self, **kwargs):
for k, v in kwargs.items():
if callable(v):
v = v()
setattr(self, k, v)
... | train_000.parquet/664 | {
"file_path": "dingtalk/model/field.py",
"repo_id": "007gzs/dingtalk-sdk",
"size": 3578,
"token_count": 1154
} |
# -*- coding: utf-8 -*-
from __future__ import absolute_import, unicode_literals
import inspect
from dingtalk.storage import BaseStorage
def _is_cache_item(obj):
return isinstance(obj, DingTalkCacheItem)
class DingTalkCacheItem(object):
def __init__(self, cache=None, name=None):
self.cache = cach... | train_000.parquet/665 | {
"file_path": "dingtalk/storage/cache.py",
"repo_id": "007gzs/dingtalk-sdk",
"size": 1855,
"token_count": 672
} |
## All my scripts, tools and guides
<img src="https://hitscounter.dev/api/hit?url=https%3A%2F%2F007revad.github.io%2F&label=Visitors&icon=github&color=%23198754&message=&style=flat&tz=UTC">
#### Contents
- [Plex](#plex)
- [Synology docker](#synology-docker)
- [Synology recovery](#synology-recovery)
- [Other Synology... | train_000.parquet/666 | {
"file_path": "my-other-scripts.md",
"repo_id": "007revad/Synology_CPU_temperature",
"size": 9099,
"token_count": 3421
} |
#
# Automatically generated file. DO NOT EDIT.
# Espressif IoT Development Framework (ESP-IDF) 5.4.2 Project Configuration
#
CONFIG_SOC_ADC_SUPPORTED=y
CONFIG_SOC_ANA_CMPR_SUPPORTED=y
CONFIG_SOC_DEDICATED_GPIO_SUPPORTED=y
CONFIG_SOC_UART_SUPPORTED=y
CONFIG_SOC_GDMA_SUPPORTED=y
CONFIG_SOC_AHB_GDMA_SUPPORTED=y
CONFIG_SOC... | train_000.parquet/667 | {
"file_path": "sdkconfig.thatproject",
"repo_id": "0015/Grid_Board",
"size": 102472,
"token_count": 58459
} |
# -*- coding: utf-8 -*-
from __future__ import absolute_import, unicode_literals
from dingtalk.client.api.base import DingTalkBaseAPI
class TbDingDing(DingTalkBaseAPI):
"""
钉钉API
"""
def dingtalk_corp_message_corpconversation_sendmock(
self,
microapp_agent_id,
to_... | train_000.parquet/668 | {
"file_path": "dingtalk/client/api/taobao.py",
"repo_id": "007gzs/dingtalk-sdk",
"size": 3278113,
"token_count": 1276500
} |
## All my scripts, tools and guides
<img src="https://hitscounter.dev/api/hit?url=https%3A%2F%2F007revad.github.io%2F&label=Visitors&icon=github&color=%23198754&message=&style=flat&tz=UTC">
#### Contents
- [Plex](#plex)
- [Synology docker](#synology-docker)
- [Synology recovery](#synology-recovery)
- [Other Synology... | train_000.parquet/669 | {
"file_path": "my-other-scripts.md",
"repo_id": "007revad/Synology_Clear_Drive_Error",
"size": 9099,
"token_count": 3421
} |
# Synology CPU temperature
<a href="https://github.com/007revad/Synology_CPU_temperature/releases"><img src="https://img.shields.io/github/release/007revad/Synology_CPU_temperature.svg"></a>
 5.4.2 Project Configuration
#
CONFIG_SOC_ADC_SUPPORTED=y
CONFIG_SOC_ANA_CMPR_SUPPORTED=y
CONFIG_SOC_DEDICATED_GPIO_SUPPORTED=y
CONFIG_SOC_UART_SUPPORTED=y
CONFIG_SOC_GDMA_SUPPORTED=y
CONFIG_SOC_AHB_GDMA_SUPPORTED=y
CONFIG_SOC... | train_000.parquet/671 | {
"file_path": "sdkconfig",
"repo_id": "0015/Grid_Board",
"size": 102472,
"token_count": 58459
} |
#!/usr/bin/env bash
#----------------------------------------------------------
# Display CPU temperature and each core's temperature
#
# Github: https://github.com/007revad/Synology_CPU_temp
# Script verified at https://www.shellcheck.net/
#----------------------------------------------------------
scriptver="v2.3.9"... | train_000.parquet/672 | {
"file_path": "syno_cpu_temp.sh",
"repo_id": "007revad/Synology_CPU_temperature",
"size": 14153,
"token_count": 5942
} |
# How to schedule a script in Synology Task Scheduler
To schedule a script to run on your Synology at boot-up or shutdown follow these steps:
**Note:** You can setup a schedule task and leave it disabled, so it only runs when you select the task in the Task Scheduler and click on the Run button.
1. Go to **Control P... | train_000.parquet/673 | {
"file_path": "how_to_schedule.md",
"repo_id": "007revad/Synology_CPU_temperature",
"size": 1162,
"token_count": 378
} |
#!/usr/bin/env bash
#------------------------------------------------------------------------------
# Clear drive critical errors so DSM will let you use the drive
#
# GitHub: https://github.com/007revad/Synology_clear_drive_error
# Script verified at https://www.shellcheck.net/
#
# To run in a shell (replace /volume1/... | train_000.parquet/674 | {
"file_path": "syno_clear_drive_error.sh",
"repo_id": "007revad/Synology_Clear_Drive_Error",
"size": 5420,
"token_count": 2110
} |
# Synology Clear Drive Error
<a href="https://github.com/007revad/Synology_Clear_Drive_Error/releases"><img src="https://img.shields.io/github/release/007revad/Synology_Clear_Drive_Error.svg"></a>
:
def create(self, name, owner, useridlist, show_history_type=False, searchable=0,
validatio... | train_000.parquet/677 | {
"file_path": "dingtalk/client/api/chat.py",
"repo_id": "007gzs/dingtalk-sdk",
"size": 4237,
"token_count": 1700
} |
# -*- coding: utf-8 -*-
from __future__ import absolute_import, unicode_literals
from dingtalk.client.api.attendance import Attendance # NOQA
from dingtalk.client.api.blackboard import BlackBoard # NOQA
from dingtalk.client.api.bpms import Bpms # NOQA
from dingtalk.client.api.calendar import Calendar # NOQA
from d... | train_000.parquet/678 | {
"file_path": "dingtalk/client/api/__init__.py",
"repo_id": "007gzs/dingtalk-sdk",
"size": 1150,
"token_count": 367
} |
# -*- coding: utf-8 -*-
from __future__ import absolute_import, unicode_literals
import json
from optionaldict import optionaldict
from dingtalk.core.utils import to_text
from six.moves.urllib.parse import urlencode
from dingtalk.client.api.base import DingTalkBaseAPI
from dingtalk.model.message import BodyBase
c... | train_000.parquet/679 | {
"file_path": "dingtalk/client/api/message.py",
"repo_id": "007gzs/dingtalk-sdk",
"size": 7738,
"token_count": 2811
} |
# -*- coding: utf-8 -*-
from __future__ import absolute_import, unicode_literals
from dingtalk.client.api.base import DingTalkBaseAPI
class MicroApp(DingTalkBaseAPI):
def create(self, app_icon, app_name, app_desc, homepage_url, pc_homepage_url=None, omp_link=None):
"""
创建微应用
:param app_... | train_000.parquet/680 | {
"file_path": "dingtalk/client/api/microapp.py",
"repo_id": "007gzs/dingtalk-sdk",
"size": 3725,
"token_count": 1422
} |
# -*- coding: utf-8 -*-
from __future__ import absolute_import, unicode_literals
from dingtalk.client.api.base import DingTalkBaseAPI
class Department(DingTalkBaseAPI):
def list_ids(self, _id=1):
"""
获取子部门ID列表
:param _id: 父部门id(如果不传,默认部门为根部门,根部门ID为1)
:return: 子部门ID列表数据
"... | train_000.parquet/681 | {
"file_path": "dingtalk/client/api/department.py",
"repo_id": "007gzs/dingtalk-sdk",
"size": 2905,
"token_count": 1108
} |
# -*- coding: utf-8 -*-
from __future__ import absolute_import, unicode_literals
import time
import datetime
import six
from dingtalk.core.utils import to_text
from dingtalk.client.api.base import DingTalkBaseAPI
class Checkin(DingTalkBaseAPI):
def record(self, department_id, start_time, end_time, offset=0, s... | train_000.parquet/682 | {
"file_path": "dingtalk/client/api/checkin.py",
"repo_id": "007gzs/dingtalk-sdk",
"size": 2536,
"token_count": 886
} |
# -*- coding: utf-8 -*-
from __future__ import absolute_import, unicode_literals
import six
from dingtalk.core.utils import to_text, json_loads
from dingtalk.client.api.base import DingTalkBaseAPI
class Cspace(DingTalkBaseAPI):
def add_to_single_chat(self, agent_id, userid, media_id, file_name):
"""
... | train_000.parquet/683 | {
"file_path": "dingtalk/client/api/cspace.py",
"repo_id": "007gzs/dingtalk-sdk",
"size": 5144,
"token_count": 1880
} |
# encoding: utf-8
from __future__ import absolute_import, unicode_literals
import datetime
import time
from dingtalk.client.api.base import DingTalkBaseAPI
class Report(DingTalkBaseAPI):
def list(self, start_time, end_time, cursor=0, size=20, template_name='', userid=''):
"""
查询企业员工发出的日志列表
... | train_000.parquet/684 | {
"file_path": "dingtalk/client/api/report.py",
"repo_id": "007gzs/dingtalk-sdk",
"size": 3771,
"token_count": 1401
} |
# This file configures the analyzer, which statically analyzes Dart code to
# check for errors, warnings, and lints.
#
# The issues identified by the analyzer are surfaced in the UI of Dart-enabled
# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be
# invoked from the command line by running `flu... | train_000.parquet/685 | {
"file_path": "grid_board_app/analysis_options.yaml",
"repo_id": "0015/Grid_Board",
"size": 1420,
"token_count": 411
} |
# -*- coding: utf-8 -*-
from __future__ import absolute_import, unicode_literals
import datetime
import time
import six
from dingtalk.client.api.base import DingTalkBaseAPI
from dingtalk.core.utils import to_text
from optionaldict import optionaldict
class Bpms(DingTalkBaseAPI):
def process_copy(self, agent_id... | train_000.parquet/686 | {
"file_path": "dingtalk/client/api/bpms.py",
"repo_id": "007gzs/dingtalk-sdk",
"size": 8451,
"token_count": 2947
} |
# -*- coding: utf-8 -*-
from __future__ import absolute_import, unicode_literals
import time
import datetime
from dingtalk.client.api.base import DingTalkBaseAPI
class Attendance(DingTalkBaseAPI):
DATE_TIME_FORMAT = '%Y-%m-%d %H:%M:%S'
def list_record(self, user_ids, check_date_from, check_date_to):
... | train_000.parquet/687 | {
"file_path": "dingtalk/client/api/attendance.py",
"repo_id": "007gzs/dingtalk-sdk",
"size": 5160,
"token_count": 1894
} |
# This file tracks properties of this Flutter project.
# Used by Flutter tool to assess capabilities and perform upgrades etc.
#
# This file should be version controlled and should not be manually edited.
version:
revision: "d7b523b356d15fb81e7d340bbe52b47f93937323"
channel: "stable"
project_type: app
# Tracks m... | train_000.parquet/688 | {
"file_path": "grid_board_app/.metadata",
"repo_id": "0015/Grid_Board",
"size": 1114,
"token_count": 511
} |
# GRID BOARD APP
A Flutter app for sending customizable text and emoji grids via BLE (Bluetooth Low Energy) to ESP32-P4 Device.
Create, save, and reload messages in a 12×5 grid—perfect for smart displays and IoT dashboards.
---
## Features
- 12×5 customizable grid (text and emoji supported)
- Fast BLE connection ... | train_000.parquet/689 | {
"file_path": "grid_board_app/README.md",
"repo_id": "0015/Grid_Board",
"size": 2598,
"token_count": 900
} |
# encoding: utf-8
from __future__ import absolute_import, unicode_literals
import datetime
import time
from optionaldict import optionaldict
from dingtalk.client.api.base import DingTalkBaseAPI
from dingtalk.model.field import FieldBase
class WorkRecord(DingTalkBaseAPI):
def add(self, userid, create_time, tit... | train_000.parquet/690 | {
"file_path": "dingtalk/client/api/workrecord.py",
"repo_id": "007gzs/dingtalk-sdk",
"size": 7646,
"token_count": 2333
} |
# -*- coding: utf-8 -*-
from __future__ import absolute_import, unicode_literals
import six
from dingtalk.client.api.base import DingTalkBaseAPI
from dingtalk.core.utils import json_loads
class Ext(DingTalkBaseAPI):
def listlabelgroups(self, offset=0, size=100):
"""
标签列表
:param offset:... | train_000.parquet/691 | {
"file_path": "dingtalk/client/api/ext.py",
"repo_id": "007gzs/dingtalk-sdk",
"size": 2292,
"token_count": 740
} |
# -*- coding: utf-8 -*-
from __future__ import absolute_import, unicode_literals
from dingtalk.client.api.base import DingTalkBaseAPI
class Callback(DingTalkBaseAPI):
ALL_CALL_BACK_TAGS = (
'user_add_org', 'user_modify_org', 'user_leave_org', 'user_active_org',
'org_admin_add', 'org_admin_remove'... | train_000.parquet/692 | {
"file_path": "dingtalk/client/api/callback.py",
"repo_id": "007gzs/dingtalk-sdk",
"size": 2855,
"token_count": 1026
} |
#include "grid_board.hpp"
#include "esp_log.h"
#include "esp_random.h"
#include <algorithm>
#include <random>
#include <cstring>
static const char *TAG = "LVGL";
// Static character sets
const char *GridBoard::card_chars = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ.,:;!?@#$%&*()-+=/\\\"'<>[]{}|_^~ °±•…×÷−≠≤≥€£¥™®©";
const... | train_000.parquet/693 | {
"file_path": "main/grid_board.cpp",
"repo_id": "0015/Grid_Board",
"size": 16714,
"token_count": 7845
} |
#include "ble_server.h"
#include "esp_log.h"
#include "nvs_flash.h"
#include "host/util/util.h"
#include "nimble/nimble_port.h"
#include "nimble/nimble_port_freertos.h"
#include "host/ble_hs.h"
#include "services/gap/ble_svc_gap.h"
#include "services/gatt/ble_svc_gatt.h"
#include "bleprph.h"
static void (*conn_cb)(boo... | train_000.parquet/694 | {
"file_path": "main/ble_server.c",
"repo_id": "0015/Grid_Board",
"size": 2806,
"token_count": 1239
} |
# -*- coding: utf-8 -*-
from __future__ import absolute_import, unicode_literals
from dingtalk.client.api.base import DingTalkBaseAPI
class ExtContact(DingTalkBaseAPI):
def listlabelgroups(self, offset=0, size=100):
"""
获取外部联系人标签列表
:param size: 分页大小,最大100
:param offset: 偏移位置
... | train_000.parquet/695 | {
"file_path": "dingtalk/client/api/extcontact.py",
"repo_id": "007gzs/dingtalk-sdk",
"size": 4510,
"token_count": 1477
} |
# -*- coding: utf-8 -*-
from __future__ import absolute_import, unicode_literals
from dingtalk.core.utils import to_text
from dingtalk.client.api.base import DingTalkBaseAPI
class Role(DingTalkBaseAPI):
def simplelist(self, role_id, offset=0, size=20):
"""
获取角色的员工列表
:param role_id: 角色I... | train_000.parquet/696 | {
"file_path": "dingtalk/client/api/role.py",
"repo_id": "007gzs/dingtalk-sdk",
"size": 3746,
"token_count": 1287
} |
#include <assert.h>
#include <stdio.h>
#include <string.h>
#include "host/ble_hs.h"
#include "host/ble_uuid.h"
#include "services/gap/ble_svc_gap.h"
#include "services/gatt/ble_svc_gatt.h"
#include "bleprph.h"
#define MAX_GATT_VAL_SIZE 128
static uint8_t gatt_svr_chr_val[MAX_GATT_VAL_SIZE];
static uint16_t gatt_svr_c... | train_000.parquet/697 | {
"file_path": "main/gatt_svr.c",
"repo_id": "0015/Grid_Board",
"size": 3948,
"token_count": 1596
} |
# encoding: utf-8
from __future__ import absolute_import, unicode_literals
import datetime
from dingtalk.client.api.base import DingTalkBaseAPI
from dingtalk.core.utils import to_text
class Health(DingTalkBaseAPI):
def stepinfo_getuserstatus(self, userid):
"""
查询用户是否开启了钉钉运动
:param user... | train_000.parquet/698 | {
"file_path": "dingtalk/client/api/health.py",
"repo_id": "007gzs/dingtalk-sdk",
"size": 1792,
"token_count": 624
} |
# -*- coding: utf-8 -*-
from __future__ import absolute_import, unicode_literals
import datetime
import json
from optionaldict import optionaldict
from dingtalk.core.utils import to_text
from dingtalk.client.api.base import DingTalkBaseAPI
class Employeerm(DingTalkBaseAPI):
DATE_TIME_FORMAT = '%Y-%m-%d %H:%M:... | train_000.parquet/699 | {
"file_path": "dingtalk/client/api/employeerm.py",
"repo_id": "007gzs/dingtalk-sdk",
"size": 7387,
"token_count": 2784
} |