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
0xDb49F1895F1b2232194cC2aa30dF68956389E60d |
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
9d4cd6f0336f050841ac63230fb6be438f1bfa28 |
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 django.db import transaction, load_backend | |
from testdjango import settings | |
from sqlalchemy import pool | |
pool_initialized = False | |
class hashabledict(dict): | |
def __hash__(self): | |
return hash(tuple(sorted(self.items()))) | |
class hashablelist(list): |
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
data = file("test_train") | |
relevance_file = file("train_relevance","w") | |
def dwell_to_relevance(time): | |
if time < 50: | |
return 0 | |
elif 50 <= time <=399: | |
return 1 | |
else: | |
return 2 |
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
4556 5092 0.7 | |
4556 4785 0.75 | |
4556 5397 0.7 | |
4556 5139 0.75 | |
4556 5937 0.833333333 | |
4556 6220 0.7 | |
4559 4563 0.75 | |
4559 4770 0.75 | |
4559 4837 0.75 | |
4559 5640 0.75 |
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
4556 5092 0.7000 | |
4556 4785 0.7500 | |
4556 5397 0.7000 | |
4556 5139 0.7500 | |
4556 5937 0.8333 | |
4556 6220 0.7000 | |
4556 5139 0.7500 | |
4556 6220 0.7063 | |
4559 4563 0.7500 | |
4559 4770 0.7500 |
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/expect -f | |
# ./ssh.exp password 192.168.1.11 id | |
set name [lrange $argv 2 2] | |
set server [lrange $argv 1 1] | |
set pass [lrange $argv 0 0] | |
spawn ssh $name@$server | |
match_max 100000 | |
expect "*?assword:*" | |
send -- "$pass\r" |
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
# | |
# author: Xu Xiaodong <xxdlhy@gmail.com> | |
# modified: 2012 Apr 16 | |
# | |
#-- base --# | |
unbind C-b | |
set -g prefix C-q | |
set -g default-terminal "screen-256color" |
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 requests | |
from threading import Thread | |
import Queue | |
import httpsqs | |
import os | |
#gevent_profiler.print_percentages(True) | |
#gevent_profiler.time_blocking(True) | |
#gevent_profiler.set_stats_output('my-stats.txt') |
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
┌─(young001@young001-HP-Elite-7100-Microtower-PC:pts/8)────────────────(/run/mysqld)─┐ | |
└─(22:12:%)── sudo dpkg --configure mysql-server-5.5 ──(六,10月20)─┘ | |
[sudo] password for young001: | |
Setting up mysql-server-5.5 (5.5.24-0ubuntu0.12.04.1) ... | |
start: Job failed to start | |
invoke-rc.d: initscript mysql, action "start" failed. | |
dpkg: error processing mysql-server-5.5 (--configure): | |
subprocess installed post-installation script returned error exit status 1 | |
Errors were encountered while processing: | |
mysql-server-5.5 |
NewerOlder