Dataset Viewer
Auto-converted to Parquet Duplicate
text
stringlengths
0
2.17k
# Write a function to re-arrange the given array in alternating positive and negative items. def right_rotate(arr, n, out_of_place, cur):
temp = arr[cur]
for i in range(cur, out_of_place, -1):
arr[i] = arr[i - 1]
arr[out_of_place] = temp
return arr
def re_arrange(arr, n):
out_of_place = -1
for index in range(n):
if (out_of_place >= 0):
if ((arr[index] >= 0 and arr[out_of_place] < 0) or
(arr[index] < 0 and arr[out_of_place] >= 0)):
arr = right_rotate(arr, n, out_of_place, index)
if (index-out_of_place > 2):
out_of_place += 2
else:
out_of_place = - 1
if (out_of_place == -1):
if ((arr[index] >= 0 and index % 2 == 0) or
(arr[index] < 0 and index % 2 == 1)):
out_of_place = index
return arr assert re_arrange([-5, -2, 5, 2, 4, 7, 1, 8, 0, -8], 10) == [-5, 5, -2, 2, -8, 4, 7, 1, 8, 0] assert re_arrange([1, 2, 3, -4, -1, 4], 6) == [-4, 1, -1, 2, 3, 4] assert re_arrange([4, 7, 9, 77, -4, 5, -3, -9], 8) == [-4, 4, -3, 7, -9, 9, 77, 5] # Write a function to extract the sum of alternate chains of tu...
sum1 = 0
sum2 = 0
for idx, ele in enumerate(test_tuple):
if idx % 2:
sum1 += ele
else:
sum2 += ele
return ((sum1),(sum2)) assert sum_of_alternates((5, 6, 3, 6, 10, 34)) == (46, 18) assert sum_of_alternates((1, 2, 3, 4, 5)) == (6, 9) assert sum_of_alternates((6, 7, 8, 9, 4, 5)) == (21, 18) # Write a python function to find the minimum number of squares whose sum is equal to a given number. def get_Min_Squares(n):
if n <= 3:
return n;
res = n
for x in range(1,n + 1):
temp = x * x;
if temp > n:
break
else:
res = min(res,1 + get_Min_Squares(n - temp))
return res; assert get_Min_Squares(6) == 3 assert get_Min_Squares(2) == 2 assert get_Min_Squares(4) == 1
Answer: The kernel trick is a technique used to map data from one feature space (e.g., low-dimensional) into another feature space (e.g., higher-dimensional or more appropriate for machine learning algorithms).In the case of support vector machines (SVM), it allows us to solve non-linearly separable problems in Hilbert...
このように、データ全体の特徴を要約・記述することが記述統計学の大きな目的・方法論である。推計統計学は、母集団からの標本化を前提とし、標本から母集団を推測する分野である。例えば世界の小学生の身長特性を知りたいとする。全世界の小学生の身長を計測し記述統計学によって中央値や平均値を記述すれば、目的である世界の小学生の身長特性は解明できる。しかしその計測は著しく困難(事実上不可能)である。そこで推計統計学では、まず小学生100人の身長データ(標本と呼ぶ)を集める。そして標本は全世界の小学生という母集団からランダムに選ばれたものだと考える。ランダムに選ばれた100人の身長中央値(標本の中央値)は必ずしも世界小学生身長中央値(母集団の中央値)と...
Question: Tamika drove for 8 hours at an average speed of 45 miles per hour.Logan drove for 5 hours at 55 miles an hour.How many miles farther did Tamika drive?Solution: Tamika drove 8 hours * 45 mph = 360 miles Logan drove 5 hours * 55 mph = 275 miles 360 - 275 = 85 miles Tamika drove 85 miles farther.#### 85 Question...
# Complete the function: def next_smallest(lst): """ You are given a list of integers.Write a function next_smallest() that returns the 2nd smallest element of the list.Return None if there is no such element.next_smallest([1, 2, 3, 4, 5]) == 2 next_smallest([5, 1, 4, 3, 2]) == 2 next_smallest([]) == None next_smallest...
# Complete the function: def will_it_fly(q,w): ''' Write a function that returns True if the object q will fly, and False otherwise.The object q will fly if it's balanced (it is a palindromic list) and the sum of its elements is less than or equal the maximum possible weight w.Example: will_it_fly([1, 2], 5) ➞ False #...
質問: アメリカ領サモア:1900年以降の領土。第二次サモア内戦の終結後、サモア諸島は2つの地域に分割された。アメリカは島の東半分を支配した[61][25]。1900年、トゥトゥイラの割譲条約が発効した[62]。1904年にマヌア諸島がアメリカ領サモアの一部となり、1925年にスワインズ島がアメリカ領サモアの一部になった[62]。1929年に議会がアメリカ領サモアの条約を承認した。51年間、アメリカ海軍がこの領土を支配していた[62]。[34]アメリカ領サモアは、1967年に最後に改正された憲法の下で地方自治を行っている[25][注釈 14]アメリカ領サモアの最初の選挙による知事は1977年、最初の投票権のない議会議員は1981年で...
惑星や月がすべて丸いわけではありません。質量によって形は様々で、私たちが知っている星系とは違う、不思議な形の世界も存在するかもしれません。惑星や月の中にあるものはすべて重力の影響を受けていて、できることなら中心部に移動したいと思うものです。理想的な状態であれば、球形になる。液体以外の物体の場合、どの時点で丸くなるかは様々です。一般的に、太陽系によくある氷のようなものからできたものは、直径400km前後の球形になることが多いと言われています。しかし、もっと硬いものから作られる場合は、それよりも大きな直径750km程度になる必要があります。十分な質量があれば、岩石も流体状になる。火星の衛星ダイモスは12.6kmしかなく、球形ではありませ...
Answer: HTML, CSS, and JavaScript are the three core building blocks of modern web development.If we think of building a website like constructing a building, we can use a metaphor to understand the difference between these three technologies.HTML, or Hypertext Markup Language, is like the foundation and framework of a...
ただしアイテムの金のシャレコウベを取った時は別で、アイテムの効果通りに「Hurry up!!」が発生しすかるもんすたも出現する。すーぱーどらんく出現時に静止していると、突如ミスとなる。すーぱーどらんくには、最終面の女の子が落としたドラッグ・オブ・サンダーを取ったあと、サンダーを1発だけ命中させてから一定時間逃げまわって待つと、薬が効いてきて勝手に泡に入って自滅してしまう。ただし、サンダーを2発以上当てたり、途中でミスするとこの効果はなくなってしまい正攻法でしか倒せなくなる。シークレットルーム内でゲームオーバーになるとまずその後のレコードラウンド表示が102になる画面が見られ、その後のデモでシークレットルームが表示されるなど挙動がおか...
月日は流れ、ラダトームの王であるラルス16世がアレフガルドを治める時代に、アレフガルドに再び邪悪な者が現れた。その名は竜王。竜王はラダトームから光の玉とローラ姫を奪い、アレフガルドは再び魔物の徘徊する世界となった。竜王に戦いを挑んでいった者はいたが、生きて帰ってきた者は一人もいなかった。そして、ローラ姫もどこかに監禁された。そんな中、予言者のムツヘタが勇者ロトの血を引く者が竜王を滅ぼすであろうと予言した。そして予言どおり、ロトの血を引く勇者が現れた。王様に姫と平和を取り戻すよう頼まれた勇者は、竜王の城を目指して一人旅立つのである。様々な街を訪れ、ダンジョンを攻略した勇者は、沼地の洞窟にてドラゴンによって捕らわれているローラ姫を救い出...
オブジェクト指向言語の一面が強調されがちだが、C言語のような手続き型言語としてもプログラミングできる。Javaはオブジェクト指向パラダイムをそれほど強制しない。Javaは、同時にマルチパラダイム言語でもある。JDK 1.1でJavaBeans/JavaRMI/CORBAによるコンポーネントプログラミングと、リフレクションAPIによるメタプログラミングが備えられた。J2SE 5.0でジェネリクス構文/APIによるジェネリックプログラミングが追加された。Java SE 7で並行APIによる並行プログラミングが追加された。Java SE 8ではラムダ式/関数型インターフェース/ストリームAPIなどによる関数型プログラミングが追加された。2...
は仮想命令をホスト言語でエミュレートするコードである。命令ボディがホストマシンで実行されることで仮想命令が事実上実行される。すなわち命令ボディは仮想命令の実装である。例えば二項和仮想命令 ADD2 に対応してC言語で書かれた push(pop() + pop()) は命令ボディである。ディスパッチ ディスパッチ()は仮想命令に基づいた命令ボディから命令ボディへの制御移行メカニズムである。ディスパッチの最もシンプルな例はSwitch文(Jump命令)である。ある仮想命令の実行後、次の仮想命令に対応する命令ボディへ制御を移す(Jumpする)ことでその仮想命令実装が実行される。誤解 プログラミング言語処理系の実装には、インタプリタとコ...
Question: There are 25 different layers of rock in a canyon’s strata. Five of the layers are limestone. Half of the rest are sandstone. Four of the remaining are quartz. Half of the rest are shale. The rest are all different kinds of rock. How many kinds of rock make up only one layer in the canyon’s strata? Solution: ...
# Write a function to find ln, m lobb number. def binomial_coeff(n, k):
C = [[0 for j in range(k + 1)]
for i in range(n + 1)]
for i in range(0, n + 1):
for j in range(0, min(i, k) + 1):
if (j == 0 or j == i):
C[i][j] = 1
else:
C[i][j] = (C[i - 1][j - 1]
+ C[i - 1][j])
return C[n][k]
def lobb_num(n, m):
return (((2 * m + 1) *
binomial_coeff(2 * n, m + n))
/ (m + n + 1)) assert int(lobb_num(5, 3)) == 35 assert int(lobb_num(3, 2)) == 5 assert int(lobb_num(4, 2)) == 20 # Write a function to check for a number at the end of a string. import re
def end_num(string):
text = re.compile(r".*[0-9]$")
if text.match(string):
return True
else:
return False assert end_num('abcdef')==False assert end_num('abcdef7')==True assert end_num('abc')==False # Write a python function to check whether the given string is made up of two alternating characters or not. def is_Two_Alter(s):
for i in range (len( s) - 2) :
if (s[i] != s[i + 2]) :
return False
if (s[0] == s[1]):
return False
return True assert is_Two_Alter("abab") == True assert is_Two_Alter("aaaa") == False assert is_Two_Alter("xyz") == False # Write a function to rearrange positive and negative numbers in a given array using lambda function. def rearrange_numbs(array_nums):
result = sorted(array_nums, key = lambda i: 0 if i == 0 else -1 / i)
return result assert rearrange_numbs([-1, 2, -3, 5, 7, 8, 9, -10])==[2, 5, 7, 8, 9, -10, -3, -1] assert rearrange_numbs([10,15,14,13,-18,12,-20])==[10, 12, 13, 14, 15, -20, -18] assert rearrange_numbs([-20,20,-10,10,-30,30])==[10, 20, 30, -30, -20, -10]
Andorra tiene dos dominios esquiables formados por la unión de varias estaciones de esquí, y un complejo destinado al ocio donde se puede practicar esquí de fondo: Grandvalira.Surgida de la fusión de Pas de la Casa-Grau Roig y Soldeu-El Tarter.La pista Avet, situada en el pueblo de Soldeu alberga pruebas internacionale...
Question: Two-thirds of all the animals on my street are cats and the rest are dogs.If there are 300 animals on the street, what's the total number of legs of dogs that are on the street?Solution: The number of cats on the street is 2/3*300 = 200 If there are 300 animals on the street, and 200 are cats, there are 300-2...
End of preview. Expand in Data Studio

