连阿离职高毕业的都能刷出三十多个小号。你觉得这个题目难度是影响人们注册的理由么?
-
所有考题均标注出题人
你在黑我吗??
“2047应该热烈欢迎偏科者”
好的做题家一定是好的刷题家,做不出来换一套。
-
所有考题均标注出题人
站长,你看你这一番表演,萌妹子没来,倒是把自己人赶跑一个。
笑话里说一个人邀请别人来party,邀了四个来了三个,说一句,该来的没来。其中一个人站起来说,那我是不该来的了?于是就走了。主人叹了口气说,不该走的走了,于是第二个人说,那我是该走的了?于是也走了。主人急着挽留,说“不是说你们”,最后那个人说,那就是说我了?于是也走了。
-
vote ban (decision made
@rebecca #131485 @Wolfychan #131504 看到香港今天的厄运,我很庆幸自己从来没有移居香港的打算,庆幸啊。
-
来自锑星的问候
我亲自出道,亲自自首,亲自坐牢
-
赚钱的方法(概率论和计算机科学)
@thphd #131635 五年前我玩在线赌场时候有一个更加令人发指的bug(我认为足够开除他们码农了),你从博彩网站转钱到性感荷官在线发牌网站的时候,有一定bug发生double spending,也就是你这边钱还在,那边无中生有多出同样一笔钱。概率虽然小,但是只要你经常使用,早晚会碰到。反过来也有可能,你转出去,钱掉进黑洞里了。但是这时候你可以联系客服,客服调查转账记录就会手动恢复你的钱。但是系统出错多给钱的时候你就闷声发大财。
-
李翘楚:被连坐煽颠、指定监视居住的120天
@星火1959 #131531 不能,但是很多酷刑都是对付良心犯的,也就是说你只要向当局交认罪书就可以减轻处罚(“咬茱莉亚”--奥威尔1984)
-
赚钱的方法(概率论和计算机科学)
@品葱 #131632 是啊,到十一月中旬赌场上川普还有10%胜率。 @爱狗却养猫 #131633 这个是正式版的程序,生产力工具。
-
赚钱的方法(概率论和计算机科学)
我五年没用过了
-
赚钱的方法(概率论和计算机科学)
@thphd @libgen @爱狗却养猫 @natasha 请帮我把关于赌博程序的帖子移到树洞,谢谢,我不希望被google爬走。
-
赚钱的方法(概率论和计算机科学)
@天下无贼 #131599 我这都是中学数学,你说看不懂就不应该了吧。
好了,本期讲座“业余码农的逆袭”到此结束了。根据本人的历史经验,一天干八个小时数学期望应该有两百美元。当然前提是你有足够多的初始资金去赌场劳动。
下期预告:(没有任何注释)
28.4 v = 591; m = 6.6*10^-27; q = 3.2*10^-19; B = 0.045; Angle = 52 Degree; q*B*v/m/10^6*Sin[Angle] 1016.1 28.9 In[240]:= m = 9.11*10^-31; V1 = 1000; q = 1.6*10^-19; v = Sqrt[2 V1 q/m]; d = 0.02; V2 = 117.3; E2 = V2/d; B = E2/v*10^3 Out[247]= 0.312934 28.13 In[248]:= i = 6.6; w = 0.00015; B = 0.65; n = 8.47*10^28; q = 1.6*10^-19; i*B/n/q/w*10^6 Out[253]= 2.11039 28.24 In[254]:= m = 9.11*10^-31; V = 297.9; v = Sqrt[2 V q/m]/10^7 Out[256]= 1.02294 In[257]:= v = 1.11*10^7; B = 0.21; m*v/q/B*10^6 Out[259]= 300.955 28.5 B = {Bx, 3 Bx, 0}; v = {2, 3.5, 0}; Cross[v, B] {0., 0, 2.5 Bx} -4/2.5 -1.6 28.14 v = 5.09; v/8.5/1.2 0.49902 28.21 q = 1.6*10^-19; m = 9.11*10^-31; ke = 1200 q; r = 0.329; v = Sqrt[2 ke/m]; t = 2 Pi*r/v*10^9 100.686 28.26 mp = 1.673*10^-27; q = 1.6*10^-19; t = 223*10^-9; Pi*mp/q/t 0.147306 28.29 m = 9.11*10^-31; B = 0.3; T = 2 Pi*m/q/B; vx = 8.87*10^-6/T; F = 2*10^-15; vy = F/B/q; Sqrt[vx^2 + vy^2]/1000 85.257 29.8 R2 = 0.078; R1 = 0.0486;(*variable*) u0 = 4 Pi*10^-7; i = 0.281; -(u0*i/4/R1 - u0*i/4/R2)*10^6 -0.684656 29.11 i1 = 8.01;(*variable*) d1 = 0.75; d2 = 1.5; -i1/(d1 + d2)*d2 -5.34 29.27 i1 = 30; i2 = 40; B1 = {i1, i2}; Th = ArcTan[i2/i1]; B2 = {i2/Tan[ArcTan[i2/i1] - 36.89 Degree], i2}(*angle is variable*) {137.322, 40} 29.47 j0 = 310; a = 0.00337; 1/3*u0*j0*a/4*10^6 0.109401 29.55 n = 1000; i1 = 0.02; B1 = u0*n*i1; i2 = 6.8;(*variable*) u0*i2/2/Pi/B1*100 5.41127 28.2 In[235]:= m = 41*10^-3; q = 80*10^-6; v = 20*10^3; g = 9.8; m*g/q/v*1000 Out[239]= 251.125 q 1.6*10^-19 28.10 B = 2.5; v = 2000; ef = 5.35; (B*v + ef)*q 8.00856*10^-16 28.41 m = 0.013; L = 0.62; g = 9.81; B = 0.54; m*g/L/B 0.380914 28.56 dip = 0.15^2*Pi*2.6; Angle = 56 Degree; Sin[Angle]*dip*12 1.82836 -
如何在“直观”上的数学期望是0甚至是负的时候赚钱
正是赌21点的技巧。牌对庄家有利的时候你就不玩了睡大觉。
-
关于“为什么很少有中国男人和白人女生结婚”的问题的思考
-
赚钱的方法(概率论和计算机科学)
现在该回答丽贝卡的问题了。就我的印象而言,当赔率改变的“瞬间”(我也不知道延时是多少),下注会失败。所以要尽快下注。
赔率的统计方法是用爬虫爬sportsbookreview的网站,这个程序是五年前的,由于网站改版而失效,如果要用的话,得重新调试爬虫了。我使用python和BeautifulSoup软件包。
import urllib.request from bs4 import BeautifulSoup import re import time import datetime def to_int(s): if s=='even': return 100 elif s=='Even': return 100 elif s=='EVEN': return 100 elif s=='-': return -9999 else: try: return int(s) except TypeError: return -9999 def odds_list(url,name): rotNumber=[] moneyline=[] dic={} matchname={} gamedate={} gamehour={} #c = ntplib.NTPClient() #print(c) #response = c.request('time.nist.gov', version=3) #print(time.ctime(response.tx_time)) #url = "http://www.sportsbookreview.com/betting-odds/ufc/" page=urllib.request.urlopen(url) #print(url) soup = BeautifulSoup(page.read()) #soup = BeautifulSoup(open("./sbr_"+"mlb"+"_moneyline.html")) a=[[0 for x in range(10)] for x in range(1000)] b=[[0 for x in range(10)] for x in range(1000)] i=0 j=0 #print(a) for list in soup.find_all("div", attrs={"class": re.compile("^(eventLine-book-value)")}): for ss in list.find_all("b"): if j%2==0: a[i][j//2]=to_int(ss.string) else: b[i][j//2]=to_int(ss.string) j+=1 if j==20: j=0 i+=1 i=0 #print(a) #print(b) for list1 in soup.find_all(itemprop="name"): #print(list1) matchname[i//2]=list1 dic[i]=a[i//2] i+=1 dic[i]=b[i//2] i+=1 i=0 for list2 in soup.find_all(itemprop="startdate"): #print(list2) times=list2.attrs['content'] dates=times[0:10] #print(dates) hours=times[11:16] #print(hours) gamedate[i//2]=dates gamehour[i//2]=hours #print(gamedate[i//2]) #print(gamehour[i//2]) # print(gamedate[i//2] #dic[i]=a[i//2] #moneyline[i]=line1[i//2] i+=1 #dic[i]=b[i//2] #moneyline[i]=line2[i//2] i+=1 currenttime='{:%H:%M}'.format(datetime.datetime.time(datetime.datetime.now())) currentdate=str(datetime.date.today()) #for key in dic: # print(key,dic[key],len(dic[key]),'\n') #print(gamedate) #print(gamehour) #print(matchname) #print(currenttime) #print(currentdate) for key in dic: #print(key) #print(gamedate[key//2]) #print(gamehour[key//2]) if key%2==1: if ((dic[key][2]+dic[key-1][3]>-2 or dic[key][3]+dic[key-1][2]>-2) and (gamedate[key//2]>currentdate or (gamedate[key//2]==currentdate and gamehour[key//2]>currenttime)) and dic[key][2]!=0 and dic[key][3]!=0 ): #print((gamedate[key//2]>currentdate or (gamedate[key//2]==currentdate and gamehour[key//2]>currenttime))) print(name,matchname[key//2],dic[key][2],dic[key-1][3]) print(name,matchname[key//2],dic[key][3],dic[key-1][2]) #if max(dic[key])+max(dic[key-1])>0: #print(name,matchname[key//2],max(dic[key]),max(dic[key-1])) #print(name) def odds_list_fight(url,name): rotNumber=[] moneyline=[] dic={} matchname={} gamedate={} gamehour={} #c = ntplib.NTPClient() #print(c) #response = c.request('time.nist.gov', version=3) #print(time.ctime(response.tx_time)) #url = "http://www.sportsbookreview.com/betting-odds/ufc/" page=urllib.request.urlopen(url) #print(url) soup = BeautifulSoup(page.read()) #soup = BeautifulSoup(open("./sbr_"+"mlb"+"_moneyline.html")) a=[[0 for x in range(10)] for x in range(1000)] b=[[0 for x in range(10)] for x in range(1000)] i=0 j=0 #print(a) for list in soup.find_all("div", attrs={"class": re.compile("^(eventLine-book-value)")}): for ss in list.find_all("b"): if j%2==0: a[i][j//2]=to_int(ss.string) else: b[i][j//2]=to_int(ss.string) j+=1 if j==20: j=0 i+=1 i=0 #print(a) #print(b) for list1 in soup.find_all(itemprop="name"): #print(list1) matchname[i//2]=list1 dic[i]=a[i//2] i+=1 dic[i]=b[i//2] i+=1 i=0 #print(dic) #print(line1) #print(line2) #print(matchname) for list2 in soup.find_all(itemprop="startdate"): #print(list2) times=list2.attrs['content'] dates=times[0:10] #print(dates) hours=times[11:16] #print(hours) gamedate[i//2]=dates gamehour[i//2]=hours #dic[i]=a[i//2] #moneyline[i]=line1[i//2] i+=1 #dic[i]=b[i//2] #moneyline[i]=line2[i//2] i+=1 currenttime='{:%H:%M}'.format(datetime.datetime.time(datetime.datetime.now())) currentdate=str(datetime.date.today()) #for key in dic: # print(key,dic[key],len(dic[key]),'\n') #print(dic) #print(matchname) for key in dic: #print(key) if key%2==1: if ((dic[key][0]+dic[key-1][2]>-2 or dic[key][2]+dic[key-1][0]>-2) and (gamedate[key//2]>currentdate or (gamedate[key//2]==currentdate and gamehour[key//2]>currenttime)) and dic[key][2]!=0 ): print(name,matchname[key//2],dic[key][0],dic[key-1][2]) print(name,matchname[key//2],dic[key][2],dic[key-1][0]) #if max(dic[key])+max(dic[key-1])>0: #print(name,matchname[key//2],max(dic[key]),max(dic[key-1])) #print(name) def odds_list_spread(url,name): rotNumber=[] moneyline={} gamedate={} gamehour={} dic={} matchname={} #c = ntplib.NTPClient() #print(c) #response = c.request('time.nist.gov', version=3) #print(time.ctime(response.tx_time)) #url = "http://www.sportsbookreview.com/betting-odds/ufc/" page=urllib.request.urlopen(url) #print(url) soup = BeautifulSoup(page.read()) #soup = BeautifulSoup(open("./sbr_"+"mlb"+"_moneyline.html",encoding='utf8')) a=[[0 for x in range(10)] for x in range(1000)] b=[[0 for x in range(10)] for x in range(1000)] line1=[[0 for x in range(10)] for x in range(1000)] line2=[[0 for x in range(10)] for x in range(1000)] i=0 j=0 #print(j) for list in soup.find_all("div", attrs={"class": re.compile("^(eventLine-book-value)")}): for ss in list.find_all("b"): #print(ss) if j%2==0: if ss.string: if ss.string[0:2] == "PK": # PK (Even) #print("PK") line1[i][j//2]="PK" a[i][j//2]=to_int(ss.string[2:]) else: #print(ss.string[0:2]) line1[i][j//2]=ss.string.split('\xa0')[0] a[i][j//2]=to_int(ss.string.split('\xa0')[1]) else: if ss.string: if ss.string[0:2] == "PK": # PK (Even) #print("PK") line2[i][j//2]="PK" b[i][j//2]=to_int(ss.string[2:]) else: #print(ss.string[0:2]) line2[i][j//2]=ss.string.split('\xa0')[0] b[i][j//2]=to_int(ss.string.split('\xa0')[1]) j+=1 if j==20: j=0 i+=1 i=0 #print(line1) #print(line2) #print(a) #print(b) for list1 in soup.find_all(itemprop="name"): #print(list1) matchname[i//2]=list1 dic[i]=a[i//2] #moneyline[i]=line1[i//2] i+=1 dic[i]=b[i//2] #moneyline[i]=line2[i//2] i+=1 #for key in dic: # print(key,dic[key],len(dic[key]),'\n') i=0 #print(dic) #print(line1) #print(line2) #print(matchname) for list2 in soup.find_all(itemprop="startdate"): #print(list2) times=list2.attrs['content'] dates=times[0:10] #print(dates) hours=times[11:16] #print(hours) gamedate[i//2]=dates gamehour[i//2]=hours #dic[i]=a[i//2] #moneyline[i]=line1[i//2] i+=1 #dic[i]=b[i//2] #moneyline[i]=line2[i//2] i+=1 currenttime='{:%H:%M}'.format(datetime.datetime.time(datetime.datetime.now())) currentdate=str(datetime.date.today()) for key in dic: #print(key) if key%2==1: if 1: if ((dic[key][4]+dic[key-1][3]>-2 or dic[key][3]+dic[key-1][4]>-2) and (gamedate[key//2]>currentdate or (gamedate[key//2]==currentdate and gamehour[key//2]>currenttime)) and dic[key][3]!=0 and dic[key][4]!=0 ): print(name,matchname[key//2],dic[key][4],dic[key-1][3]) print(name,matchname[key//2],dic[key][3],dic[key-1][4]) #if max(dic[key])+max(dic[key-1])>0: #print(name,matchname[key//2],max(dic[key]),max(dic[key-1])) #print(name) def odds_list_spread_fight(url,name): rotNumber=[] moneyline=[] dic={} matchname={} #c = ntplib.NTPClient() #print(c) #response = c.request('time.nist.gov', version=3) #print(time.ctime(response.tx_time)) #url = "http://www.sportsbookreview.com/betting-odds/ufc/" page=urllib.request.urlopen(url) #print(url) soup = BeautifulSoup(page.read()) #soup = BeautifulSoup(open("./sbr_"+"mlb"+"_moneyline.html",encoding='utf8')) a=[[0 for x in range(10)] for x in range(1000)] b=[[0 for x in range(10)] for x in range(1000)] line1=[[0 for x in range(10)] for x in range(1000)] line2=[[0 for x in range(10)] for x in range(1000)] i=0 j=0 #print(j) for list in soup.find_all("div", attrs={"class": re.compile("^(eventLine-book-value)")}): #print (list) for ss in list.find_all("b"): #print(ss) if j%2==0: if ss.string: line1[i][j//2]=ss.string.split('\xa0')[0] a[i][j//2]=to_int(ss.string.split('\xa0')[1]) else: if ss.string: line2[i][j//2]=ss.string.split('\xa0')[0] b[i][j//2]=to_int(ss.string.split('\xa0')[1]) j+=1 if j==20: j=0 i+=1 i=0 #print(a) #print(b) for list1 in soup.find_all(itemprop="name"): #print(list1) matchname[i//2]=list1 dic[i]=a[i//2] #moneyline[i]=line1[i//2] i+=1 dic[i]=b[i//2] #moneyline[i]=line2[i//2] i+=1 #for key in dic: # print(key,dic[key],len(dic[key]),'\n') #print(dic) #print(line1) #print(line2) #print(matchname) #print(line1) #print(line2) for key in dic: #print(key) if key%2==1: if 1: if ((dic[key][1]+dic[key-1][3]>-2 or dic[key][3]+dic[key-1][1]>-2) and dic[key][3]!=0 and dic[key][1]!=0): print(name,matchname[key//2],dic[key][1],dic[key-1][3]) print(name,matchname[key//2],dic[key][3],dic[key-1][1]) #if max(dic[key])+max(dic[key-1])>0: #print(name,matchname[key//2],max(dic[key]),max(dic[key-1])) #print(name) while(1): odds_list("http://www.sportsbookreview.com/betting-odds/tennis/","Tennis") odds_list("http://www.sportsbookreview.com/betting-odds/nfl-football/money-line/","NFL") odds_list("http://www.sportsbookreview.com/betting-odds/nfl-football/money-line/1st-half","NFL 1st half") odds_list("http://www.sportsbookreview.com/betting-odds/nfl-football/money-line/2nd-half","NFL 2nd half") odds_list("http://www.sportsbookreview.com/betting-odds/nfl-football/money-line/1st-quarter","NFL 1st quarter") odds_list("http://www.sportsbookreview.com/betting-odds/nfl-football/money-line/2nd-quarter","NFL 2nd quarter") odds_list("http://www.sportsbookreview.com/betting-odds/nfl-football/money-line/3rd-quarter","NFL 3rd quarter") odds_list("http://www.sportsbookreview.com/betting-odds/nfl-football/money-line/4th-quarter","NFL 4th quarter") odds_list("http://www.sportsbookreview.com/betting-odds/college-football/money-line/","NCAA Football") odds_list("http://www.sportsbookreview.com/betting-odds/mlb-baseball/","MLB") odds_list("http://www.sportsbookreview.com/betting-odds/nba-basketball/money-line/","NBA") odds_list("http://www.sportsbookreview.com/betting-odds/nba-basketball/money-line/1st-half","NBA 1st half") odds_list("http://www.sportsbookreview.com/betting-odds/nba-basketball/money-line/2nd-half","NBA 2nd half") odds_list("http://www.sportsbookreview.com/betting-odds/nba-basketball/money-line/1st-quarter","NBA 1st quarter") odds_list("http://www.sportsbookreview.com/betting-odds/nba-basketball/money-line/2nd-quarter","NBA 2nd quarter") odds_list("http://www.sportsbookreview.com/betting-odds/nba-basketball/money-line/3rd-quarter","NBA 3rd quarter") odds_list("http://www.sportsbookreview.com/betting-odds/nba-basketball/money-line/4th-quarter","NBA 4th quarter") odds_list("http://www.sportsbookreview.com/betting-odds/ncaa-basketball/money-line/","NCAA Basketball") odds_list("http://www.sportsbookreview.com/betting-odds/ncaa-basketball/money-line/1st-half","NCAAB 1st half") odds_list("http://www.sportsbookreview.com/betting-odds/ncaa-basketball/money-line/2nd-half","NCAAB 2nd half") odds_list("http://www.sportsbookreview.com/betting-odds/wnba-basketball/money-line/","WNBA") odds_list("http://www.sportsbookreview.com/betting-odds/nhl-hockey/","NHL") odds_list("http://www.sportsbookreview.com/betting-odds/nhl-hockey/1st-quarter","NHL 1Q") odds_list("http://www.sportsbookreview.com/betting-odds/nhl-hockey/2nd-quarter","NHL 2Q") odds_list("http://www.sportsbookreview.com/betting-odds/nhl-hockey/3rd-quarter","NHL 3Q") odds_list_fight("http://www.sportsbookreview.com/betting-odds/boxing/","Boxing") odds_list_fight("http://www.sportsbookreview.com/betting-odds/ufc/","UFC") print('{:%H:%M}'.format(datetime.datetime.time(datetime.datetime.now()))) -
赚钱的方法(概率论和计算机科学)
现在点进去性感荷官在线发牌。妹子肯定会用各种挑逗的眼神要你下注。抵制住诱惑,等待这一局牌结束,荷官拿出一副新洗好的牌开始。你先围观一下。每当桌上出现一张牌,你就记录这张牌点数,输入到计算机程序里。大牌点变大的时候,你就可以开始赌了(注意赌场软件会自动踢出不活跃用户,所以几轮不下注你会被踢出赌桌,请以最快速度坐回去)。
软件采用蒙特卡洛方法模拟。输入me, 在输入我方和庄家点数之后,软件自动模拟三万次随机发牌,计算要牌和不要牌的数学期望 [Hit Stand],以100为注。两者皆小于50(50%)投降,要一张牌的数学期望大于100的时候加倍下注(特别是你的总和是9,10,11的时候)。对于split我没有好的算法,所以请按照常用的概率表玩。通常来说,你有两张十(含花牌)的时候对上庄家的5和6,是不建议分牌的,但是当大牌点大于一定程度的时候,分牌是有利可图的。本程序另有split功能处理此,输入split,输入我方点数00,输入庄家点数,显示的数学期望是[Stand Split]。
我举个例子吧:
please enter:66666666666666666666666666 10 A 2 3 4 5 6 7 8 9 127 32 32 32 32 32 6 32 32 31 6.4 7.2 7.2 7.2 7.2 7.2 -79.9 7.2 7.2 3.9 totla cards:388 expect_value:6.7 please enter:6555555555555555555555555555555 10 A 2 3 4 5 6 7 8 9 127 32 32 32 32 2 5 32 32 31 15.6 16.5 16.5 16.5 16.5 -92.7 -81.8 16.5 16.5 12.9 totla cards:357 expect_value:16.3 insurance OK please enter:split my cards:00 dealer cards:6 [181.6, 187.9] please enter:me my cards:03 dealer cards:3 [91.3, 69.1]在扔掉一堆小牌之后,局势对玩家有利。
假设你运气好,上桌拿了两个十,庄家还是6,你已经胜券在握了,现在测试split。结果是[181.6, 187.9],也就是你不分牌,数学期望是1.816,分牌则是1.879。 如果你上来拿了13点,庄家是三点,结果是[91.3, 69.1],也就是说如果你不要牌,数学期望是0.913,要一张牌之后数学期望是0.691 所以你不应该要牌。
这里的要牌只能要一张牌,所以当你手上牌小于9的时候,会忽略多次要牌的局势,从而得出错误的结论。所以这种情况下请闭着眼睛要牌(按照基本概率表)。
-
赚钱的方法(概率论和计算机科学)
@thphd #131587 假设牌洗的均匀。以下为程序(Python),原谅我的渣排版。如果要测试的话请注意缩进。多谢码农朋友们帮我修正排版
import random import math def total(hand): aces=hand.count(11) t = sum(hand) if t > 21 and aces > 0: while aces > 0 and t > 21: t -= 10 aces -= 1 return t ## hand=[11,11,6], total(hand) is 18 def deal(player,cards): rc=random.choice(cards) player.append(rc) cards.remove(rc) number_deck=8 a=[0,0,0,0,0,0,0,0,0,0] # cards left b=[0,0,0,0,0,0,0,0,0,0] # percentage prb=[-2,-1,1,1,2,2,2,1,0,0] # each card take away exp_value=exp=0 for x in range(10): a[int(x)]=4*number_deck a[0]=4*number_deck*4 #initialization while True: string=input("please enter:") if string=='me': #me calculate the mathematical expectation of stand or hit once, if hit once has larger than 100% exp, then player should double if they can; if both expectation below 50%, player should surrender if they can stand_or_hit=0 # stand=0 hit_once=1 compare=[0,0] my_cards=[] dealer_cards=[] my_cards_string=input("my cards:") dealer_cards_string=input("dealer cards:") for x in my_cards_string: if x>='0' and x<='9': if int(x)<2: my_cards.append(int(x)+10) else: my_cards.append(int(x)) if len(dealer_cards_string) < 2: if dealer_cards_string>='0' and dealer_cards_string<='9': if int(dealer_cards_string)<2: dealer_cards.append(int(dealer_cards_string)+10) else: dealer_cards.append(int(dealer_cards_string)) cards_ini=[] for x in range(10): for s in range(a[x]): if x<2: cards_ini.append(x+10) else: cards_ini.append(x) while stand_or_hit<=1: try_times=0 exp_return=0 while try_times<30000: my=list(my_cards) dealer=list(dealer_cards) cards=list(cards_ini) if stand_or_hit==1: deal(my,cards) deal(dealer,cards) total_dealer=total(dealer) while True: if total_dealer>=17: break else: deal(dealer,cards) total_dealer=total(dealer) total_my=total(my) if total_my>21:exp_return+=0 elif total_dealer>21: exp_return+=2 elif dealer==[10,11] or dealer==[11,10]:exp_return+=0 elif total_my>total_dealer: exp_return+=2 elif total_my==total_dealer: exp_return+=1 else: exp_return+=0 try_times+=1 compare[stand_or_hit]=round(exp_return/300,1) #bet 100, expected return stand_or_hit+=1 print(compare) if string=='split': # calculate split expectation compare=[0,0] my_cards=[] dealer_cards=[] stand_or_split=0 my_cards_string=input("my cards:") dealer_cards_string=input("dealer cards:") for x in my_cards_string: if x>='0' and x<='9': if int(x)<2: my_cards.append(int(x)+10) else: my_cards.append(int(x)) if len(dealer_cards_string) < 2: if dealer_cards_string>='0' and dealer_cards_string<='9': if int(dealer_cards_string)<2: dealer_cards.append(int(dealer_cards_string)+10) dealer_cards.append(int(dealer_cards_string)) cards_ini=[] for x in range(10): for s in range(a[x]): if x<2: cards_ini.append(x+10) else: cards_ini.append(x) try_times=0 exp_return=0 my1=[] my2=[] my1.append(my_cards[0]) my2.append(my_cards[1]) #my two hands while stand_or_split <= 1: try_times=0 exp_return=0 while try_times<30000: myhand1=list(my1) myhand2=list(my2) dealer=list(dealer_cards) cards=list(cards_ini) if stand_or_split==1: deal(myhand1,cards) deal(myhand2,cards) deal(dealer,cards) total_dealer=total(dealer) while True: if total_dealer>=17: break else: deal(dealer,cards) total_dealer=total(dealer) total_my1=total(myhand1) if total_my1>21:exp_return+=0 elif total_dealer>21: exp_return+=2 elif dealer==[10,11] or dealer==[11,10]:exp_return+=0 elif total_my1>total_dealer: exp_return+=2 elif total_my1==total_dealer: exp_return+=1 else: exp_return+=0 total_my2=total(myhand2) if total_my2>21:exp_return+=-1 elif total_dealer>21: exp_return+=1 elif dealer==[10,11] or dealer==[11,10]:exp_return+=0 #Return of split for dealer blackjack elif total_my2>total_dealer: exp_return+=1 elif total_my1==total_dealer: exp_return+=0 else: exp_return+=-1 else: total_dealer=total(dealer) while True: if total_dealer>=17: break else: deal(dealer,cards) total_dealer=total(dealer) total_my=total(my_cards)#unsplit hands if total_my>21:exp_return+=0 elif total_dealer>21: exp_return+=2 elif dealer==[10,11] or dealer==[11,10]:exp_return+=0 elif total_my>total_dealer: exp_return+=2 elif total_my==total_dealer: exp_return+=1 else: exp_return+=0 try_times+=1 compare[stand_or_split]=round(exp_return/300,1) #bet 100, expected return stand_or_split+=1 print(compare) #bet 100, expected return elif string>='a' and string<='z': # to exit, press a nonletter. for example "/" pass else: for x in string: if x<='9' and x>='0': a[int(x)]=a[int(x)]-1 exp+=prb[int(x)] for x in range(10): b[int(x)]=round(100*a[int(x)]/sum(a)*13-100,1) b[0]=round(100/4*a[0]/sum(a)*13-100,1) n=2 stt='10'+'\t'+'A'+'\t' while n<10: stt=stt+str(n)+'\t' n+=1 print(stt) n=0 stt='' while n<10: stt=stt+str(a[n])+'\t' n+=1 print(stt) n=0 stt='' while n<10: stt=stt+str(b[n])+'\t' n+=1 exp_value=round(exp*52/sum(a),1) print(stt) print("totla cards:"+str(sum(a))+' '+"expect_value:"+str(exp_value)) if b[0]>8.3: print("insurance OK") -
“帮亲不帮理”和“帮理不帮亲”的界限在哪里?
如果扔隔壁迷雾通论坛请金大大指点,多半告诉你要信基督教。那么不管是亲还是理,都在圣经的指导下有条不紊地占据着宇宙的不同空间,你就只要循道即可。
当然我不是基督徒,但是如上的回答给了我们一个思路,就是道德标准。先要有一个道德标准,才能回答如上的问题。比如我就是个人主义者,所以我的道德标准以最大化个人自由为己任。所以当亲人威胁我或者他人的个人自由的时候我就反对亲人,当社会道德威胁我或者他人的个人自由的时候我就反对社会道德,当法律威胁自由的时候我们就转入地下干违法的勾当。这就是在某种道德规范下的行为。
-
从品X过来的
@NullPointer #130863 “中国”不值得拯救,中国人还可以抢救一下。
另外,空指针要先强制转换类别之后才能引用吧。
-
关于“为什么很少有中国男人和白人女生结婚”的问题的思考
@丁丁兄弟 #131556 你看看外嫁的中国女生的外国伴侣就好了
@natasha #131552 “接师妹会降低MPG”参考文献:
发信人: IcyLi (IcyLi), 信区: Automobile
就接过一次,接完师妹,一夜没睡,身体疲惫。听我如下分解:
长话短说,去机场接到师妹后,上车回学校。
路上,师妹说“你的车很安静啊,你开得也很稳”
我说:“咱这是正牌车,超过100马力,超保值,再说咱技术也是一流”
师妹:“一加仑能跑多远啊?”
我本来开车很节省,转速大都保持在2k rpm,高速能跑40mpg,但怕说出来让师妹觉得WS,就说:“高速30,local 25”
哪知师妹接了一句:“我看你油门踩得轻,又始终在限速下,都是别人超你,30太低了,不是车坏了吧”
我心里一紧:“介个妹纸还很懂”。随应付道:“这不是刚上高速嘛,速度快了怕你吃不消。你刚下飞机,我才尽量温柔一些,弄得太猛怕你太多了,把车座弄脏一大片”
不过既然话说出去了,也只能硬着头皮加速了。一咬牙,把我9年新的车提到近3k rpm,速度提到限速70 mph,对师妹说:“刚才没真正开起来,现在这才是我真实的彪悍开车风格呀”。怕师妹小看了我,又说:“我每逢周末都开车出去转一转,不是为了买菜,也不是为了街边找床垫,就是joy ride,没事飚飚车还是很爽的”
师妹似乎很吃惊,又好象很羡慕的样子,望了我好几眼。
还好,因为有师妹在车上,车在70mph一点儿也不飘。这种厚重感很让我欣慰、很有面子。
快要下高速了,我已早早的换到最右边的lane(道)上。当时是rush hour(高峰时段),很多车要下高速。这时,一辆豪华小跑来到了我的左侧,发动机非常拉轰地响着,打灯要插到我得前面。师妹的注意力也被吸引了过去。我心里非常的不高兴,心道:“坐我的正牌车,却盯上了别人的小跑”。人活一口气,我偏不让你插进来。于是,牙咬得更紧,狠心地又深踩了油门,紧紧跟住前面的车。小跑无奈,只好减速从我后面并入。我强作镇静,自豪地对师妹说:“那个小跑别看长得花哨,还不是照样败在我的手下。再瞧咱这正牌车,简约但不简单,北美成功人士的不二选择!”
师妹似乎更加吃惊了,又用她那充满羡慕的眼神多望了我好几眼。
一路无话,把师妹送到了学校附近。师妹说已找好apt(租室),让我直接开到她的apt就好。我心里暗暗地骂了句:“泥马,真不走运”。不瞒各位,我已经设制好了一套完美的“师妹没地方住、我带师妹去我家”的美好计划,而且我早已在我捡来的沙发上放满了仙人球,但却把我那不大不小的床打理得整整齐齐,营造出一个“除了两人都在床上别无其它选择”的局面。同时我还把浴室的拉帘换成了透明塑料的,还在浴室里安放了一个手机,准备等师妹洗澡时拨打那个手机,借机进入浴室,一览春色。只可惜,这一整套计划现在都成了泡影。
到了师妹的apt,并帮着把行李搬进去。有心约师妹去买菜,可不知为什么,内心深处某种莫名的念头制止了我,怅怅然地和师妹告别回家了。
回到自己的宿舍,躺在床上,让自己那由于70mph高速飙车而狂跳的心脏逐渐平息下来,自己的虚荣心开始正视现实。留在我内心的,却是无比的伤痛。接这个师妹一次,我的overall average mpg(总平均英里每加仑)一定降了好多,发动机的寿命一定也降了好多,油费也多了好多。更主要的,是担心我心爱的9年新的车 resale value(转售价值)会受影响。
在那次接师妹之前,我开车总是保持55到60mph的速度,无论限速是多少,因为网上说这个速度最省油。还有,我从来不和别人抢路,费油不说,万一别的车上有枪怎么办?可是…可是今天,由于接师妹的缘故,多年修持的两条戒律就这么破了。真是后怕呀,万一车在70mph的速度飘起来、或者万一那个小跑司机有枪,我的小命就栽在接师妹回家的路上了,后怕ing。
一夜没睡。
第二天,痛定思痛,决定再也不接师妹了。
我知道,只要不接师妹,我的overall average mpg最终还会上升到40 mpg,一切还会变得美好。想到这里,我的心中立即充满了光明。
开着心爱的正牌车、迎着朝阳行驶在上学的路上,我唱起了歌。
-
逻辑谬误
@MasterChief #131503 我没有那么高的智商,强行超频会导致大脑故障
-
李翘楚:被连坐煽颠、指定监视居住的120天
@rebecca #131365 所以我只能对这些烈士们说好自为之了。
我的目标受众不是烈士,而是理性人假说的理性人。
-
逻辑谬误
@MasterChief #131480 抱歉,我的智商余额不足,请充值。
-
一带一路大撒币其实是沉船计划的一部分?(转发)
@MasterChief #131437 可是放在老朋友那里,老朋友的命还不一定有中共长呢?
-
一带一路大撒币其实是沉船计划的一部分?(转发)
为何要转移到那些穷且不稳定的国家?转到美日欧不香么?
-
China has many Mandelas, but it just lacks De Klerk.
@NullPointer #131424 其实苏联最后的公投恰恰反映了民主的一个基本缺陷。人们对民主的期望就是又要马跑又要马不吃草,怎么可能。苏联最后一年,人民对苏联的期望就是计划经济管饱,市场经济管好,国家和平不用武,庞大的军工集团生产的军火全部囤起来或者卖给外国。国家又要强大的保护他们不受外来势力入侵,又要弱小到根本不去镇压他们的诉求。
91年的苏联人民不希望苏联解体,希望苏联成为一个不威权的邦联。还是波罗的海三国人看得实在。就算承担一个民族国家的责任,那也要独立。
-
China has many Mandelas, but it just lacks De Klerk.
@NullPointer #131388 那是现在的中国,苏联有戈尔巴乔夫。
-
China has many Mandelas, but it just lacks De Klerk.
@陈士杰 #131409 这么经典的段子我当然要复制下来做成meme
另外你可以在推特上实名宣传2047(但是不要派发邀请码)
-
【IYP】如何说服人们参加抗议活动
我唯一不好参加抗议活动的原因就是我怕死,中国威胁论