images
images listlengths
1
1
texts
listlengths
1
1
[ { "assistant": "<loc_0><loc_0><loc_500><loc_500><_C_>#ifndef DISPLAY_MAX_DECAY_H\n#define DISPLAY_MAX_DECAY_H\n\n#include \"DisplayBase.h\"\n#include \"DecayClasses.h\"\n#include \"ArraySharedPtr.h\"\n#include \"Compression.h\"\n\n#include <limits>\n\nclass DisplayLimitDecay : public DisplayBase\n{\n public:\n enum Type\n {\n Max,\n Min\n };\n // TODO Define Max Y, X, direction?\n \n DisplayLimitDecay(Type type = Max);\n DisplayLimitDecay(const DisplayLimitDecay &rhs);\n ~DisplayLimitDecay();\n \n void setDecayFunction(const ArraySharedPtr<DecayFunciton> &array);\n \n void display(DataBuffer &data, SmartMatrix *matrix);\n\n private:\n DataBuffer m_LimitBuffer;\n uint16_t m_time[128];\n ArraySharedPtr<DecayFunciton> m_decayfunctionArray;\n Type m_type;\n};\n\n#endif // DISPLAY_MAX_DECAY_H\n</code>", "source": "SynthCodeNetNoImageTag", "user": "<code>" } ]
[ { "assistant": "<loc_0><loc_0><loc_500><loc_500><_C++_>#pragma once\n\n#include \"continuation.hpp\"\n\nnamespace kuro\n{\n\nclass cancellation\n{\npublic:\n void trigger()\n {\n m_set = true;\n m_continuation.resume_all();\n }\n bool is_set() const\n {\n return m_set;\n }\n\n auto wait()\n {\n struct awaitable\n {\n awaitable(cancellation* c) : m_cancel(c) {}\n bool await_ready() const noexcept\n {\n return m_cancel->is_set();\n }\n void await_suspend(std::coroutine_handle<> handle) noexcept\n {\n m_handle = handle;\n m_cancel->m_continuation.push(handle);\n }\n void await_resume() const noexcept {}\n void await_cancel() noexcept\n {\n m_cancel->m_continuation.erase(m_handle);\n }\n \n private:\n cancellation* m_cancel;\n std::coroutine_handle<> m_handle;\n };\n\n return awaitable{this};\n }\n\nprivate:\n multi_continuation m_continuation;\n bool m_set = false;\n};\n\n}</code>", "source": "SynthCodeNetNoImageTag", "user": "<code>" } ]
[ { "assistant": "<loc_0><loc_0><loc_500><loc_500><_Python_>\nimport logging\nimport numpy as np\nimport os.path\nimport scipy.linalg\nimport scipy.spatial.distance\nimport sys\nfrom sklearn.decomposition import TruncatedSVD\n\nfrom wmf_embed.core.utils import nearest_neighbors\nfrom wmf_embed.train.neighbor_graph import NeighborGraph\nfrom wmf_embed.core.titler import Titler\nfrom wmf_embed.core.lang_embedding import LangEmbedding\n\nSAMPLE_SIZE = 10000\n\nTESTS = [\n 'c:155',\n 'c:152',\n 'c:144',\n 'c:7346',\n 'simple.wikipedia:dog',\n 'simple.wikipedia:man',\n 'simple.wikipedia:woman',\n 'simple.wikipedia:jazz'\n]\n\ndef show_examples(matrix, ids, titler):\n for t in TESTS:\n if t not in ids: continue\n i = ids.index(t)\n neighbor_indexes = nearest_neighbors(matrix, matrix[i,:], 5)\n neighbor_titles = [titler.get_title(ids[i]) for i in neighbor_indexes]\n print('results for %s: %s' % (titler.get_title(t), ', '.join(neighbor_titles)))\n\nNEIGHBOR_WEIGHT = 0.3 # weight of neighbors compared to original vector\nMATCHED_MULTIPLIER = 2 # multiplier for neighbor vectors that match.\n\ndef main(path, lang):\n titler = Titler(os.path.join(path, lang, 'titles.csv'))\n\n # Read in the embeddings\n nav_emb= LangEmbedding('nav', os.path.join(path, 'nav'), titler)\n lang_emb= LangEmbedding(lang, os.path.join(path, lang), titler)\n ids = sorted(set(lang_emb.ids).intersection(nav_emb.ids))\n\n (w2, nav_sub) = nav_emb.submatrix(ids)\n (w1, lang_sub) = lang_emb.submatrix(ids)\n\n M = np.concatenate([nav_sub, lang_sub], axis=1)\n logging.info(\"calcuating SVD of joint %d x %d matrix\", M.shape[0], M.shape[1])\n hybrid = TruncatedSVD(200).fit_transform(M)\n\n # Calculate the alignment between each original matrix and the embedding.\n ortho, scale = scipy.linalg.orthogonal_procrustes(lang_sub, hybrid, check_finite=True)\n aligned = lang_emb.embedding.dot(ortho)\n np.save(os.path.join(path, lang, 'vectors.aligned'), aligned)\n\n in_indexes = lang_emb.indexes(ids)\n aligned[in_indexes] = hybrid\n in_indexes = set(in_indexes)\n out_indexes = [i for i in range(lang_emb.nrows()) if i not in in_indexes]\n\n # Retrofit the out of sample points\n # show_examples(aligned, lang_emb.ids, titler)\n graph = NeighborGraph(lang_emb.ids, os.path.join(path, lang, 'neighbors.npz'))\n for epoch in range(20):\n change = 0.0\n for i in out_indexes:\n neighbor_indexes, weights = graph.index_neighbors_and_weights(i, 10)\n if np.sum(weights) > 0:\n weights /= np.sum(weights)\n v1 = aligned[i,:]\n v1_orig = v1.copy()\n v1 *= (1.0 - NEIGHBOR_WEIGHT)\n v1 += NEIGHBOR_WEIGHT * np.average(aligned[neighbor_indexes,:], weights=weights, axis=0)\n change += np.sum((v1 - v1_orig) ** 2) ** 0.5\n mean_change = change / len(out_indexes)\n logging.info('Epoch %d: avg_change=%.4f', epoch, mean_change)\n\n # show_examples(aligned, lang_emb.ids, titler)\n if mean_change < 0.01:\n break\n\n np.save(os.path.join(path, lang, 'vectors.hybrid'), aligned)\n\n\nif __name__ == '__main__':\n logging.basicConfig(level=logging.INFO)\n if len(sys.argv) != 3:\n sys.stderr.write('usage: %s path/to/input lang' % sys.argv[0])\n sys.exit(1)\n main(sys.argv[1], sys.argv[2])</code>", "source": "SynthCodeNetNoImageTag", "user": "<code>" } ]
[ { "assistant": "<code><loc_0><loc_0><loc_500><loc_500><_Python_>from src.data.preprocessing import check_urls, get_contents, get_next_page\nimport pytest\nimport requests\nfrom collections import defaultdict\n\n\n@pytest.fixture\ndef valid_rental_url():\n url = \"https://my.roomz.asia/api?c=Rooms&a=getAsyncDataForListPage&area=melaka&rentalType=3&page=1\"\n response = requests.get(url)\n return response.json()\n\n\n@pytest.fixture\ndef invalid_rental_url():</code>", "source": "SynthCodeNetNoImageTag", "user": "Convert code to text." } ]
[ { "assistant": "<code><loc_0><loc_0><loc_500><loc_500><_C_>\n@protocol OS_dispatch_semaphore;\n@class NSURLSessionTask, NSHTTPURLResponse, NSMutableData, NSError, NSObject;\n\n@interface TLSTestHarnessResult : NSObject {\n\n\tNSURLSessionTask* _task;\n\tNSHTTPURLResponse* _response;\n\tNSMutableData* _data;\n\tNSError* _error;\n\tNSObject*<OS_dispatch_semaphore> _sema;\n\n}\n\n@property (retain) NSURLSessionTask * task; //@synthesize task=_task - In the implementation block\n@property (retain) NSHTTPURLResponse * response; //@synthesize response=_response - In the implementation block\n@property (retain) NSMutableData * data; //@synthesize data=_data - In the implementation block\n@property (retain) NSError * error; //@synthesize error=_error - In the implementation block\n@property (retain) NSObject*<OS_dispatch_semaphore> sema; //@synthesize sema=_sema - In the implementation block\n-(void)dealloc;\n-(NSMutableData *)data;\n-(NSError *)error;\n-(void)setError:(NSError *)arg1 ;\n-(NSHTTPURLResponse *)response;\n-(void)setResponse:(NSHTTPURLResponse *)arg1 ;\n-(id)initWithTask:(id)arg1 ;\n-(NSURLSessionTask *)task;\n-(void)setTask:(NSURLSessionTask *)arg1 ;\n-(void)appendResponseData:(id)arg1 ;\n-(void)setData:(NSMutableData *)arg1 ;\n-(NSObject*<OS_dispatch_semaphore>)sema;\n-(void)setSema:(NSObject*<OS_dispatch_semaphore>)arg1 ;\n@end\n\n</code>", "source": "SynthCodeNetNoImageTag", "user": "Convert code to text." } ]
[ { "assistant": "<loc_0><loc_0><loc_500><loc_500><_Go_>// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.\n\npackage iot\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/aws/aws-sdk-go-v2/aws\"\n\t\"github.com/aws/aws-sdk-go-v2/internal/awsutil\"\n\t\"github.com/aws/aws-sdk-go-v2/private/protocol\"\n)\n\ntype CreateSecurityProfileInput struct {\n\t_ struct{} `type:\"structure\"`\n\n\t// A list of metrics whose data is retained (stored). By default, data is retained\n\t// for any metric used in the profile's behaviors, but it is also retained for\n\t// any metric specified here.\n\t//\n\t// Note: This API field is deprecated. Please use CreateSecurityProfileRequest$additionalMetricsToRetainV2\n\t// instead.\n\tAdditionalMetricsToRetain []string `locationName:\"additionalMetricsToRetain\" deprecated:\"true\" type:\"list\"`\n\n\t// A list of metrics whose data is retained (stored). By default, data is retained\n\t// for any metric used in the profile's behaviors, but it is also retained for\n\t// any metric specified here.\n\tAdditionalMetricsToRetainV2 []MetricToRetain `locationName:\"additionalMetricsToRetainV2\" type:\"list\"`\n\n\t// Specifies the destinations to which alerts are sent. (Alerts are always sent\n\t// to the console.) Alerts are generated when a device (thing) violates a behavior.\n\tAlertTargets map[string]AlertTarget `locationName:\"alertTargets\" type:\"map\"`\n\n\t// Specifies the behaviors that, when violated by a device (thing), cause an\n\t// alert.\n\tBehaviors []Behavior `locationName:\"behaviors\" type:\"list\"`\n\n\t// A description of the security profile.\n\tSecurityProfileDescription *string `locationName:\"securityProfileDescription\" type:\"string\"`\n\n\t// The name you are giving to the security profile.\n\t//\n\t// SecurityProfileName is a required field\n\tSecurityProfileName *string `location:\"uri\" locationName:\"securityProfileName\" min:\"1\" type:\"string\" required:\"true\"`\n\n\t// Metadata that can be used to manage the security profile.\n\tTags []Tag `locationName:\"tags\" type:\"list\"`\n}\n\n// String returns the string representation\nfunc (s CreateSecurityProfileInput) String() string {\n\treturn awsutil.Prettify(s)\n}\n\n// Validate inspects the fields of the type to determine if they are valid.\nfunc (s *CreateSecurityProfileInput) Validate() error {\n\tinvalidParams := aws.ErrInvalidParams{Context: \"CreateSecurityProfileInput\"}\n\n\tif s.SecurityProfileName == nil {\n\t\tinvalidParams.Add(aws.NewErrParamRequired(\"SecurityProfileName\"))\n\t}\n\tif s.SecurityProfileName != nil && len(*s.SecurityProfileName) < 1 {\n\t\tinvalidParams.Add(aws.NewErrParamMinLen(\"SecurityProfileName\", 1))\n\t}\n\tif s.AdditionalMetricsToRetainV2 != nil {\n\t\tfor i, v := range s.AdditionalMetricsToRetainV2 {\n\t\t\tif err := v.Validate(); err != nil {\n\t\t\t\tinvalidParams.AddNested(fmt.Sprintf(\"%s[%v]\", \"AdditionalMetricsToRetainV2\", i), err.(aws.ErrInvalidParams))\n\t\t\t}\n\t\t}\n\t}\n\tif s.AlertTargets != nil {\n\t\tfor i, v := range s.AlertTargets {\n\t\t\tif err := v.Validate(); err != nil {\n\t\t\t\tinvalidParams.AddNested(fmt.Sprintf(\"%s[%v]\", \"AlertTargets\", i), err.(aws.ErrInvalidParams))\n\t\t\t}\n\t\t}\n\t}\n\tif s.Behaviors != nil {\n\t\tfor i, v := range s.Behaviors {\n\t\t\tif err := v.Validate(); err != nil {\n\t\t\t\tinvalidParams.AddNested(fmt.Sprintf(\"%s[%v]\", \"Behaviors\", i), err.(aws.ErrInvalidParams))\n\t\t\t}\n\t\t}\n\t}\n\tif s.Tags != nil {\n\t\tfor i, v := range s.Tags {\n\t\t\tif err := v.Validate(); err != nil {\n\t\t\t\tinvalidParams.AddNested(fmt.Sprintf(\"%s[%v]\", \"Tags\", i), err.(aws.ErrInvalidParams))\n\t\t\t}\n\t\t}\n\t}\n\n\tif invalidParams.Len() > 0 {\n\t\treturn invalidParams\n\t}\n\treturn nil\n}\n\n// MarshalFields encodes the AWS API shape using the passed in protocol encoder.\nfunc (s CreateSecurityProfileInput) MarshalFields(e protocol.FieldEncoder) error {\n\te.SetValue(protocol.HeaderTarget, \"Content-Type\", protocol.StringValue(\"application/json\"), protocol.Metadata{})\n\n\tif s.AdditionalMetricsToRetain != nil {\n\t\tv := s.AdditionalMetricsToRetain\n\n\t\tmetadata := protocol.Metadata{}\n\t\tls0 := e.List(protocol.BodyTarget, \"additionalMetricsToRetain\", metadata)\n\t\tls0.Start()\n\t\tfor _, v1 := range v {\n\t\t\tls0.ListAddValue(protocol.QuotedValue{ValueMarshaler: protocol.StringValue(v1)})\n\t\t}\n\t\tls0.End()\n\n\t}\n\tif s.AdditionalMetricsToRetainV2 != nil {\n\t\tv := s.AdditionalMetricsToRetainV2\n\n\t\tmetadata := protocol.Metadata{}</code>", "source": "SynthCodeNetNoImageTag", "user": "<code>" } ]
[ { "assistant": "<code><loc_0><loc_0><loc_500><loc_500><_TypeScript_>import {OAuthError} from \"./OAuthError\";\n\nexport class ServerError extends OAuthError {\n constructor(message?){\n super(503,message);\n }\n}</code>", "source": "SynthCodeNetNoImageTag", "user": "Convert code to text." } ]
[ { "assistant": "<loc_0><loc_0><loc_500><loc_500><_TypeScript_>import React from 'react';\n\nimport { Meta, Story } from '@storybook/react/dist/client/preview/types-6-0';\n\nimport { ITextEditorComponentProps } from '../components/TextEditor/model';\nimport { TextEditor } from '../components/TextEditor/TextEditor';\n\nimport GlobalStyle from '../components/Styled/GlobalStyles';\n\nexport default ({\n\tcomponent: TextEditor,\n\ttitle: 'Example/TextEditor'\n} as any) as Meta;\n\nconst Template: Story<ITextEditorComponentProps> = (args) => {\n\treturn (\n\t\t<>\n\t\t\t<GlobalStyle />\n\t\t\t<TextEditor {...args} />\n\t\t</>\n\t);\n};\n\nexport const Normal = Template.bind({});\nNormal.args = {\n\tonEditorChange: (content, editor) => console.log(content)\n} as ITextEditorComponentProps;\n\nexport const WithMenu = Template.bind({});\nWithMenu.args = {\n\tmenubar: true\n} as ITextEditorComponentProps;\n\nexport const Inline = Template.bind({});\nInline.args = {\n\tinline: true\n} as ITextEditorComponentProps;\n\nexport const Disabled = Template.bind({});\nDisabled.args = {\n\tdisabled: true\n} as ITextEditorComponentProps;\n\nexport const WithPersonalizationTags = Template.bind({});\nWithPersonalizationTags.args = {\n\tpersonalizationTags: {\n\t\tbuttonLabel: 'My Tags',\n\t\tid: 'personalizationTags',\n\t\ttags: [\n\t\t\t{ label: 'Tag 1', value: '#tag1#' },\n\t\t\t{ label: 'Tag 2', value: '#tag2#' },\n\t\t\t{ label: 'Tag 3', value: '#tag3#' },\n\t\t\t{ label: 'Tag 4', value: '#tag4#' },\n\t\t\t{ label: 'Tag 5', value: '#tag5#' },\n\t\t\t{ label: 'Tag 6', value: '#tag6#' }\n\t\t]\n\t}\n} as ITextEditorComponentProps;\n</code>", "source": "SynthCodeNetNoImageTag", "user": "<code>" } ]
[ { "assistant": "<loc_0><loc_0><loc_500><loc_500><_Kotlin_>object Libs {\n const val androidGradlePlugin = \"com.android.tools.build:gradle:4.2.0-alpha07\"\n\n const val gradlePlayPublisher = \"com.github.triplet.gradle:play-publisher:3.0.0-SNAPSHOT\"\n\n const val threeTenBp = \"org.threeten:threetenbp:1.4.4\"\n const val threeTenBpNoTzdb = \"$threeTenBp:no-tzdb\"\n const val threeTenAbp = \"com.jakewharton.threetenabp:threetenabp:1.2.4\"\n\n const val gravitySnapHelper = \"com.github.rubensousa:gravitysnaphelper:2.2.1\"\n\n const val timber = \"com.jakewharton.timber:timber:4.7.1\"\n\n const val tmdbJava = \"com.uwetrottmann.tmdb2:tmdb-java:2.2.0\"\n const val traktJava = \"com.uwetrottmann.trakt5:trakt-java:6.6.0\"\n\n const val appauth = \"net.openid:appauth:0.7.1\"\n\n const val junit = \"junit:junit:4.13\"\n const val robolectric = \"org.robolectric:robolectric:4.3.1\"\n const val mockK = \"io.mockk:mockk:1.10.0\"\n\n const val leakCanary = \"com.squareup.leakcanary:leakcanary-android:2.4\"\n\n // Move back to Store when alpha07 is out\n const val store = \"com.dropbox.mobile.store:store4:4.0.0-SNAPSHOT\"\n\n object Insetter {\n private const val version = \"0.3.1\"\n const val dbx = \"dev.chrisbanes:insetter-dbx:$version\"\n const val ktx = \"dev.chrisbanes:insetter-ktx:$version\"\n }\n\n object Accompanist {\n private const val version = \"0.1.8.ui-${AndroidX.Compose.snapshot}-SNAPSHOT\"\n const val mdcTheme = \"dev.chrisbanes.accompanist:accompanist-mdc-theme:$version\"\n const val coil = \"dev.chrisbanes.accompanist:accompanist-coil:$version\"\n }\n\n object Google {\n const val material = \"com.google.android.material:material:1.1.0\"\n const val firebaseCore = \"com.google.firebase:firebase-core:17.4.3\"\n\n const val crashlytics = \"com.google.firebase:firebase-crashlytics:17.0.1\"\n const val crashlyticsGradle = \"com.google.firebase:firebase-crashlytics-gradle:2.1.1\"\n\n const val gmsGoogleServices = \"com.google.gms:google-services:4.3.3\"\n\n const val openSourceLicensesPlugin = \"com.google.android.gms:oss-licenses-plugin:0.10.2\"\n const val openSourceLicensesLibrary = \"com.google.android.gms:play-services-oss-licenses:17.0.0\"\n }\n\n object Kotlin {\n private const val version = \"1.4.0-rc\"\n const val stdlib = \"org.jetbrains.kotlin:kotlin-stdlib-jdk8:$version\"\n const val gradlePlugin = \"org.jetbrains.kotlin:kotlin-gradle-plugin:$version\"\n const val extensions = \"org.jetbrains.kotlin:kotlin-android-extensions:$version\"\n }\n\n object Coroutines {\n private const val version = \"1.3.8-1.4.0-rc\"\n const val core = \"org.jetbrains.kotlinx:kotlinx-coroutines-core:$version\"\n const val android = \"org.jetbrains.kotlinx:kotlinx-coroutines-android:$version\"\n const val test = \"org.jetbrains.kotlinx:kotlinx-coroutines-test:$version\"\n }\n\n object AndroidX {\n const val appcompat = \"androidx.appcompat:appcompat:1.3.0-alpha01\"\n const val browser = \"androidx.browser:browser:1.0.0\"\n const val collection = \"androidx.collection:collection-ktx:1.1.0\"\n const val palette = \"androidx.palette:palette:1.0.0\"\n const val recyclerview = \"androidx.recyclerview:recyclerview:1.2.0-alpha05\"\n const val emoji = \"androidx.emoji:emoji:1.1.0\"\n const val swiperefresh = \"androidx.swiperefreshlayout:swiperefreshlayout:1.1.0-rc01\"\n\n object Navigation {\n private const val version = \"2.3.0\"\n const val fragment = \"androidx.navigation:navigation-fragment-ktx:$version\"\n const val ui = \"androidx.navigation:navigation-ui-ktx:$version\"\n const val safeArgs = \"androidx.navigation:navigation-safe-args-gradle-plugin:$version\"\n }\n\n object Fragment {\n private const val version = \"1.3.0-alpha07\"\n const val fragment = \"androidx.fragment:fragment:$version\"\n const val fragmentKtx = \"androidx.fragment:fragment-ktx:$version\"\n }\n\n object Test {\n private const val version = \"1.2.0\"\n const val core = \"androidx.test:core:$version\"\n const val rules = \"androidx.test:rules:$version\"\n\n object Ext {\n private const val version = \"1.1.2-rc01\"\n const val junit = \"androidx.test.ext:junit-ktx:$version\"\n }\n\n const val espressoCore = \"androidx.test.espresso:espresso-core:3.2.0\"\n }\n\n const val archCoreTesting = \"androidx.arch.core:core-testing:2.1.0\"\n\n object Paging {\n private const val version = \"2.1.2\"</code>", "source": "SynthCodeNetNoImageTag", "user": "<code>" } ]
[ { "assistant": "<code><loc_0><loc_0><loc_500><loc_500><_Go_>/*\nCopyright 2016 The Kubernetes Authors.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n*/\n\npackage v1alpha1\n\nimport (\n\tmetav1 \"k8s.io/apimachinery/pkg/apis/meta/v1\"\n)\n\n// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object\n\ntype MasterConfiguration struct {\n\tmetav1.TypeMeta `json:\",inline\"`\n\n\tAPI API `json:\"api\"`\n\tEtcd Etcd `json:\"etcd\"`\n\tNetworking Networking `json:\"networking\"`\n\tKubernetesVersion string `json:\"kubernetesVersion\"`\n\tCloudProvider string `json:\"cloudProvider\"`\n\tNodeName string `json:\"nodeName\"`\n\tAuthorizationModes []string `json:\"authorizationModes,omitempty\"`\n\n\tToken string `json:\"token\"`\n\tTokenTTL metav1.Duration `json:\"tokenTTL\"`\n\n\tAPIServerExtraArgs map[string]string `json:\"apiServerExtraArgs,omitempty\"`\n\tControllerManagerExtraArgs map[string]string `json:\"controllerManagerExtraArgs,omitempty\"`\n\tSchedulerExtraArgs map[string]string `json:\"schedulerExtraArgs,omitempty\"`\n\n\t// APIServerCertSANs sets extra Subject Alternative Names for the API Server signing cert\n\tAPIServerCertSANs []string `json:\"apiServerCertSANs,omitempty\"`\n\t// CertificatesDir specifies where to store or look for all required certificates\n\tCertificatesDir string `json:\"certificatesDir\"`\n\n\t// ImageRepository what container registry to pull control plane images from\n\tImageRepository string `json:\"imageRepository\"`\n\t// UnifiedControlPlaneImage specifies if a specific container image should be used for all control plane components\n\tUnifiedControlPlaneImage string `json:\"unifiedControlPlaneImage\"`\n\n\t// FeatureGates enabled by the user\n\tFeatureGates map[string]bool `json:\"featureGates,omitempty\"`\n}\n\ntype API struct {\n\t// AdvertiseAddress sets the address for the API server to advertise.\n\tAdvertiseAddress string `json:\"advertiseAddress\"`\n\t// BindPort sets the secure port for the API Server to bind to\n\tBindPort int32 `json:\"bindPort\"`\n}\n\ntype TokenDiscovery struct {\n\tID string `json:\"id\"`\n\tSecret string `json:\"secret\"`\n\tAddresses []string `json:\"addresses\"`\n}\n\ntype Networking struct {\n\tServiceSubnet string `json:\"serviceSubnet\"`\n\tPodSubnet string `json:\"podSubnet\"`\n\tDNSDomain string `json:\"dnsDomain\"`\n}\n\ntype Etcd struct {\n\tEndpoints []string `json:\"endpoints\"`\n\tCAFile string `json:\"caFile\"`\n\tCertFile string `json:\"certFile\"`\n\tKeyFile string `json:\"keyFile\"`\n\tDataDir string `json:\"dataDir\"`\n\tExtraArgs map[string]string `json:\"extraArgs,omitempty\"`\n\t// Image specifies which container image to use for running etcd. If empty, automatically populated by kubeadm using the image repository and default etcd version\n\tImage string `json:\"image\"`\n}\n\n// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object\n\ntype NodeConfiguration struct {\n\tmetav1.TypeMeta `json:\",inline\"`\n\n\tCACertPath string `json:\"caCertPath\"`\n\tDiscoveryFile string `json:\"discoveryFile\"`\n\tDiscoveryToken string `json:\"discoveryToken\"`\n\tDiscoveryTokenAPIServers []string `json:\"discoveryTokenAPIServers,omitempty\"`\n\tNodeName string `json:\"nodeName\"`\n\tTLSBootstrapToken string `json:\"tlsBootstrapToken\"`\n\tToken string `json:\"token\"`\n\n\t// DiscoveryTokenCACertHashes specifies a set of public key pins to verify\n\t// when token-based discovery is used. The root CA found during discovery\n\t// must match one of these values. Specifying an empty set disables root CA\n\t// pinning, which can be unsafe. Each hash is specified as \"<type>:<value>\",\n\t// where the only currently supported type is \"sha256\". This is a hex-encoded\n\t// SHA-256 hash of the Subject Public Key Info (SPKI) object in DER-encoded\n\t// ASN.1. These hashes can be calculated using, for example, OpenSSL:\n\t// openssl x509 -pubkey -in ca.crt openssl rsa -pubin -outform der 2>&/dev/null | openssl dgst -sha256 -hex\n\tDiscoveryTokenCACertHashes []string `json:\"discoveryTokenCACertHashes,omitempty\"`\n\n\t// DiscoveryTokenUnsafeSkipCAVerification allows token-based discovery\n\t// without CA verification via DiscoveryTokenCACertHashes. This can weaken\n\t// the security of kubeadm since other nodes can impersonate the master.\n\tDiscoveryTokenUnsafeSkipCAVerification bool `json:\"discoveryTokenUnsafeSkipCAVerification\"`\n}\n</code>", "source": "SynthCodeNetNoImageTag", "user": "Convert code to text." } ]
[ { "assistant": "<loc_0><loc_0><loc_500><loc_500><_JavaScript_>\"use strict\";\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __metadata = (this && this.__metadata) || function (k, v) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(k, v);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Review = void 0;\nconst sequelize_typescript_1 = require(\"sequelize-typescript\");\nconst user_model_1 = require(\"../users/user.model\");\nconst tag_model_1 = require(\"../tags/tag.model\");\nconst review_tags_model_1 = require(\"./review.tags.model\");\nconst title_groups_model_1 = require(\"../titles/title.groups.model\");\nconst rating_model_1 = require(\"../ratings/rating.model\");\nconst like_model_1 = require(\"../likes/like.model\");\nconst comment_model_1 = require(\"../comments/comment.model\");\nlet Review = class Review extends sequelize_typescript_1.Model {\n};\n__decorate([\n (0, sequelize_typescript_1.Column)({ type: sequelize_typescript_1.DataType.INTEGER, unique: true, autoIncrement: true, primaryKey: true }),\n __metadata(\"design:type\", Number)\n], Review.prototype, \"id\", void 0);\n__decorate([\n (0, sequelize_typescript_1.Column)({ type: sequelize_typescript_1.DataType.BOOLEAN, defaultValue: false }),\n __metadata(\"design:type\", Boolean)\n], Review.prototype, \"blocked\", void 0);\n__decorate([\n (0, sequelize_typescript_1.Column)({ type: sequelize_typescript_1.DataType.TEXT }),\n __metadata(\"design:type\", String)\n], Review.prototype, \"description\", void 0);\n__decorate([\n (0, sequelize_typescript_1.Column)({ type: sequelize_typescript_1.DataType.TEXT }),\n __metadata(\"design:type\", String)\n], Review.prototype, \"text\", void 0);\n__decorate([\n (0, sequelize_typescript_1.Column)({ type: sequelize_typescript_1.DataType.BOOLEAN }),\n __metadata(\"design:type\", Boolean)\n], Review.prototype, \"draft\", void 0);\n__decorate([\n (0, sequelize_typescript_1.Column)({ type: sequelize_typescript_1.DataType.INTEGER }),\n __metadata(\"design:type\", Number)\n], Review.prototype, \"authorRating\", void 0);\n__decorate([\n (0, sequelize_typescript_1.ForeignKey)(() => user_model_1.User),\n (0, sequelize_typescript_1.Column)({ type: sequelize_typescript_1.DataType.INTEGER }),\n __metadata(\"design:type\", Number)\n], Review.prototype, \"userId\", void 0);\n__decorate([\n (0, sequelize_typescript_1.BelongsTo)(() => user_model_1.User),\n __metadata(\"design:type\", user_model_1.User)\n], Review.prototype, \"user\", void 0);\n__decorate([\n (0, sequelize_typescript_1.BelongsToMany)(() => tag_model_1.Tag, () => review_tags_model_1.ReviewTags),\n __metadata(\"design:type\", Array)\n], Review.prototype, \"tags\", void 0);\n__decorate([\n (0, sequelize_typescript_1.ForeignKey)(() => title_groups_model_1.TitleGroups),\n (0, sequelize_typescript_1.Column)({ type: sequelize_typescript_1.DataType.INTEGER }),\n __metadata(\"design:type\", Number)\n], Review.prototype, \"titleGroupId\", void 0);\n__decorate([\n (0, sequelize_typescript_1.BelongsTo)(() => title_groups_model_1.TitleGroups),\n __metadata(\"design:type\", title_groups_model_1.TitleGroups)\n], Review.prototype, \"groupTitle\", void 0);\n__decorate([\n (0, sequelize_typescript_1.HasMany)(() => rating_model_1.Rating),\n __metadata(\"design:type\", rating_model_1.Rating)\n], Review.prototype, \"ratings\", void 0);\n__decorate([\n (0, sequelize_typescript_1.HasMany)(() => like_model_1.Like),\n __metadata(\"design:type\", like_model_1.Like)\n], Review.prototype, \"likes\", void 0);\n__decorate([\n (0, sequelize_typescript_1.Column)({ type: sequelize_typescript_1.DataType.STRING }),\n __metadata(\"design:type\", String)\n], Review.prototype, \"searchId\", void 0);\n__decorate([\n (0, sequelize_typescript_1.HasMany)(() => comment_model_1.Comment),\n __metadata(\"design:type\", comment_model_1.Comment)\n], Review.prototype, \"comments\", void 0);\nReview = __decorate([\n (0, sequelize_typescript_1.Table)({ tableName: 'reviews', timestamps: true, paranoid: true, deletedAt: true })\n], Review);\nexports.Review = Review;\n//# sourceMappingURL=review.model.js.map</code>", "source": "SynthCodeNetNoImageTag", "user": "<code>" } ]
[ { "assistant": "<loc_0><loc_0><loc_500><loc_500><_Scala_> \"< Back\"\n )\n )\n )\n .build\n}\n</code>", "source": "SynthCodeNetNoImageTag", "user": "<code>" } ]
[ { "assistant": "<loc_0><loc_0><loc_500><loc_500><_Ruby_> app 'Brave Browser Dev.app'\n\n zap trash: [\n '~/Library/Application Support/brave',\n '~/Library/Preferences/com.electron.brave.plist',\n '~/Library/Saved Application State/com.electron.brave.savedState',\n ]\nend\n</code>", "source": "SynthCodeNetNoImageTag", "user": "<code>" } ]
[ { "assistant": "<code><loc_0><loc_0><loc_500><loc_500><_PHP_><?php\n\nnamespace Eton\\Model;\n\nuse Core\\Model\\CommonEntity;\nuse Doctrine\\ORM\\Mapping as ORM;\n\n\n/**\n * Class Poll\n * \n * @ORM\\Entity\n * @ORM\\Table(name=\"et_poll\")\n * \n * @author Petr Blazicek 2016\n */\nclass Poll extends CommonEntity\n{\n\n\t/**\n\t * @ORM\\Column(length=16)\n\t * @var string\n\t */\n\tprivate $ip;\n\n\t/**\n\t * @ORM\\Column(type=\"integer\")\n\t * @var integer\n\t */\n\tprivate $value;\n\n\n\t// getters & setters\n\n\tpublic function getIp()\n\t{\n\t\treturn $this->ip;\n\t}\n\n\n\tpublic function getValue()\n\t{\n\t\treturn $this->value;\n\t}\n\n\n\tpublic function setIp( $ip )\n\t{\n\t\t$this->ip = $ip;\n\t\treturn $this;\n\t}\n\n\n\tpublic function setValue( $value )\n\t{\n\t\t$this->value = $value;\n\t\treturn $this;\n\t}\n\n}\n</code>", "source": "SynthCodeNetNoImageTag", "user": "Convert code to text." } ]
[ { "assistant": "<code><loc_0><loc_0><loc_500><loc_500><_Java_>import java.util.Scanner;\n\npublic class Main{\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n \n String n = sc.next();\n System.out.println(ABC\" + n );\n \n }\n}\n</code>", "source": "SynthCodeNetNoImageTag", "user": "Convert code to text." } ]
[ { "assistant": "<loc_0><loc_0><loc_500><loc_500><_Python_>a,b,c,k = map(int,input().split())\n\n'''\nif k%2==0:\n num = (2**k+2)/3\n tak = num*a+(num-1)*b+(num-1)*c\n nak = (num-1)*a+num*b+(num-1)*c\n\nelse:\n num = (2**k+1)/3\n tak = (num-1)*a+num*b+num*c\n nak = num*a+(num-1)*b+num*c\n'''\nif k%2==0:\n ans=a-b\nelse:\n ans=b-a\n\nif abs(ans)>10**18:\n print('Unfair')\nelse:\n print(ans)\n\n</code>", "source": "SynthCodeNetNoImageTag", "user": "<code>" } ]
[ { "assistant": "<loc_0><loc_0><loc_500><loc_500><_XML_><?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE module PUBLIC \"-//NetBeans//DTD Module Status 1.0//EN\"\n \"http://www.netbeans.org/dtds/module-status-1_0.dtd\">\n<module name=\"org.netbeans.modules.testng.maven\">\n <param name=\"autoload\">false</param>\n <param name=\"eager\">true</param>\n <param name=\"jar\">modules/org-netbeans-modules-testng-maven.jar</param>\n <param name=\"reloadable\">false</param>\n</module>\n</code>", "source": "SynthCodeNetNoImageTag", "user": "<code>" } ]
[ { "assistant": "<loc_0><loc_0><loc_500><loc_500><_Rust_>const BLOCK_SIZE: usize = 64;\nconst RESULT_SIZE: usize = 32;\nconst STATE_SIZE: usize = 8;\nconst INIT_STATE: [u32; STATE_SIZE] = [0x6a09e667, 0xbb67ae85, 0x3c6ef372, 0xa54ff53a, 0x510e527f, 0x9b05688c, 0x1f83d9ab, 0x5be0cd19];\nconst K256: [u32; 64] = [\n\t0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5, 0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5,\n\t0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3, 0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174,\n\t0xe49b69c1, 0xefbe4786, 0x0fc19dc6, 0x240ca1cc, 0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da,\n\t0x983e5152, 0xa831c66d, 0xb00327c8, 0xbf597fc7, 0xc6e00bf3, 0xd5a79147, 0x06ca6351, 0x14292967,\n\t0x27b70a85, 0x2e1b2138, 0x4d2c6dfc, 0x53380d13, 0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85,</code>", "source": "SynthCodeNetNoImageTag", "user": "<code>" } ]
[ { "assistant": "<code><loc_0><loc_0><loc_500><loc_500><_Python_>each library implements a handler for the same tag and/or a handler\nfor which a built-in handler already exists. How do we decide what\ntakes precedence. Is this even something we have to worry about?\n\nSo, the idea is to find an element, then do something like\nBaseFormHandler.get_handler(element, locator).set(\"foo\")\n\n\"\"\"\n\n\ndef get_form_handler(element, locator):\n \"\"\"Return an instance of handler for the given element\n\n This will search all subclasses of BaseFormHandler, looking\n for a class that supports the tag_name of the given element\n \"\"\"\n tag = element.tag_name\n for subclass in get_all_subclasses(BaseFormHandler):\n if tag in subclass.tags:\n # first one wins, but is that the right algorithm? Do\n # we want to give precedence to external handlers\n # over our built-in ones?\n return subclass(element, locator)\n return None\n\n\nclass BaseFormHandler(abc.ABC):\n \"\"\"Base class for all form handlers\n\n The goal is to have each handler implement the methods 'get',\n 'set', 'focus', and 'clear'. However, at present we're only using\n 'set' externally. 'focus' is the one method that will probably\n have the same implementation for every handler so it's defined in\n the base class. The others are abstract methods which each handler\n should define.\n\n \"\"\"\n</code>", "source": "SynthCodeNetNoImageTag", "user": "Convert code to text." } ]
[ { "assistant": "<code><loc_0><loc_0><loc_500><loc_500><_YAML_>interactions:\n- request:\n body: '{\"name\": \"sample-datasource\", \"type\": \"azureblob\", \"credentials\": {\"connectionString\":\n \"connection_string\"},\n \"container\": {\"name\": \"searchcontainer\"}}'\n headers:\n Accept:\n - application/json;odata.metadata=minimal\n Accept-Encoding:\n - gzip, deflate\n Connection:\n - keep-alive\n Content-Length:\n - '319'\n Content-Type:\n - application/json\n User-Agent:\n - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0)\n method: POST\n uri: https://search7d318fa.search.windows.net/datasources?api-version=2020-06-30-Preview\n response:\n body:\n string: '{\"@odata.context\":\"https://search7d318fa.search.windows.net/$metadata#datasources/$entity\",\"@odata.etag\":\"\\\"0x8D84B88BA035DEF\\\"\",\"name\":\"sample-datasource\",\"description\":null,\"type\":\"azureblob\",\"subtype\":null,\"credentials\":{\"connectionString\":null},\"container\":{\"name\":\"searchcontainer\",\"query\":null},\"dataChangeDetectionPolicy\":null,\"dataDeletionDetectionPolicy\":null,\"encryptionKey\":null}'\n headers:\n cache-control:\n - no-cache\n content-length:\n - '390'\n content-type:\n - application/json; odata.metadata=minimal\n date:\n - Fri, 28 Aug 2020 19:29:48 GMT\n elapsed-time:\n - '48'\n etag:\n - W/\"0x8D84B88BA035DEF\"\n expires:\n - '-1'\n location:\n - https://search7d318fa.search.windows.net/datasources('sample-datasource')?api-version=2020-06-30-Preview\n odata-version:\n - '4.0'\n pragma:\n - no-cache\n preference-applied:\n - odata.include-annotations=\"*\"\n request-id:\n - d5a2c7e3-e964-11ea-b2da-5cf37071153c\n strict-transport-security:\n - max-age=15724800; includeSubDomains\n status:\n code: 201\n message: Created\n- request:\n body: null\n headers:\n Accept:\n - application/json;odata.metadata=minimal\n Accept-Encoding:\n - gzip, deflate\n Connection:\n - keep-alive\n User-Agent:\n - azsdk-python-search-documents/11.1.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0)\n method: GET\n uri: https://search7d318fa.search.windows.net/datasources('sample-datasource')?api-version=2020-06-30-Preview\n response:\n body:\n string: '{\"@odata.context\":\"https://search7d318fa.search.windows.net/$metadata#datasources/$entity\",\"@odata.etag\":\"\\\"0x8D84B88BA035DEF\\\"\",\"name\":\"sample-datasource\",\"description\":null,\"type\":\"azureblob\",\"subtype\":null,\"credentials\":{\"connectionString\":null},\"container\":{\"name\":\"searchcontainer\",\"query\":null},\"dataChangeDetectionPolicy\":null,\"dataDeletionDetectionPolicy\":null,\"encryptionKey\":null}'\n headers:\n cache-control:\n - no-cache\n content-length:\n - '390'\n content-type:\n - application/json; odata.metadata=minimal\n date:\n - Fri, 28 Aug 2020 19:29:48 GMT\n elapsed-time:\n - '36'\n etag:\n - W/\"0x8D84B88BA035DEF\"\n expires:\n - '-1'\n odata-version:\n - '4.0'\n pragma:\n - no-cache\n preference-applied:\n - odata.include-annotations=\"*\"\n request-id:\n - d60dc29b-e964-11ea-ba38-5cf37071153c\n strict-transport-security:\n - max-age=15724800; includeSubDomains\n vary:\n - Accept-Encoding\n status:\n code: 200\n message: OK\nversion: 1\n</code>", "source": "SynthCodeNetNoImageTag", "user": "Convert code to text." } ]
[ { "assistant": "<loc_0><loc_0><loc_500><loc_500><_Python_>from collections import deque\nimport operator\n\nclass FCFS:\n def __init__(self,ProcesoA,ProcesoB,ProcesoC,ProcesoD,ProcesoE): #Tiempos en donde entran al sistema\n #SE ASIGNAN LOS PROCESOS Y DECLARAN T,P,E TOTAL\n self.A=ProcesoA\n self.B=ProcesoB\n self.C=ProcesoC\n self.E=ProcesoE\n self.D=ProcesoD\n self.T_total=0\n self.P_total=0\n self.E_total=0\n\n def run(self):\n primero = True\n fin_anterior_buffer=0\n procesos = deque()\n procesos=[self.A,self.B,self.C,self.D,self.E]\n sortedProcesses=sorted(procesos, key=operator.attrgetter(\"tiempo_de_llegada\")) #SE ORDENA POR TIEMPO DE LLEGADA\n for proc in sortedProcesses:\n if(primero): #LA PRIMERA ITERACIÓN\n proc.inicio = proc.tiempo_de_llegada\n proc.fin = proc.t\n proc.T = proc.t\n proc.E = proc.tiempo_de_llegada\n proc.P = proc.T / proc.t\n primero = False\n fin_anterior_buffer = proc.fin\n else:\n proc.inicio= fin_anterior_buffer\n proc.fin = proc.inicio + proc.t\n proc.T = proc.inicio - proc.tiempo_de_llegada + proc.t\n proc.E = proc.inicio - proc.tiempo_de_llegada\n proc.P = proc.T / proc.t\n fin_anterior_buffer = proc.fin\n #SUMA DE PARAMETROS PARA PROMEDIAR\n self.T_total= self.T_total + proc.T\n self.E_total= self.E_total + proc.E</code>", "source": "SynthCodeNetNoImageTag", "user": "<code>" } ]
[ { "assistant": "<loc_0><loc_0><loc_500><loc_500><_C#_>\r\nnamespace MikhailKhalizev.Max.Program\r\n{\r\n public partial class RawProgram\r\n {\r\n [MethodInfo(\"0x1018_f44b-990d\")]\r\n public void /* sys_mve */ Method_1018_f44b_v2()\r\n {\r\n ii(0x1018_f44b, 2); mov(ah, bh); /* mov ah, bh */\r\n }\r\n }\r\n}\r\n</code>", "source": "SynthCodeNetNoImageTag", "user": "<code>" } ]
[ { "assistant": "<code><loc_0><loc_0><loc_500><loc_500><_Java_>import java.io.OutputStream;\nimport java.io.IOException;\nimport java.io.InputStream;\nimport java.io.PrintWriter;\nimport java.io.IOException;\nimport java.util.InputMismatchException;\nimport java.io.InputStreamReader;\nimport java.util.ArrayList;\nimport java.util.List;\nimport java.util.TreeMap;\nimport java.util.StringTokenizer;\nimport java.util.Map;\nimport java.util.Map.Entry;\nimport java.io.BufferedReader;\nimport java.io.InputStream;\n\n/**\n * Built using CHelper plug-in\n * Actual solution is at the top\n */\npublic class Main {\n public static void main(String[] args) {\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n InputReader in = new InputReader(inputStream);\n PrintWriter out = new PrintWriter(outputStream);\n TaskC solver = new TaskC();\n solver.solve(1, in, out);\n out.close();\n }\n\n static class TaskC {\n public void solve(int testNumber, InputReader in, PrintWriter out) {\n int n = in.nextInt();\n int m = n / 2;\n int[] a = in.nextIntArray(n);\n\n Map<Integer, Integer> map1 = new TreeMap<>();\n Map<Integer, Integer> map2 = new TreeMap<>();\n map1.put(0, 0);\n map2.put(0, 0);\n\n for (int i = 0; i < n; i++) {\n if (i % 2 == 0) {\n map1.merge(a[i], 1, Integer::sum);\n } else {\n map2.merge(a[i], 1, Integer::sum);\n }\n }\n\n List<Map.Entry<Integer, Integer>> list1 = new ArrayList<>(map1.entrySet());\n List<Map.Entry<Integer, Integer>> list2 = new ArrayList<>(map2.entrySet());\n list1.sort((e1, e2) -> e2.getValue() - e1.getValue());\n list2.sort((e1, e2) -> e2.getValue() - e1.getValue());\n\n if (list1.get(0).getKey().equals(list2.get(0).getKey())) {\n out.println(2 * m - Math.max(list1.get(0).getValue() + list2.get(1).getValue(), list1.get(1).getValue() + list2.get(0).getValue()));\n } else {\n out.println(2 * m - list1.get(0).getValue() - list2.get(0).getValue());\n }\n }\n\n }\n\n static class InputReader {\n private BufferedReader br;\n private StringTokenizer st;\n\n public InputReader(InputStream inputStream) {\n br = new BufferedReader(new InputStreamReader(inputStream));\n st = new StringTokenizer(\"\");\n }\n\n public String nextString() {\n while (!st.hasMoreTokens()) {\n try {\n st = new StringTokenizer(br.readLine(), \" \");\n } catch (IOException e) {\n throw new InputMismatchException();\n }\n }\n return st.nextToken();\n }\n\n public int nextInt() {\n return Integer.parseInt(nextString());\n }\n\n public int[] nextIntArray(int n) {\n int[] res = new int[n];\n for (int i = 0; i < n; i++) {\n res[i] = nextInt();\n }\n return res;\n }\n\n }\n}\n\n</code>", "source": "SynthCodeNetNoImageTag", "user": "Convert code to text." } ]
[ { "assistant": "<code><loc_0><loc_0><loc_500><loc_500><_HTML_><!DOCTYPE html>\n<html lang=\"en\">\n <head>\n <meta charset=\"utf-8\">\n<meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n<meta name=\"description\" content=\"\">\n<meta name=\"author\" content=\"\">\n<meta name=\"keyword\" content=\"\">\n\n <link rel=\"shortcut icon\" href=\"/node-mongodb-native/3.1/img/favicon.png\">\n\n <title>Upgrade-migrations</title>\n\n <link rel=\"stylesheet\" href=\"/node-mongodb-native/3.1/lib/bootstrap.css\" type=\"text/css\" />\n<link rel=\"stylesheet\" href=\"/node-mongodb-native/3.1/lib/font-awesome/css/font-awesome.min.css\" type=\"text/css\" />\n<link rel=\"stylesheet\" href=\"/node-mongodb-native/3.1/css/mongodb-docs.css\" type=\"text/css\" />\n<link rel=\"stylesheet\" href=\"/node-mongodb-native/3.1/css/overrides.css\" type=\"text/css\" />\n<link rel=\"stylesheet\" href=\"/node-mongodb-native/3.1/lib/highlight/styles/idea.css\" />\n<link rel=\"stylesheet\" href=\"/node-mongodb-native/3.1/lib/bootstrap-toggle/bootstrap-toggle.min.css\" type=\"text/css\" />\n<link rel=\"stylesheet\" href=\"/node-mongodb-native/3.1/css/java.css\" type=\"text/css\" />\n\n\n </head>\n\n <body>\n \n <section id=\"container\" class=\"\">\n \n <header id=\"header-db\" class=\"row\" role=\"navigation\">\n <div class=\"header-content\">\n <div class=\"toggle-nav pull-left\">\n <i class=\"fa fa-bars\"></i>\n <div class=\"icon-reorder tooltips\" data-original-title=\"Toggle Navigation\" data-placement=\"bottom\"></div>\n </div>\n \n <div class=\"logo pull-left\">\n <a href=\"https://www.mongodb.com/\"></code>", "source": "SynthCodeNetNoImageTag", "user": "Convert code to text." } ]
[ { "assistant": "<code><loc_0><loc_0><loc_500><loc_500><_JavaScript_>// flow-typed signature: 8bc24b48d95b0f66a99092872791c7e3\n// flow-typed version: <<STUB>>/supertest_v^3.1.0/flow_v0.76.0\n\n/**\n * This is an autogenerated libdef stub for:\n *\n * 'supertest'\n *\n * Fill this stub out by replacing all the `any` types.\n *\n * Once filled out, we encourage you to share your work with the\n * community by sending a pull request to:\n * https://github.com/flowtype/flow-typed\n */\n\ndeclare module 'supertest' {\n declare module.exports: any;\n}\n\n/**\n * We include stubs for each file inside this npm package in case you need to\n * require those files directly. Feel free to delete any files that aren't\n * needed.\n */\ndeclare module 'supertest/lib/agent' {\n declare module.exports: any;\n}\n\ndeclare module 'supertest/lib/test' {\n declare module.exports: any;\n}\n\ndeclare module 'supertest/test/supertest' {\n declare module.exports: any;\n}\n\n// Filename aliases\ndeclare module 'supertest/index' {\n declare module.exports: $Exports<'supertest'>;\n}\ndeclare module 'supertest/index.js' {\n declare module.exports: $Exports<'supertest'>;\n}\ndeclare module 'supertest/lib/agent.js' {\n declare module.exports: $Exports<'supertest/lib/agent'>;\n}\ndeclare module 'supertest/lib/test.js' {\n declare module.exports: $Exports<'supertest/lib/test'>;\n}\ndeclare module 'supertest/test/supertest.js' {\n declare module.exports: $Exports<'supertest/test/supertest'>;\n}\n</code>", "source": "SynthCodeNetNoImageTag", "user": "Convert code to text." } ]
[ { "assistant": "<loc_0><loc_0><loc_500><loc_500><_Python_>from briefcase.exceptions import BriefcaseCommandError\nfrom briefcase.integrations.xcode import ensure_xcode_is_installed\n\nDEFAULT_OUTPUT_FORMAT = 'xcode'\n\n\nclass iOSMixin:\n platform = 'iOS'\n\n def verify_tools(self):\n if self.host_os != 'Darwin':</code>", "source": "SynthCodeNetNoImageTag", "user": "<code>" } ]
[ { "assistant": "<code><loc_0><loc_0><loc_500><loc_500><_YAML_>apiVersion: v1\nkind: Pod\nmetadata:\n name: image-demo-5469\nspec:\n containers:\n - name: nginx\n image: nginx #ritaacr.azurecr.io/nginx:latest</code>", "source": "SynthCodeNetNoImageTag", "user": "Convert code to text." } ]
[ { "assistant": "<loc_0><loc_0><loc_500><loc_500><_PHP_><?php\n\n\nnamespace App\\Http\\Requests\\Employees\\Employee;\n\n\nuse Illuminate\\Foundation\\Http\\FormRequest;\n\nclass EditEmployeeRequest extends FormRequest\n{\n\n public function authorize()\n {\n// return Gate::allows('admin.');\n return true;\n }\n\n public function rules(){\n return [\n 'id' => 'required|exists:employees,user_id,deleted_at,NULL',\n ];\n }\n public function validationData(): array\n {\n return $this->json()->all();\n }\n}\n</code>", "source": "SynthCodeNetNoImageTag", "user": "<code>" } ]
[ { "assistant": "<code><loc_0><loc_0><loc_500><loc_500><_Python_># Copyright 2015 Google Inc. All Rights Reserved.\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\nimport pytest\n\ntry:\n import main\nexcept ImportError:\n main = None\n\n\n@pytest.mark.skipif(\n not main,\n reason='pylibmc not installed.')\ndef test_index():\n try:\n main.memcache_client.set('counter', 0)\n except Exception:\n pytest.skip('Memcache is unavailable.')\n\n main.app.testing = True\n client = main.app.test_client()\n</code>", "source": "SynthCodeNetNoImageTag", "user": "Convert code to text." } ]
[ { "assistant": "<loc_0><loc_0><loc_500><loc_500><_C_> std::vector<ValueType::Dimension> *unsorted = nullptr);\n\nValueType from_spec(const vespalib::string &spec);\nValueType from_spec(const vespalib::string &spec, std::vector<ValueType::Dimension> &unsorted);\nvespalib::string to_spec(const ValueType &type);\n\n}\n</code>", "source": "SynthCodeNetNoImageTag", "user": "<code>" } ]
[ { "assistant": "<loc_0><loc_0><loc_500><loc_500><_Python_>if S<=D/T:\n print('Yes')\nelse:\n print('No')\n </code>", "source": "SynthCodeNetNoImageTag", "user": "<code>" } ]
[ { "assistant": "<code><loc_0><loc_0><loc_500><loc_500><_Python_># Generated by Django 3.1.13 on 2021-08-22 12:30\n\nfrom django.conf import settings\nimport django.contrib.gis.db.models.fields\nfrom django.db import migrations, models\nimport django.db.models.deletion\n\n\nclass Migration(migrations.Migration):\n\n dependencies = [\n ('core', '0019_auto_20210728_1829'),\n ]\n\n operations = [\n migrations.CreateModel(\n name='PruebaLine',\n fields=[\n ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),\n ('nombre', models.CharField(blank=True, max_length=50, verbose_name='Nombre')),\n ('descripcion', models.CharField(blank=True, max_length=250, verbose_name='Descripción')),\n ('geom', django.contrib.gis.db.models.fields.MultiLineStringField(srid=4326)),\n ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),\n ],\n ),\n ]\n</code>", "source": "SynthCodeNetNoImageTag", "user": "Convert code to text." } ]
[ { "assistant": "<loc_0><loc_0><loc_500><loc_500><_C_>/*\n * Copyright (c) 1999-2000 Image Power, Inc. and the University of\n * British Columbia.\n * Copyright (c) 2001-2002 Michael David Adams.\n * All rights reserved.\n */\n\n/* __START_OF_JASPER_LICENSE__\n * \n * JasPer License Version 2.0\n * \n * Copyright (c) 2001-2006 Michael David Adams\n * Copyright (c) 1999-2000 Image Power, Inc.\n * Copyright (c) 1999-2000 The University of British Columbia\n * \n * All rights reserved.\n * \n * Permission is hereby granted, free of charge, to any person (the\n * \"User\") obtaining a copy of this software and associated documentation\n * files (the \"Software\"), to deal in the Software without restriction,\n * including without limitation the rights to use, copy, modify, merge,\n * publish, distribute, and/or sell copies of the Software, and to permit\n * persons to whom the Software is furnished to do so, subject to the\n * following conditions:\n * \n * 1. The above copyright notices and this permission notice (which\n * includes the disclaimer below) shall be included in all copies or\n * substantial portions of the Software.\n * \n * 2. The name of a copyright holder shall not be used to endorse or\n * promote products derived from the Software without specific prior\n * written permission.\n * \n * THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS\n * LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER\n * THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS\n * \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING\n * BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A\n * PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. IN NO\n * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL\n * INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING\n * FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,\n * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION\n * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. NO ASSURANCES ARE\n * PROVIDED BY THE COPYRIGHT HOLDERS THAT THE SOFTWARE DOES NOT INFRINGE\n * THE PATENT OR OTHER INTELLECTUAL PROPERTY RIGHTS OF ANY OTHER ENTITY.\n * EACH COPYRIGHT HOLDER DISCLAIMS ANY LIABILITY TO THE USER FOR CLAIMS\n * BROUGHT BY ANY OTHER ENTITY BASED ON INFRINGEMENT OF INTELLECTUAL\n * PROPERTY RIGHTS OR OTHERWISE. AS A CONDITION TO EXERCISING THE RIGHTS\n * GRANTED HEREUNDER, EACH USER HEREBY ASSUMES SOLE RESPONSIBILITY TO SECURE\n * ANY OTHER INTELLECTUAL PROPERTY RIGHTS NEEDED, IF ANY. THE SOFTWARE\n * IS NOT FAULT-TOLERANT AND IS NOT INTENDED FOR USE IN MISSION-CRITICAL\n * SYSTEMS, SUCH AS THOSE USED IN THE OPERATION OF NUCLEAR FACILITIES,\n * AIRCRAFT NAVIGATION OR COMMUNICATION SYSTEMS, AIR TRAFFIC CONTROL\n * SYSTEMS, DIRECT LIFE SUPPORT MACHINES, OR WEAPONS SYSTEMS, IN WHICH\n * THE FAILURE OF THE SOFTWARE OR SYSTEM COULD LEAD DIRECTLY TO DEATH,\n * PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE (\"HIGH\n * RISK ACTIVITIES\"). THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY\n * EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES.\n * \n * __END_OF_JASPER_LICENSE__\n */\n\n/*\n * Sequence/Matrix Library\n *\n * $Id$\n */\n\n/******************************************************************************\\\n* Includes.\n\\******************************************************************************/\n\n#include <stdlib.h>\n#include <assert.h>\n#include <math.h>\n#include <inttypes.h>\n\n#include \"jasper/jas_seq.h\"\n#include \"jasper/jas_malloc.h\"\n#include \"jasper/jas_math.h\"\n\n/******************************************************************************\\\n* Constructors and destructors.\n\\******************************************************************************/\n</code>", "source": "SynthCodeNetNoImageTag", "user": "<code>" } ]
[ { "assistant": "<code><loc_0><loc_0><loc_500><loc_500><_C#_>// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.\r\n// See the LICENCE file in the repository root for full licence text.\r\n\r\nusing osu.Framework.Allocation;\r\nusing osu.Framework.Bindables;\r\nusing osu.Framework.Graphics;\r\nusing osu.Framework.Graphics.Containers;\r\nusing osu.Framework.Graphics.Shapes;\r\nusing osu.Game.Graphics;\r\nusing osu.Game.Online;\r\nusing osu.Game.Overlays;\r\n\r\nnamespace osu.Game.Beatmaps.Drawables.Cards\r\n{\r\n public class BeatmapCardDownloadProgressBar : CompositeDrawable\r\n {\r\n public IBindable<DownloadState> State => state;\r\n private readonly Bindable<DownloadState> state = new Bindable<DownloadState>();\r\n\r\n public IBindable<double> Progress => progress;\r\n private readonly BindableDouble progress = new BindableDouble();\r\n\r\n public override bool IsPresent => true;\r\n\r\n private readonly CircularContainer foreground;\r\n\r\n private readonly Box backgroundFill;\r\n private readonly Box foregroundFill;\r\n\r\n [Resolved]\r\n private OsuColour colours { get; set; }\r\n\r\n [Resolved]\r\n private OverlayColourProvider colourProvider { get; set; }\r\n\r\n public BeatmapCardDownloadProgressBar()\r\n {\r\n InternalChildren = new Drawable[]\r\n {\r\n new CircularContainer\r\n {\r\n RelativeSizeAxes = Axes.Both,\r\n Masking = true,\r\n Child = backgroundFill = new Box\r\n {\r\n RelativeSizeAxes = Axes.Both,\r\n }\r\n },\r\n foreground = new CircularContainer\r\n {\r\n RelativeSizeAxes = Axes.Both,\r\n Masking = true,\r\n Child = foregroundFill = new Box\r\n {\r\n RelativeSizeAxes = Axes.Both,\r\n }\r\n }\r\n };\r\n }\r\n\r\n [BackgroundDependencyLoader]\r\n private void load()\r\n {\r\n backgroundFill.Colour = colourProvider.Background6;\r\n }\r\n\r\n protected override void LoadComplete()\r\n {\r\n base.LoadComplete();\r\n\r\n state.BindValueChanged(_ => stateChanged(), true);\r\n progress.BindValueChanged(_ => progressChanged(), true);\r\n }\r\n\r\n private void stateChanged()\r\n {\r\n switch (state.Value)\r\n {\r\n case DownloadState.Downloading:\r\n FinishTransforms(true);\r\n foregroundFill.Colour = colourProvider.Highlight1;\r\n break;\r\n\r\n case DownloadState.Importing:\r\n foregroundFill.FadeColour(colours.Yellow, BeatmapCard.TRANSITION_DURATION, Easing.OutQuint);\r\n break;\r\n }\r\n }\r\n\r\n private void progressChanged()\r\n {\r\n foreground.ResizeWidthTo((float)progress.Value, progress.Value > 0 ? BeatmapCard.TRANSITION_DURATION : 0, Easing.OutQuint);\r\n }\r\n }\r\n}\r\n</code>", "source": "SynthCodeNetNoImageTag", "user": "Convert code to text." } ]
[ { "assistant": "<loc_0><loc_0><loc_500><loc_500><_C++_>*/\n\n#include \"hphp/runtime/debugger/cmd/cmd_signal.h\"\n\n#include \"hphp/runtime/debugger/debugger_client.h\"\n\nnamespace HPHP { namespace Eval {\n///////////////////////////////////////////////////////////////////////////////\n\nTRACE_SET_MOD(debugger);\n\nvoid CmdSignal::sendImpl(DebuggerThriftBuffer &thrift) {\n DebuggerCommand::sendImpl(thrift);\n thrift.write(m_signum);\n}\n\nvoid CmdSignal::recvImpl(DebuggerThriftBuffer &thrift) {\n DebuggerCommand::recvImpl(thrift);\n thrift.read(m_signum);\n}\n\nvoid CmdSignal::onClient(DebuggerClient &client) {\n m_signum = client.pollSignal();\n client.sendToServer(this);\n}\n\nbool CmdSignal::onServer(DebuggerProxy &proxy) {\n return proxy.sendToClient(this);\n}\n\n///////////////////////////////////////////////////////////////////////////////\n}}\n</code>", "source": "SynthCodeNetNoImageTag", "user": "<code>" } ]
[ { "assistant": "<loc_0><loc_0><loc_500><loc_500><_Nim_>import\n unittest, os,\n stew/shims/net,\n chronos, confutils,\n ../beacon_chain/[conf, eth2_network]\n\ntemplate asyncTest*(name, body: untyped) =\n timedTest name:\n proc scenario {.async.} = body\n waitFor scenario()\n\nasyncTest \"connect two nodes\":\n let tempDir = getTempDir() / \"peers_test\"\n\n var c1 = BeaconNodeConf.defaults\n c1.dataDir = OutDir(tempDir / \"node-1\")\n c1.tcpPort = 50000\n c1.nat = \"none\"\n\n var n1PersistentAddress = c1.getPersistenBootstrapAddr(\n ValidIpAddress.init(\"127.0.0.1\"), Port c1.tcpPort)\n\n var n1 = createEth2Node(c1, ENRForkID())\n\n echo \"Node 1 persistent address: \", n1PersistentAddress\n\n var n1ActualAddress = await n1.daemon.identity()\n echo \"Node 1 actual address:\", n1ActualAddress\n\n echo \"Press any key to continue\"\n discard stdin.readLine()\n\n var c2 = BeaconNodeConf.defaults\n c2.dataDir = OutDir(tempDir / \"node-2\")\n c2.tcpPort = 50001\n c2.nat = \"none\"\n var n2 = createEth2Node(c2, ENRForkID())\n\n await n2.startLookingForPeers(@[n1PersistentAddress])\n\n</code>", "source": "SynthCodeNetNoImageTag", "user": "<code>" } ]
[ { "assistant": "<loc_0><loc_0><loc_500><loc_500><_C++_>#include <iostream>\n#include <cstdio>\n#include <vector>\n#include <algorithm>\n#include <map>\n#include <set>\n#include <vector>\n#include <queue>\n#include <cmath>\n#include <bitset>\n#include <cstdlib>\nusing namespace std;\ntypedef long long LL;\ntypedef pair<int,int> PII;\nconst int INF=0x3f3f3f3f;\nconst int MAXN=1e5+5;\nint t[MAXN],m[MAXN];\n\nint main()\n{\n int x,n;\n while(scanf(\"%d%d\",&x,&n)!=EOF)\n {\n vector<PII> events;\n int tmp;\n for(int i=0;i<n;i++)\n {\n scanf(\"%d\",&tmp);\n events.emplace_back(tmp,-1);\n }\n int q; scanf(\"%d\",&q);\n for(int i=0;i<q;i++)\n {\n scanf(\"%d%d\",&t[i],&m[i]);\n events.emplace_back(t[i],i);\n }\n sort(events.begin(),events.end());\n int dir=-1,a=0,ya=0,b=x,yb=x,t0=0;\n for(auto event:events)\n {\n int t=event.first;\n if(t0<t)\n {\n int dt=t-t0;\n if(dir==-1)\n {\n if(ya>=dt)\n {\n ya-=dt;\n yb-=dt;\n }else if(yb<dt)\n {\n a=ya=b=yb=0;\n }else\n {\n a+=dt-ya;\n ya=0;\n yb-=dt;\n }\n }else\n {\n if(yb+dt<=x)\n {\n ya+=dt;\n yb+=dt;\n }else if(ya+dt>x)\n {\n a=b=0;\n ya=yb=x;\n }else\n {\n b-=(dt-x+yb);\n yb=x;\n ya+=dt;\n }\n }\n }\n t0=t;\n int id=event.second;\n if(id!=-1)\n {\n if(m[id]<a) printf(\"%d\\n\",ya);\n else if(m[id]>b) printf(\"%d\\n\",yb);\n else printf(\"%d\\n\",ya+m[id]-a);\n }else\n {\n dir*=(-1);\n }\n }\n }\n return 0;\n}</code>", "source": "SynthCodeNetNoImageTag", "user": "<code>" } ]
[ { "assistant": "<code><loc_0><loc_0><loc_500><loc_500><_Go_>package main\n\nimport (\n\t\"bufio\"\n\t\"fmt\"\n\t\"log\"\n\t\"os\"\n\t\"strconv\"\n)\n\n// const abcd = \"abcdefghijklmnopqrstuvwxyz\"\n// const ABCD = \"ABCDEFGHIJKLMNOPQRSTUVWXYZ\"\n\n// var dy = [...]int{1, 1, 0, -1, -1, -1, 0, 1}\n// var dx = [...]int{0, 1, 1, 1, 0, -1, -1, -1}\n\n// var dx = [...]int{0, 1, 0, -1}\n// var dy = [...]int{1, 0, -1, 0}\n\nvar inf int = 1e13\nvar mod = 1000000007\n\n// ---------------------------------------------------------\nfunc main() {\n\tlog.SetFlags(log.Lshortfile)\n\tnext := newScanner()\n\tN := next.Int()\n\tt := next.Ints(N)\n\tv := next.Ints(N)\n\tT := sum(t)\n\tub := make([]int, T*2+1)\n\tfor i := 0; i < T*2+1; i++ {\n\t\tub[i] = inf\n\t}\n\tx := 0\n\tfor i := 0; i < N; i++ {\n\t\tfor y := 0; y < t[i]; y++ {\n\t\t\tub[x] = min(ub[x], v[i]*2)\n\t\t\tub[x+1] = min(ub[x+1], v[i]*2)\n\t\t\tub[x+2] = min(ub[x+2], v[i]*2)\n\t\t\tx += 2\n\t\t}\n\t}\n\tub[0] = 0\n\tub[T*2] = 0\n\tfor x := 0; x < T*2; x++ {\n\t\tub[x+1] = min(ub[x+1], ub[x]+1)\n\t}\n\tfor x := T * 2; x > 0; x-- {\n\t\tub[x-1] = min(ub[x-1], ub[x]+1)\n\t}\n\tans := 0.0\n\tfor x := 0; x < T*2; x++ {\n\t\tans += float64(ub[x]+ub[x+1]) / 2.0\n\t}\n\tfmt.Println(ans / 4)\n}\n\n// ---------------------------------------------------------\n\n// Pair is liked C++ pair\ntype Pair struct {\n\ta, b int\n}\n\n// Pairs is sorted by []Pair struct\ntype Pairs []Pair\n\nfunc (p Pairs) Len() int {\n\treturn len(p)\n}\nfunc (p Pairs) Swap(i, j int) {\n\tp[i], p[j] = p[j], p[i]\n}\n\nfunc (p Pairs) Less(i, j int) bool {\n\tif p[i].a < p[j].a {\n\t\treturn true\n\t} else if p[i].a == p[j].a {\n\t\treturn p[i].b < p[j].b\n\t}\n\treturn false\n}\n\n// -------------------------------\nfunc in(c, a, z int) bool {\n\treturn c >= a && c < z\n}\n\nfunc btoi(b bool) int {\n\tif b {\n\t\treturn 1\n\t}\n\treturn 0\n}\n\nfunc itob(a int) bool {\n\tif a == 0 {\n\t\treturn false\n\t}\n\treturn true\n}\n\nfunc max(a ...int) int {\n\tr := a[0]\n\tfor i := 0; i < len(a); i++ {\n\t\tif r < a[i] {\n\t\t\tr = a[i]\n\t\t}\n\t}\n\treturn r\n}\n\nfunc min(a ...int) int {\n\tr := a[0]\n\tfor i := 0; i < len(a); i++ {\n\t\tif r > a[i] {\n\t\t\tr = a[i]\n\t\t}\n\t}\n\treturn r\n}\n\nfunc sum(a []int) int {\n\tr := 0\n\tfor i := 0; i < len(a); i++ {\n\t\tr += a[i]\n\t}\n\treturn r\n}\n\nfunc pro(a []int) int {\n\tr := 1\n\tfor i := 0; i < len(a); i++ {\n\t\tr *= a[i]\n\t}\n\treturn r\n}\n\nfunc fill(a []int, n int) []int {\n\tfor i := 0; i < len(a); i++ {\n\t\ta[i] = n\n\t}\n\treturn a\n}\n\nfunc minmax(a, b int) (int, int) {\n\tif a > b {\n\t\treturn b, a\n\t}\n\treturn a, b\n}\n\nfunc abs(a int) int {\n\tif a < 0 {\n\t\treturn -a\n\t}\n\treturn a\n}\n\n// ---------- buffered scanner -----------------------------------------\ntype scanner struct {\n\tr *bufio.Reader\n\tbuf []byte\n\tp int\n}\n\nfunc newScanner() *scanner {\n\trdr := bufio.NewReaderSize(os.Stdin, 10000)\n\treturn &scanner{r: rdr}\n}\nfunc (s *scanner) next() string {\n\ts.pre()\n\tstart := s.p\n\tfor ; s.p < len(s.buf); s.p++ {\n\t\tif s.buf[s.p] == ' ' {\n\t\t\tbreak\n\t\t}\n\t}\n\tresult := string(s.buf[start:s.p])\n\ts.p++\n\treturn result\n}\nfunc (s *scanner) Line() string {\n\ts.pre()\n\tstart := s.p\n\ts.p = len(s.buf)\n\treturn string(s.buf[start:])\n}\nfunc (s *scanner) String() string {\n\treturn s.next()\n}\nfunc (s *scanner) Int() int {\n\tv, _ := strconv.Atoi(s.next())\n\treturn v\n}\nfunc (s *scanner) Ints(n int) []int {\n\tr := make([]int, n)\n\tfor i := 0; i < n; i++ {\n\t\tr[i] = s.Int()\n\t}\n\treturn r\n}\nfunc (s *scanner) Int64() int64 {\n\tv, _ := strconv.ParseInt(s.next(), 10, 64)\n\treturn v\n}\nfunc (s *scanner) pre() {\n\tif s.p >= len(s.buf) {\n\t\ts.readLine()\n\t\ts.p = 0\n\t}\n}\nfunc (s *scanner) readLine() {\n\ts.buf = make([]byte, 0)\n\tfor {\n\t\tl, p, e := s.r.ReadLine()\n\t\tif e != nil {\n\t\t\tpanic(e)\n\t\t}\n\t\ts.buf = append(s.buf, l...)\n\t\tif !p {\n\t\t\tbreak\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><_YAML_>networks:\n hyperledger:\n\nservices:\n explorer:\n image: lihongyong/docker-blockchain-explorer\n container_name: explorer\n restart: always\n volumes:\n - ./explorer-artifacts/pgconfig.json:/blockchain-explorer/app/persistence/postgreSQL/db/pgconfig.json\n - ./explorer-artifacts/config.json:/blockchain-explorer/app/platform/fabric/config.json\n - ./crypto-config:/blockchain-explorer/crypto-config\n - ./fabric-$ARCH:/blockchain-explorer/fabric-path\n ports:\n - \"8088:8080\"\n command: bash -c 'sleep 30; node main.js'\n networks:\n - hyperledger\n \n postgresql:\n image: postgres\n restart: always\n container_name: postgresql\n environment:\n - POSTGRES_USER=postgres\n - POSTGRES_PASSWORD=123456\n ports:\n - \"5432:5432\"\n volumes:\n - ./explorer-artifacts/explorerpg.sql:/docker-entrypoint-initdb.d/explorerpg.sql\n - ./explorer-artifacts/updatepg.sql:/docker-entrypoint-initdb.d/updatepg.sql\n networks:\n - hyperledger</code>", "source": "SynthCodeNetNoImageTag", "user": "Convert code to text." } ]
[ { "assistant": "<loc_0><loc_0><loc_500><loc_500><_C_>#include<stdio.h>\nint main(){\n char s[110];\n int k,i=0;\n scanf(\"%s%d\",s,&k);\n while(s[i]=='1'&&i<k-1){\n i++;\n }\n printf(\"%c\\n\",s[i]);\n return 0;\n}\n</code>", "source": "SynthCodeNetNoImageTag", "user": "<code>" } ]
[ { "assistant": "<code><loc_0><loc_0><loc_500><loc_500><_HTML_><META name=\"description\" content=\"The Crimson Fairy Book, by Andrew Lang, [1903], full text etext at sacred-texts.com\">\n<META name=\"keywords\" content=\"Colored Fairy Books Crimson Fairy Tales Folklore Folk lore Children Literature\">\n<TITLE>The Crimson Fairy Book: The Language of Beasts</TITLE>\n</HEAD>\n<BODY>\n<CENTER>\n<div class=\"filenav\">\n<A HREF=\"../../../cdshop/index.htm\"><IMG SRC=\"../../../cdshop/cdinfo.jpg\" BORDER=\"0\"></A><BR>\n<A HREF=\"../../../index.htm\">Sacred Texts</A>&nbsp;\n<A HREF=\"../../index.htm\">Legends and Sagas</A>&nbsp;\n<A HREF=\"../index.htm\">Lang Fairy Books</A>&nbsp;\n<A HREF=\"index.htm\">Index</A>&nbsp;\n<A HREF=\"crfb07.htm\">Previous</A>&nbsp;\n<A HREF=\"crfb09.htm\">Next</A>&nbsp;\n</CENTER>\n</div>\n<HR>\n<P ALIGN=\"CENTER\"><FONT SIZE=\"-1\" COLOR=\"GREEN\"><I>The Crimson Fairy Book</I>, by Andrew Lang, [1903], at sacred-texts.com</FONT></P><HR></p> \n<p><A NAME=\"an_f06\"></A></p> \n<p align=\"center\">The Language of Beasts</p> \n<p>Once upon a time a man had a shepherd who served him many years faithfully and honestly. One day, whilst herding his flock, this shepherd heard a hissing sound, coming out of the forest near by, which he could not account for. So he went into the wood in the direction of the noise to try to discover the cause. When he approached the place he found that the dry grass and leaves were on fire, and on a tree, surrounded by flames, a snake was coiled, hissing with terror.</p> \n<p>The shepherd stood wondering how the poor snake could escape, for the wind was blowing the flames that way, and soon that tree would be burning like the rest. Suddenly the snake cried: 'O shepherd! for the love of heaven save me from this fire!'</p> \n<p>Then the shepherd stretched his staff out over the flames and the snake wound itself round the staff and up to his hand, and from his hand it crept up his arm, and twined itself about his neck. The shepherd trembled with fright, expecting every instant to be stung to death, and said: 'What an unlucky man I am! Did I rescue you only to be destroyed myself?' But the snake answered: 'Have no fear; only carry me home to my father who is the King of the Snakes.' The shepherd, however, was much too frightened to listen, and said that he could not go away and leave his flock alone; but the snake said: 'You need not be afraid to leave your flock, no evil shall befall them; but make all the haste you can.'</p> \n<p>So he set off through the wood carrying the snake, and after a time he came to a great gateway, made entirely of snakes intertwined one with another. The shepherd stood still with surprise, but the snake round his neck whistled, and immediately all the arch unwound itself.</p> \n<p>'When we are come to my father's house,' said his own snake to him, 'he will reward you with anything you like to ask&#8212;silver, gold, jewels, or whatever on this earth is most precious; but take none of all these things, ask rather to understand the language of beasts. He will refuse it to you a long time, but in the end he will grant it to you.'</p> \n<p>Soon after that they arrived at the house of the King of the Snakes, who burst into tears of joy at the sight of his daughter, as he had given her up for dead. 'Where have you been all this time?' he asked, directly he could speak, and she told him that she had been caught in a forest fire, and had been rescued from the flames by the shepherd. The King of the Snakes, then turning to the shepherd, said to him: 'What reward will you choose for saving my child?'</p> \n<p>'Make me to know the language of beasts,' answered the shepherd, 'that is all I desire.'</p> </code>", "source": "SynthCodeNetNoImageTag", "user": "Convert code to text." } ]
[ { "assistant": "<loc_0><loc_0><loc_500><loc_500><_Scala_>package au.id.tmm.probability.distribution.exhaustive\n\nimport au.id.tmm.probability.distribution.ProbabilityDistributionTypeclass\nimport au.id.tmm.probability.distribution.exhaustive.ProbabilityDistribution.ProbabilityDistributionBuilder\nimport au.id.tmm.probability.rational.RationalProbability\nimport com.github.ghik.silencer.silent\nimport spire.math.Rational\n\nimport scala.collection.mutable\n\nprivate[exhaustive] object ExhaustiveProbabilityDistributionInstance\n extends ProbabilityDistributionTypeclass[ProbabilityDistribution] {\n override def always[A](a: A): ProbabilityDistribution[A] = ProbabilityDistribution.Always(a)\n\n //noinspection ScalaDeprecation\n @silent(\"deprecated\")\n override def tailRecM[A, B](a: A)(f: A => ProbabilityDistribution[Either[A, B]]): ProbabilityDistribution[B] = {\n val builder: ProbabilityDistributionBuilder[B] = new ProbabilityDistributionBuilder[B]\n\n val workingStack = mutable.Stack[(Either[A, B], RationalProbability)](f(a).asMap.toSeq: _*)\n\n while (workingStack.nonEmpty) {\n workingStack.pop() match {\n case (Right(b), probability) => builder addOne (b -> probability)\n case (Left(a), probability) => {\n val subBranch = f(a).asMap.mapValues(_ * probability)\n\n workingStack.pushAll(subBranch)\n }\n }\n }\n\n builder.result().getOrElse(throw new AssertionError)\n }\n\n override def flatMap[A, B](\n aDistribution: ProbabilityDistribution[A],\n )(\n f: A => ProbabilityDistribution[B],\n ): ProbabilityDistribution[B] =\n aDistribution.flatMap(f)\n\n override def map[A, B](aDistribution: ProbabilityDistribution[A])(f: A => B): ProbabilityDistribution[B] =\n aDistribution.map(f)\n\n override def product[A, B](\n aDistribution: ProbabilityDistribution[A],\n bDistribution: ProbabilityDistribution[B],\n ): ProbabilityDistribution[(A, B)] =\n aDistribution * bDistribution\n\n // TODO this needs test coverage\n override def fromWeights[A, N : Numeric](weightsPerElement: Seq[(A, N)]): Option[ProbabilityDistribution[A]] = {\n if (weightsPerElement.isEmpty) return None\n if (weightsPerElement.size == 1) return Some(ProbabilityDistribution.Always(weightsPerElement.head._1))\n\n val totalWeight = weightsPerElement.foldLeft(Numeric[N].zero) {\n case (acc, (a, weight)) => Numeric[N].plus(acc, weight)\n }\n\n val rationalProbabilitiesPerOutcome: Seq[(A, RationalProbability)] = totalWeight match {\n case totalWeight: Int =>\n weightsPerElement.map {\n case (a, weight) => a -> RationalProbability.makeUnsafe(Rational(weight.asInstanceOf[Int], totalWeight))\n }\n case totalWeight: Long =>\n weightsPerElement.map {\n case (a, weight) => a -> RationalProbability.makeUnsafe(Rational(weight.asInstanceOf[Long], totalWeight))\n }\n case totalWeight: Rational =>\n weightsPerElement.map {\n case (a, weight) => a -> RationalProbability.makeUnsafe(weight.asInstanceOf[Rational] / totalWeight)\n }\n case _ =>\n val totalWeightAsDouble = Numeric[N].toDouble(totalWeight)\n\n weightsPerElement.map {\n case (a, weight) =>\n a -> RationalProbability.makeUnsafe(Rational(Numeric[N].toDouble(weight) / totalWeightAsDouble))\n }\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<meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\">\n<title>Uses of Class org.apache.hadoop.hbase.io.FSDataInputStreamWrapper (Apache HBase 1.2.12 API)</title>\n<link rel=\"stylesheet\" type=\"text/css\" href=\"../../../../../../stylesheet.css\" title=\"Style\">\n</head>\n<body>\n<script type=\"text/javascript\"><!--\n try {\n if (location.href.indexOf('is-external=true') == -1) {\n parent.document.title=\"Uses of Class org.apache.hadoop.hbase.io.FSDataInputStreamWrapper (Apache HBase 1.2.12 API)\";\n }\n }\n catch(err) {\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>\n<li><a href=\"../package-summary.html\">Package</a></li>\n<li><a href=\"../../../../../../org/apache/hadoop/hbase/io/FSDataInputStreamWrapper.html\" title=\"class in org.apache.hadoop.hbase.io\">Class</a></li>\n<li class=\"navBarCell1Rev\">Use</li>\n<li><a href=\"../../../../../../overview-tree.html\">Tree</a></li>\n<li><a href=\"../../../../../../deprecated-list.html\">Deprecated</a></li>\n<li><a href=\"../../../../../../index-all.html\">Index</a></li>\n<li><a href=\"../../../../../../help-doc.html\">Help</a></li>\n</ul>\n</div>\n<div class=\"subNav\">\n<ul class=\"navList\">\n<li>Prev</li>\n<li>Next</li>\n</ul>\n<ul class=\"navList\">\n<li><a href=\"../../../../../../index.html?org/apache/hadoop/hbase/io/class-use/FSDataInputStreamWrapper.html\" target=\"_top\">Frames</a></li>\n<li><a href=\"FSDataInputStreamWrapper.html\" target=\"_top\">No Frames</a></li>\n</ul>\n<ul class=\"navList\" id=\"allclasses_navbar_top\">\n<li><a href=\"../../../../../../allclasses-noframe.html\">All Classes</a></li>\n</ul>\n<div>\n<script type=\"text/javascript\"><!--\n allClassesLink = document.getElementById(\"allclasses_navbar_top\");\n if(window==top) {\n allClassesLink.style.display = \"block\";\n }\n else {\n allClassesLink.style.display = \"none\";\n }\n //-->\n</script>\n</div>\n<a name=\"skip-navbar_top\">\n<!-- -->\n</a></div>\n<!-- ========= END OF TOP NAVBAR ========= -->\n<div class=\"header\">\n<h2 title=\"Uses of Class org.apache.hadoop.hbase.io.FSDataInputStreamWrapper\" class=\"title\">Uses of Class<br>org.apache.hadoop.hbase.io.FSDataInputStreamWrapper</h2>\n</div>\n<div class=\"classUseContainer\">\n<ul class=\"blockList\">\n<li class=\"blockList\">\n<table border=\"0\" cellpadding=\"3\" cellspacing=\"0\" summary=\"Use table, listing packages, and an explanation\">\n<caption><span>Packages that use <a href=\"../../../../../../org/apache/hadoop/hbase/io/FSDataInputStreamWrapper.html\" title=\"class in org.apache.hadoop.hbase.io\">FSDataInputStreamWrapper</a></span><span class=\"tabEnd\">&nbsp;</span></caption>\n<tr>\n<th class=\"colFirst\" scope=\"col\">Package</th>\n<th class=\"colLast\" scope=\"col\">Description</th>\n</tr>\n<tbody>\n<tr class=\"altColor\">\n<td class=\"colFirst\"><a href=\"#org.apache.hadoop.hbase.coprocessor\">org.apache.hadoop.hbase.coprocessor</a></td>\n<td class=\"colLast\">\n<div class=\"block\">Table of Contents</div>\n</td>\n</tr>\n<tr class=\"rowColor\">\n<td class=\"colFirst\"><a href=\"#org.apache.hadoop.hbase.io\">org.apache.hadoop.hbase.io</a></td>\n<td class=\"colLast\">&nbsp;</td>\n</tr>\n<tr class=\"altColor\">\n<td class=\"colFirst\"><a href=\"#org.apache.hadoop.hbase.io.hfile\">org.apache.hadoop.hbase.io.hfile</a></td>\n<td class=\"colLast\">\n<div class=\"block\">Provides implementations of <a href=\"../../../../../../org/apache/hadoop/hbase/io/hfile/HFile.html\" title=\"class in org.apache.hadoop.hbase.io.hfile\"><code>HFile</code></a> and HFile\n <a href=\"../../../../../../org/apache/hadoop/hbase/io/hfile/BlockCache.html\" title=\"interface in org.apache.hadoop.hbase.io.hfile\"><code>BlockCache</code></a>.</div>\n</td>\n</tr>\n<tr class=\"rowColor\">\n<td class=\"colFirst\"><a href=\"#org.apache.hadoop.hbase.regionserver\">org.apache.hadoop.hbase.regionserver</a></td>\n<td class=\"colLast\">&nbsp;</td>\n</tr>\n</tbody>\n</table>\n</li>\n<li class=\"blockList\">\n<ul class=\"blockList\">\n<li class=\"blockList\"><a name=\"org.apache.hadoop.hbase.coprocessor\">\n<!-- -->\n</a>\n<h3>Uses of <a href=\"../../../../../../org/apache/hadoop/hbase/io/FSDataInputStreamWrapper.html\" title=\"class in org.apache.hadoop.hbase.io\">FSDataInputStreamWrapper</a> in <a href=\"../../../../../../org/apache/hadoop/hbase/coprocessor/package-summary.html\">org.apache.hadoop.hbase.coprocessor</a></h3>\n<table border=\"0\" cellpadding=\"3\" cellspacing=\"0\" summary=\"Use table, listing methods, and an explanation\">\n<caption><span>Methods in <a href=\"../../../../../../org/apache/hadoop/hbase/coprocessor/package-summary.html\">org.apache.hadoop.hbase.coprocessor</a> with parameters of type <a href=\"../../../../../../org/apache/hadoop/hbase/io/FSDataInputStreamWrapper.html\" title=\"class in org.apache.hadoop.hbase.io\">FSDataInputStreamWrapper</a></span><span class=\"tabEnd\">&nbsp;</span></caption>\n<tr>\n<th class=\"colFirst\" scope=\"col\">Modifier and Type</th>\n<th class=\"colLast\" scope=\"col\">Method and Description</th>\n</tr>\n<tbody>\n<tr class=\"altColor\">\n<td class=\"colFirst\"><code><a href=\"../../../../../../org/apache/hadoop/hbase/regionserver/StoreFile.Reader.html\" title=\"class in org.apache.hadoop.hbase.regionserver\">StoreFile.Reader</a></code></td></code>", "source": "SynthCodeNetNoImageTag", "user": "Convert code to text." } ]
[ { "assistant": "<code><loc_0><loc_0><loc_500><loc_500><_C_>#if defined(LV_LVGL_H_INCLUDE_SIMPLE)\n#include \"lvgl.h\"\n#else\n#include \"lvgl/lvgl.h\"\n#endif\n\n\n#ifndef LV_ATTRIBUTE_MEM_ALIGN\n#define LV_ATTRIBUTE_MEM_ALIGN\n#endif\n\n#ifndef LV_ATTRIBUTE_IMG_TIME2\n#define LV_ATTRIBUTE_IMG_TIME2\n#endif\n\nconst LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_TIME2 uint8_t time2_map[] = {\n 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, </code>", "source": "SynthCodeNetNoImageTag", "user": "Convert code to text." } ]
[ { "assistant": "<code><loc_0><loc_0><loc_500><loc_500><_Python_>\t(2, 2, 2, 1, 1, 1, 1, 1, 1, 0, 1, 0, 0, 2, 2, 2, 1, 1, 1, 1, 1, 0, 1, 0, 0, 0), # 25\n\t(2, 2, 1, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0, 2, 2, 1, 1, 2, 1, 1, 0, 1, 0, 0, 1, 0), # 26\n\t(2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 0, 0, 0, 2, 2, 1, 1, 2, 1, 1, 1, 1, 1, 1, 0, 0), # 27\n\t(2, 2, 2, 2, 2, 0, 1, 0, 0, 0, 0, 0, 0, 2, 1, 2, 1, 1, 1, 1, 0, 1, 1, 0, 0, 0), # 28\n\t(2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 0, 2, 2, 1, 2, 2, 1, 1, 1, 0, 0, 0, 0, 0), # 29\n\t(2, 2, 1, 2, 2, 1, 0, 1, 1, 0, 0, 0, 0, 2, 2, 2, 1, 1, 1, 0, 0, 1, 1, 1, 0, 0), # 30\n\t(2, 2, 2, 2, 1, 1, 1, 1, 1, 0, 0, 0, 0, 2, 2, 1, 1, 2, 1, 1, 1, 1, 1, 0, 1, 0), # 31\n\t(2, 2, 2, 1, 2, 0, 1, 0, 1, 1, 0, 0, 0, 2, 2, 1, 1, 2, 1, 1, 0, 1, 0, 0, 0, 0), # 32\n\t(2, 2, 2, 2, 1, 1, 1, 1, 0, 0, 1, 0, 0, 2, 1, 2, 1, 1, 1, 1, 1, 0, 1, 1, 0, 0), # 33\n\t(2, 2, 1, 2, 2, 1, 1, 1, 1, 1, 0, 0, 0, 2, 2, 1, 2, 2, 1, 1, 0, 1, 0, 0, 0, 0), # 34\n\t(2, 2, 2, 2, 1, 1, 0, 1, 1, 0, 0, 1, 0, 2, 2, 2, 1, 1, 1, 0, 1, 1, 1, 0, 0, 0), # 35\n\t(2, 2, 2, 2, 2, 0, 1, 0, 1, 0, 1, 0, 0, 2, 2, 1, 1, 2, 1, 1, 0, 1, 1, 1, 0, 0), # 36\n\t(2, 2, 1, 2, 1, 1, 1, 1, 1, 1, 0, 0, 0, 2, 1, 1, 1, 2, 1, 1, 1, 0, 0, 0, 1, 0), # 37\n\t(2, 2, 2, 2, 2, 1, 1, 1, 0, 0, 0, 0, 0, 2, 2, 2, 1, 1, 2, 1, 0, 1, 1, 0, 0, 0), # 38\n\t(2, 2, 2, 1, 1, 0, 1, 1, 1, 0, 0, 0, 0, 2, 2, 1, 1, 2, 1, 1, 1, 1, 0, 1, 0, 0), # 39\n\t(3, 2, 2, 2, 2, 1, 1, 0, 1, 1, 1, 0, 0, 3, 2, 1, 1, 2, 1, 1, 1, 1, 1, 0, 0, 0), # 40\n\t(2, 2, 1, 2, 1, 1, 0, 1, 1, 0, 0, 1, 0, 2, 1, 2, 2, 1, 1, 0, 0, 0, 1, 0, 0, 0), # 41\n\t(2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 0, 0, 0, 2, 2, 1, 1, 2, 1, 1, 1, 1, 0, 1, 1, 0), # 42\n\t(2, 2, 2, 2, 1, 0, 1, 1, 0, 0, 1, 0, 0, 2, 2, 2, 1, 1, 1, 1, 0, 1, 1, 0, 0, 0), # 43\n\t(2, 2, 1, 2, 2, 1, 1, 0, 1, 0, 0, 0, 0, 2, 2, 1, 1, 2, 1, 1, 1, 1, 1, 0, 0, 0), # 44\n\t(2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 2, 2, 1, 1, 2, 1, 1, 0, 0, 0, 1, 0, 0), # 45</code>", "source": "SynthCodeNetNoImageTag", "user": "Convert code to text." } ]
[ { "assistant": "<loc_0><loc_0><loc_500><loc_500><_Ruby_>#!/usr/bin/env puppet\n\nhome = ENV[\"HOME\"]\n#cwd = File.dirname(__FILE__)\nDir.chdir(\"#{home}/dotfiles\")\nlinkables = Dir.glob('*/**{.symlink}')\n\ncwd = Dir.getwd\n\nnode :default do\n linkables.each do |linkable|\n shorname = linkable.split('/').last.split('.symlink').last\n target = \"#{ENV[\"HOME\"]}/.#{shorname}\"\n source = \"#{cwd}/#{linkable}\"\n file target,\n :ensure => source\n end\n\n file \"#{home}/.config/awesome\",\n :ensure => \"#{cwd}/X/awesome\"\n\n file home,\n :mode => '0700'\n\nend\n\n</code>", "source": "SynthCodeNetNoImageTag", "user": "<code>" } ]
[ { "assistant": "<loc_0><loc_0><loc_500><loc_500><_CSS_>\n.ss-custom-select::after {\n border-bottom: 2px solid #000000;\n border-right: 2px solid #000000;\n content: \"\";\n display: block;\n height: 8px;\n width: 8px;\n margin-top: -7px;\n pointer-events: none;\n position: absolute;\n right: 2.4rem;\n top: 50%;\n transition: all 0.15s ease-in-out;\n -webkit-transform-origin: 66% 66%;\n transform-origin: 66% 66%;\n -webkit-transform: rotate(45deg);\n transform: rotate(45deg);\n}\n\ntextarea {\n min-height: 25.6rem;\n}\n\ninput[type=\"email\"]:focus,\ninput[type=\"number\"]:focus,\ninput[type=\"search\"]:focus,\ninput[type=\"text\"]:focus,\ninput[type=\"tel\"]:focus,\ninput[type=\"url\"]:focus,\ninput[type=\"password\"]:focus,\ntextarea:focus,\nselect:focus {\n color: #000000;\n border-bottom: 1px solid #000000;\n}\n\nlabel,\nlegend {\n font-family: \"Heebo\", sans-serif;\n font-weight: 700;\n font-size: 1.4rem;\n margin-bottom: 0.8rem;\n line-height: 1.714;\n color: #000000;\n display: block;\n}\n\ninput[type=\"checkbox\"],\ninput[type=\"radio\"] {\n display: inline;\n}\n\nlabel > .label-text {\n display: inline-block;\n margin-left: 1rem;\n font-family: \"IBM Plex Sans\", sans-serif;\n line-height: inherit;\n}\n\nlabel > input[type=\"checkbox\"],\nlabel > input[type=\"radio\"] {\n margin: 0;\n position: relative;\n top: 0.2rem;\n}\n\n/* ------------------------------------------------------------------- \n * ## Style Placeholder Text\n * ------------------------------------------------------------------- */\n::-webkit-input-placeholder {\n\n /* WebKit, Blink, Edge */\n color: #8c8c8c;\n}\n\n:-moz-placeholder {\n\n /* Mozilla Firefox 4 to 18 */\n color: #8c8c8c;\n opacity: 1;\n}\n\n::-moz-placeholder {\n\n /* Mozilla Firefox 19+ */\n color: #8c8c8c;\n opacity: 1;\n}\n\n:-ms-input-placeholder {\n\n /* Internet Explorer 10-11 */\n color: #8c8c8c;\n}\n\n::-ms-input-placeholder {\n\n /* Microsoft Edge */\n color: #8c8c8c;\n}\n\n::placeholder {\n\n /* Most modern browsers support this now. */\n color: #8c8c8c;\n}\n\n.placeholder {\n color: #8c8c8c !important;\n}\n\n/* ------------------------------------------------------------------- \n * ## Change Autocomplete styles in Chrome\n * ------------------------------------------------------------------- */\ninput:-webkit-autofill,\ninput:-webkit-autofill:hover,\ninput:-webkit-autofill:focus input:-webkit-autofill,\ntextarea:-webkit-autofill,\ntextarea:-webkit-autofill:hover textarea:-webkit-autofill:focus,\nselect:-webkit-autofill,\nselect:-webkit-autofill:hover,\nselect:-webkit-autofill:focus {\n -webkit-text-fill-color: #33998a;</code>", "source": "SynthCodeNetNoImageTag", "user": "<code>" } ]
[ { "assistant": "<code><loc_0><loc_0><loc_500><loc_500><_Python_>s = input().lower()\nn = 0\nwhile True:\n q = []\n q = input().split()\n if q == [\"END_OF_TEXT\"]:\n break\n\n for i in q:\n i = i.lower()\n if s == i:\n n += 1\nprint(n)</code>", "source": "SynthCodeNetNoImageTag", "user": "Convert code to text." } ]
[ { "assistant": "<loc_0><loc_0><loc_500><loc_500><_Python_># -*- coding: utf-8 -*-\n# Part of Odoo. See LICENSE file for full copyright and licensing details.\n\nfrom . import phone_validation\n</code>", "source": "SynthCodeNetNoImageTag", "user": "<code>" } ]
[ { "assistant": "<code><loc_0><loc_0><loc_500><loc_500><_C#_>using System;\nusing System.Linq;\nusing System.Collections.Generic;\nusing System.Diagnostics;\nusing Debug = System.Diagnostics.Trace;\nusing SB = System.Text.StringBuilder;\nusing System.Numerics;\nusing static System.Math;\nnamespace Program {\n\tpublic class Solver {\n\t\tRandom rnd = new Random();\n\t\tpublic void Solve() {\n\t\t\tvar n = ri;\n\t\t\tvar q = ri;\n\t\t\tvar G = Enumerate(n, x => new List<int>());\n\t\t\tvar ft = new int[n - 1];\n\t\t\tvar c = new int[n - 1];\n\t\t\tvar w = new int[n - 1];\n\t\t\tvar hl = new HLTree(n);\n\t\t\tfor (int i = 0; i < n - 1; i++) {\n\t\t\t\tvar f = ri - 1;\n\t\t\t\tvar t = ri - 1;\n\t\t\t\tft[i] = f ^ t;\n\t\t\t\tc[i] = ri - 1;\n\t\t\t\tw[i] = ri;\n\t\t\t\tG[f].Add(i); G[t].Add(i);\n\t\t\t\thl.AddEdge(f, t);\n\t\t\t}\n\t\t\thl.Build(0);\n\n\t\t\tvar Q = Enumerate(n, x => new List<KeyValuePair<int, int>>());\n\n\t\t\tvar ans = new int[q];\n\t\t\tvar C = new int[q];\n\t\t\tvar D = new int[q];\n\t\t\tfor (int i = 0; i < q; i++) {\n\t\t\t\tC[i] = ri - 1;\n\t\t\t\tD[i] = ri;\n\t\t\t\tvar f = ri - 1;\n\t\t\t\tvar t = ri - 1;\n\t\t\t\tvar lca = hl.GetLCA(f, t);\n\t\t\t\tQ[f].Add(new KeyValuePair<int, int>(i, 1));\n\t\t\t\tQ[t].Add(new KeyValuePair<int, int>(i, 1));\n\t\t\t\tQ[lca].Add(new KeyValuePair<int, int>(i, -2));\n\t\t\t}\n\t\t\tAction<int, int, int[], int[], int> dfs = null;\n\t\t\tdfs = (prev, cur, cnt, sum, d) => {\n\t\t\t\tforeach (var query in Q[cur]) {\n\t\t\t\t\tvar id = query.Key;\n\t\t\t\t\tvar coef = query.Value;\n\t\t\t\t\tans[id] += coef * (d + D[id] * cnt[C[id]] - sum[C[id]]);\n\t\t\t\t}\n\t\t\t\tforeach (var i in G[cur]) {\n\t\t\t\t\tvar to = ft[i] ^ cur;\n\t\t\t\t\tif (prev == to) continue;\n\t\t\t\t\tcnt[c[i]]++;\n\t\t\t\t\tsum[c[i]] += w[i];\n\t\t\t\t\td += w[i];\n\t\t\t\t\tdfs(cur, to, cnt, sum, d);\n\t\t\t\t\td -= w[i];\n\t\t\t\t\tsum[c[i]] -= w[i];\n\t\t\t\t\tcnt[c[i]]--;\n\t\t\t\t}\n\t\t\t};\n\t\t\tdfs(-1, 0, new int[n - 1], new int[n - 1], 0);\n\t\t\tforeach (var x in ans)\n\t\t\t\tConsole.WriteLine(x);\n\t\t}\n\n\t\tconst long INF = 1L << 60;\n\t\tstatic int[] dx = { -1, 0, 1, 0 };\n\t\tstatic int[] dy = { 0, 1, 0, -1 };\n\t\tint ri { get { return sc.Integer(); } }\n\t\tlong rl { get { return sc.Long(); } }\n\t\tdouble rd { get { return sc.Double(); } }\n\t\tstring rs { get { return sc.Scan(); } }\n\t\tpublic IO.StreamScanner sc = new IO.StreamScanner(Console.OpenStandardInput());\n\n\t\tstatic T[] Enumerate<T>(int n, Func<int, T> f) {\n\t\t\tvar a = new T[n];\n\t\t\tfor (int i = 0; i < a.Length; ++i) a[i] = f(i);\n\t\t\treturn a;\n\t\t}\n\t\tstatic public void Swap<T>(ref T a, ref T b) { var tmp = a; a = b; b = tmp; }\n\t}\n}\n\n#region main\nstatic class Ex {\n\tstatic public void Main() {\n\t\tConsole.SetOut(new Program.IO.Printer(Console.OpenStandardOutput()) { AutoFlush = true });\n\t\tvar solver = new Program.Solver();\n\t\tvar t = new System.Threading.Thread(solver.Solve, 50000000);\n\t\tt.Start();\n\t\tt.Join();\n\t\t// solver.Solve();\n\t\tConsole.Out.Flush();\n\t}\n}\n#endregion\n#region Ex\nnamespace Program.IO {\n\tusing System.IO;\n\tusing System.Text;\n\tusing System.Globalization;\n\n\tpublic class Printer : StreamWriter {\n\t\tpublic override IFormatProvider FormatProvider { get { return CultureInfo.InvariantCulture; } }\n\t\tpublic Printer(Stream stream) : base(stream, new UTF8Encoding(false, true)) { }\n\t}\n\n\tpublic class StreamScanner {\n\t\tpublic StreamScanner(Stream stream) { str = stream; }\n\n\t\tpublic readonly Stream str;\n\t\tprivate readonly byte[] buf = new byte[1024];\n\t\tprivate int len, ptr;\n\t\tpublic bool isEof = false;\n\t\tpublic bool IsEndOfStream { get { return isEof; } }\n\n\t\tprivate byte read() {\n\t\t\tif (isEof) return 0;\n\t\t\tif (ptr >= len) {\n\t\t\t\tptr = 0;\n\t\t\t\tif ((len = str.Read(buf, 0, 1024)) <= 0) {\n\t\t\t\t\tisEof = true;\n\t\t\t\t\treturn 0;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn buf[ptr++];\n\t\t}\n\n\t\tpublic char Char() {\n\t\t\tbyte b = 0;\n\t\t\tdo b = read(); while ((b < 33 || 126 < b) && !isEof);\n\t\t\treturn (char)b;\n\t\t}\n\t\tpublic string Scan() {\n\t\t\tvar sb = new StringBuilder();\n\t\t\tfor (var b = Char(); b >= 33 && b <= 126; b = (char)read()) sb.Append(b);\n\t\t\treturn sb.ToString();\n\t\t}\n\t\tpublic string ScanLine() {\n\t\t\tvar sb = new StringBuilder();\n\t\t\tfor (var b = Char(); b != '\\n' && b != 0; b = (char)read()) if (b != '\\r') sb.Append(b);\n\t\t\treturn sb.ToString();\n\t\t}\n\t\tpublic long Long() { return isEof ? long.MinValue : long.Parse(Scan()); }\n\t\tpublic int Integer() { return isEof ? int.MinValue : int.Parse(Scan()); }\n\t\tpublic double Double() { return isEof ? double.NaN : double.Parse(Scan(), CultureInfo.InvariantCulture); }\n\t}\n}\n\n#endregion\n#region HLTree\npublic class HLTree {\n\tint n;\n\tList<int>[] G;\n\tint[] subtreeSize;\n\tint[] maxsize;\n\tint[] par;\n\tint[] d;\n\n\tChain[] go;\n\tint[] pos;\n\tList<Chain> chains;\n\tpublic HLTree(int N) {\n\t\tn = N;\n\t\tG = new List<int>[n];\n\t\tchains = new List<Chain>();\n\t\tfor (int i = 0; i < n; i++)\n\t\t\tG[i] = new List<int>();\n\t\tsubtreeSize = new int[n];\n\t\tmaxsize = new int[n];\n\t\tpar = new int[n];\n\t\td = new int[n];\n\t\tgo = new Chain[n];\n\t\tpos = new int[n];\n\t}\n\tpublic void AddEdge(int u, int v) {\n\t\tG[u].Add(v); G[v].Add(u);\n\t}\n\tpublic void Build(int root = 0) {\n\t\tcomputeSubtreeSize(root);\n\t\tDecomposite(-1, root, 0);\n\n\t}\n\tvoid computeSubtreeSize(int r) {\n\t\tvar stack = new Stack<int>();\n\t\tstack.Push(r);\n\t\tvar iter = new int[n];\n\t\tpar[r] = -1;\n\t\t//dfs\n\t\twhile (stack.Count > 0) {\n\t\t\tvar cur = stack.Peek();\n\t\t\tif (iter[cur] == G[cur].Count) {\n\t\t\t\tstack.Pop();\n\t\t\t\tsubtreeSize[cur]++;\n\t\t\t\tif (par[cur] != -1) {\n\t\t\t\t\tsubtreeSize[par[cur]] += subtreeSize[cur];\n\t\t\t\t\tmaxsize[par[cur]] = Math.Max(maxsize[par[cur]], subtreeSize[cur]);\n\t\t\t\t}\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tvar next = G[cur][iter[cur]++];\n\t\t\tif (next == par[cur]) continue;\n\t\t\tpar[next] = cur;\n\t\t\td[next] = d[cur] + 1;\n\t\t\tstack.Push(next);\n\t\t}\n\n\t}\n\tvoid Decomposite(int from, int cur, int lv) {\n\t\tvar chain = new Chain(from, lv);\n\t\tchains.Add(chain);\n\t\tchain.Add(cur);\n\t\twhile (cur != from) {\n\t\t\tvar next = cur;\n\t\t\tgo[cur] = chain;\n\t\t\tpos[cur] = chain.Count;\n\t\t\tforeach (var to in G[cur]) {\n\t\t\t\tif (to == from) continue;\n\t\t\t\tif (maxsize[cur] == subtreeSize[to]) {\n\t\t\t\t\tmaxsize[cur] = -1;\n\t\t\t\t\tnext = to;\n\t\t\t\t\tchain.Add(to);\n\t\t\t\t}\n\t\t\t\telse Decomposite(cur, to, lv + 1);\n\t\t\t}\n\n\t\t\tfrom = cur;\n\t\t\tcur = next;\n\n\t\t}\n\t\tchain.Init();\n\n\t}\n\tpublic int GetLCA(int u, int v) {\n\t\twhile (go[u] != go[v]) {\n\t\t\tif (go[u].Level < go[v].Level) v = go[v].From;\n\t\t\telse u = go[u].From;\n\t\t}\n\t\tif (d[u] <= d[v]) return u;\n\t\telse return v;\n\t}\n\n\n}\npublic class Chain {\n\tconst bool DEBUG = true;\n\tpublic int From { get; set; }\n\tpublic int Level { get; set; }\n\tpublic int Count { get; private set; }\n\tList<int> heavy;\n\tpublic Chain(int from, int lv) {\n\t\tFrom = from;\n\t\tLevel = lv;\n\t\theavy = new List<int>();\n\t}\n\tpublic void Add(int v) {\n\t\tif (DEBUG)\n\t\t\theavy.Add(v);\n\t\tCount++;\n\t}\n\tpublic void Init() {\n\n\t}\n}\n#endregion\n</code>", "source": "SynthCodeNetNoImageTag", "user": "Convert code to text." } ]
[ { "assistant": "<code><loc_0><loc_0><loc_500><loc_500><_C#_>using System;\nclass main\n{\n static void Main(string[] args)\n {\n while (true)\n {\n string s = Console.ReadLine();\n\n if (s != null)\n {\n string[] s1 = s.Split(' ');\n int h = int.Parse(s1[0]);\n int w = int.Parse(s1[1]);\n if (h == 0 && w == 0)\n {\n break;\n }\n\n string sw = string.Empty;\n for (int i = 0; i < w; ++i)\n {\n sw += \"#\";\n }\n for (int i = 0; i < h; ++i)\n {\n Console.WriteLine(sw);\n }\n\n Console.WriteLine();\n\n }\n if (s == null)\n {\n break;\n }\n //Console.ReadKey();\n }\n }\n}</code>", "source": "SynthCodeNetNoImageTag", "user": "Convert code to text." } ]
[ { "assistant": "<loc_0><loc_0><loc_500><loc_500><_Ruby_>require 'pact_broker/api/resources/base_resource'\nrequire 'pact_broker/db/clean'\nrequire 'pact_broker/matrix/unresolved_selector'\n\nmodule PactBroker\n module Api\n module Resources\n class Clean < BaseResource\n def content_types_accepted\n [[\"application/json\"]]\n end\n\n def content_types_provided\n [[\"application/hal+json\"]]\n end\n\n def allowed_methods\n [\"POST\", \"OPTIONS\"]\n end\n\n def process_post\n keep_selectors = (params[:keep] || []).collect do | hash |\n PactBroker::Matrix::UnresolvedSelector.new(hash)\n end\n\n result = PactBroker::DB::Clean.call(Sequel::Model.db, { keep: keep_selectors })\n response.body = result.to_json\n end\n\n def policy_name\n :'integrations::clean'\n end\n end\n end\n end\nend\n</code>", "source": "SynthCodeNetNoImageTag", "user": "<code>" } ]
[ { "assistant": "<code><loc_0><loc_0><loc_500><loc_500><_CSS_> height: 40px;\n background-color: #ffffff;\n border: 1px solid transparent;\n border-color: turquoise;\n cursor:pointer;\n transition: all 0.5s ease;\n}\n#submit:hover{\n background: turquoise;\n box-shadow:5px 20px 20px #999999;\n}\n#submit:focus{\n outline: none;\n}\n#header input{\n width: 200px;\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 System.Collections.Generic;\n\nusing E = System.Linq.Enumerable;\n\npublic class Program\n{\n public static void Main()\n {\n var nmst = Console.ReadLine().Split().Select(x => int.Parse(x)).ToArray();\n var n = nmst[0];\n var m = nmst[1];\n var s = nmst[2] - 1;\n var t = nmst[3] - 1;\n var yen = E.Range(0, n).Select(_ => new Dictionary<int, long>()).ToArray();\n var snk = E.Range(0, n).Select(_ => new Dictionary<int, long>()).ToArray();\n for (int i = 0; i < m; i++)\n {\n var uvab = Console.ReadLine().Split().Select(x => int.Parse(x)).ToArray();\n if (uvab[0] == uvab[1])\n {\n continue;\n }\n uvab[0] -= 1;\n uvab[1] -= 1;\n yen[uvab[0]][uvab[1]] = yen[uvab[1]][uvab[0]] = uvab[2];\n snk[uvab[0]][uvab[1]] = snk[uvab[1]][uvab[0]] = uvab[3];\n }\n\n var paths = E.Zip(Dijkstra(n, yen, s), Dijkstra(n, snk, t), (x, y) => x + y).ToArray();\n var min = new long[n];\n min[n - 1] = paths[n - 1];\n for (int i = n - 1; i > 0; i--)\n {\n min[i - 1] = Math.Min(min[i], paths[i - 1]);\n }\n for (int i = 0; i < n; i++)\n {\n Console.WriteLine((long)1e15 - min[i]);\n }\n }\n\n static long[] Dijkstra(int n, Dictionary<int, long>[] edges, int s)\n {\n var pryq = new FibonacciHeap<long, int>();\n for (int i = 0; i < s; i++)\n {\n pryq.Insert(long.MaxValue, i);\n }\n for (int i = s + 1; i < n; i++)\n {\n pryq.Insert(long.MaxValue, i);\n }\n pryq.Insert(0, s);\n\n var d = new long[n];\n for (int i = 0; i < n; i++)\n {\n d[i] = long.MaxValue;\n }\n d[s] = 0;\n\n while (pryq.Size > 0)\n {\n var u = pryq.ExtractMinimum()?.Value ?? -1;\n foreach (var e in edges[u])\n {\n var x = d[u] + e.Value;\n if (d[e.Key] > x)\n {\n d[e.Key] = x;\n pryq.Insert(x, e.Key);\n }\n }\n }\n\n return d;\n }\n}\n\nclass FibonacciHeap<TKey, TValue>\n{\n private LinkedList<Carrier> _trees = new LinkedList<Carrier>();\n private LinkedListNode<Carrier> _peekNode = null;\n\n public int Size { get; private set; } = 0;\n\n public FibonacciHeap()\n {\n }\n\n public void Insert(TKey key, TValue value)\n {\n this.Size++;\n\n var x = new Carrier(key, value);\n if (this._peekNode == null)\n {\n this._peekNode = this._trees.AddFirst(x);\n }\n else\n {\n var t = this._trees.AddBefore(this._peekNode, x);\n var ord = Comparer<TKey>.Default.Compare(this._peekNode.Value.Key, key);\n if (ord > 0)\n {\n this._peekNode = t;\n }\n }\n }\n\n public KeyValuePair<TKey, TValue>? ExtractMinimum()\n {\n if (this._peekNode == null)\n {\n return null;\n }\n\n var kvp = new KeyValuePair<TKey, TValue>(this._peekNode.Value.Key, this._peekNode.Value.Value);\n var point = this._peekNode.Next;\n\n Array.ForEach(this._peekNode.Value.Produce(), x => this._trees.AddBefore(this._peekNode, x));\n this._trees.Remove(this._peekNode);\n\n if (this._trees.Any())\n {\n this.Consolidate(point);\n this.FindMinimum();\n }\n\n this.Size--;\n return kvp;\n }\n\n private void Consolidate(LinkedListNode<Carrier> begin)\n {\n if (begin == null)\n {\n begin = this._trees.First;\n }\n\n var bucket = new LinkedListNode<Carrier>[(int)Math.Ceiling(Math.Log(this.Size, 2)) + 1];\n var current = begin;\n do\n {\n var next = current.Next ?? this._trees.First;\n\n for (int d = current.Value.Degree; bucket[d] != null; d++)\n {\n var child = bucket[d];\n bucket[d] = null;\n\n var ord = Comparer<TKey>.Default.Compare(child.Value.Key, current.Value.Key);\n if (ord < 0)\n {\n var t = child;\n child = current;\n current = t;\n }\n if (child == begin)\n {\n begin = child.Next ?? this._trees.First;\n }\n if (child == next)\n {\n next = child.Next ?? this._trees.First;\n }\n this._trees.Remove(child);\n child.Value.JoinTo(current.Value);\n }\n bucket[current.Value.Degree] = current;\n\n current = next;\n } while (current != begin);\n }\n\n private void FindMinimum()\n {\n this._peekNode = this._trees.First;\n var current = this._trees.First?.Next;\n while (current != null)\n {\n var ord = Comparer<TKey>.Default.Compare(this._peekNode.Value.Key, current.Value.Key);\n if (ord > 0)\n {\n this._peekNode = current;\n }\n current = current.Next;\n }\n }\n\n sealed class Carrier\n {\n public TKey Key { get; }\n public TValue Value { get; }\n private List<Carrier> _children;\n\n public int Degree => this._children.Count;\n\n public Carrier(TKey key, TValue value)\n {\n this.Key = key;\n this.Value = value;\n this._children = new List<Carrier>();\n }\n\n public void JoinTo(Carrier parent) => parent._children.Add(this);\n public void Remove(Carrier child) => this._children.Remove(child);\n public Carrier[] Produce() => this._children.ToArray();\n }\n}</code>", "source": "SynthCodeNetNoImageTag", "user": "<code>" } ]
[ { "assistant": "<loc_0><loc_0><loc_500><loc_500><_TypeScript_>\nimport { Side } from '../core/models/enum/side';\nimport { Position } from '../core/models/position';\nimport { GeometryService, Sector } from './geometry.service';\n\nfdescribe('GeometryService', () => {\n let service: GeometryService;\n\n const R = 5;\n const center: Position = { x: 0.1, y: 0.1 };\n\n const floatingPointPrecisionDigits = 2;\n\n beforeEach(() => {\n service = new GeometryService();\n });\n\n it('should be created', () => {\n expect(service).toBeTruthy();\n });\n\n it('#isInsideSector should calculate that point is inside a sector (right side, 1)', () => {\n const actual = service.isInsideSector({ x: 1, y: 3 }, center, { x: 0, y: 5 }, { x: 3.54, y: 3.54 }, R);\n expect(actual).toBeTrue();\n });\n\n it('#isInsideSector should calculate that point is inside a sector (right side, 2)', () => {\n const actual = service.isInsideSector({ x: 2.41, y: 1.17 }, center, { x: 3.54, y: 3.54 }, { x: 5, y: 0 }, R);\n expect(actual).toBeTrue();\n });\n\n it('#isInsideSector should calculate that point is inside a sector (left side 1)', () => {\n const actual = service.isInsideSector({ x: -3.17, y: 1.39 }, center, { x: -5, y: 0 }, { x: -3.54, y: 3.54 }, R);\n expect(actual).toBeTrue();\n });\n\n it('#isInsideSector should calculate that point is inside a sector (left side 2)', () => {\n const actual = service.isInsideSector({ x: -1.33, y: 3.3 }, center, { x: -3.54, y: 3.54 }, { x: 5, y: 0 }, R);\n expect(actual).toBeTrue();\n });\n\n it('#isInsideSector should calculate that point is not inside a sector (right side 1)', () => {\n const actual = service.isInsideSector({ x: 2.75, y: 4.4 }, center, { x: 0, y: 5 }, { x: 3.54, y: 3.54 }, R);\n expect(actual).toBeFalse();\n });\n\n it('#isInsideSector should calculate that point is not inside a sector (right side 2)', () => {\n const actual = service.isInsideSector({ x: 2.75, y: 4.4 }, center, { x: 3.54, y: 3.54 }, { x: 5, y: 0 }, R);\n expect(actual).toBeFalse();\n });\n\n it('#isInsideSector should calculate that point is not inside a sector (left side 1)', () => {\n const actual = service.isInsideSector({ x: -5.8, y: 2.98 }, center, { x: -5, y: 0 }, { x: -3.54, y: 3.54 }, R);\n expect(actual).toBeFalse();\n });\n\n it('#isInsideSector should calculate that point is not inside a sector (left side 2)', () => {\n const actual = service.isInsideSector({ x: -3.17, y: 1.39 }, center, { x: -3.54, y: 3.54 }, { x: 5, y: 0 }, R);\n expect(actual).toBeFalse();\n });\n\n it('#getMidPoint should calculate midpoint of two points', () => {\n const actual = service.getMidPoint({ x: 0, y: 0 }, { x: 3, y: 3 });\n expect(actual.x).toBeCloseTo(1.5, floatingPointPrecisionDigits);\n expect(actual.y).toBeCloseTo(1.5, floatingPointPrecisionDigits);\n });\n\n it('#getSectors should calculate sectors for circle\\'s right side', () => {\n const circleCenter: Position = { x: 2.2, y: 2.2 };\n const expectedSectors: Sector[] = [\n {\n sectorStart: { x: 2.2, y: 7.2 },\n sectorEnd: { x: 5.74, y: 5.74 }\n },\n {\n sectorStart: { x: 5.74, y: 5.74 },\n sectorEnd: { x: 7.2, y: 2.2 }\n },\n {\n sectorStart: { x: 7.2, y: 2.2 },\n sectorEnd: { x: 5.74, y: -1.34 }\n },\n {\n sectorStart: { x: 5.74, y: -1.34 },\n sectorEnd: { x: 2.2, y: -2.8 }\n }\n ];\n\n const actualSectors = service.getSectors(circleCenter, R, Side.RIGHT, 4);\n\n expect(actualSectors).toHaveSize(expectedSectors.length);\n\n for (let i = 0; i < actualSectors.length; i++) {\n expect(actualSectors[i].sectorStart.x).toBeCloseTo(expectedSectors[i].sectorStart.x, floatingPointPrecisionDigits);\n expect(actualSectors[i].sectorStart.y).toBeCloseTo(expectedSectors[i].sectorStart.y, floatingPointPrecisionDigits);\n expect(actualSectors[i].sectorEnd.x).toBeCloseTo(expectedSectors[i].sectorEnd.x, floatingPointPrecisionDigits);\n expect(actualSectors[i].sectorEnd.y).toBeCloseTo(expectedSectors[i].sectorEnd.y, floatingPointPrecisionDigits);\n }\n });\n\n it('#getSectors should calculate sectors for circle\\'s left side', () => {\n const circleCenter: Position = { x: 2.2, y: 2.2 };\n const expectedSectors: Sector[] = [\n {</code>", "source": "SynthCodeNetNoImageTag", "user": "<code>" } ]
[ { "assistant": "<loc_0><loc_0><loc_500><loc_500><_YAML_>title: Meloen\nlogo: /assets/img/logo2.png\ndescription: Sjabloon voor een website met GitHub Pages, thema gebaseerd op Minimal, uitgebreid met tags, paginering en RSS feed.\nshow_downloads: true\ngoogle_analytics:\ntheme: jekyll-theme-minimal\nauthor: Kees de Keijzer\ngithub_username: keesdekeijzer\nplugins:\n # Other plugins go here\n - jekyll-paginate\n\npaginate: 8\npaginate_path: \"/posts/page:num/\"\nrepo: meloen\nrssfeed: feed.xml\n</code>", "source": "SynthCodeNetNoImageTag", "user": "<code>" } ]
[ { "assistant": "<code><loc_0><loc_0><loc_500><loc_500><_C#_> [Key]\n public int Id { get; set; }\n\n [Column(\"name\")]\n [StringLength(100)]\n [Required]\n public string Name { get; set; }\n\n [Column(\"slug\")]\n [StringLength(50)]\n [Required]\n public string Slug { get; set; }\n\n [Column(\"create_at\")]\n [Required]\n public DateTime CreateAt { get; set; }\n\n public virtual ICollection<Acceleration> Accelerations { get; set; }\n\n public virtual ICollection<Submission> Submissions { get; set; }\n\n\n }\n}</code>", "source": "SynthCodeNetNoImageTag", "user": "Convert code to text." } ]
[ { "assistant": "<code><loc_0><loc_0><loc_500><loc_500><_C++_>//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//\n// Copyright (c) 2017-21, Lawrence Livermore National Security, LLC\n// and RAJA Performance Suite project contributors.\n// See the RAJAPerf/LICENSE file for details.\n//\n// SPDX-License-Identifier: (BSD-3-Clause)\n//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//\n\n#include \"POLYBENCH_HEAT_3D.hpp\"\n\n#include \"RAJA/RAJA.hpp\"\n\n#include <iostream>\n\n\nnamespace rajaperf \n{\nnamespace polybench\n{\n\n \nvoid POLYBENCH_HEAT_3D::runOpenMPVariant(VariantID vid)\n{\n#if defined(RAJA_ENABLE_OPENMP) && defined(RUN_OPENMP)\n\n const Index_type run_reps= getRunReps();\n\n POLYBENCH_HEAT_3D_DATA_SETUP;\n\n switch ( vid ) {\n\n case Base_OpenMP : {\n\n startTimer();\n for (RepIndex_type irep = 0; irep < run_reps; ++irep) {\n\n for (Index_type t = 0; t < tsteps; ++t) {\n\n #pragma omp parallel for collapse(2)\n for (Index_type i = 1; i < N-1; ++i ) {\n for (Index_type j = 1; j < N-1; ++j ) {\n for (Index_type k = 1; k < N-1; ++k ) {\n POLYBENCH_HEAT_3D_BODY1;\n }\n }\n }\n\n #pragma omp parallel for collapse(2)\n for (Index_type i = 1; i < N-1; ++i ) {\n for (Index_type j = 1; j < N-1; ++j ) {\n for (Index_type k = 1; k < N-1; ++k ) {\n POLYBENCH_HEAT_3D_BODY2;\n }\n }\n }\n\n }\n\n }\n stopTimer();\n\n POLYBENCH_HEAT_3D_DATA_RESET;\n\n break;\n }\n\n case Lambda_OpenMP : {\n\n auto poly_heat3d_base_lam1 = [=](Index_type i, Index_type j,\n Index_type k) {\n POLYBENCH_HEAT_3D_BODY1;\n };\n auto poly_heat3d_base_lam2 = [=](Index_type i, Index_type j,\n Index_type k) {\n POLYBENCH_HEAT_3D_BODY2;\n };\n\n startTimer();\n for (RepIndex_type irep = 0; irep < run_reps; ++irep) {\n\n for (Index_type t = 0; t < tsteps; ++t) {\n\n #pragma omp parallel for collapse(2)\n for (Index_type i = 1; i < N-1; ++i ) {\n for (Index_type j = 1; j < N-1; ++j ) {\n for (Index_type k = 1; k < N-1; ++k ) {\n poly_heat3d_base_lam1(i, j, k);\n }\n }\n }\n\n #pragma omp parallel for collapse(2)\n for (Index_type i = 1; i < N-1; ++i ) {\n for (Index_type j = 1; j < N-1; ++j ) {\n for (Index_type k = 1; k < N-1; ++k ) {\n poly_heat3d_base_lam2(i, j, k);\n }\n }\n }\n\n }\n\n }\n stopTimer();\n\n POLYBENCH_HEAT_3D_DATA_RESET;\n\n break;\n }\n\n case RAJA_OpenMP : {\n\n POLYBENCH_HEAT_3D_VIEWS_RAJA;\n\n using EXEC_POL =\n RAJA::KernelPolicy<\n RAJA::statement::Collapse<RAJA::omp_parallel_collapse_exec,\n RAJA::ArgList<0, 1>,\n RAJA::statement::For<2, RAJA::loop_exec,\n RAJA::statement::Lambda<0>\n >\n >\n >;\n\n startTimer();\n for (RepIndex_type irep = 0; irep < run_reps; ++irep) {\n\n for (Index_type t = 0; t < tsteps; ++t) {\n\n RAJA::kernel<EXEC_POL>( RAJA::make_tuple(RAJA::RangeSegment{1, N-1},\n RAJA::RangeSegment{1, N-1},\n RAJA::RangeSegment{1, N-1}),</code>", "source": "SynthCodeNetNoImageTag", "user": "Convert code to text." } ]
[ { "assistant": "<loc_0><loc_0><loc_500><loc_500><_TypeScript_>import { customElement, useView, PLATFORM } from 'aurelia-framework';\nimport { bindable } from 'aurelia-typed-observable-plugin';\n\n/**\n * @selector mdc-fab\n * @selector a[mdc-fab]\n * @selector button[mdc-fab]\n */\n@useView(PLATFORM.moduleName('./mdc-fab.html'))\n@customElement('mdc-fab')\nexport class MdcFab {\n /** Make the fab smaller (40 x 40 pixels) */\n @bindable.booleanAttr\n mini: boolean;\n\n /** Modifies the FAB to wider size which includes a text label */\n @bindable.booleanAttr\n extended: boolean;\n\n /** Set the mini fab touch target to 48 x 48 px. Only applies if FAB is set to mini as well. */\n @bindable.booleanAttr\n touch: boolean;\n\n /** Animates the FAB in or out of view */\n @bindable.booleanAttr\n exited: boolean;\n\n /** Optional. Apply a Material Icon. */\n @bindable\n icon: string;\n\n /** Optional, for the text label. Applicable only for Extended FAB. */\n @bindable\n label: string;\n}\n</code>", "source": "SynthCodeNetNoImageTag", "user": "<code>" } ]
[ { "assistant": "<code><loc_0><loc_0><loc_500><loc_500><_C_>/** @file\r\n GPIO pins for SKL-PCH-H,\r\n\r\n @copyright\r\n Copyright 2014 - 2021 Intel Corporation. <BR>\r\n\r\n SPDX-License-Identifier: BSD-2-Clause-Patent\r\n**/\r\n\r\n#ifndef _GPIO_PINS_SKL_H_H_\r\n#define _GPIO_PINS_SKL_H_H_\r\n///\r\n/// This header file should be used together with\r\n/// PCH GPIO lib in C and ASL. All defines used\r\n/// must match both ASL/C syntax\r\n///\r\n///\r\n/// SKL H GPIO Groups\r\n/// Use below for functions from PCH GPIO Lib which\r\n/// require GpioGroup as argument\r\n///\r\n#define GPIO_SKL_H_GROUP_GPP_A 0x0100\r\n#define GPIO_SKL_H_GROUP_GPP_B 0x0101\r\n#define GPIO_SKL_H_GROUP_GPP_C 0x0102\r\n#define GPIO_SKL_H_GROUP_GPP_D 0x0103\r\n#define GPIO_SKL_H_GROUP_GPP_E 0x0104\r\n#define GPIO_SKL_H_GROUP_GPP_F 0x0105\r\n#define GPIO_SKL_H_GROUP_GPP_G 0x0106\r\n#define GPIO_SKL_H_GROUP_GPP_H 0x0107\r\n#define GPIO_SKL_H_GROUP_GPP_I 0x0108\r\n#define GPIO_SKL_H_GROUP_GPP_J 0x0109\r\n#define GPIO_SKL_H_GROUP_GPP_K 0x010A\r\n#define GPIO_SKL_H_GROUP_GPP_L 0x010B\r\n#define GPIO_SKL_H_GROUP_GPD 0x010C\r\n\r\n///\r\n/// SKL H GPIO pins\r\n/// Use below for functions from PCH GPIO Lib which\r\n/// require GpioPad as argument. Encoding used here\r\n/// has all information required by library functions\r\n///\r\n#define GPIO_SKL_H_GPP_A0 0x01000000\r\n#define GPIO_SKL_H_GPP_A1 0x01000001\r\n#define GPIO_SKL_H_GPP_A2 0x01000002\r\n#define GPIO_SKL_H_GPP_A3 0x01000003\r\n#define GPIO_SKL_H_GPP_A4 0x01000004\r\n#define GPIO_SKL_H_GPP_A5 0x01000005\r\n#define GPIO_SKL_H_GPP_A6 0x01000006\r\n#define GPIO_SKL_H_GPP_A7 0x01000007\r\n#define GPIO_SKL_H_GPP_A8 0x01000008\r\n#define GPIO_SKL_H_GPP_A9 0x01000009\r\n#define GPIO_SKL_H_GPP_A10 0x0100000A\r\n#define GPIO_SKL_H_GPP_A11 0x0100000B\r\n#define GPIO_SKL_H_GPP_A12 0x0100000C\r\n#define GPIO_SKL_H_GPP_A13 0x0100000D\r\n#define GPIO_SKL_H_GPP_A14 0x0100000E\r\n#define GPIO_SKL_H_GPP_A15 0x0100000F\r\n#define GPIO_SKL_H_GPP_A16 0x01000010\r\n#define GPIO_SKL_H_GPP_A17 0x01000011\r\n#define GPIO_SKL_H_GPP_A18 0x01000012\r\n#define GPIO_SKL_H_GPP_A19 0x01000013\r\n#define GPIO_SKL_H_GPP_A20 0x01000014\r\n#define GPIO_SKL_H_GPP_A21 0x01000015\r\n#define GPIO_SKL_H_GPP_A22 0x01000016\r\n#define GPIO_SKL_H_GPP_A23 0x01000017\r\n#define GPIO_SKL_H_GPP_B0 0x01010000\r\n#define GPIO_SKL_H_GPP_B1 0x01010001\r\n#define GPIO_SKL_H_GPP_B2 0x01010002\r\n#define GPIO_SKL_H_GPP_B3 0x01010003\r\n#define GPIO_SKL_H_GPP_B4 0x01010004\r\n#define GPIO_SKL_H_GPP_B5 0x01010005\r\n#define GPIO_SKL_H_GPP_B6 0x01010006\r\n#define GPIO_SKL_H_GPP_B7 0x01010007\r\n#define GPIO_SKL_H_GPP_B8 0x01010008\r\n#define GPIO_SKL_H_GPP_B9 0x01010009\r\n#define GPIO_SKL_H_GPP_B10 0x0101000A\r\n#define GPIO_SKL_H_GPP_B11 0x0101000B\r</code>", "source": "SynthCodeNetNoImageTag", "user": "Convert code to text." } ]
[ { "assistant": "<loc_0><loc_0><loc_500><loc_500><_Bash_>#!/bin/bash\n# SPDX-License-Identifier: GPL-2.0+\n#\n# Run a kvm-based test of the specified tree on the specified configs.\n# Fully automated run and error checking, no graphics console.\n#\n# Execute this in the source tree. Do not run it as a background task\n# because qemu does not seem to like that much.\n#\n# Usage: kvm-test-1-run.sh config builddir resdir seconds qemu-args boot_args\n#\n# qemu-args defaults to \"-enable-kvm -nographic\", along with arguments\n#\t\t\tspecifying the number of CPUs and other options\n#\t\t\tgenerated from the underlying CPU architecture.\n# boot_args defaults to value returned by the per_version_boot_params\n#\t\t\tshell function.\n#\n# Anything you specify for either qemu-args or boot_args is appended to\n# the default values. The \"-smp\" value is deduced from the contents of\n# the config fragment.\n#\n# More sophisticated argument parsing is clearly needed.\n#\n# Copyright (C) IBM Corporation, 2011\n#\n# Authors: Paul E. McKenney <paulmck@linux.ibm.com>\n\nT=${TMPDIR-/tmp}/kvm-test-1-run.sh.$$\ntrap 'rm -rf $T' 0\nmkdir $T\n\n. functions.sh\n. $CONFIGFRAG/ver_functions.sh\n\nconfig_template=${1}\nconfig_dir=`echo $config_template | sed -e 's,/[^/]*$,,'`\ntitle=`echo $config_template | sed -e 's/^.*\\///'`\nbuilddir=${2}\nresdir=${3}\nif test -z \"$resdir\" -o ! -d \"$resdir\" -o ! -w \"$resdir\"\nthen\n\techo \"kvm-test-1-run.sh :$resdir: Not a writable directory, cannot store results into it\"\n\texit 1\nfi\necho ' ---' `date`: Starting build\necho ' ---' Kconfig fragment at: $config_template >> $resdir/log\ntouch $resdir/ConfigFragment.input $resdir/ConfigFragment\nif test -r \"$config_dir/CFcommon\"\nthen\n\techo \" --- $config_dir/CFcommon\" >> $resdir/ConfigFragment.input\n\tcat < $config_dir/CFcommon >> $resdir/ConfigFragment.input\n\tconfig_override.sh $config_dir/CFcommon $config_template > $T/Kc1\n\tgrep '#CHECK#' $config_dir/CFcommon >> $resdir/ConfigFragment\nelse\n\tcp $config_template $T/Kc1\nfi\necho \" --- $config_template\" >> $resdir/ConfigFragment.input\ncat $config_template >> $resdir/ConfigFragment.input\ngrep '#CHECK#' $config_template >> $resdir/ConfigFragment\nif test -n \"$TORTURE_KCONFIG_ARG\"\nthen\n\techo $TORTURE_KCONFIG_ARG | tr -s \" \" \"\\012\" > $T/cmdline\n\techo \" --- --kconfig argument\" >> $resdir/ConfigFragment.input\n\tcat $T/cmdline >> $resdir/ConfigFragment.input\n\tconfig_override.sh $T/Kc1 $T/cmdline > $T/Kc2\n\t# Note that \"#CHECK#\" is not permitted on commandline.\nelse\n\tcp $T/Kc1 $T/Kc2\nfi</code>", "source": "SynthCodeNetNoImageTag", "user": "<code>" } ]
[ { "assistant": "<loc_0><loc_0><loc_500><loc_500><_Python_>\"\"\"\nWSGI config for myfirst project.\n\nIt exposes the WSGI callable as a module-level variable named ``application``.\n\nFor more information on this file, see\nhttps://docs.djangoproject.com/en/1.9/howto/deployment/wsgi/\n\"\"\"\n\nimport os\n\nfrom django.core.wsgi import get_wsgi_application\n\nos.environ.setdefault(\"DJANGO_SETTINGS_MODULE\", \"myfirst.settings\")\n\napplication = get_wsgi_application()\n</code>", "source": "SynthCodeNetNoImageTag", "user": "<code>" } ]
[ { "assistant": "<loc_0><loc_0><loc_500><loc_500><_Java_>/*\n * Copyright (c) 2007, 2018, Oracle and/or its affiliates. All rights reserved.\n * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.\n *\n * This code is free software; you can redistribute it and/or modify it\n * under the terms of the GNU General Public License version 2 only, as\n * published by the Free Software Foundation.\n *\n * This code is distributed in the hope that it will be useful, but WITHOUT\n * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or\n * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License\n * version 2 for more details (a copy is included in the LICENSE file that\n * accompanied this code).\n *\n * You should have received a copy of the GNU General Public License version\n * 2 along with this work; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.\n *\n * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA\n * or visit www.oracle.com if you need additional information or have any\n * questions.\n */\n\n\n/*\n * @test\n * @key stress\n *\n * @summary converted from VM testbase nsk/stress/jni/gclocker/gcl001.\n * VM testbase keywords: [stress, quick, feature_283, nonconcurrent, exclude]\n * VM testbase comments: JDK-8199562\n * VM testbase readme:\n * DESCRIPTION\n * Check compatibility of GC Locker improvements with JNI CS\n * Two types of concurrent threads are present:\n * A) Create N 'JNI CS' threads. Each of them will:\n * 1. Create primitive array and string with random data\n * 2. Pass it to native method\n * 3. Sort/Hash data in JNI CS mixing string and array critical sections\n * 4. Check isCopy == false\n * 5. Return from native\n * 6. Check data to be processed correctly\n * B) Create M ' Garbage producer/memory allocation' threads. Each of them will:\n * 1. Allocate memory blocks and make them garbage.\n * 2. Check for OOM errors.\n *\n * @library /vmTestbase\n * /test/lib\n * @run driver jdk.test.lib.FileInstaller . .\n * @ignore JDK-8199562\n * @run main/othervm/native/timeout=480\n * -XX:-UseGCOverheadLimit\n * nsk.stress.jni.gclocker.gcl001\n * -stressThreadsFactor 8\n */\n\npackage nsk.stress.jni.gclocker;\n\nimport nsk.share.gc.GC;\nimport nsk.share.gc.ThreadedGCTest;\nimport nsk.share.gc.gp.array.BooleanArrayProducer;\nimport nsk.share.gc.gp.array.ByteArrayProducer;\nimport nsk.share.gc.gp.array.CharArrayProducer;\nimport nsk.share.gc.gp.array.DoubleArrayProducer;\nimport nsk.share.gc.gp.array.FloatArrayProducer;\nimport nsk.share.gc.gp.array.IntArrayProducer;\nimport nsk.share.gc.gp.array.LongArrayProducer;\nimport nsk.share.gc.gp.array.ShortArrayProducer;\nimport nsk.share.test.ExecutionController;\nimport nsk.share.test.LocalRandom;\n\nimport java.util.Random;\n\npublic class gcl001 extends ThreadedGCTest {\n\n static {\n System.loadLibrary(\"gcl001\");\n }\n\n int maxBlockSize;\n\n public static void main(String[] args) {\n GC.runTest(new gcl001(), args);\n }\n\n @Override\n public void run() {\n // each thread have only one block at the time\n // so we should occupy less then 60% of heap with live objects\n long maxSize = runParams.getTestMemory() / runParams.getNumberOfThreads();\n if (maxSize > Integer.MAX_VALUE - 1) {\n maxSize = Integer.MAX_VALUE - 1;\n }\n maxBlockSize = (int) maxSize;\n log.info(\"Maximium block size = \" + maxBlockSize);\n super.run();\n }\n\n @Override\n protected Runnable createRunnable(int i) {\n if (i < runParams.getNumberOfThreads() / 2) {\n return CreateJNIWorker(i, maxBlockSize);\n } else {\n return new GarbageProducer(maxBlockSize);\n }\n }\n\n public Runnable CreateJNIWorker(int number, int size) {\n JNIAbstractWorker worker = null;\n switch (number % 8) {\n case 0:\n worker = new JNIBooleanWorker(size);\n break;\n case 1:\n worker = new JNIByteWorker(size);\n break;\n case 2:\n worker = new JNICharWorker(size);</code>", "source": "SynthCodeNetNoImageTag", "user": "<code>" } ]
[ { "assistant": "<loc_0><loc_0><loc_500><loc_500><_HTML_> local policy forbids the use of the old KDF.\n\n\n\n\n\n<span class=\"grey\">Hornquist Astrand, et al. Standards Track [Page 11]</span></pre>\n<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id=\"page-12\" ></span>\n<span class=\"grey\"><a href=\"./rfc8636\">RFC 8636</a> PKINIT Algorithm Agility July 2019</span>\n\n\n<span class=\"h2\"><a class=\"selflink\" id=\"section-8\" href=\"#section-8\">8</a>. Test Vectors</span>\n\n This section contains test vectors for the KDF defined above.\n\n<span class=\"h3\"><a class=\"selflink\" id=\"section-8.1\" href=\"#section-8.1\">8.1</a>. Common Inputs</span>\n\nZ: Length = 256 bytes, Hex Representation = (All Zeros)\n<span class=\"h2\"><a class=\"selflink\" id=\"section-00000000\" href=\"#section-00000000\">00000000</a> 00000000 00000000 00000000 000000000 00000000 00000000 00000000</span>\n<span class=\"h2\"><a class=\"selflink\" id=\"section-00000000\" href=\"#section-00000000\">00000000</a> 00000000 00000000 00000000 000000000 00000000 00000000 00000000</span>\n<span class=\"h2\"><a class=\"selflink\" id=\"section-00000000\" href=\"#section-00000000\">00000000</a> 00000000 00000000 00000000 000000000 00000000 00000000 00000000</span>\n<span class=\"h2\"><a class=\"selflink\" id=\"section-00000000\" href=\"#section-00000000\">00000000</a> 00000000 00000000 00000000 000000000 00000000 00000000 00000000</span>\n<span class=\"h2\"><a class=\"selflink\" id=\"section-00000000\" href=\"#section-00000000\">00000000</a> 00000000 00000000 00000000 000000000 00000000 00000000 00000000</span></code>", "source": "SynthCodeNetNoImageTag", "user": "<code>" } ]
[ { "assistant": "<loc_0><loc_0><loc_500><loc_500><_Rust_>use actix_web::{\n http::{header, StatusCode},\n HttpRequest, HttpResponse,\n};\nuse futures::{future, Future, FutureExt, Stream, TryStreamExt};\nuse std::{\n io::Write,\n path::{Component, Path, PathBuf},\n pin::Pin,\n};\n\nuse crate::errors::{self, ContextualError};\nuse crate::listing::{self, FormParameters, SortingMethod, SortingOrder};\nuse crate::renderer;\n\n/// forbid any `..` or `/` in path component\nfn check_dir_name(dir_name: &Path) -> Result<(), ContextualError> {\n for component in dir_name.components() {\n match component {\n Component::CurDir | Component::Normal(_) => {}\n _ => {\n return Err(ContextualError::InvalidPathError(format!(\n \"illegal directory name {}\",\n &dir_name.display()\n )))\n }\n }\n }\n Ok(())\n}\n\n/// Create future to save file.\nfn save_file(\n field: actix_multipart::Field,\n file_path: PathBuf,\n overwrite_files: bool,\n) -> Pin<Box<dyn Future<Output = Result<i64, ContextualError>>>> {\n if !overwrite_files && file_path.exists() {\n return Box::pin(future::err(ContextualError::DuplicateFileError));\n }\n\n let mut file = match std::fs::File::create(&file_path) {\n Ok(file) => file,\n Err(e) => {\n return Box::pin(future::err(ContextualError::IoError(\n format!(\"Failed to create {}\", file_path.display()),\n e,\n )));\n }\n };\n Box::pin(\n field\n .map_err(ContextualError::MultipartError)\n .try_fold(0i64, move |acc, bytes| {\n let rt = file\n .write_all(bytes.as_ref())\n .map(|_| acc + bytes.len() as i64)\n .map_err(|e| {\n ContextualError::IoError(\"Failed to write to file\".to_string(), e)\n });\n future::ready(rt)\n }),\n )\n}\n\n/// Check if the target path is a directory and readable.\nfn check_target_dir(target_dir: &Path, message: &str) -> Result<(), ContextualError> {\n match std::fs::metadata(&target_dir) {\n Ok(metadata) => {\n if !metadata.is_dir() {\n return Err(ContextualError::InvalidPathError(format!(\n \"cannot {} to {}, since it's not a directory\",\n message,\n &target_dir.display()\n )));\n } else if metadata.permissions().readonly() {\n return Err(ContextualError::InsufficientPermissionsError(\n target_dir.display().to_string(),\n ));\n }\n }\n Err(_) => {\n return Err(ContextualError::InsufficientPermissionsError(\n target_dir.display().to_string(),\n ));\n }\n }\n Ok(())\n}\n\n/// Create new future to handle file as multipart data.\nfn handle_multipart(\n field: actix_multipart::Field,\n mut file_path: PathBuf,\n overwrite_files: bool,\n) -> Pin<Box<dyn Stream<Item = Result<i64, ContextualError>>>> {\n let filename = field\n .headers()\n .get(header::CONTENT_DISPOSITION)\n .ok_or(ContextualError::ParseError)\n .and_then(|cd| {\n header::ContentDisposition::from_raw(cd).map_err(|_| ContextualError::ParseError)\n })\n .and_then(|content_disposition| {\n content_disposition\n .get_filename()\n .ok_or(ContextualError::ParseError)\n .map(String::from)\n });\n let err = |e: ContextualError| Box::pin(future::err(e).into_stream());\n match filename {\n Ok(f) => {\n if let Err(e) = check_target_dir(&file_path, \"upload file\") {\n return err(e);\n }\n file_path = file_path.join(f);\n Box::pin(save_file(field, file_path, overwrite_files).into_stream())\n }\n Err(e) => err(e(\n \"HTTP header\".to_string(),\n \"Failed to retrieve the name of the file to upload\".to_string(),\n )),\n }\n}\n\n/// Create new future to handle create directory.\nfn handle_create_dir(target_dir: PathBuf, dir_name: PathBuf) -> Result<(), ContextualError> {\n check_target_dir(&target_dir, \"create directory\")?;\n check_dir_name(&dir_name)?;\n\n let target_dir = target_dir.join(dir_name);\n if target_dir.exists() {\n return Err(ContextualError::ConflictMkdirError);\n }\n\n match std::fs::create_dir(&target_dir) {\n Err(e) => {\n return Err(ContextualError::IoError(\n format!(\"Failed to create {}\", target_dir.display()),\n e,\n ));\n }\n _ => (),\n }\n\n Ok(())\n}\n\n/// Handle incoming request to upload file.\n/// Target file path is expected as path parameter in URI and is interpreted as relative from\n/// server root directory. Any path which will go outside of this directory is considered\n/// invalid.\n/// This method returns future.\n#[allow(clippy::too_many_arguments)]\npub fn upload_file(\n req: HttpRequest,\n payload: actix_web::web::Payload,\n uses_random_route: bool,\n favicon_route: String,\n css_route: String,\n default_color_scheme: &str,\n default_color_scheme_dark: &str,\n hide_version_footer: bool,\n) -> Pin<Box<dyn Future<Output = Result<HttpResponse, actix_web::Error>>>> {\n let conf = req.app_data::<crate::MiniserveConfig>().unwrap();\n let return_path = if let Some(header) = req.headers().get(header::REFERER) {\n header.to_str().unwrap_or(\"/\").to_owned()\n } else {\n \"/\".to_string()\n };\n\n let query_params = listing::extract_query_parameters(&req);\n let upload_path = match query_params.path.clone() {\n Some(path) => match path.strip_prefix(Component::RootDir) {\n Ok(stripped_path) => stripped_path.to_owned(),\n Err(_) => path.clone(),\n },\n None => {\n let err = ContextualError::InvalidHttpRequestError(\n \"Missing query parameter 'path'\".to_string(),\n );\n return Box::pin(create_error_response(\n &err.to_string(),\n StatusCode::BAD_REQUEST,\n &return_path,\n query_params.sort,\n query_params.order,\n uses_random_route,\n &favicon_route,\n &css_route,\n default_color_scheme,\n default_color_scheme_dark,\n hide_version_footer,\n ));\n }\n };\n\n let app_root_dir = match conf.path.canonicalize() {\n Ok(dir) => dir,\n Err(e) => {\n let err = ContextualError::IoError(\n \"Failed to resolve path served by miniserve\".to_string(),\n e,\n );\n return Box::pin(create_error_response(\n &err.to_string(),\n StatusCode::INTERNAL_SERVER_ERROR,\n &return_path,\n query_params.sort,\n query_params.order,\n uses_random_route,\n &favicon_route,\n &css_route,\n default_color_scheme,\n default_color_scheme_dark,\n hide_version_footer,\n ));\n }\n };\n\n // If the target path is under the app root directory, save the file.</code>", "source": "SynthCodeNetNoImageTag", "user": "<code>" } ]
[ { "assistant": "<code><loc_0><loc_0><loc_500><loc_500><_Python_># -*- coding: utf-8 -*-\n# Generated by Django 1.11.7 on 2018-01-15 01:56\nfrom __future__ import unicode_literals\n\nfrom django.db import migrations, models\n\n\nclass Migration(migrations.Migration):\n\n dependencies = [\n ('userprofile', '0002_auto_20180114_1928'),\n ]\n\n operations = [\n migrations.AlterField(\n model_name='userprofile',\n name='age',\n field=models.PositiveIntegerField(blank=True),\n ),\n migrations.AlterField(\n model_name='userprofile',\n name='family_name',\n field=models.CharField(blank=True, max_length=50),\n ),\n migrations.AlterField(\n model_name='userprofile',\n name='first_name',\n field=models.CharField(blank=True, max_length=50),\n ),\n migrations.AlterField(\n model_name='userprofile',\n name='gender',\n field=models.CharField(blank=True, choices=[('M', 'Male'), ('F', 'Female')], max_length=1),\n ),\n ]\n</code>", "source": "SynthCodeNetNoImageTag", "user": "Convert code to text." } ]
[ { "assistant": "<code><loc_0><loc_0><loc_500><loc_500><_HTML_><html>\n <body>\n <h2>Hello World!</h2>\n <a href=\"./secured\">Access Secured Servlet</a>\n </body>\n</html>\n</code>", "source": "SynthCodeNetNoImageTag", "user": "Convert code to text." } ]
[ { "assistant": "<code><loc_0><loc_0><loc_500><loc_500><_PHP_><?php namespace App\\Http\\Controllers;\n\nuse Illuminate\\Support\\Facades\\DB;\nuse App\\Http\\Controllers\\Controller;\nuse App\\hero;\n\nclass HeroController extends Controller {\n\n public function index($ativo)\n {\n\n\t\t$heros = hero::where('ativo', $ativo)->orderBy('id', 'asc')->take(3)->get();\n\t\treturn $heros;\n\n\n \t/*\n\t\tDB::table('hero')->insert([\n\t\t ['nome' => 'Josepilha', 'ativo' => 1],\n\t\t ['nome' => 'Hiramuki', 'ativo' => 1],\n\t\t ['nome' => 'gato-banana', 'ativo' => 0],\n\t\t ['nome' => 'Bandida', 'ativo' => 2],\n\t\t ['nome' => 'Coxa', 'ativo' => 2]\n\t\t]);\n\t\t*/\n\t\t/*\n\t\t$id = DB::table('hero')->insertGetId(\n \t\t['nome' => 'Fofinha', 'ativo' => 1]\n\t\t);\n\t\t*/\n\t\t/*\n\t\tDB::table('hero')\n ->where('id', 9)\n ->update(['nome' => 'fofura']);\n */\n\t\t//DB::table('hero')->increment('ativo', 3); //Inutil, faz update em tudo\n\t\t//DB::table('hero')->increment('ativo', 1, ['nome' => 'Fofura']); //Não faz conforme se observa, incrementa e muda todos os nomes para Fofura\n\n\t\t//DB::table('hero')->increment('ativo', 1, ['nome' => 'Fofura']);\n\n\t\t\n\n //$tabhero = DB::select('select nome from hero where ativo=?', [$ativo]); \n\t\t//$tabhero = DB::table('hero')->select('id as chave','nome', 'ativo as status')->get();\n\n //$tabhero = DB::table('hero')->where('nome', 'WolveHira')->first(); // Manda a linha e os campos como stdClass\n\t\t//$tabhero = DB::table('hero')->where('nome', 'Josefineira')->value('nome');\n\t\t//$tabhero = DB::table('hero')->pluck('nome','id');\n\n\t\t//$tabhero = DB::table('hero')->count();\n\t\t//$tabhero = DB::table('hero')->min('id');\n\n\t\t//$tabhero = DB::table('hero')->where('ativo', 1)->avg('id');\n\n\t\t//var_dump($tabhero);\n\t\t//die;\n\n //return view('Hero', ['tabhero' => $tabhero]);\n }\n\n}\n?>\n</code>", "source": "SynthCodeNetNoImageTag", "user": "Convert code to text." } ]
[ { "assistant": "<code><loc_0><loc_0><loc_500><loc_500><_Python_>from core.domain import story_domain\nfrom core.domain import topic_domain\nfrom core.platform import models\nimport python_utils\n\nmemory_cache_services = models.Registry.import_cache_services()\n\n# NOTE: Namespaces and sub-namespaces cannot contain ':' because this is used as\n# an internal delimiter for cache keys that separates the namespace, the\n# sub-namespace, and the id in the cache keys.\nMEMCACHE_KEY_DELIMITER = ':'\n\n# This namespace supports sub-namespaces which are identified by the stringified\n# version number of the explorations within the sub-namespace. The value for\n# each key in this namespace should be a serialized representation of an\n# Exploration. There is also a special sub-namespace represented by the empty\n# string; this sub-namespace stores the latest version of the exploration.\nCACHE_NAMESPACE_EXPLORATION = 'exploration'\n# This namespace supports sub-namespaces which are identified by the stringified\n# version number of the collections within the sub-namespace. The value for\n# each key in this namespace should be a serialized representation of a\n# Collection. There is also a special sub-namespace represented by the empty\n# string; this sub-namespace stores the latest version of the collection.\nCACHE_NAMESPACE_COLLECTION = 'collection'\n# This namespace supports sub-namespaces which are identified by the stringified\n# version number of the skills within the sub-namespace. The value for\n# each key in this namespace should be a serialized representation of a\n# Skill. There is also a special sub-namespace represented by the empty\n# string; this sub-namespace stores the latest version of the skill.\nCACHE_NAMESPACE_SKILL = 'skill'\n# This namespace supports sub-namespaces which are identified by the stringified\n# version number of the stories within the sub-namespace. The value for\n# each key in this namespace should be a serialized representation of a\n# Story. There is also a special sub-namespace represented by the empty\n# string; this sub-namespace stores the latest version of the story.\nCACHE_NAMESPACE_STORY = 'story'\n# This namespace supports sub-namespaces which are identified by the stringified</code>", "source": "SynthCodeNetNoImageTag", "user": "Convert code to text." } ]
[ { "assistant": "<loc_0><loc_0><loc_500><loc_500><_Kotlin_>package com.falcon.turingx.lifecycle.util\n\nimport androidx.lifecycle.LiveData\nimport androidx.lifecycle.MutableLiveData\nimport androidx.lifecycle.Observer\nimport java.util.concurrent.CountDownLatch\nimport java.util.concurrent.TimeUnit\n\n/** Tells observers that the data has changed. */\nfun <T> MutableLiveData<T>.notifyDataChanged() {\n this.value = value\n}\n\n/** Transform a MutableLiveData in a read only liveData. */\nfun <T> MutableLiveData<T>.readOnly() = this as LiveData<T>\n\n/**\n * Get the value from a LiveData object. We're waiting for LiveData to emit, for 2 seconds.\n * Once we got a notification via onChanged, we stop observing.\n * */\n@Throws(InterruptedException::class)\nfun <T> LiveData<T>.blockingGetValue(): T {\n val data = arrayOfNulls<Any>(1)\n val latch = CountDownLatch(1)\n observeForever { o ->\n data[0] = o\n latch.countDown()\n }\n latch.await(2, TimeUnit.SECONDS)\n @Suppress(\"UNCHECKED_CAST\")\n return data[0] as T\n}</code>", "source": "SynthCodeNetNoImageTag", "user": "<code>" } ]
[ { "assistant": "<code><loc_0><loc_0><loc_500><loc_500><_SQL_>-- insert data whith create range partition table on a char field and add a partition and then query all partitions and drop table\n\ncreate table range_test(id int not null,\n\t\t\ttest_int int,\n\t\t\ttest_char char(50),\n\t\t\ttest_varchar varchar(2000),\n\t\t\ttest_datetime timestamp,primary key(id,test_char))\nPARTITION BY RANGE (test_char) (\n PARTITION p0 VALUES LESS THAN ('ddd'),\n PARTITION p1 VALUES LESS THAN ('ggg'),\n PARTITION p2 VALUES LESS THAN ('kkk')\n);\n\ninsert into range_test values (1,1,'aaa','aaa','2000-01-01 09:00:00');\ninsert into range_test values (2,2,'bbb','bbb','2000-01-02 09:00:00');\ninsert into range_test values (3,3,'ccc','ccc','2000-01-03 09:00:00');\ninsert into range_test values (4,11,'ddd','ddd','2000-02-01 09:00:00');\ninsert into range_test values (5,12,'eee','eee','2000-02-02 09:00:00');\ninsert into range_test values (6,13,'fff','fff','2000-02-03 09:00:00');\ninsert into range_test values (7,21,'ggg','ggg','2000-03-01 09:00:00');\ninsert into range_test values (8,22,'hhh','hhh','2000-03-02 09:00:00');\ninsert into range_test values (9,23,'iii','iii','2000-03-03 09:00:00');\ninsert into range_test values (10,31,'jjj','jjj','2000-04-01 09:00:00');\n\n\n\nALTER TABLE range_test add partition (\npartition p3 values less than ('mmm')\n);\ninsert into range_test values (11,41,'kkk','kkk','2000-05-01 09:00:00');\ninsert into range_test values (12,42,'lll','lll','2000-05-02 09:00:00');\n\nselect * from range_test order by 1,2;\nselect * from range_test__p__p0 order by 1,2;\nselect * from range_test__p__p1 order by 1 ;\nselect * from range_test__p__p2 order by 1 ;\nselect * from range_test__p__p3 order by 1 ;\n\n\ndrop class range_test;\n</code>", "source": "SynthCodeNetNoImageTag", "user": "Convert code to text." } ]
[ { "assistant": "<loc_0><loc_0><loc_500><loc_500><_Python_>from time import sleep\nfrom media_analyzer import queue\nfrom media_analyzer import exceptions\nimport pytest\n\n\n@pytest.fixture\ndef channel():\n with queue.connection() as conn:\n channel = conn.channel()\n channel.queue_declare(queue=\"test\")\n yield channel\n channel.queue_delete(queue=\"test\")\n\n\ndef test_queue_is_up():\n with queue.connection() as conn:\n pass\n \n\ndef test_queue_creation(channel):\n channel.basic_publish(exchange=\"\", routing_key=\"test\", body=\"asdf\")\n\n\ndef test_queue_publish_consume(channel):\n def callback(chn, method, properties, body):\n chn.stop_consuming()\n channel.basic_publish(exchange=\"\", routing_key=\"test\", body=\"asdf\")\n channel.basic_consume(queue=\"test\", on_message_callback=callback, auto_ack=True)\n channel.start_consuming()\n\n\ndef test_multiple_acks_consumer(channel):</code>", "source": "SynthCodeNetNoImageTag", "user": "<code>" } ]
[ { "assistant": "<code><loc_0><loc_0><loc_500><loc_500><_SQL_>-- +migrate Up\n-- SQL in section 'Up' is executed when this migration is applied\nALTER TABLE `templates` ADD `updated_at` datetime DEFAULT NULL;\n\n-- +migrate Down\n-- SQL section 'Down' is executed when this migration is rolled back\nALTER TABLE `templates` DROP COLUMN `updated_at`;\n</code>", "source": "SynthCodeNetNoImageTag", "user": "Convert code to text." } ]
[ { "assistant": "<loc_0><loc_0><loc_500><loc_500><_C++_>#define GL_SILENCE_DEPRECATION // OpenGL has been deprecated on macOS\n\n#include <GLFW/glfw3.h>\n#include <OpenGL/gl3.h>\n#include <fstream>\n#include <iostream>\n\n// We need to keep the aspect 1 because the calculations in the geometry shader\n// assume an isotropic coordinate system.\nconst int W = 640;\nconst int H = 640;\n\nGLuint createShader(const char *path, GLenum type) {\n GLuint shader = glCreateShader(type);\n\n std::ifstream f(path);\n std::string code((std::istreambuf_iterator<char>(f)),\n (std::istreambuf_iterator<char>()));\n\n const GLchar *const codeArray[1] = {code.c_str()};\n glShaderSource(shader, 1, codeArray, NULL);\n\n glCompileShader(shader);\n\n GLint status;\n glGetShaderiv(shader, GL_COMPILE_STATUS, &status);\n if (!status) {\n std::cerr << \"Failed to compile shader: \" << path << std::endl;\n\n GLchar infoLog[1024];\n GLsizei _;\n glGetShaderInfoLog(shader, 1024, &_, infoLog);\n std::cerr << infoLog << std::endl;\n\n glDeleteShader(shader);\n exit(1);\n }\n\n return shader;\n}\n\nGLuint createShaderProgram() {\n GLuint prog = glCreateProgram();\n\n GLuint vs = createShader(\"polyline.vert\", GL_VERTEX_SHADER);\n glAttachShader(prog, vs);\n\n GLuint gs = createShader(\"polyline.geom\", GL_GEOMETRY_SHADER);\n glAttachShader(prog, gs);\n\n GLuint fs = createShader(\"polyline.frag\", GL_FRAGMENT_SHADER);\n glAttachShader(prog, fs);\n\n glLinkProgram(prog);\n\n GLint linkStatus;\n glGetProgramiv(prog, GL_LINK_STATUS, &linkStatus);\n if (!linkStatus) {\n GLchar infoLog[1024];\n GLsizei _;\n glGetProgramInfoLog(prog, 1024, &_, infoLog);\n std::cerr << infoLog << std::endl;\n\n exit(-2);\n }\n\n glValidateProgram(prog);\n\n return prog;\n}\n\nvoid render() {\n // We need to append 1 point at the beginning and the end since it's adjacency\n // primitive.\n const int NPOINT = 4 + 2;\n float pointsXy[NPOINT * 2] = {0.0f, 0.0f, -0.8f, 0.0f, 0.0f, 0.0f,\n 0.3f, -0.5f, 0.8f, 0.0f, 0.0f, 0.0f};\n pointsXy[0] = pointsXy[2] * 2 - pointsXy[4];\n pointsXy[1] = pointsXy[3] * 2 - pointsXy[5];\n pointsXy[10] = pointsXy[8] * 2 - pointsXy[6];\n pointsXy[11] = pointsXy[9] * 2 - pointsXy[7];\n\n glClearColor(0.2f, 0.2f, 0.2f, 1.0f);\n glClear(GL_COLOR_BUFFER_BIT);\n\n GLuint prog = createShaderProgram();\n glUseProgram(prog);\n\n GLuint vao;\n glGenVertexArrays(1, &vao);\n glBindVertexArray(vao);\n\n GLuint vbo;\n glGenBuffers(1, &vbo);\n glBindBuffer(GL_ARRAY_BUFFER, vbo);\n glBufferData(GL_ARRAY_BUFFER, sizeof(pointsXy), pointsXy, GL_STATIC_DRAW);\n glEnableVertexAttribArray(0);\n glVertexAttribPointer(0, 2, GL_FLOAT, GL_FALSE, 0, 0);\n\n glDrawArrays(GL_LINE_STRIP_ADJACENCY, 0, NPOINT);\n\n glDisableVertexAttribArray(0);\n glDeleteBuffers(1, &vbo);\n glDeleteVertexArrays(1, &vao);\n glDeleteProgram(prog);\n}\n\nint main(void) {\n GLFWwindow *window;\n\n /* Initialize the library */\n if (!glfwInit())\n return -1;\n\n glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3);\n glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3);\n glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE);\n glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GLFW_TRUE);\n\n /* Create a windowed mode window and its OpenGL context */\n window = glfwCreateWindow(W, H, \"Polyline triangulation with geometry shader\",\n NULL, NULL);\n if (!window) {\n glfwTerminate();\n return -1;\n }\n\n /* Make the window's context current */\n glfwMakeContextCurrent(window);\n\n std::cout << \"GL version: \" << glGetString(GL_VERSION) << std::endl;\n\n /* Loop until the user closes the window */\n while (!glfwWindowShouldClose(window)) {\n render();\n\n /* Swap front and back buffers */\n glfwSwapBuffers(window);\n\n /* Poll for and process events */\n glfwPollEvents();\n }\n\n glfwTerminate();\n return 0;\n}\n</code>", "source": "SynthCodeNetNoImageTag", "user": "<code>" } ]
[ { "assistant": "<loc_0><loc_0><loc_500><loc_500><_C#_>using System.Xml.XPath;\n\nnamespace Mvp.Xml.Common.XPath\n{\n\t/// <summary>\n\t/// <see cref=\"XPathNodeIterator\"/> over a single node. Can be used to return a single\n\t/// node out of an XSLT or XPath extension function.\n\t/// </summary>\n\t/// <remarks>\n\t/// <para>Author: Oleg Tkachenko, <a href=\"http://www.xmllab.net\">http://www.xmllab.net</a>.</para>\n\t/// </remarks>\n\tpublic class SingletonXPathNodeIterator : XPathNodeIterator\n\t{\n\t\tprivate readonly XPathNavigator navigator;\n\t\tprivate int position;\n\n\t /// <summary>\n\t\t/// Creates new instance of SingletonXPathNodeIterator over\n\t\t/// given node.\n\t\t/// </summary>\n\t\tpublic SingletonXPathNodeIterator(XPathNavigator nav)\n\t\t{\n\t\t\tnavigator = nav;\n\t\t}\n\n\t /// <summary>\n\t\t/// See <see cref=\"XPathNodeIterator.Clone()\"/>\n\t\t/// </summary>\n\t\tpublic override XPathNodeIterator Clone()\n\t\t{\n\t\t\treturn new SingletonXPathNodeIterator(navigator.Clone());\n\t\t}\n\n\t\t/// <summary>\n\t\t/// Always 1. See <see cref=\"XPathNodeIterator.Count\"/>\n\t\t/// </summary>\n\t\tpublic override int Count { get; } = 1;\n\n\t /// <summary>\n\t\t/// See <see cref=\"XPathNodeIterator.Current\"/>\n\t\t/// </summary>\n\t\tpublic override XPathNavigator Current => navigator;\n\n\t /// <summary>\n\t\t/// See <see cref=\"XPathNodeIterator.CurrentPosition\"/>\n\t\t/// </summary>\n\t\tpublic override int CurrentPosition => position;\n\n\t /// <summary>\n\t\t/// See <see cref=\"XPathNodeIterator.MoveNext()\"/>\n\t\t/// </summary>\n\t\tpublic override bool MoveNext()\n\t\t{\n\t\t\tif (position == 0)\n\t\t\t{\n\t\t\t\tposition = 1;\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\treturn false;\n\t\t}\n\t}\n}\n</code>", "source": "SynthCodeNetNoImageTag", "user": "<code>" } ]
[ { "assistant": "<code><loc_0><loc_0><loc_500><loc_500><_C_>//\n// MLVideoWatermarkProducer.h\n// MomoChat\n//\n// Created by YuAo on 11/10/16.\n// Copyright © 2016 wemomo.com. All rights reserved.\n//\n#import \"MLVideoProcessor.h\"\n\n@interface MLVideoWatermarkProducer : NSObject\n\n- (instancetype)init NS_UNAVAILABLE;\n\n- (instancetype)initWithVideoProcessor:(id<MLVideoProcessor>)videoProcessor;\n\n@property (nonatomic,weak,readonly) id<MLVideoProcessor> videoProcessor;\n\n@end\n</code>", "source": "SynthCodeNetNoImageTag", "user": "Convert code to text." } ]
[ { "assistant": "<code><loc_0><loc_0><loc_500><loc_500><_C#_>// <copyright file=\"CurrentSpanTests.cs\" company=\"OpenTelemetry Authors\">\n// Copyright The OpenTelemetry Authors\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// </copyright>\n\nusing System;\nusing System.Diagnostics;\nusing Xunit;\n\nnamespace OpenTelemetry.Trace.Tests\n{\n public class CurrentSpanTests : IDisposable\n {\n private readonly Tracer tracer;\n\n public CurrentSpanTests()\n {\n Activity.DefaultIdFormat = ActivityIdFormat.W3C;\n Activity.ForceDefaultIdFormat = true;\n\n this.tracer = TracerProvider.Default.GetTracer(null);\n }\n\n [Fact]\n public void CurrentSpan_WhenNoContext()\n {\n Assert.False(Tracer.CurrentSpan.Context.IsValid);\n }\n\n [Fact]\n public void CurrentSpan_WhenActivityExists()\n {\n _ = new Activity(\"foo\").Start();\n Assert.True(Tracer.CurrentSpan.Context.IsValid);\n }\n\n public void Dispose()\n {\n Activity.Current = null;\n }\n }\n}\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;\n#define rep(i, n) for (ll i = 0; i < (ll)(n); i++)\ntypedef long long ll;\ntypedef pair<ll, ll> P;\nconst ll INF = 1001001001;\n\nll mp[10000005] = {};\nll mp2[10000005] = {};\n\nll beki(ll a, ll b) {\n if (b == 0) return 1;\n ll ret = beki(a, b / 2);\n ret = ret * ret;\n if (b & 1) ret = ret * a;\n return ret;\n}\n\nint main() {\n ll n;\n cin >> n;\n for (ll i = 1; i <= n; i++) {\n if (i == 1) {\n mp[1] = 1;\n continue;\n }\n if (mp[i] == 0) {\n for (ll j = i; j <= n; j *= i) {\n for (ll k = 1; j * k <= n; k++) {\n mp2[j * k]++;\n }\n }\n for (ll j = 1; i * j <= n; j++) {\n if (mp[i * j] == 0) {\n mp[i * j] = mp2[i * j] + 1;\n mp2[i * j] = 0;\n } else {\n mp[i * j] *= mp2[i * j] + 1;\n mp2[i * j] = 0;\n }\n }\n }\n }\n ll ans = 1;\n for (ll i = 2; i <= n; i++) {\n ans += i * (mp[i]);\n // cout << \"i=\" << i << \", mp=\" << mp[i] << endl;\n }\n cout << ans << endl;\n return 0;\n}</code>", "source": "SynthCodeNetNoImageTag", "user": "<code>" } ]
[ { "assistant": "<loc_0><loc_0><loc_500><loc_500><_Python_>res = \"\"\nfor i in range(3):\n line = input()\n res += line[i]\n\nprint(res)\n</code>", "source": "SynthCodeNetNoImageTag", "user": "<code>" } ]
[ { "assistant": "<code><loc_0><loc_0><loc_500><loc_500><_C++_> }\r\n else if (key == 'u') {\r\n instrumentUp();\r</code>", "source": "SynthCodeNetNoImageTag", "user": "Convert code to text." } ]
[ { "assistant": "<code><loc_0><loc_0><loc_500><loc_500><_PHP_> <div class=\"card-header card-header-image\" style=\"width: 19.5rem; margin: 10px;\">\n <img class=\"img\" src=\"{{ $galeri->foto }}\" alt=\"Card image cap\">\n <div class=\"card-img-overlay text-right\">\n <form action=\"{{ route('usahafoto.destroy', $galeri->id) }}\" method=\"post\">\n @csrf\n @method('delete')\n <button class=\"btn btn-default btn-fab btn-fab-mini btn-round\" data-original-title=\"\" title=\"\" onclick=\"confirm('{{ __(\"Are you sure you want to delete this image?\") }}') ? this.parentElement.submit() : ''\">\n <i class=\"material-icons\">delete</i>\n </button>\n </form>\n </div>\n </div>\n <!-- </div> -->\n @endforeach\n <!-- </div> -->\n </div>\n @else\n <div class=\"col-12 text-center\">\n <h3 class=\"title\"><strong>Upsss...</strong> Sepertinya Album usaha Anda Kosong, Silahkan Tambah Terlebih Dahulu</h3>\n </div>\n <div class=\"col-12 text-center\">\n <a href=\"{{ route('usahafoto.create', $usaha->id) }}\" class=\"btn btn-lg btn-success\">{{ __('Add galeri') }}</a>\n </div>\n @endif\n </div>\n </div>\n </div>\n </div>\n </div>\n @endsection</code>", "source": "SynthCodeNetNoImageTag", "user": "Convert code to text." } ]
[ { "assistant": "<code><loc_0><loc_0><loc_500><loc_500><_Python_>from datetime import datetime, timedelta\n\nimport jwt\n\nfrom .openapi import ApiClient, Authenticate, Configuration, V3Api\nfrom .versions import host_remove_version\n\n# Get new token REFRESH_TIME_DELTA before it really expires.\nREFRESH_TIME_DELTA = timedelta(hours=4).total_seconds()\n\n\ndef get_auth_token(username: str, password: str, api_host: str):\n api_client = ApiClient(\n Configuration(\n username=username, password=password, host=host_remove_version(api_host)\n )\n )\n api = V3Api(api_client)\n return api.auth_token_create(Authenticate(username, password))\n\n\ndef is_token_usable(token: str) -> bool:\n if token is None:\n return False\n\n try:\n # Get payload without verifying signature,\n # does NOT validate claims (including exp)\n payload = jwt.decode(\n token,\n options={\"verify_signature\": False},\n )\n except (jwt.exceptions.ExpiredSignatureError, jwt.exceptions.DecodeError):\n return False\n\n expiry_dt = datetime.utcfromtimestamp(payload[\"exp\"])\n sec_left = (expiry_dt - datetime.utcnow()).total_seconds()\n return sec_left >= REFRESH_TIME_DELTA\n\n\ndef refresh_api_key(config: Configuration):\n \"\"\"Refreshes the access key if its expired\"\"\"\n api_key = config.api_key.get(\"Authorization\")\n if is_token_usable(api_key):\n return\n\n refresh_key = config.api_key[\"refresh\"]\n if is_token_usable(refresh_key):\n api_client = ApiClient(Configuration(host_remove_version(config.host)))\n api = V3Api(api_client)\n token = api.auth_refresh_token_create({\"refresh\": config.api_key[\"refresh\"]})\n else:\n token = get_auth_token(config.username, config.password, config.host)\n config.api_key = {\"Authorization\": token.access, \"refresh\": token.refresh}\n</code>", "source": "SynthCodeNetNoImageTag", "user": "Convert code to text." } ]
[ { "assistant": "<code><loc_0><loc_0><loc_500><loc_500><_C++_> // Size: 0x8\r\n // Offset: 0x20\r\n ::GlobalNamespace::SongPackMasksModel* songPackMasksModel;\r\n // Field size check\r\n static_assert(sizeof(::GlobalNamespace::SongPackMasksModel*) == 0x8);\r\n // private readonly System.Text.StringBuilder _stringBuilder\r\n // Size: 0x8\r\n // Offset: 0x28\r\n ::System::Text::StringBuilder* stringBuilder;\r\n // Field size check\r\n static_assert(sizeof(::System::Text::StringBuilder*) == 0x8);\r\n public:\r\n // Deleting conversion operator: operator ::System::IntPtr\r\n constexpr operator ::System::IntPtr() const noexcept = delete;\r\n // Get instance field reference: private HMUI.CurvedTextMeshPro _text\r\n ::HMUI::CurvedTextMeshPro*& dyn__text();\r\n // Get instance field reference: private readonly SongPackMasksModel _songPackMasksModel\r\n ::GlobalNamespace::SongPackMasksModel*& dyn__songPackMasksModel();\r\n // Get instance field reference: private readonly System.Text.StringBuilder _stringBuilder\r\n ::System::Text::StringBuilder*& dyn__stringBuilder();\r\n // public System.Void Setup(GameServersFilter filter, System.Boolean visible)\r\n // Offset: 0x13E1AD4\r\n void Setup(::GlobalNamespace::GameServersFilter* filter, bool visible);\r\n // public System.Void Setup(BeatmapDifficultyMask beatmapDifficultyMask, SongPackMask songPackMask, System.Boolean visible)\r\n // Offset: 0x13E1CD8\r\n void Setup(::GlobalNamespace::BeatmapDifficultyMask beatmapDifficultyMask, ::GlobalNamespace::SongPackMask songPackMask, bool visible);\r\n // public System.Void .ctor()\r\n // Offset: 0x13E1EA0\r\n // Implemented from: UnityEngine.MonoBehaviour\r\n // Base method: System.Void MonoBehaviour::.ctor()\r\n // Base method: System.Void Behaviour::.ctor()\r\n // Base method: System.Void Component::.ctor()\r\n // Base method: System.Void Object::.ctor()\r</code>", "source": "SynthCodeNetNoImageTag", "user": "Convert code to text." } ]
[ { "assistant": "<loc_0><loc_0><loc_500><loc_500><_Erlang_>\n-ifndef(COSTRANSACTIONS_HRL).\n-define(COSTRANSACTIONS_HRL, true).\n\n\n-record('CosTransactions_otid_t', {formatID, bqual_length, tid}).\n-record('CosTransactions_TransIdentity', {coord, term, otid}).\n-record('CosTransactions_PropagationContext', {timeout, current, parents, implementation_specific_data}).\n-record('CosTransactions_HeuristicRollback', {'OE_ID'=\"IDL:omg.org/CosTransactions/HeuristicRollback:1.0\"}).\n-record('CosTransactions_HeuristicCommit', {'OE_ID'=\"IDL:omg.org/CosTransactions/HeuristicCommit:1.0\"}).\n-record('CosTransactions_HeuristicMixed', {'OE_ID'=\"IDL:omg.org/CosTransactions/HeuristicMixed:1.0\"}).\n-record('CosTransactions_HeuristicHazard', {'OE_ID'=\"IDL:omg.org/CosTransactions/HeuristicHazard:1.0\"}).\n-record('CosTransactions_WrongTransaction', {'OE_ID'=\"IDL:omg.org/CosTransactions/WrongTransaction:1.0\"}).\n-record('CosTransactions_SubtransactionsUnavailable', {'OE_ID'=\"IDL:omg.org/CosTransactions/SubtransactionsUnavailable:1.0\"}).\n-record('CosTransactions_NotSubtransaction', {'OE_ID'=\"IDL:omg.org/CosTransactions/NotSubtransaction:1.0\"}).\n-record('CosTransactions_Inactive', {'OE_ID'=\"IDL:omg.org/CosTransactions/Inactive:1.0\"}).\n-record('CosTransactions_NotPrepared', {'OE_ID'=\"IDL:omg.org/CosTransactions/NotPrepared:1.0\"}).\n-record('CosTransactions_NoTransaction', {'OE_ID'=\"IDL:omg.org/CosTransactions/NoTransaction:1.0\"}).\n-record('CosTransactions_InvalidControl', {'OE_ID'=\"IDL:omg.org/CosTransactions/InvalidControl:1.0\"}).\n-record('CosTransactions_Unavailable', {'OE_ID'=\"IDL:omg.org/CosTransactions/Unavailable:1.0\"}).\n-record('CosTransactions_SynchronizationUnavailable', {'OE_ID'=\"IDL:omg.org/CosTransactions/SynchronizationUnavailable:1.0\"}).\n\n\n-endif.\n\n\n</code>", "source": "SynthCodeNetNoImageTag", "user": "<code>" } ]
[ { "assistant": "<code><loc_0><loc_0><loc_500><loc_500><_Kotlin_>import java.io.IOException\nimport java.lang.NumberFormatException\nimport java.lang.StringBuilder\nimport java.util.ArrayDeque\nimport kotlin.math.max\nimport kotlin.math.min\n\nobject DMain{\n fun solve(){\n val mmax = 5000000\n\n val h = nextInt()\n val w = nextInt()\n val map = Array<IntArray>(h + 4){ IntArray(w + 4){-1} }\n\n val ch = nextInt()\n val cw = nextInt()\n val dh = nextInt()\n val dw = nextInt()\n\n for (i in 0 until h){\n val s = next()\n for(j in 0 until w){\n if(s[j] == '.') map[i+2][j+2] = mmax\n }\n }\n\n map[ch+1][cw+1] = 0\n move(map, h, w, ch+1 to cw+1)\n\n if(map[dh+1][dw+1] == -1 || map[dh+1][dw+1] == mmax){\n println(-1)\n }else{\n println(map[dh+1][dw+1])\n }\n }\n\n fun move(map: Array<IntArray>, h: Int, w: Int, start: Pair<Int, Int>){\n val que = ArrayDeque<Pair<Int, Int>>()\n val move = Array<Pair<Int, Int>>(4){0 to 0}\n move[0] = 0 to 1\n move[1] = 0 to -1\n move[2] = 1 to 0\n move[3] = -1 to 0\n\n val move2 = Array<Pair<Int, Int>>(20){0 to 0}\n move[0] = 2 to -2\n move[1] = 2 to -1\n move[2] = 2 to 0\n move[3] = 2 to 1\n move[4] = 2 to 2\n\n move[5] = 1 to -2\n move[6] = 1 to -1\n move[7] = 1 to 1\n move[8] = 1 to 2\n\n move[9] = 0 to -2\n move[10] = 0 to 2\n\n move[11] = -1 to -2\n move[12] = -1 to -1\n move[13] = -1 to 1\n move[14] = -1 to 2\n\n move[15] = -2 to -2\n move[16] = -2 to -1\n move[17] = -2 to 0\n move[18] = -2 to 1\n move[19] = -2 to 2\n\n que.add(start)\n while(!que.isEmpty()){\n val next = que.poll()\n val num = map[next.first][next.second]\n\n for(i in 0 until 4){\n val mx = next.first + move[i].first\n val my = next.second + move[i].second\n if(map[mx][my] > num){\n map[mx][my] = num\n que.add(mx to my)\n }\n }\n\n for( i in 0 until 20){\n val mmmx = next.first+move2[i].first\n val mmmy = next.second+move2[i].second\n if(map[mmmx][mmmy] > num + 1){\n map[mmmx][mmmy] = num + 1\n que.add(mmmx to mmmy)\n }\n }\n }\n }\n\n\n\n\n\n // Scanner based on uwi-san's Java code\n val stream = System.`in`\n val buffer = ByteArray(1024)\n var ptr = 0\n var buflen = 0\n\n fun hasNextByte(): Boolean{\n if(ptr < buflen){\n return true\n }else{\n ptr = 0\n try{\n buflen = stream.read(buffer)\n }catch (e: IOException){\n e.printStackTrace()\n }\n if(buflen <= 0){\n return false\n }\n }\n return true\n }\n\n fun readByte() =\n if(hasNextByte()) buffer[ptr++]\n else -1\n\n fun isPrintableChar(c: Byte) = c in 33..126\n\n fun hasNext(): Boolean{\n while(hasNextByte() && !isPrintableChar(buffer[ptr])) ptr++\n return hasNextByte()\n }\n\n fun next(): String{\n if(!hasNext()) throw NoSuchElementException()\n val sb = StringBuilder()\n var b = readByte()\n while(isPrintableChar(b)){\n sb.appendCodePoint(b.toInt())\n b = readByte()\n }\n return sb.toString()\n }\n\n fun nextLong(): Long{\n if(!hasNext()) throw NoSuchElementException()\n var n = 0L\n var minus = false\n var b = readByte()\n if(b == '-'.toByte()){\n minus = true\n b = readByte()\n }\n if(b !in '0'.toByte()..'9'.toByte())\n throw NumberFormatException()\n while(true){\n if(b in '0'.toByte()..'9'.toByte()){\n n *= 10\n n += b - '0'.toByte()\n }else if(!isPrintableChar(b)){\n return if(minus) -n else n\n }else{\n throw NumberFormatException()\n }\n b = readByte()\n }\n }\n\n fun nextInt(): Int{\n val n1 = nextLong()\n if(n1 !in Int.MIN_VALUE..Int.MAX_VALUE)\n throw NumberFormatException()\n return n1.toInt()\n }\n\n fun NextDouble() = next().toDouble()\n}\n\nfun main(){\n DMain.solve()\n}\n</code>", "source": "SynthCodeNetNoImageTag", "user": "Convert code to text." } ]
[ { "assistant": "<loc_0><loc_0><loc_500><loc_500><_Go_>// Copyright 2018 The Go Cloud Development Kit Authors\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// https://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// Package aws provides fundamental Wire providers for Amazon Web Services (AWS).\npackage aws // import \"github.com/eliben/gocdkx/aws\"\n\nimport (\n\t\"fmt\"\n\t\"net/url\"\n\t\"strconv\"\n\n\t\"github.com/aws/aws-sdk-go/aws\"\n\t\"github.com/aws/aws-sdk-go/aws/client\"\n\t\"github.com/aws/aws-sdk-go/aws/credentials\"\n\t\"github.com/aws/aws-sdk-go/aws/session\"\n\t\"github.com/google/wire\"\n)\n\n// DefaultSession is a Wire provider set that provides a *session.Session using\n// the default options.\nvar DefaultSession = wire.NewSet(\n\tSessionConfig,\n\tConfigCredentials,\n\tsession.NewSessionWithOptions,\n\twire.Value(session.Options{SharedConfigState: session.SharedConfigEnable}),\n\twire.Bind((*client.ConfigProvider)(nil), (*session.Session)(nil)),\n)\n\n// SessionConfig returns sess.Config.\nfunc SessionConfig(sess *session.Session) *aws.Config {\n\treturn sess.Config\n}\n\n// ConfigCredentials returns cfg.Credentials.\nfunc ConfigCredentials(cfg *aws.Config) *credentials.Credentials {\n\treturn cfg.Credentials\n}\n\n// ConfigOverrider implements client.ConfigProvider by overlaying a list of\n// configurations over a base configuration provider.\ntype ConfigOverrider struct {\n\tBase client.ConfigProvider\n\tConfigs []*aws.Config\n}\n\n// ClientConfig calls the base provider's ClientConfig method with co.Configs\n// followed by the arguments given to ClientConfig.\nfunc (co ConfigOverrider) ClientConfig(serviceName string, cfgs ...*aws.Config) client.Config {\n\tcfgs = append(co.Configs[:len(co.Configs):len(co.Configs)], cfgs...)\n\treturn co.Base.ClientConfig(serviceName, cfgs...)\n}\n\n// ConfigFromURLParams returns an aws.Config initialized based on the URL\n// parameters in q. It is intended to be used by URLOpeners for AWS services.\n// https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config\n//\n// It returns an error if q contains any unknown query parameters; callers\n// should remove any query parameters they know about from q before calling\n// ConfigFromURLParams.\n//\n// The following query options are supported:\n// - region: The AWS region for requests; sets aws.Config.Region.\n// - endpoint: The endpoint URL (hostname only or fully qualified URI); sets aws.Config.Endpoint.\n// - disableSSL: A value of \"true\" disables SSL when sending requests; sets aws.Config.DisableSSL.\n// - s3ForcePathStyle: A value of \"true\" forces the request to use path-style addressing; sets aws.Config.S3ForcePathStyle.\nfunc ConfigFromURLParams(q url.Values) (*aws.Config, error) {\n\tvar cfg aws.Config\n\tfor param, values := range q {\n\t\tvalue := values[0]\n\t\tswitch param {\n\t\tcase \"region\":\n\t\t\tcfg.Region = aws.String(value)\n\t\tcase \"endpoint\":\n\t\t\tcfg.Endpoint = aws.String(value)\n\t\tcase \"disableSSL\":\n\t\t\tb, err := strconv.ParseBool(value)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, fmt.Errorf(\"invalid value for query parameter %q: %v\", param, err)\n\t\t\t}\n\t\t\tcfg.DisableSSL = aws.Bool(b)\n\t\tcase \"s3ForcePathStyle\":\n\t\t\tb, err := strconv.ParseBool(value)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, fmt.Errorf(\"invalid value for query parameter %q: %v\", param, err)\n\t\t\t}\n\t\t\tcfg.S3ForcePathStyle = aws.Bool(b)\n\t\tdefault:\n\t\t\treturn nil, fmt.Errorf(\"unknown query parameter %q\", param)\n\t\t}\n\t}\n\treturn &cfg, nil\n}\n</code>", "source": "SynthCodeNetNoImageTag", "user": "<code>" } ]
[ { "assistant": "<code><loc_0><loc_0><loc_500><loc_500><_YAML_>OC\\PlatformBundle\\Entity\\Delay:\n type: entity\n table: delay\n indexes:\n datas_id_idx:\n columns:\n - datas_id\n id:\n id:\n type: bigint\n nullable: false\n options:\n unsigned: false\n id: true\n generator:\n strategy: IDENTITY\n fields:\n minuts:\n type: bigint\n nullable: true\n options:\n unsigned: false\n manyToOne:\n datas:\n targetEntity: Datas\n cascade: { }\n fetch: LAZY\n mappedBy: null\n inversedBy: null\n joinColumns:\n datas_id:\n referencedColumnName: id\n orphanRemoval: false\n lifecycleCallbacks: { }\n</code>", "source": "SynthCodeNetNoImageTag", "user": "Convert code to text." } ]
[ { "assistant": "<code><loc_0><loc_0><loc_500><loc_500><_Python_>N = int(input())\np = [int(input()) for _ in range(N)]\nprint(sum(p)-max(p)//2)</code>", "source": "SynthCodeNetNoImageTag", "user": "Convert code to text." } ]
[ { "assistant": "<loc_0><loc_0><loc_500><loc_500><_C++_>#define DPF_MODNAME \"CDirectVoiceDirectXTransport::GetTransportSettings\"\r\nHRESULT CDirectVoiceDirectXTransport::GetTransportSettings( LPDWORD lpdwSessionType, LPDWORD lpdwFlags )\r\n{\r\n\tHRESULT hr = DV_OK;\r\n\t\r\n\tif( !m_initialized )\r\n\t\thr = m_lpTransport->GetSessionInfo( &m_dvTransportInfo );\r\n\r\n\tif( FAILED( hr ) )\r\n\t{\r\n\t\tDPFX(DPFPREP, DVF_ERRORLEVEL, \"Unable to retrieve transport settings\" );\r\n\t\treturn hr;\r\n\t}\r\n\r\n\t*lpdwSessionType = m_dvTransportInfo.dwSessionType;\r\n\t*lpdwFlags = m_dvTransportInfo.dwFlags;\r\n\r\n\treturn DV_OK;\r\n}\r\n\r\n#undef DPF_MODNAME\r\n#define DPF_MODNAME \"CDirectVoiceDirectXTransport::AddPlayerEntry\"\r\nHRESULT CDirectVoiceDirectXTransport::AddPlayerEntry( DVID dvidPlayer, LPVOID lpData )\r\n{\r\n\treturn DVERR_NOTSUPPORTED;\r\n}\r\n\r\n#undef DPF_MODNAME\r\n#define DPF_MODNAME \"CDirectVoiceDirectXTransport::DeletePlayerEntry\"\r\nHRESULT CDirectVoiceDirectXTransport::DeletePlayerEntry( DVID dvidPlayer )\r\n{\r\n\treturn DVERR_NOTSUPPORTED;\r\n}\r\n\r\n#undef DPF_MODNAME\r\n#define DPF_MODNAME \"CDirectVoiceDirectXTransport::GetPlayerEntry\"\r\n//\r\n// GetPlayerEntry\r\n//\r\n// Retrieves the player record for the specified player (if it exists).\r\n//\r\nHRESULT CDirectVoiceDirectXTransport::GetPlayerEntry( DVID dvidPlayer, CVoicePlayer **lplpPlayer )\r\n{\r\n\treturn DVERR_NOTSUPPORTED;\r\n}\r\n\r\n\r\n////////////////////////////////////////////////////////////////////////\r\n//\r\n// USEFUL FOR REMOTE VOICE SESSIONS\r\n//\r\n\r\n#undef DPF_MODNAME\r\n#define DPF_MODNAME \"CDirectVoiceDirectXTransport::CreateGroup\"\r\nHRESULT CDirectVoiceDirectXTransport::CreateGroup( LPDVID dvidGroup )\r\n{\r\n\treturn S_OK;\r\n}\r\n\r\n#undef DPF_MODNAME\r\n#define DPF_MODNAME \"CDirectVoiceDirectXTransport::DeleteGroup\"\r\nHRESULT CDirectVoiceDirectXTransport::DeleteGroup( DVID dvidGroup )\r\n{\r\n\treturn S_OK;\r\n}\r\n\r\n#undef DPF_MODNAME\r\n#define DPF_MODNAME \"CDirectVoiceDirectXTransport::AddPlayerToGroup\"\r\nHRESULT CDirectVoiceDirectXTransport::AddPlayerToGroup( LPDVID dvidGroup, DVID dvidPlayer )\r\n{\r\n\treturn S_OK;\r\n}\r\n\r\n#undef DPF_MODNAME\r\n#define DPF_MODNAME \"CDirectVoiceDirectXTransport::RemovePlayerFromGroup\"\r\nHRESULT CDirectVoiceDirectXTransport::RemovePlayerFromGroup( DVID dvidGroup, DVID dvidPlayer )\r\n{\r\n\treturn S_OK;\r\n}\r\n\r\n#undef DPF_MODNAME\r\n#define DPF_MODNAME \"CDirectVoiceDirectXTransport::IsPlayerInGroup\"\r\nBOOL CDirectVoiceDirectXTransport::IsPlayerInGroup( DVID dvidGroup, DVID dvidPlayer )\r\n{\r\n\tif( dvidGroup == DVID_ALLPLAYERS )\r\n\t{\r\n\t\treturn TRUE;\r\n\t}\r\n\r\n\tif( dvidGroup == dvidPlayer )\r\n\t{\r\n\t\treturn TRUE;\r\n\t}\r\n\r\n\treturn (m_lpTransport->IsGroupMember( dvidGroup, dvidPlayer )==DV_OK);\r\n}\r\n\r\n#undef DPF_MODNAME\r\n#define DPF_MODNAME \"CDirectVoiceDirectXTransport::MigrateHost\"\r\n//\r\n// MigrateHost\r\n//\r\n// Updates server DPID to match new host\r\n//\r\nHRESULT CDirectVoiceDirectXTransport::MigrateHost( DVID dvidNewHost )\r\n{\r\n\tDPFX(DPFPREP, DVF_HOSTMIGRATE_DEBUG_LEVEL, \"HOST MIGRATION: Setting host to 0x%x\", dvidNewHost );\t\r\n\tm_dpidServer = dvidNewHost;\r\n\r\n\treturn DV_OK;\r\n}\r\n\r\n#undef DPF_MODNAME\r\n#define DPF_MODNAME \"CDirectVoiceDirectXTransport::MigrateHost\"\r\nDVID CDirectVoiceDirectXTransport::GetLocalID() \r\n{ \r\n m_dwDuumy = m_dpidLocalPlayer;\r\n return m_dpidLocalPlayer; \r\n}\r\n\r\n\r\n</code>", "source": "SynthCodeNetNoImageTag", "user": "<code>" } ]
[ { "assistant": "<code><loc_0><loc_0><loc_500><loc_500><_Python_>A, B, C = tuple(map(int, input().split()))\nif A < C < B or B < C < A:\n print(\"Yes\")\nelse:\n print(\"No\")</code>", "source": "SynthCodeNetNoImageTag", "user": "Convert code to text." } ]
[ { "assistant": "<code><loc_0><loc_0><loc_500><loc_500><_JavaScript_>// JavaScript Document\n\n$(document).ready(function() {\n $('#interviewForm').bootstrapValidator({\n feedbackIcons: {\n valid: 'fa fa-check-circle',\n invalid: 'fa fa-times-circle',\n validating: 'fa fa-refresh'\n },\n fields: {\n 'minOneChk[]': {\n validators: {\n choice: {\n min: 1,\n message: 'Please select atleast one!'\n }\n }\n },\n\t\t\tfirstName: {\n group: '.group',\n validators: {\n notEmpty: {\n message: 'The first name is required and cannot be empty'\n }\n }\n },\n lastName: {\n // The \"group\" option can be set via HTML attribute\n // <input type=\"text\" class=\"form-control\" name=\"lastName\" data-bv-group=\".group\" />\n validators: {\n notEmpty: {\n message: 'The last name is required and cannot be empty'\n }\n }\n },\n\t\t\tgender: {\n validators: {\n notEmpty: {\n message: 'The gender is required'\n }\n }\n },\n\t\t\tname: {\n validators: {\n notEmpty: {\n message: 'Please enter your name.'\n }\n }\n },\n\t\t\tbuyer_city: {\n validators: {\n notEmpty: {\n message: 'Please enter your city.'\n }\n }\n },\n\t\t\tbuyer_apt: {\n validators: {\n notEmpty: {\n message: 'Please enter type.'\n }\n }\n },\n\t\t\tbuyer_street: {\n validators: {\n notEmpty: {\n message: 'Please enter street.'\n }\n }\n },\n\t\t\tstate: {\n validators: {\n notEmpty: {\n message: 'Please select state.'\n }\n }\n },\n acceptTerms: {\n validators: {\n notEmpty: {\n message: 'You have to accept the terms and policies'\n }\n }\n },\n\t\t\temail: {\n validators: {\n notEmpty: {\n message: 'Please enter your email address'\n },\n email: {\n message: 'The input is not a valid email address'\n }\n }\n },\n\t\t\temailid: {\n validators: {\n\t\t\t\t\tnotEmpty: {\n message: 'Please enter your email address'\n },\n emailid: {\n message: 'The input is not a valid US email address'\n }\n }\n },\n\t\t\t/*phoneNumber: {\n validators: {\n phone: {\n\t\t\t\t\t\tcountry: 'US',\n message: 'The value can contain only digits'\n }\n }\n },*/\n\t\t\t phoneNumber: {\n validators: {\n\t\t\t\t\tnotEmpty: {\n message: 'Please enter your phone number'\n },\n phone: {\n\t\t\t\t\t\tmin: 10,\n\t\t\t\t\t\tcountry: 'US',\n message: 'The input is not a valid US phone number'\n }\n }\n },\n phoneNumberUK: {\n \tvalidators: {\n\t\t\t\t\t notEmpty: {\n message: 'Please enter your phone number'\n },\n\t\t\t\t\t\tphone: {\n message: 'The input is not a valid UK phone number',\n \t\t\tcountry: 'GB'\n \t\t}\n \t}\n },\n\t\t\tzipCode: {\n validators: {\n\t\t\t\t\tnotEmpty: {\n message: 'Please enter your zip code'\n },\n zipCode: {\n country: 'US',\n message: 'The input is not a valid US zip code'\n }\n }\n },\n\t\t\tfirstFile: {\n validators: {\n\t\t\t\t\tnotEmpty: {\n message: 'Please select a file'\n },\n\t\t\t\t}\n },\n\t\t\tpassword: {\n validators: {\n notEmpty: {\n message: 'The password is required and can\\'t be empty'\n },\n identical: {\n field: 'confirmPassword',\n \n }\n }\n },\n confirmPassword: {\n validators: {\n notEmpty: {\n message: 'The confirm password is required and can\\'t be empty'\n },\n identical: {\n field: 'password',\n message: 'The password and its confirm are not the same'\n }\n }\n },\n\t\t\twebsite: {\n validators: {\n notEmpty: {\n message: 'The input is not a valid URL'\n }\n }\n },\n\t\t\t\n }\n\t});\n});\n\t\t</code>", "source": "SynthCodeNetNoImageTag", "user": "Convert code to text." } ]
[ { "assistant": "<code><loc_0><loc_0><loc_500><loc_500><_Java_>public class Main\n{\n\n public static void main(String[] args) throws IOException\n {\n BufferedReader r = new BufferedReader(new InputStreamReader(System.in), 1);\n String s = r.readLine();\n int n = Integer.parseInt(s);\n s = r.readLine();\n long a[] = new long[200001];\n String[] sl = s.split(\"[\\\\s]+\");\n for(int i = 0; i < n; i++)\n {\n a[i] = Long.parseLong(sl[i]);\n }\n\n for(int i = 0; i < n; i++)\n {\n a[i] -= i + 1;\n }\n\n //System.out.println(Arrays.toString(a));\n\n long m = 0;\n for(int i = 0; i < n; i++)\n {\n m += a[i];\n }\n m /= n;\n\n long min = Long.MAX_VALUE;\n\n for(int j = -7; j <= 7; j++)\n {\n long t = 0;\n for(int i = 0; i < n; i++)\n {\n t += Math.abs(a[i] - m + j);\n }\n min = Math.min(min, t);\n }\n\n System.out.println(min);\n }\n\n}</code>", "source": "SynthCodeNetNoImageTag", "user": "Convert code to text." } ]
[ { "assistant": "<loc_0><loc_0><loc_500><loc_500><_JavaScript_>(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"babylonjs\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine(\"babylonjs-materials\", [\"babylonjs\"], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"babylonjs-materials\"] = factory(require(\"babylonjs\"));\n\telse\n\t\troot[\"MATERIALS\"] = factory(root[\"BABYLON\"]);\n})((typeof self !== \"undefined\" ? self : typeof global !== \"undefined\" ? global : this), function(__WEBPACK_EXTERNAL_MODULE_babylonjs_Materials_effect__) {\nreturn /******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId]) {\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/ \t\t}\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\ti: moduleId,\n/******/ \t\t\tl: false,\n/******/ \t\t\texports: {}\n/******/ \t\t};\n/******/</code>", "source": "SynthCodeNetNoImageTag", "user": "<code>" } ]
[ { "assistant": "<code><loc_0><loc_0><loc_500><loc_500><_Java_>/*\n * ******************************************************************************\n * *\n * *\n * * This program and the accompanying materials are made available under the\n * * terms of the Apache License, Version 2.0 which is available at\n * * https://www.apache.org/licenses/LICENSE-2.0.\n * *\n * * See the NOTICE file distributed with this work for additional\n * * information regarding copyright ownership.\n * * Unless required by applicable law or agreed to in writing, software\n * * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\n * * License for the specific language governing permissions and limitations\n * * under the License.\n * *\n * * SPDX-License-Identifier: Apache-2.0\n * *****************************************************************************\n */\n\npackage org.nd4j.autodiff.samediff;\n\npublic interface SameDiffNoArgSingleLambda {\n SDVariable define(SameDiff sameDiff);\n}\n</code>", "source": "SynthCodeNetNoImageTag", "user": "Convert code to text." } ]
[ { "assistant": "<loc_0><loc_0><loc_500><loc_500><_SQL_>-- update aws tags leaving only enabled keys\nwith cte_enabled_keys as (\n select coalesce(array_agg(key), '{}'::text[])::text[] as keys\n from {{schema | sqlsafe}}.reporting_awsenabledtagkeys\n)\nupdate {{schema | sqlsafe}}.reporting_awscostentrylineitem_daily_summary as lids\n set tags = tags - array_subtract(array(select jsonb_object_keys(tags))::text[], keys::text[])\n from cte_enabled_keys as ek</code>", "source": "SynthCodeNetNoImageTag", "user": "<code>" } ]
[ { "assistant": "<loc_0><loc_0><loc_500><loc_500><_HTML_><meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\">\n<meta name=\"robots\" content=\"noindex, nofollow\">\n</head>\n<body>\n<h6 class=\"heading\"><span class=\"type\">Paragraph</span></h6>\n<p>eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee</p>\n<span class=\"incontext\"><a href=\"section-7.html#p-887\">in-context</a></span>\n</body>\n</html>\n</code>", "source": "SynthCodeNetNoImageTag", "user": "<code>" } ]
[ { "assistant": "<loc_0><loc_0><loc_500><loc_500><_Python_>def zero_origin(s: str):\n return int(s) - 1\n\n\nclass UnionFindTree:\n \"\"\"Union Find Tree for disjoint-set data structure.\n\n Args:\n n (int): number of the vertices.\n \"\"\"\n def __init__(self, n: int):\n self.parent = list(range(n))\n self.rank = [0] * n\n self.size = [1] * n\n\n def find(self, i: int) -> int:\n if self.parent[i] != i:\n self.parent[i] = self.find(self.parent[i])\n return self.parent[i]\n\n def unite(self, i: int, j: int):\n ri = self.find(i)\n rj = self.find(j)\n size = self.size[ri] + self.size[rj]\n self.size[ri] = size\n self.size[rj] = size\n if ri != rj:\n if self.rank[ri] < self.rank[rj]:\n self.parent[ri] = rj\n else:\n self.parent[rj] = ri\n if self.rank[ri] == self.rank[rj]:\n self.rank[ri] += 1\n\n def is_same(self, i: int, j: int) -> bool:\n return self.find(i) == self.find(j)\n\n\nn, m = map(int, input().split())\nuft = UnionFindTree(n)\nfor _ in range(m):\n a, b = map(zero_origin, input().split())\n uft.unite(a, b)\nprint(max(uft.size))</code>", "source": "SynthCodeNetNoImageTag", "user": "<code>" } ]
[ { "assistant": "<code><loc_0><loc_0><loc_500><loc_500><_C#_> /// <summary>\n /// Gets or sets unique identifier of the user who created the record.\n /// </summary>\n [JsonProperty(PropertyName = \"_createdby_value\")]\n public string _createdbyValue { get; set; }\n\n /// <summary>\n /// Gets or sets time zone code that was in use when the record was\n /// created.\n /// </summary>\n [JsonProperty(PropertyName = \"utcconversiontimezonecode\")]\n public int? Utcconversiontimezonecode { get; set; }\n\n /// <summary>\n /// Gets or sets date and time that the record was migrated.\n /// </summary>\n [JsonProperty(PropertyName = \"overriddencreatedon\")]\n public System.DateTimeOffset? Overriddencreatedon { get; set; }\n\n /// <summary>\n /// Gets or sets date and time when the record was created.\n /// </summary>\n [JsonProperty(PropertyName = \"createdon\")]\n public System.DateTimeOffset? Createdon { get; set; }\n\n /// <summary>\n /// </summary>\n [JsonProperty(PropertyName = \"versionnumber\")]\n public string Versionnumber { get; set; }\n\n /// <summary>\n /// Gets or sets exchange rate for the currency associated with the\n /// bookingstatus with respect to the base currency.\n /// </summary>\n [JsonProperty(PropertyName = \"exchangerate\")]\n public decimal? Exchangerate { get; set; }\n\n /// <summary>\n /// Gets or sets sequence number of the import that created this\n /// record.\n /// </summary>\n [JsonProperty(PropertyName = \"importsequencenumber\")]\n public int? Importsequencenumber { get; set; }\n\n /// <summary>\n /// Gets or sets for internal use only.\n /// </summary>\n [JsonProperty(PropertyName = \"timezoneruleversionnumber\")]\n public int? Timezoneruleversionnumber { get; set; }\n\n /// <summary>\n /// Gets or sets unique identifier of the booking status.\n /// </summary>\n [JsonProperty(PropertyName = \"bookingstatusid\")]\n public string Bookingstatusid { get; set; }\n\n /// <summary>\n /// Gets or sets unique identifier for the user that owns the record.\n /// </summary>\n [JsonProperty(PropertyName = \"_owninguser_value\")]\n public string _owninguserValue { get; set; }\n\n /// <summary>\n /// Gets or sets unique identifier of the user or team who owns the\n /// record.\n /// </summary>\n [JsonProperty(PropertyName = \"_ownerid_value\")]\n public string _owneridValue { get; set; }\n\n /// <summary>\n /// Gets or sets unique identifier of the user who modified the record.\n /// </summary>\n [JsonProperty(PropertyName = \"_modifiedby_value\")]\n public string _modifiedbyValue { get; set; }\n\n /// <summary>\n /// Gets or sets date and time when the record was modified.\n /// </summary>\n [JsonProperty(PropertyName = \"modifiedon\")]\n public System.DateTimeOffset? Modifiedon { get; set; }\n\n /// <summary>\n /// Gets or sets unique identifier of the delegate user who modified\n /// the record.\n /// </summary>\n [JsonProperty(PropertyName = \"_modifiedonbehalfby_value\")]\n public string _modifiedonbehalfbyValue { get; set; }\n\n /// <summary>\n /// Gets or sets unique identifier for the business unit that owns the\n /// record\n /// </summary>\n [JsonProperty(PropertyName = \"_owningbusinessunit_value\")]\n public string _owningbusinessunitValue { get; set; }\n\n /// <summary>\n /// Gets or sets select whether the booking status should be proposed,\n /// committed or canceled.\n /// </summary>\n [JsonProperty(PropertyName = \"status\")]\n public int? Status { get; set; }\n\n /// <summary>\n /// Gets or sets type the name of the booking status.\n /// </summary>\n [JsonProperty(PropertyName = \"name\")]\n public string Name { get; set; }\n\n /// <summary>\n /// Gets or sets unique identifier for the team that owns the record.\n /// </summary>\n [JsonProperty(PropertyName = \"_owningteam_value\")]\n public string _owningteamValue { get; set; }\n\n /// <summary>\n /// Gets or sets status of the Booking Status\n /// </summary>\n [JsonProperty(PropertyName = \"statecode\")]\n public int? Statecode { get; set; }\n\n /// <summary>\n /// Gets or sets exchange rate for the currency associated with the\n /// BookingStatus with respect to the base currency.\n /// </summary>\n [JsonProperty(PropertyName = \"_transactioncurrencyid_value\")]\n public string _transactioncurrencyidValue { get; set; }\n\n /// <summary>\n /// </summary>\n [JsonProperty(PropertyName = \"createdbyname\")]\n public MicrosoftDynamicsCRMsystemuser Createdbyname { get; set; }\n\n /// <summary>\n /// </summary>\n [JsonProperty(PropertyName = \"createdonbehalfbyname\")]\n public MicrosoftDynamicsCRMsystemuser Createdonbehalfbyname { get; set; }\n\n /// <summary>\n /// </summary>\n [JsonProperty(PropertyName = \"modifiedbyname\")]\n public MicrosoftDynamicsCRMsystemuser Modifiedbyname { get; set; }\n\n /// <summary>\n /// </summary>\n [JsonProperty(PropertyName = \"modifiedonbehalfbyname\")]\n public MicrosoftDynamicsCRMsystemuser Modifiedonbehalfbyname { get; set; }\n\n /// <summary>\n /// </summary>\n [JsonProperty(PropertyName = \"owninguser\")]\n public MicrosoftDynamicsCRMsystemuser Owninguser { get; set; }\n\n /// <summary>\n /// </summary>\n [JsonProperty(PropertyName = \"owningteam\")]\n public MicrosoftDynamicsCRMteam Owningteam { get; set; }\n\n /// <summary>\n /// </summary>\n [JsonProperty(PropertyName = \"ownerid\")]\n public MicrosoftDynamicsCRMprincipal Ownerid { get; set; }\n\n /// <summary>\n /// </summary>\n [JsonProperty(PropertyName = \"owningbusinessunit\")]\n public MicrosoftDynamicsCRMbusinessunit Owningbusinessunit { get; set; }\n\n /// <summary>\n /// </summary>\n [JsonProperty(PropertyName = \"bookingstatus_DuplicateMatchingRecord\")]\n public IList<MicrosoftDynamicsCRMduplicaterecord> BookingstatusDuplicateMatchingRecord { get; set; }\n\n /// <summary>\n /// </summary>\n [JsonProperty(PropertyName = \"bookingstatus_DuplicateBaseRecord\")]\n public IList<MicrosoftDynamicsCRMduplicaterecord> BookingstatusDuplicateBaseRecord { get; set; }\n\n /// <summary>\n /// </summary>\n [JsonProperty(PropertyName = \"bookingstatus_AsyncOperations\")]\n public IList<MicrosoftDynamicsCRMasyncoperation> BookingstatusAsyncOperations { get; set; }\n\n /// <summary>\n /// </summary>\n [JsonProperty(PropertyName = \"bookingstatus_BulkDeleteFailures\")]\n public IList<MicrosoftDynamicsCRMbulkdeletefailure> BookingstatusBulkDeleteFailures { get; set; }\n\n /// <summary>\n /// </summary>\n [JsonProperty(PropertyName = \"bookingstatus_bookableresourcebooking_BookingStatus\")]</code>", "source": "SynthCodeNetNoImageTag", "user": "Convert code to text." } ]
[ { "assistant": "<loc_0><loc_0><loc_500><loc_500><_C_> * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\n#ifndef DEBUG_H\n#define DEBUG_H\n\n#include <types.h>\n\n#ifdef NO_ASSERTS\n#define ASSERT(condition)\n#else\n#define ASSERT(condition) if (!(condition)) assert(__FILE__, __LINE__, __FUNCTION__, #condition);\n#endif\n\nvoid debug(const char *format, ...);\nvoid assert(const char *file, u32_t line, const char *function, const char *condition);\n\n#endif\n</code>", "source": "SynthCodeNetNoImageTag", "user": "<code>" } ]
[ { "assistant": "<loc_0><loc_0><loc_500><loc_500><_Nim_>import strutils\nlet code_0 = 0\nlet code_1 = 1\nlet l_a = @[code_0, code_1]\nlet code_a = \"a\"\nlet code_b = \"b\"\nlet l_b = @[code_a, code_b]\nproc main() =\n for i in l_a:\n echo i\n for j in l_b:\n echo j\n if \"a\" in @[\"a\", \"b\"]:\n echo \"OK\"\n\n\nmain()\n</code>", "source": "SynthCodeNetNoImageTag", "user": "<code>" } ]