images
images listlengths
1
1
texts
listlengths
1
1
[ { "assistant": "<code><loc_0><loc_0><loc_500><loc_500><_Java_>import java.util.Scanner;\n \npublic class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint N = sc.nextInt();\n\t\tint[] array = new int[N];\n\t\tint c = 0;\n\t\t\n\t\tfor(int i = 0; i<array.length; i++) {\n\t\t\tarray[i] = sc.nextInt();\n\t\t}\t\t\n\t\tfor(int i = 0; i<array.length-1; i++) {\n\t\t\tif (array[i] >= array[i+1])\n {\t\n c++;\n }\n \telse\n {\n c=0;\n }\n\t\t}\n\t\tSystem.out.println(c);\n\t}\n}</code>", "source": "SynthCodeNetNoImageTag", "user": "Convert code to text." } ]
[ { "assistant": "<loc_0><loc_0><loc_500><loc_500><_CSS_>@font-face {\n font-family: 'logo';\n src: url('../fonts//logo.ttf');\n}\n\n\n.active-item {\n background: rgb(238, 78, 50);\n border-bottom: 3px solid black;\n color: black !important;\n font-weight: bold;\n}\n\n.brand-logo {\n font-family: 'logo';\n letter-spacing: 2px;\n color: black !important;\n font-size: 1.5rem !important;\n}</code>", "source": "SynthCodeNetNoImageTag", "user": "<code>" } ]
[ { "assistant": "<loc_0><loc_0><loc_500><loc_500><_SQL_>-- Generation Time: May 21, 2020 at 06:26 PM\n-- Server version: 10.4.6-MariaDB\n-- PHP Version: 7.3.9\n\nSET SQL_MODE = \"NO_AUTO_VALUE_ON_ZERO\";\nSET AUTOCOMMIT = 0;\nSTART TRANSACTION;\nSET time_zone = \"+00:00\";\n\n\n/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;\n/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;\n/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;\n/*!40101 SET NAMES utf8mb4 */;\n\n--\n-- Database: `relier_tokens`\n--\n\n-- --------------------------------------------------------\n\n--\n-- Table structure for table `tokens`\n--\n\nCREATE TABLE `tokens` (\n `token_identity` varchar(20) NOT NULL\n) ENGINE=InnoDB DEFAULT CHARSET=latin1;\n\n--\n-- Dumping data for table `tokens`\n--\n\nINSERT INTO `tokens` (`token_identity`) VALUES\n(''),\n('123456'),\n('scvbnfmguj'),\n('wreryrfgbhkj ');\n\n--\n-- Indexes for dumped tables\n--\n\n--\n-- Indexes for table `tokens`\n--\nALTER TABLE `tokens`\n ADD PRIMARY KEY (`token_identity`);\nCOMMIT;\n\n/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;\n/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;\n/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;\n</code>", "source": "SynthCodeNetNoImageTag", "user": "<code>" } ]
[ { "assistant": "<code><loc_0><loc_0><loc_500><loc_500><_C++_>#include \"googletest/googletest/include/gtest/gtest.h\"\n\n#include \"environment.h\"\n\n#include \"mocks/mntp1wallet.h\"\n#include \"ntp1/ntp1wallet.h\"\n\nusing namespace ::testing;\n\nstruct NTP1TokenSelectionTest : public ::testing::Test\n{\n NTP1WalletMockPtr wallet;\n\n std::map<std::string, NTP1Int> walletBalances;\n std::unordered_map<NTP1OutPoint, NTP1Transaction> walletOutputs;\n\n void SetUp() override\n {\n wallet = boost::make_shared<NiceMock<mNTP1Wallet>>();\n ON_CALL(*wallet, getTokenName(_)).WillByDefault(Return(\"MyName!\"));\n ON_CALL(*wallet, getBalancesMap())\n .WillByDefault(\n Invoke([&]() -> const std::map<std::string, NTP1Int>& { return walletBalances; }));\n ON_CALL(*wallet, getWalletOutputsWithTokens())\n .WillByDefault(Invoke([&]() -> const std::unordered_map<NTP1OutPoint, NTP1Transaction>& {\n return walletOutputs;\n }));\n }\n void TearDown() override {}\n};\n\nTEST_F(NTP1TokenSelectionTest, basic)\n{\n NTP1OutPoint s(123, 1);\n CTransaction tx;\n // tx.vout.push_back(CTxOut(100*COIN, ));\n\n EXPECT_EQ(wallet->getTokenName(\"\"), \"MyName!\");\n //\n}\n</code>", "source": "SynthCodeNetNoImageTag", "user": "Convert code to text." } ]
[ { "assistant": "<loc_0><loc_0><loc_500><loc_500><_Python_>BOX = [int(j) for j in input().split(' ')]\nif len([j for j in BOX if j % 2 == 0]) > 0:\n print(0)\nelse:\n BOX = [BOX[0] * BOX[1],BOX[1]*BOX[2],BOX[0]*BOX[2]]\n BOX.sort()\n print(BOX[0])\n</code>", "source": "SynthCodeNetNoImageTag", "user": "<code>" } ]
[ { "assistant": "<code><loc_0><loc_0><loc_500><loc_500><_SQL_>SET statement_timeout = 0;\nSET lock_timeout = 0;\nSET client_encoding = 'UTF8';\nSET standard_conforming_strings = on;\nSET check_function_bodies = false;\nSET client_min_messages = warning;\nSET default_tablespace = '';\nSET default_with_oids = false;\n\n-- nodes\nCREATE TABLE nodes (\n graph_id CHARACTER(36) NOT NULL,\n node_id INTEGER NOT NULL,\n shape CHARACTER VARYING(32),\n maxheight INTEGER,\n minheight INTEGER\n);\n\n\n-- edges\nCREATE TABLE edges (\n graph_id CHARACTER(36) NOT NULL,\n parent_id INTEGER NOT NULL,\n child_id INTEGER NOT NULL,\n label CHARACTER VARYING(64) NOT NULL,\n shaper CHARACTER VARYING(512),\n coorder CHARACTER VARYING(512)\n);\n\n\n-- labels assigned to nodes\nCREATE TABLE node_tags (\n graph_id CHARACTER(36) NOT NULL,\n node_id INTEGER NOT NULL,\n tag_key CHARACTER VARYING(64) NOT NULL,\n tag_val CHARACTER VARYING(64)\n);\n\n\n-- data assigned to nodes\nCREATE TABLE node_data (\n graph_id CHARACTER(36) NOT NULL,\n node_id INTEGER NOT NULL,\n data DECIMAL[]\n);\n\n\n-- primary keys\nALTER TABLE ONLY nodes\n ADD CONSTRAINT pk_nodes PRIMARY KEY (graph_id, node_id);\n\nALTER TABLE ONLY edges\n ADD CONSTRAINT pk_edges PRIMARY KEY (graph_id, parent_id, child_id, label);\n\nALTER TABLE ONLY node_tags\n ADD CONSTRAINT pk_node_labels PRIMARY KEY (graph_id, node_id, tag_key);\n\nALTER TABLE ONLY node_data\n ADD CONSTRAINT pk_node_data PRIMARY KEY (graph_id, node_id);\n\n\n-- indexing\nCREATE UNIQUE INDEX index_nodes_graph_node_id\n ON nodes USING BTREE (graph_id, node_id);\n\nCREATE INDEX index_edges_parent_id\n ON edges USING BTREE (graph_id, parent_id);\n\nCREATE INDEX index_edges_child_id\n ON edges USING BTREE (graph_id, child_id);\n\nCREATE INDEX index_node_labels_id ON node_tags USING BTREE (graph_id, node_id);\n\nCREATE INDEX index_node_data_id ON node_data USING BTREE (graph_id, node_id);\n\n\n-- foreign keys\nALTER TABLE ONLY edges ADD CONSTRAINT fk_edges_graph_parent_id\n FOREIGN KEY (graph_id, parent_id) REFERENCES nodes(graph_id, node_id);\n\nALTER TABLE ONLY edges ADD CONSTRAINT fk_edges_graph_child_id\n FOREIGN KEY (graph_id, child_id) REFERENCES nodes(graph_id, node_id);\n\nALTER TABLE ONLY node_tags ADD CONSTRAINT fk_node_graph_node_id\n FOREIGN KEY (graph_id, node_id) REFERENCES nodes(graph_id, node_id);\n\nALTER TABLE ONLY node_data ADD CONSTRAINT fk_node_data_id\n FOREIGN KEY (graph_id, node_id) REFERENCES nodes(graph_id, node_id);\n</code>", "source": "SynthCodeNetNoImageTag", "user": "Convert code to text." } ]
[ { "assistant": "<loc_0><loc_0><loc_500><loc_500><_Python_>a, b, c = map(int, input().split())\n\nans = 0\nans += min(c, a+b+1)\nans += b\n\nprint(ans)\n</code>", "source": "SynthCodeNetNoImageTag", "user": "<code>" } ]
[ { "assistant": "<code><loc_0><loc_0><loc_500><loc_500><_Scala_>package typingsSlinky.reactIntl.anon\n\nimport typingsSlinky.reactIntl.reactIntlStrings.`best fit`\nimport typingsSlinky.reactIntl.reactIntlStrings.code\nimport typingsSlinky.reactIntl.reactIntlStrings.currency\nimport typingsSlinky.reactIntl.reactIntlStrings.language\nimport typingsSlinky.reactIntl.reactIntlStrings.long\nimport typingsSlinky.reactIntl.reactIntlStrings.lookup\nimport typingsSlinky.reactIntl.reactIntlStrings.narrow\nimport typingsSlinky.reactIntl.reactIntlStrings.none\nimport typingsSlinky.reactIntl.reactIntlStrings.region\nimport typingsSlinky.reactIntl.reactIntlStrings.script\nimport typingsSlinky.reactIntl.reactIntlStrings.short\nimport org.scalablytyped.runtime.StObject\nimport scala.scalajs.js\nimport scala.scalajs.js.`|`\nimport scala.scalajs.js.annotation.{JSGlobalScope, JSGlobal, JSImport, JSName, JSBracketAccess}\n\n/* Inlined @formatjs/intl-displaynames.@formatjs/intl-displaynames.DisplayNamesOptions & { value :string | number | object} */\n@js.native\ntrait DisplayNamesOptionsvalues extends StObject {\n \n var fallback: js.UndefOr[code | none] = js.native\n \n var localeMatcher: js.UndefOr[lookup | (`best fit`)] = js.native\n \n var style: js.UndefOr[narrow | short | long] = js.native\n \n var `type`: language | region | script | currency = js.native\n \n var value: String | Double | js.Object = js.native\n}\nobject DisplayNamesOptionsvalues {\n \n @scala.inline\n def apply(`type`: language | region | script | currency, value: String | Double | js.Object): DisplayNamesOptionsvalues = {\n val __obj = js.Dynamic.literal(value = value.asInstanceOf[js.Any])\n __obj.updateDynamic(\"type\")(`type`.asInstanceOf[js.Any])\n __obj.asInstanceOf[DisplayNamesOptionsvalues]\n }\n \n @scala.inline\n implicit class DisplayNamesOptionsvaluesMutableBuilder[Self <: DisplayNamesOptionsvalues] (val x: Self) extends AnyVal {\n \n @scala.inline\n def setFallback(value: code | none): Self = StObject.set(x, \"fallback\", value.asInstanceOf[js.Any])\n \n @scala.inline\n def setFallbackUndefined: Self = StObject.set(x, \"fallback\", js.undefined)\n \n @scala.inline\n def setLocaleMatcher(value: lookup | (`best fit`)): Self = StObject.set(x, \"localeMatcher\", value.asInstanceOf[js.Any])\n \n @scala.inline\n def setLocaleMatcherUndefined: Self = StObject.set(x, \"localeMatcher\", js.undefined)\n \n @scala.inline\n def setStyle(value: narrow | short | long): Self = StObject.set(x, \"style\", value.asInstanceOf[js.Any])\n \n @scala.inline\n def setStyleUndefined: Self = StObject.set(x, \"style\", js.undefined)\n \n @scala.inline\n def setType(value: language | region | script | currency): Self = StObject.set(x, \"type\", value.asInstanceOf[js.Any])\n \n @scala.inline\n def setValue(value: String | Double | js.Object): Self = StObject.set(x, \"value\", value.asInstanceOf[js.Any])\n }\n}\n</code>", "source": "SynthCodeNetNoImageTag", "user": "Convert code to text." } ]
[ { "assistant": "<code><loc_0><loc_0><loc_500><loc_500><_YAML_>uuid: a977406e-3b7d-47ba-b170-438cfabf9498\nlangcode: en\nstatus: true\ndependencies:\n config:\n - field.storage.node.comment\n - node.type.article\n module:\n - comment\n_core:\n default_config_hash: szSOp-8eNsMcuh8usDre1x76RhDKaPhNUuwzRX5cgv4\nid: node.article.comment\nfield_name: comment\nentity_type: node\nbundle: article\nlabel: Comments\ndescription: ''\nrequired: true\ntranslatable: true\ndefault_value:\n -\n status: 2\n cid: 0\n last_comment_name: null\n last_comment_timestamp: 0\n last_comment_uid: 0\n comment_count: 0\ndefault_value_callback: ''\nsettings:\n default_mode: 1\n per_page: 50\n form_location: true\n anonymous: 0\n preview: 1\nfield_type: comment\n</code>", "source": "SynthCodeNetNoImageTag", "user": "Convert code to text." } ]
[ { "assistant": "<loc_0><loc_0><loc_500><loc_500><_SQL_>select\n distinct on (P.id)\n P.id,\n P.secure_id,\n (upper(P.family_name) || ', ' || P.given_name) as \"patient_name\",\n P.nhs_number,\n P.local_patient_id as hospital_numbers,\n P.sex,\n P.born_on,\n date_part('year', age(P.born_on)) as \"age\",</code>", "source": "SynthCodeNetNoImageTag", "user": "<code>" } ]
[ { "assistant": "<code><loc_0><loc_0><loc_500><loc_500><_JavaScript_>const OOFF = (prefix, sender) => {\n\treturn `OOFF MANDA OOFF \n\tSE TU E MEMBRO COMUM DEVE UM PIZZA PRA NOIA HEIN KKKKKK\n\tSEJA VEM VINDO AO MENU DO OOFF, O BOT ESTA PARA AJUDAR OK?\n\tVAMOS LA PARA CADA COMANDO DIGIDE (!)\n\t-----------------------------------\n\t!STICKER\n\t!TOIM\n\t!TTS\n\t!FELESPA\n\t!TERRA\n\t!PIVETINHO\n\t!DOMINAT\n\t!MALOKA\n\t!CODORNA\n !PEDRO\n !PANTERA\n\t!KABULOSO\n`\n}\n\nexports.OOFF = OOFF</code>", "source": "SynthCodeNetNoImageTag", "user": "Convert code to text." } ]
[ { "assistant": "<loc_0><loc_0><loc_500><loc_500><_C++_>#define __USE_MINGW_ANSI_STDIO 0\n#include <bits/stdc++.h>\n#define IOS ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);\n#define endl '\\n'\n#define rep(i, a, b) for (int i = a; i < b; i++)\n#define ff first\n#define pii pair<int, int>\n#define vii vector< pair<int,int> >\n#define vi vector<int>\n#define vvi vector< vector< int> >\n#define ss second\n#define mod 1000000007\n#define pb push_back\n#define mp make_pair\n#define int long long\n#define all(a) a.begin(), a.end()\n#define inf (1LL<<61)\n#define ull unsigned long long\n#define trace1(x) cout<<#x<<\": \"<<x<<endl\n#define trace2(x, y) cout<<#x<<\": \"<<x<<\" | \"<<#y<<\": \"<<y<<endl\n#define trace4(x, y, z, d) cout<<#x<<\":\" <<x<<\" | \"<<#y<<\": \"<<y<<\" | \"<<#z<<\": \"<<z<<\" | \"<<#d<<\": \"<<d<<endl\n\n#define trace3(x, y, z) cout<<#x<<\":\" <<x<<\" | \"<<#y<<\": \"<<y<<\" | \"<<#z<<\": \"<<z<<endl\n#define debug1(x) cerr << #x << \": \" << x <<'\\n'\n#define debug2(x, y) cerr << #x << \": \" << x << '\\t' << #y << \": \" << y <<'\\n'\n#define debug3(x, y, z) cerr << #x << \": \" << x << '\\t' << #y << \": \" << y << '\\t' << #z << \": \" << z <<'\\n'\nusing namespace std;\n//int dx[]={1,0,-1, 0};int dy[]={0,1,0, -1}; //4 Direction\n//int dx[]={1,1,0,-1,-1,-1,0,1};int dy[]={0,1,1,1,0,-1,-1,-1};//8 direction\nbool compare(const pair<pair<string,int>, int> &a,const pair<pair<string,int>, int> &b)\n{\n if(a.ff.ff == b.ff.ff) {\n return (a.ff.ss > b.ff.ss);\n }\n return (a.ff.ff<b.ff.ff);\n}\nint poww(int a, int b)\n{\n int res = 1;\n for(int i = 1; i<=b; ++i)\n res *= a;\n\n return res;\n}\nint findlcm(int arr[], int n) \n{ \n // Initialize result \n int ans = arr[0]; \n \n // ans contains LCM of arr[0], ..arr[i] \n // after i'th iteration, \n for (int i = 1; i < n; i++) \n ans = (((arr[i] * ans)) / \n (__gcd(arr[i], ans))); \n \n return ans; \n}\nbool prime[100001];\nvoid SieveOfEratosthenes(int n) \n{\n memset(prime, true, sizeof(prime));\n\n for (int p=2; p*p<=n; p++)\n {\n if (prime[p] == true)\n {\n for (int i=p*p; i<=n; i += p)\n prime[i] = false;\n }\n }\n}\n\n//Define mx for maximum range and MOD for large numbers\n#define mx 100004\n#define MOD 1000000007;\n// Declare all the variables and global functions here - \nint n, m;\nvi a[11];\nvvi b;\nvoid generateAllBinaryStrings(int n, int arr[], int i) \n{ \n if (i == n) { \n \tvi temp;\n \trep(i, 0, n){\n \t\ttemp.pb(arr[i]);\n \t}\n \tb.pb(temp);\n return; \n } \n \n // First assign \"0\" at ith position \n // and try for all other permutations \n // for remaining positions \n arr[i] = 0; \n generateAllBinaryStrings(n, arr, i + 1); \n \n // And then assign \"1\" at ith position \n // and try for all other permutations \n // for remaining positions \n arr[i] = 1; \n generateAllBinaryStrings(n, arr, i + 1); \n}\nint32_t main()\n{\n IOS;\n // #ifndef ONLINE_JUDGE\n // freopen(\"input.txt\",\"r\",stdin);\n // freopen(\"output.txt\",\"w\",stdout);\n\t// #endif\n /********************* From here **********************/\n cin >> n >> m;\n rep(i, 0, m){\n \tint k;\n \tcin >> k;\n \trep(j, 0, k){\n \t\tint s;\n \t\tcin >> s;\n \t\ta[i+1].pb(s);\n \t}\n }\n int p[m];\n int arr[n];\n rep(i, 0, m){\n \tcin >> p[i];\n }\n int ans = 0;\n generateAllBinaryStrings(n,arr,0 );\n rep(i,0,b.size()){\n \tvi comb = b[i];\n \tbool fg = true;\n \t// rep(j, 0, comb.size()){\n \t// \t\tcout << comb[j] << \" \";\n \t// }\n \t// cout << endl;\n \trep(j, 0, m){\n \t\tvi check = a[j+1];\n \t\tint cnt = 0;\n \t\trep(k, 0, check.size()){\n \t\t\tif(comb[check[k]-1] == 1 ){\n \t\t\t\tcnt++;\n \t\t\t}\n \t\t}\n\n \t\tif(cnt%2 != p[j]){\n \t\t\tfg = false;\n \t\t\tbreak;\n \t\t}\n \t}\n\n \t\n \tif(fg){\n \t\t// rep(j, 0, comb.size()){\n \t\t// \tcout << comb[j] << \" \";\n \t\t// }\n \t\t// cout << endl;\n \t\tans++;\n \t}\n \t\n }\n\n cout << ans << endl;\n \n \n}</code>", "source": "SynthCodeNetNoImageTag", "user": "<code>" } ]
[ { "assistant": "<code><loc_0><loc_0><loc_500><loc_500><_Kotlin_>package com.sjl.bookmark.kotlin.util\n\nimport com.sjl.bookmark.app.MyApplication\nimport com.sjl.core.util.PreferencesHelper\n\n/**\n * TODO\n *\n * @author Kelly\n * @version 1.0.0\n * @filename SpUtils\n * @time 2021/1/21 11:07\n * @copyright(C) 2021 song\n */\nobject SpUtils{\n private const val KEY_COOKIE = \"key_cookie\"\n private var ph = PreferencesHelper.getInstance(MyApplication.getContext())\n\n fun saveCookie(set: Set<String>?) {\n ph.put(KEY_COOKIE, set)\n }\n\n fun getCookies() = ph.get(KEY_COOKIE,HashSet<String>()) as? Set<String>\n\n fun clearCookies() {\n saveCookie(HashSet<String>())\n }\n\n\n}\n\n</code>", "source": "SynthCodeNetNoImageTag", "user": "Convert code to text." } ]
[ { "assistant": "<loc_0><loc_0><loc_500><loc_500><_Kotlin_> * \"License\"); you may not use this file except in compliance\n * with the License. You may obtain a copy of the License at:\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on\n * an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\npackage com.github.marlonlom.timeago.sample.utils\n\nimport java.util.ArrayList</code>", "source": "SynthCodeNetNoImageTag", "user": "<code>" } ]
[ { "assistant": "<code><loc_0><loc_0><loc_500><loc_500><_Java_>\t\tsb.append(\")\");\n\t\tlinebreak();\n\t}\n\n\tprivate String getComplexMethodTypeAsString(ComplexType type) {\n\t\tString genericType = \"Object\";\n\t\tif (type.getDomainObjectType() != null) {\t\t\t\n\t\t\tgenericType = type.getDomainObjectType().getName();\n\t\t} else {\n\t\t\tgenericType = type.getType();\n\t\t}\n\t\tif (type.getCollectionType() != CollectionType.NONE) {\n\t\t\treturn type.getCollectionType().getName() + \"<\" + genericType + \">\";\n\t\t}\n\t\treturn genericType;\n\t}\n\n\tprivate String getReferenceTypeAsString(Reference reference) {\n\t\tif (reference.getCollectionType() != CollectionType.NONE)\n\t\t\treturn reference.getCollectionType().getName() + \"<\" + reference.getDomainObjectType().getName() + \">\";\n\t\treturn reference.getDomainObjectType().getName();\n\t}\n\n\tprotected void printReferences(int indentation) {\n\t\tassociationInfos.forEach((link, info) -> {\n\t\t\tboolean suppressMultiplicity = \n\t\t\t\tinfo.getMultiplicityFirstParticipant() != null &&\n\t\t\t\tinfo.getMultiplicityFirstParticipant().isConstant(1) && \n\t\t\t\tinfo.getMultiplicitySecondParticipant() != null &&\n\t\t\t\tinfo.getMultiplicitySecondParticipant().isConstant(1);\n\n\t\t\tprintIndentation(indentation);\n\n\t\t\t// e.g.: first\n\t\t\tsb.append(link.getFirstParticipant()).append(\" \");\t\t\t\n\n\t\t\t// e.g.: first \"1\"\n\t\t\tif (info.getMultiplicityFirstParticipant() != null && !suppressMultiplicity)\n\t\t\t\tsb.append(\"\\\"\").append(printMultiplicity(info.getMultiplicityFirstParticipant())).append(\"\\\"\").append(\" \");\t\n\n\t\t\t// e.g.: first \"1\" *-->\n\t\t\tprintLink(info);\n\n\t\t\t// e.g.: first \"1\" *--> \"*\"\n\t\t\tif (info.getMultiplicitySecondParticipant() != null && !suppressMultiplicity)\n\t\t\t\tsb.append(\"\\\"\").append(printMultiplicity(info.getMultiplicitySecondParticipant())).append(\"\\\"\").append(\" \");\n\n\t\t\t// e.g.: first \"1\" *--> \"*\" second\n\t\t\tsb.append(link.getSecondParticipant());\n\n\t\t\t// e.g.: first \"1\" *--> \"*\" second : something\n\t\t\tif (!\"\".equals(link.getLabel()))\n\t\t \t\tsb.append(\" : \").append(link.getLabel());\n\t\t \tlinebreak();\n\t\t});\n\n\t\tfor (UMLRelationship extension : extensions) {\n\t\t\tprintIndentation(indentation);\n\t\t\tsb.append(extension.getSource()).append(\" \").append(extension.getSymbol()).append(\" \").append(extension.getTarget());\n\t\t\tlinebreak();\n\t\t}\n\t}\n\n\tprivate void printLink(AssociationInfo info) {\n\t\tboolean multFirstIsMany = info.getMultiplicityFirstParticipant() != null && info.getMultiplicityFirstParticipant().getMax() > 1,\n\t\t\t\tmultSecondIsMany = info.getMultiplicitySecondParticipant() != null && info.getMultiplicitySecondParticipant().getMax() > 1;\n\t\tString aggregationSymbol = (info.getAggregateSource().equals(info.getAggregateTarget())) ? \"*\" : \"o\";\n\n\t\tif (multSecondIsMany && !multFirstIsMany)\n\t\t\tsb.append(aggregationSymbol);\n\t\telse if (info.getIsFirstNavigableFromSecond())\n\t\t\tsb.append(\"<\");\n\n\t\tsb.append(\"--\");\n\n\t\tif (multFirstIsMany && !multSecondIsMany) {\n\t\t\tsb.append(aggregationSymbol); \n\t\t} else if (info.getIsSecondNavigableFromFirst())\n\t\t\tsb.append(\">\");\t\t\t\t\t\t\t\n\t\tsb.append(\" \");\n\t}\n\n\tprivate String printMultiplicity(Multiplicity multiplicity) {\n\t\tint min = multiplicity.getMin(), max = multiplicity.getMax();\n\n\t\tif (min == max)\n\t\t\treturn Integer.toString(min);\n\t\t\n\t\tif (min == 0 && max == Multiplicity.STAR)\n\t\t\treturn \"*\";\n\n\t\treturn Integer.toString(min) + \"..\" + Integer.toString(max);\n\t}\n\n\tprotected void printIndentation(int amount) {\n\t\tfor (int i = 0; i < amount; i++) {\n\t\t\tsb.append(\"\\t\");\n\t\t}\n\t}\n}\n</code>", "source": "SynthCodeNetNoImageTag", "user": "Convert code to text." } ]
[ { "assistant": "<code><loc_0><loc_0><loc_500><loc_500><_HTML_>---\nlayout: typedoc\ntitle: 'Facets | @msrvida/sanddance-specs'\n---\n<header>\n<div class=\"tsd-page-title\">\n\t<div class=\"typedoc-container\">\n\t\t<ul class=\"tsd-breadcrumb\">\n\t\t\t<li>\n\t\t\t\t<a href=\"../modules.html\">@msrvida/sanddance-specs</a>\n\t\t\t</li>\n\t\t\t<li>\n\t\t\t\t<a href=\"facets.html\">Facets</a>\n\t\t\t</li>\n\t\t</ul>\n\t\t<h1>Interface Facets</h1>\n\t</div>\n</div>\n</header>\n<div class=\"container container-main\">\n<div class=\"row\">\n\t<div class=\"col-8 col-content\">\n\t\t<section class=\"tsd-panel tsd-comment\">\n\t\t\t<div class=\"tsd-comment tsd-typography\">\n\t\t\t\t<div class=\"lead\">\n\t\t\t\t\t<p>Column to use for faceting into small multiples.</p>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</section>\n\t\t<section class=\"tsd-panel tsd-hierarchy\">\n\t\t\t<h3>Hierarchy</h3>\n\t\t\t<ul class=\"tsd-hierarchy\">\n\t\t\t\t<li>\n\t\t\t\t\t<span class=\"target\">Facets</span>\n\t\t\t\t</li>\n\t\t\t</ul>\n\t\t</section>\n\t\t<section class=\"tsd-panel-group tsd-index-group\">\n\t\t\t<h2>Index</h2>\n\t\t\t<section class=\"tsd-panel tsd-index-panel\">\n\t\t\t\t<div class=\"tsd-index-content\">\n\t\t\t\t\t<section class=\"tsd-index-section \">\n\t\t\t\t\t\t<h3>Properties</h3>\n\t\t\t\t\t\t<ul class=\"tsd-index-list\">\n\t\t\t\t\t\t\t<li class=\"tsd-kind-property tsd-parent-kind-interface\"><a href=\"facets.html#columns\" class=\"tsd-kind-icon\">columns</a></li>\n\t\t\t\t\t\t\t<li class=\"tsd-kind-property tsd-parent-kind-interface\"><a href=\"facets.html#rows\" class=\"tsd-kind-icon\">rows</a></li>\n\t\t\t\t\t\t</ul>\n\t\t\t\t\t</section>\n\t\t\t\t</div>\n\t\t\t</section>\n\t\t</section>\n\t\t<section class=\"tsd-panel-group tsd-member-group \">\n\t\t\t<h2>Properties</h2>\n\t\t\t<section class=\"tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface\">\n\t\t\t\t<a name=\"columns\" class=\"tsd-anchor\"></a>\n\t\t\t\t<h3>columns</h3>\n\t\t\t\t<div class=\"tsd-signature tsd-kind-icon\">columns<span class=\"tsd-signature-symbol\">:</span> <span class=\"tsd-signature-type\">number</span></div>\n\t\t\t\t<aside class=\"tsd-sources\">\n\t\t\t\t\t<ul></code>", "source": "SynthCodeNetNoImageTag", "user": "Convert code to text." } ]
[ { "assistant": "<code><loc_0><loc_0><loc_500><loc_500><_SQL_>-- execsql { PRAGMA cache_size = 20 }\nPRAGMA cache_size = 20</code>", "source": "SynthCodeNetNoImageTag", "user": "Convert code to text." } ]
[ { "assistant": "<code><loc_0><loc_0><loc_500><loc_500><_SQL_>CREATE PROCEDURE db0001 (short_name varchar(12) not null) \r\nBEGIN\r\nEND;\r\n\r\nPROCEDURE db0002 (short_name varchar(12) not null) =\r\nDECLARE\r\nx = varchar(12) not null; \r\nn = i4 not null; \r\nerr = varchar(80) not null not default; \r\nBEGIN \r\n\r\n if short_name = '' then \r\n err := 'db0001: Pusty short_name!'; \r\n raise error 8001 :err; \r\n return -1; \r\n endif; \r\n\r\n select :x = bank_sh_name from \"cafa\". banks_directory_066 \r\n where bank_sh_name = :short_name; \r\n if iierrornumber != 0 THEN rollback; \r\n err := 'db0001: Podczas sprawdzania unikalnosci short_name \r\n banku wystapil blad!'; \r\n raise error 8001 :err; \r\n return -1; \r\n endif; \r\n\r\n n := iirowcount; \r\n commit; \r\n return n; \r\nEND; \r\n\r\n-- OR with AS instead of =:\r\n\r\n\r\nPROCEDURE db0003 (short_name varchar(12) not null) \r\nAS\r\nDECLARE\r\nx = varchar(12) not null; \r\nn = i4 not null; \r\nerr = varchar(80) not null not default; \r\nBEGIN \r\n\r\n if short_name = '' then \r\n err := 'db0001: Pusty short_name!'; \r\n raise error 8001 :err; \r\n return -1; \r\n endif; \r\n\r\n select :x = bank_sh_name from \"cafa\". banks_directory_066 \r\n where bank_sh_name = :short_name; \r\n if iierrornumber != 0 THEN rollback; \r\n err := 'db0001: Podczas sprawdzania unikalnosci short_name \r\n banku wystapil blad!'; \r\n raise error 8001 :err; \r\n return -1; \r\n endif; \r\n\r\n n := iirowcount; \r\n commit; \r\n return n; \r\nEND \r\n\r\n\r\n</code>", "source": "SynthCodeNetNoImageTag", "user": "Convert code to text." } ]
[ { "assistant": "<code><loc_0><loc_0><loc_500><loc_500><_ObjectiveC_>.H 2 \"Unordered\"\n.P\nAsterisks tight:\n.BL\n.LI\nasterisk 1\n.LI\nasterisk 2\n.LI\nasterisk 3\n.LE 1\n.P\nAsterisks loose:\n.BL\n.LI\nasterisk 1\n.LI\nasterisk 2\n.LI\nasterisk 3\n.LE 1\n\\l'\\n(.lu*8u/10u'\n.P\nPluses tight:\n.BL\n.LI\nPlus 1\n.LI\nPlus 2\n.LI\nPlus 3\n.LE 1\n.P\nPluses loose:\n.BL\n.LI\nPlus 1\n.LI\nPlus 2\n.LI\nPlus 3\n.LE 1\n\\l'\\n(.lu*8u/10u'\n.P\nMinuses tight:\n.BL\n.LI\nMinus 1\n.LI\nMinus 2\n.LI\nMinus 3\n.LE 1\n.P\nMinuses loose:\n.BL\n.LI\nMinus 1\n.LI\nMinus 2\n.LI\nMinus 3\n.LE 1\n.H 2 \"Ordered\"\n.P\nTight:\n.AL\n.LI\nFirst\n.LI\nSecond\n.LI\nThird\n.LE 1\n.P\nand:\n.AL\n.LI\nOne\n.LI\nTwo\n.LI\nThree\n.LE 1\n.P\nLoose using tabs:\n.AL\n.LI\nFirst\n.LI\nSecond\n.LI\nThird\n.LE 1\n.P\nand using spaces:\n.AL\n.LI\nOne\n.LI\nTwo\n.LI\nThree\n.LE 1\n.P\nMultiple paragraphs:\n.AL\n.LI\nItem 1, graf one.\n.P\nItem 2. graf two. The quick brown fox jumped over the lazy dog's\nback.\n.LI\nItem 2.\n.LI\nItem 3.\n.LE 1\n.H 2 \"Nested\"\n.BL\n.LI\nTab\n.BL\n.LI\nTab\n.BL\n.LI\nTab\n.LE 1\n.LE 1\n.LE 1\n.P\nHere's another:\n.AL\n.LI\nFirst\n.LI\nSecond:\n.BL\n.LI\nFee\n.LI\nFie\n.LI\nFoe\n.LE 1\n.LI\nThird\n.LE 1\n.P\nSame thing but with paragraphs:\n.AL\n.LI\nFirst\n.LI\nSecond:\n.BL\n.LI\nFee\n.LI\nFie\n.LI\nFoe\n.LE 1\n.LI\nThird\n.LE 1\n.P\nThis was an error in Markdown 1.0.1:\n.BL\n.LI\nthis\n.BL\n.LI\nsub\n.LE 1\n.P\nthat\n.LE 1\n</code>", "source": "SynthCodeNetNoImageTag", "user": "Convert code to text." } ]
[ { "assistant": "<loc_0><loc_0><loc_500><loc_500><_Java_>\nimport java.io.IOException;\nimport java.io.InputStream;\nimport java.io.PrintWriter;\nimport java.util.Arrays;\nimport java.util.InputMismatchException;\n\npublic class Main {\n FastScanner in = new FastScanner(System.in);\n PrintWriter out = new PrintWriter(System.out);\n\n public static void main(String[] args) {\n new Main().calc();\n }\n\n public void calc() {\n int N = in.nextInt();\n int[] d = new int[N];\n for (int i = 0; i < N; i++) {\n d[i] = in.nextInt();\n }\n\n Arrays.sort(d);\n\n int before = 0;\n int ans = 0;\n\n for (int i = 0; i < N; i++) {\n if (before < d[i]) {\n ans++;\n before = d[i];\n }\n }\n\n out.println(ans);\n out.close();\n }\n\n class FastScanner {\n private InputStream stream;\n private byte[] buf = new byte[1024];\n private int curChar;\n private int numChars;\n\n public FastScanner(InputStream stream) {\n this.stream = stream;\n }\n\n int read() {\n if (numChars == -1)\n throw new InputMismatchException();\n if (curChar >= numChars) {\n curChar = 0;\n try {\n numChars = stream.read(buf);\n } catch (IOException e) {\n throw new InputMismatchException();\n }\n if (numChars <= 0)\n return -1;\n }\n return buf[curChar++];\n }\n\n boolean isSpaceChar(int c) {\n return c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1;\n }\n\n boolean isEndline(int c) {\n return c == '\\n' || c == '\\r' || c == -1;\n }\n\n int nextInt() {\n return Integer.parseInt(next());\n }\n\n int[] nextIntArray(int n) {\n int[] array = new int[n];\n for (int i = 0; i < n; i++)\n array[i] = nextInt();\n\n return array;\n }\n\n int[][] nextIntMap(int n, int m) {\n int[][] map = new int[n][m];\n for (int i = 0; i < n; i++) {\n map[i] = in.nextIntArray(m);\n }\n return map;\n }\n\n long nextLong() {\n return Long.parseLong(next());\n }\n\n long[] nextLongArray(int n) {\n long[] array = new long[n];\n for (int i = 0; i < n; i++)\n array[i] = nextLong();\n\n return array;\n }\n\n long[][] nextLongMap(int n, int m) {\n long[][] map = new long[n][m];\n for (int i = 0; i < n; i++) {\n map[i] = in.nextLongArray(m);\n }\n return map;\n }\n\n double nextDouble() {\n return Double.parseDouble(next());\n }\n\n double[] nextDoubleArray(int n) {\n double[] array = new double[n];\n for (int i = 0; i < n; i++)\n array[i] = nextDouble();\n\n return array;\n }\n\n double[][] nextDoubleMap(int n, int m) {\n double[][] map = new double[n][m];\n for (int i = 0; i < n; i++) {\n map[i] = in.nextDoubleArray(m);\n }\n return map;\n }\n\n String next() {\n int c = read();\n while (isSpaceChar(c))\n c = read();\n StringBuilder res = new StringBuilder();\n do {\n res.appendCodePoint(c);\n c = read();\n } while (!isSpaceChar(c));\n return res.toString();\n }\n\n String[] nextStringArray(int n) {\n String[] array = new String[n];\n for (int i = 0; i < n; i++)\n array[i] = next();\n\n return array;\n }\n\n String nextLine() {\n int c = read();\n while (isEndline(c))\n c = read();\n StringBuilder res = new StringBuilder();\n do {\n res.appendCodePoint(c);\n c = read();\n } while (!isEndline(c));\n return res.toString();\n }\n }\n}\n</code>", "source": "SynthCodeNetNoImageTag", "user": "<code>" } ]
[ { "assistant": "<code><loc_0><loc_0><loc_500><loc_500><_Ruby_># frozen_string_literal: true\n\nrequire 'spec_helper'\n</code>", "source": "SynthCodeNetNoImageTag", "user": "Convert code to text." } ]
[ { "assistant": "<code><loc_0><loc_0><loc_500><loc_500><_Scala_>package com.avast.cactus.v3\n\nimport com.avast.cactus.ResultOrErrors\nimport com.avast.cactus.internal._</code>", "source": "SynthCodeNetNoImageTag", "user": "Convert code to text." } ]
[ { "assistant": "<code><loc_0><loc_0><loc_500><loc_500><_Java_>import java.util.concurrent.TimeUnit;\nimport java.util.logging.Handler;\nimport java.util.logging.LogManager;\nimport java.util.logging.Logger;\n\nimport ch.qos.logback.classic.Level;\nimport ch.qos.logback.classic.LoggerContext;\nimport org.apache.commons.logging.Log;\nimport org.apache.commons.logging.LogFactory;\nimport org.junit.jupiter.api.AfterEach;\nimport org.junit.jupiter.api.BeforeEach;\nimport org.junit.jupiter.api.Test;\nimport org.junit.jupiter.api.extension.ExtendWith;\nimport org.junit.jupiter.api.io.TempDir;\nimport org.slf4j.bridge.SLF4JBridgeHandler;\nimport org.slf4j.impl.StaticLoggerBinder;\n\nimport org.springframework.boot.DefaultBootstrapContext;\nimport org.springframework.boot.SpringApplication;\nimport org.springframework.boot.context.event.ApplicationFailedEvent;\nimport org.springframework.boot.context.event.ApplicationStartingEvent;</code>", "source": "SynthCodeNetNoImageTag", "user": "Convert code to text." } ]
[ { "assistant": "<loc_0><loc_0><loc_500><loc_500><_C++_>#include <bits/stdc++.h>\n#include <ext/pb_ds/assoc_container.hpp>\n#include <ext/pb_ds/tree_policy.hpp>\n\nusing namespace std;\nusing namespace __gnu_pbds;\n \n#define fi first\n#define se second\n#define mp make_pair\n#define pb push_back\n \ntypedef long long ll;\ntypedef pair<ll,ll> ii;\ntypedef vector<int> vi;\ntypedef long double ld; \ntypedef tree<ii, null_type, less<ii>, rb_tree_tag, tree_order_statistics_node_update> pbds;\n\nint n,m; \nchar a[45][45];\nint tot[45][45];\nint dp[45][45];\n\nint sub(int x1, int y1, int x2, int y2)\n{\n\tint ans=dp[x2][y2];\n\tif(x1) ans-=dp[x1-1][y2];\n\tif(y1) ans-=dp[x2][y1-1];\n\tif(x1&&y1) ans+=dp[x1-1][y1-1];\n\treturn ans;\n}\n\nint f[45][45][45][45];\n\nint calc(int x1, int y1, int x2, int y2)\n{\n\tif(x1==0&&y1==0&&x2==n-1&&y2==m-1) return 0;\n\tif(f[x1][y1][x2][y2]!=-1) return f[x1][y1][x2][y2];\n\tint ans = int(1e9);\n\tfor(int x3=x2+1;x3<n;x3++)\n\t{\n\t\tfor(int y3=y2+1;y3<m;y3++)\n\t\t{\n\t\t\tans=min(ans,calc(min(x3,x1),min(y3,y1),max(x3,x2),max(y3,y2))+sub(x1,y2+1,x2,y3)+sub(x2+1,y1,x3,y2));\n\t\t}\n\t}\n\tfor(int x3=x2+1;x3<n;x3++)\n\t{\n\t\tfor(int y3=0;y3<y1;y3++)\n\t\t{\n\t\t\tans=min(ans,calc(min(x3,x1),min(y3,y1),max(x3,x2),max(y3,y2))+sub(x1,y3,x2,y1-1)+sub(x2+1,y1,x3,y2));\n\t\t}\n\t}\n\tfor(int x3=0;x3<x1;x3++)\n\t{\n\t\tfor(int y3=0;y3<y1;y3++)\n\t\t{\n\t\t\tans=min(ans,calc(min(x3,x1),min(y3,y1),max(x3,x2),max(y3,y2))+sub(x3,y1,x1-1,y2)+sub(x1,y3,x2,y1-1));\n\t\t}\n\t}\n\tfor(int x3=0;x3<x1;x3++)\n\t{\n\t\tfor(int y3=y2+1;y3<m;y3++)\n\t\t{\n\t\t\tans=min(ans,calc(min(x3,x1),min(y3,y1),max(x3,x2),max(y3,y2))+sub(x3,y1,x1-1,y2)+sub(x1,y2+1,x2,y3));\n\t\t}\n\t}\n\treturn (f[x1][y1][x2][y2]=ans);\n}\n\nint main()\n{\n\tios_base::sync_with_stdio(0); cin.tie(0);\n\tmemset(f,-1,sizeof(f));\n\tcin>>n>>m; int px=0; int py=0;\n\tfor(int i=0;i<n;i++)\n\t{\n\t\tfor(int j=0;j<m;j++)\n\t\t{\n\t\t\tcin>>a[i][j];\n\t\t\tif(a[i][j]=='P') px=i,py=j;\n\t\t}\n\t}\n\tfor(int i=0;i<n;i++)\n\t{\n\t\tfor(int j=0;j<m;j++)\n\t\t{\n\t\t\tdp[i][j]=(a[i][j]=='#');\n\t\t\tif(i) dp[i][j]+=dp[i-1][j];\n\t\t\tif(j) dp[i][j]+=dp[i][j-1];\n\t\t\tif(i&&j) dp[i][j]-=dp[i-1][j-1];\n\t\t}\n\t}\n\tint ans = int(1e9);\n\tfor(int x1=0;x1<n;x1++)\n\t{\n\t\tfor(int y1=0;y1<m;y1++)\n\t\t{\n\t\t\tfor(int x2=x1;x2<n;x2++)\n\t\t\t{\n\t\t\t\tfor(int y2=y1;y2<m;y2++)\n\t\t\t\t{\n\t\t\t\t\tif(px>=x1&&px<=x2&&py>=y1&&py<=y2)\n\t\t\t\t\t{\n\t\t\t\t\t\tint ext = calc(x1,y1,x2,y2);\n\t\t\t\t\t\tint s2 = sub(x1,y1,px,py);\n\t\t\t\t\t\ts2 = min(sub(px,y1,x2,py),s2);\n\t\t\t\t\t\ts2 = min(sub(px,py,x2,y2),s2);\n\t\t\t\t\t\ts2 = min(sub(x1,py,px,y2),s2);\n\t\t\t\t\t\t//cerr<<x1<<' '<<y1<<' '<<x2<<' '<<y2<<' '<<ext<<' '<<s2<<'\\n';\n\t\t\t\t\t\tans=min(ans,s2+ext);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\tcout<<ans<<'\\n';\n}\n</code>", "source": "SynthCodeNetNoImageTag", "user": "<code>" } ]
[ { "assistant": "<code><loc_0><loc_0><loc_500><loc_500><_FORTRAN_>subroutine init_particles(IPP)\n#include \"cpp_options.h\"\n\n! use global, only : Npts,iswitch,xyz,tsg,&\n! target_density,pickup,&\n! rec_num,tt,dt_file,pk2f,&\n! NPP,FnPartiInit,glider_position\n use global\n\n implicit none\n integer*8, intent(in):: IPP\n\n print*, \"initialize particles for case\", IPP\n\n open(FnPartiInitId,file=trim(FnPartiInit),form='unformatted',&\n recl=8*Npts*3,convert='BIG_ENDIAN',&\n access='direct',status='old')\n read(FnPartiInitId,rec=1) xyz(:,:,IPP)\n close(FnPartiInitId)\n\nprint*, \"initial x\",xyz(:,1,IPP)\nprint*, \"initial y\",xyz(:,2,IPP)\nprint*, \"initial z\",xyz(:,3,IPP)\n\n#ifdef isArgo\n xyz(:,3,IPP)=0\n#endif\n\n#ifdef isGlider\n xyz(:,3,IPP)=0\n !xyz(1,1,IPP)= 101.1\n !xyz(1,2,IPP)= 200.1\n !xyz(2,1,IPP)= 99.9\n !xyz(2,2,IPP)= 199.9\n\n glider_position(:,3,IPP)=xyz(:,1,IPP)\n glider_position(:,4,IPP)=xyz(:,2,IPP)\n\n xyz(:,1:2,IPP)=xyz(:,1:2,IPP)+0.01\n !xyz(1,1:2,IPP)=2\n glider_position(:,1,IPP)=xyz(:,1,IPP)\n glider_position(:,2,IPP)=xyz(:,2,IPP)\n\n\n \n\n glider_clock(:,1,IPP)=0\n glider_cycle(:,:)=0\n glider_angle(:,:)=60\n\n#endif\n\n#ifndef isArgo\n#ifndef isGlider\n call set_boundary(IPP)\n ! Reset the particle depth to find the particle density\n if (target_density>0) then\n tsg(:,3,IPP)=target_density\n call jump(IPP)\n endif\n#endif\n#endif\n\n print*, \"maximum init\", maxval(xyz(:,1,IPP)),maxval(xyz(:,2,IPP)),maxval(xyz(:,3,IPP))\n\nend subroutine init_particles\n\n</code>", "source": "SynthCodeNetNoImageTag", "user": "Convert code to text." } ]
[ { "assistant": "<loc_0><loc_0><loc_500><loc_500><_Nim_>import sequtils, strutils, math\n\nvar\n inputhw = stdin.readLine.split(' ').map(proc(x: string): int = x.parseInt)\n inputs: seq[string] = @[]\nfor i in 1..inputhw[0]:\n inputs.add(stdin.readLine)\n\nfor i in 0..<inputhw[0]:\n for j in 0..<inputhw[1]:\n if inputs[i][j] == '#':\n if i > 0:\n if inputs[i-1][j] == '#':\n continue\n if i < inputhw[0] - 1:\n if inputs[i+1][j] == '#':\n continue\n if j > 0:\n if inputs[i][j-1] == '#':\n continue\n if j < inputhw[1] - 1:\n if inputs[i][j+1] == '#':\n continue\n quit(\"No\", QuitSuccess)\n\necho \"Yes\"</code>", "source": "SynthCodeNetNoImageTag", "user": "<code>" } ]
[ { "assistant": "<loc_0><loc_0><loc_500><loc_500><_Nim_>## distribution for complete text of the license and disclaimer of any warranty.\n##\n## Alternatively, this file may be used under the terms of Open CASCADE\n## commercial license or contractual agreement.\n\ndiscard \"forward decl of TCollection_HAsciiString\"\ndiscard \"forward decl of StepShape_GeometricSetSelect\"\ndiscard \"forward decl of StepShape_GeometricSet\"\ndiscard \"forward decl of StepShape_GeometricSet\"\ntype\n HandleC1C1* = Handle[StepShapeGeometricSet]\n StepShapeGeometricSet* {.importcpp: \"StepShape_GeometricSet\",\n header: \"StepShape_GeometricSet.hxx\", bycopy.} = object of StepGeomGeometricRepresentationItem ##\n ## !\n ## Returns\n ## a\n ## GeometricSet\n\n\nproc constructStepShapeGeometricSet*(): StepShapeGeometricSet {.constructor,\n importcpp: \"StepShape_GeometricSet(@)\", header: \"StepShape_GeometricSet.hxx\".}\nproc init*(this: var StepShapeGeometricSet; aName: Handle[TCollectionHAsciiString];\n aElements: Handle[StepShapeHArray1OfGeometricSetSelect]) {.\n importcpp: \"Init\", header: \"StepShape_GeometricSet.hxx\".}\nproc setElements*(this: var StepShapeGeometricSet;\n aElements: Handle[StepShapeHArray1OfGeometricSetSelect]) {.\n importcpp: \"SetElements\", header: \"StepShape_GeometricSet.hxx\".}\nproc elements*(this: StepShapeGeometricSet): Handle[\n StepShapeHArray1OfGeometricSetSelect] {.noSideEffect, importcpp: \"Elements\",\n header: \"StepShape_GeometricSet.hxx\".}\nproc elementsValue*(this: StepShapeGeometricSet; num: int): StepShapeGeometricSetSelect {.\n noSideEffect, importcpp: \"ElementsValue\", header: \"StepShape_GeometricSet.hxx\".}\nproc nbElements*(this: StepShapeGeometricSet): int {.noSideEffect,\n importcpp: \"NbElements\", header: \"StepShape_GeometricSet.hxx\".}\ntype\n StepShapeGeometricSetbaseType* = StepGeomGeometricRepresentationItem\n\nproc getTypeName*(): cstring {.importcpp: \"StepShape_GeometricSet::get_type_name(@)\",\n header: \"StepShape_GeometricSet.hxx\".}\nproc getTypeDescriptor*(): Handle[StandardType] {.\n importcpp: \"StepShape_GeometricSet::get_type_descriptor(@)\",\n header: \"StepShape_GeometricSet.hxx\".}\nproc dynamicType*(this: StepShapeGeometricSet): Handle[StandardType] {.noSideEffect,\n importcpp: \"DynamicType\", header: \"StepShape_GeometricSet.hxx\".}</code>", "source": "SynthCodeNetNoImageTag", "user": "<code>" } ]
[ { "assistant": "<loc_0><loc_0><loc_500><loc_500><_JavaScript_>var readline = require('readline');\n \nvar rl = readline.createInterface({\n input: process.stdin,\n output: {},\n});\n \nhs = [];\n \nrl.on('line', function(h) {\n hs.push(h | 0);\n});\n \nrl.on('close', function() {\n console.log(3776);\n console.log(2848);\n console.log(2840);\n});</code>", "source": "SynthCodeNetNoImageTag", "user": "<code>" } ]
[ { "assistant": "<loc_0><loc_0><loc_500><loc_500><_Rust_>pub type IN_VAL_P2 = crate::Reg<in_val_p2::IN_VAL_P2_SPEC>;\n#[doc = \"Port P2 GPIO Input Value\"]\npub mod in_val_p2;\n#[doc = \"IN_VAL_P3 register accessor: an alias for `Reg<IN_VAL_P3_SPEC>`\"]\npub type IN_VAL_P3 = crate::Reg<in_val_p3::IN_VAL_P3_SPEC>;\n#[doc = \"Port P3 GPIO Input Value\"]\npub mod in_val_p3;\n#[doc = \"IN_VAL_P4 register accessor: an alias for `Reg<IN_VAL_P4_SPEC>`\"]\npub type IN_VAL_P4 = crate::Reg<in_val_p4::IN_VAL_P4_SPEC>;\n#[doc = \"Port P4 GPIO Input Value\"]\npub mod in_val_p4;\n#[doc = \"IN_VAL_P5 register accessor: an alias for `Reg<IN_VAL_P5_SPEC>`\"]\npub type IN_VAL_P5 = crate::Reg<in_val_p5::IN_VAL_P5_SPEC>;\n#[doc = \"Port P5 GPIO Input Value\"]\npub mod in_val_p5;\n#[doc = \"IN_VAL_P6 register accessor: an alias for `Reg<IN_VAL_P6_SPEC>`\"]\npub type IN_VAL_P6 = crate::Reg<in_val_p6::IN_VAL_P6_SPEC>;\n#[doc = \"Port P6 GPIO Input Value\"]\npub mod in_val_p6;\n#[doc = \"IN_VAL_P7 register accessor: an alias for `Reg<IN_VAL_P7_SPEC>`\"]\npub type IN_VAL_P7 = crate::Reg<in_val_p7::IN_VAL_P7_SPEC>;\n#[doc = \"Port P7 GPIO Input Value\"]\npub mod in_val_p7;\n#[doc = \"IN_VAL_P8 register accessor: an alias for `Reg<IN_VAL_P8_SPEC>`\"]\npub type IN_VAL_P8 = crate::Reg<in_val_p8::IN_VAL_P8_SPEC>;\n#[doc = \"Port P8 GPIO Input Value\"]\npub mod in_val_p8;\n#[doc = \"INT_MODE_P0 register accessor: an alias for `Reg<INT_MODE_P0_SPEC>`\"]\npub type INT_MODE_P0 = crate::Reg<int_mode_p0::INT_MODE_P0_SPEC>;\n#[doc = \"Port P0 Interrupt Detection Mode\"]\npub mod int_mode_p0;\n#[doc = \"INT_MODE_P1 register accessor: an alias for `Reg<INT_MODE_P1_SPEC>`\"]\npub type INT_MODE_P1 = crate::Reg<int_mode_p1::INT_MODE_P1_SPEC>;\n#[doc = \"Port P1 Interrupt Detection Mode\"]\npub mod int_mode_p1;\n#[doc = \"INT_MODE_P2 register accessor: an alias for `Reg<INT_MODE_P2_SPEC>`\"]\npub type INT_MODE_P2 = crate::Reg<int_mode_p2::INT_MODE_P2_SPEC>;\n#[doc = \"Port P2 Interrupt Detection Mode\"]\npub mod int_mode_p2;\n#[doc = \"INT_MODE_P3 register accessor: an alias for `Reg<INT_MODE_P3_SPEC>`\"]\npub type INT_MODE_P3 = crate::Reg<int_mode_p3::INT_MODE_P3_SPEC>;\n#[doc = \"Port P3 Interrupt Detection Mode\"]\npub mod int_mode_p3;\n#[doc = \"INT_MODE_P4 register accessor: an alias for `Reg<INT_MODE_P4_SPEC>`\"]\npub type INT_MODE_P4 = crate::Reg<int_mode_p4::INT_MODE_P4_SPEC>;\n#[doc = \"Port P4 Interrupt Detection Mode\"]\npub mod int_mode_p4;\n#[doc = \"INT_MODE_P5 register accessor: an alias for `Reg<INT_MODE_P5_SPEC>`\"]\npub type INT_MODE_P5 = crate::Reg<int_mode_p5::INT_MODE_P5_SPEC>;\n#[doc = \"Port P5 Interrupt Detection Mode\"]\npub mod int_mode_p5;\n#[doc = \"INT_MODE_P6 register accessor: an alias for `Reg<INT_MODE_P6_SPEC>`\"]\npub type INT_MODE_P6 = crate::Reg<int_mode_p6::INT_MODE_P6_SPEC>;\n#[doc = \"Port P6 Interrupt Detection Mode\"]\npub mod int_mode_p6;\n#[doc = \"INT_MODE_P7 register accessor: an alias for `Reg<INT_MODE_P7_SPEC>`\"]\npub type INT_MODE_P7 = crate::Reg<int_mode_p7::INT_MODE_P7_SPEC>;\n#[doc = \"Port P7 Interrupt Detection Mode\"]\npub mod int_mode_p7;\n#[doc = \"INT_MODE_P8 register accessor: an alias for `Reg<INT_MODE_P8_SPEC>`\"]</code>", "source": "SynthCodeNetNoImageTag", "user": "<code>" } ]
[ { "assistant": "<code><loc_0><loc_0><loc_500><loc_500><_Bash_>#!/bin/bash\n\necho \"on-create start\" >> ~/status\n\n# run dotnet restore\ndotnet restore weather/weather.csproj \n\n# clone repos\ngit clone https://github.com/retaildevcrews/ngsa-app /workspaces/ngsa-app\ngit clone https://github.com/microsoft/webvalidate /workspaces/webvalidate\n\n# copy grafana.db to /grafana\nsudo rm -f /grafana/grafana.db\nsudo cp deploy/grafanadata/grafana.db /grafana\nsudo chown -R 472:0 /grafana\n\n# initialize dapr\ndapr init\n\necho \"on-create complete\" >> ~/status\n</code>", "source": "SynthCodeNetNoImageTag", "user": "Convert code to text." } ]
[ { "assistant": "<code><loc_0><loc_0><loc_500><loc_500><_HTML_><div class=\"main-menu menu-fixed menu-dark menu-accordion menu-shadow \" data-scroll-to-active=\"true\">\n\t<div class=\"main-menu-content ps-container ps-theme-light ps-active-y\" data-ps-id=\"1101cd25-109b-008e-c131-eb5a754e6c1c\">\n\t\t<ul class=\"navigation navigation-main\" id=\"main-menu-navigation\" data-menu=\"menu-navigation\">\n\t\t\t<li class=\" nav-item active\"><a href=\"https://studentportal.helb.co.ke/account/index\"><i class=\"la la-home\"></i> \n\t \t\t\t\t<span class=\"menu-title\" data-i18n=\"nav.dash.main\">Dashboard</span>\n\t \t\t\t</a></li><li></li><li><hr class=\"light-grey-hr mb-10\"></li><li class=\"navigation-header\"><span>COMMON</span> <i class=\"zmdi zmdi-more\"></i></li><li class=\"nav-item has-sub\"><a><i class=\"la la-columns\"></i><span class=\"menu-title\" data-i18n=\"nav.page_headers.main\">My Profile</span></a><ul class=\"menu-content\"><li><a class=\"menu-item\" href=\"https://studentportal.helb.co.ke/account/index/frm_profile\" data-i18n=\"nav.page_headers.headers_breadcrumbs_basic\">View Profile</a></li><li><a class=\"menu-item\" href=\"https://studentportal.helb.co.ke/account/index/frm_calender\" data-i18n=\"nav.page_headers.headers_breadcrumbs_basic\">Calender</a></li><li><a class=\"menu-item\" href=\"https://studentportal.helb.co.ke/account/index/frm_notifications\" data-i18n=\"nav.page_headers.headers_breadcrumbs_basic\">Notifications</a></li></ul></li><li class=\" nav-item\"><a href=\"https://studentportal.helb.co.ke/account/index/frm_messages\"><i class=\"la la-envelope\"></i><span class=\"menu-title\" data-i18n=\"nav.changelog.main\">Messages</span><span class=\"badge badge badge-pill badge-warning float-right\">0</span></a></code>", "source": "SynthCodeNetNoImageTag", "user": "Convert code to text." } ]
[ { "assistant": "<code><loc_0><loc_0><loc_500><loc_500><_Go_>\n\t\"github.com/goharbor/harbor/src/server/v2.0/route\"\n)\n\nvar (\n\tversion = route.APIVersion\n)\n\n// APIVersion model\ntype APIVersion struct {\n\tVersion string `json:\"version\"`\n}\n\n// GetAPIVersion returns the current supported API version\nfunc GetAPIVersion(w http.ResponseWriter, r *http.Request) {\n\tif err := json.NewEncoder(w).Encode(&APIVersion{Version: version}); err != nil {\n\t\tlib_http.SendError(w, err)\n\t}\n}\n</code>", "source": "SynthCodeNetNoImageTag", "user": "Convert code to text." } ]
[ { "assistant": "<loc_0><loc_0><loc_500><loc_500><_TypeScript_>\n toggleFlipView() {\n this.flipped = !this.flipped;\n }\n}\n</code>", "source": "SynthCodeNetNoImageTag", "user": "<code>" } ]
[ { "assistant": "<code><loc_0><loc_0><loc_500><loc_500><_Ruby_> end\n end\nend\n</code>", "source": "SynthCodeNetNoImageTag", "user": "Convert code to text." } ]
[ { "assistant": "<loc_0><loc_0><loc_500><loc_500><_Go_>package main\n\nimport (\n\t\"bufio\"\n\t\"fmt\"\n\t\"os\"\n\t\"strconv\"\n)\n\nfunc solve() {\n\tn, m := getInt(), getInt()\n\tgraph := make([][]int, n)\n\tfor i := range graph {\n\t\tgraph[i] = make([]int, 0)\n\t}\n\tfor i := 0; i < m; i++ {\n\t\tx, y := getInt()-1, getInt()-1\n\t\tgraph[x] = append(graph[x], y)\n\t}\n\n\tdp := make([]int, n)\n\tque := make([]int, 0)\n\n\tvar bfs func(int)\n\tbfs = func(now int) {\n\t\tfor _, next := range graph[now] {\n\t\t\tif dp[next] >= dp[now]+1 {\n\t\t\t\tcontinue\n\t\t\t}\n\n\t\t\tdp[next] = dp[now] + 1\n\t\t\tque = append(que, next)\n\t\t}\n\n\t\tfor len(que) > 0 {\n\t\t\tx := que[0]\n\t\t\tque = que[1:]\n\t\t\tbfs(x)\n\t\t}\n\t}\n\n\tfor now := range graph {\n\t\tif dp[now] > 0 {\n\t\t\tcontinue\n\t\t}\n\n\t\tdp[now] = 0\n\t\tbfs(now)\n\t}\n\n\tans := max(dp...)\n\tfmt.Fprintln(wr, ans)\n}\n\nfunc max(ns ...int) int {\n\tmax := ns[0]\n\tfor i := 1; i < len(ns); i++ {\n\t\tif max < ns[i] {\n\t\t\tmax = ns[i]\n\t\t}\n\t}\n\treturn max\n}\n\n// -----------------------------------------\n\nconst (\n\tinf = 1 << 60\n\t// mod = 1000000007\n)\n\nvar (\n\tsc = bufio.NewScanner(os.Stdin)\n\twr = bufio.NewWriter(os.Stdout)\n)\n\nfunc main() {\n\t// buf := 200001\n\t// sc.Buffer(make([]byte, buf), buf)\n\tsc.Split(bufio.ScanWords)\n\tsolve()\n\twr.Flush()\n}\n\nfunc getInt() int {\n\tsc.Scan()\n\ti, err := strconv.Atoi(sc.Text())\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn i\n}\n\nfunc getIntSlice(n int) []int {\n\tis := make([]int, n)\n\tfor i := range is {\n\t\tis[i] = getInt()\n\t}\n\treturn is\n}\n\nfunc getString() string {\n\tsc.Scan()\n\ts := sc.Text()\n\treturn s\n}\n\nfunc getRunes() []rune {\n\treturn []rune(getString())\n}\n</code>", "source": "SynthCodeNetNoImageTag", "user": "<code>" } ]
[ { "assistant": "<code><loc_0><loc_0><loc_500><loc_500><_HTML_><!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">\n<!-- NewPage -->\n<html lang=\"en\">\n<head>\n<!-- Generated by javadoc (version 1.7.0_75) on Fri Oct 22 11:54:15 CEST 2021 -->\n<meta http-equiv=\"Content-Type\" content=\"text/html\" charset=\"UTF-8\">\n<title>ResponseProcessCookies (Apache HttpComponents Client Parent 5.1.1 API)</title>\n<meta name=\"date\" content=\"2021-10-22\">\n<link rel=\"stylesheet\" type=\"text/css\" href=\"../../../../../../stylesheet.css\" title=\"Style\">\n</head>\n<body>\n<script type=\"text/javascript\"><!--\n if (location.href.indexOf('is-external=true') == -1) {\n parent.document.title=\"ResponseProcessCookies (Apache HttpComponents Client Parent 5.1.1 API)\";\n }\n//-->\n</script>\n<noscript>\n<div>JavaScript is disabled on your browser.</div>\n</noscript>\n<!-- ========= START OF TOP NAVBAR ======= -->\n<div class=\"topNav\"><a name=\"navbar_top\">\n<!-- -->\n</a><a href=\"#skip-navbar_top\" title=\"Skip navigation links\"></a><a name=\"navbar_top_firstrow\">\n<!-- -->\n</a>\n<ul class=\"navList\" title=\"Navigation\">\n<li><a href=\"../../../../../../overview-summary.html\">Overview</a></li></code>", "source": "SynthCodeNetNoImageTag", "user": "Convert code to text." } ]
[ { "assistant": "<loc_0><loc_0><loc_500><loc_500><_Rust_>#![allow(unused_imports)]\n#![allow(non_snake_case, unused)]\n\nuse std::cmp::*;\nuse std::collections::*;\nuse std::ops::*;\n\n// https://atcoder.jp/contests/hokudai-hitachi2019-1/submissions/10518254\n\nmacro_rules! eprint {\n\t($($t:tt)*) => {{\n\t\tuse ::std::io::Write;\n\t\tlet _ = write!(::std::io::stderr(), $($t)*);\n\t}};\n}\nmacro_rules! eprintln {\n\t() => { eprintln!(\"\"); };\n\t($($t:tt)*) => {{\n\t\tuse ::std::io::Write;\n\t\tlet _ = writeln!(::std::io::stderr(), $($t)*);\n\t}};\n}\nmacro_rules! dbg {\n\t($v:expr) => {{\n\t\tlet val = $v;\n\t\teprintln!(\"[{}:{}] {} = {:?}\", file!(), line!(), stringify!($v), val);\n\t\tval\n\t}}\n}\n\nmacro_rules! mat {\n\t($($e:expr),*) => { Vec::from(vec![$($e),*]) };\n\t($($e:expr,)*) => { Vec::from(vec![$($e),*]) };\n\t($e:expr; $d:expr) => { Vec::from(vec![$e; $d]) };\n\t($e:expr; $d:expr $(; $ds:expr)+) => { Vec::from(vec![mat![$e $(; $ds)*]; $d]) };\n}\n\nmacro_rules! ok {\n\t($a:ident$([$i:expr])*.$f:ident()$(@$t:ident)*) => {\n\t\t$a$([$i])*.$f($($t),*)\n\t};\n\t($a:ident$([$i:expr])*.$f:ident($e:expr$(,$es:expr)*)$(@$t:ident)*) => { {\n\t\tlet t = $e;\n\t\tok!($a$([$i])*.$f($($es),*)$(@$t)*@t)\n\t} };\n}\n\npub fn readln() -> String {\n\tlet mut line = String::new();\n\t::std::io::stdin().read_line(&mut line).unwrap_or_else(|e| panic!(\"{}\", e));\n\tline\n}\n\nmacro_rules! read {\n\t($($t:tt),*; $n:expr) => {{\n\t\tlet stdin = ::std::io::stdin();\n\t\tlet ret = ::std::io::BufRead::lines(stdin.lock()).take($n).map(|line| {\n\t\t\tlet line = line.unwrap();\n\t\t\tlet mut it = line.split_whitespace();\n\t\t\t_read!(it; $($t),*)\n\t\t}).collect::<Vec<_>>();\n\t\tret\n\t}};\n\t($($t:tt),*) => {{\n\t\tlet line = readln();\n\t\tlet mut it = line.split_whitespace();\n\t\t_read!(it; $($t),*)\n\t}};\n}\n\nmacro_rules! _read {\n\t($it:ident; [char]) => {\n\t\t_read!($it; String).chars().collect::<Vec<_>>()\n\t};\n\t($it:ident; [u8]) => {\n\t\tVec::from(_read!($it; String).into_bytes())\n\t};\n\t($it:ident; usize1) => {\n\t\t$it.next().unwrap_or_else(|| panic!(\"input mismatch\")).parse::<usize>().unwrap_or_else(|e| panic!(\"{}\", e)) - 1\n\t};\n\t($it:ident; [usize1]) => {\n\t\t$it.map(|s| s.parse::<usize>().unwrap_or_else(|e| panic!(\"{}\", e)) - 1).collect::<Vec<_>>()\n\t};\n\t($it:ident; [$t:ty]) => {\n\t\t$it.map(|s| s.parse::<$t>().unwrap_or_else(|e| panic!(\"{}\", e))).collect::<Vec<_>>()\n\t};\n\t($it:ident; $t:ty) => {\n\t\t$it.next().unwrap_or_else(|| panic!(\"input mismatch\")).parse::<$t>().unwrap_or_else(|e| panic!(\"{}\", e))\n\t};\n\t($it:ident; $($t:tt),+) => {\n\t\t($(_read!($it; $t)),*)\n\t};\n}\n\n\npub fn main() {\n\tlet _ = ::std::thread::Builder::new().name(\"run\".to_string()).stack_size(32 * 1024 * 1024).spawn(run).unwrap().join();\n}\n\nconst MOD: u32 = 1_000_000_007;\nconst INF: i64 = std::i64::MAX/2;\n\nuse std::f64::consts::PI;\n\nfn gcd(a: i64, b: i64) -> i64{\n\tif a < b {return gcd(b,a);}\n\tif b==0 {return a;}\n\treturn gcd(b, a%b);\n}\n\nfn lcm(a: i64, b: i64) -> i64{\n\treturn a * (b /gcd(a, b));\n}\n\n#[derive(Clone, Copy)]\nstruct ModInt(u32);\n \nimpl std::ops::Add for ModInt {\n type Output = ModInt;\n fn add(self, rhs: ModInt) -> Self::Output {\n let mut d = self.0 + rhs.0;\n if d >= MOD {\n d -= MOD;\n }\n ModInt(d)\n }\n}\n \nimpl std::ops::AddAssign for ModInt {\n fn add_assign(&mut self, rhs: ModInt) {\n *self = *self + rhs;\n }\n}\n \nimpl std::ops::Sub for ModInt {\n type Output = ModInt;\n fn sub(self, rhs: ModInt) -> Self::Output {\n let mut d = self.0 + MOD - rhs.0;\n if d >= MOD {\n d -= MOD;\n }\n ModInt(d)\n }\n}\n \nimpl std::ops::SubAssign for ModInt {\n fn sub_assign(&mut self, rhs: ModInt) {\n *self = *self - rhs;\n }\n}\n \nimpl std::ops::Mul for ModInt {\n type Output = ModInt;\n fn mul(self, rhs: ModInt) -> Self::Output {\n ModInt((self.0 as u64 * rhs.0 as u64 % MOD as u64) as u32)\n }\n}\n \nimpl std::ops::MulAssign for ModInt {\n fn mul_assign(&mut self, rhs: ModInt) {\n *self = *self * rhs;\n }\n}\n \nimpl std::ops::Neg for ModInt {\n type Output = ModInt;\n fn neg(self) -> Self::Output {\n ModInt(if self.0 == 0 {0} else {MOD - self.0})\n }\n}\n \n/* \nimpl std::fmt::Display for ModInt {\n fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n write!(f, \"{}\", self.0)\n }\n}\n*/\n \n#[allow(dead_code)]\nimpl ModInt {\n pub fn new(n: u32) -> ModInt {\n ModInt(n % MOD)\n }\n pub fn zero() -> ModInt {\n ModInt(0)\n }\n pub fn one() -> ModInt {\n ModInt(1)\n }\n pub fn pow(self, mut n: u32) -> ModInt {\n let mut t = ModInt::one();\n let mut s = self;\n while n > 0 {\n if n & 1 == 1 {\n t *= s;\n }\n s *= s;\n n >>= 1;\n }\n t\n }\n pub fn inv(self) -> ModInt {\n self.pow(MOD - 2)\n }\n}\n// ---------- end ModInt ----------\n// ---------- begin Precalc ----------\n#[allow(dead_code)]\nstruct Precalc {\n inv: Vec<ModInt>,\n fact: Vec<ModInt>,\n ifact: Vec<ModInt>,\n}\n \n#[allow(dead_code)]\nimpl Precalc {\n pub fn new(n: usize) -> Precalc {\n let mut inv = vec![ModInt::one(); n + 1];\n let mut fact = vec![ModInt::one(); n + 1];\n let mut ifact = vec![ModInt::one(); n + 1];\n for i in 2..(n + 1) {\n inv[i] = -inv[MOD as usize % i] * ModInt(MOD / i as u32);\n fact[i] = fact[i - 1] * ModInt(i as u32);\n ifact[i] = ifact[i - 1] * inv[i];\n }\n Precalc {\n inv: inv,\n fact: fact,\n ifact: ifact,\n }\n }\n pub fn inv(&self, n: usize) -> ModInt {\n self.inv[n]\n }\n pub fn fact(&self, n: usize) -> ModInt {\n self.fact[n]\n }\n pub fn ifact(&self, n: usize) -> ModInt {\n self.ifact[n]\n }\n pub fn comb(&self, n: usize, k: usize) -> ModInt {\n if k > n {\n return ModInt::zero();\n }\n self.fact[n] * self.ifact[k] * self.ifact[n - k]\n }\n}\n// ---------- end Precalc ----------\n\nfn solve() {\n let n = read!(usize);\n let ab = read!([i64];n);\n let mut map: HashMap::<Vec<i64>,i64> = HashMap::new();\n let mut zeros = 0;\n for i in 0..n {\n let a = ab[i][0];\n let b = ab[i][1];\n if a==0 && b==0 {\n zeros += 1;\n continue;\n }\n let c = gcd(a.abs(),b.abs());\n let mut na = a/c;\n let mut nb = b/c;\n if nb<0 || (nb==0 && na>0){\n na = -na;\n nb = -nb;\n }\n *map.entry(vec![na,nb]).or_insert(0) += 1;\n }\n let mut ans = ModInt(1);\n let mut seen: HashMap::<Vec<i64>,i64> = HashMap::new();\n for (key,&val) in map.iter() {\n if seen.contains_key(&vec![key[0],key[1]]) {\n continue;\n }\n let mut tmp = 0 as i64;\n tmp += *map.get(&vec![key[1],-key[0]]).unwrap_or(&0);\n let v = ModInt(2).pow(val as u32) + ModInt(2).pow(tmp as u32) - ModInt(1);\n ans *= v;\n *seen.entry(vec![key[1],-key[0]]).or_insert(0) += 1;\n // println!(\"{:?} {}\", key, val);\n }\n ans += ModInt(zeros);\n println!(\"{}\", ans.0-1);\n}\n\nfn run() {\n solve();\n}</code>", "source": "SynthCodeNetNoImageTag", "user": "<code>" } ]
[ { "assistant": "<code><loc_0><loc_0><loc_500><loc_500><_YAML_> - statement:\n execute_script_statement:\n - keyword: EXEC\n - parameter: '@pRes'\n - comparison_operator:\n raw_comparison_operator: '='\n - object_reference:\n - identifier: dbo\n - dot: .\n - identifier: ProcTestDefaults\n - parameter: '@p1'\n - comparison_operator:\n raw_comparison_operator: '='\n - keyword: DEFAULT\n - statement_terminator: ;\n - statement:\n execute_script_statement:\n keyword: EXECUTE\n parameter: '@pRes'\n comparison_operator:\n raw_comparison_operator: '='\n object_reference:\n - identifier: dbo\n - dot: .\n - identifier: ProcTestDefaults\n statement_terminator: ;\n - statement:\n execute_script_statement:\n - keyword: EXECUTE\n - parameter: '@pRes'\n - comparison_operator:\n raw_comparison_operator: '='\n - object_reference:\n - identifier: dbo\n - dot: .\n - identifier: ProcTestDefaults\n - parameter: '@p1'\n - comparison_operator:\n raw_comparison_operator: '='\n - keyword: DEFAULT\n - statement_terminator: ;\n</code>", "source": "SynthCodeNetNoImageTag", "user": "Convert code to text." } ]
[ { "assistant": "<loc_0><loc_0><loc_500><loc_500><_Python_># Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\nfrom nova import test\nfrom nova.tests import fixtures as nova_fixtures\nfrom nova.tests.functional import fixtures as func_fixtures\nfrom nova.tests.functional import integrated_helpers\n\n\nclass TestMultiCreateServerGroupMemberOverQuota(\n test.TestCase, integrated_helpers.InstanceHelperMixin):\n \"\"\"This tests a regression introduced in the Pike release.\n\n Starting in the Pike release, quotas are no longer tracked using usages\n and reservations tables but instead perform a resource counting operation\n at the point of resource creation.\n\n When creating multiple servers in the same request that belong in the same\n server group, the [quota]/server_group_members config option is checked\n to determine if those servers can belong in the same group based on quota.\n However, the quota check for server_group_members only counts existing\n group members based on live instances in the cell database(s). But the\n actual instance record isn't created in the cell database until *after* the\n server_group_members quota check happens. Because of this, it is possible\n to bypass the server_group_members quota check when creating multiple\n servers in the same request.\n \"\"\"\n\n def setUp(self):\n super(TestMultiCreateServerGroupMemberOverQuota, self).setUp()\n self.flags(server_group_members=2, group='quota')\n self.useFixture(nova_fixtures.RealPolicyFixture())\n self.useFixture(nova_fixtures.NeutronFixture(self))\n self.glance = self.useFixture(nova_fixtures.GlanceFixture(self))\n self.useFixture(func_fixtures.PlacementFixture())\n\n api_fixture = self.useFixture(nova_fixtures.OSAPIFixture(\n api_version='v2.1'))\n self.api = api_fixture.api\n self.api.microversion = '2.37' # so we can specify networks='none'\n\n group = {'name': 'test group', 'policies': ['soft-anti-affinity']}\n self.created_group = self.api.post_server_groups(group)\n\n def test_multi_create_server_group_members_over_quota(self):\n \"\"\"Recreate scenario for the bug where we create an anti-affinity\n server group and then create 3 servers in the group using a\n multi-create POST /servers request.\n \"\"\"\n server_req = self._build_server(networks='none')\n server_req['min_count'] = 3\n server_req['return_reservation_id'] = True\n hints = {'group': self.created_group['id']}\n # We should get a 403 response due to going over quota on server\n # group members in a single request.\n self.api.api_post(</code>", "source": "SynthCodeNetNoImageTag", "user": "<code>" } ]
[ { "assistant": "<loc_0><loc_0><loc_500><loc_500><_JavaScript_>/**\n * Layout component that queries for data\n * with Gatsby's useStaticQuery component\n *\n * See: https://www.gatsbyjs.org/docs/use-static-query/\n */\n\nimport React from \"react\"\nimport PropTypes from \"prop-types\"\nimport { useStaticQuery, graphql } from \"gatsby\"\nimport { Container } from \"react-bootstrap\"\nimport 'bootstrap/dist/css/bootstrap.min.css';\n\nimport Header from \"./header\"\nimport Footer from \"./footer\"\nimport \"./layout.css\"\n\nconst Layout = ({ children }) => {\n const data = useStaticQuery(graphql`\n query SiteTitleQuery {\n site {\n siteMetadata {\n title\n }\n }\n }\n `)\n\n return (\n <Container fluid>\n <Header siteTitle={data.site.siteMetadata.title} />\n <main\n style={{\n margin: `1rem auto`,\n maxWidth: `1000px`,\n backgroundColor: 'rgba(255,255,255, 0.8)'\n }}\n >\n {children}\n </main>\n <Footer />\n </Container>\n )\n}\n\nLayout.propTypes = {\n children: PropTypes.node.isRequired,\n}\n\nexport default Layout\n</code>", "source": "SynthCodeNetNoImageTag", "user": "<code>" } ]
[ { "assistant": "<code><loc_0><loc_0><loc_500><loc_500><_XML_> </data>\n\n\n <ScrollView\n android:layout_width=\"match_parent\"\n android:layout_height=\"wrap_content\">\n\n <androidx.constraintlayout.widget.ConstraintLayout\n android:layout_width=\"match_parent\"\n android:layout_height=\"wrap_content\"\n android:paddingStart=\"@dimen/side_margin\"\n android:paddingEnd=\"@dimen/side_margin\"\n android:paddingBottom=\"@dimen/side_margin\">\n\n <RadioGroup\n android:id=\"@+id/entree_options\"\n android:layout_width=\"match_parent\"\n android:layout_height=\"wrap_content\"\n android:orientation=\"vertical\"\n app:layout_constraintStart_toStartOf=\"parent\"\n app:layout_constraintTop_toTopOf=\"parent\">\n\n <RadioButton\n android:id=\"@+id/cauliflower\"</code>", "source": "SynthCodeNetNoImageTag", "user": "Convert code to text." } ]
[ { "assistant": "<code><loc_0><loc_0><loc_500><loc_500><_YAML_>publishers:\n - xunit:\n test-time-margin: 5000\n thresholdmode: 'number'\n thresholds:\n - failed:\n unstable: 1\n unstablenew: 2\n failure: 3\n failurenew: 4\n - skipped:\n unstable: 5\n unstablenew: 6\n failure: 7\n failurenew: 8\n types:\n - ctest:\n pattern: \"build/tests/reports/ctest.xml\"\n skip-if-no-test-files: true\n</code>", "source": "SynthCodeNetNoImageTag", "user": "Convert code to text." } ]
[ { "assistant": "<loc_0><loc_0><loc_500><loc_500><_C++_>#include<bits/stdc++.h>\nusing namespace std;\nint main()\n{\n long int n,a,b,c;\n cin>>n>>a>>b>>c;\n string s;\n int x[2]={0};\n while(n--)\n {\n cin>>s;\n for(int i=0;i<2;i++)\n {\n if(s[i]=='A')x[i]=a;\n if(s[i]=='B')x[i]=b;\n if(s[i]=='C')x[i]=c;\n }\n \n \n if(x[0]<x[1]){x[0]++;x[1]--;}\n else {x[0]--;x[1]++;}\n \n if(x[0]>=0&&x[1]>=0)cout<<\"Yes\"<<endl;\n else cout<<\"No\"<<endl;\n}\n \n</code>", "source": "SynthCodeNetNoImageTag", "user": "<code>" } ]
[ { "assistant": "<loc_0><loc_0><loc_500><loc_500><_YAML_> cluster: build02\n decorate: true\n decoration_config:\n skip_cloning: true\n labels:\n ci-operator.openshift.io/is-promotion: \"true\"\n ci-operator.openshift.io/prowgen-controlled: \"true\"\n max_concurrency: 1\n name: branch-ci-openshift-containernetworking-plugins-release-4.4-images\n spec:\n containers:\n - args:\n - --image-import-pull-secret=/etc/pull-secret/.dockerconfigjson\n - --image-mirror-push-secret=/etc/push-secret/.dockerconfigjson\n - --promote\n - --report-password-file=/etc/report/password.txt\n - --report-username=ci\n - --target=[images]\n command:\n - ci-operator\n image: ci-operator:latest\n imagePullPolicy: Always\n name: \"\"\n resources:\n requests:\n cpu: 10m\n volumeMounts:\n - mountPath: /etc/pull-secret\n name: pull-secret\n readOnly: true\n - mountPath: /etc/push-secret\n name: push-secret\n readOnly: true\n - mountPath: /etc/report\n name: result-aggregator\n readOnly: true\n serviceAccountName: ci-operator\n volumes:\n - name: pull-secret\n secret:\n secretName: registry-pull-credentials\n - name: push-secret\n secret:\n secretName: registry-push-credentials-ci-central\n - name: result-aggregator\n secret:\n secretName: result-aggregator\n</code>", "source": "SynthCodeNetNoImageTag", "user": "<code>" } ]
[ { "assistant": "<loc_0><loc_0><loc_500><loc_500><_C#_>#if true\n//#if false\n#define UTAKA_DEBUG\n#endif\n\nusing System;\nusing System.Text;\nusing System.Linq;\nusing System.Collections;\nusing System.Collections.Generic;\nusing System.IO;\nusing static System.Math;\n\n\nnamespace UtakaApp\n{\n public class Program\n {\n public const string ContestName = \"abc135\";\n public const string ProblemName = \"D\";\n\n public const int ModLarge = 1000000007;\n\n public static void Main(string[] args)\n {\n#if UTAKA_LOCAL\n new TestCaseChecker().TestProblems();\n#else\n new Program().Solve(Console.In, new ConsoleWriter());\n#endif\n }\n\n public void Solve(TextReader textReader, IConsoleWriter consoleWriter)\n {\n var cin = new ConsoleInput(textReader, ' ');\n\n string s = cin.ReadLine;\n\n int Len = s.Length;\n\n const int N = 13;\n\n long[][] dp = new long[Len + 1][];\n\n for (int i = 0; i < Len + 1; i++)\n {\n dp[i] = new long[N];\n }\n\n dp[0][0] = 1;\n\n int mul = 1;\n\n for (int i = 0; i < Len; i++)\n {\n int index = Len - i - 1;\n\n char c = s[index];\n\n if (c == '?')\n {\n for (int k = 0; k < 10; k++)\n {\n for (int j = 0; j < N; j++)\n {\n dp[i + 1][(mul * k + j) % N] += dp[i][j];\n }\n }\n }\n else\n {\n int num = c - '0';\n \n for (int j = 0; j < N; j++)\n {\n dp[i + 1][(mul * num + j) % N] += dp[i][j];\n }\n }\n\n for (int j = 0; j < N; j++)\n {\n dp[i + 1][j] %= ModLarge;\n }\n\n mul *= 10;\n mul %= N;\n }\n\n long result = dp[Len][5];\n \n consoleWriter.WriteLine(result.ToString());\n }\n }\n\n public class ConsoleInput\n {\n private readonly TextReader _stream;\n private char _separator = ' ';\n private Queue<string> inputStream;\n\n public ConsoleInput(TextReader stream, char separator = ' ')\n {\n this._separator = separator;\n this._stream = stream;\n inputStream = new Queue<string>();\n }\n\n public string Read\n {\n get\n {\n if (inputStream.Count != 0) return inputStream.Dequeue();\n string[] tmp = _stream.ReadLine().Split(_separator);\n for (int i = 0; i < tmp.Length; ++i)\n {\n inputStream.Enqueue(tmp[i]);\n }\n\n return inputStream.Dequeue();\n }\n }\n\n public string ReadLine => _stream.ReadLine();\n public int ReadInt => int.Parse(Read);\n public long ReadLong => long.Parse(Read);\n public double ReadDouble => double.Parse(Read);\n\n public string[] ReadStrArray(long N)\n {\n var ret = new string[N];\n for (long i = 0; i < N; ++i) ret[i] = Read;\n return ret;\n }\n\n public int[] ReadIntArray(long N)\n {\n var ret = new int[N];\n for (long i = 0; i < N; ++i) ret[i] = ReadInt;\n return ret;\n }\n\n public long[] ReadLongArray(long N)\n {\n var ret = new long[N];\n for (long i = 0; i < N; ++i) ret[i] = ReadLong;\n return ret;\n }\n }\n\n public interface IConsoleWriter\n {\n void Write(string str);\n void WriteLine(string str);\n }\n\n public class ConsoleWriter : IConsoleWriter\n {\n public void Write(string str)\n {\n Console.Write(str);\n }\n\n public void WriteLine(string str)\n {\n Console.WriteLine(str);\n }\n }\n\n#if UTAKA_LOCAL\n\n public class DebugConsoleWriter : IConsoleWriter\n {\n private StringBuilder mSb;\n\n public DebugConsoleWriter()\n {\n mSb = new StringBuilder();\n }\n\n public void Write(string str)\n {\n mSb.Append(str);\n }\n\n public void WriteLine(string str)\n {\n mSb.AppendLine(str);\n }\n\n public string GetAllOutput()\n {\n return mSb.ToString();\n }\n }\n\n public class TestCaseChecker\n {\n private string DirectoryPath => $\"../../../../{Program.ContestName}/{Program.ProblemName}\";\n\n private string GetInputFilePath(int testCaseNumber)\n {\n return $\"{DirectoryPath}/in_{testCaseNumber}.txt\";\n }\n\n private string GetOutputFilePath(int testCaseNumber)\n {\n return $\"{DirectoryPath}/out_{testCaseNumber}.txt\";\n }\n\n public bool TestProblem(int testCaseNumber)\n {\n var inputFilePath = GetInputFilePath(testCaseNumber);\n var outputFilePath = GetOutputFilePath(testCaseNumber);\n\n TextReader inputStream = new StreamReader(inputFilePath);\n\n var debugConsoleWriter = new DebugConsoleWriter();\n\n new Program().Solve(inputStream, debugConsoleWriter);\n\n var output = debugConsoleWriter.GetAllOutput();\n\n TextReader outputStream = new StreamReader(outputFilePath);\n var outputAnswer = outputStream.ReadToEnd();\n\n#if UTAKA_DEBUG\n Console.Write(output);\n Console.Write(outputAnswer);\n#endif\n\n var isCorrect = output == outputAnswer;\n\n return isCorrect;\n }\n\n public void TestProblems()\n {\n var isSuccessAll = true;\n\n var testCaseNumber = 1;\n while (true)\n {\n var inputFileName = GetInputFilePath(testCaseNumber);\n if (!File.Exists(inputFileName))\n {\n break;\n }\n\n Console.WriteLine($\"TestCase {testCaseNumber} =====================================================\");\n\n var result = TestProblem(testCaseNumber);\n\n if (result)\n {\n Console.WriteLine($\"Success\");\n }\n else\n {\n isSuccessAll = false;\n Console.WriteLine($\"Failure *****\");\n }\n\n testCaseNumber++;\n }\n\n if (isSuccessAll)\n {\n Console.WriteLine($\"!!!!!!!!! All Success !!!!!!!!!\");\n }\n }\n }\n\n public static class Dbg\n {\n public static void WriteLine(string str)\n {\n Console.WriteLine(str);\n }\n\n public static void Write(string str)\n {\n Console.Write(str);\n }\n }\n#else\n public static class Dbg\n {\n public static void WriteLine(string str)\n {\n }\n\n public static void Write(string str)\n {\n }\n }\n\n#endif\n}</code>", "source": "SynthCodeNetNoImageTag", "user": "<code>" } ]
[ { "assistant": "<code><loc_0><loc_0><loc_500><loc_500><_C_>#ifdef __OBJC__\n#import <UIKit/UIKit.h>\n#else\n#ifndef FOUNDATION_EXPORT\n#if defined(__cplusplus)\n#define FOUNDATION_EXPORT extern \"C\"\n#else\n#define FOUNDATION_EXPORT extern\n#endif\n#endif\n#endif\n\n#import \"HTMIDownloadManager.h\"\n#import \"HTMIDownloadSessionManager.h\"\n#import \"NSString+Hash.h\"\n#import \"NSString+Hash.h\"\n\nFOUNDATION_EXPORT double HTMIDownloadManagerVersionNumber;\nFOUNDATION_EXPORT const unsigned char HTMIDownloadManagerVersionString[];\n\n</code>", "source": "SynthCodeNetNoImageTag", "user": "Convert code to text." } ]
[ { "assistant": "<code><loc_0><loc_0><loc_500><loc_500><_Java_> List<Partition> destPartitions = null;\n try {\n destPartitions = getPartitions(destTable, partSpecs, true);\n } catch (SemanticException ex) {\n // We should expect a semantic exception being throw as this partition\n // should not be present.\n }\n if (destPartitions != null) {\n // If any destination partition is present then throw a Semantic Exception.\n throw new SemanticException(ErrorMsg.PARTITION_EXISTS.getMsg(destPartitions.toString()));\n }\n AlterTableExchangePartitionsDesc alterTableExchangePartition =\n new AlterTableExchangePartitionsDesc(sourceTable, destTable, partSpecs);\n rootTasks.add(TaskFactory.get(new DDLWork(getInputs(), getOutputs(), alterTableExchangePartition)));\n\n inputs.add(new ReadEntity(sourceTable));\n outputs.add(new WriteEntity(destTable, WriteType.DDL_SHARED));\n }\n\n /**\n * @param partitionKeys the list of partition keys of the table\n * @param partSpecs the partition specs given by the user\n * @return >=0 if no subpartition value is specified without a partition's\n * value being specified else it returns -1\n */\n private int isPartitionValueContinuous(List<FieldSchema> partitionKeys,\n Map<String, String> partSpecs) {\n int counter = 0;\n for (FieldSchema partitionKey : partitionKeys) {\n if (partSpecs.containsKey(partitionKey.getName())) {\n counter++;\n continue;\n }\n return partSpecs.size() == counter ? counter : -1;\n }\n return counter;\n }\n\n private void analyzeCreateResourcePlan(ASTNode ast) throws SemanticException {\n if (ast.getChildCount() == 0) {\n throw new SemanticException(\"Expected name in CREATE RESOURCE PLAN statement\");\n }\n String resourcePlanName = unescapeIdentifier(ast.getChild(0).getText());\n Integer queryParallelism = null;\n String likeName = null;\n boolean ifNotExists = false;\n for (int i = 1; i < ast.getChildCount(); ++i) {\n Tree child = ast.getChild(i);\n switch (child.getType()) {\n case HiveParser.TOK_QUERY_PARALLELISM:\n // Note: later we may be able to set multiple things together (except LIKE).\n if (queryParallelism == null && likeName == null) {\n queryParallelism = Integer.parseInt(child.getChild(0).getText());\n } else {\n throw new SemanticException(\"Conflicting create arguments \" + ast.toStringTree());\n }\n break;\n case HiveParser.TOK_LIKERP:\n if (queryParallelism == null && likeName == null) {\n likeName = unescapeIdentifier(child.getChild(0).getText());\n } else {\n throw new SemanticException(\"Conflicting create arguments \" + ast.toStringTree());\n }\n break;\n case HiveParser.TOK_IFNOTEXISTS:\n ifNotExists = true;\n break;\n default: throw new SemanticException(\"Invalid create arguments \" + ast.toStringTree());\n }\n }\n CreateResourcePlanDesc desc = new CreateResourcePlanDesc(resourcePlanName, queryParallelism, likeName, ifNotExists);\n addServiceOutput();\n rootTasks.add(TaskFactory.get(new DDLWork(getInputs(), getOutputs(), desc)));\n }\n\n private void analyzeShowResourcePlan(ASTNode ast) throws SemanticException {\n String rpName = null;\n if (ast.getChildCount() > 0) {\n rpName = unescapeIdentifier(ast.getChild(0).getText());\n }\n if (ast.getChildCount() > 1) {\n throw new SemanticException(\"Invalid syntax for SHOW RESOURCE PLAN statement\");\n }\n ShowResourcePlanDesc showResourcePlanDesc = new ShowResourcePlanDesc(rpName, ctx.getResFile().toString());\n addServiceOutput();\n rootTasks.add(TaskFactory.get(new DDLWork(getInputs(), getOutputs(), showResourcePlanDesc)));\n setFetchTask(createFetchTask(showResourcePlanDesc.getSchema()));\n }\n\n private void analyzeAlterResourcePlan(ASTNode ast) throws SemanticException {\n if (ast.getChildCount() < 1) {\n throw new SemanticException(\"Incorrect syntax\");</code>", "source": "SynthCodeNetNoImageTag", "user": "Convert code to text." } ]
[ { "assistant": "<loc_0><loc_0><loc_500><loc_500><_C++_>#include<bits/stdc++.h>\nusing namespace std;\ntypedef long long ll;\ntypedef vector<ll> vec;\ntypedef vector<vec> mat;\ntypedef pair<ll,ll> pll;\nconst ll mod=1e9+7;\n//const ll mod=998244353;\nconst ll inf=1LL<<61;\n\nint main() {\n ll x;\n cin >> x;\n ll v=x/100;\n x%=100;\n if(x<=v*5) cout << 1 << endl;\n else cout << 0 << endl;\n}</code>", "source": "SynthCodeNetNoImageTag", "user": "<code>" } ]
[ { "assistant": "<loc_0><loc_0><loc_500><loc_500><_Kotlin_>@file:Suppress(\"NOTHING_TO_INLINE\", \"EXPERIMENTAL_FEATURE_WARNING\", \"OVERRIDE_BY_INLINE\", \"EqualsOrHashCode\")\n\nimport java.io.PrintWriter\nimport java.lang.StringBuilder\nimport kotlin.math.*\nimport kotlin.random.Random\nimport kotlin.collections.sort as _sort\nimport kotlin.collections.sortDescending as _sortDescending\nimport kotlin.io.println as iprintln\n\n/** @author Spheniscine */\nfun main() { _writer.solve(); _writer.flush() }\nfun PrintWriter.solve() {\n val numCases = readInt()\n case@ for(case in 1..numCases) {\n //print(\"Case #$case: \")\n val n = readInt()\n val A = readLongArray(n)\n val S = read()\n\n val D = LongArray(60)\n\n val ans = run ans@ {\n for(i in n-1 downTo 0) {\n var x = A[i]\n if(S[i] == '0') {\n while(x != 0L) {\n val j = x.ctz\n if(D[j] == 0L) {\n D[j] = x\n break\n }\n x = x xor D[j]\n }\n } else {\n while(x != 0L) {\n val j = x.ctz\n if(D[j] == 0L) {\n return@ans 1\n }\n x = x xor D[j]\n }\n }\n }\n 0\n }\n\n println(ans)\n }\n}\n\ninline val Long.ctz get() = java.lang.Long.numberOfTrailingZeros(this)\n\n/** IO */\n//@JvmField val INPUT = File(\"input.txt\").inputStream()\n//@JvmField val OUTPUT = File(\"output.txt\").outputStream()\n@JvmField val INPUT = System.`in`\n@JvmField val OUTPUT = System.out\n\nconst val _BUFFER_SIZE = 1 shl 16\n@JvmField val _buffer = ByteArray(_BUFFER_SIZE)\n@JvmField var _bufferPt = 0\n@JvmField var _bytesRead = 0\n\ntailrec fun readChar(): Char {\n if(_bufferPt == _bytesRead) {\n _bufferPt = 0\n _bytesRead = INPUT.read(_buffer, 0, _BUFFER_SIZE)\n }\n return if(_bytesRead < 0) Char.MIN_VALUE\n else {\n val c = _buffer[_bufferPt++].toChar()\n if (c == '\\r') readChar()\n else c\n }\n}\n\nfun readLine(): String? {\n var c = readChar()\n return if(c == Char.MIN_VALUE) null\n else buildString {\n while(true) {\n when(c) {\n '\\n', Char.MIN_VALUE -> return@buildString\n else -> {\n append(c)\n c = readChar()\n }\n }\n }\n }\n}\nfun readLn() = readLine()!!\n\nfun read() = buildString {\n var c = readChar()\n while(c <= ' ') {\n if(c == Char.MIN_VALUE) return@buildString\n c = readChar()\n }\n do {\n append(c)\n c = readChar()\n } while(c > ' ')\n}\nfun readInt() = read().toInt()\nfun readDouble() = read().toDouble()\nfun readLong() = read().toLong()\nfun readStrings(n: Int) = List(n) { read() }\nfun readLines(n: Int) = List(n) { readLn() }\nfun readInts(n: Int) = List(n) { read().toInt() }\nfun readIntArray(n: Int) = IntArray(n) { read().toInt() }\nfun readDoubles(n: Int) = List(n) { read().toDouble() }\nfun readDoubleArray(n: Int) = DoubleArray(n) { read().toDouble() }\nfun readLongs(n: Int) = List(n) { read().toLong() }\nfun readLongArray(n: Int) = LongArray(n) { read().toLong() }\n\n@JvmField val _writer = PrintWriter(OUTPUT, false)\n\n/** shuffles and sort overrides to avoid quicksort attacks */\nprivate inline fun <T> _shuffle(rnd: Random, get: (Int) -> T, set: (Int, T) -> Unit, size: Int) {\n // Fisher-Yates shuffle algorithm\n for (i in size - 1 downTo 1) {\n val j = rnd.nextInt(i + 1)\n val temp = get(i)\n set(i, get(j))\n set(j, temp)\n }\n}\n\n@JvmField var _random: Random? = null\nval random get() = _random ?: Random(0x594E215C123 * System.nanoTime()).also { _random = it }\n\nfun IntArray.shuffle(rnd: Random = random) = _shuffle(rnd, ::get, ::set, size)\nfun IntArray.sort() { shuffle(); _sort() }\nfun IntArray.sortDescending() { shuffle(); _sortDescending() }\n\nfun LongArray.shuffle(rnd: Random = random) = _shuffle(rnd, ::get, ::set, size)\nfun LongArray.sort() { shuffle(); _sort() }\nfun LongArray.sortDescending() { shuffle(); _sortDescending() }\n\nfun DoubleArray.shuffle(rnd: Random = random) = _shuffle(rnd, ::get, ::set, size)\nfun DoubleArray.sort() { shuffle(); _sort() }\nfun DoubleArray.sortDescending() { shuffle(); _sortDescending() }\n\nfun CharArray.shuffle(rnd: Random = random) = _shuffle(rnd, ::get, ::set, size)\ninline fun CharArray.sort() { _sort() }\ninline fun CharArray.sortDescending() { _sortDescending() }\n\ninline fun <T: Comparable<T>> Array<out T>.sort() = _sort()\ninline fun <T: Comparable<T>> Array<out T>.sortDescending() = _sortDescending()\ninline fun <T: Comparable<T>> MutableList<out T>.sort() = _sort()\ninline fun <T: Comparable<T>> MutableList<out T>.sortDescending() = _sortDescending()\n\nfun `please stop removing these imports IntelliJ`() { iprintln(max(1, 2)) }\n\n/** additional commons */\ninline fun <T> Iterable<T>.sumByLong(func: (T) -> Long) = fold(0L) { acc, t -> acc + func(t) }\ninline fun <T> Sequence<T>.sumByLong(func: (T) -> Long) = fold(0L) { acc, t -> acc + func(t) }\ninline fun <T> Array<T>.sumByLong(func: (T) -> Long) = fold(0L) { acc, t -> acc + func(t) }\nfun IntArray.sumLong() = fold(0L, Long::plus)</code>", "source": "SynthCodeNetNoImageTag", "user": "<code>" } ]
[ { "assistant": "<code><loc_0><loc_0><loc_500><loc_500><_Ruby_>D, N = gets.split.map(&:to_i)\n\nputs 100 ** D * N</code>", "source": "SynthCodeNetNoImageTag", "user": "Convert code to text." } ]
[ { "assistant": "<loc_0><loc_0><loc_500><loc_500><_Cython_>\"\"\"\nBasis exchange matroids\n\n:class:`BasisExchangeMatroid <sage.matroids.basis_exchange_matroid.BasisExchangeMatroid>`\nis an abstract class implementing default matroid functionality in terms of\nbasis exchange. Several concrete matroid classes are subclasses of this. They\nhave the following methods in addition to the ones provided by the parent\nclass :mod:`Matroid <sage.matroids.matroid>`.\n\n- :func:`bases_count() <sage.matroids.basis_exchange_matroid.BasisExchangeMatroid.bases_count>`\n- :func:`groundset_list() <sage.matroids.basis_exchange_matroid.BasisExchangeMatroid.groundset_list>`\n\nAUTHORS:\n\n- Rudi Pendavingh, Stefan van Zwam (2013-04-01): initial version\n\nTESTS::\n\n sage: from sage.matroids.advanced import *\n sage: import sage.matroids.basis_exchange_matroid\n sage: M = sage.matroids.basis_exchange_matroid.BasisExchangeMatroid(\n ....: groundset=[1, 2, 3], rank=2)\n sage: TestSuite(M).run(skip=\"_test_pickling\")\n\nNote that this is an abstract base class, without data structure, so no\npickling mechanism was implemented.\n\nMethods\n=======\n\"\"\"\n#*****************************************************************************\n# Copyright (C) 2013 Rudi Pendavingh <rudi.pendavingh@gmail.com>\n# Copyright (C) 2013 Stefan van Zwam <stefanvanzwam@gmail.com>\n#\n# Distributed under the terms of the GNU General Public License (GPL)\n# as published by the Free Software Foundation; either version 2 of\n# the License, or (at your option) any later version.\n# http://www.gnu.org/licenses/\n#*****************************************************************************\n\nfrom .matroid cimport Matroid\nfrom .set_system cimport SetSystem\n\nfrom copy import copy\nfrom itertools import combinations, permutations\n\nfrom sage.data_structures.bitset_base cimport *\n\ncdef class BasisExchangeMatroid(Matroid):\n r\"\"\"\n Class BasisExchangeMatroid is a virtual class that derives from Matroid.\n It implements each of the elementary matroid methods\n (:meth:`rank() <sage.matroids.matroid.Matroid.rank>`,\n :meth:`max_independent() <sage.matroids.matroid.Matroid.max_independent>`,\n :meth:`circuit() <sage.matroids.matroid.Matroid.circuit>`,\n :meth:`closure() <sage.matroids.matroid.Matroid.closure>` etc.),\n essentially by crawling the base exchange graph of the matroid. This is\n the graph whose vertices are the bases of the matroid, two bases being\n adjacent in the graph if their symmetric difference has 2 members.\n\n This base exchange graph is not stored as such, but should be provided\n implicitly by the child class in the form of two methods\n ``__is_exchange_pair(x, y)`` and ``__exchange(x, y)``, as well as an\n initial basis. At any moment, BasisExchangeMatroid keeps a current basis\n `B`. The method ``__is_exchange_pair(x, y)`` should return a boolean\n indicating whether `B - x + y` is a basis. The method ``__exchange(x, y)``\n is called when the current basis `B` is replaced by said `B-x + y`. It is\n up to the child class to update its internal data structure to make\n information relative to the new basis more accessible. For instance, a\n linear matroid would perform a row reduction to make the column labeled by\n `y` a standard basis vector (and therefore the columns indexed by `B-x+y`\n would form an identity matrix).\n\n Each of the elementary matroid methods has a straightforward greedy-type\n implementation in terms of these two methods. For example, given a subset\n `F` of the groundset, one can step to a basis `B` over the edges of the\n base exchange graph which has maximal intersection with `F`, in each step\n increasing the intersection of the current `B` with `F`. Then one computes\n the rank of `F` as the cardinality of the intersection of `F` and `B`.\n\n The following matroid classes can/will implement their oracle efficiently\n by deriving from ``BasisExchangeMatroid``:\n\n - :class:`BasisMatroid <sage.matroids.basis_matroid.BasisMatroid>`: keeps\n a list of all bases.\n\n - ``__is_exchange_pair(x, y)`` reduces to a query whether `B - x + y`\n is a basis.\n - ``__exchange(x, y)`` has no work to do.\n\n - :class:`LinearMatroid <sage.matroids.linear_matroid.LinearMatroid>`:\n keeps a matrix representation `A` of the matroid so that `A[B] = I`.\n\n - ``__is_exchange_pair(x, y)`` reduces to testing whether `A[r, y]`\n is nonzero, where `A[r, x]=1`.\n - ``__exchange(x, y)`` should modify the matrix so that `A[B - x + y]`\n becomes `I`, which means pivoting on `A[r, y]`.\n\n - ``TransversalMatroid`` (not yet implemented): If `A` is a set of subsets\n of `E`, then `I` is independent if it is a system of distinct\n representatives of `A`, i.e. if `I` is covered by a matching of an\n appropriate bipartite graph `G`, with color classes `A` and `E` and an\n edge `(A_i,e)` if `e` is in the subset `A_i`. At any time you keep a\n maximum matching `M` of `G` covering the current basis `B`.\n\n - ``__is_exchange_pair(x, y)`` checks for the existence of an\n `M`-alternating path `P` from `y` to `x`.\n - ``__exchange(x, y)`` replaces `M` by the symmetric difference of\n `M` and `E(P)`.\n\n - ``AlgebraicMatroid`` (not yet implemented): keeps a list of polynomials\n in variables `E - B + e` for each variable `e` in `B`.\n\n - ``__is_exchange_pair(x, y)`` checks whether the polynomial that</code>", "source": "SynthCodeNetNoImageTag", "user": "<code>" } ]
[ { "assistant": "<code><loc_0><loc_0><loc_500><loc_500><_C++_>#include<stdio.h>\nint main()\n{\n int n, k, h[100000], dif_min, temp;\n scanf(\"%d%d\", &n, &k);\n for(int i = 0; i < n; i++)\n {\n scanf(\"%d\", &h[i]);\n }\n for(int i = n - 1; i > 0; i--)\n {\n for(int j = 0; j < i; j++)\n {\n if(h[j] > h[j + 1])\n {\n temp = h[j];\n h[j] = h[j + 1];\n h[j + 1] = temp;\n }\n }\n }\n dif_min = h[n - 1] - h[0];\n for(int i = 0; i <= n - k; i++)\n {\n if(dif_min > h[i + k - 1] - h[i])\n {\n dif_min = h[i + k - 1] - h[i];\n }\n }\n printf(\"%d\", dif_min);\n return 0;\n}\n</code>", "source": "SynthCodeNetNoImageTag", "user": "Convert code to text." } ]
[ { "assistant": "<code><loc_0><loc_0><loc_500><loc_500><_PHP_> 'Cannot write temporary file to disk.' => 'Cannot write temporary file to disk.',\n 'A PHP extension caused the upload to fail.' => 'A PHP extension caused the upload to fail.',\n 'This collection should contain {{ limit }} element or more.|This collection should contain {{ limit }} elements or more.' => 'This collection should contain {{ limit }} element or more.|This collection should contain {{ limit }} elements or more.',\n 'This collection should contain {{ limit }} element or less.|This collection should contain {{ limit }} elements or less.' => 'This collection should contain {{ limit }} element or less.|This collection should contain {{ limit }} elements or less.',\n 'This collection should contain exactly {{ limit }} element.|This collection should contain exactly {{ limit }} elements.' => 'This collection should contain exactly {{ limit }} element.|This collection should contain exactly {{ limit }} elements.',\n 'Invalid card number.' => 'Invalid card number.',\n 'Unsupported card type or invalid card number.' => 'Unsupported card type or invalid card number.',\n 'This is not a valid International Bank Account Number (IBAN).' => 'This is not a valid International Bank Account Number (IBAN).',\n 'This value is not a valid ISBN-10.' => 'This value is not a valid ISBN-10.',\n 'This value is not a valid ISBN-13.' => 'This value is not a valid ISBN-13.',\n 'This value is neither a valid ISBN-10 nor a valid ISBN-13.' => 'This value is neither a valid ISBN-10 nor a valid ISBN-13.',\n 'This value is not a valid ISSN.' => 'This value is not a valid ISSN.',\n 'This value is not a valid currency.' => 'This value is not a valid currency.',\n 'This value should be equal to {{ compared_value }}.' => 'This value should be equal to {{ compared_value }}.',\n 'This value should be greater than {{ compared_value }}.' => 'This value should be greater than {{ compared_value }}.',\n 'This value should be greater than or equal to {{ compared_value }}.' => 'This value should be greater than or equal to {{ compared_value }}.',\n 'This value should be identical to {{ compared_value_type }} {{ compared_value }}.' => 'This value should be identical to {{ compared_value_type }} {{ compared_value }}.',\n 'This value should be less than {{ compared_value }}.' => 'This value should be less than {{ compared_value }}.',\n 'This value should be less than or equal to {{ compared_value }}.' => 'This value should be less than or equal to {{ compared_value }}.',\n 'This value should not be equal to {{ compared_value }}.' => 'This value should not be equal to {{ compared_value }}.',\n 'This value should not be identical to {{ compared_value_type }} {{ compared_value }}.' => 'This value should not be identical to {{ compared_value_type }} {{ compared_value }}.',\n 'The image ratio is too big ({{ ratio }}). Allowed maximum ratio is {{ max_ratio }}.' => 'The image ratio is too big ({{ ratio }}). Allowed maximum ratio is {{ max_ratio }}.',\n 'The image ratio is too small ({{ ratio }}). Minimum ratio expected is {{ min_ratio }}.' => 'The image ratio is too small ({{ ratio }}). Minimum ratio expected is {{ min_ratio }}.',\n 'The image is square ({{ width }}x{{ height }}px). Square images are not allowed.' => 'The image is square ({{ width }}x{{ height }}px). Square images are not allowed.',\n 'The image is landscape oriented ({{ width }}x{{ height }}px). Landscape oriented images are not allowed.' => 'The image is landscape oriented ({{ width }}x{{ height }}px). Landscape oriented images are not allowed.',\n 'The image is portrait oriented ({{ width }}x{{ height }}px). Portrait oriented images are not allowed.' => 'The image is portrait oriented ({{ width }}x{{ height }}px). Portrait oriented images are not allowed.',\n 'An empty file is not allowed.' => 'An empty file is not allowed.',\n 'The host could not be resolved.' => 'The host could not be resolved.',\n 'This value does not match the expected {{ charset }} charset.' => 'This value does not match the expected {{ charset }} charset.',\n 'This is not a valid Business Identifier Code (BIC).' => 'This is not a valid Business Identifier Code (BIC).',\n ),\n));\n$catalogue->addFallbackCatalogue($catalogueEn);\n\nreturn $catalogue;\n</code>", "source": "SynthCodeNetNoImageTag", "user": "Convert code to text." } ]
[ { "assistant": "<loc_0><loc_0><loc_500><loc_500><_Go_>package commands\n\nimport (\n\t\"fmt\"\n\t\"net/url\"\n\n\t\"github.com/spf13/cobra\"\n\n\tcmn \"github.com/YAOChain/yao/core/libs/common\"\n\t\"github.com/YAOChain/yao/core/lite/proxy\"\n\trpcclient \"github.com/YAOChain/yao/core/rpc/client\"\n)\n\n// LiteCmd represents the base command when called without any subcommands\nvar LiteCmd = &cobra.Command{\n\tUse: \"lite\",\n\tShort: \"Run lite-client proxy server, verifying tendermint rpc\",\n\tLong: `This node will run a secure proxy to a tendermint rpc server.\n\nAll calls that can be tracked back to a block header by a proof</code>", "source": "SynthCodeNetNoImageTag", "user": "<code>" } ]
[ { "assistant": "<code><loc_0><loc_0><loc_500><loc_500><_Python_>import fractions\nN, M = map(int, input().split())\nS = input()\nT = input()\n\ndef lcm(x, y):\n return (x*y)//(fractions.gcd(x, y))\n\nL = lcm(N, M)\nnum = lcm(L//N, L//M)\n\nn = (N-1)*(L//N)+1\nm = (M-1)*(L//M)+1\n\nif(max(n, m) < num):\n if(S[0] == T[0]):\n print(L)\n else:\n print(-1)\nelse:\n if(N > M):\n tmp = M//(L//N)\n else:\n tmp = N//(L//M)\n for i in range(tmp):\n if(S[i*L//M] != T[i*L//N]):\n print(-1)\n break\n else:\n print(L)</code>", "source": "SynthCodeNetNoImageTag", "user": "Convert code to text." } ]
[ { "assistant": "<code><loc_0><loc_0><loc_500><loc_500><_C++_>\n#include <Maestro.H>\n#include <Maestro_F.H>\n\n#include <MaestroInletBCs.H>\n\nusing namespace amrex;\nusing namespace InletBCs;\n\nvoid Maestro::ScalarFill(const Array4<Real>& scal, const Box& bx,\n const Box& domainBox, const Real* dx, const BCRec bcs,\n const Real* gridlo, const int comp) {\n // timer for profiling\n BL_PROFILE_VAR(\"Maestro::ScalarFill()\", ScalarFill);\n\n fab_filcc(bx, scal, 1, domainBox, dx, gridlo, &bcs);\n\n FillExtBC(scal, bx, domainBox, dx, bcs, comp, false);\n}\n\nvoid Maestro::VelFill(const Array4<Real>& vel, const Box& bx,\n const Box& domainBox, const Real* dx, const BCRec bcs,\n const Real* gridlo, const int comp) {\n // timer for profiling\n BL_PROFILE_VAR(\"Maestro::VelFill()\", VelFill);\n\n fab_filcc(bx, vel, 1, domainBox, dx, gridlo, &bcs);\n\n FillExtBC(vel, bx, domainBox, dx, bcs, comp, true);\n}\n\nvoid Maestro::FillExtBC(const Array4<Real>& q, const Box& bx,\n const Box& domainBox, const Real* dx, const BCRec bcs,\n const int comp, const bool is_vel) {\n // timer for profiling\n BL_PROFILE_VAR(\"Maestro::FillExtBC()\", FillExtBC);\n\n // do nothing if there are no exterior boundaries\n bool found_ext_boundary = false;\n for (auto i = 0; i < AMREX_SPACEDIM; ++i) {\n if (bcs.lo(i) == BCType::ext_dir || bcs.hi(i) == BCType::ext_dir) {\n found_ext_boundary = true;\n break;\n }\n }\n if (!found_ext_boundary) return;\n\n // get parameters for EXT_DIR bcs\n const Real INLET_RHO_l = INLET_RHO;\n const Real INLET_RHOH_l = INLET_RHOH;\n const Real INLET_TEMP_l = INLET_TEMP;\n RealVector INLET_RHOX_l(NumSpec);\n for (int i = 0; i < NumSpec; ++i) INLET_RHOX_l[i] = INLET_RHOX[i];\n const Real INLET_VEL_l = INLET_VEL;\n\n const auto domlo = domainBox.loVect3d();\n const auto domhi = domainBox.hiVect3d();\n\n const auto lo = bx.loVect3d();\n const auto hi = bx.hiVect3d();\n\n if (lo[0] < domlo[0]) {\n auto imax = domlo[0];\n\n if (bcs.lo(0) == BCType::ext_dir) {\n ParallelFor(bx, [=] AMREX_GPU_DEVICE(int i, int j, int k) {\n if (i < imax) {\n q(i, j, k) = 1.0;\n }\n });\n Gpu::synchronize();\n }\n }\n\n if (hi[0] > domhi[0]) {\n auto imin = domhi[0];\n\n if (bcs.hi(0) == BCType::ext_dir) {\n ParallelFor(bx, [=] AMREX_GPU_DEVICE(int i, int j, int k) {\n if (i > imin) {\n q(i, j, k) = 1.0;\n }\n });\n Gpu::synchronize();\n }\n }\n\n if (lo[1] < domlo[1]) {\n auto jmax = domlo[1];\n\n if (bcs.lo(1) == BCType::ext_dir) {\n if (is_vel) {\n if (comp == 0) {\n ParallelFor(bx, [=] AMREX_GPU_DEVICE(int i, int j, int k) {\n if (j < jmax) {\n q(i, j, k) = 0.0;\n }\n });\n } else if (comp == 1) {\n ParallelFor(bx, [=] AMREX_GPU_DEVICE(int i, int j, int k) {\n if (j < jmax) {\n q(i, j, k) = INLET_VEL_l;\n }\n });\n }\n Gpu::synchronize();\n } else {\n if (INLET_VEL != 0.0) {\n if (comp == Rho) {\n ParallelFor(bx,\n [=] AMREX_GPU_DEVICE(int i, int j, int k) {\n if (j < jmax) {\n q(i, j, k) = INLET_RHO_l;\n }\n });\n } else if (comp == RhoH) {\n ParallelFor(bx,\n [=] AMREX_GPU_DEVICE(int i, int j, int k) {\n if (j < jmax) {\n q(i, j, k) = INLET_RHOH_l;\n }\n });\n } else if (comp >= FirstSpec &&\n comp < FirstSpec + NumSpec) {\n Real* AMREX_RESTRICT INLET_RHOX_p =\n INLET_RHOX.dataPtr();\n ParallelFor(\n bx, [=] AMREX_GPU_DEVICE(int i, int j, int k) {\n if (j < jmax) {\n q(i, j, k) = INLET_RHOX_p[comp - FirstSpec];\n }\n });\n } else if (comp == Temp) {\n ParallelFor(bx,\n [=] AMREX_GPU_DEVICE(int i, int j, int k) {\n if (j < jmax) {\n q(i, j, k) = INLET_TEMP_l;\n }\n });\n } else {\n ParallelFor(bx,\n [=] AMREX_GPU_DEVICE(int i, int j, int k) {\n if (j < jmax) {\n q(i, j, k) = 0.0;\n }\n });\n }\n } else {\n ParallelFor(bx, [=] AMREX_GPU_DEVICE(int i, int j, int k) {\n if (j < jmax) {\n q(i, j, k) = 0.0;\n }\n });\n }\n Gpu::synchronize();\n } // end if is_vel\n }\n }\n\n if (hi[1] > domhi[1]) {\n auto jmin = domhi[1];\n\n if (bcs.hi(1) == BCType::ext_dir) {\n ParallelFor(bx, [=] AMREX_GPU_DEVICE(int i, int j, int k) {\n if (j > jmin) {\n q(i, j, k) = 1.0;\n }\n });\n }\n Gpu::synchronize();\n }\n\n#if AMREX_SPACEDIM == 3\n\n if (lo[2] < domlo[2]) {\n auto kmax = domlo[2];\n\n if (bcs.lo(2) == BCType::ext_dir) {</code>", "source": "SynthCodeNetNoImageTag", "user": "Convert code to text." } ]
[ { "assistant": "<loc_0><loc_0><loc_500><loc_500><_Dockerfile_>\nWORKDIR /app\n\nCOPY package.json .\n\nRUN npm install\n\nCOPY . .\n\nEXPOSE 3000\n\nCMD [ \"npm\", \"start\" ]</code>", "source": "SynthCodeNetNoImageTag", "user": "<code>" } ]
[ { "assistant": "<code><loc_0><loc_0><loc_500><loc_500><_C++_> BYTE keyState[256];\n GetKeyboardState(keyState);\n if (ToAscii(vCode,nFlags & 0xff,keyState,&nChar,0) == 0)\n {\n nChar = 0;\n }\n#endif\n }\n const char *keysym = AsciiToKeySymTable[(unsigned char)nChar];\n if (keysym == 0)\n {\n keysym = VKeyCodeToKeySymTable[(unsigned char)vCode];\n }\n if (keysym == 0)\n {\n keysym = \"None\";\n }\n this->SetKeyEventInformation(ctrl,\n shift,\n nChar,\n nRepCnt,\n keysym);\n this->SetAltKey(alt);\n this->InvokeEvent(vtkCommand::KeyPressEvent, NULL);\n}\n\n//----------------------------------------------------------------------------\nvoid vtkWin32OpenGLRenderWindowInteractor::OnKeyUp(HWND, UINT vCode, UINT nRepCnt, UINT nFlags)\n{\n if (!this->Enabled)\n {\n return;\n }\n int ctrl = GetKeyState(VK_CONTROL) & (~1);\n int shift = GetKeyState(VK_SHIFT) & (~1);\n int alt = GetKeyState(VK_MENU) & (~1);\n WORD nChar = 0;\n {\n BYTE keyState[256];\n#ifndef _WIN32_WCE\n GetKeyboardState(keyState);\n if (ToAscii(vCode,nFlags & 0xff,keyState,&nChar,0) == 0)\n {\n nChar = 0;\n }\n#endif\n }\n const char *keysym = AsciiToKeySymTable[(unsigned char)nChar];\n if (keysym == 0)\n {\n keysym = VKeyCodeToKeySymTable[(unsigned char)vCode];\n }\n if (keysym == 0)\n {\n keysym = \"None\";\n }\n this->SetKeyEventInformation(ctrl,\n shift,\n nChar,\n nRepCnt,\n keysym);\n this->SetAltKey(alt);\n this->InvokeEvent(vtkCommand::KeyReleaseEvent, NULL);\n}\n\n//----------------------------------------------------------------------------\nvoid vtkWin32OpenGLRenderWindowInteractor::OnChar(HWND,UINT nChar,\n UINT nRepCnt, UINT)\n{\n if (!this->Enabled)\n {\n return;\n }\n int ctrl = GetKeyState(VK_CONTROL) & (~1);\n int shift = GetKeyState(VK_SHIFT) & (~1);\n int alt = GetKeyState(VK_MENU) & (~1);\n this->SetKeyEventInformation(ctrl,\n shift,\n nChar,\n nRepCnt);\n this->SetAltKey(alt);\n this->InvokeEvent(vtkCommand::CharEvent, NULL);\n}\n\n//----------------------------------------------------------------------------\nvoid vtkWin32OpenGLRenderWindowInteractor::OnFocus(HWND,UINT)\n{\n if (!this->Enabled)\n {\n return;\n }\n\n#ifdef VTK_USE_TDX\n if(this->Device->GetInitialized() && !this->Device->GetIsListening())\n {\n this->Device->StartListening();\n }\n#endif\n}\n\n//----------------------------------------------------------------------------\nvoid vtkWin32OpenGLRenderWindowInteractor::OnKillFocus(HWND,UINT)\n{\n if (!this->Enabled)\n {\n return;\n }\n#ifdef VTK_USE_TDX\n if(this->Device->GetInitialized() && this->Device->GetIsListening())\n {\n this->Device->StopListening();\n }\n#endif\n}\n\n// This function is used to return an index given an ID\nint vtkWin32OpenGLRenderWindowInteractor::GetContactIndex(int dwID)\n{\n for (int i=0; i < VTKI_MAX_POINTERS; i++)\n {\n if (this->IDLookup[i] == dwID)\n {\n return i;\n }\n }\n\n for (int i=0; i < VTKI_MAX_POINTERS; i++)\n {\n if (this->IDLookup[i] == -1)\n {\n this->IDLookup[i] = dwID;\n return i;\n }\n }\n\n // Out of contacts\n return -1;\n}\n\n//----------------------------------------------------------------------------\nvoid vtkWin32OpenGLRenderWindowInteractor::OnTouch(HWND hWnd, UINT wParam, UINT lParam)\n{\n if (!this->Enabled)\n {\n return;\n }\n\n UINT cInputs = LOWORD(wParam);\n PTOUCHINPUT pInputs = new TOUCHINPUT[cInputs];\n if (pInputs)\n {\n int ctrl = GetKeyState(VK_CONTROL) & (~1);\n int shift = GetKeyState(VK_SHIFT) & (~1);\n this->SetAltKey(GetKeyState(VK_MENU) & (~1));\n GetTouchInputInfoType GTII =\n (GetTouchInputInfoType)GetProcAddress(GetModuleHandle(TEXT(\"user32\")), \"GetTouchInputInfo\");\n if (GTII((HTOUCHINPUT)lParam, cInputs, pInputs, sizeof(TOUCHINPUT)))\n {\n POINT ptInput;\n for (UINT i=0; i < cInputs; i++)\n {\n TOUCHINPUT ti = pInputs[i];\n int index = this->GetContactIndex(ti.dwID);\n if (ti.dwID != 0 && index < VTKI_MAX_POINTERS)\n {\n // Do something with your touch input handle\n ptInput.x = TOUCH_COORD_TO_PIXEL(ti.x);\n ptInput.y = TOUCH_COORD_TO_PIXEL(ti.y);\n ScreenToClient(hWnd, &ptInput);\n this->SetEventInformationFlipY(ptInput.x,\n ptInput.y,\n ctrl,\n shift,\n 0,0,0,\n index);\n }\n }\n bool didUpOrDown = false;\n for (UINT i=0; i < cInputs; i++)\n {\n TOUCHINPUT ti = pInputs[i];\n int index = this->GetContactIndex(ti.dwID);\n if (ti.dwID != 0 && index < VTKI_MAX_POINTERS)\n {\n if (ti.dwFlags & TOUCHEVENTF_UP)\n {\n this->SetPointerIndex(index);\n didUpOrDown = true;\n this->InvokeEvent(vtkCommand::LeftButtonReleaseEvent,NULL);\n this->IDLookup[index] = -1;\n }\n if (ti.dwFlags & TOUCHEVENTF_DOWN)\n {\n this->SetPointerIndex(index);\n didUpOrDown = true;\n this->InvokeEvent(vtkCommand::LeftButtonPressEvent,NULL);\n }\n this->SetPointerIndex(index);\n }\n }\n if (!didUpOrDown)\n {\n this->InvokeEvent(vtkCommand::MouseMoveEvent, NULL);\n }\n }\n CloseTouchInputHandleType CTIH =\n (CloseTouchInputHandleType)GetProcAddress(GetModuleHandle(TEXT(\"user32\")), \"CloseTouchInputHandle\");\n CTIH((HTOUCHINPUT)lParam);\n delete [] pInputs;\n }\n}\n\n//----------------------------------------------------------------------------\n// This is only called when InstallMessageProc is true\nLRESULT CALLBACK vtkHandleMessage(HWND hWnd,UINT uMsg, WPARAM wParam,\n LPARAM lParam)\n{\n LRESULT res = 0;\n vtkWin32OpenGLRenderWindow *ren;\n vtkWin32OpenGLRenderWindowInteractor *me = 0;\n\n ren = (vtkWin32OpenGLRenderWindow *)vtkGetWindowLong(hWnd,sizeof(vtkLONG));\n\n if (ren)\n {\n me = (vtkWin32OpenGLRenderWindowInteractor *)ren->GetInteractor();\n }\n\n if (me && me->GetReferenceCount()>0)\n {\n me->Register(me);\n res = vtkHandleMessage2(hWnd,uMsg,wParam,lParam,me);\n me->UnRegister(me);\n }\n\n return res;\n}\n\n#ifndef MAKEPOINTS\n#define MAKEPOINTS(l) (*((POINTS FAR *) & (l)))\n#endif\n\n//----------------------------------------------------------------------------\nLRESULT CALLBACK vtkHandleMessage2(HWND hWnd,UINT uMsg, WPARAM wParam,\n LPARAM lParam,\n vtkWin32OpenGLRenderWindowInteractor *me)\n{\n if ((uMsg == WM_USER+13)&&(wParam == 26))\n {\n // someone is telling us to set our OldProc\n me->OldProc = (WNDPROC)lParam;\n return 1;\n }\n\n switch (uMsg)\n {\n case WM_PAINT:\n me->Render();\n return CallWindowProc(me->OldProc,hWnd,uMsg,wParam,lParam);\n break;\n\n case WM_SIZE:\n me->OnSize(hWnd,wParam,LOWORD(lParam),HIWORD(lParam));\n return CallWindowProc(me->OldProc,hWnd,uMsg,wParam,lParam);\n break;\n</code>", "source": "SynthCodeNetNoImageTag", "user": "Convert code to text." } ]
[ { "assistant": "<code><loc_0><loc_0><loc_500><loc_500><_C#_>using System;\nusing System.Collections.Generic;\nusing System.Text;\n\nnamespace AtTest.Yahoo2019\n{\n class C\n {\n static void Main(string[] args)\n {\n Method(args);\n Console.ReadLine();\n }\n\n static void Method(string[] args)\n {\n long[] kab = ReadLongs();\n long k = kab[0];\n long a = kab[1];\n long b = kab[2];\n if (b - 2 <= a)\n {\n Console.WriteLine(1 + k);\n }\n else\n {\n if (k <= a - 1)\n {\n Console.WriteLine(1 + k);\n }\n else\n {\n k -= a - 1;\n long res = a;\n long delta = b - a;\n res += delta * (k / 2);\n if (k % 2 > 0) res++;\n Console.WriteLine(res);\n }\n }\n }\n\n private static string Read() { return Console.ReadLine(); }\n private static int ReadInt() { return int.Parse(Read()); }\n private static long ReadLong() { return long.Parse(Read()); }\n private static double ReadDouble() { return double.Parse(Read()); }\n private static int[] ReadInts() { return Array.ConvertAll(Read().Split(), int.Parse); }\n private static long[] ReadLongs() { return Array.ConvertAll(Read().Split(), long.Parse); }\n private static double[] ReadDoubles() { return Array.ConvertAll(Read().Split(), double.Parse); }\n }\n}\n</code>", "source": "SynthCodeNetNoImageTag", "user": "Convert code to text." } ]
[ { "assistant": "<code><loc_0><loc_0><loc_500><loc_500><_C#_>using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace ABC118A\n{\n class Program\n {\n static void Main(string[] args)\n {\n int A = int.Parse(Console.ReadLine());\n int B = int.Parse(Console.ReadLine());\n\n if (B % A == 0)\n {\n Console.WriteLine(A + B);\n }\n else\n {\n Console.WriteLine(B - A);\n }\n\n Console.ReadKey();\n }\n }\n}\n</code>", "source": "SynthCodeNetNoImageTag", "user": "Convert code to text." } ]
[ { "assistant": "<loc_0><loc_0><loc_500><loc_500><_Cuda_>/*\n* Copyright 2019-2020 NVIDIA CORPORATION.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n#include \"gtest/gtest.h\"\n\n#include \"../src/index_cache.cuh\"\n\n#include <string>\n#include <vector>\n\n#include \"cudamapper_file_location.hpp\"\n\n#include <claraparabricks/genomeworks/utils/signed_integer_utils.hpp>\n#include <claraparabricks/genomeworks/cudamapper/index.hpp>\n#include <claraparabricks/genomeworks/io/fasta_parser.hpp>\n\nnamespace claraparabricks\n{\n\nnamespace genomeworks\n{\n\nnamespace cudamapper\n{\n\nvoid check_if_index_is_correct(const std::shared_ptr<const Index>& index,\n const std::vector<representation_t>& expected_representations,\n const std::vector<read_id_t>& expected_read_ids,\n const std::vector<position_in_read_t>& expected_positions_in_reads,\n const std::vector<SketchElement::DirectionOfRepresentation>& expected_directions_of_reads,\n const std::vector<representation_t>& expected_unique_representations,\n const std::vector<std::uint32_t>& expected_first_occurrence_of_representations,\n const read_id_t expected_number_of_reads,\n const read_id_t expected_smallest_read_id,\n const read_id_t expected_largest_read_id,\n const position_in_read_t expected_number_of_basepairs_in_longest_read,\n const uint64_t expected_maximum_kmer_size,\n const cudaStream_t cuda_stream,\n const std::string& test_uid)\n{\n ASSERT_EQ(get_size(expected_representations), get_size(expected_read_ids)) << \" test_uid: \" << test_uid;\n ASSERT_EQ(get_size(expected_representations), get_size(expected_positions_in_reads)) << \" test_uid: \" << test_uid;\n ASSERT_EQ(get_size(expected_representations), get_size(expected_directions_of_reads)) << \" test_uid: \" << test_uid;\n ASSERT_EQ(get_size(expected_unique_representations), get_size(expected_first_occurrence_of_representations) - 1) << \" test_uid: \" << test_uid;\n ASSERT_LE(expected_number_of_reads, expected_largest_read_id - expected_smallest_read_id + 1) << \" test_uid: \" << test_uid;\n\n ASSERT_EQ(get_size(index->representations()), get_size(expected_representations)) << \" test_uid: \" << test_uid;\n std::vector<representation_t> index_representations(index->representations().size());\n cudautils::device_copy_n(index->representations().data(), index->representations().size(), index_representations.data(), cuda_stream); // D2H\n\n ASSERT_EQ(get_size(index->read_ids()), get_size(expected_read_ids)) << \" test_uid: \" << test_uid;\n std::vector<read_id_t> index_read_ids(index->read_ids().size());\n cudautils::device_copy_n(index->read_ids().data(), index->read_ids().size(), index_read_ids.data(), cuda_stream); // D2H\n\n ASSERT_EQ(get_size(index->positions_in_reads()), get_size(expected_positions_in_reads)) << \" test_uid: \" << test_uid;\n std::vector<position_in_read_t> index_positions_in_reads(index->positions_in_reads().size());\n cudautils::device_copy_n(index->positions_in_reads().data(), index->positions_in_reads().size(), index_positions_in_reads.data(), cuda_stream); // D2H\n\n ASSERT_EQ(get_size(index->directions_of_reads()), get_size(expected_directions_of_reads)) << \" test_uid: \" << test_uid;\n std::vector<SketchElement::DirectionOfRepresentation> index_directions_of_reads(index->directions_of_reads().size());\n cudautils::device_copy_n(index->directions_of_reads().data(), index->directions_of_reads().size(), index_directions_of_reads.data(), cuda_stream); // D2H\n\n ASSERT_EQ(get_size(index->unique_representations()), get_size(expected_unique_representations)) << \" test_uid: \" << test_uid;\n std::vector<representation_t> index_unique_representations(index->unique_representations().size());\n cudautils::device_copy_n(index->unique_representations().data(), index->unique_representations().size(), index_unique_representations.data(), cuda_stream); // D2H\n\n ASSERT_EQ(get_size(index->first_occurrence_of_representations()), get_size(expected_first_occurrence_of_representations)) << \" test_uid: \" << test_uid;\n std::vector<std::uint32_t> index_first_occurrence_of_representations(index->first_occurrence_of_representations().size());\n cudautils::device_copy_n(index->first_occurrence_of_representations().data(), index->first_occurrence_of_representations().size(), index_first_occurrence_of_representations.data(), cuda_stream); // D2H\n\n read_id_t index_number_of_reads = index->number_of_reads();\n\n read_id_t index_smallest_read_id = index->smallest_read_id();\n\n read_id_t index_largest_read_id = index->largest_read_id();\n\n position_in_read_t index_number_of_basepairs_in_longest_read = index->number_of_basepairs_in_longest_read();\n\n uint64_t index_maximum_kmer_size = index->maximum_kmer_size();\n\n GW_CU_CHECK_ERR(cudaStreamSynchronize(cuda_stream));\n\n ASSERT_EQ(index_representations, expected_representations) << \" test_uid: \" << test_uid;\n ASSERT_EQ(index_read_ids, expected_read_ids) << \" test_uid: \" << test_uid;\n ASSERT_EQ(index_positions_in_reads, expected_positions_in_reads) << \" test_uid: \" << test_uid;\n ASSERT_EQ(index_directions_of_reads, expected_directions_of_reads) << \" test_uid: \" << test_uid;</code>", "source": "SynthCodeNetNoImageTag", "user": "<code>" } ]
[ { "assistant": "<code><loc_0><loc_0><loc_500><loc_500><_Java_>\n/**\n * @author Marko A. Rodriguez (http://markorodriguez.com)\n */\npublic final class OrP<V> extends ConnectiveP<V> {\n\n public OrP(final List<P<V>> predicates) {\n super(predicates);\n for (final P<V> p : predicates) {\n this.or(p);\n }\n this.biPredicate = new OrBiPredicate(this);\n }\n\n @Deprecated\n /**\n * @deprecated As of release 3.2.0-incubating, replaced by {@link OrP(List)}\n */\n public OrP(final P<V>... predicates) {\n this(Arrays.asList(predicates));\n }\n\n @Override\n public P<V> or(final Predicate<? super V> predicate) {\n if (!(predicate instanceof P))\n throw new IllegalArgumentException(\"Only P predicates can be or'd together\");\n else if (predicate instanceof OrP)\n this.predicates.addAll(((OrP) predicate).getPredicates());\n else\n this.predicates.add((P<V>) predicate);\n return this;\n }\n\n @Override\n public P<V> negate() {\n super.negate();\n return new AndP<>(this.predicates);\n }\n\n @Override\n public String toString() {\n return \"or(\" + StringFactory.removeEndBrackets(this.predicates) + \")\";\n }\n\n @Override\n public OrP<V> clone() {\n final OrP<V> clone = (OrP<V>) super.clone();\n clone.biPredicate = new OrBiPredicate(clone);\n return clone;\n }\n\n private class OrBiPredicate implements BiPredicate<V, V>, Serializable {\n\n private final OrP<V> orP;\n\n private OrBiPredicate(final OrP<V> orP) {\n this.orP = orP;\n }\n\n @Override\n public boolean test(final V valueA, final V valueB) {\n for (final P<V> predicate : this.orP.predicates) {\n if (predicate.test(valueA))\n return true;\n }\n return false;\n }\n }\n}</code>", "source": "SynthCodeNetNoImageTag", "user": "Convert code to text." } ]
[ { "assistant": "<code><loc_0><loc_0><loc_500><loc_500><_Java_>package com.atlassian.bamboo.specs.api.model.fullstackbiz.github.status.action;\n\nimport com.atlassian.bamboo.chains.StageExecution;\nimport com.atlassian.bamboo.chains.plugins.PreStageAction;\nimport com.atlassian.bamboo.plan.PlanManager;\nimport org.jetbrains.annotations.NotNull;\nimport org.kohsuke.github.GHCommitState;\nimport com.atlassian.bamboo.specs.api.model.fullstackbiz.github.status.service.GithubServiceInterface;\n\npublic class GitHubStatusPreStage extends AbstractGitHubStatusAction implements PreStageAction {\n GitHubStatusPreStage(PlanManager planManager, GithubServiceInterface gitHubService) {\n super(planManager, gitHubService);\n }\n\n @Override\n public void execute(@NotNull StageExecution stageExecution) {\n pushUpdate(stageExecution, GHCommitState.PENDING);\n }\n}\n</code>", "source": "SynthCodeNetNoImageTag", "user": "Convert code to text." } ]
[ { "assistant": "<code><loc_0><loc_0><loc_500><loc_500><_Java_>/*\n * Copyright 2012-2016 CodeLibs Project and the Others.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,\n * either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\npackage org.codelibs.fess.es.config.cbean.bs;\n\nimport java.util.ArrayList;\nimport java.util.List;\nimport java.util.Map;\n\nimport org.codelibs.fess.es.config.allcommon.EsAbstractConditionBean;\nimport org.codelibs.fess.es.config.bsentity.dbmeta.ElevateWordDbm;\nimport org.codelibs.fess.es.config.cbean.ElevateWordCB;\nimport org.codelibs.fess.es.config.cbean.cq.ElevateWordCQ;\nimport org.codelibs.fess.es.config.cbean.cq.bs.BsElevateWordCQ;\nimport org.dbflute.cbean.ConditionQuery;\nimport org.elasticsearch.action.search.SearchRequestBuilder;\nimport org.elasticsearch.index.query.QueryBuilder;\n\n/**\n * @author ESFlute (using FreeGen)\n */\npublic class BsElevateWordCB extends EsAbstractConditionBean {\n\n // ===================================================================================\n // Attribute\n // =========\n protected BsElevateWordCQ _conditionQuery;\n protected HpSpecification _specification;\n\n // ===================================================================================\n // Control\n // =======\n @Override\n public ElevateWordDbm asDBMeta() {\n return ElevateWordDbm.getInstance();\n }\n\n @Override\n public String asTableDbName() {\n return \"elevate_word\";\n }\n\n @Override\n public boolean hasSpecifiedColumn() {\n return _specification != null;\n }\n\n @Override\n public ConditionQuery localCQ() {\n return doGetConditionQuery();\n }\n\n // ===================================================================================\n // Primary Key\n // ===========\n public ElevateWordCB acceptPK(String id) {\n assertObjectNotNull(\"id\", id);\n BsElevateWordCB cb = this;\n cb.query().docMeta().setId_Equal(id);\n return (ElevateWordCB) this;\n }\n\n @Override\n public void acceptPrimaryKeyMap(Map<String, ? extends Object> primaryKeyMap) {\n acceptPK((String) primaryKeyMap.get(\"_id\"));\n }\n\n // ===================================================================================\n // Build\n // =====\n\n @Override\n public SearchRequestBuilder build(SearchRequestBuilder builder) {\n if (_conditionQuery != null) {\n QueryBuilder queryBuilder = _conditionQuery.getQuery();\n if (queryBuilder != null) {\n builder.setQuery(queryBuilder);\n }\n _conditionQuery.getFieldSortBuilderList().forEach(sort -> {\n builder.addSort(sort);\n });\n }\n\n if (_specification != null) {\n builder.setFetchSource(_specification.columnList.toArray(new String[_specification.columnList.size()]), null);\n }\n\n return builder;\n }\n\n // ===================================================================================\n // Query\n // =====\n public BsElevateWordCQ query() {\n assertQueryPurpose();\n return doGetConditionQuery();\n }\n\n protected BsElevateWordCQ doGetConditionQuery() {\n if (_conditionQuery == null) {\n _conditionQuery = createLocalCQ();\n }\n return _conditionQuery;\n }\n\n protected BsElevateWordCQ createLocalCQ() {\n return new ElevateWordCQ();\n }\n\n // ===================================================================================\n // Specify\n // =======\n public HpSpecification specify() {\n assertSpecifyPurpose();\n if (_specification == null) {</code>", "source": "SynthCodeNetNoImageTag", "user": "Convert code to text." } ]
[ { "assistant": "<code><loc_0><loc_0><loc_500><loc_500><_YAML_> name: Dotnet build\n steps:\n - uses: actions/checkout@v2\n with:\n fetch-depth: 0\n - name: Setup dotnet SDK 3.1\n uses: actions/setup-dotnet@v1\n with:\n dotnet-version: '3.1.x' \n - name: Setup dotnet SDK 5\n uses: actions/setup-dotnet@v1\n with:\n dotnet-version: '5.0.x' \n - name: Setup dotnet SDK 6\n uses: actions/setup-dotnet@v1\n with:\n dotnet-version: '6.0.x' \n - name: Check Format\n # don't check formatting on Windows b/c of CRLF issues.\n if: matrix.os == 'ubuntu-latest'\n run: dotnet format --severity error --verify-no-changes --exclude ./src/KubernetesClient/generated/\n - name: Build\n run: dotnet build --configuration Release\n - name: Test\n run: dotnet test /p:CollectCoverage=true /p:ExcludeByFile=\\\"**/KubernetesClient/generated/**/*.cs\\\" /p:CoverletOutputFormat=\"cobertura\"\n # - uses: 5monkeys/cobertura-action@master\n # with:\n # path: tests/KubernetesClient.Tests/coverage.netcoreapp2.1.cobertura.xml\n # repo_token: ${{ secrets.GITHUB_TOKEN }}\n # minimum_coverage: 0\n e2e:\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v1\n with:\n fetch-depth: 0\n - name: Setup dotnet SDK 3.1\n uses: actions/setup-dotnet@v1\n with:\n dotnet-version: '3.1.x' \n - name: Setup dotnet SDK 5\n uses: actions/setup-dotnet@v1\n with:\n dotnet-version: '5.0.x' \n - name: Setup dotnet SDK 6\n uses: actions/setup-dotnet@v1\n with:\n dotnet-version: '6.0.x' \n - name: Minikube\n run: minikube start\n - name: Test\n run: |\n true > skip.log\n env K8S_E2E_MINIKUBE=1 dotnet test tests/E2E.Tests --logger \"SkipTestLogger;file=$PWD/skip.log\"\n if [ -s skip.log ]; then\n cat skip.log\n echo \"CASES MUST NOT BE SKIPPED\"\n exit 1\n fi \n\non:\n pull_request:\n types: [assigned, opened, synchronize, reopened]\n</code>", "source": "SynthCodeNetNoImageTag", "user": "Convert code to text." } ]
[ { "assistant": "<code><loc_0><loc_0><loc_500><loc_500><_SQL_>\ncreate table ACT_ID_INFO (\n ID_ varchar(64),\n REV_ integer,\n USER_ID_ varchar(64),\n TYPE_ varchar(64),\n KEY_ varchar(255),\n VALUE_ varchar(255),\n PASSWORD_ bytea,\n PARENT_ID_ varchar(255),\n primary key (ID_)\n);\n\ncreate index ACT_IDX_MEMB_GROUP on ACT_ID_MEMBERSHIP(GROUP_ID_);\nalter table ACT_ID_MEMBERSHIP \n add constraint ACT_FK_MEMB_GROUP\n foreign key (GROUP_ID_) \n references ACT_ID_GROUP (ID_);\n\ncreate index ACT_IDX_MEMB_USER on ACT_ID_MEMBERSHIP(USER_ID_);\nalter table ACT_ID_MEMBERSHIP \n add constraint ACT_FK_MEMB_USER\n foreign key (USER_ID_) \n references ACT_ID_USER (ID_);\n</code>", "source": "SynthCodeNetNoImageTag", "user": "Convert code to text." } ]
[ { "assistant": "<code><loc_0><loc_0><loc_500><loc_500><_PHP_>\n public function employee()\n {\n return $this->hasMany(Employee::class);\n }\n}\n</code>", "source": "SynthCodeNetNoImageTag", "user": "Convert code to text." } ]
[ { "assistant": "<code><loc_0><loc_0><loc_500><loc_500><_Java_>/**\r\n * Copyright 1996-2013 Founder International Co.,Ltd.\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n * \r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n * \r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n * \r\n * @author kenshin\r\n */\r\n\r\n\r\npackage com.founder.fix.fixflow.core.pvm;\r\n\r\nimport java.io.Serializable;\r\n\r\n\r\n/**\r\n * @author kenshin\r\n */\r\npublic interface PvmProcessElement extends Serializable {\r\n\r\n String getId();\r\n \r\n PvmProcessDefinition getProcessDefinition();\r\n \r</code>", "source": "SynthCodeNetNoImageTag", "user": "Convert code to text." } ]
[ { "assistant": "<code><loc_0><loc_0><loc_500><loc_500><_Go_>// Code generated by go-swagger; DO NOT EDIT.\n\n// Copyright (c) 2016, 2017, 2018 Alexandre Biancalana <ale@biancalanas.net>.\n// All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n// * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright\n// notice, this list of conditions and the following disclaimer in the\n// documentation and/or other materials provided with the distribution.\n// * Neither the name of the <organization> nor the\n// names of its contributors may be used to endorse or promote products\n// derived from this software without specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n// DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY\n// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n\npackage keypair\n\n// This file was generated by the swagger tool.\n// Editing this file might prove futile when you re-run the swagger generate command\n\nimport (\n\t\"net/http\"\n\n\t\"github.com/go-openapi/runtime\"\n)\n\n// DeleteKeypairOKCode is the HTTP code returned for type DeleteKeypairOK\nconst DeleteKeypairOKCode int = 200\n\n/*DeleteKeypairOK successful operation\n\nswagger:response deleteKeypairOK\n*/\ntype DeleteKeypairOK struct {\n}\n\n// NewDeleteKeypairOK creates DeleteKeypairOK with default headers values\nfunc NewDeleteKeypairOK() *DeleteKeypairOK {\n\treturn &DeleteKeypairOK{}\n}\n\n// WriteResponse to the client\nfunc (o *DeleteKeypairOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {\n\n\trw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses\n\n\trw.WriteHeader(200)\n}\n\n// DeleteKeypairBadRequestCode is the HTTP code returned for type DeleteKeypairBadRequest\nconst DeleteKeypairBadRequestCode int = 400\n\n/*DeleteKeypairBadRequest Invalid ID supplied\n\nswagger:response deleteKeypairBadRequest\n*/\ntype DeleteKeypairBadRequest struct {\n}\n\n// NewDeleteKeypairBadRequest creates DeleteKeypairBadRequest with default headers values\nfunc NewDeleteKeypairBadRequest() *DeleteKeypairBadRequest {\n\treturn &DeleteKeypairBadRequest{}\n}\n\n// WriteResponse to the client\nfunc (o *DeleteKeypairBadRequest) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {\n\n\trw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses\n\n\trw.WriteHeader(400)\n}\n\n// DeleteKeypairNotFoundCode is the HTTP code returned for type DeleteKeypairNotFound\nconst DeleteKeypairNotFoundCode int = 404\n\n/*DeleteKeypairNotFound Keypair not found\n\nswagger:response deleteKeypairNotFound\n*/\ntype DeleteKeypairNotFound struct {\n}\n\n// NewDeleteKeypairNotFound creates DeleteKeypairNotFound with default headers values\nfunc NewDeleteKeypairNotFound() *DeleteKeypairNotFound {\n\treturn &DeleteKeypairNotFound{}\n}\n\n// WriteResponse to the client\nfunc (o *DeleteKeypairNotFound) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {\n\n\trw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses\n\n\trw.WriteHeader(404)\n}\n</code>", "source": "SynthCodeNetNoImageTag", "user": "Convert code to text." } ]
[ { "assistant": "<loc_0><loc_0><loc_500><loc_500><_C#_>using System;\nusing System.Linq;\nusing static System.Console;\nusing static System.Math;\nclass E { static void Main() => new K(); }\nclass K\n{\n\tint[] G() => ReadLine().Split().Select(x => int.Parse(x)).ToArray();\n\tpublic K()\n\t{\n\t\tvar I = G();\n\t\tint Y = I[0], X = I[1];\n\t\tvar m = new char[X, Y];\n\t\tfor (var y = 0; y < Y; y++)\n\t\t{\n\t\t\tvar s = ReadLine();\n\t\t\tfor (var x = 0; x < X; x++) m[x, y] = s[y];\n\t\t}\n\t\tvar ans = 0L;\n\t\tfor (var x = 0; x < X - 1; x++)\n\t\t{\n\t\t\tvar p = new int[Y + 1, Y + 1];\n\t\t\tfor (var i = 0; i < Y; i++) if (m[x, i] == m[x + 1, i]) p[0, 0]++;\n\t\t\tfor (var a = 1; a <= Y; a++) for (var i = 0; i < Y - a; i++) if (m[x, i] == m[x + 1, i + a]) p[a, 0]++;\n\t\t\tfor (var b = 1; b <= Y; b++) for (var i = 0; i < Y - b; i++) if (m[x, i + b] == m[x + 1, i]) p[0, b]++;\n\t\t\tfor (var a = 1; a <= Y; a++) for (var b = 1; b <= Y; b++) p[a, b] = p[a - 1, b - 1] - (m[x, Y - a] == m[x + 1, Y - b] ? 1 : 0);\n\t\t\tvar dp = new int[Y + 1, Y + 1];\n\t\t\tfor (var a = Y - 1; a >= 0; a--) for (var b = Y - 1; b >= 0; b--) dp[a, b] = p[a, b] + Min(dp[a, b + 1], dp[a + 1, b]);\n\t\t\tans += dp[0, 0];\n\t\t}\n\t\tConsole.WriteLine(ans);\n\t}\n}\n</code>", "source": "SynthCodeNetNoImageTag", "user": "<code>" } ]
[ { "assistant": "<code><loc_0><loc_0><loc_500><loc_500><_Bash_> GRAYMETHOD=0\nfi\n\nif [ \"$dbp\" = \"True\" ]; then\n NANIFOUTSIDE=1\nelse\n NANIFOUTSIDE=0\n edgepadding=0\nfi\n\nref=input_0.png\nref_noisy=input_noisy_0.png\nwarped=input_1.png\nwarped_noisy=input_noisy_1.png\nfile=transformation.txt\nfilewithout=transformation_without.txt\nif [ -f input_2.txt ]; then\n file2=input_2.txt\nelse\n file2=\"\"\nfi\n\necho \"Standard deviation of the noise added: $std\"\nadd_noise $ref $ref_noisy $std\nadd_noise $warped $warped_noisy $std\n\necho \"\"\nGRAYMETHOD=0 EDGEPADDING=0 NANIFOUTSIDE=0 ROBUST_GRADIENT=0 inverse_compositional_algorithm $ref_noisy $warped_noisy -f $filewithout -z $zoom -n $nscales -r $robust -e $eps -t $transform -s 0 > /dev/null\nGRAYMETHOD=$GRAYMETHOD EDGEPADDING=$edgepadding NANIFOUTSIDE=$NANIFOUTSIDE ROBUST_GRADIENT=$gradient inverse_compositional_algorithm $ref_noisy $warped_noisy -f $file -z $zoom -n $nscales -r $robust -e $eps -t $transform -s $first_scale -v\n\necho \"\"\necho \"Without modification:\"\nNANIFOUTSIDE=1 EDGEPADDING=0 generate_output $ref_noisy $warped_noisy $filewithout $file2\nmv output_estimated.png output_estimated2.png\nif [ -f epe.png ]; then\n mv epe.png epe2.png\nfi\nmv diff_image.png diff_image2.png\n\necho \"\"\necho \"With modifications:\"\nNANIFOUTSIDE=1 EDGEPADDING=0 generate_output $ref_noisy $warped_noisy $file $file2\n</code>", "source": "SynthCodeNetNoImageTag", "user": "Convert code to text." } ]
[ { "assistant": "<loc_0><loc_0><loc_500><loc_500><_C++_>};\n\n</code>", "source": "SynthCodeNetNoImageTag", "user": "<code>" } ]
[ { "assistant": "<code><loc_0><loc_0><loc_500><loc_500><_C#_>using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\n\nclass Program\n{\n static void Main(string[] args)\n {\n var ab = Console.ReadLine().Split(' ').Select(x => int.Parse(x)).ToArray();\n\n if(ab[1] == 1)\n {\n Console.WriteLine(0);\n return;\n }\n\n var sum = 0;\n var count = 1;\n\n while(ab[1] > ab[0] + ab[0] * (count - 1))\n {\n ++count;\n }\n\n Console.WriteLine(count);\n }\n}</code>", "source": "SynthCodeNetNoImageTag", "user": "Convert code to text." } ]
[ { "assistant": "<code><loc_0><loc_0><loc_500><loc_500><_Go_>package v1alpha1\n\nimport (\n\tcorev1 \"k8s.io/api/core/v1\"\n\tmetav1 \"k8s.io/apimachinery/pkg/apis/meta/v1\"\n)\n\nconst (\n\t// DataExportResourceName is name for the DataExport resource.\n\tDataExportResourceName = \"dataexport\"\n\t// DataExportResourcePlural is the name for list of DataExport resources.\n\tDataExportResourcePlural = \"dataexports\"\n)\n\n// DataExportType defines a method of achieving data transfer.\ntype DataExportType string\n\nconst (\n\t// DataExportRsync means that data will be copied between two PVCs directly.\n\t// Rsync supports both local and remote file copy.\n\tDataExportRsync DataExportType = \"rsync\"\n)\n\n// DataExportStatus defines a status of DataExport.\ntype DataExportStatus string\n\nconst (\n\t// DataExportStatusInitial is the initial status of DataExport. It indicates\n\t// that a volume export request has been received.\n\tDataExportStatusInitial DataExportStatus = \"Initial\"\n\t// DataExportStatusPending when data export is pending and not started yet.\n\tDataExportStatusPending DataExportStatus = \"Pending\"</code>", "source": "SynthCodeNetNoImageTag", "user": "Convert code to text." } ]
[ { "assistant": "<code><loc_0><loc_0><loc_500><loc_500><_SQL_>insert into tiene_servicio (id_habitacion, id_servicio) values (288, 3);\ninsert into tiene_servicio (id_habitacion, id_servicio) values (130, 2);\ninsert into tiene_servicio (id_habitacion, id_servicio) values (299, 1);\ninsert into tiene_servicio (id_habitacion, id_servicio) values (724, 1);\ninsert into tiene_servicio (id_habitacion, id_servicio) values (237, 1);\ninsert into tiene_servicio (id_habitacion, id_servicio) values (830, 1);\ninsert into tiene_servicio (id_habitacion, id_servicio) values (151, 3);\ninsert into tiene_servicio (id_habitacion, id_servicio) values (182, 3);\ninsert into tiene_servicio (id_habitacion, id_servicio) values (670, 3);\ninsert into tiene_servicio (id_habitacion, id_servicio) values (8, 2);\ninsert into tiene_servicio (id_habitacion, id_servicio) values (473, 1);\ninsert into tiene_servicio (id_habitacion, id_servicio) values (821, 3);\ninsert into tiene_servicio (id_habitacion, id_servicio) values (435, 1);\ninsert into tiene_servicio (id_habitacion, id_servicio) values (741, 1);\ninsert into tiene_servicio (id_habitacion, id_servicio) values (75, 1);\ninsert into tiene_servicio (id_habitacion, id_servicio) values (483, 1);\ninsert into tiene_servicio (id_habitacion, id_servicio) values (512, 2);\ninsert into tiene_servicio (id_habitacion, id_servicio) values (686, 2);\ninsert into tiene_servicio (id_habitacion, id_servicio) values (18, 1);\ninsert into tiene_servicio (id_habitacion, id_servicio) values (314, 2);\ninsert into tiene_servicio (id_habitacion, id_servicio) values (889, 1);\ninsert into tiene_servicio (id_habitacion, id_servicio) values (994, 3);\ninsert into tiene_servicio (id_habitacion, id_servicio) values (359, 2);\ninsert into tiene_servicio (id_habitacion, id_servicio) values (653, 1);\ninsert into tiene_servicio (id_habitacion, id_servicio) values (346, 3);\ninsert into tiene_servicio (id_habitacion, id_servicio) values (43, 2);\ninsert into tiene_servicio (id_habitacion, id_servicio) values (792, 2);\ninsert into tiene_servicio (id_habitacion, id_servicio) values (12, 2);\ninsert into tiene_servicio (id_habitacion, id_servicio) values (703, 2);\ninsert into tiene_servicio (id_habitacion, id_servicio) values (503, 3);\ninsert into tiene_servicio (id_habitacion, id_servicio) values (108, 2);\ninsert into tiene_servicio (id_habitacion, id_servicio) values (949, 3);</code>", "source": "SynthCodeNetNoImageTag", "user": "Convert code to text." } ]
[ { "assistant": "<loc_0><loc_0><loc_500><loc_500><_Python_>n = int(input())\na = list(map(int, input().split()))\nb = [a[i] - i - 1 for i in range(n)]\nb = sorted(b)\nif n % 2 == 1:\n c = b[(n-1)//2]\nelse:\n c = round((b[n//2-1] + b[n//2])//2)\n\nprint(sum(map(abs,[b[i]-c for i in range(n)])))</code>", "source": "SynthCodeNetNoImageTag", "user": "<code>" } ]
[ { "assistant": "<loc_0><loc_0><loc_500><loc_500><_Lisp_>(let ((N (read)))\n (defvar arr (make-array N :initial-element 1))\n (loop repeat (read) do\n (loop repeat (read) do\n (setf (aref arr (1- (read))) 0)))\n (princ (loop for x across arr sum x)))</code>", "source": "SynthCodeNetNoImageTag", "user": "<code>" } ]
[ { "assistant": "<code><loc_0><loc_0><loc_500><loc_500><_TypeScript_>import { triggerEvent } from '@element-ultra/utils'\nimport { EVENT_CODE } from '@element-ultra/constants'\nimport type MenuItem from './menu-item'\n\nclass SubMenu {\n public subMenuItems: NodeList\n public subIndex = 0\n constructor(public parent: MenuItem, public domNode: ParentNode) {\n this.subIndex = 0\n this.init()\n }\n\n init(): void {\n this.subMenuItems = this.domNode.querySelectorAll('li')\n this.addListeners()\n }\n\n gotoSubIndex(idx: number): void {\n if (idx === this.subMenuItems.length) {\n idx = 0\n } else if (idx < 0) {\n idx = this.subMenuItems.length - 1\n }\n ;(this.subMenuItems[idx] as HTMLElement).focus()\n this.subIndex = idx\n }\n\n addListeners(): void {\n const parentNode = this.parent.domNode\n Array.prototype.forEach.call(this.subMenuItems, (el: Element) => {\n el.addEventListener('keydown', (event: KeyboardEvent) => {\n let prevDef = false\n switch (event.code) {\n case EVENT_CODE.down: {\n this.gotoSubIndex(this.subIndex + 1)\n prevDef = true\n break\n }\n case EVENT_CODE.up: {\n this.gotoSubIndex(this.subIndex - 1)\n prevDef = true\n break\n }\n case EVENT_CODE.tab: {\n triggerEvent(parentNode as HTMLElement, 'mouseleave')\n break\n }\n case EVENT_CODE.enter:\n case EVENT_CODE.space: {\n prevDef = true\n ;(event.currentTarget as HTMLElement).click()\n break\n }\n }\n if (prevDef) {\n event.preventDefault()\n event.stopPropagation()\n }\n return false\n })\n })\n }\n}\n\nexport default SubMenu\n</code>", "source": "SynthCodeNetNoImageTag", "user": "Convert code to text." } ]
[ { "assistant": "<loc_0><loc_0><loc_500><loc_500><_SQL_>CREATE DATABASE spring_boot;\nGRANT ALL PRIVILEGES ON DATABASE spring_boot TO postgres;\n\nCOMMIT;</code>", "source": "SynthCodeNetNoImageTag", "user": "<code>" } ]
[ { "assistant": "<loc_0><loc_0><loc_500><loc_500><_PHP_> <?php endif; ?>\n <div class=\"row\">\n <div class=\"col-12\">\n <button type=\"submit\" class=\"btn btn-primary btn-block\">Iniciar Sesión</button>\n </div>\n </div>\n </form>\n </div>\n </div>\n</div>\n<!-- jQuery -->\n<script src=\"<?= base_url()?>/plugins/jquery/jquery.min.js\"></script>\n<!-- Bootstrap 4 -->\n<script src=\"<?= base_url()?>/plugins/bootstrap/js/bootstrap.bundle.min.js\"></script>\n<!-- AdminLTE App -->\n<script src=\"<?= base_url()?>/dist/js/adminlte.min.js\"></script>\n\n</body>\n</html>\n</code>", "source": "SynthCodeNetNoImageTag", "user": "<code>" } ]
[ { "assistant": "<code><loc_0><loc_0><loc_500><loc_500><_FORTRAN_> Program Main\n\n Implicit None\n\n Integer, Allocatable :: H(:) \n Integer(8) :: i,j,N,K,s,dum\n\n N = 0 ; K = 0 ; s = 0\n Read(*,*) N,K\n Allocate (H(N)); H(:) = 0.0d0 \n Read(*,*)(H(i),i=1,N)\n\n Do i = 1,N-1\n Do j = i+1,N\n If (H(i) < H(j)) then\n dum = H(i)\n H(i) = H(j)\n H(j) = dum\n Endif\n Enddo\n Enddo\n\n If (K < N) then\n Do i = K+1,N\n s = s + H(i)\n Enddo\n Endif\n\n Write(*,\"(I0)\") s\n Deallocate(H)\n\n End Program\n</code>", "source": "SynthCodeNetNoImageTag", "user": "Convert code to text." } ]
[ { "assistant": "<loc_0><loc_0><loc_500><loc_500><_Python_> def strip_formatting(self, text):\n if '<http://' in text:\n tmp_identifier = text.split('|')\n return tmp_identifier[1].replace('>', '')\n return text\n\n def tabulate(self, header, output):\n table = PrettyTable(header)\n table.padding_width = 1\n table.align = \"l\"\n\n for details in output.split(\"\\n\") :\n details_list = details.split(\"|\")\n if len(details_list) > 1:\n table.add_row(details_list)\n\n return '```' + str(table) + '```'\n\n def uli(self):\n uri = self.strip_formatting(self.command_data[2])\n pod_id, pod_env = self.get_pod_id(uri)\n if not pod_id == False:\n cmd = self.kube_command + [\n 'exec',\n pod_id,\n '--namespace=' + pod_env,\n '--',\n '/scripts/drupalUli.sh'\n ]\n try:\n cmd.append(self.strip_formatting(self.command_data[3]))\n except Exception:\n pass\n cmd.remove('--selector=app=drupal')</code>", "source": "SynthCodeNetNoImageTag", "user": "<code>" } ]
[ { "assistant": "<code><loc_0><loc_0><loc_500><loc_500><_YAML_>items:\n- uid: com.microsoft.azure.management.servicebus._service_bus_operation\n id: _service_bus_operation\n parent: com.microsoft.azure.management.servicebus\n children:\n - com.microsoft.azure.management.servicebus._service_bus_operation.displayInformation()\n - com.microsoft.azure.management.servicebus._service_bus_operation.name()\n href: com.microsoft.azure.management.servicebus._service_bus_operation.yml\n langs:\n - java\n name: ServiceBusOperation\n nameWithType: ServiceBusOperation\n fullName: com.microsoft.azure.management.servicebus.ServiceBusOperation\n type: Interface\n source:\n remote: &o0\n path: azure-mgmt-servicebus/src/main/java/com/microsoft/azure/management/servicebus/ServiceBusOperation.java\n branch: master\n repo: https://github.com/Azure/azure-sdk-for-java\n path: azure-mgmt-servicebus/src/main/java/com/microsoft/azure/management/servicebus/ServiceBusOperation.java\n startLine: 17\n package: com.microsoft.azure.management.servicebus\n summary: <p>An immutable client-side representation of an <xref href=\"com.microsoft.azure.management._azure\" data-throw-if-not-resolved=\"false\"></xref> service bus operation description object. </p>\n syntax:\n content: public interface ServiceBusOperation extends HasInner<OperationInner>\n inheritedMembers:\n - com.microsoft.azure.management.resources.fluentcore.model._has_inner.inner()\n- uid: com.microsoft.azure.management.servicebus._service_bus_operation.displayInformation()\n id: displayInformation()\n parent: com.microsoft.azure.management.servicebus._service_bus_operation\n href: com.microsoft.azure.management.servicebus._service_bus_operation.yml\n langs:\n - java\n name: displayInformation()\n nameWithType: ServiceBusOperation.displayInformation()\n fullName: OperationDisplay com.microsoft.azure.management.servicebus.ServiceBusOperation.displayInformation()\n overload: com.microsoft.azure.management.servicebus._service_bus_operation.displayInformation*\n type: Method\n source:\n remote: *o0\n path: azure-mgmt-servicebus/src/main/java/com/microsoft/azure/management/servicebus/ServiceBusOperation.java\n startLine: 25\n package: com.microsoft.azure.management.servicebus\n syntax:\n content: public OperationDisplay displayInformation()\n return:\n type: com.microsoft.azure.management.servicebus._operation_display\n description: <p>the description of the operation </p>\n- uid: com.microsoft.azure.management.servicebus._service_bus_operation.name()\n id: name()\n parent: com.microsoft.azure.management.servicebus._service_bus_operation\n href: com.microsoft.azure.management.servicebus._service_bus_operation.yml\n langs:\n - java\n name: name()\n nameWithType: ServiceBusOperation.name()\n fullName: String com.microsoft.azure.management.servicebus.ServiceBusOperation.name()\n overload: com.microsoft.azure.management.servicebus._service_bus_operation.name*\n type: Method\n source:\n remote: *o0\n path: azure-mgmt-servicebus/src/main/java/com/microsoft/azure/management/servicebus/ServiceBusOperation.java\n startLine: 21\n package: com.microsoft.azure.management.servicebus\n syntax:\n content: public String name()\n return:\n type: \"26831127\"\n description: <p>the operation name </p>\nreferences:\n- uid: \"26831127\"\n spec.java:\n - name: String\n fullName: String\n- uid: com.microsoft.azure.management.servicebus._service_bus_operation.name*\n name: name\n nameWithType: ServiceBusOperation.name\n fullName: String com.microsoft.azure.management.servicebus.ServiceBusOperation.name\n package: com.microsoft.azure.management.servicebus\n- uid: com.microsoft.azure.management.servicebus._service_bus_operation.displayInformation*\n name: displayInformation\n nameWithType: ServiceBusOperation.displayInformation\n fullName: OperationDisplay com.microsoft.azure.management.servicebus.ServiceBusOperation.displayInformation\n package: com.microsoft.azure.management.servicebus\n- uid: com.microsoft.azure.management.resources.fluentcore.model._has_inner.inner()\n parent: com.microsoft.azure.management.resources.fluentcore.model._has_inner\n href: com.microsoft.azure.management.resources.fluentcore.model._has_inner.yml\n name: inner()\n nameWithType: HasInner<T>.inner()\n fullName: T com.microsoft.azure.management.resources.fluentcore.model.HasInner<T>.inner()\n type: Method\n syntax:\n content: public T inner()\n return:\n type: 8ce1ecb9\n description: <p>wrapped inner object providing direct access to the underlying auto-generated API implementation, based on <xref href=\"com.microsoft.azure.management._azure\" data-throw-if-not-resolved=\"false\"></xref> REST API </p>\n- uid: com.microsoft.azure.management.resources.fluentcore.model._has_inner\n parent: com.microsoft.azure.management.resources.fluentcore.model\n href: com.microsoft.azure.management.resources.fluentcore.model._has_inner.yml\n name: HasInner<T>\n nameWithType: HasInner<T>\n fullName: com.microsoft.azure.management.resources.fluentcore.model.HasInner<T>\n type: Interface\n summary: >-\n <p>The wrapper around an inner object providing extended functionalities.</p>\n\n <p></p>\n syntax:\n content: public interface HasInner<T>\n typeParameters:\n - type: 8ce1ecb9\n description: <p>the type of the inner object. </p>\n- uid: com.microsoft.azure.management.servicebus._operation_display\n parent: com.microsoft.azure.management.servicebus\n href: com.microsoft.azure.management.servicebus._operation_display.yml\n name: OperationDisplay\n nameWithType: OperationDisplay\n fullName: com.microsoft.azure.management.servicebus.OperationDisplay\n type: Class\n summary: <p>The object that represents the operation. </p>\n syntax:\n content: public class OperationDisplay\n- uid: com.microsoft.azure.management._azure\n parent: com.microsoft.azure.management\n href: com.microsoft.azure.management._azure.yml\n name: Azure\n nameWithType: Azure\n fullName: com.microsoft.azure.management.Azure\n type: Class\n summary: <p>The entry point for accessing resource management APIs in <xref href=\"com.microsoft.azure.management._azure\" data-throw-if-not-resolved=\"false\"></xref>. </p>\n syntax:\n content: public class Azure\n</code>", "source": "SynthCodeNetNoImageTag", "user": "Convert code to text." } ]
[ { "assistant": "<loc_0><loc_0><loc_500><loc_500><_D_>import std.algorithm;\nimport std.bigint;\nimport std.bitmanip;\nimport std.concurrency;\nimport std.container;\nimport std.conv;\nimport std.functional;\nimport std.format;\nimport std.math;\nimport std.meta;\nimport std.numeric;\nimport std.random;\nimport std.range;\nimport std.stdio;\nimport std.string;\nimport std.traits;\nimport std.typecons;\n\n\nauto solve(double a, double b, double x) {\n const t = 90.0 - atan(a ^^ 3 / 2 / (a * a * b - x)) * 180.0 / PI;\n const s = 90.0 - atan(2 * x / (a * b * b)) * 180.0 / PI;\n if (a / tan(t / 180.0 * PI) > b)\n return t;\n return s;\n}\n\n\nvoid main() {\n auto input = stdin.byLine.map!split.joiner;\n\n double a;\n a = input.front.to!double;\n input.popFront;\n\n double b;\n b = input.front.to!double;\n input.popFront;\n\n double x;\n x = input.front.to!double;\n input.popFront;\n\n static if (is(ReturnType!solve == void))\n solve(a, b, x);\n else\n solve(a, b, x).writeln;\n}\n</code>", "source": "SynthCodeNetNoImageTag", "user": "<code>" } ]
[ { "assistant": "<code><loc_0><loc_0><loc_500><loc_500><_Java_> * @return (undocumented)\n */\n public int index () ;\n}\n</code>", "source": "SynthCodeNetNoImageTag", "user": "Convert code to text." } ]
[ { "assistant": "<loc_0><loc_0><loc_500><loc_500><_Kotlin_>package com.example.example.utils.commons\n\nimport dagger.internal.Preconditions\nimport io.reactivex.disposables.Disposable\nimport io.reactivex.disposables.CompositeDisposable\n\n\nabstract class IoUseCase<in Q : UseCase.RequestValue, R : UseCase.ResponseValue, T : Throwable>(private val executionThreads: ExecutionThreads) : UseCase<Q, R>() {\n private val disposable: CompositeDisposable = CompositeDisposable()\n\n @Suppress(\"UNCHECKED_CAST\")\n fun execute(requestValues: Q, next: (R) -> Unit = {}, error: (T) -> Unit = {}, complete: () -> Unit = {}) {\n disposable.clear()\n val observable = execute(requestValues)\n .subscribeOn(executionThreads.io())\n\n addDisposable(observable.subscribe(next, error as (Throwable) -> Unit, complete))\n }\n\n fun dispose() {\n if (disposable.isDisposed) {\n disposable.dispose()\n }\n }\n\n /**\n * Dispose from current [CompositeDisposable].\n */\n private fun addDisposable(disposable: Disposable) {\n Preconditions.checkNotNull(disposable)\n Preconditions.checkNotNull(this.disposable)\n this.disposable.add(disposable)\n }\n}\n</code>", "source": "SynthCodeNetNoImageTag", "user": "<code>" } ]
[ { "assistant": "<loc_0><loc_0><loc_500><loc_500><_Rust_>// Copyright 2012 The Rust Project Developers. See the COPYRIGHT\n// file at the top-level directory of this distribution and at\n// http://rust-lang.org/COPYRIGHT.\n//\n// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or\n// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license\n// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your\n// option. This file may not be copied, modified, or distributed\n// except according to those terms.\n\nuse abi;\nuse ast::{P, Ident, Generics, NodeId, Expr};\nuse ast;\nuse ast_util;\nuse attr;\nuse codemap::{Span, respan, Spanned, DUMMY_SP, Pos};\nuse ext::base::ExtCtxt;\nuse fold::Folder;</code>", "source": "SynthCodeNetNoImageTag", "user": "<code>" } ]
[ { "assistant": "<code><loc_0><loc_0><loc_500><loc_500><_JavaScript_>var tape = require('tape')\nvar queue = require('../')\n\ntape('error-promise with error', function (t) {\n t.plan(2)\n\n var q = queue()\n\n q.on('error', q.end.bind(q))\n q.on('end', function (err) {\n t.equal(err.message, 'something broke')\n t.equal(q.length, 0)\n })\n\n q.push(function (cb) {\n setTimeout(cb, 10)\n })\n\n q.push(function () {\n return new Promise(function (resolve, reject) {\n setTimeout(function () {\n reject(new Error('something broke'))\n }, 20)\n })\n })\n\n q.push(function () {\n return new Promise(function (resolve, reject) {\n setTimeout(resolve, 30)\n })\n })\n\n q.start()\n})\n\ntape('error-promise with empty error', function (t) {\n t.plan(2)\n\n var q = queue()\n\n q.on('error', q.end.bind(q))\n q.on('end', function (err) {\n t.equal(err, true)\n t.equal(q.length, 0)\n })\n\n q.push(function (cb) {\n setTimeout(cb, 10)\n })\n\n q.push(function () {\n return new Promise(function (resolve, reject) {\n setTimeout(function () {\n reject()\n }, 20)\n })\n })\n\n q.push(function () {\n return new Promise(function (resolve, reject) {\n setTimeout(resolve, 30)\n })\n })\n\n q.start()\n})\n\n</code>", "source": "SynthCodeNetNoImageTag", "user": "Convert code to text." } ]
[ { "assistant": "<code><loc_0><loc_0><loc_500><loc_500><_C#_>using System;\nusing System.Collections.Generic;\nusing System.IO;\nusing System.Linq;\nusing static System.Math;\nusing System.Text;\nusing System.Threading;\nusing System.Globalization;\nusing System.Runtime.CompilerServices;\nusing Library;\n\nnamespace Program\n{\n public static class ProblemA\n {\n static bool SAIKI = false;\n static public int numberOfRandomCases = 0;\n static public void MakeTestCase(List<string> _input, List<string> _output, ref Func<string[], bool> _outputChecker)\n {\n }\n static public void Solve()\n {\n var N = NN;\n var M = NN;\n var aList = NNList(N);\n var xyList = Repeat(0, M).Select(_ => new { x = NN, y = NN }).ToArray();\n var uf = new LIB_UnionFind(N);\n var sortedA = aList.Select((e, idx) => new { e, idx }).OrderBy(e => e.e).ToArray();\n foreach (var item in xyList)\n {\n uf.Unite(item.x, item.y);\n }\n var done = new bool[N];\n var cost = 0L;\n var roots = new Dictionary<long, Tuple<long, long>>();\n for (var i = 0; i < N; i++)\n {\n var rt = uf.Root(i);\n var min = long.MaxValue;\n if (roots.ContainsKey(rt))\n {\n min = roots[rt].Item1;\n }\n if (min > aList[i])\n {\n roots[rt] = Tuple.Create(aList[i], (long)i);\n }\n }\n if (roots.Count == 1)\n {\n Console.WriteLine(0);\n return;\n }\n foreach (var item in roots)\n {\n cost += item.Value.Item1;\n done[item.Value.Item2] = true;\n }\n var lst = roots.Count - 2;\n foreach (var item in sortedA)\n {\n if (lst == 0) break;\n if (done[item.idx]) continue;\n --lst;\n cost += item.e;\n }\n if (lst > 0) Console.WriteLine(\"Impossible\");\n else Console.WriteLine(cost);\n }\n class Printer : StreamWriter\n {\n public override IFormatProvider FormatProvider { get { return CultureInfo.InvariantCulture; } }\n public Printer(Stream stream) : base(stream, new UTF8Encoding(false, true)) { base.AutoFlush = false; }\n public Printer(Stream stream, Encoding encoding) : base(stream, encoding) { base.AutoFlush = false; }\n }\n static LIB_FastIO fastio = new LIB_FastIODebug();\n static public void Main(string[] args) { if (args.Length == 0) { fastio = new LIB_FastIO(); Console.SetOut(new Printer(Console.OpenStandardOutput())); } if (SAIKI) { var t = new Thread(Solve, 134217728); t.Start(); t.Join(); } else Solve(); Console.Out.Flush(); }\n static long NN => fastio.Long();\n static double ND => fastio.Double();\n static string NS => fastio.Scan();\n static long[] NNList(long N) => Repeat(0, N).Select(_ => NN).ToArray();\n static double[] NDList(long N) => Repeat(0, N).Select(_ => ND).ToArray();\n static string[] NSList(long N) => Repeat(0, N).Select(_ => NS).ToArray();\n static long Count<T>(this IEnumerable<T> x, Func<T, bool> pred) => Enumerable.Count(x, pred);\n static IEnumerable<T> Repeat<T>(T v, long n) => Enumerable.Repeat<T>(v, (int)n);\n static IEnumerable<int> Range(long s, long c) => Enumerable.Range((int)s, (int)c);\n static IOrderedEnumerable<T> OrderByRand<T>(this IEnumerable<T> x) => Enumerable.OrderBy(x, _ => xorshift);\n static IOrderedEnumerable<T> OrderBy<T>(this IEnumerable<T> x) => Enumerable.OrderBy(x.OrderByRand(), e => e);\n static IOrderedEnumerable<T1> OrderBy<T1, T2>(this IEnumerable<T1> x, Func<T1, T2> selector) => Enumerable.OrderBy(x.OrderByRand(), selector);\n static IOrderedEnumerable<T> OrderByDescending<T>(this IEnumerable<T> x) => Enumerable.OrderByDescending(x.OrderByRand(), e => e);\n static IOrderedEnumerable<T1> OrderByDescending<T1, T2>(this IEnumerable<T1> x, Func<T1, T2> selector) => Enumerable.OrderByDescending(x.OrderByRand(), selector);\n static IOrderedEnumerable<string> OrderBy(this IEnumerable<string> x) => x.OrderByRand().OrderBy(e => e, StringComparer.OrdinalIgnoreCase);\n static IOrderedEnumerable<T> OrderBy<T>(this IEnumerable<T> x, Func<T, string> selector) => x.OrderByRand().OrderBy(selector, StringComparer.OrdinalIgnoreCase);\n static IOrderedEnumerable<string> OrderByDescending(this IEnumerable<string> x) => x.OrderByRand().OrderByDescending(e => e, StringComparer.OrdinalIgnoreCase);\n static IOrderedEnumerable<T> OrderByDescending<T>(this IEnumerable<T> x, Func<T, string> selector) => x.OrderByRand().OrderByDescending(selector, StringComparer.OrdinalIgnoreCase);\n static uint xorshift { get { _xsi.MoveNext(); return _xsi.Current; } }\n static IEnumerator<uint> _xsi = _xsc();\n static IEnumerator<uint> _xsc() { uint x = 123456789, y = 362436069, z = 521288629, w = (uint)(DateTime.Now.Ticks & 0xffffffff); while (true) { var t = x ^ (x << 11); x = y; y = z; z = w; w = (w ^ (w >> 19)) ^ (t ^ (t >> 8)); yield return w; } }\n }\n}\nnamespace Library {\n class LIB_UnionFind\n {\n long[] d;\n Func<long, long, long> f;\n [MethodImpl(MethodImplOptions.AggressiveInlining)]\n public LIB_UnionFind(long s)\n {\n d = Enumerable.Repeat(-1L, (int)s).ToArray();\n f = (x, y) => x + y;\n }\n [MethodImpl(MethodImplOptions.AggressiveInlining)]\n public LIB_UnionFind(IEnumerable<long> s, Func<long, long, long> func)\n {\n d = s.Select(e => -e).ToArray();\n f = func;\n }\n [MethodImpl(MethodImplOptions.AggressiveInlining)]\n public bool Unite(long x, long y)\n {\n x = Root(x);\n y = Root(y);\n if (x != y)\n {\n d[x] = -f(-d[x], -d[y]);\n d[y] = x;\n }\n return x != y;\n }\n [MethodImpl(MethodImplOptions.AggressiveInlining)]\n public bool IsSame(long x, long y) => Root(x) == Root(y);\n [MethodImpl(MethodImplOptions.AggressiveInlining)]\n public long Root(long x) => d[x] < 0 ? x : d[x] = Root(d[x]);\n [MethodImpl(MethodImplOptions.AggressiveInlining)]\n public long Calc(long x) => -d[Root(x)];\n }\n class LIB_FastIO\n {\n public LIB_FastIO() { str = Console.OpenStandardInput(); }\n readonly Stream str;\n readonly byte[] buf = new byte[1024];\n int len, ptr;\n public bool isEof = false;\n public bool IsEndOfStream { get { return isEof; } }\n byte read()\n {\n if (isEof) throw new EndOfStreamException();\n if (ptr >= len)\n {\n ptr = 0;\n if ((len = str.Read(buf, 0, 1024)) <= 0)\n {\n isEof = true;\n return 0;\n }\n }\n return buf[ptr++];\n }\n char Char()\n {\n byte b = 0;\n do b = read();\n while (b < 33 || 126 < b);\n return (char)b;\n }\n virtual public string Scan()\n {\n var sb = new StringBuilder();\n for (var b = Char(); b >= 33 && b <= 126; b = (char)read())\n sb.Append(b);\n return sb.ToString();\n }\n virtual public long Long()\n {\n long ret = 0; byte b = 0; var ng = false;\n do b = read();\n while (b != '-' && (b < '0' || '9' < b));\n if (b == '-') { ng = true; b = read(); }\n for (; true; b = read())\n {\n if (b < '0' || '9' < b)\n return ng ? -ret : ret;\n else ret = ret * 10 + b - '0';\n }\n }\n virtual public double Double() { return double.Parse(Scan(), CultureInfo.InvariantCulture); }\n }\n class LIB_FastIODebug : LIB_FastIO\n {\n Queue<string> param = new Queue<string>();\n string NextString() { if (param.Count == 0) foreach (var item in Console.ReadLine().Split(' ')) param.Enqueue(item); return param.Dequeue(); }\n public LIB_FastIODebug() { }\n public override string Scan() => NextString();\n public override long Long() => long.Parse(NextString());\n public override double Double() => double.Parse(NextString());\n }\n}\n</code>", "source": "SynthCodeNetNoImageTag", "user": "Convert code to text." } ]
[ { "assistant": "<loc_0><loc_0><loc_500><loc_500><_Nim_>#--------------------------------------------------\nimport strutils, sequtils, math, algorithm, tables, sets, lists, intsets, critbits, future\nlet read* = iterator: string {.closure.} =\n while true: (for s in stdin.readLine.split: yield s)\nproc scan(): int = read().parseInt\n#--------------------------------------------------\nvar a,b,c,k = scan()\n\nvar ans = 0\nif a >= k:\n ans = k\nelse:\n if a+b >= k:\n ans = a\n else:\n var t = k - (a+b)\n ans = a - t\n\necho ans</code>", "source": "SynthCodeNetNoImageTag", "user": "<code>" } ]
[ { "assistant": "<loc_0><loc_0><loc_500><loc_500><_Rust_>extern crate rust_music_theory as theory;\nuse theory::interval::Interval;\nuse theory::note::{Note, Pitch, PitchSymbol::*};\n\n#[cfg(test)]\nmod test_interval {\n use super::*;\n\n #[test]\n fn test_second_note_from() {\n let notes = vec![(C, 3), (D, 3), (E, 3), (Fs, 3), (Gs, 3), (As, 3), (C, 4)]\n .into_iter()\n .map(|note| Note {\n pitch: Pitch::from(note.0),\n octave: note.1,\n })\n .collect::<Vec<Note>>();\n\n let major_second = Interval::from_semitone(2).unwrap();\n for i in 0..(notes.len() - 1) {\n let next_note = major_second.second_note_from(notes[i].clone());\n assert_eq!(next_note.pitch, notes[i + 1].pitch);\n assert_eq!(next_note.octave, notes[i + 1].octave);\n }\n }\n\n #[test]\n fn test_second_note_down_from() {\n let notes = vec![(C, 4), (As, 3), (Gs, 3), (Fs, 3), (E, 3), (D, 3), (C, 3)]\n .into_iter()\n .map(|note| Note {\n pitch: Pitch::from(note.0),\n octave: note.1,\n })\n .collect::<Vec<Note>>();\n\n let major_second = Interval::from_semitone(2).unwrap();\n for i in 0..(notes.len() - 1) {</code>", "source": "SynthCodeNetNoImageTag", "user": "<code>" } ]
[ { "assistant": "<loc_0><loc_0><loc_500><loc_500><_Cuda_>#include \"hip/hip_runtime.h\"\n/*\n * This file belongs to the Galois project, a C++ library for exploiting parallelism.\n * The code is being released under the terms of the 3-Clause BSD License (a\n * copy is located in LICENSE.txt at the top-level directory).\n *\n * Copyright (C) 2018, The University of Texas at Austin. All rights reserved.\n * UNIVERSITY EXPRESSLY DISCLAIMS ANY AND ALL WARRANTIES CONCERNING THIS\n * SOFTWARE AND DOCUMENTATION, INCLUDING ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR ANY PARTICULAR PURPOSE, NON-INFRINGEMENT AND WARRANTIES OF\n * PERFORMANCE, AND ANY WARRANTY THAT MIGHT OTHERWISE ARISE FROM COURSE OF\n * DEALING OR USAGE OF TRADE. NO WARRANTY IS EITHER EXPRESS OR IMPLIED WITH\n * RESPECT TO THE USE OF THE SOFTWARE OR DOCUMENTATION. Under no circumstances\n * shall University be liable for incidental, special, indirect, direct or\n * consequential damages or loss of profits, interruption of business, or\n * related expenses which may arise from use of Software or Documentation,</code>", "source": "SynthCodeNetNoImageTag", "user": "<code>" } ]
[ { "assistant": "<code><loc_0><loc_0><loc_500><loc_500><_Ruby_>cask \"appium-inspector\" do\n version \"2022.2.1\"\n sha256 \"4a6182e610f247c2246ab7d7a23e2d078f0188bd1190dcea9ad7602ec1207ea5\"\n\n url \"https://github.com/appium/appium-inspector/releases/download/v#{version}/Appium-Inspector-#{version}-mac.zip\"\n name \"Appium Inspector GUI\"\n desc \"GUI inspector for mobile apps\"\n homepage \"https://github.com/appium/appium-inspector/\"\n\n livecheck do\n url :url\n strategy :github_latest\n end\n\n app \"Appium Inspector.app\"\n\n zap trash: [\n \"~/Library/Application Support/appium-inspector\",\n \"~/Library/Logs/Appium Inspector\",\n \"~/Library/Preferences/io.appium.inspector.plist\",\n \"~/Library/Saved Application State/io.appium.inspector.savedState\",\n ]\nend\n</code>", "source": "SynthCodeNetNoImageTag", "user": "Convert code to text." } ]
[ { "assistant": "<code><loc_0><loc_0><loc_500><loc_500><_Awk_>NR==1{N=$1;M=$2}\nNR>1{A[$1,++B[$1]]=$2;A[$2,++B[$2]]=$1}\nfunction s(a,b,f){\nfor(i in a){\n for(j=1;j<=B[i];j++){\n if(C[A[i,j]])continue\n f++\n C[A[i,j]]=i\n b[A[i,j]]++\n }\n}\nif(!f)return\ns(b)\n}\nEND{\nt[1]=1\ns(t)\nprint \"Yes\"\nfor(i=2;i<=N;i++)print C[i]\n}</code>", "source": "SynthCodeNetNoImageTag", "user": "Convert code to text." } ]
[ { "assistant": "<code><loc_0><loc_0><loc_500><loc_500><_SQL_>ALTER TABLE player\n ADD COLUMN player_color VARCHAR(7) NULL AFTER comment,\n ADD COLUMN opponent_color VARCHAR(7) NULL AFTER player_color,\n ADD COLUMN neutral_color_a VARCHAR(7) NULL AFTER opponent_color,\n ADD COLUMN neutral_color_b VARCHAR(7) NULL AFTER neutral_color_a;\n</code>", "source": "SynthCodeNetNoImageTag", "user": "Convert code to text." } ]
[ { "assistant": "<code><loc_0><loc_0><loc_500><loc_500><_JavaScript_>import { filterBy, isArray } from '@/utils/array';\n\nexport const state = function() {\n return {\n show: false,\n resources: [],\n elem: null,\n event: null,\n showPromptMove: false,\n showPromptRemove: false,\n showPromptRestore: false,\n showAssignTo: false,\n showPromptUpdate: false,\n showModal: false,\n toMove: [],\n toRemove: [],\n toRestore: [],\n toAssign: [],\n toUpdate: [],\n modalData: {},\n };\n};\n\nexport const getters = {\n showing: state => state.show,\n elem: state => state.elem,\n event: state => state.event,\n\n options(state) {\n let selected = state.resources;\n\n if ( !selected ) {\n return [];\n }\n\n if ( !isArray(selected) ) {\n selected = [];\n }\n\n const map = {};\n\n for ( const node of selected ) {\n if (node.availableActions) {\n for ( const act of node.availableActions ) {\n _add(map, act);\n }\n }\n }\n\n const out = _filter(map);\n\n return { ...out };\n },\n\n};\n\nexport const mutations = {\n show(state, { resources, elem, event }) {\n if ( !isArray(resources) ) {\n resources = [resources];\n }\n\n state.resources = resources;\n state.elem = elem;\n state.event = event;\n state.show = true;\n },\n\n hide(state) {\n state.show = false;\n state.resources = null;\n state.elem = null;\n },\n\n togglePromptRemove(state, resources) {\n if (!resources) {\n state.showPromptRemove = false;\n resources = [];\n } else {\n state.showPromptRemove = !state.showPromptRemove;\n if (!isArray(resources)) {\n resources = [resources];\n }\n }\n state.toRemove = resources;\n },\n\n togglePromptMove(state, resources) {\n if (!resources) {\n state.showPromptMove = false;\n resources = [];\n } else {\n state.showPromptMove = !state.showPromptMove;\n state.toMove = Array.isArray(resources) ? resources : [resources];\n }\n },\n\n togglePromptRestore(state, resources) {\n if (!resources) {\n state.showPromptRestore = false;\n resources = [];\n } else {\n state.showPromptRestore = !state.showPromptRestore;\n if (!isArray(resources)) {\n resources = [resources];\n }\n }\n state.toRestore = resources;\n },\n\n toggleAssignTo(state, resources) {\n state.showAssignTo = !state.showAssignTo;\n\n if (!isArray(resources)) {\n resources = [resources];\n }\n\n state.toAssign = resources;\n },\n\n togglePromptUpdate(state, resources) {\n if (!resources) {\n // Clearing the resources also hides the prompt\n state.showPromptUpdate = false;\n } else {\n state.showPromptUpdate = !state.showPromptUpdate;\n }\n\n if (!isArray(resources)) {\n resources = [resources];\n }\n\n state.toUpdate = resources;\n },\n\n togglePromptModal(state, data) {\n if (!data) {\n // Clearing the resources also hides the prompt\n state.showModal = false;\n } else {\n state.showModal = true;\n }\n\n state.modalData = data;\n },\n};\n\nexport const actions = {\n execute({ state }, { action, args, opts }) {\n return _execute(state.resources, action, args, opts);\n },\n};\n\n// -----------------------------\n\nlet anon = 0;\n\nfunction _add(map, act, incrementCounts = true) {\n let id = act.action;\n\n if ( !id ) {\n id = `anon${ anon }`;\n anon++;\n }\n\n let obj = map[id];\n\n if ( !obj ) {\n obj = Object.assign({}, act);\n map[id] = obj;\n obj.allEnabled = false;\n }\n\n if ( act.enabled === false ) {\n obj.allEnabled = false;\n } else {\n obj.anyEnabled = true;\n }\n\n if ( incrementCounts ) {\n obj.available = (obj.available || 0) + (act.enabled === false ? 0 : 1 );\n obj.total = (obj.total || 0) + 1;\n }\n\n return obj;\n}\n\nfunction _filter(map, disableAll = false) {\n const out = filterBy(Object.values(map), 'anyEnabled', true);\n\n for ( const act of out ) {\n if ( disableAll ) {\n act.enabled = false;\n } else {\n act.enabled = ( act.available >= act.total );\n }\n }\n\n return out;\n}\n\nfunction _execute(resources, action, args, opts = {}) {\n args = args || [];\n if ( resources.length > 1 && action.bulkAction && !opts.alt ) {\n const fn = resources[0][action.bulkAction];\n\n if ( fn ) {\n return fn.call(resources[0], resources, ...args);\n }\n }\n\n const promises = [];\n\n for ( const resource of resources ) {\n let fn;\n\n if (opts.alt && action.altAction) {\n fn = resource[action.altAction];\n } else {\n fn = resource[action.action];\n }\n\n if ( fn ) {\n promises.push(fn.apply(resource, args));\n }\n }\n\n return Promise.all(promises);\n}\n</code>", "source": "SynthCodeNetNoImageTag", "user": "Convert code to text." } ]
[ { "assistant": "<loc_0><loc_0><loc_500><loc_500><_SQL_>CREATE OR REPLACE FUNCTION tests.test_journal_add_entries()\nRETURNS SETOF TEXT AS\n$testsuite$\nDECLARE\nBEGIN\n\n INSERT INTO pay_group.pay_group VALUES\n ('A', 30.00), ('B', 25.00);\n\n RETURN QUERY SELECT is(\n journal.add_entries('[\n [\"12/1/2020\", \"35\", \"1\", \"A\"],\n [\"13/1/2020\", \"35.5\", \"1\", \"A\"],\n [\"14/1/2020\", \"35.00\", \"1\", \"A\"],\n [\"12/1/2020\", \"30.00\", \"2\", \"A\"],\n [\"13/1/2020\", \"30.00\", \"2\", \"A\"],\n [\"14/1/2020\", \"30.00\", \"2\", \"B\"],\n [\"14/1/2020\", \"20.00\", \"3\", \"A\"],\n [\"17/1/2020\", \"20.00\", \"3\", \"B\"]\n ]'::JSON, 3),</code>", "source": "SynthCodeNetNoImageTag", "user": "<code>" } ]
[ { "assistant": "<code><loc_0><loc_0><loc_500><loc_500><_JavaScript_>tinyMCE.addI18n('ar.paste_dlg',{\r\ntext_title:\"\\u0627\\u0633\\u062A\\u062E\\u062F\\u0645 CTRL+V \\u0641\\u064A \\u0644\\u0648\\u062D\\u0629 \\u0627\\u0644\\u0645\\u0641\\u0627\\u062A\\u064A\\u062D \\u0644\\u0644\\u0635\\u0642 \\u0627\\u0644\\u0646\\u0635\\u0641 \\u0641\\u064A \\u0627\\u0644\\u0646\\u0627\\u0641\\u0630\\u0629.\",\r\ntext_linebreaks:\"\\u0627\\u0628\\u0642\\u064A \\u0641\\u0648\\u0627\\u0635\\u0644 \\u0627\\u0644\\u0623\\u0633\\u0637\\u0631\",\r\nword_title:\"\\u0633\\u062A\\u062E\\u062F\\u0645 CTRL+V \\u0641\\u064A \\u0644\\u0648\\u062D\\u0629 \\u0627\\u0644\\u0645\\u0641\\u0627\\u062A\\u064A\\u062D \\u0644\\u0644\\u0635\\u0642 \\u0627\\u0644\\u0646\\u0635\\u0641 \\u0641\\u064A \\u0627\\u0644\\u0646\\u0627\\u0641\\u0630\\u0629.\"\r\n});</code>", "source": "SynthCodeNetNoImageTag", "user": "Convert code to text." } ]
[ { "assistant": "<code><loc_0><loc_0><loc_500><loc_500><_YAML_>BN:\n NUM_SAMPLES_PRECISE: 1024\n USE_PRECISE_STATS: true\nCUDNN:\n BENCHMARK: false\nDATA_LOADER:\n NUM_WORKERS: 4\nMODEL:\n LAYERS: 3\n NUM_CLASSES: 10\n TYPE: mlpnet\nNUM_GPUS: 1\nOPTIM:\n BASE_LR: 0.1\n LR_POLICY: cos\n MAX_EPOCH: 200\n MOMENTUM: 0.9\n NESTEROV: true\n WEIGHT_DECAY: 0.0005\nOUT_DIR: .\nRESNET:\n TRANS_FUN: talklinear_transform\nRGRAPH:\n ADD_1x1: 0\n AGG_FUNC: sum\n DIM_FIRST: 512\n DIM_LIST:\n - 512\n GROUP_NUM: 64\n KEEP_GRAPH: true\n MESSAGE_TYPE: ws\n P: 0.086621\n SEED_GRAPH: 22\n SEED_TRAIN_END: 6\n SEED_TRAIN_START: 1\n SPARSITY: 0.204931\n TALK_MODE: dense\n UPPER: true\nTEST:\n BATCH_SIZE: 100\n DATASET: cifar10\n SPLIT: test\nTRAIN:\n AUTO_MATCH: true\n BATCH_SIZE: 128\n CHECKPOINT_PERIOD: 500\n DATASET: cifar10\n EVAL_PERIOD: 1\n SPLIT: train\n</code>", "source": "SynthCodeNetNoImageTag", "user": "Convert code to text." } ]
[ { "assistant": "<code><loc_0><loc_0><loc_500><loc_500><_JavaScript_>function main(input) {\n const lines = input.trim().split(\"\\n\");\n let [n, k] = lines[0].split(' ');\n n = +n;\n k = BigInt(k);\n const towns = lines[1].split(' ').map(Number);\n\n const visited = new Map();\n let pos = 1;\n while (k > 0) {\n const i = visited.get(pos);\n if (!i) {\n visited.set(pos, BigInt(visited.size));\n pos = towns[pos - 1];\n k--;\n } else {\n const cycle = BigInt(visited.size) - i;\n const rest = k % cycle;\n for (let [key, value] of visited) {\n if (value == i + rest) {\n pos = key;\n break;\n }\n }\n k = 0;\n }\n }\n \n console.log(pos);\n}\n\nmain(require(\"fs\").readFileSync(\"/dev/stdin\", \"utf8\"));</code>", "source": "SynthCodeNetNoImageTag", "user": "Convert code to text." } ]