Japanese-English imatrix Calibration Data v3

imatrix計算用のキャリブレーションデータです。
日本語LLMのGGUF量子化品質向上を目的として作成しました。
本データセットは下記「ライセンス」欄に記載したデータセット群から派生した二次的著作物です。

構成

カテゴリ 割合 内容
ja_general 20% 日本語一般文章
ja_qa 20% 日本語Q&A・対話
ja_technical 10% 日本語技術・学術文
code 15% プログラムコード
en_reasoning 15% 英語推論・数学
en_qa 5% 英語Q&A・対話
zh 4% 中国語
eu_lang 6% フランス語・ドイツ語・スペイン語(各2%)
structured 5% SQL・構造化データ
  • 目標トークン数/チャンク: 512(全チャンク 512〜640 トークンに収まるよう生成)

対話系カテゴリ(ja_qa / en_reasoning / en_qa / structured)の一部は、Qwen3.5 の chat template で整形したチャンクを混ぜてあります。

ファイル

ファイル チャンク数
imatrix-ja-en-v3-500.txt 500
imatrix-ja-en-v3-1000.txt 1,000
imatrix-ja-en-v3-2000.txt 2,000

トークン統計

チャンク総数 推定総トークン数 チャンク平均トークン
500 300,601 (0.30M) 601
1,000 600,286 (0.60M) 600
2,000 1,204,348 (1.20M) 602

