text stringlengths 25 2.19k | embedding listlengths 768 768 |
|---|---|
def _ is _ url ( url : str ) - > bool : try : return parse _ url ( url ). scheme in _ valid _ urls except exception : return false | [
-0.6690593361854553,
0.579249918460846,
0.38943180441856384,
0.47723400592803955,
-0.3301760256290436,
0.5200471878051758,
-0.617789626121521,
0.36110323667526245,
0.7178482413291931,
-0.2508101463317871,
-0.11095590144395828,
-0.034235820174217224,
-0.4297633469104767,
-0.3156941533088684... |
def _ _ range _ query ( self, db, current _ point ) : def is _ point _ in _ range ( other _ point ) : return self. dist _ func ( current _ point. point, other _ point. point ) < = self. epsilon return list ( filter ( is _ point _ in _ range, db ) ) | [
-0.3855087459087372,
-1.1576447486877441,
0.38216686248779297,
0.7489998936653137,
0.24183252453804016,
0.7628462314605713,
-0.6236973404884338,
0.361071914434433,
0.11170726269483566,
1.307903528213501,
0.11095964908599854,
-0.24463669955730438,
-0.98603355884552,
-0.11206047981977463,
... |
def learn _ graph ( self, labels = none ) : self. _ method. fit ( self. _ data ) self. _ adjacency _ matrix = self. _ method. adjacency _ matrix _ # if labels provided if labels is not none : self. _ labels = labels self. _ graph _ dot = adjacency _ matrix _ to _ graph ( self. _ adjacency _ matrix, self. _ labels ) # r... | [
-0.4623365104198456,
-0.32197290658950806,
0.3982749283313751,
-0.7879207730293274,
-0.6078319549560547,
0.03962637484073639,
0.4004164934158325,
-0.560348391532898,
0.18191424012184143,
-0.8618283867835999,
0.3511752784252167,
0.7632988691329956,
0.2300020307302475,
-0.7469688057899475,
... |
def get _ z ( self ) : return _ z = none with self. lock : return _ z = self. _ _ get _ z _ _ ( ) return return _ z | [
-0.7589899301528931,
-0.6612449288368225,
0.3808229863643646,
1.131649136543274,
-0.4794951379299164,
-1.175916314125061,
1.050065517425537,
-1.2307966947555542,
0.5656194686889648,
-1.179949164390564,
-0.2501806318759918,
0.8673862814903259,
-0.5370408892631531,
-1.060184359550476,
0.24... |
def archive ( self ) : self. status = " archived " | [
0.9372631311416626,
-0.96673583984375,
0.21528545022010803,
-0.4399888813495636,
0.20258855819702148,
1.1660749912261963,
0.3459240198135376,
1.8597815036773682,
-0.34682929515838623,
-0.16082429885864258,
-0.5226917266845703,
1.5251444578170776,
1.0165497064590454,
0.8037289977073669,
-... |
def get _ gunw _ array ( filename : union [ str, path ], nodata : optional [ float ] = none, subset : optional [ tuple ] = none ) - > ndarray : # use gdal to read gunw netcdf ds = gdal. open ( filename, gdal. ga _ readonly ) data = ds. readasarray ( ) # close ds = none # subset array if subset : data = data [ subset ] ... | [
-0.036122072488069534,
-0.38674601912498474,
0.535338819026947,
-0.09260815382003784,
-0.026928316801786423,
0.6655606627464294,
-0.3316946029663086,
-0.6301298141479492,
-1.0910956859588623,
0.4313444495201111,
0.6516485810279846,
1.4530893564224243,
0.13151106238365173,
0.113090254366397... |
def parameters ( self ) - >'outputs. memcacheparametersresponse': return pulumi. get ( self, " parameters " ) | [
0.0035844550002366304,
0.19943580031394958,
0.39841675758361816,
-0.2534759044647217,
0.8502235412597656,
0.357515811920166,
-0.23783381283283234,
0.24755612015724182,
0.5945816040039062,
0.7822877764701843,
-0.3789635896682739,
1.0333682298660278,
-0.5312042236328125,
-0.41435134410858154... |
def inv _ transform ( x, a, b ) : return ( 2 * x - b - a ) / ( b - a ) | [
0.5285166501998901,
-0.05596192926168442,
0.484453409910202,
-0.030776824802160263,
-0.07095008343458176,
-0.255569189786911,
-0.6840729117393494,
0.3044794797897339,
-0.7108917236328125,
0.6090840101242065,
-0.9058111906051636,
0.770738959312439,
-0.3098258078098297,
-1.6223973035812378,
... |
def get ( self, id _ webuser = none, is _ active = none ) : with database ( ) as db : if id _ webuser is none and is _ active is none : data = db. query ( table ). all ( ) elif id _ webuser is none : data = db. query ( table ). filter ( table. is _ active = = is _ active ). all ( ) else : data = db. query ( table ). ge... | [
-0.40810853242874146,
0.17962096631526947,
0.6877842545509338,
0.6579163670539856,
-0.44078218936920166,
-0.17000269889831543,
-0.7834715843200684,
0.628243088722229,
-0.18310658633708954,
0.1825021654367447,
-0.23668739199638367,
0.34580010175704956,
-0.21505098044872284,
0.13166029751300... |
def _ _ init _ _ ( self ) : self. root = none | [
0.37976574897766113,
-0.7266948223114014,
0.3582582473754883,
-0.1664247214794159,
-0.060051776468753815,
-0.45955485105514526,
0.21612367033958435,
0.6621246337890625,
0.2750079929828644,
-0.5447973608970642,
-1.2272112369537354,
1.021427869796753,
-0.7530468702316284,
1.5763148069381714,... |
def context _ testcases ( ) : context = {'projects': project. objects. filter ( archive = false ),'testrails': testrailconfiguration. objects. all ( ), } return context | [
0.656797468662262,
0.33469831943511963,
0.3237907886505127,
0.37601202726364136,
0.5249588489532471,
0.7747358083724976,
0.6867031455039978,
-0.2063370943069458,
0.176055446267128,
0.3988743722438812,
0.00713217630982399,
-0.8475759029388428,
-0.12901529669761658,
-0.13795895874500275,
-... |
async def get _ page ( self, *, page : optional [ int ] = none ) - >'page': await self. _ calculate ( ) _ page = page or self. _ page page _ number = self. _ validate _ page _ number ( number = _ page ) offset = ( page _ number - 1 ) * self. _ limit if self. _ order _ by = ='desc': order = desc ( self. _ sort _ by ) el... | [
-0.45243385434150696,
0.750627875328064,
0.5344297289848328,
0.12156414240598679,
0.5832703113555908,
-0.4313558042049408,
-0.20093490183353424,
-0.3489621579647064,
0.15254072844982147,
-0.5282050967216492,
0.9853124618530273,
-0.12179920822381973,
-0.3940090835094452,
-0.2458864003419876... |
def _ add _ note ( text : str, user : karmauser ) - > str : _, note _ msg = _ parse _ note _ cmd ( text ) if not note _ msg : return f " sorry { user. username }, could not find a note in your message. " if _ note _ exists ( note _ msg, user ) : return f " sorry { user. username }, you already have an identical note. "... | [
0.2267945259809494,
0.6638935208320618,
0.5489325523376465,
0.34767431020736694,
0.058407001197338104,
0.14163507521152496,
-0.003948249388486147,
-0.06854093074798584,
0.26960498094558716,
-0.026850439608097076,
0.18762339651584625,
0.09029322862625122,
-0.9341495037078857,
-0.09230300039... |
def sparse _ segment _ sum ( data, indices, segment _ ids, name = none, num _ segments = none ) : if num _ segments is not none : return gen _ math _ ops. sparse _ segment _ sum _ with _ num _ segments ( data = data, indices = indices, segment _ ids = segment _ ids, num _ segments = num _ segments, name = name ) else :... | [
-0.055030763149261475,
0.03558098524808884,
0.5286482572555542,
0.07936244457960129,
0.3893669843673706,
-0.6952306032180786,
0.3352087140083313,
0.074839286506176,
1.1498737335205078,
0.9224998354911804,
-0.3113615810871124,
-0.12941838800907135,
-0.2418154627084732,
-1.3795545101165771,
... |
def set _ initial ( self, kwargs ) : if'initial'not in kwargs : kwargs ['initial'] = { } self. set _ initial _ attribute _ values ( kwargs ) | [
-0.06295611709356308,
-0.31116417050361633,
0.4544776678085327,
0.006757350638508797,
0.2689218819141388,
0.30450326204299927,
-0.05299682915210724,
0.7454297542572021,
-0.6548957228660583,
0.14132125675678253,
-0.6706029772758484,
0.7643609642982483,
-0.25386351346969604,
1.34981894493103... |
def test _ list _ decimal _ enumeration _ nistxml _ sv _ iv _ list _ decimal _ enumeration _ 1 _ 2 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / list / decimal / schema + instance / nistschema - sv - iv - list - decimal - enumeration - 1. xsd ", instance = " nistdata / list / deci... | [
-0.9130898118019104,
-0.9240882396697998,
0.6393822431564331,
0.878373384475708,
-0.030632508918642998,
-0.26085177063941956,
0.059267763048410416,
0.38657739758491516,
0.6403853297233582,
0.16384544968605042,
-0.8934633135795593,
-0.12306062132120132,
0.37104836106300354,
0.71499955654144... |
def dispatch ( self, request, pk ) : self. course = get _ object _ or _ 404 ( course, id = pk, owner = request. user ) return super ( ). dispatch ( request, pk ) | [
-0.6761617064476013,
0.20780329406261444,
0.5656228065490723,
0.384281724691391,
0.8719205856323242,
0.7008500099182129,
0.39625754952430725,
0.31730106472969055,
0.4782482385635376,
-0.12274954468011856,
0.325546532869339,
0.37343668937683105,
1.3422350883483887,
-0.6533058881759644,
-1... |
def zeroinput ( self ) : for i in self. keytable : i. getstatus ( ) | [
-0.6680396795272827,
-0.309424489736557,
0.1988498717546463,
0.7164943814277649,
0.39597949385643005,
0.8265932202339172,
0.43646377325057983,
0.34537625312805176,
-1.1950010061264038,
0.10797453671693802,
-0.8075417876243591,
0.34490498900413513,
-0.6490387916564941,
1.1462984085083008,
... |
def modelf _ reader ( vocab, config ) : from jtr. jack. tasks. kbp. model _ f import modelfinputmodule, modelfmodelmodule, modelfoutputmodule, kbpreader shared _ resources = sharedvocabandconfig ( vocab, config ) input _ module = modelfinputmodule ( shared _ resources ) model _ module = modelfmodelmodule ( shared _ res... | [
0.3503692150115967,
-0.3225906491279602,
0.4110971987247467,
0.2936491370201111,
-0.7288570404052734,
-0.5169119238853455,
0.6534887552261353,
-0.36188507080078125,
0.03322383388876915,
0.37383484840393066,
-0.09840407222509384,
-0.6452696919441223,
-0.012429723516106606,
0.330171614885330... |
def adjust _ learning _ rate ( optimizer, epoch, args ) : lr = args. lr if 20 < epoch < = 30 : lr = 0. 0001 elif 30 < epoch : lr = 0. 00001 for param _ group in optimizer. param _ groups : param _ group ['lr'] = lr print ( " learning rate - > { } \ n ". format ( lr ) ) | [
0.3349820077419281,
-0.33321282267570496,
0.4709851145744324,
-0.9213058352470398,
0.3213917016983032,
0.6641807556152344,
-0.5335147976875305,
0.3383074998855591,
-0.5767515301704407,
0.30998364090919495,
0.7392129302024841,
0.8955242037773132,
-0.173202782869339,
1.325825810432434,
0.1... |
def enddocument ( self ) : if self. _ previous _ tag : self. _ make _ callback ( self. _ previous _ tag ) | [
0.6138603091239929,
0.3374440371990204,
0.5234596133232117,
-0.6253870725631714,
0.2974666953086853,
-0.3752360939979553,
1.0314688682556152,
-0.14671798050403595,
-0.05941316857933998,
0.08809377253055573,
-0.09453098475933075,
0.10455658286809921,
-0.8929521441459656,
1.223989486694336,
... |
def media _ play ( self ) - > none : self. _ spotify. start _ playback ( ) | [
0.6788857579231262,
-0.8726142644882202,
0.3581620752811432,
0.5822214484214783,
1.6231560707092285,
0.9431996941566467,
0.370320588350296,
0.48446589708328247,
-0.14073891937732697,
-0.38601788878440857,
0.5787487030029297,
0.5183913707733154,
-0.014324226416647434,
-0.32775256037712097,
... |
def test _ atomic _ hex _ binary _ min _ length _ 4 _ nistxml _ sv _ iv _ atomic _ hex _ binary _ min _ length _ 5 _ 3 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / hexbinary / schema + instance / nistschema - sv - iv - atomic - hexbinary - minlength - 5. xsd ", instance ... | [
0.17927640676498413,
-0.03926515579223633,
0.42868009209632874,
0.31341618299484253,
-0.3214940130710602,
0.3339359164237976,
-0.5409399271011353,
-0.5803170800209045,
0.2908325493335724,
0.14454911649227142,
-0.7388774752616882,
-0.6566885709762573,
-0.926831841468811,
0.2894459068775177,... |
def vertexdata ( s, e ) : num, xyz = gen123 ( ), genxyz ( ) for i in range ( s, e ) : yield i, num. next ( ), xyz. next ( ) | [
-0.7779408693313599,
0.45102161169052124,
0.28593575954437256,
-0.19665592908859253,
-0.30068036913871765,
0.7396203875541687,
-0.020508557558059692,
0.026612984016537666,
0.13842210173606873,
-0.16491851210594177,
-0.9387084245681763,
0.16057465970516205,
0.01659921370446682,
-1.049958229... |
def clearcache ( path = none ) : if path is none : _ _ lookup _ cache. clear ( ) else : _ _ lookup _ cache. pop ( path, none ) | [
-0.1044304147362709,
-0.043680205941200256,
0.42517557740211487,
0.12360389530658722,
-0.6411769986152649,
0.10319721698760986,
-0.38839277625083923,
0.5709978938102722,
0.6761890649795532,
0.5838086009025574,
0.3084855377674103,
0.3896043300628662,
-0.3184365928173065,
-0.3473545014858246... |
def do ( self ) : if self. _ _ executed : if not self. _ _ subcommand : basic. log _ message ( " * * * * * * * * * * * * * * * * * * * * * * * * * * " ) basic. log _ message ( " redo : " + str ( self. _ _ class _ _. _ _ name _ _ ) ) self. _ redo ( ) else : if not self. _ _ subcommand : basic. log _ message ( " * * * * ... | [
-0.3457179665565491,
0.42451536655426025,
1.301377534866333,
0.22246603667736053,
0.8718041181564331,
-0.006712181027978659,
0.5085256099700928,
-0.014189481735229492,
0.10397135466337204,
-0.16798552870750427,
-0.6084029674530029,
0.568001389503479,
-0.1689033806324005,
0.5326521396636963... |
def test _ sync _ no _ change ( synced _ repo _ and _ workspace ) : runner = clirunner ( ) result = runner. invoke ( metarepo. cli. cli, [ " sync " ] ) assert " already up to date " in result. output | [
-0.17910438776016235,
0.42849528789520264,
0.2938072681427002,
0.4242384433746338,
0.404033899307251,
0.5046161413192749,
0.5403235554695129,
-0.9426182508468628,
0.11683131009340286,
-0.17067883908748627,
-0.14749479293823242,
0.921420693397522,
0.7232829928398132,
0.7468348741531372,
-... |
def recipe _ with _ schema ( filename ) : schema _ file = os. path. join ( os. path. dirname ( _ _ file _ _ ),'recipe _ schema. yml') logger. debug ( " checking recipe against schema % s ", schema _ file ) recipe = yamale. make _ data ( filename ) schema = yamale. make _ schema ( schema _ file ) yamale. validate ( sche... | [
0.933502733707428,
-0.4620976746082306,
0.5754197239875793,
0.6565610766410828,
-0.034570302814245224,
0.21691928803920746,
-0.2536253333091736,
1.7707115411758423,
-0.3571678400039673,
0.12256467342376709,
-0.15646924078464508,
0.78262859582901,
0.554315984249115,
0.6050560474395752,
-0... |
def test _ logged _ out _ user _ can _ access _ new _ account _ page ( self ) : # attempt to get to settings page. desired _ url = reverse ('users : new _ account') response = self. client. get ( desired _ url ) # expect successful response. self. assertequal ( response. status _ code, 200 ) | [
-0.2811800241470337,
-0.2403043806552887,
0.1794770210981369,
0.6593888401985168,
0.26686954498291016,
0.44089868664741516,
0.7805662155151367,
-0.9339189529418945,
-0.032740820199251175,
0.09198930859565735,
0.03191790357232094,
0.5648337602615356,
0.9396378397941589,
-0.23280327022075653... |
def from _ dict ( cls, dikt ) - >'reqbody': return util. deserialize _ model ( dikt, cls ) | [
-0.9124590754508972,
0.0676691085100174,
0.3893209397792816,
-0.005475703161209822,
-0.5929054021835327,
0.274003803730011,
-1.1270467042922974,
-0.582574188709259,
0.7700839638710022,
-0.28766757249832153,
-0.5015159845352173,
-0.7706438899040222,
0.06388411670923233,
0.09477553516626358,... |
def test _ atomic _ id _ pattern _ 1 _ nistxml _ sv _ iv _ atomic _ id _ pattern _ 2 _ 3 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / id / schema + instance / nistschema - sv - iv - atomic - id - pattern - 2. xsd ", instance = " nistdata / atomic / id / schema + instance... | [
-0.028829025104641914,
-0.22605621814727783,
0.5338152647018433,
0.7368279099464417,
-0.22703911364078522,
0.5174453854560852,
0.11312636733055115,
-0.11166054755449295,
0.33621349930763245,
0.7228833436965942,
-0.23285630345344543,
0.29056456685066223,
0.25924015045166016,
-0.240302905440... |
def split _ records ( self ) : root = self. tree. getroot ( ) self. statement. account _ id = root [ 0 ] [ 0 ]. text return root [ 1 : - 1 ] | [
0.16360625624656677,
-0.0017243041656911373,
0.3935588598251343,
-0.5602631568908691,
0.23192906379699707,
-0.3750259280204773,
0.4700545370578766,
0.45000970363616943,
0.3947162330150604,
0.5716326236724854,
0.6511805653572083,
0.4953043758869171,
-1.4717692136764526,
-0.5677016377449036,... |
def solve ( grid ) : input _ grid = grid _ values ( grid ) return search ( input _ grid ) | [
-0.6451584696769714,
1.1695170402526855,
0.14644546806812286,
0.6981699466705322,
0.55973881483078,
-0.7985869646072388,
-0.4789296090602875,
-0.6548847556114197,
-0.9655685424804688,
-0.18758253753185272,
0.03527320548892021,
-0.16097687184810638,
-0.8391463160514832,
0.6329503059387207,
... |
def displaybrailleforobject ( self, obj ) : regions = self. braillegenerator. generatebraille ( obj ) self. displaybrailleregions ( regions ) | [
0.865661084651947,
-0.7182026505470276,
0.3109484910964966,
0.038962677121162415,
-0.3515489995479584,
1.0084158182144165,
0.5107823610305786,
-0.4467111825942993,
0.5740113258361816,
-0.12080876529216766,
-0.47808706760406494,
0.5857612490653992,
-0.1910504549741745,
0.6278229355812073,
... |
def test _ atomic _ hex _ binary _ length _ 1 _ nistxml _ sv _ iv _ atomic _ hex _ binary _ length _ 2 _ 1 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / hexbinary / schema + instance / nistschema - sv - iv - atomic - hexbinary - length - 2. xsd ", instance = " nistdata / ... | [
-0.0344359464943409,
-0.5624458193778992,
0.4800339639186859,
0.9544581174850464,
-0.0027813510969281197,
0.35588496923446655,
-0.20218057930469513,
0.5179216265678406,
-0.4692108631134033,
0.2950111925601959,
-0.6278923153877258,
-0.12931829690933228,
0.4719594120979309,
0.797980070114135... |
def set _ cursor _ position ( self, column, row ) : self. _ write _ command ( [ lcdbackpack. set _ cursor _ position, column, row ] ) | [
-0.05592280626296997,
-0.0663609430193901,
0.2099626064300537,
0.11643461138010025,
0.5677697062492371,
-0.07112579047679901,
0.2710207402706146,
-0.12735189497470856,
0.2982003390789032,
0.3090006113052368,
-0.44277048110961914,
0.1703111082315445,
-0.6157916188240051,
-0.6938826441764832... |
def decodeascookie ( cookie ) : pattern ='cookie : (? p < key > [ a - za - z0 - 9 + _ \ - / ] + ) = (? p < value > [ a - za - z0 - 9 + _ = \ - / ] * )'match = re. match ( pattern, cookie ) key = match. group ('key') key = key. replace ('+ ','=') value = match. group ('value') key = urlsafe _ b64decode ( key ) value = u... | [
-0.7357487678527832,
0.1572803556919098,
0.6008719205856323,
-0.2599012553691864,
-0.9392464756965637,
-0.7034974098205566,
-0.22168630361557007,
0.37096309661865234,
0.20064695179462433,
0.23990805447101593,
-0.47587594389915466,
0.2837701737880707,
0.546224057674408,
0.21691954135894775,... |
def _ format _ path ( self, s ) : return s | [
-0.2933496832847595,
-1.6926697492599487,
0.3030537962913513,
-0.1926030069589615,
-0.6998450756072998,
0.028454331681132317,
0.6091522574424744,
-0.27459102869033813,
0.8381655216217041,
-0.7424799799919128,
1.6689687967300415,
-0.102828748524189,
-0.1027028039097786,
-0.01573717594146728... |
def display _ on ( self ) : self. _ write _ command ( [ lcdbackpack. display _ on, 0 ] ) | [
1.0839426517486572,
0.012885890901088715,
0.4874030649662018,
0.46461930871009827,
0.36486104130744934,
0.9578902721405029,
0.45381873846054077,
0.3619808554649353,
0.35107576847076416,
-0.23696288466453552,
0.0876169502735138,
1.4995094537734985,
-1.12369704246521,
0.303649365901947,
0.... |
async def get _ password _ reset _ by _ user _ id ( self, user _ id : str ) - > passwordreset : await self. connect _ to _ database ( ) password _ reset _ q = await self. db ['passwordresets']. find _ one ( {'user _ id': str ( user _ id ) } ) if password _ reset _ q : return await self. serializepasswordreset ( passwor... | [
0.4591958522796631,
0.3236587643623352,
0.202679842710495,
0.07889273762702942,
0.4143281877040863,
-1.2098941802978516,
-0.11905594170093536,
-0.7765099406242371,
-0.12691988050937653,
0.5558510422706604,
-0.010250648483633995,
1.4549006223678589,
-0.5156675577163696,
0.36153629422187805,... |
def directory _ files ( path : str ) - > list : files = [ ] for file _ in os. listdir ( path ) : file _ dir = os. path. join ( path, file _ ) if not os. path. isdir ( file _ dir ) : files. append ( file _ dir ) return files | [
0.24636109173297882,
-0.043708909302949905,
0.5372941493988037,
0.8702978491783142,
0.35043099522590637,
-0.08103896677494049,
0.2570495307445526,
-0.12656831741333008,
-0.010354427620768547,
-0.11736830323934555,
-0.48825326561927795,
-0.40404772758483887,
-0.015069073997437954,
0.8672578... |
def test _ put _ cna _ container _ langs ( ) : pos = [ " cna _ descriptions - multipleenlangsdifferentlocale. json ", " cna _ descriptions - multiplesamelangs. json ", # " cna _ problemtypes _ descriptions - multipleenlangsdifferentlocale. json ", # " cna _ problemtypes _ descriptions - multiplesamelangs. json ", ] neg... | [
0.1124974712729454,
-0.04860164225101471,
0.6057688593864441,
0.25356364250183105,
0.4257350564002991,
0.32176145911216736,
0.4280816316604614,
-0.21812187135219574,
0.08674006164073944,
0.5634340643882751,
-0.7177911400794983,
-0.19358393549919128,
0.28569433093070984,
0.37604856491088867... |
def show _ examples ( df, cfg, n = 5 ) : for c in cfg ['anonymize'] ['target _ fields']. split ( ',') : df. where ( col ( c ). isnotnull ( ) ). select ( cfg ['anonymize'] ['target _ id _ key'], * cfg ['anonymize'] ['target _ fields']. split ( ','), " filename " ). show ( n, truncate = false ) | [
-0.33785688877105713,
1.0179171562194824,
0.2778668701648712,
-0.15613463521003723,
0.13648056983947754,
-1.1556612253189087,
0.09811276197433472,
0.5285107493400574,
-0.843346357345581,
1.2120962142944336,
-0.8805491328239441,
0.5651996731758118,
0.8238689303398132,
0.4391596019268036,
... |
def test _ call _ registered _ func ( self ) : # makes sure any exception raised inside the function has no other # exception chained to it exp _ params = 1, 2, 3 def dispatched _ func ( * params ) : raise self. dispatchexc ( params ) dispatcher = xmlrpc. server. simplexmlrpcdispatcher ( ) dispatcher. register _ functi... | [
0.5595711469650269,
1.0833250284194946,
0.7160589098930359,
0.19978323578834534,
1.1034806966781616,
-0.1867808997631073,
-0.023518439382314682,
0.044969040900468826,
0.4454404413700104,
-0.9373257160186768,
-0.7421905398368835,
0.23187589645385742,
-0.1485702097415924,
0.2201584428548813,... |
def filter _ choice ( ) : error = true while error : error = false prompt = input ( " please choose an image filter : \ n 1. convert image to grayscale \ n 2. convert image to vintage \ n q. quit \ n = = = = = > " ) if prompt = = " 1 " or prompt = = " 2 " or prompt = = " q " or prompt = = " q " : return prompt else : e... | [
-1.0014922618865967,
-0.4091389775276184,
0.5477405190467834,
0.08913548290729523,
-0.7208095192909241,
0.33138999342918396,
0.3211284577846527,
-0.8685774803161621,
0.06479420512914658,
0.09825504571199417,
0.4563847780227661,
1.0289345979690552,
-0.2748402953147888,
0.07835235446691513,
... |
def test _ atomic _ base64 _ binary _ pattern _ 3 _ nistxml _ sv _ iv _ atomic _ base64 _ binary _ pattern _ 4 _ 3 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / base64binary / schema + instance / nistschema - sv - iv - atomic - base64binary - pattern - 4. xsd ", instance ... | [
-0.24529105424880981,
0.09005352854728699,
0.5728351473808289,
1.0361641645431519,
0.08941499888896942,
0.16990022361278534,
0.039528705179691315,
-0.24336160719394684,
0.19102607667446136,
0.3557596504688263,
-0.3613332509994507,
-0.33054423332214355,
-0.6718916296958923,
-0.2893368303775... |
def translitera ( self, text ) : phonemes ='' for i in range ( len ( text ) ) : phonemes + = self. in2le. get ( text [ i : i + 2 ], self. in2le. get ( text [ i ], text [ i ] ) ) return phonemes | [
-0.845107913017273,
-0.40754005312919617,
0.4589710235595703,
-0.5708220601081848,
-0.407181054353714,
-0.007459963206201792,
-0.912320613861084,
0.05156806483864784,
0.3966468870639801,
0.5063189268112183,
-0.9040868878364563,
-1.1319048404693604,
-0.9644547700881958,
-0.06283380091190338... |
def setup ( self ) : # create table db. create _ all ( ) | [
0.9787839651107788,
0.5916239619255066,
0.46138685941696167,
0.8408038020133972,
1.6869773864746094,
0.825647234916687,
0.7845789790153503,
0.1473693996667862,
-0.6892436742782593,
0.29523801803588867,
-0.030564654618501663,
-0.5224087834358215,
0.1851995587348938,
0.8019768595695496,
-1... |
def evaluate ( self ) : score = self. whitecount - self. blackcount + ( self. whitekings - self. blackkings ) * 0. 5 return score | [
0.19294922053813934,
-0.3062118887901306,
0.40574896335601807,
-0.47556272149086,
0.5121351480484009,
-0.13923279941082,
0.546360433101654,
-0.11120612919330597,
-0.5385640263557434,
0.8033154010772705,
0.44826361536979675,
-0.05600874871015549,
-0.6222923398017883,
1.0566997528076172,
-... |
def act ( self, player ) : for enemy in enemylist : enemy. act ( player ) | [
-1.9375988245010376,
-1.568131685256958,
0.13914629817008972,
0.44778236746788025,
1.047197699546814,
0.431638240814209,
0.932665228843689,
0.9129064679145813,
-0.06060466170310974,
1.4766514301300049,
-0.588374137878418,
0.21699562668800354,
0.1218816265463829,
0.483095645904541,
-1.335... |
def test _ atomic _ any _ uri _ pattern _ 2 _ nistxml _ sv _ iv _ atomic _ any _ uri _ pattern _ 3 _ 2 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / anyuri / schema + instance / nistschema - sv - iv - atomic - anyuri - pattern - 3. xsd ", instance = " nistdata / atomic / ... | [
-0.24148395657539368,
-0.3934462070465088,
0.5334174633026123,
0.9686979055404663,
-0.3426690399646759,
0.2581258714199066,
-0.5133752822875977,
0.18845359981060028,
0.05728501081466675,
0.22978948056697845,
0.16652454435825348,
-0.08742635697126389,
-0.12869711220264435,
-0.21574100852012... |
def gray2rgb ( img : np. ndarray ) - > np. ndarray : img = img [..., none ] if img. ndim = = 2 else img out _ img = cv2. cvtcolor ( img, cv2. color _ gray2rgb ) return out _ img | [
-0.8279582262039185,
0.10148207098245621,
0.5652573704719543,
0.8037086129188538,
0.8467240929603577,
0.34336981177330017,
0.09298602491617203,
-0.8266523480415344,
0.18006306886672974,
0.910008430480957,
0.21128010749816895,
1.1942138671875,
0.11587940156459808,
1.2125040292739868,
0.76... |
async def set _ room ( self, request ) : payload = await request. post ( ) room = payload. get ( " room " ) self. sonos _ data. set _ room ( room ) return web. response ( text = " ok " ) | [
-1.3951311111450195,
0.8644605875015259,
0.4441339671611786,
1.2913951873779297,
0.9304333925247192,
-0.24377109110355377,
-0.8416627645492554,
0.3221387565135956,
0.26100045442581177,
-0.7452644109725952,
-0.3230503499507904,
1.0290216207504272,
-0.2288009226322174,
0.603487491607666,
-... |
def test _ normal _ conditions _ grow ( self, graph ) : subgraph = strawberryfields. gbs. dense. greedy _ density ( subgraphs = [ [ 0, 1, 4 ] ], graph = graph, target = 4 ) [ 0 ] assert np. allclose ( subgraph, [ 0, 1, 3, 4 ] ) | [
0.48178917169570923,
0.7892346978187561,
0.4394468665122986,
1.0245388746261597,
0.3090289533138275,
0.8965318202972412,
0.2767404615879059,
-0.1621035784482956,
-0.14933902025222778,
-0.834768533706665,
0.450970321893692,
-0.49798819422721863,
-0.4350067973136902,
-0.8597977161407471,
-... |
def rowcount ( self, index = qmodelindex ( ) ) : return len ( self. cars ) | [
-0.48075154423713684,
0.6446710824966431,
0.35158127546310425,
-0.8163596987724304,
0.15632286667823792,
-0.23442798852920532,
-0.602384090423584,
0.5256857872009277,
-0.12022463977336884,
-1.2116323709487915,
-0.3320385813713074,
-0.4659184515476227,
0.1595923751592636,
0.3079943954944610... |
def to _ nearest _ third _ tone ( number ) : semitones = quicktions. fraction ( int ( round ( 3 * number ) ), 3 ) if semitones. denominator = = 3 : semitones = quicktions. fraction ( int ( round ( quicktions. fraction ( 3, 2 ) * number ) ), quicktions. fraction ( 3, 2 ) ) return semitones | [
0.3687175214290619,
0.030354760587215424,
0.3292680084705353,
-0.9973592758178711,
-0.5900447368621826,
-0.2640613913536072,
-0.4940153956413269,
-1.9027906656265259,
0.8652105331420898,
0.3715699017047882,
-0.39830267429351807,
-0.24011285603046417,
0.1103530302643776,
-0.3193032741546631... |
def sample _ from _ z ( self, z _ mu, z _ log _ o ) : return z _ mu + tf. exp ( z _ log _ o ) * self. get _ std _ norm _ samples ( [ self. l, tf. shape ( self. x ) [ 0 ], self. n _ latent ] ) | [
0.33196744322776794,
-0.8423053026199341,
0.4599481225013733,
0.1626145988702774,
-1.5037040710449219,
-0.19392675161361694,
-0.08200562745332718,
0.21466399729251862,
0.5039998888969421,
0.31308770179748535,
0.40984660387039185,
1.0009714365005493,
0.2575002908706665,
-1.0867055654525757,... |
def weekly ( self ) : if self. schedule _ freq _ type = ='weekly': _ freq = self. _ pattern ['freq _ interval'] return {'active _ start _ time': schedulepattern. _ time _ converter ( self. _ pattern ['active _ start _ time'],'% h : % m ', false ),'repeat _ weeks': self. _ pattern ['freq _ recurrence _ factor'],'weekday... | [
-1.2767133712768555,
0.4846019148826599,
0.7607246041297913,
-1.2912943363189697,
-0.4076540768146515,
-0.8326472043991089,
0.09768375754356384,
0.028139155358076096,
0.5022274255752563,
0.2777070105075836,
-0.5138973593711853,
0.14114797115325928,
0.17536771297454834,
-0.2758038341999054,... |
def govpx _ download ( self, download = true ) : if download : self. download _ data ('govpx') | [
0.24873171746730804,
0.4938960671424866,
0.2908024489879608,
0.5286903977394104,
-0.19284293055534363,
1.3961358070373535,
-0.5167337656021118,
-0.268993079662323,
0.41558629274368286,
0.19380395114421844,
0.3487062156200409,
0.16472002863883972,
-0.7565004825592041,
0.29883769154548645,
... |
def test _ atomic _ language _ max _ length _ 3 _ nistxml _ sv _ iv _ atomic _ language _ max _ length _ 4 _ 2 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / language / schema + instance / nistschema - sv - iv - atomic - language - maxlength - 4. xsd ", instance = " nistda... | [
0.4360751509666443,
-0.27226659655570984,
0.1901281476020813,
0.3903428316116333,
-0.791672945022583,
0.12424778193235397,
-0.7436345815658569,
-0.040037792176008224,
-0.06406104564666748,
0.6914738416671753,
-0.6548487544059753,
-0.3638903796672821,
0.06194001063704491,
-0.178286015987396... |
def getnumberofservers ( _ _ bypass _ parallel _ processing ) : if _ casa5 : if ( _ _ bypass _ parallel _ processing = = 0 ) : return len ( mpienvironment. mpi _ server _ rank _ list ( ) ) + 1 else : return none # todo wait for mpi in casa6 if _ casa6 : return none | [
-0.22164489328861237,
0.61503005027771,
0.7984998226165771,
-0.10127116739749908,
-0.067372165620327,
-0.2113957703113556,
1.2983099222183228,
0.3013159930706024,
0.6400948166847229,
-0.29720255732536316,
-1.0196983814239502,
0.46620723605155945,
-1.0767738819122314,
0.25204288959503174,
... |
def do _ destroy ( self, arg ) : arg = arg. split ( ) if len ( arg ) = = 0 : print ( " * * class name missing * * " ) elif not arg [ 0 ] in posi : print ( " * * class doesn't exist * * " ) elif len ( arg ) = = 1 : print ( " * * instance id missing * * " ) else : key = str ( arg [ 0 ] ) + ". " + str ( arg [ 1 ] ) if key... | [
-1.1554944515228271,
-0.7244362831115723,
0.9504815340042114,
0.07141581922769547,
0.23799927532672882,
0.6189290285110474,
0.10156910866498947,
0.6920149326324463,
-0.4969742000102997,
1.0329657793045044,
-0.0071086036041378975,
-0.7834208011627197,
-1.1211967468261719,
0.3490545153617859... |
def apply _ single _ fun ( params, x1, x2 ) : dr = ( x1 - x2 ) / params [ " scales " ] r2 = np. dot ( dr, dr ) return params [ " variance " ] * np. exp ( - r2 ) | [
0.09160476177930832,
0.05441572517156601,
0.43370985984802246,
0.46799197793006897,
0.45196840167045593,
-0.5392417907714844,
0.07537432014942169,
0.21695949137210846,
-0.9672439098358154,
0.4691509008407593,
0.46304062008857727,
1.15118408203125,
-0.20824827253818512,
0.20684297382831573,... |
def calculate _ revenue ( self, years : int, rates _ dict ) - > float : revenue = 0 for asset in self. assets : try : rate = rates _ dict [ asset. char _ code ] except exception : rate = 1 revenue + = rate * asset. calculate _ revenue ( years ) print ( revenue ) return revenue | [
-0.4435614347457886,
0.5837584733963013,
0.5349642038345337,
-0.5392076373100281,
0.2030157446861267,
-0.6168798804283142,
0.22357358038425446,
0.12723633646965027,
-0.18513786792755127,
0.31933918595314026,
-0.15967102348804474,
-0.7206593751907349,
-0.5520899891853333,
-0.099039115011692... |
def initcsv ( ) : header = ['hostname ','model ','serial number ','software version ','total interfaces ','interfaces up ( total ) ','interfaces down ( total ) ','interfaces disabled ','interface operational speed ( 10m ) ','interface operational speed ( 100m ) ','interface operational speed ( 1g ) ','interface operati... | [
-0.4034256935119629,
-0.23979683220386505,
0.46443378925323486,
0.6298934817314148,
0.5331727266311646,
-0.2096618264913559,
0.308127224445343,
0.3788202702999115,
-0.3405560851097107,
-0.487588495016098,
-0.628680944442749,
1.175897240638733,
-0.047012779861688614,
0.4443424344062805,
0... |
def test _ atomic _ any _ uri _ length _ 2 _ nistxml _ sv _ iv _ atomic _ any _ uri _ length _ 3 _ 5 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / anyuri / schema + instance / nistschema - sv - iv - atomic - anyuri - length - 3. xsd ", instance = " nistdata / atomic / any... | [
0.1516808569431305,
-0.18752726912498474,
0.4477306604385376,
0.7438213229179382,
-0.34823134541511536,
0.06170812249183655,
-0.1869083046913147,
-0.08127647638320923,
-0.3129066526889801,
0.33841320872306824,
-0.2288404107093811,
-0.21793687343597412,
-0.181182399392128,
0.097853884100914... |
def run _ mbmvpa ( bids _ layout, config = none, mvpa _ model ='elasticnet ', report _ path = none, overwrite = false, overwrite _ latent _ process = true, refit _ compmodel = false, * * kwargs ) : mbmvpa = mbmvpa ( bids _ layout = bids _ layout, config = config, mvpa _ model = mvpa _ model, report _ path = report _ pa... | [
-0.08435246348381042,
-0.6570110321044922,
0.7292202711105347,
-0.3322409391403198,
-0.3117794692516327,
0.24336619675159454,
0.1427047848701477,
0.4130053222179413,
0.812138020992279,
0.3599304258823395,
0.410050630569458,
0.4678032696247101,
-0.7618619203567505,
-0.9019800424575806,
-0... |
def hash _ cache ( cacheattr = none, paramhash = false, selfhash = false, maxcache = - 1 ) : def _ cache ( func ) : cachewhere = cacheattr or " _ " + func. _ _ name _ _ @ wraps ( func ) def wrapper ( this, * args, * * kwargs ) : to _ pickle = [ func. _ _ name _ _ ] if paramhash : to _ pickle. extend ( [ args, kwargs ] ... | [
-0.2865312695503235,
0.12214644998311996,
0.941134512424469,
-0.0813557431101799,
-0.8420653343200684,
-0.6061716079711914,
-0.05077987536787987,
-0.0003925126511603594,
0.25618845224380493,
0.8761448860168457,
-0.07667841017246246,
-0.4908207058906555,
0.8515427708625793,
0.11924400925636... |
def store _ events ( self, events : iterable [ tevent ] ) - > none : # convert to sequenced item. sequenced _ items = self. items _ from _ events ( events ) # append to the sequenced item ( s ) to the sequence. try : self. record _ manager. record _ items ( sequenced _ items ) except recordconflicterror as e : raise co... | [
-1.1389371156692505,
0.05229271203279495,
0.4614475667476654,
0.3260278105735779,
0.9577586650848389,
0.11043976247310638,
0.5525806546211243,
0.4136102795600891,
0.23818062245845795,
0.2123553454875946,
-1.2627779245376587,
-0.06645546853542328,
-0.40109455585479736,
-0.1716116964817047,
... |
def fprop ( self, inputs : jtensor, paddings : optional [ jtensor ] = none, ) - > tuple [ jtensor, optional [ jtensor ] ] : p = self. params if np. issubdtype ( inputs. dtype, np. inexact ) : dtype _ min = - np. inf elif np. issubdtype ( inputs. dtype, np. integer ) : dtype _ min = np. iinfo ( inputs. dtype ). min else... | [
-0.3116474151611328,
0.8158946633338928,
0.8889803886413574,
0.27305570244789124,
-0.0068907784298062325,
-0.492458701133728,
0.6983387470245361,
-0.7186613082885742,
-0.09827098250389099,
0.4365338087081909,
0.6369969248771667,
1.0174039602279663,
0.22670885920524597,
0.7138246893882751,
... |
def library _ payload ( ) : library _ info = { " title " : " media library ", " media _ class " : media _ class _ directory, " media _ content _ id " : " library ", " media _ content _ type " : " library ", " can _ play " : false, " can _ expand " : true, " children " : [ ], } for item in [ { " name " : n, " type " : t... | [
-0.8640403747558594,
-1.171571135520935,
0.4002312123775482,
-0.23668991029262543,
0.3351728916168213,
0.12857362627983093,
-0.2499486356973648,
-0.3384194076061249,
0.042323242872953415,
0.4394817352294922,
-0.6124429702758789,
-0.4179779291152954,
-0.47549405694007874,
0.6944301724433899... |
def calc _ bin _ edges _ intensity ( ) : edges = numpy. linspace ( intensity _ from, intensity _ to, n _ bins + 1 ) lefts = edges [ : - 1 ] rights = edges [ 1 : ] middles = ( lefts + rights ) / 2 widths = rights - lefts return edges, middles, widths | [
-0.2946627140045166,
-0.4782864451408386,
0.4686831831932068,
0.006515622138977051,
0.137571781873703,
-0.3533235788345337,
-0.10483631491661072,
0.15374505519866943,
-0.16351929306983948,
0.6818824410438538,
-0.7070721387863159,
-0.21395401656627655,
-1.1703554391860962,
-0.39384999871253... |
def test _ atomic _ any _ uri _ length _ 1 _ nistxml _ sv _ iv _ atomic _ any _ uri _ length _ 2 _ 4 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / anyuri / schema + instance / nistschema - sv - iv - atomic - anyuri - length - 2. xsd ", instance = " nistdata / atomic / any... | [
0.02743155136704445,
-0.6201663613319397,
0.40657493472099304,
0.9625657796859741,
-0.17736810445785522,
-0.43078699707984924,
-0.06903527677059174,
-0.21203963458538055,
-0.603812575340271,
-0.34656617045402527,
0.023944614455103874,
-0.32766997814178467,
-0.18688036501407623,
0.513384342... |
def reselect ( method ) : @ functools. wraps ( method ) def selected ( * args, * * kw ) : sel = cmds. ls ( sl = true ) result = method ( * args, * * kw ) if sel : cmds. select ( sel ) return result return selected | [
-0.9073653817176819,
-0.7568485140800476,
0.5363119840621948,
0.0020091398619115353,
-0.20142494142055511,
-1.6773548126220703,
0.5962167978286743,
-0.6149955987930298,
1.1048201322555542,
-0.007390448823571205,
0.4606642425060272,
0.8302751779556274,
0.36778873205184937,
-0.01301600225269... |
def dorootmenuquit ( self, p _ json ) : log. info ( " self : { } ; json : { } ". format ( self, p _ json ) ) | [
-0.22488613426685333,
-1.733614444732666,
0.4423443675041199,
-0.3908865749835968,
0.07676032930612564,
0.5547309517860413,
0.2201506495475769,
-0.5522483587265015,
-0.14185595512390137,
0.07691655308008194,
-0.4443325102329254,
1.0956135988235474,
-0.06701160967350006,
0.3948513865470886,... |
def acquire ( crts, path ='data ', nr _ histograms = 12, events = 5000, driver ='tcp : / / localhost : 5555 ', data ='tcp : / / localhost : 5556 ', port = 6000 ) : context = zmq. context ( ) puller = context. socket ( zmq. pull ) puller. bind ('tcp : / / * : % d'% port ) # force crts to be a list if type ( crts ) = = i... | [
0.28868478536605835,
-0.02661409229040146,
0.8104742765426636,
0.10131185501813889,
0.8793884515762329,
0.2899237275123596,
0.5684093832969666,
-0.03381162881851196,
-0.28679534792900085,
-0.3827470541000366,
-0.4895300567150116,
0.6394755244255066,
-0.2994576394557953,
0.5576459765434265,... |
def forward ( self, inputs ) : cell _ body _ sum = np. sum ( inputs * self. weights ) + self. bias firing _ rate = 1. 0 / ( 1. 0 + math. exp ( - cell _ body _ sum ) ) # sigmoid activation function return firing _ rate | [
0.611628532409668,
0.7340254187583923,
0.2414342612028122,
0.4295514225959778,
0.2983238101005554,
-0.042605239897966385,
-0.1444859802722931,
0.4334492087364197,
0.142823725938797,
-0.32326504588127136,
0.4067454934120178,
0.15368008613586426,
-0.671518087387085,
0.5368536114692688,
-0.... |
def test _ atomic _ any _ uri _ enumeration _ nistxml _ sv _ iv _ atomic _ any _ uri _ enumeration _ 1 _ 5 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / anyuri / schema + instance / nistschema - sv - iv - atomic - anyuri - enumeration - 1. xsd ", instance = " nistdata / a... | [
-0.7819750905036926,
-0.9653781652450562,
0.5200169682502747,
0.7831752300262451,
-0.32196244597435,
-0.19758452475070953,
0.6702080368995667,
-0.23533925414085388,
-0.04048501327633858,
0.1879737824201584,
0.10636713355779648,
-0.3498190939426422,
-0.38785794377326965,
0.29849615693092346... |
async def word _ cloud ( request : historyquery = historyquery ( ), collection : str = depends ( authentication. authenticate _ and _ get _ collection ) ) : sentence, message = historyprocessor. word _ cloud ( collection, request. u _ bound, request. l _ bound, request. stopword _ list, request. month ) return { " data... | [
-0.2831782400608063,
0.8630402684211731,
0.48588719964027405,
0.02368302457034588,
0.07146991044282913,
-0.10817092657089233,
-0.15435636043548584,
-0.33748859167099,
-0.8093297481536865,
0.5420156717300415,
0.5224199891090393,
0.5793612003326416,
-0.7056272625923157,
0.6643136143684387,
... |
def unzip ( zipped ) : new _ params = ordereddict ( ) for kk, vv in zipped. iteritems ( ) : new _ params [ kk ] = vv. get _ value ( ) return new _ params | [
-0.48782235383987427,
-0.9648922085762024,
0.37944909930229187,
-0.1852187216281891,
-0.7536598443984985,
-0.39218395948410034,
-0.4202563762664795,
0.6464244723320007,
-0.4448881447315216,
0.7993730306625366,
-1.1553723812103271,
-0.24518051743507385,
0.10595664381980896,
0.13477034866809... |
def valid _ parentheses ( string ) : count = 0 for i in string : if i = ='(': count + = 1 elif i = =')': count - = 1 if count < 0 : return false return true if count = = 0 else false | [
-0.9074153304100037,
-0.5572124123573303,
0.7379886507987976,
0.6521857976913452,
-0.1795138120651245,
0.2257736623287201,
-0.3167397677898407,
0.2910766005516052,
0.05651944503188133,
0.46213364601135254,
-0.6435122489929199,
-0.6087293028831482,
-1.638493299484253,
-0.24106469750404358,
... |
def arterrors ( request ) : valid, response = initrequest ( request ) if not valid : return response # here we try to get cached data data = getcacheentry ( request, " arterrors " ) # data = none if data is not none : _ logger. info ('got data from cache : { } s '. format ( time. time ( ) - request. session ['req _ ini... | [
-0.3924703001976013,
-0.09141012281179428,
0.7254772782325745,
-1.0133039951324463,
-0.31339535117149353,
0.12456691265106201,
0.2976991534233093,
0.021110886707901955,
-0.24172347784042358,
0.06389303505420685,
0.5926754474639893,
-0.11201933026313782,
0.7864764332771301,
0.23622284829616... |
def on _ pushbutton _ readtest _ clicked ( self ) : # todo : not implemented yet self. readdatatest ( ) | [
0.8621837496757507,
-0.3079736828804016,
0.3300437927246094,
-0.6895533204078674,
0.40640661120414734,
0.5962098240852356,
0.035382017493247986,
-0.4216820299625397,
0.3504336178302765,
-0.653583824634552,
0.777953565120697,
0.4848727285861969,
-0.6816939115524292,
-0.9247664213180542,
-... |
def get _ success _ url ( self ) : return reverse _ lazy ('orders : order - detail ', kwargs = {'pk': self. offer. order. id } ) | [
-0.15944644808769226,
0.9117130041122437,
0.37121689319610596,
-0.11721424758434296,
0.7121241092681885,
0.35161450505256653,
0.15805210173130035,
0.7221883535385132,
-0.14917193353176117,
0.036809176206588745,
0.11356642842292786,
0.7638266086578369,
1.0342355966567993,
0.5991286635398865... |
def list _ parent ( lang, hchid, orphacode ) : # noqa : e501 es = config. elastic _ server index = " rdcode _ orphaclassification _ { } _ { } ". format ( hchid, lang. lower ( ) ) query = " { \ " query \ " : { \ " match \ " : { \ " orphacode \ " : \ " " + str ( orphacode ) + " \ " } }, " \ " \ " _ source \ " : [ \ " dat... | [
-0.6878738403320312,
0.08687608689069748,
0.8694456815719604,
-1.2508578300476074,
0.09472157806158066,
-1.1681362390518188,
-0.04909714311361313,
-0.026007981970906258,
0.23387791216373444,
0.6692447066307068,
0.08079870045185089,
-0.0795116201043129,
-0.6238275170326233,
0.59241998195648... |
def get ( self, request ) : clients = client. objects. all ( ) return render ( request, " clients. html ", { " clients " : clients } ) | [
0.32008638978004456,
-0.18552814424037933,
0.10929106175899506,
-0.3690827190876007,
-0.03809940069913864,
0.5702120661735535,
-0.22364670038223267,
0.22938860952854156,
-0.9462712407112122,
-0.26604562997817993,
1.0058352947235107,
0.3876446485519409,
-0.2499585747718811,
0.56707084178924... |
def _ update _ complextype _ references ( self, name ) : if isinstance ( name, ast. enumeration ) : if name. extends : name. reference = self. resolve ( name. namespace, name. extends ) if not isinstance ( name. reference, ast. enumeration ) : raise processorexception ( " invalid enumeration reference'{ } '. ". format ... | [
-1.4478321075439453,
-0.5455552339553833,
1.098442554473877,
-0.35511350631713867,
-0.46616271138191223,
-0.21160364151000977,
0.7329068183898926,
-0.4734967350959778,
-0.09242745488882065,
0.47677111625671387,
-0.9335283637046814,
-0.10548372566699982,
-1.0414170026779175,
0.7910780906677... |
def load _ mask ( self, image _ id ) : # if not a worker dataset image, delegate to parent class. image _ info = self. image _ info [ image _ id ] if image _ info [ " source " ]! = " coco " : return super ( self. _ _ class _ _, self ). load _ mask ( image _ id ) # convert polygons to a bitmap mask of shape [ height, wi... | [
-0.8376932740211487,
-0.6151435971260071,
0.6283262968063354,
-0.5788107514381409,
0.008640069514513016,
0.026254571974277496,
0.1894153505563736,
-0.4033913314342499,
0.7351622581481934,
0.3875651955604553,
-0.16952918469905853,
0.5542864799499512,
0.8279855847358704,
0.46579432487487793,... |
def _ resolve _ columns ( self, lookup _ items ) - > dict [ str, pd. series ] : new _ columns = { } if isinstance ( lookup _ items, str ) : if lookup _ items in self. columns : new _ columns [ lookup _ items ] = self [ lookup _ items ] else : new _ columns [ lookup _ items ] = self. evaluate ( lookup _ items ) elif ( l... | [
-0.5360159277915955,
-0.4538918137550354,
0.6539945602416992,
-0.3445465564727783,
0.30957362055778503,
-0.5999721884727478,
-0.8068973422050476,
-0.08348914980888367,
-0.49178388714790344,
-0.15912501513957977,
-0.2746323049068451,
-0.1745232790708542,
0.017778920009732246,
-0.81547349691... |
def test _ atomic _ language _ max _ length _ nistxml _ sv _ iv _ atomic _ language _ max _ length _ 1 _ 3 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / language / schema + instance / nistschema - sv - iv - atomic - language - maxlength - 1. xsd ", instance = " nistdata /... | [
0.30557480454444885,
0.21943704783916473,
0.29137122631073,
0.6863363981246948,
-0.5063876509666443,
0.5395715236663818,
-0.43103447556495667,
0.24581533670425415,
0.8305619955062866,
0.8684490919113159,
-0.30451011657714844,
-0.38124895095825195,
-0.2066078782081604,
-0.13460899889469147,... |
def _ filter _ graph ( self, graph : networkx. multigraph ) - > networkx. multigraph : logger. debug ( " filtering graph " ) # roots are identified by 0 incoming edges possible _ roots = [ n for n, d in graph. in _ degree ( ) if d = = 0 ] possible _ exits = [ n for n, d in graph. out _ degree ( ) if d = = 0 ] # duplica... | [
-0.5980460047721863,
0.5964061617851257,
0.9446858167648315,
-0.01871992088854313,
-0.8134248852729797,
0.1656799018383026,
1.2449290752410889,
0.85975581407547,
0.7906422019004822,
1.0975399017333984,
-0.4922954738140106,
-0.012564553879201412,
0.2206270694732666,
-0.107649065554142,
0.... |
def execute ( self, context ) : addon _ data = bpy. context. scene. maplus _ data previous _ mode = maplus _ geom. get _ active _ object ( ). mode selected = [ item for item in bpy. context. scene. objects if maplus _ geom. get _ select _ state ( item ) ] multi _ edit _ targets = selected # check prerequisites for mesh... | [
-0.3827134072780609,
-0.9432551860809326,
0.7974367737770081,
0.5401653051376343,
0.06450534611940384,
-0.0690612941980362,
0.32099801301956177,
-0.8948500752449036,
0.22124160826206207,
0.1763792186975479,
-0.5798865556716919,
0.3988206386566162,
-0.31682124733924866,
0.4095541536808014,
... |
def b _ rc ( actions, rewards, beta ) : # # in simulation action selection policy is set by softmax : # # in this example there are three possible actions, extends to n # # p ( a _ t = a ) = e ^ p _ t ( a ) / sum ( e ^ p _ t ( b ) + e ^ p _ r ( c ) +... ) # # will display probability matching.... ref _ reward = 0 p _ d... | [
-0.031017668545246124,
-0.30815863609313965,
0.6878747344017029,
-0.24353423714637756,
0.5014599561691284,
0.25714850425720215,
0.4166886806488037,
0.2617552578449249,
-0.5455675721168518,
1.3830435276031494,
0.3011094927787781,
-0.11548962444067001,
-0.10139884799718857,
0.239645630121231... |
def remove _ element ( self, element _ id ) : return self. _ request ('delete ','/ elements / { } '. format ( element _ id ) ) | [
-0.6318031549453735,
0.5994086265563965,
0.09611368924379349,
0.5116308927536011,
0.46031704545021057,
-0.007965599186718464,
-0.7324783205986023,
0.3102715015411377,
1.3429752588272095,
-0.27028870582580566,
-0.47565072774887085,
0.7600113749504089,
-1.424607276916504,
0.744293212890625,
... |
def handling _ exceptions ( self ) : try : if self. using _ jobs : with handling _ broken _ process _ pool ( ) : yield else : yield except systemexit as err : self. register _ error ( err. code ) except baseexception as err : if isinstance ( err, coconutexception ) : logger. display _ exc ( ) elif not isinstance ( err,... | [
0.187739759683609,
0.7948815226554871,
0.5947690010070801,
-0.1574641764163971,
0.08246003836393356,
-0.4228798747062683,
-0.3128258287906647,
-0.33704301714897156,
0.08997803926467896,
-0.7031860947608948,
0.24627090990543365,
-0.5523761510848999,
-0.4667764902114868,
0.6374266743659973,
... |
def multiply ( x, y, name = none ) : return gen _ math _ ops. mul ( x, y, name ) | [
-0.6645097136497498,
0.7094301581382751,
0.6808797121047974,
0.6244758367538452,
-1.1475341320037842,
-0.48031532764434814,
-1.2929168939590454,
-1.4323326349258423,
-0.20016583800315857,
0.4629778265953064,
-0.2778626084327698,
-0.08491836488246918,
0.876513659954071,
-0.8915201425552368,... |
def is _ initialized ( self, state : bool ) : if state and any ( [ requirejs. _ _ config _ comm is none, requirejs. _ _ execution _ comm is none, requirejs. _ _ safe _ execution _ comm is none ] ) : raise valueerror ( " some comms have not been initialized yet. " " can't set to true. " ) if not state and not any ( [ re... | [
-0.42007574439048767,
0.046346064656972885,
0.7300688028335571,
-0.5186405777931213,
0.9075384736061096,
-0.17337602376937866,
0.18901488184928894,
-0.20219625532627106,
-0.21795418858528137,
-0.0006359794642776251,
-0.9534505605697632,
0.30613642930984497,
-0.5092223286628723,
1.713750839... |
def graph ( n ) : num = np. arange ( 0, 356, 1 ) p = [ 1 ] * 356 for i in range ( 356 ) : p [ i ] = calc ( i ) plt. plot ( num, p ) plt. plot ( n, p [ n ], marker = ". " ) plt. xlabel ( " number of person " ) plt. ylabel ( " probability " ) plt. title ( " birthday paradox " ) plt. grid ( true ) plt. show ( ) | [
0.31685006618499756,
0.8202687501907349,
0.8014652132987976,
0.37331056594848633,
0.13211290538311005,
0.8389157652854919,
1.0021852254867554,
0.7361213564872742,
0.771310031414032,
-0.17219604551792145,
0.08756216615438461,
0.19937989115715027,
0.37626466155052185,
0.11444392800331116,
... |
def emaillog ( self ) : subject = self. appname + " script report " command ='mail - s "'+ subject +'" "'+ self. email +'" <'+ self. logfile +'' os. system ( command ) print " email sent to : " + self. email self. log ( " email sent to : " + self. email ) | [
0.7194460034370422,
0.21410204470157623,
0.4121890664100647,
-0.6210975050926208,
-0.05695297196507454,
0.5182552337646484,
-0.013621680438518524,
0.13132412731647491,
-0.5215816497802734,
0.06334324181079865,
0.05133644863963127,
1.6233421564102173,
0.23863771557807922,
-0.193486541509628... |
def _ _ eq _ _ ( self, other ) - > bool : return self. _ _ dict _ _ = = other. _ _ dict _ _ | [
-0.6906745433807373,
-0.9124737977981567,
0.7386924028396606,
-0.2651316225528717,
-0.08376076072454453,
0.38476425409317017,
-0.08251795172691345,
-0.42890092730522156,
0.7162249088287354,
-0.17426753044128418,
-1.004117488861084,
0.03236657753586769,
0.28121230006217957,
-0.3258797824382... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.