anonymous No title
Python
<!DOCTYPE html>
<html lang="ja">

<head>

  <meta charset="UTF-8">
  <title>練習2the hiatus</title>
<link rel="stylesheet" href="css/styles.css">

<link rel="stylesheet" href="./css/slick.css">
<link rel="stylesheet" href="./css/slick-theme.css">
<link href="https://fonts.googleapis.com/css?family=Amiri:700i|Noto+Sans+JP:500|Overpass+Mono:300,400|Overpass:300,400,700&amp;subset=japanese" rel="stylesheet">
<!-- /css -->
<!-- js -->
<script src="https://thehiatus.com/js/jquery-1.11.1.min.js"></script>
<script src="https://thehiatus.com/js/jquery.flexslider.js"></script>
<!-- <script src="https://thehiatus.com/js/default.js"></script>
<script src="https://thehiatus.com/js/slick.min.js"></script>
<script src="https://thehiatus.com/js/jquery.bxslider.js"></script>
<script src="./js/modal.js"></script>
<script src="https://thehiatus.com/js/ua.js"></script>
<script src="https://thehiatus.com/js/conf.js"></script>
<script src="https://thehiatus.com/js/aip.js"></script> -->
<script src="https://thehiatus.com/js/index.js"></script>

</head>
	<body id="body" class="firstview">
		<div id="wrapper" class="top">
			<header id="header">
				<div id="headerIn">
					<h1><a href="#"><img src="https://thehiatus.com/img/common/logo.png" width="180" alt="the HIATUS"></a></h1>
					<nav>
						<ul>
							<li><a href="https://thehiatus.com/">TOP</a></li>
							<li><a href="https://thehiatus.com/./news/">NEWS</a></li>
							<li><a href="https://thehiatus.com/./media/">MEDIA</a></li>
							<li><a href="https://thehiatus.com/./live/">LIVE</a></li>
							<li><a href="https://thehiatus.com/./biography/">BIOGRAPHY</a></li>
							<li><a href="https://thehiatus.com/./discography/">DISCOGRAPHY</a></li>
							<li><a href="https://thehiatus.com/./gallery/">VIDEO</a></li>
							<li class="last"><a href="https://www.official-store.jp/thehiatus/" target="_blank">STORE</a></li>
						</ul>
					</nav>
				</div>
			</header>
			<section id="feature" style="opacity: 1;">
				<!-- <div id="slider" class="slider">
					<ul class="slides slick-initialized slick-slider">
											<div class="slick-list draggable">
												<div class="slick-track" style="opacity: 1; width: 3920px;">
													<li class="slide001 slick-slide" data-slick-index="0" aria-hidden="true" style="width: 980px; position: relative; left: 0px; top: 0px; z-index: 998; opacity: 1; transition: opacity 3000ms ease 0s;">
														<a href="news/index.html">
															<div class="videologo">
															
																												
																<img src="https://thehiatus.com/img/top/slide_logo.svg">
															</div>
															<video id="player" autoplay="" loop="" muted="" playsinline="" width="100%">
																<source src="https://thehiatus.com/img/top/main.mp4">
															</video>
														</a>
													</li>
													<li class="slide002 slick-slide" data-slick-index="1" aria-hidden="true" style="width: 980px; position: relative; left: -980px; top: 0px; z-index: 998; opacity: 0; transition: opacity 3000ms ease 0s;">
														<a href="https://thehiatus.com/biography/index.html"></a>
													</li>
													<li class="slide004 slick-slide" data-slick-index="2" aria-hidden="true" style="width: 980px; position: relative; left: -1960px; top: 0px; z-index: 998; opacity: 0; transition: opacity 3000ms ease 0s;">
														<a href="https://sp.universal-music.co.jp/the-hiatus/10th/" target="_brank">
														</a>
													</li>
													<li class="slide003 slick-slide slick-current slick-active" data-slick-index="3" aria-hidden="false" style="width: 980px; position: relative; left: -2940px; top: 0px; z-index: 1000; opacity: 0; transition: opacity 3000ms ease 0s;">
														<a href="live/index.html">
														</a>
													</li>
												</div>
											</div>
											
											
											
					</ul>
				</div> -->
				<div class="contents">
								
					<p><img src="img/biography_bg.jpg" width="1128" alt="the HIATUS"></p>
				
				</div>
			</section>
					<!-- main -->
			<main class=" clearfix" style="opacity: 1;">
				<section class="newsInfo clearfix mb80" style="opacity: 1;">
					<div class="newsTop contsHead" id="newsBox">
						<div class="latestnews_inner">
							<h2 class="titles">LATEST NEWS</h2>
							<p class="links hover"><a href="https://thehiatus.com/news/">All</a></p>
							<img src="https://thehiatus.com/img/top/latest-news-img.jpg" width="304" alt="アーティスト写真">
						</div>
						<ul class="newsMain">
							<li class="hover">
								<p class="nbl"><span class="day">2021.04.22</span></p>
								<p class="nbr">
									<span class="ntext"><a href="https://thehiatus.com/news/">三吉ツカサ氏撮影 the HIATUS新作写真集発売決定!</a></span>
									<span class="ntextSub">カメラマン三吉ツカサ氏撮影による、2020年のthe HIATUSを収めた新作写真集の発売が決定!the HIATUS 新作写真集 上下巻セット「...</span>
								</p>
							</li>
							<li class="hover">
								<p class="nbl"><span class="day">2020.12.24</span></p>
								<p class="nbr">
									<span class="ntext"><a style="opacity:1;" href="./news/">「Jive Turkey vol.5」生配信ライブ アーカイブ期間延長のお知らせ</a></span>
									<span class="ntextSub">「Jive Turkey vol.5」12/23 (水) ブルーノート東京 2ndショウ生配信ライブにつきまして、一部のお客様に映像や音声が途切れると...</span>
								</p>
							</li>
							<li class="hover last">
								<p class="nbl"><span class="day">2020.12.21</span></p>
								<p class="nbr">
									<span class="ntext"><a href="https://thehiatus.com/news/">「COUNTDOWN JAPAN 20/21」中止のお知らせ</a></span>
									<span class="ntextSub">12/31に出演を予定しておりました「COUNTDOWN JAPAN 20/21」は、開催中止となりました。詳細はイベントオフィシャルサイトをご確...</span>
								</p>
							</li>
						</ul>
					</div>
					<div class="info contsHead">
						<div class="liveinfo_inner">
							<h2 class="titles">LIVE INFO</h2>
							<p class="links hover"><a href="./live/">All</a></p>
						</div>
						<ul class="liveInfo" id="liveBox">
							<li>
							<a href="https://thehiatus.com/live/?y=2021&amp;m=8">
								<p class="day01"><span class="month">08	</span>
									<span class="day">07</span>
								</p>
								<p class="day02">
									<span class="year">2021</span>
									<span class="week">SAT</span>
								</p>
								<p class="mainText">
									<i>ROCK IN JAPAN FESTIVAL 2021</i>
								</p>
								<p class="subText mb5">
									<span>2021/08/07(土) 国営ひたち海浜公園</span>
									<span>Open 8:00 / Start 12:00</span>
								</p>
							</a>
							</li>
						</ul>
					</div>
				</section>
				<section class="pv">
					<div class="pv_inner">
						<iframe width="595" height="325" src="https://www.youtube.com/embed/ELVIZiXwe98" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen=""></iframe>
							<iframe width="595" height="325" src="https://www.youtube.com/embed/ELVIZiXwe98" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen="">
							</iframe>
							<div class="pv_description">
									<h2>LATEST VIDEOS</h2>
									<p>the HIATUS - Regrets(Music Video)</p>
									<div class="pv_a_inner">
											<a href="https://thehiatus.com/gallery/">
												All
											</a>
									</div>
							</div>
					</div>
			</section>
			<div class="banner_erea">
				<a href="https://sp.universal-music.co.jp/the-hiatus/10th/" target="_blank"><img src="https://thehiatus.com/img/top/top_banner.jpg" width="980" alt="">
				</a>
		</div>
		<section class="timeLine clearfix" style="opacity: 1;">
			<div class="fbTime">
									<iframe src="https://www.facebook.com/plugins/page.php?href=https%3A%2F%2Fwww.facebook.com%2Fthehiatus.jp&tabs=timeline&width=465&height=530&small_header=true&adapt_container_width=true&hide_cover=true&show_facepile=false&appId=567173303304701" width="465" height="530" style="border:none;overflow:hidden" scrolling="no" frameborder="0" allowtransparency="true" allow="encrypted-media">
									</iframe>
			</div>
			<div class="twTime">
				<a class="twitter-timeline" data-width="450" data-height="907" href="https://twitter.com/theHIATUS_offic?ref_src=twsrc%5Etfw">Tweets by theHIATUS_offic</a> <script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>
			</div>
		</section>
					<div class="pagetop_inner">
						<a href="#"><img src="https://thehiatus.com/img/common/pagetop.png" width="11" alt="pagetop"></a>
					</div>
			</main>
			<!-- /main -->
			<footer id="footer">
				<div class="footer_inner">
						<a href="file:///C:/Users/3054m/Desktop/web%E7%B7%B4%E7%BF%92/%E7%B7%B4%E7%BF%922the%20hiatus/thehiatus/second.html" target="_blank"><img src="https://thehiatus.com/img/common/logo.png" width="180" alt="the HIATUS"></a>
						<ul class="footer_li">
								<li><a href="https://thehiatus.com/">TOP</a></li>
								<li><a href="https://thehiatus.com/news/">NEWS</a></li>
								<li><a href="https://thehiatus.com/media/">MEDIA</a></li>
								<li><a href="https://thehiatus.com/live/">LIVE</a></li>
								<li><a href="https://thehiatus.com/biography/">BIOGRAPHY</a></li>
								<li><a href="https://thehiatus.com/discography/">DISCOGRAPHY</a></li>
								<li><a href="https://thehiatus.com/gallery/">VIDEO</a></li>
								<li class="last"><a href="https://www.official-store.jp/thehiatus/" target="_blank">STORE</a></li>
						</ul>
				</div>
				<div class="footer_inner">
						<p>
							<small>Copyright © the HIATUS.</small>
						</p>
						<ul class="footer_icon">
								<li><a href="https://twitter.com/thehiatus_offic" target="_blank"><img src="https://thehiatus.com/img/common/footer_icon_twitter.png" width="18" alt="Twitter"></a></li>
								<li><a href="https://www.facebook.com/thehiatus.jp" target="_blank"><img src="https://thehiatus.com/img/common/footer_icon_insta.png" 
