text stringlengths 25 2.19k | embedding listlengths 768 768 |
|---|---|
def unsupported _ method _ test ( self ) : # pylint : disable = no - self - use if sys. platform! ='win32': assert true return assert _ raises _ regexp ( valueerror, r " ^ hardlink is not supported on this platform. ", lambda : filereactor ('', method ='hardlink') ) assert _ raises _ regexp ( valueerror, r " ^ symlink ... | [
0.2943430542945862,
1.3505207300186157,
0.5512514710426331,
0.07443150132894516,
0.6881768107414246,
0.37567898631095886,
0.5354889035224915,
0.7857339382171631,
-0.048376284539699554,
-0.7088969945907593,
-0.1635742038488388,
-0.10714397579431534,
-0.478813111782074,
0.6694665551185608,
... |
def add ( self, obj ) : self. inspections [ obj. station. name ] = obj return obj | [
-0.6529576182365417,
-0.5689018964767456,
0.5813474655151367,
-0.3203100562095642,
-0.6954624652862549,
1.404532551765442,
0.4536101520061493,
-0.44988030195236206,
0.600607693195343,
-0.41549375653266907,
-0.5249859094619751,
-0.06710492819547653,
-0.7303200960159302,
-0.43050938844680786... |
def cast ( * args ) : return _ itkimageserieswriterpython. itkimageserieswriteriul3iul2 _ cast ( * args ) | [
-0.5402673482894897,
-0.2739315927028656,
0.37081679701805115,
-0.13014164566993713,
-0.1653817594051361,
1.620872139930725,
-0.7494824528694153,
0.10525345057249069,
0.343182772397995,
0.7759119272232056,
0.12608201801776886,
0.46484437584877014,
-0.22882810235023499,
-0.7991988658905029,... |
def reinterpolate ( self, times ) : new _ rots, av = self. _ slerp ( times ) return timedependentrotation ( new _ rots. as _ quat ( ), times, self. source, self. dest, av = av ) | [
-0.967979371547699,
0.784844696521759,
0.307064950466156,
-0.5923171639442444,
-0.9069746732711792,
0.13053163886070251,
-0.07895337045192719,
-0.9106358885765076,
0.386459618806839,
0.5108538269996643,
-0.3207901120185852,
0.01105392724275589,
-0.7143455147743225,
-0.812156081199646,
-1... |
def post _ resource ( self, test, type, data = none, reg _ url = none, codes = none, fail = test. fail, headers = none ) : if not data : data = self. test _ data [ type ] if not reg _ url : reg _ url = self. mock _ registry _ base _ url +'x - nmos / registration / v1. 3 /'if not codes : codes = [ 200, 201 ] valid, r = ... | [
-0.8135141730308533,
0.6614064574241638,
0.7295498847961426,
-0.08262518793344498,
0.3657902777194977,
-0.4248645305633545,
0.015544706955552101,
-0.19174787402153015,
0.7706683874130249,
0.3835565745830536,
-0.4508048892021179,
0.09811973571777344,
-0.6311259865760803,
0.6721220016479492,... |
def get _ imgs ( num ) : if type ( num ) = = int : imgs = range ( 1, 1584 ) num = np. random. choice ( imgs, size = num, replace = false ) for img _ no in num : yield img _ no, preprocess ( read _ img ( img _ no ) ) | [
-1.248088002204895,
0.5289124846458435,
0.637218177318573,
0.008615313097834587,
0.22246360778808594,
-0.4044705927371979,
0.43617305159568787,
-0.4519961178302765,
0.9038787484169006,
-0.5315005779266357,
0.2027522474527359,
0.23774130642414093,
0.4695844054222107,
0.596197247505188,
0.... |
def observe _ command ( message, client, args ) : guess = message. content. lower ( ) if ( observe _ arguments [ 0 ] in guess ) or ( observe _ arguments [ 1 ] in guess ) : if oq. observed ( guess ) = = true : return'{ } has successfully guessed the state of patrick. '. format ( message. author ) else : return'{ } has u... | [
-0.4556884765625,
-0.613869845867157,
0.5325178503990173,
-0.26311367750167847,
0.4510652422904968,
0.5924975275993347,
0.20159319043159485,
-0.6796857118606567,
-0.32022181153297424,
0.18830606341362,
0.3263525068759918,
0.9206892848014832,
-1.0102628469467163,
0.33305397629737854,
-0.0... |
def checkcompatibilty ( self, compatstring ) : compatstring = [ x. lower ( ) for x in compatstring ] root = self. getsubsystem ( " / " ) if root = = " all " or " all " in compatstring : return true for string in root [ " compatibility " ] : if string in compatstring : return true return false | [
-0.1316642314195633,
-1.1086574792861938,
0.5409213900566101,
0.9273064136505127,
-0.36774346232414246,
0.615227460861206,
-0.4930318593978882,
0.8064293265342712,
0.03905954957008362,
-0.41836005449295044,
0.40824609994888306,
-0.22761468589305878,
-1.208173394203186,
0.9103838205337524,
... |
def get _ table _ from _ experiment ( self, experiment _ id : str ) - > pd. dataframe : if experiment _ id not in set ( list ( self. _ database. iloc [ :, 0 ] ) ) : raise valueerror ( f'the provided id is not in the database') return self. _ database. loc [ self. _ database. iloc [ :, 0 ] = = experiment _ id ] | [
0.06175725534558296,
0.7691283822059631,
0.15319615602493286,
0.3801305294036865,
0.10833115130662918,
-0.7750610709190369,
-0.025539252907037735,
-0.27989086508750916,
-0.27716290950775146,
0.367745578289032,
0.9809576272964478,
0.9562005400657654,
-0.5577422976493835,
-0.5208567976951599... |
def test _ spectral _ coord _ alphacen ( ) : obstime = time. time ('2018 - 12 - 13 9 : 00') obs = get _ greenwich _ earthlocation ( ). get _ gcrs ( obstime ) # always built - in, no download required # acen = skycoord. from _ name ('alpha cen') # coordinates are from here, # but hard - coded below so no download requir... | [
0.6733835339546204,
-0.5566831827163696,
0.7027324438095093,
-0.13025137782096863,
-0.10546300560235977,
0.871887743473053,
-0.10973189771175385,
0.03636199235916138,
0.22634179890155792,
-0.48245105147361755,
-0.18444456160068512,
0.127054825425148,
0.23869118094444275,
0.4884258210659027... |
def get _ verts _ in _ group ( vertices, weight _ group ) : v _ list = [ ] index = weight _ group. index for vert in vertices : # print ( vert. index ) result = [ vertex _ group. weight for vertex _ group in vert. groups if vertex _ group. group = = index ] if result : v _ list. append ( result [ 0 ] ) else : v _ list.... | [
0.2103700339794159,
-0.7764907479286194,
0.48086994886398315,
0.6056939959526062,
0.011990193277597427,
-0.6313199996948242,
-0.2758616805076599,
-1.0485869646072388,
-0.21813079714775085,
0.9846215844154358,
0.06250384449958801,
0.4054347574710846,
-0.9777094721794128,
0.16181018948554993... |
def _ create _ positive _ quadrant _ convex _ cone ( self ) : return convexconeinpositivequadrant ( [ rayintwodimension ( 90, pointintwodimension ( [ 0, 0 ] ) ), rayintwodimension ( 0, pointintwodimension ( [ 0, 0 ] ) ) ] ) | [
0.15069544315338135,
-1.37873375415802,
1.0147489309310913,
0.5059357285499573,
-0.8315315246582031,
-0.2159903645515442,
-1.0985288619995117,
-0.8102979063987732,
-0.6853043437004089,
0.07151574641466141,
-0.3388557732105255,
-0.6809102892875671,
0.20666536688804626,
-0.4885173738002777,
... |
def get _ groups _ for _ grading ( self, svc, course : course, group _ set _ id, grading _ student _ id ) - > optional [ list ] : # pragma : nocover return none | [
-0.7469855546951294,
0.6729182600975037,
0.15557703375816345,
0.029902206733822823,
0.5001731514930725,
-0.12222059071063995,
-0.41993948817253113,
-1.1012701988220215,
-0.7488691210746765,
0.1489153504371643,
0.5590674877166748,
0.4678975045681,
-0.5623029470443726,
0.10034185647964478,
... |
def name _ code _ data ( self ) : return sorted ( [ ( code, name ) for name, code in self. _ _ temple _ codes. items ( ) ], key = lambda v : v [ 1 ] ) | [
-1.119322419166565,
-0.19588351249694824,
0.3213120698928833,
-0.8210042715072632,
-1.3879404067993164,
0.5655972957611084,
-0.3248344659805298,
-0.6910703778266907,
0.6065512895584106,
1.0419752597808838,
-1.283498764038086,
0.005791258532553911,
0.43755388259887695,
0.8324393630027771,
... |
def getconsistcluster ( complist ) : consist = 0 f = 0 for item in complist : if item [ 2 ] = = 1 : if item [ 1 ] = = 1 and f = = 0 : # find consist + = 1 f = 1 else : f = 0 return consist | [
-0.8787267208099365,
-0.5247136950492859,
0.6816690564155579,
0.6254571676254272,
0.9884768128395081,
-0.19463302195072174,
1.499630093574524,
0.988977313041687,
0.08854229003190994,
-0.22733236849308014,
-0.158699631690979,
-0.24469108879566193,
-1.376863956451416,
0.7035959362983704,
0... |
def inference ( self, x, n _ outputs = none, bn = false, condition = none ) : print ('cansu softmax inference has called') if n _ outputs is none : n _ outputs = self. n _ class with tf. variable _ scope ('softmaxregression') : x = self. embedding _ layer ( x ) x = self. flatten ( x ) if condition is not none : with tf... | [
-0.3683895468711853,
0.1743524670600891,
0.8445723056793213,
0.7818992733955383,
-0.862446129322052,
0.29235535860061646,
-0.37579500675201416,
0.5061455965042114,
0.12493065744638443,
0.14315350353717804,
0.24432051181793213,
0.4857538044452667,
-0.43177780508995056,
0.30680134892463684,
... |
def _ _ init _ _ ( self, inputlist ) : self. input = inputlist self. nodes = dict ( ) self. edges = dict ( ) self. toporder = [ ] self. nodescopy = dict ( ) self. startnode = - 1 self. endnode = - 1 self. path = [ ] | [
-1.5065319538116455,
0.2694335877895355,
0.45544904470443726,
1.0747610330581665,
-0.8630455136299133,
0.289782851934433,
0.604141116142273,
0.22158898413181305,
0.1315537542104721,
0.09696223586797714,
-1.2168289422988892,
-0.33030399680137634,
-0.5516696572303772,
0.7819619178771973,
-... |
def generate _ equations ( self ) : equations = [ ] for s in sorted ( self. states ) : lhs = self. out _ links ( s ) rhs = self. in _ links ( s ) equations. append ( ( lhs, rhs ) ) return equations | [
-1.2347270250320435,
-0.6638407111167908,
0.34496980905532837,
-0.36564016342163086,
0.13441385328769684,
0.15137697756290436,
0.41131746768951416,
0.5386185050010681,
0.38673135638237,
-0.46094658970832825,
0.24609161913394928,
-0.5811684131622314,
-0.0987890362739563,
1.0690832138061523,... |
def max _ entangled ( dim : int, is _ sparse : bool = false, is _ normalized : bool = true ) - > [ np. ndarray, sparse. dia _ matrix ] : psi = np. reshape ( iden ( dim, is _ sparse ), ( dim * * 2, 1 ) ) if is _ normalized : psi = psi / np. sqrt ( dim ) return psi | [
-0.5214425325393677,
0.35557451844215393,
0.648961067199707,
0.9271581172943115,
-0.10134455561637878,
-0.46981891989707947,
-0.5166539549827576,
0.8236830234527588,
1.4404840469360352,
0.6533651351928711,
0.5180278420448303,
0.04957002028822899,
-1.0804229974746704,
-0.3326012194156647,
... |
async def test _ set _ temperature ( self ) : xknx = xknx ( ) expose _ sensor = exposesensor ( xknx, " testsensor ", group _ address = " 1 / 2 / 3 ", value _ type = " temperature " ) await expose _ sensor. set ( 21. 0 ) assert xknx. telegrams. qsize ( ) = = 1 telegram = xknx. telegrams. get _ nowait ( ) assert telegram... | [
-0.12458131462335587,
1.1804207563400269,
0.4188857674598694,
-0.3024885356426239,
-0.1343272477388382,
0.02677236683666706,
-0.17915578186511993,
-0.29360994696617126,
0.044221483170986176,
0.5481392741203308,
-0.4707050621509552,
0.008501073345541954,
-0.1718207746744156,
-0.219933450222... |
def removed _ members ( self, target ) : # type : ( udmofficegroup ) - > set [ str ] _, removed = self. members _ changes ( target ) return removed | [
-0.8802047371864319,
-0.10095780342817307,
0.3646828532218933,
-0.8141381740570068,
-0.220423623919487,
-0.6940580010414124,
-0.7045168876647949,
-0.5191948413848877,
-0.07830704003572464,
-0.22002996504306793,
-0.9758483171463013,
0.6528391242027283,
-0.4965116083621979,
-0.33106273412704... |
def add ( self, other ) : data _ map, other = self. _ reach _ in ( other ) return wrappedoperatorplatform ( underlying = other. apply ( self. underlying ), data _ map = data _ map ) | [
-1.0186471939086914,
0.3538121283054352,
0.6202932000160217,
-0.15479592978954315,
-0.6470754742622375,
1.016190767288208,
0.02011331543326378,
-0.7996814250946045,
0.5055609345436096,
-0.6808445453643799,
-0.16481590270996094,
0.32626667618751526,
-0.5173879265785217,
-0.1556142121553421,... |
def display _ dfs ( * dfs : pd. dataframe # any number of pandas dataframes ) : for df in dfs : display ( df ) | [
-0.9315410256385803,
1.1630843877792358,
0.4275205135345459,
0.5145103335380554,
-0.05941656604409218,
-0.0920015498995781,
0.6403982043266296,
-0.37185391783714294,
-0.14529532194137573,
-0.676994800567627,
0.94150710105896,
0.21560722589492798,
0.13456884026527405,
0.40999937057495117,
... |
def remove _ item ( self, path : str ) - > optional [ dict [ str, any ] ] : if path in self. _ entries : return self. _ entries. pop ( path ) return none | [
-0.36780545115470886,
-0.2674979865550995,
0.46038636565208435,
-0.2679857313632965,
-0.6396780014038086,
-0.3863404393196106,
-0.729436457157135,
0.07472238689661026,
-0.17654424905776978,
0.36703965067863464,
-0.6568813920021057,
-0.21628007292747498,
-0.774407684803009,
-0.6126881241798... |
def ovs _ port _ updated ( self, ovs _ port, orig _ ovs _ port = none ) : if ovs _ port is none : log. error ( " ovs _ port is none " ) return log. info ( " ovs port updated : % s ", ovs _ port ) # ignore port that misses some parameters if not self. _ check _ ovs _ port _ integrity ( ovs _ port ) : return port _ id = ... | [
0.26558107137680054,
-1.0144587755203247,
0.6221897602081299,
-0.03157255798578262,
0.16585704684257507,
0.159129798412323,
-0.16375313699245453,
0.02263355813920498,
0.9120504856109619,
0.64921635389328,
-0.00018219674529973418,
0.11354196071624756,
0.2571270763874054,
-0.2900194525718689... |
def on _ udp _ receive ( self, message, addr ) : log. debug ( " received something with len { } from { } ". format ( len ( message ), addr ) ) pdu = signalpdu. from _ buffer ( message ) log. debug ( " extracted signal pdu type { } len { } ". format ( pdu. type, pdu. len ) ) if self. state = = dlepsessionstate. peer _ d... | [
-0.28498026728630066,
0.27902790904045105,
0.646941065788269,
-0.1759621948003769,
0.461714506149292,
-0.6540480256080627,
-0.18930432200431824,
0.4667689800262451,
0.5425558686256409,
-0.05463002994656563,
-0.929427444934845,
0.00884341448545456,
-0.04540301114320755,
-0.16220258176326752... |
def subdisplays ( self ) : raise notimplementederror | [
0.6583002209663391,
-0.32736968994140625,
0.5913606882095337,
0.5014795660972595,
-0.9249129295349121,
1.237931728363037,
0.989355742931366,
-0.862313985824585,
0.46033164858818054,
-0.48385289311408997,
-0.16282834112644196,
0.5619469881057739,
0.08536625653505325,
0.690869152545929,
-0... |
def int _ strictly _ positive ( string ) : try : integer = int ( string ) except valueerror : raise argparse. argumenttypeerror ('{ } cannot be converted into an integer. '. format ( string ) ) if integer < = 0 : raise argparse. argumenttypeerror ('{ } is not strictly positive. '. format ( integer ) ) else : return int... | [
0.22215165197849274,
-1.0548113584518433,
0.4738965928554535,
0.03878835588693619,
-0.22312913835048676,
1.3813594579696655,
0.024410022422671318,
0.25868460536003113,
-1.04718017578125,
-0.041249748319387436,
0.9204639792442322,
0.09502185881137848,
-0.6498133540153503,
-0.099983766674995... |
def get ( self, key ) : return self. _ memcache. get ( self. _ prefix + key ) | [
-0.6872520446777344,
0.20632167160511017,
0.41200196743011475,
-0.4363163709640503,
-0.8044112920761108,
-0.5180114507675171,
-1.2972848415374756,
-0.5239765048027039,
0.07411564886569977,
0.3603871166706085,
0.056878890842199326,
0.8677248954772949,
-0.4086320400238037,
-0.258428812026977... |
def unique ( s ) : # from http : / / code. activestate. com / recipes / 52560 - remove - duplicates - from - a - sequence / n = len ( s ) if n = = 0 : return [ ] # try using a dict first, as that's the fastest and will usually # work. if it doesn't work, it will usually fail quickly, so it # usually doesn't cost much t... | [
-0.6919447779655457,
0.15448884665966034,
0.49165281653404236,
0.21332426369190216,
-0.356289267539978,
-1.0388579368591309,
0.5358468294143677,
-0.21788164973258972,
1.1828001737594604,
0.1156441941857338,
-1.43466055393219,
0.38097256422042847,
-0.7287927865982056,
-0.46998974680900574,
... |
def find _ radzone ( idx _ perigee ) : idx = idx _ perigee start _ radzone = none while true : idx - = 1 if idx < 0 : raise notfounderror ( " did not find radmon enable prior to { } ". format ( orbit _ points [ idx _ perigee ] ) ) if orbit _ points [ " name " ] [ idx ] = = " oormpds " : start _ radzone = orbit _ points... | [
-0.44376009702682495,
-0.5871654748916626,
0.7660483121871948,
-1.257733702659607,
-0.3712068796157837,
0.22434550523757935,
-0.1190951019525528,
0.007642552722245455,
0.20480288565158844,
1.0215271711349487,
-0.26789700984954834,
0.3087020814418793,
-1.3036967515945435,
0.1996602416038513... |
def match _ version ( self, block ) : if " if _ version " not in block : return true # read the if _ version directive, and ensure it is a list if _ version = block [ " if _ version " ] if not isinstance ( if _ version, list ) : if _ version = [ if _ version ] for requirement in if _ version : # create a requirement fo... | [
0.19038525223731995,
-0.6470656394958496,
0.6660752892494202,
0.9825214743614197,
0.19565217196941376,
0.13003948330879211,
-0.07242800295352936,
1.1910244226455688,
-0.2803313732147217,
0.8636285066604614,
-0.2790529727935791,
-0.6241319179534912,
-0.815445601940155,
0.5959115624427795,
... |
def _ calculate _ score ( self, graph, depth ) : graph _ dict = graph [ 3 ] if depth = = 1 : score = 0 for command in commands : if graph _ dict [ command ] is not none : score + = 1 return score else : score = 0 for command in commands : if graph _ dict [ command ] is none : continue score + = self. _ tau * self. _ ca... | [
-0.15959887206554413,
0.7669454216957092,
0.5309129953384399,
0.09815903753042221,
0.6266977787017822,
-0.9748684763908386,
0.2058502584695816,
-0.36639514565467834,
-0.21604564785957336,
-0.01092733908444643,
0.3945244550704956,
-0.5506274104118347,
-0.5007097125053406,
0.4819356203079223... |
def read _ nii _ bysitk ( input _ fid, peel _ info = false ) : img _ obj = sitk. readimage ( input _ fid ) img _ np = sitk. getarrayfromimage ( img _ obj ) if peel _ info : info _ obj = { " spacing " : img _ obj. getspacing ( ), " origin " : img _ obj. getorigin ( ), " direction " : img _ obj. getdirection ( ), " array... | [
-0.3035638630390167,
-1.115028977394104,
0.5199829936027527,
-0.404631644487381,
-0.2031012773513794,
-0.20969614386558533,
0.3847920000553131,
-0.05532988905906677,
0.16104529798030853,
0.14851580560207367,
-0.1016407236456871,
-0.19958126544952393,
0.4155252277851105,
0.4809396266937256,... |
def test _ node _ raises ( self ) : self. assertraises ( typeerror, changeset ) | [
0.11960867047309875,
1.2054575681686401,
0.22181552648544312,
-0.7697269320487976,
0.4280290901660919,
0.0862085223197937,
-0.15733925998210907,
-0.6610366106033325,
-0.22639040648937225,
-0.07765129208564758,
0.165144145488739,
1.1605024337768555,
-0.5501089692115784,
0.9030181169509888,
... |
def save _ geometry _ state ( self ) : return {'geometry': self. savegeometry ( ),'state': self. savestate ( ), } | [
-0.4637242257595062,
-1.3303248882293701,
0.3056281805038452,
-0.5100308060646057,
-0.8682865500450134,
0.1955164670944214,
0.003021166194230318,
-0.5659185647964478,
-0.029929954558610916,
0.3797580599784851,
-1.7745361328125,
-0.6436747908592224,
0.7683574557304382,
0.4211389720439911,
... |
def validatefilename ( filetype, file, center ) : validate _ filename = {'maf': " data _ mutations _ extended _ % s ",'clinical': [ " data _ clinical _ supp _ % s. txt ", " data _ clinical _ supp _ sample _ % s. txt ", " data _ clinical _ supp _ patient _ % s. txt " ],'vcf': " genie - % s - ",'cnv': " data _ cna _ % s.... | [
-0.07011682540178299,
-1.0690548419952393,
0.9335511922836304,
0.06960396468639374,
0.33666640520095825,
0.4594627916812897,
-0.055123221129179,
0.48596179485321045,
-0.3196650445461273,
0.6871532797813416,
0.5888384580612183,
0.10308139026165009,
-0.5739476084709167,
1.199621558189392,
... |
def get _ filter ( f, * args, * * kwargs ) : if isinstance ( f, filter ) : # don't need to do anything. assert not args and not kwargs return f elif isinstance ( f, six. string _ types ) : if f in _ filters : klass = _ filters [ f ] else : raise valueerror ('no filter \'% s \'' % f ) elif inspect. isclass ( f ) and iss... | [
-0.29139047861099243,
0.3628781735897064,
0.5841046571731567,
0.20662188529968262,
0.07306157797574997,
-0.8444111943244934,
-0.4571723937988281,
-0.46813610196113586,
0.11470787972211838,
-0.7694736123085022,
1.0005894899368286,
0.9186105728149414,
0.17610038816928864,
0.41403061151504517... |
def get _ host _ ip ( ) - > str : try : address = socket. gethostbyname ( socket. gethostname ( ) ) # on some system, this always gives me 127. 0. 0. 1. hence... except : address ='' if not address or address. startswith ('127.') : #... the hard way. s = socket. socket ( socket. af _ inet, socket. sock _ dgram ) s. con... | [
-0.38898682594299316,
0.44345366954803467,
0.7508191466331482,
0.7589669227600098,
-0.8142467141151428,
-0.437837153673172,
0.006353132892400026,
-0.16201145946979523,
-0.00819640327244997,
0.2914945185184479,
0.9335120916366577,
-0.45689964294433594,
-0.43772709369659424,
-1.0342108011245... |
def handle _ fixed _ dir ( self, action ) : fixed _ dir = self. templatize ( action [ " fixed _ dir " ] ) self. symbols [ " fixed _ dir " ] = fixed _ dir return pathlib. path ( fixed _ dir ). exists ( ) | [
-0.462437242269516,
0.19978298246860504,
0.38776740431785583,
-0.21616047620773315,
0.5963637232780457,
-0.3093051314353943,
0.9126797318458557,
0.6433572769165039,
0.5020474195480347,
-0.4888093173503876,
-0.7568111419677734,
0.1425667256116867,
0.18397969007492065,
0.40285053849220276,
... |
def number _ vs _ time ( h, generator, survey, t _ total, n = 30, average = true, * * kwargs ) : categories = ['all ','eec ','hot ','warm ','cold'] n _ pl = { key : np. zeros ( ( len ( t _ total ), n ), dtype = int ) for key in categories } for j in util. bar ( range ( n ) ) : sample, detected, _ = survey. quickrun ( g... | [
-0.8666362166404724,
0.4237697124481201,
0.7813851833343506,
-0.6808717846870422,
-0.06893158704042435,
0.17941750586032867,
0.35849836468696594,
-0.5288853049278259,
-0.9698560237884521,
0.9081873893737793,
-1.0327540636062622,
-0.3243454396724701,
1.080422282218933,
1.2968732118606567,
... |
def is _ accessible ( self ) : return security. current _ user. is _ authenticated ( ) | [
-0.7354936003684998,
-0.9808886647224426,
0.3278433680534363,
1.0056558847427368,
-0.39682918787002563,
0.17689970135688782,
0.6233382225036621,
0.269004225730896,
0.010518352501094341,
-0.1769009381532669,
-0.03513951972126961,
0.7987442016601562,
0.08419385552406311,
-0.30591797828674316... |
def add ( self, data ) : self. storage. insert ( 0, data ) self. currentitem = 0 | [
-0.7664497494697571,
0.028157874941825867,
0.38444453477859497,
0.11874805390834808,
0.7385891079902649,
1.2233673334121704,
-0.30251455307006836,
0.3919951915740967,
0.27027714252471924,
-0.48647698760032654,
-0.9969835877418518,
-0.20442688465118408,
-1.1098120212554932,
0.31212502717971... |
def game _ 6 ( ) : choice _ door = input ( " " " * which door would you like to go first? \ n 1. office 2. lobby \ n > " " " ) if choice _ door = = str ( 1 ) : game _ 5 ( ) elif choice _ door = = str ( 2 ) : game _ 2 ( ) else : print ( " * " * 80 ) print ( " " " < invalid entry, please choose between 1 and 2 > " " " ) ... | [
0.42088472843170166,
-0.3669787645339966,
0.6462708115577698,
1.2055200338363647,
0.20759819447994232,
0.37045547366142273,
0.32904019951820374,
-0.638478696346283,
-0.4938489496707916,
0.963454008102417,
-0.15723054111003876,
1.3270721435546875,
-0.726734459400177,
0.43824708461761475,
... |
def proxy _ cli ( * args ) - > subprocess. completedprocess : return subprocess. run ( [ sys. executable, " - m ", " c8ylp ", * args, ], stdout = subprocess. pipe, stderr = subprocess. pipe, ) | [
0.5915480256080627,
0.27295124530792236,
0.7907055616378784,
-1.0893532037734985,
-0.00726672075688839,
-0.12378717958927155,
-0.0355127714574337,
0.15934765338897705,
-0.09531445801258087,
0.07167074829339981,
0.3824513256549835,
0.052122633904218674,
-0.0303280558437109,
-0.6345319151878... |
def login ( self, username, password ) : message = dict ( ) if not ( self. checkuserexists ( username ) ) : message [ " success " ] = false message [ " error " ] = " username doesn't exist. " return ( json. dumps ( message ) ) user = user. select ( ). where ( user. username = = username ). get ( ) password _ salt = use... | [
-1.0922091007232666,
-0.05748584866523743,
0.742252767086029,
0.09082047641277313,
-0.2593918442726135,
-0.0014717343728989363,
0.31051474809646606,
-1.0439249277114868,
0.28866511583328247,
0.8412867784500122,
-1.506119966506958,
0.007071622181683779,
-0.0006617876351810992,
0.06298103183... |
def procttl ( ttl, docp ) : # ttl holds the position of the " - ttl " pattern in doc, such as ( 197, 201 ) tstart = ttl [ 0 ] pstart = findlastparen ( docp [ : tstart ] ) title = findtitle ( docp [ pstart : ] ) if not re. search ( " \ * ", title ) : titlep = " ( " + title + " ) " truelist = parseparen ( titlep ) outttl... | [
-0.12586483359336853,
-0.6730378270149231,
0.6008060574531555,
-0.4401666522026062,
-1.0205010175704956,
-0.335782527923584,
-0.27151596546173096,
-0.006865642499178648,
-0.001305516459979117,
1.1770529747009277,
0.34746721386909485,
-0.32481175661087036,
-0.08932039141654968,
-0.915701925... |
def _ _ init _ _ ( self, algorithm : str, key : bytearray, pad _ mode : int ) - > none : super ( ). _ _ init _ _ ( algorithm, key ) if pad _ mode not in ( pad _ mode _ 1, pad _ mode _ 2 ) : self. clear ( ) raise gostciphererror ('invalid padding mode') self. _ pad _ mode = pad _ mode | [
0.5204259753227234,
1.3357287645339966,
0.445210725069046,
-0.1406632512807846,
-0.6451100707054138,
0.8410820364952087,
0.01324204821139574,
-0.29819414019584656,
0.5186544060707092,
1.2933720350265503,
-0.5323491096496582,
0.2628346383571625,
0.055162858217954636,
0.6473524570465088,
0... |
def _ _ ram _ update _ ui ( self ) : if self. _ _ ui _ update : for output in self. selected _ outputs : output. ui. ram = self. _ _ ram _ combo _ box. current _ index ( ) | [
-0.36288556456565857,
-1.3824938535690308,
0.38711509108543396,
0.01282986905425787,
0.012592549435794353,
-0.660375714302063,
1.3934966325759888,
-0.3394661247730255,
0.2776487469673157,
-0.11782654374837875,
-0.07534662634134293,
0.5406689047813416,
-1.1903640031814575,
-0.03755945339798... |
def test _ constructor ( self ) : if hardwarethread. _ hardwarethread _ _ singleton is not none : hardwarethread. _ drop ( ) # ensure the default values are none self. assertisnone ( hardwarethread. _ hardwarethread _ _ lamp _ time ) self. assertisnone ( hardwarethread. _ hardwarethread _ _ lamp _ duration ) self. asse... | [
-0.3454415798187256,
0.025502394884824753,
0.7409660816192627,
-0.7063665390014648,
1.1591639518737793,
0.6607316136360168,
0.024017952382564545,
0.011850197799503803,
-0.381967693567276,
-0.9344245195388794,
-0.571209728717804,
-0.2436588704586029,
-0.38166743516921997,
1.350171446800232,... |
def _ job _ loop ( self, cache ) : socks = dict ( self. poller. poll ( 128 ) ) if self. bind _ job in socks : ( _, _, command, data, info, ) = self. socket _ multipart _ recv ( zsocket = self. bind _ job ) job = json. loads ( data. decode ( ) ) job _ id = job [ " task " ] job _ sha1 = job. get ( " task _ sha1sum " ) se... | [
-0.34263747930526733,
-0.11920712143182755,
0.8235408067703247,
0.2916690707206726,
-0.7416601181030273,
0.5992152690887451,
0.15720416605472565,
-0.4963429570198059,
-0.6374618411064148,
0.01831684820353985,
0.13317455351352692,
0.3238165080547333,
-0.6464547514915466,
0.780204176902771,
... |
def load _ data ( database _ uri : str, input _ data : dict ) : pass | [
-0.8117014169692993,
0.9396979808807373,
0.38219693303108215,
-0.0001723007735563442,
-0.09832055866718292,
0.2738683521747589,
-1.2317456007003784,
0.8736476898193359,
-0.5584555268287659,
-0.08431590348482132,
-0.1955898404121399,
0.14648692309856415,
-1.0998276472091675,
-0.487729638814... |
def on _ session _ ended ( session _ ended _ request, session ) : print ( " on _ session _ ended requestid = " + session _ ended _ request ['requestid'] + ", sessionid = " + session ['sessionid'] ) # add cleanup logic here | [
0.11942692846059799,
-1.7699819803237915,
0.44301024079322815,
0.020936954766511917,
0.2185303419828415,
-0.2194417417049408,
-0.25981783866882324,
-0.5167511701583862,
1.340659499168396,
0.5084563493728638,
0.053319502621889114,
1.072373390197754,
0.46164241433143616,
0.9843176603317261,
... |
def users _ get ( user _ id ) : get _ users = storage. get ( " user ", user _ id ) if get _ users is none : abort ( 404 ) return ( jsonify ( get _ users. to _ dict ( ) ) ) | [
-1.0171726942062378,
-0.41458478569984436,
0.5484054684638977,
0.38583651185035706,
0.04234921932220459,
-0.9731622338294983,
-0.6688073873519897,
-0.9204254150390625,
-0.35993051528930664,
-0.02703152969479561,
-0.35031217336654663,
0.8092565536499023,
0.30918318033218384,
0.3567418158054... |
def rerank _ nbest ( nbest, func ) : print ( " regular " ) nbest. sentences. sort ( key = func ) | [
-0.46250587701797485,
-0.2344774752855301,
0.23428072035312653,
0.5443976521492004,
-0.14794325828552246,
-0.8284949064254761,
-0.060648687183856964,
-0.0072472915053367615,
-1.0226421356201172,
0.2282504290342331,
-0.24913883209228516,
1.6982407569885254,
0.4302394986152649,
0.12926332652... |
def _ _ init _ _ ( self, s, r, sigma, t, q = 0. 0 ) : cev. _ _ init _ _ ( self, s, r, sigma, t, 1. 0, q ) | [
1.3903356790542603,
-0.5879878401756287,
0.5264811515808105,
1.2421574592590332,
-0.4152240455150604,
0.13734953105449677,
-0.08069133758544922,
0.17933891713619232,
0.35303744673728943,
0.18828125298023224,
-0.27336159348487854,
0.05770111083984375,
0.8935162425041199,
0.660244345664978,
... |
def obscureclarabellebutton ( self, increment ) : self. clarabellebuttonobscured + = increment self. refreshonscreenbuttons ( ) | [
0.09307415783405304,
-0.6112865209579468,
0.3816913068294525,
-0.11602430045604706,
-0.7089248895645142,
1.5726207494735718,
0.18240414559841156,
-0.8154975771903992,
0.5379201173782349,
-0.2080375701189041,
-0.6728106737136841,
0.8734938502311707,
0.3738113045692444,
0.08123999089002609,
... |
def _ _ init _ _ ( self, row ) : # set required scraping configurations try : self. state _ name = row ['state _ name'] self. state _ abbrev = name2abbrev [ self. state _ name ] self. url = row ['archive _ url'] self. format = row ['format'] except keyerror : logging. warning ( f " could not find all necessary keys in ... | [
-0.7712177634239197,
0.06142754107713699,
0.44951507449150085,
-0.6396886110305786,
-0.321302592754364,
-0.38498514890670776,
-0.5633648037910461,
0.08840227872133255,
0.5512738823890686,
0.033666737377643585,
0.13824939727783203,
-0.06842181831598282,
1.432165265083313,
0.0565236955881118... |
def has _ target ( self ) : return self. _ has _ target | [
-0.7628846764564514,
-0.20303727686405182,
0.4011394679546356,
-0.10240375250577927,
1.173297643661499,
-0.08259867131710052,
-0.6503167748451233,
0.24732011556625366,
-0.18725891411304474,
-0.6736711263656616,
0.2030920386314392,
-0.13781346380710602,
0.10583086311817169,
0.17309004068374... |
def strategy _ type ( self, strategy _ type ) : allowed _ values = [ 0, 1 ] # noqa : e501 if self. local _ vars _ configuration. client _ side _ validation and strategy _ type not in allowed _ values : # noqa : e501 raise valueerror ( " invalid value for ` strategy _ type ` ( { 0 } ), must be one of { 1 } ". format ( #... | [
0.3463699519634247,
-0.13831625878810883,
-0.5557869672775269,
0.7317920923233032,
0.9290103912353516,
0.5671926736831665,
0.45673051476478577,
-0.08371885865926743,
0.17637275159358978,
0.5016360282897949,
0.2511899173259735,
0.6999988555908203,
-0.2190132737159729,
0.4210280179977417,
... |
def bunk _ lecture ( n, tot _ lec, chatid, stype, index ) : if stype = = " lectures " : subject _ data = lecture. query. filter ( lecture. chatid = = chatid ). all ( ) else : subject _ data = practical. query. filter ( practical. chatid = = chatid ). all ( ) index - = 1 # db tables are zero - index attended = subject _... | [
-0.09197165071964264,
0.33904963731765747,
0.5418087244033813,
-1.1102726459503174,
0.14833183586597443,
0.0776357352733612,
0.09450938552618027,
-0.7342243194580078,
-0.8472998738288879,
0.21319320797920227,
0.3623392581939697,
0.2297668755054474,
0.020397916436195374,
0.543696403503418,
... |
def regular _ mesh _ data ( box, res, deg, diag ) : # check valid data assert len ( box ) = = len ( res ),'incompatible box and res arguments.'if len ( box )! = 2 : raise valueerror ('invalid box and res arguments.') # check valid diagonal arg diag = diag. lower ( ) assert diag in {'left ','l ','right ','r'},'invalid d... | [
-0.8261236548423767,
0.2856493890285492,
0.9418907165527344,
0.07475360482931137,
-0.21085749566555023,
-0.5091196298599243,
0.832780659198761,
-0.5033738613128662,
-0.036486461758613586,
-0.3354337215423584,
-0.3404620289802551,
-0.05045308917760849,
0.5369030237197876,
-0.412200182676315... |
async def _ dispatch _ async ( self, event : union [ str, callable ], payload : dict = { } ) - > none : ( payload, handlers ) = self. _ get _ handlers ( event, payload ) for handler in handlers : if asyncio. iscoroutinefunction ( handler ) or asyncio. iscoroutinefunction ( handler. _ _ call _ _ ) : await handler ( even... | [
0.2082059532403946,
0.07844215631484985,
0.5907276272773743,
0.4427632689476013,
0.1445278823375702,
0.012104207649827003,
-0.39689555764198303,
-0.13788264989852905,
0.056111715734004974,
0.3518005907535553,
0.3247408866882324,
-0.002132910303771496,
0.5701088309288025,
0.6669604182243347... |
def get _ filters ( ) : print ('hello! let \'s explore some us bikeshare data!') # to do : get user input for city ( chicago, new york city, washington ). hint : use a while loop to handle invalid inputs while true : city = input ('please enter your prefered city :') try : if city. lower ( ) not in ['chicago ','new yor... | [
0.20412620902061462,
0.4876336455345154,
0.7296993136405945,
0.10937473922967911,
-0.12264402955770493,
1.023120403289795,
0.17807066440582275,
-0.6926434636116028,
-0.6323707699775696,
-0.6797972917556763,
0.34019941091537476,
0.7961379289627075,
-0.14223869144916534,
0.3482702970504761,
... |
def cancel _ voucher ( self ) : for voucher _ rec in self : if voucher _ rec. journal _ id. is _ cheque : pdc _ obj = self. env ['pdc. detail'] pdc _ records = pdc _ obj. search ( [ ('voucher _ id ','= ', voucher _ rec. id ) ] ) for pdc _ rec in pdc _ records : if pdc _ rec. id : if pdc _ rec. state in ['draft ','poste... | [
0.8236427903175354,
-0.009294883348047733,
0.6167405247688293,
-0.5569131374359131,
0.4712388515472412,
-0.5226732492446899,
-0.20966395735740662,
0.3104667067527771,
0.06766792386770248,
1.0003399848937988,
0.8053117394447327,
0.17757858335971832,
0.6515713334083557,
0.8373671770095825,
... |
def read _ list _ file ( path _ file ) : with open ( path _ file,'r') as f _ in : lines = f _ in. readlines ( ) lines = [ x for x in lines if not x. strip ( ) [ 0 ] = ='#'] left _ file _ list = [ ] right _ file _ list = [ ] gt _ file _ list = [ ] conf _ file _ list = [ ] for l in lines : to _ load = re. split ( ', | ; ... | [
0.21828725934028625,
-0.4708278477191925,
0.849536120891571,
0.08177962154150009,
0.24690566956996918,
0.6213397979736328,
-0.2761214077472687,
1.363603115081787,
-1.0005730390548706,
0.8840520977973938,
-0.6567606329917908,
-0.8892902731895447,
-0.16532889008522034,
0.3006117343902588,
... |
def stop ( ) : if production : print " run'/ etc / init. d / rabbitmq - server stop'to stop server " while not yn _ choice ( " is rabbitmq stopped? ",'n') : print " please stop rabbitmq - server. " else : local ( " { rabbitmqctl } stop ". format ( * * rabbit _ env ) ) | [
-1.1048235893249512,
-0.9702441692352295,
0.5868841409683228,
0.24361787736415863,
0.2881060838699341,
1.2385984659194946,
0.09488780051469803,
0.4486485421657562,
-0.675017774105072,
0.18329352140426636,
-0.45990321040153503,
1.7260596752166748,
-0.9418659210205078,
0.04697896167635918,
... |
def calc _ class _ loss ( self, true _ obj, true _ class, pred _ class ) : # yolov1 : # " note that the loss function only penalizes classification error # if an object is present in that grid cell ( hence the conditional # class probability discussed earlier ). " # class _ loss = tf. nn. softmax _ cross _ entropy _ wit... | [
-0.31669187545776367,
-0.07012879103422165,
0.5808512568473816,
0.5708146095275879,
0.08530300110578537,
-0.409371942281723,
0.4595161974430084,
0.45114555954933167,
-0.4177686274051666,
0.6151703000068665,
0.0313485749065876,
0.33555835485458374,
0.49028870463371277,
-0.1563226729631424,
... |
def serialize _ state ( state, found _ move ) : if not found _ move : return json. dumps ( false ) board _ json _ array = [ ] for row, row _ list in enumerate ( state. board. board ) : row _ json _ array = [ ] for col, tile in enumerate ( row _ list ) : row _ json _ array. append ( state. board. retrieve _ num _ fish (... | [
-1.1453591585159302,
-0.4477370083332062,
0.9287036657333374,
-0.9780555367469788,
-0.4192424714565277,
-0.899154007434845,
0.8900749683380127,
-0.5764799118041992,
0.6869770884513855,
0.7408474683761597,
-0.7028592228889465,
0.5708222389221191,
0.04260629788041115,
0.3370378613471985,
0... |
def as _ numpy ( self, name : str ) - > ndarray [ t. any ] : | [
-0.8621309399604797,
-1.0231447219848633,
0.31285560131073,
-0.7015881538391113,
0.13165178894996643,
-0.7806183099746704,
-0.7051029801368713,
-1.2393800020217896,
0.1252174973487854,
0.42559540271759033,
-0.9154180884361267,
0.8731353878974915,
0.4867800176143646,
0.018336638808250427,
... |
def exp _ lr _ scheduler ( optimizer, epoch, lr _ decay _ epoch = 100, lr0 = 0. 001 ) : if epoch < lr _ decay _ epoch : return optimizer for param _ group in optimizer. param _ groups : param _ group ['lr'] = lr0 * np. exp ( - 0. 25 * ( epoch - lr _ decay _ epoch ) ) return optimizer | [
0.5504240989685059,
-0.92005455493927,
0.532481849193573,
-0.3218685984611511,
-1.1220216751098633,
0.24192343652248383,
-0.8103787302970886,
0.8154919743537903,
0.28325387835502625,
0.2540974020957947,
-0.001105624483898282,
0.5311110615730286,
-0.11927086114883423,
1.1252119541168213,
... |
def get _ classification ( self, image ) : tt = time. time ( ) with self. graph. as _ default ( ) : input _ height = 224 input _ width = 224 input _ mean = 0 input _ std = 255 dims _ expander = tf. expand _ dims ( image, 0 ) resized = tf. image. resize _ bilinear ( dims _ expander, [ input _ height, input _ width ] ) n... | [
-0.8168026208877563,
-0.07317160069942474,
0.5928956270217896,
-0.2073589563369751,
-0.6383175253868103,
-0.45587214827537537,
0.6898943781852722,
-0.5395659804344177,
-0.02782553806900978,
0.33802559971809387,
0.15012960135936737,
0.09933978319168091,
0.1320365071296692,
0.466483324766159... |
def parents ( self ) : return [ node ( self. graph, n ) for n in self. graph. redis. zrange ('{ } : pn '. format ( self. name ), 0, - 1 ) ] | [
-1.0378886461257935,
0.6873367428779602,
0.33152225613594055,
0.06693992763757706,
0.46393898129463196,
0.1433323472738266,
-0.405051589012146,
-0.4633515179157257,
0.11071538180112839,
0.3823864161968231,
-0.7141247987747192,
-0.19159750640392303,
-0.5299200415611267,
-0.16970089077949524... |
def generate _ async ( seq _ name, count ) : @ ndb. transactional _ tasklet def txn ( ) : seq = ( ( yield numbersequence. get _ by _ id _ async ( seq _ name ) ) or numbersequence ( id = seq _ name ) ) result = seq. next _ number seq. next _ number + = count yield seq. put _ async ( ) raise ndb. return ( result ) starte... | [
-0.6435749530792236,
0.6520351767539978,
0.6628462076187134,
0.11486288905143738,
-0.6277800798416138,
-0.6161878705024719,
0.11524971574544907,
0.46785110235214233,
-0.247737854719162,
0.3662060797214508,
-0.5421780943870544,
-1.122111201286316,
0.4336639940738678,
0.16185937821865082,
... |
async def async _ setup _ entry ( hass : homeassistant, entry : configentry, async _ add _ entities : addentitiescallback, ) - > none : await platform _ async _ setup _ entry ( hass, entry, async _ add _ entities, component _ key = " number ", info _ type = numberinfo, entity _ type = esphomenumber, state _ type = numb... | [
-0.010084245353937149,
0.5773580074310303,
0.5141286849975586,
-0.14703628420829773,
1.292631983757019,
-0.42240244150161743,
0.02152220346033573,
0.4187926650047302,
1.0280556678771973,
-0.07883776724338531,
-0.4539017081260681,
-0.0002917789388448,
0.9992905855178833,
1.0204559564590454,... |
def assumed _ state ( self ) - > bool : return self. _ template is none | [
0.08058669418096542,
-0.05265132337808609,
0.42828118801116943,
-0.965752124786377,
-0.5704922080039978,
0.173463374376297,
0.21249084174633026,
0.4658191204071045,
-0.00432638730853796,
-0.10397223383188248,
-0.7576758861541748,
-0.20005641877651215,
-0.4816676676273346,
0.795273423194885... |
def _ _ init _ _ ( _ _ self _ _, *, filters : optional [ pulumi. input [ sequence [ pulumi. input ['networkpacketcapturefilterargs'] ] ] ] = none, maximum _ bytes _ per _ packet : optional [ pulumi. input [ int ] ] = none, maximum _ bytes _ per _ session : optional [ pulumi. input [ int ] ] = none, maximum _ capture _ ... | [
-0.7484478950500488,
-0.07843412458896637,
0.7934101223945618,
-0.2536417543888092,
0.012405874207615852,
-0.059482142329216,
-0.7814620733261108,
-0.5482595562934875,
0.6210822463035583,
0.33118799328804016,
-1.2679287195205688,
0.01866120658814907,
0.7001335620880127,
-0.4344247281551361... |
def test _ valid _ read ( self ) : valid1 ='r0001004echo00000019 { " message " : " hello world " }'message = read _ message ( valid1, _ proto _ version ) self. assertisinstance ( message, singlerequestmessage ) self. assertequal ( message. request _ id, " 0001 " ) self. assertequal ( message. operation, " echo " ) self... | [
-0.48836204409599304,
0.2618405222892761,
0.6556838154792786,
0.6986945867538452,
-0.10702373087406158,
0.8882798552513123,
-0.38344237208366394,
-0.01787555404007435,
0.3514717221260071,
-1.4863300323486328,
0.7491069436073303,
-0.08875295519828796,
-0.8334633708000183,
-0.540490746498107... |
def test _ quotation _ to _ activity ( self, * _ ) : status = models. quotation. objects. create ( quote = " a sickening sense ", content = " test content ", user = self. local _ user, book = self. book, ) activity = status. to _ activity ( ) self. assertequal ( activity [ " id " ], status. remote _ id ) self. asserteq... | [
0.14018495380878448,
-0.7734289169311523,
0.27370259165763855,
-0.10307103395462036,
0.8207514882087708,
0.39075878262519836,
0.22574585676193237,
-0.40534472465515137,
0.6100039482116699,
0.729487955570221,
-0.47926339507102966,
0.29273906350135803,
-0.3959042429924011,
-0.775400936603546... |
def is _ valid _ name ( self, name ) : return self. _ _ temple _ codes. get ( name ) is not none | [
-0.61150723695755,
0.3556784987449646,
0.3347020149230957,
-0.33487799763679504,
-0.6966976523399353,
0.2777084708213806,
-0.15349705517292023,
-0.3767589032649994,
1.1976797580718994,
0.7461795806884766,
-0.8248661756515503,
-0.6107072830200195,
-0.6597642302513123,
0.5812869668006897,
... |
def case ( self, number ) : return self. casenum = = number | [
-0.7248407602310181,
-0.25790631771087646,
0.3644818961620331,
1.4095876216888428,
0.4408925175666809,
0.29044270515441895,
0.4704480469226837,
-0.9238790273666382,
1.8189607858657837,
0.16792714595794678,
-0.019029401242733,
0.07768163084983826,
-0.6663998961448669,
0.06838424503803253,
... |
def put ( org _ id ) : request _ json = request. get _ json ( ) valid _ format, errors = schema _ utils. validate ( request _ json,'contact') if not valid _ format : return {'message': schema _ utils. serialize ( errors ) }, http _ status. http _ 400 _ bad _ request try : response, status = orgservice. update _ contact... | [
-1.4246268272399902,
-1.1036850214004517,
0.8041073083877563,
0.3673856556415558,
-0.45345860719680786,
0.17872676253318787,
0.2775000035762787,
-0.3031662702560425,
-0.0042452141642570496,
1.1455644369125366,
-0.4462544322013855,
0.5872170925140381,
-0.7550835609436035,
-0.329150199890136... |
async def async _ step _ user ( self, user _ input : dict [ str, any ] | none = none ) - > flowresult : errors : dict [ str, str ] = { } if user _ input is not none : self. context [ " active " ] = true address = user _ input [ conf _ address ] discovery _ info = self. _ discovered _ devices [ address ] local _ name = ... | [
-0.12650874257087708,
0.3820202648639679,
0.6148961186408997,
0.6078266501426697,
0.397068053483963,
-0.3195512890815735,
1.3801604509353638,
0.31317704916000366,
-0.05897317826747894,
-0.6393013596534729,
-0.0010171029716730118,
0.38291335105895996,
0.7624047994613647,
0.7672246098518372,... |
def test _ nfc _ wps _ handover _ pk _ hash _ mismatch _ ap ( dev, apdev ) : ssid = " wps - nfc - handover - pkhash - ap " params = ap _ wps _ params ( ssid ) hapd = hostapd. add _ ap ( apdev [ 0 ], params ) if " fail " in hapd. request ( " set wps _ corrupt _ pkhash 1 " ) : raise exception ( " could not enable wps _ c... | [
0.6105031371116638,
0.283440500497818,
0.7462403774261475,
0.4561694264411926,
0.5061928629875183,
0.8014780879020691,
-0.1084313914179802,
-0.482958048582077,
0.1709086000919342,
-0.4855879545211792,
-0.187325581908226,
-0.5437667369842529,
-0.012788081541657448,
0.4788604974746704,
0.3... |
def get _ score ( self ) : return self. score | [
0.06438974291086197,
-0.581425130367279,
0.30171719193458557,
0.15891000628471375,
0.8499369621276855,
0.03299674019217491,
-0.3896755874156952,
-0.4144345223903656,
-0.16530919075012207,
-0.44468846917152405,
0.3797074854373932,
0.0003765250148717314,
-0.6150954365730286,
-0.6571890711784... |
async def game _ searches ( self, ctx : ctx ) : games = ctx. session. get _ searches ( ) await paginator ( ctx, games, format _ open _ game, f'{ ctx. session. user. username } \'s open games'). display _ page ( ) | [
-1.158107042312622,
0.6712540984153748,
0.5358351469039917,
0.4608638882637024,
0.22048123180866241,
0.4506208598613739,
-0.36917731165885925,
-0.5837790369987488,
-0.3461865782737732,
0.010076023638248444,
0.43443381786346436,
0.375020295381546,
-0.4807078540325165,
-0.06838688254356384,
... |
def delete _ record ( self, id _ num ) : record = session. query ( book ). filter _ by ( id = id _ num ). one ( ) self. session. delete ( record ) self. session. commit ( ) | [
-0.1042899489402771,
0.15924091637134552,
0.6262125372886658,
0.9393431544303894,
0.7634940147399902,
0.511881947517395,
0.2215501219034195,
0.7767981290817261,
-0.6718636751174927,
-0.05670638382434845,
-0.12803448736667633,
-0.6885097622871399,
-0.34713509678840637,
-0.02693793550133705,... |
def tiles _ from _ csv ( path ) : with open ( os. path. expanduser ( path ) ) as fp : reader = csv. reader ( fp ) for row in reader : if not row : continue yield mercantile. tile ( * map ( int, row ) ) | [
0.21028505265712738,
-0.43873390555381775,
0.4040864109992981,
0.2635304927825928,
-0.950210452079773,
0.4619026780128479,
-0.030868487432599068,
-0.1994272619485855,
0.43774569034576416,
-0.0957106277346611,
-0.10319709777832031,
0.0779200866818428,
0.5382792353630066,
-0.1830541789531707... |
async def close ( self ) : session = self. _ session if session : self. _ session = none self. _ connected = false await session. close ( ) | [
-0.3412531614303589,
-0.5830506086349487,
0.5570242404937744,
-0.582317590713501,
0.021820250898599625,
-0.5277642011642456,
-0.17460516095161438,
-0.3801864981651306,
0.20135778188705444,
-0.5209271311759949,
0.21737441420555115,
0.026010343804955482,
-0.7121018171310425,
-0.1449057310819... |
def json _ bytes _ canonical ( request ) - > bytes : return get _ test _ data ( request, _ _ name _ _, " config _ canonical. json " ) | [
-1.2910150289535522,
-0.026312530040740967,
0.3597549498081207,
-0.401172935962677,
-0.2902905344963074,
0.18956485390663147,
-0.15629257261753082,
-0.8833848834037781,
-0.5991095304489136,
0.43436384201049805,
-0.3738439977169037,
0.6542798280715942,
-0.05358988791704178,
-0.0223842374980... |
def chroma _ matrix _ vertical _ size ( self ) : # type : ( ) - > int return self. _ chroma _ matrix _ vertical _ size | [
0.4969871938228607,
-0.24241918325424194,
0.32674264907836914,
1.148651361465454,
0.11758429557085037,
0.47392600774765015,
1.4134302139282227,
-0.1832469403743744,
-0.3976346552371979,
-0.22177381813526154,
-0.8220860362052917,
0.6887490153312683,
-0.8873752951622009,
0.050693731755018234... |
def printmultimatrices ( a, b, c ) : rowsa, colsa = len ( a ), len ( a [ 0 ] ) rowsb, colsb = len ( b ), len ( b [ 0 ] ) rowsc, colsc = len ( c ), len ( c [ 0 ] ) num = rowsa if ( rowsa < rowsb ) : num = rowsb for i in range ( num ) : if i < rowsa : print'| ', for j in range ( colsa ) : print'{ 0 : 8. 4f } '. format ( ... | [
1.2250025272369385,
-0.28177720308303833,
1.0938664674758911,
-0.24593663215637207,
0.027559252455830574,
0.38345855474472046,
-0.06457004696130753,
-0.45549747347831726,
-0.5714533925056458,
1.2342197895050049,
0.7126491069793701,
0.24780437350273132,
0.06963557004928589,
0.20752030611038... |
def get _ student _ num ( self ) : return self. student _ num | [
-1.1074938774108887,
-0.8447931408882141,
0.4744356870651245,
1.0986970663070679,
0.44825315475463867,
0.21343010663986206,
1.4139338731765747,
0.7905714511871338,
0.06646193563938141,
-1.510825514793396,
-1.1748409271240234,
0.7709132432937622,
0.6629013419151306,
-0.5751497149467468,
0... |
def setup _ parser _ rules ( self, parser ) : def category _ pre _ processing _ hook ( category, options ) : if category. to _ param ( ) in [ " categoryorderpage " ] : category. set _ base _ url ( " http : / / www. digikey. com / " ) parser. hook ( " pre _ category _ discovery ", category _ pre _ processing _ hook ) se... | [
-0.6494664549827576,
0.3551299571990967,
0.46612605452537537,
0.338276207447052,
1.0718170404434204,
-0.6438289880752563,
0.41910746693611145,
0.26685699820518494,
0.12426630407571793,
-0.10267196595668793,
0.391355037689209,
-0.47058454155921936,
0.8829554319381714,
1.6762471199035645,
... |
def input _ date ( ) : # print ( " \ ninput for first date " ) flag, post = 0, 0 d1, m1, y1 = 0, 0, 0 d2, m2, y2 = 0, 0, 0 while flag = = 0 : print ( " \ ninput for first date " ) y1 = int ( input ( " enter the year : " ) ) if y1 > 0 : flag + = 1 m1 = int ( input ( " enter the month : " ) ) if 0 < m1 < 13 : flag + = 1 ... | [
0.5379889607429504,
0.7004812359809875,
1.003630518913269,
0.388243168592453,
-0.47753626108169556,
1.1881483793258667,
0.34185922145843506,
-0.8843613266944885,
-0.5684505105018616,
-1.1121317148208618,
-0.0330793596804142,
0.7623897194862366,
-0.06509663909673691,
0.6810413002967834,
0... |
def remove ( project _ name : str = typer. option (..., " - - project - name ", " - pn ", autocompletion = autocomplete. list _ projects, prompt = true, confirmation _ prompt = true, metavar = " project name which you used while adding " ) ) : current _ config = jsondataoperations. read ( ) index = - 1 found = false fo... | [
-0.2628922164440155,
0.28737467527389526,
0.7957250475883484,
-0.23796546459197998,
-0.04667166620492935,
0.46137329936027527,
0.4725474417209625,
0.4868694245815277,
0.44505375623703003,
1.0208547115325928,
-0.27279433608055115,
-0.08808664977550507,
-0.9601019024848938,
0.123432844877243... |
def get _ highest _ speed ( edges, node, child ) : # initialize fastest fastest = 0 # loop over neighbor of node for neighbor in edges [ node ] : # if child is find if neighbor [ 0 ] = = child : # update fastest if neighbor [ 1 ] is the fastest if neighbor [ 1 ] > fastest : fastest = neighbor [ 1 ] return fastest | [
1.3847943544387817,
-0.0016454897122457623,
0.6487728953361511,
0.2302337884902954,
0.0034671362955123186,
-0.8711574673652649,
-0.18140482902526855,
-0.32766881585121155,
-1.4598488807678223,
0.3248397707939148,
-0.2655809223651886,
0.4716961085796356,
-0.1474539041519165,
0.4429129660129... |
def test _ verify _ success ( vasp _ calc _ and _ ref ) : vasp _ calc, _ = vasp _ calc _ and _ ref vasp _ calc. verify _ inputs ( ) | [
0.838857889175415,
0.5718196630477905,
0.33793905377388,
0.8012591600418091,
0.29515957832336426,
1.0277804136276245,
0.7226573824882507,
-0.6785331964492798,
1.0140913724899292,
-0.973907470703125,
-0.1855746954679489,
0.17009730637073517,
0.7163427472114563,
0.2517588138580322,
1.10345... |
def test _ mac _ vendor _ mac _ formats ( self ) : vendor _ string ='raspberry pi foundation'with mock _ aiohttp _ client ( ) as aioclient _ mock : aioclient _ mock. get ('http : / / api. macvendors. com / b8 : 27 : eb ', text = vendor _ string ) aioclient _ mock. get ('http : / / api. macvendors. com / 00 : 27 : eb ',... | [
-0.24908587336540222,
0.06802637875080109,
0.4581569731235504,
0.1609424203634262,
0.2022339552640915,
0.13632281124591827,
0.4437919557094574,
-0.05060350149869919,
-0.02861076407134533,
-0.1370372623205185,
0.4182153046131134,
0.3071126639842987,
0.3516375422477722,
0.575349748134613,
... |
def dumpsource ( object, alias ='', new = false, enclose = true ) : from dill import dumps pik = repr ( dumps ( object ) ) code ='import dill \ n'if enclose : stub ='_ _ this _ is _ a _ stub _ variable _ _'# xxx : * must * be same _ enclose. stub pre ='% s ='% stub new = false # fixme : new = true doesn't work with enc... | [
-0.6388993263244629,
-0.09138514846563339,
1.0270603895187378,
-0.29987242817878723,
-0.8944191336631775,
-0.555742621421814,
0.3247722089290619,
0.10812857747077942,
1.1254401206970215,
0.6456565856933594,
-0.819007396697998,
0.42470186948776245,
0.24956975877285004,
0.46605008840560913,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.