text
stringlengths
25
2.19k
embedding
listlengths
768
768
def nn ( self ) : return self. num _ nodes ( kind ='all')
[ -0.32385575771331787, -0.20827318727970123, 0.24253204464912415, 0.8365983366966248, 0.5787560343742371, -0.3097772002220154, 0.09106025099754333, 0.8600449562072754, 0.551653265953064, -0.7214840650558472, -0.9563019871711731, 0.6785046458244324, 0.9536072611808777, 0.15693438053131104, ...
def plottracking ( self, show _ figure : bool = true ) - > none : if self. tracking is none : raise runtimeerror ( " tracking - related function called before tracking " ) self. tracking. plot ( show _ figure = show _ figure ) # plot tracking
[ 0.5099135041236877, 1.443021297454834, 0.5706390142440796, 0.597703754901886, -0.2791405916213989, 0.6834162473678589, 1.1599271297454834, 0.9208987951278687, -0.2895156443119049, -0.2680310010910034, -0.03264832869172096, 1.22110116481781, 0.8645321726799011, 1.0125800371170044, 0.33654...
def get _ priority ( self ) : return self. operation. priority
[ 0.07467252016067505, 1.0043385028839111, 0.49279800057411194, 1.329426646232605, 0.5335575938224792, -0.9802764058113098, 0.2028692215681076, -0.17376218736171722, 0.583156406879425, -1.307302474975586, 0.18117757141590118, -0.5754974484443665, -0.590555727481842, -0.6334457993507385, 0....
def serialize _ to _ json ( data : any ) - > str : return json. dumps ( data, indent = 2, separators = ( ', ',':') ) +'\ n '
[ -0.04031145200133324, -0.9648692011833191, 0.4017614424228668, -0.5500670671463013, -0.716094970703125, -0.24758793413639069, -0.651653528213501, -1.0399954319000244, 0.6496933698654175, -0.14256560802459717, -0.4472993314266205, 0.8199870586395264, 0.1714935451745987, -0.1250072866678238,...
def addoutedge ( self, i ) : self. outedges. append ( i )
[ -1.058340072631836, 0.5659478902816772, 0.38129478693008423, -0.3284308910369873, -0.5349697470664978, 0.6970925331115723, 0.3921429216861725, 0.16288456320762634, -0.1662479043006897, 0.20041124522686005, -0.5508009791374207, -0.24897003173828125, -1.0371651649475098, -1.085687518119812, ...
def inputs ( self, value ) : if isinstance ( value, dict ) : self. _ update _ values ('inputs ', value ) else : raise invalidvalue ( f'value is not valid json received : { value }')
[ -1.4347785711288452, 0.12125054001808167, 0.8011583685874939, -0.39098039269447327, -0.34257930517196655, 0.4289453625679016, 0.03280824050307274, -0.8459653258323669, 0.6679205298423767, -0.057969365268945694, 0.1457132250070572, 0.05443079024553299, -0.024842239916324615, 0.6318445801734...
def validate _ transaction _ error _ event _ count ( num _ errors = 1 ) : @ transient _ function _ wrapper ('newrelic. core. stats _ engine ','statsengine. record _ transaction') def _ validate _ error _ event _ on _ stats _ engine ( wrapped, instance, args, kwargs ) : try : result = wrapped ( * args, * * kwargs ) exce...
[ -0.06796598434448242, 0.37373924255371094, 0.5625433325767517, -0.05039043724536896, 0.07512061297893524, -0.4190162718296051, 0.27136850357055664, -0.05947141349315643, 0.4625065326690674, 0.4327114224433899, -0.2607278525829315, -0.5028157234191895, 0.6188523173332214, -0.431003987789154...
def esperanza ( n ) : exito = 0 # veces que la carta - i = = i for _ in xrange ( n ) : mazo = range ( 1, 101 ) # lista de 100 cartas random. shuffle ( mazo ) # desordena el mazo # chequeo todo el mazo para ver si hay algun'exito ', de ser asi lo # lo sumamos. exito + = sum ( [ mazo [ i - 1 ] = = i for i in xrange ( 1, ...
[ -0.7481328248977661, 0.4328102767467499, 0.5924383401870728, 0.0045996904373168945, 0.38895314931869507, -0.26233217120170593, 0.4610580801963806, -0.15754729509353638, 0.7254675030708313, 0.4483427405357361, -0.5760127305984497, -0.3733174204826355, 0.027458738535642624, 0.348598033189773...
def begin _ time ( self, event ) : self. time _ update ( self. min _ time ) assert ( self. min _ time = = self. stime. val )
[ 0.7318476438522339, -0.47310250997543335, 0.3027505874633789, 0.5031959414482117, 0.06499271094799042, 0.6291290521621704, -0.29637381434440613, -0.4961187541484833, 0.8214790225028992, 0.6192119717597961, -0.5052045583724976, 0.5028425455093384, -0.4301678538322449, 0.33003005385398865, ...
def sub _ command _ string ( self ) - > str : return " ". join ( self. sub _ commands )
[ 0.9026581645011902, -0.5223907828330994, 0.6486601233482361, 0.35303017497062683, -0.13026326894760132, 1.1280133724212646, -0.4155310094356537, -0.8884382843971252, -0.21391302347183228, -0.6340469121932983, -0.3922217786312103, 0.9857845306396484, -0.14342063665390015, -0.766266584396362...
def connecttomssql ( self, password ) : return pyodbc. connect ( " driver = { odbc driver 17 for sql server } ; " " server = localhost ; " " database = trachistorian ; " " uid = sa ; " " pwd = " + password )
[ 1.03109872341156, -0.7785872220993042, 0.4375436007976532, 0.059996720403432846, -0.579574465751648, -0.07695167511701584, -0.21139933168888092, 0.3243670165538788, 0.2970496714115143, -0.053609393537044525, 0.08275093138217926, -0.11927773058414459, -0.04568781703710556, 0.085280559957027...
def validate _ output _ path ( args, output, function, process _ log ) : lim _ str ='' limits = [ 0. 0, 0. 0, 0. 0, 0. 0 ] # graphs will have x and y limits parsed and used for the output directory if function : if args. xlim : temp = args. xlim limits [ 0 ] = float ( temp. split ( " - " ) [ 0 ] ) limits [ 1 ] = float ...
[ 0.10216650366783142, -0.3825119733810425, 0.7815142869949341, -0.3410637080669403, -0.505358874797821, -0.35251373052597046, 1.0821304321289062, -0.5624359250068665, -0.7062332630157471, 0.16074658930301666, 0.9912542104721069, -0.29699528217315674, -0.050266411155462265, -0.63694721460342...
def forward ( self, x, source ) : x = torch. cat ( [ x, source ], dim = 1 ) x = self. conv _ layers ( x ) x = self. sigmoid ( x ) return x. view ( x. size ( 0 ), - 1 )
[ -0.051587965339422226, 0.9739362597465515, 0.2656436562538147, -0.2749093174934387, -0.8199697732925415, 0.04256201907992363, -0.6348387598991394, 0.3772520124912262, 0.7687796354293823, -0.36612677574157715, -0.03314391151070595, 0.8027292490005493, 0.3835456371307373, -0.4465192854404449...
def reset ( self ) : r = self. device. ask _ raw (': 5000 / adc2? reset = true') if r. status _ code! = 200 : raise exception ( " reset did not properly occur " )
[ -0.14955411851406097, 0.534004271030426, 0.4127606153488159, 0.44637271761894226, 0.3325777053833008, -0.6334434747695923, 0.28145331144332886, -0.8075153827667236, -0.3160521388053894, 0.5116233229637146, -0.03712998703122139, 1.53523588180542, -0.744316816329956, -0.17675594985485077, ...
def rename ( self, string, string _ 1 ) :...
[ -0.6647026538848877, -1.1928924322128296, 0.3362734019756317, 0.8080646991729736, -0.9957011342048645, -0.22889626026153564, 0.0290948748588562, 0.25332334637641907, -1.3916679620742798, 0.40947186946868896, -0.46434640884399414, 1.5437877178192139, 0.2771041691303253, -0.8575995564460754,...
def more _ like _ post ( post, channel ) : from solariat _ bottle. db. post. base import post from solariat _ bottle. db. speech _ act import speechactmap from solariat _ bottle. db. channel. base import channel from solariat _ bottle. db. conversation import conversation from solariat. utils. timeslot import timeslot,...
[ -0.171837717294693, -0.37043869495391846, 0.7856482863426208, -0.6039583683013916, 0.41694653034210205, -0.07405517995357513, -0.9503551721572876, -0.29786962270736694, -0.03549293801188469, 0.23432619869709015, -0.1637694388628006, 0.044747766107320786, -0.03618254512548447, 0.63550329208...
def reconstitute _ file ( self, file _ descriptor _ proto ) : classes = [ ] for message _ proto in file _ descriptor _ proto. message _ type : for field in message _ proto. field : if field. type = = fielddescriptorproto. type _ message : self. _ fields _ to _ resolve [ field. name ] = field. type _ name descriptor = m...
[ -0.7451760172843933, -0.00875790137797594, 0.6224300861358643, -0.2473025918006897, 1.133360743522644, -0.22908274829387665, -0.07902757823467255, 0.47227269411087036, -0.7768774032592773, -0.3575948178768158, -0.6763062477111816, -0.39824846386909485, 0.32922452688217163, 0.78541141748428...
def load _ segmentation _ data ( self, path ) : # loading self. ct _ scan _ segmentation, header = medpy. io. load ( path ) self. ct _ scan _ segmentation = self. ct _ scan _ segmentation. astype ( np. int16 ) # post - processing self. ct _ scan _ segmentation [ self. ct _ scan _ segmentation > = 1 ] = 1 # transposing ...
[ -0.323112428188324, -0.4359174370765686, 0.6196545958518982, -0.36647897958755493, -0.34861981868743896, -0.1376122683286667, 0.3500656485557556, -0.2906394302845001, 0.26819324493408203, 0.5324827432632446, 0.3184874653816223, -0.5213779807090759, -0.09144463390111923, 0.10069020837545395...
def is _ prime ( n ) : if n = = 1 : return false k = 2 while k < n : if n % k = = 0 : return false k + = 1 return true
[ -0.7960923314094543, 0.8614303469657898, 0.3548693060874939, 1.0872199535369873, 0.49222856760025024, 0.04469560459256172, -0.7869650721549988, 0.27456098794937134, 1.133081078529358, -0.5761435627937317, -0.6778512001037598, -0.9994493722915649, -1.2132971286773682, 0.7134953737258911, ...
def _ revoke ( self, group, rule ) : return self. _ modify _ sg ( group, rule, revoke = true )
[ 0.400587797164917, 0.005670847371220589, 0.2856011986732483, -0.15261408686637878, -0.1506652683019638, -0.8127527832984924, -0.04355988651514053, 0.7617467045783997, -0.5029239058494568, 0.574730396270752, 0.90885990858078, 0.8703293800354004, -0.3704611361026764, -0.652836263179779, 1....
def _ setparams ( self ) : # set ns and x parameter arrays self. ns = np. where ( self. nfree > 0 ) [ 0 ] # 0 - start index self. ns1 = self. ns + 1 # 1 - start index self. x = self. parameters [ self. ns ] self. nfrei = len ( self. x ) self. nfixi = self. n - self. nfrei # set free parameter flags self. ixi = 1 if ( s...
[ -0.8616983890533447, -0.13757920265197754, 0.7615858316421509, -0.42922163009643555, -0.27774763107299805, 0.5418723821640015, 0.4696601927280426, -1.0671883821487427, -0.4509386718273163, 0.45550820231437683, -0.10034285485744476, 0.1955260932445526, -0.39448025822639465, 0.82661396265029...
def escape _ html ( text ) : return cgi. escape ( text, quote = true ). \ replace ( u'\ n ', u'< br / >'). \ replace ( u'\ t ', u'& emsp ;'). \ replace ( u'', u'& nbsp ;')
[ 0.22230976819992065, 1.1627105474472046, 0.2830211818218231, -0.06283652037382126, -0.7445895075798035, 0.20463205873966217, -1.2628237009048462, 0.22790877521038055, -0.09680505096912384, 0.5960533618927002, -0.540818452835083, -0.6558395028114319, 0.28612175583839417, 1.0889842510223389,...
def _ checksourceiri ( self, trow ) : # verify that the source iri is valid. if rfc3987. match ( trow ['iri'], rule ='absolute _ iri') is none : raise tablerowerror ('invalid source ontology iri string : { 0 }. '. format ( trow ['iri'] ), trow )
[ -0.11972422897815704, 0.8274931311607361, 0.2102310061454773, 0.3324662446975708, -0.08585052937269211, 0.6439462304115295, 0.5516045093536377, -0.440700888633728, -0.12152721732854843, 1.0475146770477295, 0.40371426939964294, -0.21804450452327728, 0.14785228669643402, 0.16478769481182098,...
def confirmsignup ( self ) : pswd _ text = self. pswd _ entry. text ( ) confirm _ text = self. confirm _ entry. text ( ) if pswd _ text! = confirm _ text : # display messagebox if passwords don't match qmessagebox. warning ( self, " error message ", " the passwords you entered do not match. please try again. ", qmessag...
[ -0.12075172364711761, 0.08774252980947495, 0.841549277305603, 0.8619690537452698, 0.04243740811944008, 0.6410430669784546, 0.9774142503738403, 0.030158834531903267, -0.6236316561698914, 0.1983465701341629, -0.17149679362773895, -0.35290977358818054, -0.7012247443199158, 0.7804044485092163,...
def conv _ transpose _ block ( inputs, n _ filters, kernel _ size = ( 2, 2, 2 ), strides = ( 2, 2, 2 ), dropout _ p = 0. 0 ) : conv = tf. layers. conv3d _ transpose ( inputs, n _ filters, kernel _ size = kernel _ size, strides = strides, use _ bias = false, padding ='same') # conv = tf. nn. conv3d _ transpose ( inputs,...
[ 0.5016871094703674, -0.10932771861553192, 1.0231995582580566, 0.5036842226982117, -0.5142289996147156, 0.0840759128332138, -0.4686112403869629, 0.030963022261857986, -0.3292029798030853, 1.0848388671875, -0.5192221999168396, -0.19088663160800934, -0.7566211819648743, 0.035236332565546036, ...
def create _ profile ( sender, instance, created : bool, * * kwargs ) : if created : profile. objects. create ( user = instance )
[ 1.1853606700897217, 0.5087797045707703, 0.23897434771060944, 0.44449925422668457, 1.5452927350997925, 0.870391845703125, 0.16702042520046234, -0.4612322747707367, -0.3267747163772583, -0.0519392155110836, -1.621333122253418, -0.7281740307807922, 0.059849221259355545, 0.13890385627746582, ...
def chunks ( l, n ) : for i in xrange ( 0, len ( l ), n ) : yield l [ i : i + n ]
[ -0.3495922088623047, 0.8162883520126343, 0.4177771806716919, 0.022573070600628853, -0.17786267399787903, 0.5030485987663269, -1.1170406341552734, -0.5288498401641846, -0.38854867219924927, -0.64253830909729, -0.6743640899658203, -0.28893229365348816, 0.034480731934309006, 0.611735165119171...
def _ create _ conflicts _ rule ( self, issuer, provider, reason, requirements = none ) : if issuer! = provider : return packagerule ( [ - self. _ pool. package _ id ( issuer ), - self. _ pool. package _ id ( provider ) ], reason, requirements = requirements ) else : return none
[ -0.006033988669514656, 0.25728631019592285, 0.26383858919143677, -0.4006490409374237, 1.033105731010437, 0.1730862259864807, -0.6825105547904968, 0.18022266030311584, 0.7699664235115051, 0.09967972338199615, 0.6758739352226257, 0.2929188907146454, -0.9068083167076111, -0.7625255584716797, ...
def _ import _ class ( self, class _ path ) : class _ path = class _ path. split ( '.') module _ name = '. '. join ( class _ path [ : - 1 ] ) module = import _ module ( module _ name ) return getattr ( module, class _ path [ - 1 ] )
[ -0.5728435516357422, -0.5809516906738281, 0.6848567724227905, 0.17324373126029968, -0.1299990862607956, -0.11503907293081284, 0.9354735612869263, -0.673366904258728, 0.28598636388778687, 0.6740895509719849, 0.3174494802951813, 0.2569723129272461, -0.45648977160453796, -1.171756386756897, ...
def is _ valid ( self ) : return email _ re. match ( self. person. get _ email ( ) )
[ -0.029008500277996063, -0.6368160843849182, 0.5373213291168213, 0.5790421366691589, -0.27991408109664917, 0.3037770986557007, -0.4882551431655884, 1.2815759181976318, -0.1350145787000656, -0.5881956815719604, 0.7409653663635254, 0.24957555532455444, -0.7702236175537109, -1.1460435390472412...
def getscore ( self, username ) : with self. con : self. cur. execute ( " select highscore from users where name ='" + username + "'; " ) score = self. cur. fetchall ( ) for sc in score : for s in sc : return s
[ -0.023816989734768867, 0.3467603325843811, 0.530585765838623, 0.8503801226615906, 0.17172394692897797, -0.2889038622379303, -0.39373791217803955, -0.4017743170261383, -0.5157900452613831, 0.5821026563644409, -0.2678666412830353, -0.14864936470985413, -1.008492112159729, -0.1926604658365249...
def resample2d _ sequence ( sequence, size, timer = none ) : start _ timer ( timer, " resample2d _ sequence " ) scaled _ sequence = resample2d ( sequence, size, timer ) end _ timer ( timer ) return scaled _ sequence
[ -1.0204962491989136, -0.48867833614349365, 0.4925543963909149, 0.043739818036556244, -1.92135488986969, -1.0016361474990845, -0.8537957072257996, -0.3936231732368469, -0.10904591530561447, 0.329707533121109, -1.0028566122055054, 0.14602702856063843, 0.05649755150079727, 0.07609929889440536...
def _ _ init _ _ ( self, * args, * * kwargs ) : tk. text. _ _ init _ _ ( self, * args, * * kwargs ) # create a proxy for the underlying widget self. _ orig = self. _ w + " _ orig " self. tk. call ( " rename ", self. _ w, self. _ orig ) self. tk. createcommand ( self. _ w, self. _ proxy )
[ 0.16084249317646027, -0.29868707060813904, 0.6396454572677612, -0.8434151411056519, -0.6990250945091248, -0.5385584831237793, 0.11780734360218048, 1.141882061958313, -0.2112121880054474, -0.05851318687200546, -0.10067033022642136, 0.006196676753461361, 0.20062124729156494, 0.45721992850303...
def get _ id ( self ) : return self. id
[ 0.7181825637817383, -1.3248857259750366, 0.35413575172424316, 0.20645129680633545, 1.280109167098999, 1.255699634552002, 0.5495502948760986, 0.37847599387168884, 0.9268854260444641, -0.9707028269767761, -0.2671743333339691, 0.8130629658699036, -0.8720620274543762, -0.30869171023368835, 0...
def uniform _ mutation _ kernel ( mutation _ probability, number _ of _ strategies ) : a _ matrix = np. zeros ( shape = ( number _ of _ strategies, number _ of _ strategies ) ) for i in range ( 0, number _ of _ strategies ) : for j in range ( 0, number _ of _ strategies ) : if i! = j : a _ matrix [ i, j ] = mutation _ ...
[ -0.28913676738739014, -0.28421923518180847, 0.7549658417701721, 0.6844062805175781, 0.680226743221283, -0.6363219022750854, 1.246486783027649, -0.1631706804037094, 0.9172489047050476, 0.7071044445037842, 0.7790897488594055, -0.09198742359876633, 0.02015468291938305, 0.5675274133682251, -...
def exists ( self, file _ path ) : return self. _ interface. exists ( file _ path )
[ -0.3159090280532837, -0.06638967990875244, 0.12716956436634064, -0.2274760752916336, 1.4331703186035156, 0.8348543047904968, -0.18867845833301544, 0.4500487148761749, -1.252310872077942, -0.1445799022912979, -0.013098270632326603, -0.9403175711631775, -0.29675528407096863, 0.14275285601615...
def renew _ book _ librarian ( request, pk ) : book _ inst = get _ object _ or _ 404 ( bookinstance, pk = pk ) # если данныи запрос типа post, тогда if request. method = ='post': # создаем экземпляр формы и заполняем данными из запроса ( связывание, binding ) : form = renewbookmodelform ( request. post ) # проверка вал...
[ -0.37564530968666077, 0.07777400314807892, 0.9385807514190674, -0.5497320890426636, -0.3560088276863098, 0.5628765821456909, -0.26647838950157166, 0.6851038336753845, -0.6312031745910645, 0.09988116472959518, 0.19114355742931366, -0.34519973397254944, 0.05867313966155052, 0.224429205060005...
def make _ classifier _ combined ( n _ hidden _ layers = 3, hidden _ layer _ size = 100, activation ='tanh ', dropout _ prob = 0. 0, learn _ log _ r = false, alpha = 5., learning _ rate = 1. e - 3 ) : # inputs input _ layer = input ( shape = ( settings. n _ thetas _ features, ) ) # network hidden _ layer = dense ( hidd...
[ 0.3750465512275696, -0.3646269142627716, 0.9815271496772766, 0.8822728991508484, 0.2469482421875, 0.40423551201820374, 0.2626466453075409, -0.41215360164642334, 0.0099190017208457, 0.6126299500465393, -0.7781323790550232, -0.14178583025932312, 0.4351767599582672, 0.0833391323685646, 0.35...
def closest _ color ( r, g, b ) : colors = { ( 0x00, 0x00, 0x00 ) :'black ', ( 0x80, 0x00, 0x00 ) :'darkred ', ( 0x00, 0x80, 0x00 ) :'darkgreen ', ( 0x80, 0x80, 0x00 ) :'darkyellow ', ( 0x00, 0x00, 0x80 ) :'blue ', ( 0x80, 0x00, 0x80 ) :'darkmagenta ', ( 0x00, 0x80, 0x80 ) :'darkcyan ', ( 0xc0, 0xc0, 0xc0 ) :'lightgrey...
[ 0.4346168637275696, -0.9811109900474548, 1.0842024087905884, -0.8730599284172058, -0.9828851222991943, 0.0028633486945182085, 0.26649484038352966, -0.7588305473327637, -0.3530663847923279, -0.48723796010017395, 0.33081185817718506, 0.2997902035713196, -0.8680504560470581, 0.399677217006683...
def list _ hash ( values ) : hashed = hashlib. md5 ( ) for v in values : hashed. update ( str ( v ). encode ( ) ) return hashed. hexdigest ( )
[ 0.7264043688774109, -0.09052248299121857, 0.4612332880496979, -0.03785287216305733, -0.0014789223205298185, 0.30459970235824585, -1.2238192558288574, 0.7278935313224792, 0.4536110758781433, 0.3571549952030182, -0.8442389965057373, -0.4851174056529999, 0.00036335468757897615, 0.627057254314...
def equalfunc ( self, data ) : return self. field. sortvalue ( data ) = = \ self. field. adjustedcomparevalue ( self. value )
[ 0.0807148888707161, -0.36105993390083313, 0.3598468601703644, -0.424030601978302, 0.025204410776495934, 0.4372076392173767, 0.3394138514995575, -0.9552076458930969, 0.0018627062672749162, -0.16503779590129852, -0.6816537976264954, 0.38369321823120117, -0.303313285112381, -0.101383894681930...
def reset ( self ) : self. current _ time _ step = 0 self. current _ time = 0 self. n _ steps = 0 self. c _ ee = 0 self. c _ eh = 0 self. c _ hh = 0 self. c _ he = 0 self. eps _ r [ : ] = 1 self. mu _ r [ : ] = 1 self. sigma _ e [ : ] = 1e - 20 self. sigma _ m [ : ] = 1e - 20
[ -0.19931770861148834, -0.046486277133226395, 0.4431772530078888, 0.2247743308544159, 0.7558517456054688, 0.3500603139400482, 0.44941455125808716, -0.07593776285648346, -1.065714955329895, 0.7565135359764099, -0.5002025961875916, 0.23707984387874603, -0.4289347529411316, 1.1284172534942627,...
def match _ all _ intents ( self, intent, ents ) : boxes = list ( filter ( lambda x : not x. finished and x. attribute! ='selected _ item ', self. boxes ) ) reply = [ ] matched _ boxes = [ ] if self. is _ done ( ) : return reply, matched _ boxes # logging. info ( " boxes left : " ) # for b in boxes : logging. info ( b ...
[ -1.0208317041397095, -0.9682273268699646, 0.517166256904602, 0.25940409302711487, -0.3354598879814148, -0.20986081659793854, 0.405710905790329, -0.429269403219223, 0.369589239358902, -0.07805952429771423, 0.08198502659797668, -0.7438187599182129, -0.6946409344673157, 0.5851195454597473, ...
def radixsortstatesact ( listofstates, digitsplacetoacton ) : # digits place here is 1, 10, 100, etc. digitslist = [ [ ], [ ], [ ], [ ], [ ], [ ], [ ], [ ], [ ], [ ] ] # 2d list. first level is 0 - 9 for digits, second level will be for records found with them intermediarylist = [ ] for record in listofstates : digitsl...
[ -0.09185561537742615, -0.6746537089347839, 0.5233312845230103, -0.4857877194881439, -0.2968989312648773, -0.06911871582269669, 0.5546497106552124, 0.4919080138206482, 1.4724695682525635, 0.24184565246105194, 0.21086908876895905, 0.2002374827861786, -0.05359882861375809, 0.07539640367031097...
def rescale ( im : np. ndarray, fac : float, interp _ down : int = cv. inter _ cubic, interp _ up : int = cv. inter _ cubic, ) - > np. ndarray : w, h = im. shape [ : 2 ] [ : : - 1 ] nw, nh = ( max ( 1, int ( fac * w ) ), max ( 1, int ( fac * h ) ) ) im _ dst = resize ( im, width = nw, height = nh, interp = interp _ dow...
[ 0.34838372468948364, 0.28963664174079895, 0.6959492564201355, 0.42620933055877686, 0.18645191192626953, -0.600719153881073, 0.21838602423667908, -0.1383352279663086, -0.2784081697463989, -0.18860352039337158, 0.3983655869960785, -0.0137900710105896, 0.3506806492805481, -0.17603200674057007...
def compute _ centroids ( features _ matrix, weight = ( 1., 1., 1., 1., 0. 75 ), var _ names = ('dbz ','zdr ','kdp ','rhohv ','h _ iso0'), hydro _ names = ('ag ','cr ','lr ','rp ','rn ','vi ','ws ','mh ','ih / hdg'), nsamples _ iter = 20000, external _ iterations = 30, internal _ iterations = 10, alpha = 0. 01, cv _ ap...
[ 0.37416204810142517, 0.41948679089546204, 0.7379424571990967, 0.5825871825218201, -1.1609216928482056, -0.192127987742424, 0.05394088849425316, 0.9230320453643799, -0.11422930657863617, 0.8592055439949036, 0.3807038962841034, 0.04924291744828224, -0.04407062381505966, 0.5894554257392883, ...
def is _ in _ stock ( row : list ) - > bool : stock = row [ stock _ col _ idx ]. lower ( ) return stock = = " yes "
[ -0.6498570442199707, 0.753156840801239, 0.2794683873653412, 1.161350965499878, 0.2682467997074127, 0.054391779005527496, -0.5809475779533386, -0.5508237481117249, 0.3378954827785492, 0.4793635904788971, -0.4951837360858917, 0.36147522926330566, 0.32220354676246643, 0.048234619200229645, ...
async def _ check _ server _ disconnected ( self ) - > none : if ( self. _ transport and self. _ transport. state = = transportstate. server _ disconnected ) : await self. close ( ) raise servererror ( " connection closed by the server ", self. _ transport. last _ connect _ result )
[ -0.2951137125492096, 0.03088054060935974, 0.5840722322463989, -0.5147016048431396, 0.09923893213272095, 0.4022361636161804, -0.19124524295330048, -0.05473420023918152, -0.1320512443780899, -0.49860289692878723, 0.493215948343277, 0.29665613174438477, -0.41392752528190613, 0.644535124301910...
def action _ map ( self, action _ number ) : return harvest _ actions [ action _ number ]
[ -0.7895671129226685, -1.199826717376709, 0.43034130334854126, 0.15573649108409882, 0.940395712852478, -0.052399106323719025, 0.6254110336303711, -0.6037995219230652, 1.3284331560134888, 0.30587291717529297, 0.6251673698425293, 0.8533391356468201, 1.2404654026031494, -0.7154704332351685, ...
def finished ( s ) : # type : ( state ) - > bool return s. status = = finished
[ -0.5751863718032837, -0.0014389286516234279, 0.2133379876613617, 0.6331967115402222, -0.7071552872657776, -0.2471025288105011, -0.23368026316165924, -0.39264732599258423, 0.7608155608177185, 0.12230213731527328, -1.6223022937774658, -0.11848468333482742, 0.6062691807746887, 0.0320856869220...
def de _ tuple ( double _ tuple ) : listed _ tuple = [ ] for down in range ( len ( double _ tuple ) ) : mini _ list = [ ] for along in double _ tuple [ down ] : mini _ list. append ( along ) listed _ tuple. append ( mini _ list ) return listed _ tuple
[ -0.8160954117774963, 0.19922633469104767, 0.544114887714386, -0.6898432970046997, 0.3062940835952759, -0.007489213719964027, 0.45126986503601074, 0.5803812146186829, 0.25763070583343506, 0.301441490650177, -1.1141571998596191, -0.4259382486343384, -0.44243380427360535, -0.2684745788574219,...
def _ _ init _ _ ( self, * args ) : _ topods. topods _ iterator _ swiginit ( self, _ topods. new _ topods _ iterator ( * args ) )
[ -0.9453215599060059, 0.028830327093601227, 0.4636998772621155, 0.041029542684555054, -0.7155429124832153, 0.1419072300195694, 0.6547346711158752, 0.10078146308660507, -0.5574855804443359, 0.2913993000984192, 0.2270764708518982, -0.730677604675293, -0.09477733075618744, 0.3771054744720459, ...
def get _ hgnc _ ids ( self, * confidence _ levels : str ) : return self. select _ from _ genes ( " hgnc _ id ", * confidence _ levels )
[ 0.01623443141579628, -0.3674767315387726, 0.1485157608985901, 1.0221666097640991, 1.0973137617111206, 0.13413390517234802, -0.7135290503501892, -0.6301023960113525, -1.5578325986862183, 0.05050508305430412, 0.28556451201438904, 0.14889146387577057, -1.2556952238082886, 0.16246114671230316,...
def functions ( args, paths, process _ log, exp ) : # make sure at least one data set is specified if not args. u and not args. od : print ('error : data set not specified.') if args. u : # parse function takes log file and exports u csv if args. parse : with open ( exp + paths ['log file'] + '. dat') as f : # open inp...
[ 0.5539834499359131, 0.07443244755268097, 1.0097357034683228, 0.2961067855358124, 0.25173643231391907, 0.3928944170475006, 0.7577671408653259, 0.16157738864421844, -0.32449179887771606, -0.4806045889854431, -0.10327471047639847, 0.5552203059196472, 0.5220866799354553, 0.02401665784418583, ...
def image ( title, desc, image _ name, group = none, height = none ) : ie = {'type':'image ','title': title,'description': desc,'plot file': image _ name, } if group : ie ['group'] = group if height : ie ['height'] = height return ie
[ -0.35032233595848083, 0.4389277696609497, 0.4276878237724304, -0.3015391528606415, -0.5861753821372986, 0.1890193223953247, -0.31026405096054077, 0.12017162889242172, -1.4803224802017212, 0.8066539764404297, 0.29653602838516235, 0.1733550876379013, -0.39240407943725586, -0.3223048746585846...
def test _ node _ annotations _ a _ add _ k _ delete _ a _ add ( ) : annotation _ key = random _ name ( ) annotation _ value = random _ name ( ) # get node details client, node = \ get _ node _ details ( cluster _ detail [ " cluster " ], cluster _ detail [ " client " ] ) node _ name = node. nodename node _ annotations ...
[ 0.2738102972507477, 0.04518162086606026, 0.6366556882858276, -0.3270343244075775, 0.17127659916877747, 0.12653815746307373, -0.10770335048437119, 0.05023866891860962, 0.38611751794815063, 0.3622303903102875, -0.2958381175994873, 0.7194569110870361, -0.13865873217582703, 0.26400691270828247...
def generate _ time _ prefix ( file _ name ) : time = datetime. datetime. now ( ). strftime ('% d % m % y % i % m % s') return time +'_'+ file _ name
[ -0.7068811058998108, 0.05100778490304947, 1.0773074626922607, -1.0669020414352417, -0.5741215944290161, 0.4394933581352234, -1.0890932083129883, 0.268091082572937, -0.48592376708984375, 1.3567590713500977, -0.5091901421546936, -0.4553169310092926, 0.8254555463790894, 0.8987471461296082, ...
def _ _ init _ _ ( self, root, transform, target _ transform = none, loader = albumentations _ loader, target _ loader = json _ loader ) : print ('initing...') self. images = glob. glob ( os. path. join ( root,'* / * *. jpg') ) self. samples = [ ( ipath, ipath. replace ('_ crop. jpg ','_ metadata2. json') ) for ipath i...
[ -0.4589666724205017, -0.8403308987617493, 0.47640255093574524, 0.36197757720947266, -0.3266957700252533, -0.6313849687576294, -0.0021511861123144627, 0.027012458071112633, -0.11625147610902786, -0.006258984562009573, -0.16513465344905853, 0.5260997414588928, 1.3420780897140503, 0.831231713...
def test _ _ get _ covars _ from _ kwargs _ fails ( covars, error _ msg ) : with pytest. raises ( exception ) as e : covars _ candidate _ float _ tensor = _ _ get _ covars _ from _ kwargs ( covars ) assert str ( e. value ) = = error _ msg
[ -0.17696218192577362, 0.42499473690986633, 0.33293411135673523, 0.16977211833000183, -0.0753571093082428, 0.7279839515686035, 0.27958357334136963, -0.8182567358016968, -0.7625317573547363, 0.2456551045179367, -0.14861814677715302, -0.01280994527041912, -0.31487753987312317, 0.4150407016277...
def partition ( list, low, high ) : mid = ( low + high ) / 2 if list [ mid ] < list [ low ] : list [ mid ], list [ low ] = list [ low ], list [ mid ] if list [ high ] < list [ low ] : list [ high ], list [ low ] = list [ low ], list [ high ] if list [ mid ] < list [ high ] : list [ mid ], list [ high ] = list [ high ],...
[ -0.19066213071346283, 0.3199886977672577, 0.5075554847717285, -0.48275673389434814, -0.5281466245651245, -0.7862638235092163, -0.3240283131599426, 0.46298855543136597, 0.5803561806678772, -0.19653861224651337, -1.1637846231460571, -0.5878918766975403, -1.0528783798217773, 0.537922084331512...
def _ inc ( self, val ) : assert ( len ( val ) = = self. sequence _ length ) return self. sequence _ string [ ( self. sequence _ string. index ( val ) + 1 ) % len ( self. sequence _ string ) ]
[ -0.6049873232841492, 0.19767054915428162, 0.6167626976966858, -0.34453392028808594, -2.001127243041992, 0.1337035894393921, -0.19725029170513153, -0.8177582025527954, 0.4821150600910187, 0.09609346091747284, 0.6125298738479614, -0.03938591480255127, -0.4122196137905121, -0.6684714555740356...
def test _ callbackresultchangesnextcallbackargument ( self ) : sd = synchronousdeferred ( " foo " ) sd. addcallback ( lambda r : 42 ) l = [ ] sd. addcallback ( l. append ) self. assertequals ( l, [ 42 ] )
[ 0.10173197835683823, 1.167303442955017, 0.345834881067276, 0.06399916857481003, 0.47063571214675903, -0.1616033911705017, 0.07317500561475754, -0.6336154341697693, 1.1079990863800049, -0.4666861593723297, -1.2767161130905151, 0.43277519941329956, -0.13963955640792847, 1.375133752822876, ...
def get _ change _ filter _ fn _ for _ buildbot _ commands ( accepted _ values = [ ] ) : assert type ( accepted _ values ) = = list accepted _ values = set ( accepted _ values ) def filter _ fn ( change ) : cur _ value = change. properties. getproperty ('buildbot _ commands ', [ ] ) assert type ( cur _ value ) = = list...
[ -0.35978034138679504, -0.0008759933989495039, 0.5289707183837891, 0.3217492401599884, -0.31927406787872314, 0.1885019987821579, 0.3169775903224945, 0.4187028110027313, -0.2503257095813751, -0.3142804801464081, 0.17677953839302063, 0.579319417476654, -0.031007230281829834, 0.505783915519714...
def read _ in _ game _ tables ( path _ ) : #
[ -0.9625133872032166, -0.38949742913246155, 0.5208107829093933, 0.3616730868816376, -0.9232214093208313, 0.7717169523239136, 0.48560410737991333, -0.7567304372787476, -1.7040759325027466, 0.8107849955558777, -0.3002326488494873, -0.07371610403060913, 0.3980008661746979, -0.4931538999080658,...
def get _ queryset ( self, pk = none ) : django _ user = djangouser. objects. get ( username = self. request. user. username ) return userpreferences. objects. filter ( user = django _ user )
[ -0.6502333879470825, 0.6110802888870239, 0.5293094515800476, 0.930067241191864, -0.14602909982204437, 0.5408992171287537, -0.12523315846920013, -0.3415173888206482, -0.20893798768520355, -0.007917027920484543, 0.17613913118839264, 0.57968670129776, -0.40847519040107727, -0.4572170376777649...
def operate ( self, parameter ) : pass
[ -1.8526818752288818, -0.1712673306465149, 0.38791751861572266, 0.7642655372619629, 0.8631794452667236, 0.524125337600708, 0.9810867309570312, -0.34154683351516724, 0.14955370128154755, 0.11561613529920578, -0.5627320408821106, -0.03092736005783081, -0.4830187261104584, -0.37476059794425964...
def check ( projects, index _ url = pypi. pypi _ index _ url ) : log = logging. getlogger ('ciu') log. info ('{ 0 } top - level projects to check '. format ( len ( projects ) ) ) print ('finding and checking dependencies...') blockers = dependencies. blockers ( projects, index _ url ) print ('' ) for line in message ( ...
[ -0.8649314641952515, 0.6908621788024902, 0.655152440071106, 0.3219732642173767, 0.5752423405647278, 0.7211182117462158, 0.3820394277572632, -0.31722119450569153, -0.7294272780418396, 0.3479369878768921, 0.02732355147600174, -0.32414570450782776, -1.4620698690414429, 0.8612725734710693, -...
def is _ staff ( self ) : # simplest possible answer : all admins are staff return self. is _ admin
[ -0.23039990663528442, 0.6668684482574463, 0.3499350845813751, 0.8481164574623108, 0.6571664214134216, 0.3727598488330841, -0.14818543195724487, -0.4388475716114044, 0.6887705326080322, -0.1066395491361618, -0.5643397569656372, 0.8258220553398132, -1.1201764345169067, 1.0900678634643555, ...
def get _ misp _ object ( misp _ url, misp _ key, use _ ssl = false ) : return pymisp ( misp _ url, misp _ key, use _ ssl )
[ 0.08103933185338974, -0.8180394172668457, 0.47367703914642334, 0.8073209524154663, -0.7062842845916748, -0.5792089104652405, -0.8594813346862793, 0.3894008696079254, 0.8716387748718262, 0.21107514202594757, -0.5760465264320374, -0.3494367003440857, -1.1516817808151245, -0.9637376666069031,...
def find _ exposures ( self, sky, bandlist ) : # bra, bdec = sky epaths, bands = [ ], [ ] for band in bandlist : if band not in self. headers : continue for expid in self. headers [ band ]. keys ( ) : hdr = self. headers [ band ] [ expid ] imsize = hdr [ " naxis1 " ], hdr [ " naxis2 " ] wcs = self. wcs [ band ] [ expid...
[ -0.4481102526187897, -0.724288821220398, 0.8628084659576416, -0.1336112916469574, -0.3985550105571747, 0.48690351843833923, 0.1904386430978775, -0.23525139689445496, 0.8952433466911316, 0.7208795547485352, 0.24121788144111633, -0.06540366262197495, 0.1945420652627945, 1.5307350158691406, ...
def randomize ( self ) : rows, cols = self. weights ( ). shape max _ val = 0. 1 self. _ weights = np. random. randn ( rows, cols ) * max _ val rows, = self. biases ( ). shape mu = 1 self. _ biases = np. zeros ( rows ) self. _ biases. fill ( mu )
[ -0.07373088598251343, 1.2471258640289307, 0.2989289462566376, -0.2061070203781128, 1.0047709941864014, 0.14781536161899567, 0.6841771006584167, 0.44572925567626953, 0.30559420585632324, -0.29690876603126526, 0.41850316524505615, 0.9490403532981873, -0.24982942640781403, 0.8634743690490723,...
def winbio _ winbiofree ( jitter ) : ret _ ad, args = jitter. func _ args _ stdcall ( [ " address " ] ) raise runtimeerror ('api not implemented') jitter. func _ ret _ stdcall ( ret _ ad, ret _ value )
[ -0.3102107644081116, 0.20210617780685425, 0.5064302086830139, 0.526153028011322, -0.6042472124099731, 0.04880682751536369, 1.5146645307540894, -0.7557748556137085, 0.5276258587837219, 0.479582816362381, -0.6589307188987732, 0.8828180432319641, -1.8631210327148438, 1.1497493982315063, -0....
def distribution _ to _ text ( distribution, minutes = false ) : if minutes : # for tstar, convert the mean value to a string representing the time. hours = int ( distribution. mean / 60 ) minutes = int ( distribution. mean % 60 ) if distribution. mean > = 780 : hours - = 12 elif distribution. mean < 60 : hours + = 12 ...
[ -0.5371248126029968, -0.5925772190093994, 0.6225364804267883, -1.098527431488037, -1.2116241455078125, 0.3069186210632324, -0.2832128703594208, -0.6689865589141846, 0.6586433053016663, 1.2184171676635742, 0.45312705636024475, 0.47897815704345703, 0.20027098059654236, 0.06584376096725464, ...
def get _ losses ( n, hess _ scale _ init = float ( 1 ) ) : def func _ loss ( y _ true, y _ pred ) : loss _ val = tf. keras. losses. mse ( y _ true, y _ pred ) return loss _ val def alpha _ loss ( alpha _ true, alpha _ pred ) : loss _ val = ( n + 1 ) * tf. keras. losses. meansquarederror ( ) ( alpha _ true, alpha _ pre...
[ -0.4306238889694214, -0.025031011551618576, 0.7207016944885254, 0.06692414730787277, -0.5111427903175354, -0.5726833343505859, -0.3508646786212921, -0.5406084656715393, -0.7262582778930664, -0.00682064238935709, -0.47321265935897827, 0.365664541721344, 0.9578724503517151, 1.468981385231018...
def is _ power ( num ) : if num = = 0 : return false if num = = 1 : return true for p in range ( 2, 33 ) : for res in range ( 2, int ( num * * ( 1. 0 / p ) ) + 2 ) : if res * * p = = num : return true return false
[ -0.15542151033878326, 0.35274314880371094, 0.527572751045227, 1.5837029218673706, 0.07216877490282059, -0.002124469494447112, -0.1093035489320755, -0.27594730257987976, 0.5231954455375671, -0.21967120468616486, -0.04733479768037796, -0.4075201749801636, -1.2794017791748047, -0.096105739474...
def search _ loop ( camera ) - > none : assert isinstance ( camera, cv2. videocapture ),'invalid camera object passed'process _ this = true faces = [ ] while true : ret, frame = camera. read ( ) if process _ this : faces = prc. process _ faces ( frame ) process _ this = not process _ this prc. assign _ faces ( faces ) ...
[ -0.5100548267364502, 0.011365443468093872, 0.6206595301628113, 0.9266214370727539, -0.33487391471862793, -0.1441730260848999, 0.5931081771850586, -1.2594624757766724, 0.6525627374649048, 0.08564932644367218, 0.05891022831201553, 0.7094100117683411, -0.41951996088027954, 0.9198881387710571,...
def reverse ( self, queue = none ) : result = self. _ new _ like _ me ( ) self. _ reverse ( result, self ) return result
[ -1.0413973331451416, 0.02821219712495804, 0.6904139518737793, 0.07050822675228119, -0.9862841963768005, -0.34640103578567505, -0.35362330079078674, -0.2123420089483261, -0.3642061948776245, -1.222456455230713, -1.122239351272583, 0.9750478267669678, -1.1641422510147095, -0.5198543071746826...
def station _ stats ( df ) : print ('\ ncalculating the most popular stations and trip... \ n') start _ time = time. time ( ) # display most commonly used start station start = df. groupby ('start station'). size ( ). sort _ values ( ascending = false ) print ( " the most popular starting station was { } with { } trips...
[ -0.12631694972515106, 0.2592373192310333, 0.7247850894927979, -0.2531379163265228, -0.08767145127058029, -0.20407292246818542, 1.0990538597106934, -0.436043381690979, -0.6554111838340759, -0.37222033739089966, 0.2930775284767151, 0.36222437024116516, 0.9211026430130005, 0.8143110275268555,...
def get _ field _ type ( self ) : return self. field _ type
[ 0.24895857274532318, 0.6525636315345764, 0.396383136510849, -0.19657181203365326, 1.848932147026062, 0.6820468902587891, 0.7352829575538635, 0.13710917532444, 0.3460535705089569, -1.2902519702911377, -0.5450344085693359, 0.568061351776123, -1.109941005706787, -0.5441574454307556, 0.93944...
def lazy _ generate _ modules ( model, loader ) : model. eval ( ) for minibatch, labels in loader : with torch. no _ grad ( ) : # some sanity prints on the minibatch and labels print ( " minibatch = { } / { } | labels = { } / { } ". format ( minibatch. shape, minibatch. dtype, labels. shape, labels. dtype ) ) mb _ min,...
[ -0.17266833782196045, -0.44406718015670776, 0.6070184707641602, -0.022341864183545113, 0.35658058524131775, 0.36091870069503784, 0.0472215935587883, -0.6673793196678162, 0.4239305257797241, 0.15504860877990723, -0.5862488746643066, -0.13340625166893005, 0.06658467650413513, 0.8094007372856...
def do _ delete ( self, node _ id ) : _ error _ code, _ msg = ramstkdatamodel. do _ delete ( self, node _ id ) # pylint : disable = attribute - defined - outside - init # it is defined in ramstkdatamodel. _ _ init _ _ if _ error _ code! = 0 : _ error _ code = 2005 _ msg = _ msg +'ramstk error : attempted to delete non ...
[ 0.40856313705444336, 0.5815825462341309, 0.7932780385017395, -0.44699734449386597, 1.1545188426971436, -0.4089106023311615, -0.05427571386098862, 0.4154490828514099, -0.14097796380519867, 0.7152289748191833, 0.23808763921260834, 0.3694537580013275, 0.06609409302473068, 0.49601539969444275,...
def test _ successful _ update _ other _ user ( self ) : response = self. client. post ( self. url, { } ) self. assertredirects ( response, reverse ('tasks : home'), status _ code = 302, target _ status _ code = 200 ) self. task. refresh _ from _ db ( ) self. assertequal ( self. task. status, task. status. completed ) ...
[ 0.5212995409965515, 0.1501162201166153, 0.777596116065979, 1.394170880317688, -0.39108067750930786, 1.059706211090088, 1.0968035459518433, 0.013343819417059422, -0.1270250529050827, -0.1387660950422287, -1.3175623416900635, -0.48842689394950867, 0.9313472509384155, 0.12906816601753235, 0...
def get _ total _ dnf ( self ) : return self. ret + self. nc + self. dnq + self. dnpq + self. dsq + self. dns + self. dnp + self. ex + self. wd
[ -0.5707218050956726, 0.28433817625045776, 0.6569437980651855, -0.6522035002708435, 0.13090640306472778, -0.5356293320655823, 0.046453531831502914, -0.4529167413711548, 0.0409439355134964, -0.5703324675559998, -0.9521582126617432, 0.0938132107257843, -0.3406265079975128, -0.3090249001979828...
def index ( self ) : return self. _ dump _ or _ error ( get _ version ( ) )
[ -0.7120625376701355, -0.0325651690363884, 0.2261914759874344, -0.13455121219158173, -0.07965143769979477, -0.2621641159057617, 0.27672287821769714, -0.6138740181922913, 0.13417817652225494, 0.765389084815979, 0.6205745339393616, 1.1853703260421753, -0.27675101161003113, -0.9044066071510315...
def get ( self, key : int ) - > int : hashcode = self. get _ hashcode ( key ) for i, each in enumerate ( self. key [ hashcode ] ) : if each = = key : return self. value [ hashcode ] [ i ] return - 1
[ -0.9973046779632568, 0.3648132383823395, 0.6366352438926697, 0.5283746719360352, -0.4036886990070343, -0.6830858588218689, 0.11920753866434097, 0.4086100459098816, -0.7863376140594482, 0.3562023937702179, 0.6203856468200684, 0.00581777561455965, -0.7745776176452637, 0.43258529901504517, ...
def get _ gene _ from _ kmer ( kmer, gene _ file ) : strand _ of = strand _ dict ( gene _ file ) gene ='initial'strand _ of ['initial'] ='none'with open ( gene _ file,'r') as file : gene _ list = [ ] sequence ='' # initial sequence which does not contain the kmer for line in file : # when reading a fasta header, update...
[ 1.2830960750579834, -1.0629700422286987, 0.31788182258605957, 1.046053409576416, -0.33566057682037354, 0.22362834215164185, -0.6556279063224792, 0.8401575088500977, -1.237196922302246, 0.7821643948554993, 0.035526636987924576, 0.4323848783969879, -0.8515014052391052, 1.014665126800537, 0...
def sliced _ wasserstein _ distance ( x _ s, x _ t, a = none, b = none, n _ projections = 50, p = 2, projections = none, seed = none, log = false ) : from. lp import wasserstein _ 1d x _ s, x _ t = list _ to _ array ( x _ s, x _ t ) if a is not none and b is not none and projections is none : nx = get _ backend ( x _ s...
[ 0.6938421726226807, -0.2977375388145447, 0.8741660714149475, -0.2701275646686554, -0.3737305700778961, -0.6788873672485352, -0.21467094123363495, 0.28345078229904175, 0.6334567666053772, 0.7222607731819153, -0.05776677280664444, 0.38646185398101807, 0.2352336049079895, -0.16863614320755005...
def transduce ( self, b, e ) : assert isinstance ( self. content _ admitter, mapping ) assert self. discard _ spacers or isinstance ( self. spacing _ admitter, mapping ) s = self. substr ( b, e ) if self. discard _ spacers or s in self. content _ admitter : if self. multiple _ transductions : return self. content _ adm...
[ -0.31480681896209717, 0.02408800832927227, 0.680443286895752, -0.05917668715119362, 0.07577351480722427, 0.08612371981143951, -0.3887315094470978, 0.29799363017082214, 0.23635710775852203, 1.0041934251785278, -0.030582459643483162, 0.9139615297317505, -0.405796080827713, 0.3128179907798767...
def connect _ to _ mongo ( ) : # connect to mongodb atlas client = pymongo. mongoclient ( " mongodb : / / movie _ recommendation : abdallah123456789 @ cluster0 - shard - 00 - 00. nbikg. mongodb. net : 27017, cluster0 - shard - 00 - 01. nbikg. mongodb. net : 27017, cluster0 - shard - 00 - 02. nbikg. mongodb. net : 27017...
[ -0.05542132630944252, -0.21086420118808746, 0.6010415554046631, 0.18449385464191437, 0.7360931038856506, 0.3890405595302582, -0.7636401057243347, 0.1617240309715271, -0.5053390860557556, 1.1654446125030518, -0.13770374655723572, 1.5156038999557495, -1.022249460220337, 0.3928537964820862, ...
def _ _ eq _ _ ( self, other ) : if isinstance ( other, command ) : return ( self. _ cmd = = other. cmd and self. _ payload _ type. ptype = = other. payload _ type. ptype ) or ( self. _ id is not none and other. id is not none and self. _ id = = other. id ) return false
[ -0.14665007591247559, -0.806860089302063, 0.6947272419929504, -0.03188661113381386, 0.6184335947036743, 0.23524178564548492, -0.0930483490228653, -1.2820194959640503, 1.0399272441864014, -0.8169702887535095, -0.3372415602207184, 0.45916518568992615, -0.6320284605026245, 1.0336259603500366,...
def get _ instance _ history ( self, instance _ id, count ) :
[ -0.37036028504371643, 0.4143669903278351, 0.2699936032295227, -0.27022624015808105, 0.3890053331851959, 0.03315300494432449, 0.07070732116699219, 0.006145484745502472, -1.1701908111572266, 0.31022942066192627, -0.10790804773569107, 0.8025624752044678, 0.2818264961242676, -0.174889594316482...
def get _ batchid _ from _ job ( job _ ads _ dict ) : batchid ='{ 0 }. { 1 } '. format ( job _ ads _ dict ['clusterid'], job _ ads _ dict ['procid'] ) return batchid
[ 1.1455981731414795, -0.8890882730484009, 0.3771679401397705, -0.23493583500385284, -0.4908292889595032, 0.8906393647193909, -0.4516262114048004, 0.09121345728635788, -0.3690902590751648, 0.37014296650886536, 0.3300108015537262, 1.687591314315796, 0.32784801721572876, 0.3602321445941925, ...
def get _ accuracy ( true _ pts, det _ pts ) : true _ pos _ dist _ cutoff = 2 true _ pts _ by _ frame = [ ] det _ pts _ by _ frame = [ ] max _ frame = int ( np. max ( [ np. max ( txy _ pts [ :, 0 ] ), np. max ( true _ pts [ :, 0 ] ) ] ) ) for frame in np. arange ( max _ frame + 1 ) : true _ pts _ by _ frame. append ( n...
[ 0.44831255078315735, -0.38641273975372314, 0.7735618352890015, -0.5111688375473022, -0.10727430135011673, -0.03050880879163742, 0.8649097681045532, 0.9152942299842834, 0.1401403695344925, 0.7096385359764099, -0.06476011127233505, 0.6170130372047424, 0.34730595350265503, 0.4004940390586853,...
def load _ checkpoint ( path, model, optimizer, scheduler, verbose = none ) : assert os. path. isfile ( path ) param _ dict = torch. load ( path, map _ location ='cpu') if model is none : model = param _ dict ['model _ class'] model. load _ state _ dict ( param _ dict ['model'] ) else : model. load _ state _ dict ( par...
[ 0.051886506378650665, -0.22880816459655762, 0.7164376974105835, 0.35510745644569397, -0.7650760412216187, 0.27215853333473206, -0.3055570423603058, -0.04179012402892113, -0.9850300550460815, 0.823680579662323, 0.23858840763568878, -0.1991647630929947, -0.5102589726448059, 0.022389639168977...
def getinput ( self, * args ) : return _ itkimageserieswriterpython. itkimageserieswriteriuc3iuc2 _ getinput ( self, * args )
[ 0.18937437236309052, 0.6898606419563293, 0.5668672323226929, 0.07607932388782501, 0.4915565848350525, 0.9830763339996338, 0.7134753465652466, 0.132506862282753, -0.5594891309738159, -0.25174710154533386, -0.22743447124958038, 0.4699815511703491, -0.8315660953521729, -1.051342248916626, 0...
async def test _ sending _ mqtt _ commands _ power _ unlinked ( hass : homeassistant, mqtt _ mock : mqttmockhaclient, setup _ tasmota ) - > none : config = copy. deepcopy ( default _ config ) config [ " rl " ] [ 0 ] = 2 config [ " lt _ st " ] = 1 # 1 channel light ( dimmer ) config [ " so " ] [ " 20 " ] = 1 # update of...
[ 0.3650173544883728, -0.3188786506652832, 0.4801371395587921, -0.1846695989370346, 0.17399071156978607, 0.4927377998828888, -0.16197824478149414, 0.34947898983955383, -0.054315462708473206, -0.28970789909362793, -0.1687333881855011, 0.02109300158917904, 0.03970253840088844, 0.67758888006210...
def setup ( self ) - > none : self. nlp = spacy. blank ( " en " ) self. px = graphemestophonemes ( self. nlp, sound _ table = { " 1 " : ( " w ", " ʌn " ), " 2 " : ( " t ", " uː " ), " 3 " : ( " θ ", " riː " ), " one " : ( " w ", " ʌn " ), " two " : ( " t ", " uː " ), " three " : ( " θ ", " riː " ), " to " : ( " t ", " ...
[ -0.5235747694969177, 0.31552866101264954, 0.7215480804443359, -1.2981559038162231, 0.46706128120422363, -0.12665142118930817, 0.06117157265543938, -0.7305514216423035, 0.19282761216163635, -0.011684068478643894, -0.19342206418514252, -0.4148729145526886, -0.3783554136753082, -0.26402384042...
def _ _ truediv _ _ ( self, other ) : return self. _ mathematical _ operator ( self, other, operator. truediv )
[ 0.5083221197128296, -0.0672629103064537, 0.6245453357696533, 0.5359212160110474, -1.0676168203353882, 0.38784080743789673, 0.16526520252227783, -0.9610775709152222, -0.5280289649963379, -0.5093008875846863, -0.15423543751239777, -0.6507089138031006, 0.3203459084033966, -0.39165452122688293...
def home _ team ( self ) : return self. _ teams ['home']
[ 1.0765478610992432, -0.5569197535514832, 0.31210097670555115, 0.9715574979782104, 0.4856259524822235, 0.5897356271743774, 0.23065996170043945, -0.6940146684646606, 0.37747976183891296, -0.41314858198165894, 0.12015318870544434, 1.0682567358016968, -0.23967048525810242, -1.4112600088119507,...
def cond _ exp _ monte _ carlo _ gen ( self, model, x, s, n ) : x _ in = x. copy ( ) cat _ va = [ ca for ca in s if ca in self. cat _ index ] # get categorical index s _ cu = [ cu for cu in s if cu not in self. cat _ index ] # get numerical index def get _ given _ data ( idx ) : val = np. array ( [ x [ idx ] ] ) val = ...
[ -0.22339293360710144, 0.3882805407047272, 0.6986833214759827, 0.271841436624527, -0.7332601547241211, 0.1061241626739502, 0.04048246517777443, 0.2608528435230255, -0.12332337349653244, 0.3771258294582367, -0.30391833186149597, 0.19943733513355255, 0.1788889318704605, 0.32312703132629395, ...