ライセンス

本データセット全体は CC BY-SA 4.0 のもとで公開されています。 CC BY-SA 4.0 のライセンス全文: https://creativecommons.org/licenses/by-sa/4.0/

本データセットは複数のソースから派生した二次的著作物であり、各ソース素材には元のライセンスが引き続き適用されます。本データセットの利用者は、CC BY-SA 4.0 の条件に加え、各ソースの元ライセンスの条件(著作権表示の保持等)も遵守する必要があります。

使用したデータセットと帰属

以下は本データセットの生成に実際に使用したソースの一覧です。

データセット ライセンス 使用カテゴリ
wikimedia/wikipedia (20231101.ja) CC BY-SA 3.0 / GFDL ja_general, ja_technical
wikimedia/wikipedia (20231101.en) CC BY-SA 3.0 / GFDL en_reasoning
wikimedia/wikipedia (20231101.zh) CC BY-SA 3.0 / GFDL zh
wikimedia/wikipedia (20231101.fr / .de / .es) CC BY-SA 3.0 / GFDL eu_lang
kunishou/databricks-dolly-15k-ja CC BY-SA 3.0 ja_qa
kunishou/oasst1-89k-ja Apache 2.0 ja_qa
kunishou/hh-rlhf-49k-ja MIT ja_qa
google-research-datasets/mbpp CC BY 4.0 code
openai/openai_humaneval MIT code
openai/gsm8k MIT en_reasoning
OpenAssistant/oasst2 Apache 2.0 en_reasoning, en_qa
b-mc2/sql-create-context CC BY 4.0 structured
自作コードスニペット・自作 JSON テンプレート 本データセットのライセンスに従う code, structured

