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
#include <QtGui> | |
#include <QtNetwork> | |
#include <QFileInfo> | |
#include "client.h" | |
#include <iostream> | |
using namespace std; | |
Client::Client(QWidget *parent) | |
: QDialog(parent) | |
{ |
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
#include <stdio.h> | |
#include <ti/ndk/inc/netmain.h> | |
/* BIOS6 include */ | |
#include <ti/sysbios/BIOS.h> | |
/* Platform utilities include */ | |
#include "ti/platform/platform.h" | |
#include <stdlib.h> |
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
f = open("test_7.txt",'r') | |
count_GC = 0 | |
str_ = [] | |
while 1: | |
str1 = f.readline() | |
if str1 == "": | |
print str_[-1],count_GC | |
break | |
str2 = f.readline() | |
temp1 = str2 |
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
import os | |
import socket | |
from time import sleep | |
import logging | |
from logging import StreamHandler, FileHandler | |
import sys | |
def init_logger(): | |
logger = logging.getLogger("lida") |
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
parser = argparse.ArgumentParser() | |
parser.add_argument('-f', '--folder', default = './') | |
parser.add_argument('-l', '--login', default = '') | |
parser.add_argument('-p', '--password', default = '') | |
parser.add_argument('-s', '--save', default = 'server') | |
namespace = parser.parse_args() | |
save_data = namespace.save | |
print "how save file = ", save_data | |
if save_data == "cloud": |
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 | |
from flask import Flask, request, jsonify | |
import os | |
import logging | |
app = Flask(__name__) | |
download_folder = "./download/" | |
from database import DB_CONNECTOR, ORM | |
from flask.ext.login import LoginManager | |
import flask.ext.login as flask_login |
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
import funcy | |
import requests | |
import aiohttp | |
import asyncio | |
import concurrent.futures | |
pages = ["https://yandex.ru", "https://google.com", "http://selectel.ru"] | |
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
def p(func): | |
def new_func(*args, **kwargs): | |
ret = func(*args, **kwargs) | |
print(ret) | |
return ret | |
return new_func | |
###############################33 |
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
import pytest | |
def diff(first, second): | |
len_diff = len(first) - len(second) | |
if abs(len_diff) > 1: | |
return False | |
if len_diff > 0: | |
short_str = second | |
long_str = first |
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
numbers = [2, 5, 13, 7, 6, 4] | |
size = 6 | |
sum = 0 | |
avg = 0 | |
index = 0 | |
while index < size: | |
sum = sum + numbers[index] | |
index = index + 1 | |
avg = sum/size | |
print("avg = ", avg) |
OlderNewer