anonymous No title
Python
11. 〒105-0022 東京都港区海岸1丁目
12.3か月先のヴァイオリンのコンサートチケットを¥5000
で購入した。
商品に関するご質問は、お気軽に最寄りの支店・営業所
問合せください。
14. 次の休日は、友達とドライブに行く約束をしている。
15.表計算ソフトである Excelの基本操作を学習するには、『Excel
基礎』のテキストが分かりやすいと評判である。
16. ゴルフ場を選ぶ基準は、ホール数・距離(ヤード)・パーの数
などがあります。例えば、18H(=ホール)、6,577Y(ヤー
ド)、P(=パー)72のように表示されます。
17. 来週の日曜日から駅前のショップでバーゲンが開催され、全
品50%OFF(半額)のSALEということである。
anonymous No title
Python
#!python3

'''
This script implements a simple calculator in the Today widget.

You can toggle between two different button layouts (compact/expanded) using the widget's
built-in "Show More/Less" button. This is accomplished by overriding the `ui.View.layout`
method in the `CalcView` class.
'''

import appex, ui
import console
import os

op_symbols = ('+', '\u2212', '\u00F7', '\u00D7')
operators = {'+': '+', '\u2212': '-', '\u00F7': '/', '\u00D7': '*'}

class CalcView (ui.View):
	def __init__(self, *args, **kwargs):
		super().__init__(self, *args, **kwargs)
		self.shows_result = False
		self.bounds = (0, 0, 400, 200)
		button_style = {'background_color': (0, 0, 0, 0.05), 'tint_color': 'black', 'font': ('HelveticaNeue-Light', 24), 'corner_radius': 3}
		self.number_buttons = [ui.Button(title=str(i), action=self.button_tapped, **button_style) for i in range(10)]
		self.op_buttons = [ui.Button(title=s, action=self.button_tapped, **button_style) for s in op_symbols]
		self.ac_button = ui.Button(title='AC', action=self.button_tapped, **button_style)
		self.ac_button.tint_color = 'red'
		self.add_subview(self.ac_button)
		self.c_button = ui.Button(title='C', action=self.button_tapped, **button_style)
		self.c_button.tint_color = 'red'
		self.add_subview(self.c_button)
		self.eq_button = ui.Button(title='=', action=self.button_tapped, **button_style)
		self.add_subview(self.eq_button)
		self.dot_button = ui.Button(title='.', action=self.button_tapped, **button_style)
		self.add_subview(self.dot_button)
		for b in self.number_buttons + self.op_buttons:
			self.add_subview(b)
		self.display_view = ui.View(background_color=(.54, .94, 1.0, 0.2))
		self.display_label = ui.Label(frame=self.display_view.bounds.inset(0, 8), flex='wh', text='0', alignment=ui.ALIGN_RIGHT)
		self.display_label.font = ('HelveticaNeue-Light', 32)
		self.display_view.add_subview(self.display_label)
		self.add_subview(self.display_view)
	
	def layout(self):
		compact = self.height < 150
		bw = self.width / 10 if compact else self.width / 5
		bh = self.height / 3 if compact else self.height / 5
		for i, b in enumerate(self.number_buttons):
			if compact:
				frame = ui.Rect(((i - 1) % 10) * bw, bh, bw, bh)
			else:
				frame = ui.Rect(max(i-1, 0) % 3 * bw, 3 * bh - (i-1) // 3 * bh, bw, bh)
			b.frame = frame.inset(1, 1)
		for i, b in enumerate(self.op_buttons):
			if compact:
				frame = ui.Rect((4 + i) * bw, 2 * bh, bw, bh)
			else:
				frame = ui.Rect((3 + i % 2) * bw, (2 + i//2) * bh, bw, bh)
			b.frame = frame.inset(1, 1)
		if compact:
			self.ac_button.frame = ui.Rect(0, 2 * bh, 2 * bw, bh).inset(1, 1)
			self.c_button.frame = ui.Rect(2 * bw, 2 * bh, bw, bh).inset(1, 1)
			self.eq_button.frame = ui.Rect(8 * bw, 2 * bh, 2*bw, bh).inset(1, 1)
			self.dot_button.frame = ui.Rect(3 * bw, 2 * bh, bw, bh).inset(1, 1)
		else:
			self.ac_button.frame = ui.Rect(3 * bw, bh, bw, bh).inset(1, 1)
			self.c_button.frame = ui.Rect(4 * bw, bh, bw, bh).inset(1, 1)
			self.eq_button.frame = ui.Rect(3 * bw, 4 * bh, 2*bw, bh).inset(1, 1)
			self.dot_button.frame = ui.Rect(bw, 4 * bh, bw, bh).inset(1, 1)
		self.display_view.frame = (0, 0, self.width, bh)
	
	def button_tapped(self, sender):
		t = sender.title
		label = self.display_label
		if t in '0123456789':
			if self.shows_result or label.text == '0':
				label.text = t
			else:
				label.text += t
		elif t == '.' and label.text[-1] != '.':
			label.text += t
		elif t in op_symbols:
			if label.text[-1] in op_symbols:
				label.text = label.text[:-1] + t
			else:
				label.text += t
		elif t == 'AC':
			label.text = '0'
		elif t == 'C':
			label.text = label.text[:-1]
			if len(label.text) == 0:
				label.text = '0'
		elif t == '=':
			try:
				expr = label.text
				for symbol in op_symbols:
					expr = expr.replace(symbol, operators[symbol])
				result = str(eval(expr))
				if result.endswith('.0'):
					result = result[:-2]
				label.text = result
			except (SyntaxError, ZeroDivisionError):
				label.text = 'ERROR'
			self.shows_result = True
		if t != '=':
			self.shows_result = False

def main():
	# Optimization: Don't create a new view if the widget already shows the calculator.
	widget_name = __file__ + str(os.stat(__file__).st_mtime)
	widget_view = appex.get_widget_view()
	if widget_view is None or widget_view.name != widget_name:
		widget_view = CalcView()
		widget_view.name = widget_name
		appex.set_widget_view(widget_view)

if __name__ == '__main__':
	main()
こだっく python_cavbity_PVF
Python
import numpy as np
import math
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D
pi=math.pi
Re=float(10.0)
N=20
M=50
r=1.72
T=int(1000)
dx=1.0/N
dy=1.0/N
dt=0.001
nu=np.zeros((N+2,N+2))
ou=np.zeros((N+2,N+2))
us=np.zeros((N+2,N+2))
nv=np.zeros((N+2,N+2))
ov=np.zeros((N+2,N+2))
vs=np.zeros((N+2,N+2))
pre=np.zeros((N+2,N+2))


for t in range(T):
    
    for i in range(N+2):
        ou[i][0]=-ou[i][1]
        ou[i][N+1]=2*math.sin(i*dx*pi)*math.sin(i*dx*pi)-ou[i][N-1]
        ov[0][i]=-ov[1][i]
        ov[N+1][i]=-ov[N][i]

    #u^*,v^*の計算
    for i in range(0,N):
        for j in range(1,N):
            vs[i+1][j]=ov[i+1][j]+dt*(-0.25*(ou[i][j+1]+ou[i][j]+ou[i+1][j+1]+ou[i+1][j])*(ov[i+2][j]-ov[i][j])/(2*dx)-ov[i][j]*(ov[i+1][j+1]-ov[i+1][j-1])/(2*dx))+(dt/(Re*dx*dx))*(-4*ov[i+1][j]+ov[i+2][j]+ov[i][j]+ov[i+1][j+1]+ov[i+1][j-1])
    
    for i in range(1,N):
        for j in range(0,N):
            us[i][j+1]=ou[i][j+1]+dt*(-ou[i][j+1]*(ou[i+1][j+1]-ou[i-1][j+1])/(2*dx)-0.25*(ov[i+1][j]+ov[i][j]+ov[i+1][j+1]+ov[i][j+1])*(ou[i][j+2]-ou[i][j])/(2*dx))+(dt/(Re*dx*dx))*(-4*ou[i][j+1]+ou[i+1][j+1]+ou[i-1][j+1]+ou[i][j+2]+ou[i][j])
    

 #圧力の境界条件   
    for i in range(N):
        pre[0][i+1]=pre[1][i+1]-(dx/Re)*(-ou[3][i+1]+4*ou[2][i+1]-5*ou[1][i+1]+2*ou[0][i+1])
        pre[N+1][i+1]=pre[N][i+1]-(dx/Re)*(-ou[N-2][i+1]+4*ou[N-1][i+1]-5*ou[N][i+1]+2*ou[N+1][i+1])
        pre[i+1][0]=pre[i+1][1]-(dx/Re)*(-ov[i+1][3]+4*ov[i+1][2]-5*ov[i+1][1]+2*ov[i+1][0])
        pre[i+1][N+1]=pre[i+1][N]-(dx/Re)*(-ov[i+1][N-2]+4*ov[i+1][N-1]-5*ov[i+1][N]+2*ov[i+1][N+1])
    pre[0][0]=pre[1][0]
    pre[0][N+1]=pre[0][N]
    pre[N+1][0]=pre[N][0]
    pre[N+1][N+1]=pre[N][N+1]
               #緩和法
    for k in range(M):
        for i in range(0,N):
            for j in range(0,N):
                pre[i+1][j+1]=(-Re*dx/4*dt)*(us[i+1][j+1]-us[i][j+1]+vs[i+1][j+1]-vs[i+1][j])+0.25*(pre[i+2][j+1]+pre[i][j+1]+pre[i+1][j+2]+pre[i+1][j])
            #n+1における速度の計算
    for i in range(1,N):
        for j in range(0,N):
            nv[i+1][j]=vs[i+1][j]-dt*(pre[i+1][j+1]-pre[i+1][j])/(dx)

    for i in range(0,N):
        for j in range(1,N):
            nv[i+1][j]=vs[i+1][j]-dt*(pre[i+1][j+1]-pre[i+1][j])/(dx)

    
        #古い速度と新しい速度を更新
    for i in range(0,N+2):
        for j in range(0,N+2):
             ou[i][j]=nu[i][j]
             ov[i][j]=nv[i][j]
    #print(pre[15][15])
    #print(pre[14][14])


x=np.arange(0,dx+1.0+dx,dx)
y=np.arange(0,dx+1.0+dx,dx)
X,Y=np.meshgrid(x,y,indexing='ij')

fig=plt.figure()
ax=Axes3D(fig)

ax.set_xlabel("x")
ax.set_ylabel("y")
ax.set_zlabel("v")


#print(psi)
ax.plot_wireframe(X, Y, pre)
plt.show()
こだっく No title
Python
import numpy as np
import math
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D
pi=math.pi
Re=float(10.0)
N=20
M=50
r=1.72
T=int(1000)
dx=1.0/N
dy=1.0/N
dt=0.001
nu=np.zeros((N+2,N+2))
ou=np.zeros((N+2,N+2))
us=np.zeros((N+2,N+2))
nv=np.zeros((N+2,N+2))
ov=np.zeros((N+2,N+2))
vs=np.zeros((N+2,N+2))
pre=np.zeros((N+2,N+2))


for t in range(T):
    
    for i in range(N+2):
        ou[i][0]=-ou[i][1]
        ou[i][N+1]=2*math.sin(i*dx*pi)*math.sin(i*dx*pi)-ou[i][N-1]
        ov[0][i]=-ov[1][i]
        ov[N+1][i]=-ov[N][i]

    #u^*,v^*の計算
    for i in range(0,N):
        for j in range(1,N):
            vs[i+1][j]=ov[i+1][j]+dt*(-0.25*(ou[i][j+1]+ou[i][j]+ou[i+1][j+1]+ou[i+1][j])*(ov[i+2][j]-ov[i][j])/(2*dx)-ov[i][j]*(ov[i+1][j+1]-ov[i+1][j-1])/(2*dx))+(dt/(Re*dx*dx))*(-4*ov[i+1][j]+ov[i+2][j]+ov[i][j]+ov[i+1][j+1]+ov[i+1][j-1])
    
    for i in range(1,N):
        for j in range(0,N):
            us[i][j+1]=ou[i][j+1]+dt*(-ou[i][j+1]*(ou[i+1][j+1]-ou[i-1][j+1])/(2*dx)-0.25*(ov[i+1][j]+ov[i][j]+ov[i+1][j+1]+ov[i][j+1])*(ou[i][j+2]-ou[i][j])/(2*dx))+(dt/(Re*dx*dx))*(-4*ou[i][j+1]+ou[i+1][j+1]+ou[i-1][j+1]+ou[i][j+2]+ou[i][j])
    

 #圧力の境界条件   
    for i in range(N):
        pre[0][i+1]=pre[1][i+1]-(dx/Re)*(-ou[3][i+1]+4*ou[2][i+1]-5*ou[1][i+1]+2*ou[0][i+1])
        pre[N+1][i+1]=pre[N][i+1]-(dx/Re)*(-ou[N-2][i+1]+4*ou[N-1][i+1]-5*ou[N][i+1]+2*ou[N+1][i+1])
        pre[i+1][0]=pre[i+1][1]-(dx/Re)*(-ov[i+1][3]+4*ov[i+1][2]-5*ov[i+1][1]+2*ov[i+1][0])
        pre[i+1][N+1]=pre[i+1][N]-(dx/Re)*(-ov[i+1][N-2]+4*ov[i+1][N-1]-5*ov[i+1][N]+2*ov[i+1][N+1])
    pre[0][0]=pre[1][0]
    pre[0][N+1]=pre[0][N]
    pre[N+1][0]=pre[N][0]
    pre[N+1][N+1]=pre[N][N+1]
               #緩和法
    for k in range(M):
        for i in range(0,N):
            for j in range(0,N):
                pre[i+1][j+1]=(-Re*dx/4*dt)*(us[i+1][j+1]-us[i][j+1]+vs[i+1][j+1]-vs[i+1][j])+0.25*(pre[i+2][j+1]+pre[i][j+1]+pre[i+1][j+2]+pre[i+1][j])
            #n+1における速度の計算
    for i in range(1,N):
        for j in range(0,N):
            nv[i+1][j]=vs[i+1][j]-dt*(pre[i+1][j+1]-pre[i+1][j])/(dx)

    for i in range(0,N):
        for j in range(1,N):
            nv[i+1][j]=vs[i+1][j]-dt*(pre[i+1][j+1]-pre[i+1][j])/(dx)

    
        #古い速度と新しい速度を更新
    for i in range(0,N+2):
        for j in range(0,N+2):
             ou[i][j]=nu[i][j]
             ov[i][j]=nv[i][j]
    #print(pre[15][15])
    #print(pre[14][14])


x=np.arange(0,dx+1.0+dx,dx)
y=np.arange(0,dx+1.0+dx,dx)
X,Y=np.meshgrid(x,y,indexing='ij')

fig=plt.figure()
ax=Axes3D(fig)

ax.set_xlabel("x")
ax.set_ylabel("y")
ax.set_zlabel("v")


#print(psi)
ax.plot_wireframe(X, Y, pre)
plt.show()
anonymous No title
Python
import numpy as np
import math
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D
pi=math.pi
Re=float(10.0)
N=20
M=50
r=1.72
T=int(1000)
dx=1.0/N
dy=1.0/N
dt=0.001
nu=np.zeros((N+1,N+1))
ou=np.zeros((N+1,N+1))
us=np.zeros((N+1,N+1))
nv=np.zeros((N+1,N+1))
ov=np.zeros((N+1,N+1))
vs=np.zeros((N+1,N+1))
pre=np.zeros((N+1,N+1))

#初期条件セッツ
for i in range(N):
    ou[i][N-1]=math.sin(pi*i*dx)*math.sin(pi*i*dx)
    nu[i][N-1]=math.sin(pi*i*dx)*math.sin(pi*i*dx)
    us[i][N-1]=math.sin(pi*i*dx)*math.sin(pi*i*dx)
    

for t in range(T):
    
    #u^*,v^*の計算
    for i in range(1,N-1):
        for j in range(1,N-1):
            vs[i][j]=ov[i][j]+dt*(-ou[i][j]*(ov[i+1][j]-ov[i-1][j])/(2*dx)-ov[i][j]*(ov[i][j+1]-ov[i][j-1])/(2*dx))+(dt/(Re*dx*dx))*(-4*ov[i][j]+ov[i+1][j]+ov[i-1][j]+ov[i][j+1]+ov[i][j-1])
            us[i][j]=ou[i][j]+dt*(-ou[i][j]*(ou[i+1][j]-ou[i-1][j])/(2*dx)-ov[i][j]*(ou[i][j+1]-ou[i][j-1])/(2*dx))+(dt/(Re*dx*dx))*(-4*ou[i][j]+ou[i+1][j]+ou[i-1][j]+ou[i][j+1]+ou[i][j-1])


    #緩和法
    for k in range(M):
        for i in range(2,N-2):  
            pre[i][1]=(-dx/(2*dt))*(us[i+1][1]-us[i-1][1]+vs[i][2]-vs[i][0])+0.25*(pre[i+2][1]+pre[i-2][1]+pre[i][3]+pre[i][1])
            pre[i][N-2]=(-dx/(2*dt))*(us[i+1][N-2]-us[i-1][N-2]+vs[i][N-1]-vs[i][N-3])+0.25*(pre[i+2][N-2]+pre[i-2][N-2]+pre[i][N-2]+pre[i][N-4])
        for j in range(2,N-2):
            pre[1][j]=(-dx/(2*dt))*(us[2][j]-us[0][j]+vs[1][j+1]-vs[1][j-1])+0.25*(pre[1+2][j]+pre[1][j]+pre[1][j+2]+pre[1][j-2])
            pre[N-2][j]=(-dx/(2*dt))*(us[N-1][j]-us[N-3][j]+vs[N-2][j+1]-vs[N-2][j-1])+0.25*(pre[N-2][j]+pre[N-4][j]+pre[N-2][j+2]+pre[N-2][j-2])
       
        pre[1][1]=(-dx/(2*dt))*(us[2][1]-us[0][1]+vs[1][2]-vs[1][0])+0.25*(pre[3][1]+pre[1][1]+pre[1][3]+pre[1][1])
        pre[N-2][1]=(-dx/(2*dt))*(us[N-1][1]-us[N-3][1]+vs[N-2][2]-vs[N-2][0])+0.25*(pre[N-2][1]+pre[N-4][1]+pre[N-2][3]+pre[N-2][1])
        pre[1][N-2]=(-dx/(2*dt))*(us[2][N-2]-us[0][N-2]+vs[1][N-1]-vs[1][N-3])+0.25*(pre[3][N-2]+pre[1][N-2]+pre[1][N-2]+pre[1][N-4])
        pre[N-2][N-2]=(-dx/(2*dt))*(us[N-1][N-2]-us[N-3][N-2]+vs[N-2][N-1]-vs[N-2][N-3])+0.25*(pre[N-2][N-2]+pre[N-4][N-2]+pre[N-2][N-2]+pre[N-2][N-4])
        
        for i in range(2,N-2):
            for j in range(2,N-2):
                    pre[i][j]=(-dx/(2*dt))*(us[i+1][j]-us[i-1][j]+vs[i][j+1]-vs[i][j-1])+0.25*(pre[i+2][j]+pre[i-2][j]+pre[i][j+2]+pre[i][j-2])
    
        for i in range(N):
            pre[0][i]=pre[1][i]-(dx/Re)*(-ou[3][i]+4*ou[2][i]-5*ou[1][i]+2*ou[0][i])
            pre[N-1][i]=pre[N-2][i]-(dx/Re)*(-ou[N-4][i]+4*ou[N-3][i]-5*ou[N-2][i]+2*ou[N-1][i])
            pre[i][0]=pre[i][1]-(dx/Re)*(-ov[i][3]+4*ov[i][2]-5*ov[i][1]+2*ov[i][0])
            pre[i][N-1]=pre[i][N-2]-(dx/Re)*(-ov[i][N-4]+4*ov[i][N-3]-5*ov[i][N-2]+2*ov[i][N-1])
         #n+1における速度の計算
    for i in range(1,N-1):
        for j in range(1,N-1):
            nu[i][j]=us[i][j]-dt*(pre[i+1][j]-pre[i-1][j])/(2*dx)
            nv[i][j]=vs[i][j]-dt*(pre[i][j+1]-pre[i][j-1])/(2*dx)


    
        #古い速度と新しい速度を更新
    for i in range(1,N-1):
        for j in range(1,N-1):
             ou[i][j]=nu[i][j]
             ov[i][j]=nv[i][j]
    print(nu[15][15])

x=np.arange(0,1.0+dx,dx)
y=np.arange(0,1.0+dx,dx)
X,Y=np.meshgrid(x,y,indexing='ij')

fig=plt.figure()
ax=Axes3D(fig)

ax.set_xlabel("x")
ax.set_ylabel("y")
ax.set_zlabel("v")


#print(psi)
ax.plot_wireframe(X, Y, nv)
plt.show()
anonymous No title
Python
def exception9(a):
    a.sort()
    return a[-1] if a.count(a[0]) > a.count(a[-1]) else a[0]
anonymous No title
Python
anonymous No title
Python
anonymous No title
Python
import notification
import clipboard
import keyboard
import datetime
import calendar
import tweepy
import base64
import json
import time
import glob
import os
import sys
import re
import random
import console


"""
           ---初期設定---
   
 ①コードの貼り付けができたら自身のTwitterID入力をします。
 
      例 : ID が @Twitter_1234 の場合 
         TwitterID = "@XXXX" を
         TwitterID = "@Twitter_1234" に変更
 
 ②右上の▷を押すと、数字が出てきます、
 その数字と ①で書き込んだTwitterID の2つをDMで伝えてください。
 
 ③数字と引き換えにこちらがIDを渡しますので、AutoIDを35行目にコピーして貼り付けてください

"""

Twitter_ID = "@XXXX"

# 0000を消した後 貰ったIDを=の後にそのまま貼り付けてください
Auto_ID = 0000


"""

   ---使用設定部分---
  
   パスツイ  21:30
   ルーム番号 567
   
      の場合
     ↓↓↓↓↓↓↓↓
     
 pass_tweet_time = "30"
 room_id         = "567" 

  このように下を書き換えます。 
 ↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓
 
"""

pass_tweet_time = "00"
room_id         = "0000" 



"""
     ↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓
     ⚠️以下書き換えると動作しなくなります
   ↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓
"""

flag     = 0
password = ""

CK = b'eGdsMlF5TlJscFNLRWh5dFMzN1g2TTdSag=='
CKS = b'azJIbWpKS1J0TExGUjBmZnQzZW5FSnBCdGY5NUY3VURGYzluQmgxblJ2bVNwazd0S24='
AT = "837597646311178240-q8vlRy0BPcIBxngYG9ynhu1cSNqCVC3"
ATS = "cnMrSYDnMiSaqHNbxesiweHI2esGDMZHS87ugHiveAsrK"

basenumber = "0123456789"

font_item = ["⓪①②③④⑤⑥⑦⑧⑨",
             "⓿❶❷❸❹❺❻❼❽❾",
             "0123456789",
             "𝟘𝟙𝟚𝟛𝟜𝟝𝟞𝟟𝟠𝟡",]
             
itemlist1 = ["@[a-zA-Z0-9_]+",
             "[0-9]{1,2}:[0-5][0-9]",
             "[0-9]{1,2}時[0-59]分",
             "([0-9]|[0-2][0-9])時",
             "[0-5][0-9]分",
             "[1-9]{1,2}/[0-9]{1,2}",]
             
itemlist2 = [" "," ",]
	
message = {
	"no_update":"パスツイ取得中",
	"code_notification":"この数字と入力したTwitterIDをDMで伝えてください:",
	"copy_error":"Twitterリンクのコピー又はフルアクセスの許可をしてください",
	"pass_notfound":"パスワードが取得できませんでした",
	"waiting_passtweet":"からのパスツイ待機中... ",
	"success":"ID認証成功",
	"fail":"認証失敗:"
}

Xcode = ["\x207\x204\x208\x209\x400\x102",
         "207\x200\x208\x209\x400\x109" ,
         "207\x204\x208\x209\x400\x102" ,
         "207\x204\x208\x209\x400\x102" ,]

"""
  関数
"""
def login(CK,CKS,AT,ATS):
	CK = base64.b64decode(CK.decode())
	CKS = base64.b64decode(CKS.decode())
	auth = tweepy.OAuthHandler(str(CK).split("'")[1],str(CKS).split("'")[1])
	auth.set_access_token(AT,ATS)
	API = tweepy.API(auth)
	return API

def get_username():
	user_name = clipboard.get()
	if("https" in user_name):
		user_name = user_name.split("/")
		user_name = user_name[3].split("?")
		user_name = user_name[0]
		return user_name
	else:
		print(message["copy_error"])
		sys.exit()

def ACencrtrpt(a,b):
	c = a+","+str(b)
	c = base64.b64encode(c.encode())
	return c
	
def Test(c,d):
	if c == d:
		return True
	else:
		key = glob.glob("*.pwd")
		key = key[0].split(".")[0]
		print(message["code_notification"]+key)
		sys.exit()
		
def check():
	file = glob.glob("*.pwd")
	if not file:
		key = int(random.uniform(1,99))*int(random.uniform(99,999))
		key = str(key)
		with open(key+".pwd" , mode="w") as f:
			f.write("")
		notification.schedule(message["code_notification"]+key)
		print(message["code_notification"]+key)
		sys.exit()
	else:
		code = file[0].split(".")[0]
		return code
							
def tweet_filter(Tweettext):	
	for i in range(10):
		if(font_item[0][i] in Tweettext):
			Tweettext = Tweettext.replace(font_item[0][i],basenumber[i])
		for j in range(10):
			if(font_item[1][j] in Tweettext):
				Tweettext = Tweettext.replace(font_item[1][j],basenumber[j])
			for k in range(10):
				if(font_item[2][k] in Tweettext):
					Tweettext = Tweettext.replace(font_item[2][k],basenumber[k])
				for l in range(10):
					if(font_item[3][l] in Tweettext):
						Tweettext = Tweettext.replace(font_item[3][l],basenumber[l])		
	return Tweettext

def tweet_trim(tweet):
	tweet = tweet_filter(tweet)
	for i in itemlist1:
		tweet = re.sub(i,"",tweet)
		for j in itemlist2:
			tweet = tweet.replace(j,"")
	tweet = re.findall(r"\d+",tweet)
	return tweet
	
def get_time_now():
	now_time = datetime.datetime.now()
	now_time = str(now_time).split(" ")[1]
	now_time = now_time.split(":")
	now_time_minute = now_time[1]
	now_time_seconds = now_time[2].split(".")[0]
	return now_time_minute,now_time_seconds


API   = login(CK,CKS,AT,ATS) 

Check = check()
Check = ACencrtrpt(Check,Twitter_ID)
Test(Auto_ID,Check)

user_name = get_username()

print("@"+user_name+message["waiting_passtweet"])

if(pass_tweet_time == "00"):
	passTb = "59"
else:
	passTb = str(int(pass_tweet_time)-1)	
	
while True:
	now_time_minute , now_time_seconds = get_time_now()		
	if(now_time_minute == passTb and now_time_seconds == "58"):
		break	
	elif(now_time_minute == passTb and now_time_seconds == "59"):
		break
	elif(now_time_minute == pass_tweet_time):	
		break
	time.sleep(0.01)
	
while True:
	tweet = API.user_timeline(user_name,count = 1)
	for i in tweet:
		tweet = i.text
		tweet_time = i.created_at
		
	tweet_time = re.findall(r"\d+",str(tweet_time))
	tweet_time_minute = tweet_time[4]
	tweet_time_second = tweet_time[5]
		
	if(pass_tweet_time == "00"):
		pass_tweet_time_ = "59"
	else:
		pass_tweet_time_ = str(int(pass_tweet_time)-1)
		if(len(pass_tweet_time_) == 1):
			pass_tweet_time_ = "0" + pass_tweet_time_
	for i in range(57,60):
		if(pass_tweet_time_ == tweet_time_minute and str(i) == tweet_time_second):
			flag = 1	
	if(pass_tweet_time == tweet_time_minute):
		flag = 1
		
	if(flag == 1):
		break
	#else:
		#console.clear()
		#print(message["no_update"]+" ["+str(datetime.datetime.now()).split(" ")[1]+"]")
	time.sleep(0.01)

tweet = tweet_trim(tweet)

if(room_id in tweet):
	room_id_index = tweet.index(room_id)
	if(room_id_index == 0):
		password = str(tweet[1])
	elif(room_id_index == 1):
		password = str(tweet[0])
	elif(len(tweet) >= 1):
		password = str(tweet[0])
else:
	password = tweet[0]

keyboard.insert_text(password)
keyboard.insert_text("\n")
notification.schedule(password)
print("password:"+password)
Don't you submit code?
Submit