ライセンス構造の説明

本データセットは以下の構造で公開されています。

  • CC BY-SA 系素材(Wikipedia, databricks-dolly-15k-ja)から派生した部分: CC BY-SA 4.0 が適用されます。
  • CC BY 素材(mbpp, sql-create-context)から派生した部分: CC BY 4.0 には ShareAlike 条項が存在しないため、その派生物のライセンスは自由に選択できます。本データセットではこの部分にも CC BY-SA 4.0 を適用しています。
  • Apache 2.0 素材(oasst1-89k-ja, OpenAssistant/oasst2)および MIT 素材(hh-rlhf-49k-ja, openai_humaneval, gsm8k)から取り込んだ部分: Apache 2.0 / MIT は派生物への CC BY-SA 4.0 適用を禁止しませんが、元のライセンスの条件(著作権表示・ライセンス全文の保持等)は引き続き有効です。
  • データセット作成者自身の貢献部分(自作コードスニペット・自作 JSON テンプレート・選択・配置・加工等): CC BY-SA 4.0 で提供されます。

利用者は CC BY-SA 4.0 の条件を遵守することで本データセット全体を利用できますが、Apache 2.0 / MIT 由来の部分については元ライセンスの著作権表示を保持してください。

CC BY-SA 3.0 → 4.0 について

Wikipedia(CC BY-SA 3.0 / GFDL デュアルライセンスのうち CC BY-SA 3.0 を採用根拠とする)および databricks-dolly-15k-ja のライセンスである CC BY-SA 3.0 は、CC BY-SA 3.0 ライセンス条項 第4条(b)(ii)(同一のライセンス要素を持つ後継バージョンへの適用を許可する条項)に基づき、後継バージョンである CC BY-SA 4.0 を適用して頒布することが可能です。 参照: CC BY-SA 3.0 legalcode / Wikimedia の 4.0 移行に関する法的注記

著作権表示 (Copyright Notices)

以下のライセンスは著作権表示の保持を条件としています。

Wikipedia (CC BY-SA 3.0 / GFDL)

CC BY-SA の条件に基づき、原著作者のクレジットを表示します。各記事の著作権は各執筆者に帰属します。

kunishou/databricks-dolly-15k-ja (CC BY-SA 3.0)

google-research-datasets/mbpp (CC BY 4.0)

b-mc2/sql-create-context (CC BY 4.0)

Apache License 2.0

MIT License

Apache License 2.0 の全文は同梱の LICENSE-APACHE、MIT License の全文は同梱の LICENSE-MIT を参照してください。

Downloads last month
97