#!/usr/bin/env python # Copyright 2016 Google Inc. All Rights Reserved. # # 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…
    https://github.com/chenghuige/tensorflow-exp/blob/master/examples/sparse-tensor-classification/     tensorflow-exp/example/sparse-tensor-classification/train-validate.py 当你需要train的过程中validate的时候,如果用placeholder来接收输入数据 那么一个compute graph可以完成这个任务.如果你…
所选项目名称:文本替换      结对人:曲承玉 github地址 :https://github.com/bxoing1994/test/blob/master/源代码 结对人github地址:https://github.com/quchengyu/jiedui/tree/quchengyu-patch-1 用一个新字符串替换文本文件中所有出现每个字符串的地方.文件名和字符串都作为命令行参数进行传递.给出相应的测试文件和测试字符串. 项目设计方案        一起选定项目敲定大体结构后,我…
# -*- coding: utf-8 -*- import time from threading import Lock, RLock from datetime import datetime from threading import Thread import threading class Test: def __init__(self): self.obj_lock = Lock() self.obj_rlock = RLock() self.a = 1 self.b = 2 se…
https://github.com/golang/crypto/blob/master/bcrypt/bcrypt.go…
# Python implementation of the MySQL client-server protocol # http://dev.mysql.com/doc/internals/en/client-server-protocol.html # Error codes: # http://dev.mysql.com/doc/refman/5.5/en/error-messages-client.html from __future__ import print_function f…
<?php   $serv = new swoole_server("0.0.0.0", 9508);   $serv->set(['worker_num'=>1, 'task_worker_num'=>5]);   function onReceive($serv, $fd, $from_id, $data)   {   $sql = $data;   $result = $serv->taskwait($sql);   if($result !== f…
1. 什么是 GC,有什么作用? GC,全称 Garbage Collection,即垃圾回收,是一种自动内存管理的机制. 当程序向操作系统申请的内存不再需要时,垃圾回收主动将其回收并供其他代码进行内存申请时候复用,或者将其归还给操作系统,这种针对内存级别资源的自动回收过程,即为垃圾回收.而负责垃圾回收的程序组件,即为垃圾回收器. 垃圾回收其实一个完美的 "Simplicity is Complicated" 的例子.一方面,程序员受益于 GC,无需操心.也不再需要对内存进行手动的申请…
参考官方仓库:https://github.com/tensorflow/models/tree/master/official/utils/flags 测试Demo代码如下: from absl import app as absl_app from absl import flags from official.utils.flags import core as flags_core flags.DEFINE_string(name="my_flag_a", default=&q…
参考:https://www.jianshu.com/p/1ed2d9ce6a88 安装 安装conda+tensorflow库 下载protoc linux x64版,https://github.com/protocolbuffers/protobuf/releases 将下载的zip文件,进入解压后的文件,将里面的bin/protoc文件复制到/usr/bin/protoc sudo cp bin/protoc /usr/bin/protoc 下载models仓库 git clone ht…