This file contains hidden or 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 bet(s, loss): | |
# s 是你的预算总额(单次 Cycle 能够接受的最大亏损) | |
# loss 是你已经连续多少次黑掉了 | |
# 返回你下一次投多少 | |
if loss >= 5: | |
print("别玩了") | |
return 0 | |
if s < 18: | |
print("钱不够") |
This file contains hidden or 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
{ | |
"uid": "xxxxx", | |
"record": [ | |
{ | |
"goalId": 7, | |
"problemId": "4727a6f8-7b42-11e7-8cac-f363d937f6c1", | |
"correctness": 1 | |
}, | |
// ... | |
] |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or 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 random | |
value = {'2':2, '3':3, '4':4, '5':5, '6':6, '7':7, '8':8, | |
'9':9, 'T':10, 'J':10, 'Q':10, 'K':10, 'A':1} | |
def check_value(cards): | |
v = sum([value[i] for i in cards]) | |
if v <= 11 and 'A' in cards: | |
v += 10 | |
return v |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or 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 pymongo import MongoClient | |
conn = MongoClient('localhost:27017') | |
questions = conn['mintNew']['questions'] | |
users = conn['mintNew']['users'] | |
repeated = [ | |
{ "_id" : "According to a survey in May, about 9.8 percent of the 93,420 graduates surveyed said they wouldn’t begin working right after graduation. This phenomenon is called “delayed employment”. One reason is that young people want to find a job that is related to their personal interests, and they are not willing to give in and take jobs they don’t like. Another reason is that some have opted to delay finding work is to avoid the fierce competition of the job market. And some Chinese college students have chosen to travel or volunteer instead of finding jobs. ", "c" : 2 }, | |
{ "_id" : "While we all try to find happiness, sometimes we still end up feeling low. While most people can control this feeling, low moods (情绪) can stay with some, leading to depression. There are three age groups that are particularly likely to develop depression. One group is t |
This file contains hidden or 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
{ | |
"_id" : ObjectId("593f412f07ebf335ddb4f541"), | |
"createdBy" : ObjectId("593cc6c40d1bce21c942712f"), //创建该题目的用户ID, ObjectId, ref: users | |
"reviewedBy" : ObjectId("593cc6e00d1bce21c9427133"), // 审核该题目的用户ID, ObjectId, ref: users,如题目未审核,则为null | |
"createdAt" : ISODate("2017-06-13T01:34:39.070Z"), // 题目创建时间,UTC, ISODate | |
"level" : "easy", //题目难度级别,String(["easy", "medium", "hard"]) | |
"status" : "published", // 题目状态,needReview - 待审核,published - 审核通过可以上线, refused - 审核拒绝, offline - 题目数据收满下线, String(["needReview", "published", "refused", "offline"]) | |
"passage" : "Action movies hav ...", // 题干,String | |
"reviewedAt" : ISODate("2017-06-13T06:30:13.121Z"), // 审核时间,ISODate | |
"question" : "Which one is true about the paragraph above?", // 问题,String |
This file contains hidden or 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 pymongo import MongoClient | |
conn = MongoClient("10.8.8.111:27017") | |
mrjing = conn["ronfedb"]["mrjing"] | |
topics = conn["onions"]["topics"] | |
class Pair(object): |
This file contains hidden or 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 pymongo import MongoClient | |
from bson.objectid import ObjectId | |
from datetime import datetime | |
db_path = "path/to/db:27017" | |
conn = MongoClient(db_path) | |
conquer_track = conn["conquerTrack"] | |
## 所有表每日全量更新 | |
## DB name: conquerTrack |