text stringlengths 25 2.19k | embedding listlengths 768 768 |
|---|---|
def clean ( name ) : name = name. partition (':') [ 0 ] name = name. partition ('%') [ 0 ] return name | [
-0.21978384256362915,
-0.8268604278564453,
0.7147411108016968,
-0.4175460934638977,
-0.9842450618743896,
0.5462885499000549,
-0.6353888511657715,
-0.037829965353012085,
-0.2840000092983246,
1.513991355895996,
-0.34936776757240295,
-0.8166877627372742,
-0.7343273162841797,
-0.78671479225158... |
def get _ config ( self ) : config = super ( ). get _ config ( ) config. update ( { " output _ name " : self. output _ name } ) return config | [
-0.3049217462539673,
-0.6261352896690369,
0.465853750705719,
-0.01035790890455246,
-0.9235122203826904,
-1.071118712425232,
-0.4379912316799164,
0.528593122959137,
-0.6752968430519104,
0.6448726058006287,
-0.9448695778846741,
-0.705903947353363,
0.5279085040092468,
0.5202689170837402,
0.... |
def _ _ setitem _ _ ( self, key, value ) : pass | [
-1.5287506580352783,
-0.4912703335285187,
0.2876528799533844,
-0.10249315947294235,
-0.7131242156028748,
0.40972456336021423,
-0.39561137557029724,
-0.16590653359889984,
-0.7751883864402771,
0.2810460329055786,
-0.3898717164993286,
0.20107057690620422,
0.5762049555778503,
-0.11806117743253... |
def delete _ tag ( self, repo, tag ) : logging. info ('deleting tag % ( tag ) s in repository : % ( repo ) s ', dict ( tag = tag, repo = repo ) ) ref _ url = " % s / % s / git / refs / tags / % s " % ( self. git _ api _ repos, repo, tag ) response = requests. delete ( ref _ url, auth = self. _ credentials, timeout = se... | [
0.29112404584884644,
0.05394718050956726,
-0.008023588918149471,
-0.6301591992378235,
0.7452328205108643,
-0.005073415581136942,
-0.9007322788238525,
-0.1814485639333725,
-0.2658620774745941,
0.7976793646812439,
-0.2660796344280243,
0.6701861619949341,
-0.607617199420929,
1.126818418502807... |
def get _ writer ( self, dataset _ schema = none, dataset _ partitioning = none, partition _ id = none ) : raise exception ( " unimplemented " ) | [
-0.7586937546730042,
-0.18145695328712463,
0.2933894097805023,
0.6022189855575562,
0.44736695289611816,
-1.2654505968093872,
-0.3487185835838318,
1.1727534532546997,
-0.5355075001716614,
-0.8337928056716919,
0.5975592732429504,
0.3057793080806732,
-0.12898121774196625,
-0.7124842405319214,... |
def test _ onelement ( self ) : handshakes = [ ] xs = self. xmlstream xs. authenticator. onhandshake = handshakes. append handshake = domish. element ( ('jabber : component : accept ','handshake') ) handshake. addcontent ('1234') xs. authenticator. onelement ( handshake ) self. assertequal ('1234 ', handshakes [ - 1 ] ... | [
0.018833164125680923,
0.6147424578666687,
0.31983891129493713,
0.44950589537620544,
-0.3431147336959839,
0.41525644063949585,
-0.3281460106372833,
-0.010034466162323952,
1.1978782415390015,
-0.6075347065925598,
-0.005797008518129587,
-0.6383324265480042,
-0.5481640100479126,
0.395425230264... |
def _ entry _ repr _ simple ( entry ) : line2 ='% - 3d % - 20s % s'% ( entry. oid, entry. clue, sjb. common. misc. indent _ paragraph ( entry. answer, 25 ) ) return line2 | [
0.1824912428855896,
-0.9510813355445862,
0.5388296246528625,
-0.5731492638587952,
-0.7256460785865784,
0.7057189345359802,
-0.09328635782003403,
-0.302236407995224,
0.44095638394355774,
0.6021561026573181,
0.07499157637357712,
0.23914188146591187,
-0.1274188607931137,
-0.8080875873565674,
... |
def test _ get _ service _ description ( self ) : description = self. strategy. get _ service _ description ( ) assert type ( description ) = = description assert description. data _ model is simple _ service _ model assert description. values. get ( " seller _ service ", " " ) = = " some _ service " | [
0.1772312968969345,
0.6266770958900452,
0.07846043258905411,
0.09737881273031235,
0.9818429350852966,
0.15107184648513794,
-0.23661838471889496,
-0.3343963325023651,
0.2340862900018692,
-0.705325722694397,
0.1415640413761139,
0.8028199672698975,
0.3525633215904236,
-0.05989724025130272,
... |
def _ infertensorrepresentationfromschema ( schema : schema _ pb2. schema ) - > dict [ str, schema _ pb2. tensorrepresentation ] : result = { } columns _ remaining = { f. name : f for f in schema. feature } sparse _ tensor _ repsentations, columns _ remaining = ( _ infersparsetensorrepresentationsfromschema ( schema, c... | [
-0.3380127549171448,
-0.1058303490281105,
0.5256397724151611,
-0.28737589716911316,
-0.10509239882230759,
-0.7115058898925781,
0.758163571357727,
-0.11126384139060974,
0.21587194502353668,
0.5448547601699829,
-1.061881422996521,
0.03930233046412468,
-0.02893935702741146,
-0.187875479459762... |
def may _ do _ better ( b, encodings, guenc, mdb ) : funcs = mdb. get ( guenc ) if funcs is none : return none # candidencs not in encodings or appearing before guenc are ignored guenc _ index = encodings. index ( guenc ) for func in funcs : for candidenc in func. candidencs : if not candidenc in encodings : continue i... | [
-0.05342578887939453,
-0.379457026720047,
0.5741396546363831,
0.16275714337825775,
-0.4121205806732178,
-0.4961429536342621,
-0.12200626730918884,
0.1698247641324997,
-0.286249577999115,
-0.39374345541000366,
0.36742591857910156,
0.5205980539321899,
-0.21912792325019836,
0.1175097450613975... |
def testupdatevaluesforquerieswithunicodeaboutvalue ( self ) : with login ( u'username ', uuid4 ( ), self. transact ) as session : securetagapi ( self. user ). create ( [ ( u'username / bar ', u'description') ] ) objectid = yield self. facade. createobject ( session, about = u'eric serra '. encode ('utf - 8') ) objecti... | [
-0.32229217886924744,
-0.1144624799489975,
0.5815186500549316,
-0.03689854219555855,
0.22592861950397491,
0.10776214301586151,
-0.03174236789345741,
0.009708191268146038,
-0.47955945134162903,
-0.4684649109840393,
-0.5565925240516663,
-0.18349094688892365,
-0.011304022744297981,
0.28712245... |
def test _ delete _ agent _ requirement ( self ) : pass | [
-0.8756066560745239,
-1.1194789409637451,
0.30034446716308594,
0.8154804110527039,
-0.25221729278564453,
0.8396514058113098,
0.4322347640991211,
0.6482760310173035,
1.187398076057434,
-0.24800202250480652,
0.02753487229347229,
0.5501350164413452,
-0.35840877890586853,
1.1211048364639282,
... |
def testupdatevaluesforquerieswithunknowntaginquery ( self ) : securetagapi ( self. user ). create ( [ ( u'username / bar ', u'description'), ( u'username / foo ', u'description') ] ) objectid1 = uuid4 ( ) objectid2 = uuid4 ( ) # fixme replace this with securetagvalueapi once the index is # integrated values = { object... | [
-0.6102573275566101,
0.09868957847356796,
0.5227490663528442,
-0.481546550989151,
0.2966471016407013,
0.4507827162742615,
-0.28076469898223877,
-0.5592378973960876,
-0.6044673919677734,
-0.19015513360500336,
-0.48738324642181396,
-0.6042620539665222,
0.3203665316104889,
0.3383614420890808,... |
def check _ crash ( self ) : if self. decider. get _ position ( ) in self. astar. obs : return true else : return false | [
-0.3992241322994232,
-0.29756036400794983,
0.6225862503051758,
0.9450774192810059,
0.010312147438526154,
0.7541077136993408,
-0.551672637462616,
0.11159913241863251,
-0.5101563930511475,
0.13992325961589813,
0.5353878140449524,
-0.10293835401535034,
-0.10512911528348923,
0.7783380150794983... |
def seq _ attribute _ to _ map ( self, attribute : str, key _ attribute : str, value _ attribute : optional [ str ] = none, strict : optional [ bool ] = true ) - > none : if not self. has _ attribute ( attribute ) : return attr _ node = self. get _ attribute ( attribute ) if not attr _ node. is _ sequence ( ) : return ... | [
-0.8054442405700684,
-0.6119378805160522,
0.7416118383407593,
-0.460277259349823,
-0.8052425384521484,
-0.8364686369895935,
0.31947994232177734,
0.840086042881012,
0.6773642301559448,
1.0485762357711792,
-0.2996547222137451,
0.6236542463302612,
1.182734727859497,
0.22374433279037476,
0.1... |
def _ get _ document _ list ( business ) : base _ url = current _ app. config. get ('legal _ api _ base _ url') base _ url = base _ url [ : base _ url. find ('/ api') ] doc _ url = url _ for ('api2. get _ business _ documents ', * * {'identifier': business. identifier,'document _ name': none } ) business _ documents = ... | [
-1.5172697305679321,
-0.39402592182159424,
0.6294329762458801,
0.078284353017807,
-0.040289681404829025,
-0.1463262289762497,
-0.4298694431781769,
-0.09797123074531555,
-0.013401267118752003,
1.2045814990997314,
-0.655784547328949,
0.5973612070083618,
-0.005140569526702166,
0.4796035587787... |
def test _ random _ uniform ( self ) : point = self. beta. random _ point ( self. n _ samples ) self. assertallclose ( gs. shape ( point ), ( self. n _ samples, self. dim ) ) | [
-0.08087770640850067,
-0.13795965909957886,
0.08663951605558395,
-0.20123758912086487,
1.3913229703903198,
1.2687090635299683,
0.7792367339134216,
0.306686669588089,
0.3804510533809662,
-0.6689390540122986,
-0.6947342157363892,
-0.18748243153095245,
-0.5222275257110596,
0.18152159452438354... |
def custom _ collate _ fn ( batches ) : def padding _ tensor ( sequences ) : " " " : param sequences : list of tensors : return : " " " num = len ( sequences ) max _ len = max ( [ s. size ( 1 ) for s in sequences ] ) + 1 out _ dims = ( num, max _ len ) out _ tensor = sequences [ 0 ]. data. new ( * out _ dims ). fill _ ... | [
0.46263381838798523,
-0.6772896647453308,
0.7709317803382874,
0.1714075356721878,
-0.6909029483795166,
-0.5891337394714355,
0.7297541499137878,
-0.10958858579397202,
0.6147142052650452,
-0.27470993995666504,
-0.10547053068876266,
0.054230134934186935,
0.8482049703598022,
-0.022210208699107... |
def show _ current _ date ( args ) : current _ date = open ('current _ date. txt'). read ( ) if args. verbose : rprint ( f'current date is : { current _ date }') else : rprint ( f'{ current _ date }') | [
0.8844277858734131,
-0.6624660491943359,
0.6979384422302246,
0.37790074944496155,
0.361576110124588,
1.6673450469970703,
0.2109738141298294,
1.2228270769119263,
-0.935019314289093,
1.1099692583084106,
1.2821420431137085,
1.7298601865768433,
-0.06409699469804764,
0.34320297837257385,
-0.3... |
def _ decode _ text ( text ) : encodings = ['windows - 1252 ','latin - 1'] encodings. insert ( 0 if sys. platform = ='darwin'else 1,'mac _ roman') for encoding in encodings : try : return text. decode ( encoding ) except : pass raise valueerror ('unable to decode native sonobat text!') | [
0.11550441384315491,
0.06297902017831802,
0.3218463063240051,
1.068207859992981,
-0.9136276841163635,
0.29784515500068665,
-0.8343347311019897,
-0.21313592791557312,
-0.0431925430893898,
-0.13380637764930725,
-0.15311387181282043,
-1.0363446474075317,
-0.8117803335189819,
0.199970871210098... |
def format _ float ( value, width = 6 ) : text = " { :. { width } g } ". format ( value, width = width ) return re. sub ( r " e ( -? ) 0 * ( \ d + ) ", r " e \ 1 \ 2 ", text. replace ( " e + ", " e " ) ) | [
0.20902174711227417,
-0.21695391833782196,
0.7607443928718567,
-0.4333515763282776,
-0.793228268623352,
-0.45116448402404785,
0.15172266960144043,
0.12795349955558777,
0.27669888734817505,
0.03887857124209404,
0.43856117129325867,
-0.5934385657310486,
0.2355499267578125,
1.1073428392410278... |
def _ _ init _ _ ( self, site _ id, session _ id, input, custom _ data, confidence _ score ) : # type : ( str, str, optional [ str ], optional [ str ], float ) - > none self. site _ id = site _ id self. session _ id = session _ id self. input = input self. custom _ data = custom _ data self. confidence _ score = confid... | [
0.9558875560760498,
-0.6715636849403381,
0.23185576498508453,
0.17899464070796967,
0.23109176754951477,
-0.11128576844930649,
-0.0530516542494297,
-0.37465715408325195,
0.44564205408096313,
-0.35483625531196594,
-0.44288918375968933,
1.359060287475586,
-0.365878164768219,
0.212984189391136... |
def create _ workspace ( self, username, password ) : workname = self. user _ config [ " config " ] [ " project " ] [ " id " ] p = subprocess. popen ( ['gcloud ','container ','images ','list - tags ','gcr. io /'+ workname +'/ custom _ code _ server ','- - format = json'], stdout = subprocess. pipe, stderr = subprocess.... | [
-0.6056373715400696,
0.305475115776062,
0.7813714742660522,
-0.16952264308929443,
0.46541765332221985,
-0.26381227374076843,
0.47133976221084595,
-0.8064835071563721,
-0.3968644142150879,
0.6460471749305725,
-0.11500654369592667,
0.4446781277656555,
-0.8410773873329163,
0.8709377646446228,... |
def readinstance ( self ) : file = open ( self. fname,'r') self. gensize = int ( file. readline ( ) ) self. data = { } for line in file : ( id, x, y ) = line. split ( ) self. data [ int ( id ) ] = ( int ( x ), int ( y ) ) file. close ( ) | [
-1.0024974346160889,
-0.18355289101600647,
0.4237411916255951,
-1.833242416381836,
-0.7436814308166504,
0.37048202753067017,
0.10090534389019012,
0.9480881690979004,
-1.618541955947876,
-0.2723354399204254,
-0.6564701795578003,
-0.6146793961524963,
0.12522566318511963,
-0.00880191754549741... |
def signup ( self, msg ) : initial _ balance = 100 username = msg ['username'] if username in self. accounts : response = {'error':'username exists'} else : pass _ hash = msg ['pass _ hash'] acc _ id = self. last _ id = self. last _ id + 1 self. accounts [ username ] = acc _ id self. passwords [ acc _ id ] = pass _ has... | [
-0.18137772381305695,
-0.3063441812992096,
0.5625216364860535,
-0.37358465790748596,
0.44099292159080505,
-0.06072645261883736,
0.8320093750953674,
0.11304745823144913,
0.14545521140098572,
0.19073133170604706,
-0.23249782621860504,
-0.621813178062439,
-0.10538659244775772,
0.2892963886260... |
def is _ subclass ( typ, pattern ) : res = false try : if typ is not none : res = issubclass ( typ, pattern ) except standarderror : res = false return res | [
-0.38886570930480957,
0.20191407203674316,
0.6598593592643738,
0.7223592400550842,
-0.18271146714687347,
0.8988362550735474,
-0.3751337230205536,
-0.14744004607200623,
0.9414604902267456,
0.022813282907009125,
-0.5100179314613342,
1.0673941373825073,
-0.6578380465507507,
-0.282278805971145... |
def create ( self, start _ value = 0 ) : res = db. gqlquery ( " select * from idx where name = : 1 limit 1 ", self. _ _ name ). fetch ( 1 ) if ( len ( res ) = = 0 ) : c = idx ( name = self. _ _ name, count = start _ value ) self. _ _ key = c. put ( ) self. _ _ status = 1 else : import traceback traceback. print _ stack... | [
-0.22074948251247406,
0.3061820864677429,
0.47488799691200256,
0.13657674193382263,
0.34144750237464905,
0.4736400246620178,
0.5592918395996094,
-0.31890249252319336,
-0.5378438830375671,
-0.06567713618278503,
-0.47117552161216736,
-0.22175560891628265,
-0.7419512271881104,
0.2022200524806... |
def selector _ production ( self, tokens ) : validators = [ ] # the following productions should return predicate functions. if self. peek ( tokens,'type') : type _ = self. match ( tokens,'type') validators. append ( self. type _ production ( type _ ) ) if self. peek ( tokens,'identifier') : key = self. match ( tokens,... | [
-1.4437488317489624,
-0.2972336411476135,
0.8208655118942261,
0.5781118273735046,
-0.5498328804969788,
-0.45743119716644287,
0.5108091831207275,
-0.08546226471662521,
0.20560187101364136,
-0.20085996389389038,
-0.3437924087047577,
0.4459468722343445,
0.45490533113479614,
-0.460058033466339... |
def href ( text, url, * * kwargs ) : return wrap _ html ( text, " a ", href = url, * * kwargs ) | [
0.6273059248924255,
0.21495956182479858,
0.3159232437610626,
-0.1168808713555336,
-0.5368170738220215,
0.42606794834136963,
-0.5014420747756958,
0.6458410620689392,
-0.16718493402004242,
0.19261430203914642,
0.35817548632621765,
0.8757439851760864,
-0.22004660964012146,
0.11729416251182556... |
def _ dot _ general ( lhs : np. ndarray, rhs : np. ndarray, contracting _ dims : axes, batch _ dims : axes, precision = none ) - > np. ndarray : if lhs. ndim! = rhs. ndim : raise valueerror ( f'` lhs ` and ` rhs ` must have the same dimensionality, got'f'` lhs. ndim = = { lhs. ndim } ` and ` rhs. ndim = = { rhs. ndim }... | [
0.1825491040945053,
-0.2758762538433075,
0.9887912273406982,
-0.16818767786026,
-0.33267155289649963,
0.5562741160392761,
-0.2872854769229889,
-0.17392489314079285,
-0.02286308817565441,
0.26875579357147217,
0.6335920691490173,
1.2881231307983398,
0.9353212118148804,
-0.11360811442136765,
... |
def subprocess _ call ( f, * a, * * k ) : cmd = f ( * a, * * k ) sys. stdout. write ( " \ nrunning : \ n > > > " + " ". join ( cmd ) ) sys. stdout. flush ( ) proc = sp. popen ( cmd, stdout = sp. pipe, stdin = sp. pipe, stderr = sp. pipe ) proc. wait ( ) if proc. returncode : sys. stdout. write ( " \ nwarning : this com... | [
0.2904018759727478,
0.551823616027832,
0.9637605547904968,
0.37143799662590027,
-0.28925907611846924,
-0.3670685887336731,
-0.23090285062789917,
-0.06835044175386429,
-0.31585538387298584,
0.11740237474441528,
0.7263118624687195,
0.6752309203147888,
0.29960116744041443,
0.8746145963668823,... |
def is _ resource _ deleted ( self, id ) : message = ('" % s " does not implement is _ resource _ deleted'% self. _ _ class _ _. _ _ name _ _ ) raise notimplementederror ( message ) | [
-0.058649055659770966,
-0.7052825689315796,
0.8182258009910583,
0.09251821041107178,
0.20307771861553192,
0.4279733896255493,
-0.11710898578166962,
-0.29652875661849976,
1.449920654296875,
-0.21692733466625214,
-0.5316189527511597,
0.427467942237854,
0.10623364895582199,
1.0328847169876099... |
def _ _ init _ _ ( self, interval, callback ) : self. interval = interval self. _ on = false self. next _ call = none self. callback = callback | [
1.017143726348877,
-0.08959408849477768,
0.5748564004898071,
0.5924448370933533,
-0.6941636204719543,
0.20887228846549988,
-0.7012560963630676,
0.43215975165367126,
-0.0671534538269043,
0.12677989900112152,
-0.5844011306762695,
0.0032666181214153767,
-0.9362713098526001,
0.7177606225013733... |
def lstm _ model1 ( ) : n _ epochs = 3 n _ batch _ size = 64 lstm _ size = 32 learining _ rate = 0. 001 decay _ rate = 0. 2 activation _ func ='softmax'loss _ func ='categorical _ crossentropy'val _ split = 0. 1 print ('\ n \ n'+'training lstm 1...') train _ x _ pickles = [ name for name in os. listdir ( os. path. absp... | [
-0.37460771203041077,
0.45064863562583923,
0.8116278052330017,
0.2996165454387665,
0.6686950922012329,
0.4597391188144684,
0.43265432119369507,
0.21915273368358612,
-0.49876075983047485,
0.5782709121704102,
-0.6246439814567566,
-0.04698411747813225,
0.6699337959289551,
-0.5356875658035278,... |
def main ( src _ lang, tgt _ lang, system _ name = none, use _ mode = none, n _ best = none, n _ best _ words = none, fmt = none, marian _ args = none ) : user _ settings = {'src': src _ lang,'tgt': tgt _ lang } if system _ name is not none : user _ settings ['system'] = system _ name if use _ mode is not none : user _... | [
-0.036385972052812576,
0.35762616991996765,
0.8824957013130188,
0.4053446650505066,
-0.4504539370536804,
-1.1742331981658936,
-0.7324243187904358,
0.04488852620124817,
-0.3469400107860565,
-0.032218340784311295,
-0.5061657428741455,
0.7595288753509521,
0.7971562147140503,
0.207235634326934... |
def make _ assignments ( tas, slot, assignments ) : assignments _ by _ name = counter ( [ a. ta. name for a in assignments ] ) def ta _ available ( ta ) : return ta. name not in assignments _ by _ name or assignments _ by _ name [ ta. name ] < ta. max available _ tas = filter ( ta _ available, tas ) return [ assignment... | [
-0.8728394508361816,
-0.3199620246887207,
0.44343292713165283,
-0.4340490400791168,
-1.2020918130874634,
0.0931740552186966,
-0.19867314398288727,
0.07375507801771164,
-0.2685666084289551,
1.0782121419906616,
0.43465563654899597,
-0.7063955664634705,
1.2431519031524658,
-0.0945086330175399... |
def kv _ parser ( kv _ str, remove _ leading _ namespace = false ) : try : k, v = kv _ str. split ( " = ", 1 ) return { k : v } except valueerror : raise bilbypipeinternalerror ( f " error in ini - dict reader when reading { kv _ str } " ) | [
-0.05568520724773407,
-0.797988772392273,
0.3326568007469177,
-0.3169572353363037,
-1.289746642112732,
-0.15532322227954865,
-0.5543709397315979,
0.35801199078559875,
-0.24250374734401703,
0.6686813235282898,
-0.23337826132774353,
-0.00511153694242239,
-0.7012327313423157,
-0.4631090462207... |
def render ( self, costmap ) : add _ wall _ to _ static _ map ( costmap, self. from _ pt, self. to _ pt, width = self. width, cost = self. cost ) return costmap | [
-0.45258745551109314,
0.06988988071680069,
0.36498674750328064,
-0.07369567453861237,
0.05617866665124893,
0.6382648944854736,
0.3724204897880554,
-0.33663851022720337,
0.545389711856842,
0.21614661812782288,
0.09942007064819336,
-0.42071864008903503,
-0.9354270100593567,
-0.42543762922286... |
def append ( self, data, as _ first _ element = false ) : # if list is empty... if self. head is none : node = node ( data ) self. head = node self. tail = node elif as _ first _ element : node = node ( data, self. head ) self. head = node else : node = node ( data ) self. tail. next _ node = node self. tail = node | [
-0.3008233904838562,
0.7511668801307678,
0.3528888523578644,
0.06817243993282318,
0.17461897432804108,
0.25697460770606995,
-0.47987717390060425,
0.5067443251609802,
1.0860477685928345,
-0.5057046413421631,
-0.7025911808013916,
0.6474225521087646,
-0.3144471049308777,
1.7780447006225586,
... |
def test _ realistic _ bba _ ad ( get _ matlab _ data, get _ python _ data ) : # are the values predicted by the model always physical ( i. e. between 0 - 1 ) # do the files have the right shape and size? mat = get _ matlab _ data py = get _ python _ data bb _ py = py. loc [ :, 481 ] bb _ mat = mat. loc [ :, 481 ] asse... | [
-0.22718435525894165,
-0.33102500438690186,
0.5446745157241821,
-0.034230787307024,
0.7909787893295288,
1.2500444650650024,
-0.005772497970610857,
0.008826104924082756,
-0.3736700713634491,
-0.1575777679681778,
0.4014783501625061,
0.7076495289802551,
-0.18377962708473206,
0.471085965633392... |
def listencollition ( self ) : for n in self. spike _ list _ y : if ( self. rectcharacter [ 0 ] > = self. spike _ x - 10 and self. rectcharacter [ 0 ] < = self. spike _ x + 60 and ( self. rectcharacter [ 1 ] > = n - 40 and self. rectcharacter [ 1 ] < = n + 60 ) ) : if self. rightlimit : while self. collitionactive = = ... | [
0.23752248287200928,
-0.9634461402893066,
0.8971619606018066,
-0.2985609769821167,
0.8760347366333008,
0.058543793857097626,
0.16855205595493317,
-0.7851789593696594,
0.09817066788673401,
0.42987069487571716,
-0.8156557679176331,
-0.9360253214836121,
-0.5177180767059326,
0.0338860191404819... |
def _ delete _ node ( self, node ) : predecessor = node. _ prev successor = node. _ next predecessor. _ next = successor successor. _ prev = predecessor self. _ size - = 1 element = node. _ element node. _ prev = node. _ next = node. _ element = none return element | [
0.17110447585582733,
0.6854689717292786,
0.6830350160598755,
-0.9432671666145325,
-0.3266339898109436,
-0.2344190925359726,
0.6242136359214783,
0.5560498833656311,
1.2546905279159546,
0.03510771319270134,
-0.19014374911785126,
1.105180025100708,
-0.7781804800033569,
-0.11898446828126907,
... |
async def list _ devices ( self, request : smart _ device _ management _ service. listdevicesrequest = none, *, retry : retries. retry = gapic _ v1. method. default, timeout : float = none, metadata : sequence [ tuple [ str, str ] ] = ( ), ) - > pagers. listdevicesasyncpager : # create or coerce a protobuf request obje... | [
-0.8570004105567932,
1.0665342807769775,
0.8237083554267883,
-0.0019380286103114486,
0.33796197175979614,
-0.8679825663566589,
-0.21164874732494354,
-1.1210248470306396,
0.737688422203064,
0.39198240637779236,
0.9982432126998901,
0.8873365521430969,
-0.012718399986624718,
0.495601713657379... |
def _ choose _ pivot _ row ( tableau, pivot _ col, argmins, m, tie _ breaking _ rule, tol _ piv, tol _ ratio _ diff ) : if tie _ breaking _ rule = = 0 : # bland's tie _ breaking _ rule num _ argmins = min _ ratio _ test ( tableau, pivot _ col, - 1, argmins, m, tol _ piv, tol _ ratio _ diff ) pivot _ row = argmins [ : n... | [
0.1860366016626358,
-0.14667251706123352,
0.313586562871933,
-0.3702733516693115,
-0.11786412447690964,
-0.10383949428796768,
-0.5051978826522827,
0.6639389991760254,
-0.12123548984527588,
0.7052367329597473,
1.5972423553466797,
-0.2619916498661041,
0.04462949559092522,
0.17273347079753876... |
def reg _ sse _ func ( x, y, w, l, b _ mat ) : sse = sse _ func ( x, y, w, b _ mat ) reg _ sse = sse + ( l / 2 ) * np. linalg. norm ( w ) * * 2 return reg _ sse | [
1.0802825689315796,
0.3405051827430725,
0.22572483122348785,
0.19740426540374756,
0.04940484091639519,
-0.5689752697944641,
0.5085063576698303,
0.19710120558738708,
0.06803780049085617,
0.5957885384559631,
-0.4202911853790283,
1.0069301128387451,
-0.0767843946814537,
-0.28183087706565857,
... |
def _ _ init _ _ ( self, data _ df, transforms _ json, image _ dir, mask _ dir, mean = np. array ( [ 0. 90949707, 0. 8188697, 0. 87795304 ] ), std = np. array ( [ 0. 36357649, 0. 49984502, 0. 40477625 ] ), n = 16, zoom _ level = 2, crop _ size = 128, label _ smoothing = 0. 15, output _ type ='classification ', use _ sa... | [
-0.04920900613069534,
0.12319852411746979,
0.6517919898033142,
0.0022659976966679096,
-0.10980361700057983,
-0.4730783700942993,
0.41999322175979614,
-0.2990362048149109,
0.14049705862998962,
0.31510129570961,
-0.3331008851528168,
1.0692826509475708,
1.5976368188858032,
0.03340359032154083... |
def value _ from _ datadict ( self, data, files, name ) : return ( data. get ( name, none ), data. get ( self. related _ form _ field _ name, none ) ) | [
0.1830364614725113,
-0.3525574505329132,
0.29268690943717957,
-2.0115983486175537,
-0.1714072823524475,
-0.08238646388053894,
-0.9402170777320862,
-0.02442505955696106,
-0.2848752737045288,
-0.25899648666381836,
-0.8353235125541687,
-0.47418302297592163,
0.2262113094329834,
-0.214478731155... |
def subject ( request, lid, template _ name = " eplace / teacher / subject. html " ) : try : teacher = request. user. teacher lesson = teacher. lesson _ set. get ( pk = int ( lid ) ) lessons = lesson. lessonday _ set. all ( ) except subject. doesnotexist : raise http404 except group. doesnotexist : raise http404 today ... | [
-0.8104782104492188,
0.09310690313577652,
0.8803128600120544,
-0.20816922187805176,
-0.13822303712368011,
0.9596151113510132,
0.3126361668109894,
-1.5013669729232788,
-0.6835179328918457,
-0.2539341449737549,
0.036775119602680206,
-0.06283329427242279,
-0.12302961200475693,
0.8410149812698... |
def get _ sqldump _ table _ and _ filename ( form ) : table ='f'+ form file = table + ". sql " return table, file | [
0.3625384569168091,
-0.5847811698913574,
0.5957531929016113,
0.5053331851959229,
-0.40158554911613464,
0.11931036412715912,
-0.06851138919591904,
0.8172332048416138,
-1.1025166511535645,
-0.46000194549560547,
0.5512716770172119,
0.022721759974956512,
1.5690999031066895,
0.5461206436157227,... |
def gethandle ( self ) : return _ topods. topods _ tface _ gethandle ( self ) | [
-0.22184550762176514,
0.58891761302948,
0.23965759575366974,
0.7281985282897949,
1.170167088508606,
1.2517837285995483,
1.5770553350448608,
-1.441893458366394,
-0.33028775453567505,
-1.1670646667480469,
0.35846617817878723,
-0.7188062071800232,
-1.1204830408096313,
-0.23257961869239807,
... |
def _ run ( self ) : # create the destination directory, if needed. we only need to check # this for in - source builds, since the builddirtarget dependency will # take care of this for out - of - source builds. if self. config. getdoinsourcebuilds ( ) : if not ( os. path. isdir ( self. outputdir ) ) : self. _ makedirs... | [
-0.8928365111351013,
-0.18220442533493042,
0.6473779678344727,
0.20714610815048218,
0.5528293251991272,
0.008769323118031025,
0.7311222553253174,
-0.1747354120016098,
-0.12872803211212158,
0.6358320116996765,
0.4085189700126648,
-0.15981099009513855,
0.5657045841217041,
0.3481675386428833,... |
def lemmatize ( document ) : return ( lemmatizer. lemmatize ( word, pos = verb ) for word in analyzer ( document ) if word not in english _ stop _ words ) | [
-0.20643076300621033,
-0.5002045035362244,
0.29149767756462097,
-0.10754013061523438,
-0.1326591670513153,
-0.06961993873119354,
-1.361595869064331,
0.34413304924964905,
-0.3260040581226349,
0.8513007164001465,
-0.20168966054916382,
-1.1419775485992432,
-0.8357921838760376,
0.9017387032508... |
def reversed ( self, * args ) : return _ topods. topods _ shape _ reversed ( self, * args ) | [
-0.5764819383621216,
0.22935649752616882,
0.491851806640625,
-0.1643534004688263,
0.9578918218612671,
0.7547987699508667,
0.5128583312034607,
-0.43888381123542786,
-0.9438253045082092,
-0.7508633732795715,
-0.32849082350730896,
0.3542785346508026,
-0.35238566994667053,
-0.4309815466403961,... |
def request ( uuid, endpoint ) : identifier _ type = _ idtype ( uuid ) if identifier _ type = ='barcode': uuid = methods. api _ mappers. barcodetouuid ( uuid ) [ 1 ] if endpoint = ='files': response = file _ api ( uuid ) elif endpoint = ='cases': response = case _ api ( uuid ) else : message = " endpoint muse be either... | [
-1.169593334197998,
-0.8897079229354858,
0.5324071645736694,
0.5661613345146179,
0.5839646458625793,
-0.5073330998420715,
-0.3782871961593628,
-0.012015869840979576,
-0.07121230661869049,
-0.36505380272865295,
0.41732892394065857,
0.2302975207567215,
-0.9317634105682373,
-0.291159123182296... |
def dilate ( self, kernel _ size = 5, iterations = 1 ) : return ( cv2. dilate ( self. im, np. ones ( ( kernel _ size, kernel _ size ), np. uint8 ), iterations ) ) | [
0.18729117512702942,
0.847096860408783,
0.4643203616142273,
1.0137379169464111,
-0.07878568023443222,
-1.1310679912567139,
-0.4805615544319153,
-0.7975431680679321,
1.492140531539917,
0.031056957319378853,
0.7627119421958923,
-0.10277542471885681,
-0.701995313167572,
1.0109184980392456,
... |
def keys ( self ) : return self. redis _ instance. zrange ( self. set _ key, 0, - 1 ) | [
-1.7437748908996582,
0.35366562008857727,
0.32495275139808655,
0.4169563949108124,
0.5367543697357178,
-0.6839225888252258,
-0.1481759399175644,
-0.5129732489585876,
-0.024762190878391266,
0.8933058381080627,
-0.24648644030094147,
0.6063166260719299,
-0.6561962366104126,
-0.098472222685813... |
def _ _ init _ _ ( self ) : self. root = node ( ) | [
0.43486487865448,
-0.49290454387664795,
0.2529431879520416,
0.13992862403392792,
0.1048937737941742,
0.0591190904378891,
0.13054600358009338,
0.8700586557388306,
-0.11201318353414536,
-0.51918625831604,
-0.5033077001571655,
1.252494215965271,
0.052998729050159454,
1.2904878854751587,
0.3... |
def test _ event _ with _ cancellation _ not _ allowed ( self ) : event = baker. make _ recipe ('booking. future _ pc ', allow _ booking _ cancellation = false ) paid _ booking = baker. make _ recipe ('booking. booking ', event = event, user = self. user, paid = true ) url = reverse ('booking : delete _ booking ', args... | [
0.918192982673645,
0.6974906921386719,
0.7517936825752258,
1.1522271633148193,
-1.2336797714233398,
1.4083256721496582,
0.22615431249141693,
0.7788059711456299,
-0.055629558861255646,
-0.23415334522724152,
0.5446329116821289,
-0.2909907102584839,
0.12530142068862915,
0.8543083071708679,
... |
def get _ output ( self, name : str, as _ json : t. literal [ false ] =... ) - > service _ pb2. modelinferresponse. inferoutputtensor : | [
-0.9291226863861084,
-0.3542695641517639,
0.5659927129745483,
0.21884651482105255,
-0.4079790413379669,
-0.6752289533615112,
0.2729623317718506,
-1.3823238611221313,
-0.4329589009284973,
0.15991127490997314,
-0.8214419484138489,
0.29304370284080505,
-0.1769203543663025,
-0.7153445482254028... |
def _ _ init _ _ ( self, id _ query ) : self. id = int ( id _ query ) self. texte = " " self. iddoc _ pert = [ ] | [
0.1440781205892563,
-0.6744856834411621,
0.156057670712471,
-0.618884801864624,
-0.9214786291122437,
0.42737898230552673,
-0.561362087726593,
-0.08871352672576904,
0.6093447208404541,
-0.24176526069641113,
-0.11120766401290894,
-0.9041920900344849,
-0.7250089049339294,
0.6191172003746033,
... |
def testdescriptiontoolong ( self ) : n = nat. nat ( dmroot = devicemodelroot ( ) ) p = n. portmapping ( ) p. description ='a'* 256 # should succeed self. assertraises ( valueerror, setattr, p,'description ','a'* 257 ) | [
0.40738269686698914,
1.0082770586013794,
0.38625019788742065,
-0.8006988763809204,
0.6592844724655151,
0.5111201405525208,
-0.5026115775108337,
-0.611304521560669,
0.342389851808548,
0.6513320207595825,
0.0000704985432093963,
0.2765093445777893,
0.01869654282927513,
0.7026904821395874,
0... |
def tdoc ( self, composite, ctype ) : if composite = = rpc. simple and ctype = ='v': return " void " elif composite = = rpc. simple and ctype = = " b " : return " bool " elif composite = = rpc. simple : return " int " elif composite = = rpc. reference and ctype = = " i " : return " * int " elif composite = = rpc. refer... | [
-0.3194063901901245,
-0.7042067646980286,
0.7040256857872009,
-1.0967680215835571,
0.1622760146856308,
-0.04449117183685303,
0.22847811877727509,
-0.8391968011856079,
-0.041147809475660324,
0.6633791327476501,
0.16176192462444305,
-0.5398722290992737,
-0.7817648649215698,
-0.16037110984325... |
def compute _ similarity _ matrix ( arr1, arr2 ) : # creating the similarity matrix from arr1 and arr2 sim _ mtx = np. zeros ( ( arr1. shape [ 0 ], arr2. shape [ 0 ] ) ) for ii in range ( arr1. shape [ 0 ] ) : for jj in range ( arr2. shape [ 0 ] ) : sim _ mtx [ ii, jj ] = eucdist ( arr1 [ ii, : ], arr2 [ jj, : ] ) # si... | [
0.09307540208101273,
-0.2148990035057068,
0.46732962131500244,
0.04024941846728325,
-0.049031391739845276,
-0.09866301715373993,
-0.28787073493003845,
0.33962488174438477,
0.5410370230674744,
0.9239362478256226,
-0.31060367822647095,
0.5340116620063782,
0.07036111503839493,
-0.098905541002... |
def grouper ( iterable, n, max _ groups = 0, fillvalue = none ) : if max _ groups > 0 : iterable = islice ( iterable, max _ groups * n ) args = [ iter ( iterable ) ] * n return zip _ longest ( * args, fillvalue = fillvalue ) | [
-0.3354857861995697,
0.5898934602737427,
0.45529961585998535,
0.08121848106384277,
-0.2796899080276489,
-0.2061973214149475,
-0.28314217925071716,
-0.21997353434562683,
-0.36619696021080017,
-0.22646336257457733,
0.5333856344223022,
-0.5407693386077881,
-0.3507230281829834,
0.7062900662422... |
def test _ create _ user _ with _ email _ successful ( self ) : test _ email ='test @ emailsender. com'test _ password ='testpassword1234'user = get _ user _ model ( ). objects. create _ user ( email = test _ email, password = test _ password, ) self. assertequal ( user. email, test _ email ) self. asserttrue ( user. c... | [
0.3618893623352051,
0.27807995676994324,
0.36598798632621765,
0.5939179062843323,
0.6456736922264099,
0.9365437626838684,
-0.17760784924030304,
0.3042753040790558,
-0.40885695815086365,
0.5645790696144104,
-1.301918864250183,
-0.8199609518051147,
0.028286267071962357,
-0.15000715851783752,... |
def save _ clusters ( self, filename ) : f = open ( filename, " w + " ) f. write ( " { : d } \ n ". format ( self. k ) ) f. write ( " { :. 4f } \ n \ n ". format ( self. total _ sse ) ) for cluster, centroid, sse in self. final _ data : f. write ( np. array2string ( centroid, precision = 4, separator = ", " ) ) f. writ... | [
-0.3421570658683777,
-0.3861352503299713,
0.605961263179779,
-0.39043185114860535,
0.4630199670791626,
0.9423394799232483,
0.19739380478858948,
0.44473132491111755,
-0.7262104749679565,
0.41608133912086487,
-0.3684920370578766,
-0.05606581270694733,
-0.15095244348049164,
0.3067706525325775... |
def delete _ endpoint ( self, endpoint ) : raise notimplementederror ( " this function is not implemented yet. " ) | [
-0.6975650787353516,
-0.5565226078033447,
0.5637658834457397,
1.4467861652374268,
0.06970537453889847,
0.3309749960899353,
0.22050276398658752,
0.625163733959198,
0.48272809386253357,
0.16968780755996704,
-0.256003201007843,
0.3886793851852417,
-0.3297816812992096,
-0.020703598856925964,
... |
def run _ ams _ update ( args ) : # get configuration paths conf _ paths = get _ config _ paths ( args. config ) # get logger config file get _ log _ conf ( conf _ paths ['log'] ) # get main configuration and schema config = argoconfig ( conf _ paths [ " main " ], conf _ paths [ " schema " ] ) ams _ token = config. get... | [
-0.055958136916160583,
-1.2104039192199707,
0.8740854263305664,
-0.08524023741483688,
-0.4120146632194519,
0.4725874364376068,
0.020851004868745804,
0.9820591807365417,
-0.2288661152124405,
1.1431553363800049,
0.020558124408125877,
0.660512387752533,
0.2624741792678833,
0.2238427847623825,... |
def is _ dollar ( expr ) : return ( isinstance ( expr, expressions. getcontextvalue ) and expr. path. value in ('$ ','$ 1') ) | [
-0.48994654417037964,
0.009582444094121456,
0.5859959125518799,
1.2048819065093994,
-0.6709074974060059,
0.28562435507774353,
0.2391834259033203,
0.4360947012901306,
1.1253267526626587,
0.35665252804756165,
0.6983732581138611,
1.200605869293213,
-0.6171180009841919,
0.8472995162010193,
-... |
async def _ load _ ra3 _ button ( self, button _ json, keypad _ device ) : button _ id = id _ from _ href ( button _ json [ " href " ] ) button _ number = button _ json [ " buttonnumber " ] button _ engraving = button _ json. get ( " engraving ", none ) parent _ id = id _ from _ href ( button _ json [ " parent " ] [ " ... | [
-0.09086085855960846,
-0.18744073808193207,
0.6322256326675415,
-0.8570400476455688,
0.2540696859359741,
0.7439075708389282,
-1.168511986732483,
0.2283218950033188,
0.7856287360191345,
0.3946808874607086,
-1.0580098628997803,
0.031699761748313904,
-0.3655056953430176,
-0.11978084594011307,... |
def not _ in _ set _ of _ values ( values ) - >'possiblevalueset': result = possiblevalueset ( ) result. _ type = registervaluetype. notinsetofvalues result. _ values = set ( values ) result. _ count = len ( values ) return result | [
-0.5863335728645325,
0.5196487307548523,
0.256822407245636,
-0.35334619879722595,
-0.23848706483840942,
-0.1744983196258545,
0.3958072066307068,
-0.7419798970222473,
-0.07943141460418701,
-0.8679636120796204,
0.32868337631225586,
-0.27303561568260193,
-0.9561910033226013,
0.425178557634353... |
def test _ strip _ prompt _ login ( self ) : # original paths path0 ='http : / / idp. com /? prompt = login'path1 ='http : / / idp. com /? prompt = consent login none'path2 = ('http : / / idp. com /? response _ type = code & client'+'_ id = 112233 & prompt = consent login') path3 = ('http : / / idp. com /? response _ t... | [
-0.6114656329154968,
-0.6175918579101562,
0.9355441331863403,
0.012547800317406654,
0.019623901695013046,
0.745489776134491,
0.3675849437713623,
0.11851141601800919,
1.0833320617675781,
-0.799094557762146,
-0.5522940158843994,
-0.281343936920166,
-0.6907323002815247,
-0.9599789977073669,
... |
def new _ working _ directory ( script _ filename = none, sub _ directories = [ ] ) : i = 0 while os. path. exists ( " run _ { 0 : = 03 } ". format ( i ) ) : i + = 1 new _ directory = " run _ { 0 : = 03 } ". format ( i ) os. mkdir ( new _ directory ) print ( " created new directory for output : ", new _ directory ) for... | [
-0.16397185623645782,
-0.041627734899520874,
0.8482944965362549,
0.8639877438545227,
-0.07298871874809265,
0.37782180309295654,
1.222381591796875,
-0.3013838529586792,
-0.2735201418399811,
-0.19537721574306488,
-0.32859671115875244,
0.7168084383010864,
-0.0816555768251419,
0.11911260336637... |
def _ get _ account _ and _ transaction ( transaction _ dict, private _ key ) : account, sanitized _ transaction = sanitize _ transaction ( transaction _ dict, private _ key ) # remove from, convert chain id ( if present ) to integer sanitized _ transaction [ " directive " ] = sanitized _ transaction [ " directive " ].... | [
0.0007979081128723919,
-0.9644613862037659,
0.41796985268592834,
-0.46609196066856384,
-0.3274071514606476,
-0.881052553653717,
-0.22572626173496246,
-0.08822993189096451,
0.25353118777275085,
1.123207926750183,
0.11489679664373398,
0.4042077958583832,
0.6723308563232422,
-0.55408030748367... |
def main ( ) - > none : global budget if len ( sys. argv )! = 3 : raise exception ( " error : expected 2 command line arguments " ) budget = float ( sys. argv [ 2 ] ) people = load _ people ( sys. argv [ 1 ] ) solution = solve ( people ) if len ( solution ) = = 0 : print ( " inf " ) else : print ( " found a group with ... | [
-0.04566540941596031,
0.24876205623149872,
0.9040983319282532,
0.905182421207428,
-0.020564910024404526,
0.06956035643815994,
0.8315828442573547,
-0.3066950738430023,
-1.061215877532959,
0.2691260576248169,
-0.2069600522518158,
0.05797170102596283,
-0.4062501788139343,
-0.02649923413991928... |
def exercise _ message ( exercise, user _ exercise _ graph, sees _ graph = false, review _ mode = false ) : # todo ( david ) : should we show a message if the user gets a problem wrong # after proficiency, to explain that this exercise needs to be reviewed? exercise _ states = user _ exercise _ graph. states ( exercise... | [
-0.009641190059483051,
0.4848323166370392,
0.5472896695137024,
0.196300208568573,
-0.7410927414894104,
0.31037071347236633,
0.36201775074005127,
-0.43137243390083313,
0.36350736021995544,
0.5606358647346497,
1.1365803480148315,
0.28616809844970703,
-0.09894280135631561,
-0.1894140839576721... |
def order ( self ) : return self. _ cache. order ( ) | [
-0.7335636019706726,
-0.20169277489185333,
0.31359755992889404,
0.798809826374054,
0.2906699478626251,
-0.09638022631406784,
-0.6296430230140686,
-0.4901699125766754,
-0.2695780098438263,
-0.182061567902565,
-0.5642969608306885,
0.2090495377779007,
0.15268175303936005,
-0.22364845871925354... |
def _ _ repr _ _ ( self ) : return " < tweetid : % s, text : % s, city : % s > " % ( self. tweet _ id, self. text, self. city ) | [
0.6036626100540161,
-1.5542279481887817,
0.4072090685367584,
-1.7806814908981323,
-0.33793458342552185,
0.8536875247955322,
-0.8810274004936218,
0.6757075190544128,
-0.27400901913642883,
0.19791947305202484,
-0.23737753927707672,
0.41335490345954895,
0.1956111341714859,
0.03649479895830154... |
def _ construct _ cipher ( self ) : while true : key = raw _ input ('enter secret key :') try : cipher = cipher ( key ) print'key accepted'return cipher except : print'invalid key ' | [
-0.7299652099609375,
-0.2987828254699707,
0.3577682673931122,
0.25012528896331787,
-1.6153587102890015,
0.5452484488487244,
0.1821107417345047,
-0.4720287024974823,
0.011120136827230453,
-0.31140702962875366,
-0.22893427312374115,
0.5799742937088013,
-0.3880782425403595,
0.1501114517450332... |
def test _ basic _ add _ obj ( self ) : pc = collection ( ) pc. url _ local ='http : / / www. oac. cdlib. org /'pc. extent = 1234567890 pc. name ='a test collection'self. assertequal ( pc. url, pc. url _ local ) self. assertequal ( pc. human _ extent,'1. 1 \ xa0g') self. assertequal ( pc. name, str ( pc ) ) self. asser... | [
-0.2315964698791504,
-0.6347073316574097,
0.7975470423698425,
-0.9034867882728577,
0.6843609809875488,
1.2546501159667969,
0.4134393334388733,
-0.7018937468528748,
0.18244586884975433,
-0.470334529876709,
0.011448042467236519,
-0.24980074167251587,
-0.5213325023651123,
0.10044688731431961,... |
def total _ weight _ lifted _ in ( ) : pass | [
0.3354651629924774,
-0.8713528513908386,
0.5238536596298218,
0.12193015962839127,
-0.5024188160896301,
-0.36369049549102783,
1.3932929039001465,
0.4894428253173828,
-0.6500866413116455,
0.4181859493255615,
-0.970607578754425,
-0.5796442627906799,
-0.856656551361084,
-0.40153589844703674,
... |
def test _ update _ with _ block _ if _ multiple _ blocks _ available ( self, mock _ tz, mock _ tz1 ) : mock _ now = datetime ( 2015, 1, 10, tzinfo = dt _ timezone. utc ) mock _ tz. now. return _ value = mock _ now mock _ tz1. now. return _ value = mock _ now event _ type = baker. make _ recipe ('booking. event _ type ... | [
0.05646673962473869,
0.10258760303258896,
0.9542306065559387,
1.100745439529419,
0.0547066405415535,
0.3932015299797058,
0.21543653309345245,
0.08417974412441254,
-0.7091665267944336,
0.4756585955619812,
-0.6773630380630493,
-0.1543297916650772,
-0.24343030154705048,
0.7448294758796692,
... |
def load _ dataset _ from _ file ( path _ to _ x, path _ to _ y, path _ to _ summary = none ) : logger. debug ( " loading x from { } ". format ( path _ to _ x ) ) logger. debug ( " loading y from { } ". format ( path _ to _ y ) ) dataset _ info = none with open ( path _ to _ x,'rb') as input _ x : x = pickle. load ( in... | [
-0.24957312643527985,
-0.14713646471500397,
0.7362489104270935,
-1.2505182027816772,
-0.1910712569952011,
-0.1677302122116089,
-0.7540172338485718,
-0.2742558419704437,
-1.0612736940383911,
0.4134170413017273,
0.13854700326919556,
0.7735518217086792,
0.9826700687408447,
-1.0516122579574585... |
def game _ 5 ( ) : print ( " * " * 80 ) choice _ firstinoffice = input ( " " " now you are inside the office. \ n on the desk you see a name tab says'dr. andy zheng ', and you also see a safebox. besides, you see another two doors, one to lobby again and the other says'exit '. \ n * you can choose what to do next : \ n... | [
0.34330251812934875,
0.1984606385231018,
0.8173402547836304,
0.9362077116966248,
-0.12219113111495972,
0.7453059554100037,
0.9043692350387573,
-0.6831905245780945,
-0.21754209697246552,
0.6638514399528503,
-0.6018003225326538,
0.5727643370628357,
-0.6710390448570251,
0.11151497066020966,
... |
def decide _ outcome ( ai _ move, human _ move ) : # if the two moves are the same, it is a tie if ai _ move = = human _ move : return'tie'if ai _ move = ='rock': if human _ move = ='scissors': return'ai'return'human'if ai _ move = ='scissors': if human _ move = ='paper': return'ai'return'human'if ai _ move = ='paper':... | [
-0.24283181130886078,
-0.8028587102890015,
0.8412580490112305,
-0.611803412437439,
0.1776903122663498,
0.13080380856990814,
0.006178724113851786,
-0.3656851351261139,
-0.38593581318855286,
0.5039079189300537,
0.46509143710136414,
1.1581051349639893,
-0.04647645354270935,
-0.314555853605270... |
def get _ agents ( i, j, agents ) : cell _ agents = [ ] for agent in agents : if agent [ 1 ] = = i and agent [ 2 ] = = j : cell _ agents. append ( agent ) return cell _ agents | [
0.15157906711101532,
-1.372436761856079,
0.3099934160709381,
1.2805126905441284,
0.3995623290538788,
-0.8075670003890991,
-0.9368822574615479,
-0.26142629981040955,
-0.436956524848938,
1.33335280418396,
0.22310926020145416,
0.20732392370700836,
-0.01591407135128975,
-0.6722030639648438,
... |
def reload _ env ( check, env ) : envs = get _ configured _ envs ( check ) if not envs : echo _ failure ( f'no active environments found for ` { check } `.') echo _ info ( f'see what is available to start via ` ddev env ls { check } `.') abort ( ) if not env : if len ( envs ) > 1 : echo _ failure ( f'multiple active en... | [
-0.9105309844017029,
0.06999371945858002,
0.7122071385383606,
0.38085654377937317,
0.6866458058357239,
-0.27846625447273254,
0.7034100294113159,
-0.42416128516197205,
0.15905727446079254,
0.48725858330726624,
0.28530067205429077,
0.6662610173225403,
-0.31858012080192566,
-0.363142788410186... |
def issame ( self, * args ) : return _ topods. topods _ shape _ issame ( self, * args ) | [
-0.6827167272567749,
-0.39992478489875793,
0.6076774597167969,
0.6273031830787659,
0.596799910068512,
0.5323749780654907,
0.7718201875686646,
-1.124659776687622,
0.556459367275238,
0.7064005732536316,
-0.5555680394172668,
0.3296104669570923,
-0.6968298554420471,
-0.2545512020587921,
-1.2... |
def _ modify _ instruction _ label _ env ( self, instruction, instr _ key, instr _ value ) : if instruction = ='label': instructions = self. labels elif instruction = ='env': instructions = self. envs else : raise valueerror ( " unknown instruction'% s'" % instruction ) if instr _ key not in instructions : raise keyerr... | [
-0.7858156561851501,
-0.6514925956726074,
0.6499006152153015,
-0.41803714632987976,
-0.40313637256622314,
-0.059311725199222565,
0.14895467460155487,
0.46614745259284973,
-0.5380235910415649,
0.963164746761322,
1.4837390184402466,
0.4650861918926239,
0.06358793377876282,
0.5681342482566833... |
def test _ tree ( subtests, etcd _ client, prefix ) : with subtests. test ( " the tree of a non - existent key should be none " ) : assert etcd _ client. tree ( prefix ) is none with subtests. test ( " the tree of an file should bey { key : value } " ) : etcd _ client. set ( " { } / 1 ". format ( prefix ), " one " ) as... | [
0.032095056027173996,
0.21186813712120056,
0.5124541521072388,
-1.4295216798782349,
0.0935516357421875,
-0.1467764675617218,
-0.6319900751113892,
0.8535535335540771,
-0.13795922696590424,
-0.315320760011673,
0.07575491070747375,
0.8402600884437561,
-0.4121227562427521,
-0.04016366600990295... |
def _ get _ expected _ counts ( self, fit _ function, migration _ matrix, effective _ area, * * kwargs ) : # get bin width ( not in log space ) for performing a simple integral later el = self. true _ energy _ bins [ 0 ] - np. diff ( self. true _ energy _ bins ) [ 0 ] eu = self. true _ energy _ bins [ - 1 ] + np. diff ... | [
-0.048492178320884705,
0.38338547945022583,
0.7610695362091064,
-1.022951364517212,
-0.25204622745513916,
-0.26288196444511414,
1.1154361963272095,
0.7661083340644836,
-0.1539369374513626,
0.35725873708724976,
-0.01677178591489792,
0.5767377018928528,
0.2919127643108368,
-0.157483562827110... |
def accept ( self ) : self. footer. accept. click ( ) | [
0.7225317358970642,
0.6158086061477661,
0.5123932957649231,
-0.161402627825737,
-0.4599332809448242,
0.9051464796066284,
0.9777194857597351,
0.4308848977088928,
-0.6314747333526611,
-0.23536130785942078,
0.13260221481323242,
0.4690568447113037,
-0.7105265259742737,
1.4387413263320923,
0.... |
def unset _ shared _ memory ( self ) - > none : | [
0.9432344436645508,
0.1215674877166748,
0.27251121401786804,
0.2045908123254776,
0.19881939888000488,
0.23426111042499542,
1.9563342332839966,
1.019129753112793,
-0.025412483140826225,
-0.47165393829345703,
-0.5406771898269653,
0.982986569404602,
-0.61404949426651,
0.47680774331092834,
-... |
def run _ turn ( self ) : self. turn _ number + = 1 if self. logger is not none : self. logger. log ( " running turn number { } ". format ( self. turn _ number ) ) # run the start of turn in each city. for city in self. cities. values ( ) : city. start _ of _ turn ( ) # run the actual turn in each city. for city in sel... | [
-0.5133734345436096,
-0.6329047679901123,
0.5084106922149658,
-1.1761726140975952,
0.7481073141098022,
0.25053080916404724,
0.6947288513183594,
0.1781960427761078,
-0.38402241468429565,
-0.9080339670181274,
-0.35432302951812744,
0.41170254349708557,
0.3320733606815338,
0.37858355045318604,... |
def choosing1 ( choice3 ) : if 0 < choice3 < = 10 : print ( " a door opens " ) elif choice3 > 10 : print ( " you fall to your death " ) dead ( ) | [
-0.34634140133857727,
-0.3065524697303772,
0.5911559462547302,
0.42900002002716064,
0.735931396484375,
1.468765377998352,
0.021711695939302444,
-0.12510183453559875,
0.3383426368236542,
0.48251640796661377,
0.13650302588939667,
0.5616726279258728,
-0.5154480934143066,
0.15569506585597992,
... |
def drop _ samples _ in _ position _ data _ preceding _ negative _ time _ jumps ( data ) : negative _ jumps = np. where ( np. diff ( data [ :, 0 ] ) < 0 ) [ 0 ] if len ( negative _ jumps ) = = 0 : return data else : data = np. delete ( data, np. where ( np. diff ( data [ :, 0 ] ) < 0 ) [ 0 ], axis = 0 ) return recordin... | [
-0.27182450890541077,
-0.06193232536315918,
1.1337989568710327,
0.5094031095504761,
-0.46063846349716187,
1.0851106643676758,
0.5462362766265869,
-1.0820424556732178,
0.2221492975950241,
0.7158116698265076,
1.1859437227249146,
-0.3534297049045563,
-0.4456660747528076,
0.1428520232439041,
... |
def addvim ( self, vimname, vimpassword, vimtype, vimurl, vimuser, secgroup ) : osm _ url = f " https : / / { self. ip } : 9999 / osm / admin / v1 / vim _ accounts " data ='{ { name : " { 0 } ", vim _ password : " { 1 } ", vim _ tenant _ name : " { 2 } ", \ vim _ type : " { 3 } ", vim _ url : " { 4 } ", vim _ user : " ... | [
0.3603968024253845,
-0.9181032180786133,
0.7961747646331787,
0.8869937062263489,
0.15948207676410675,
-0.17117664217948914,
-0.7500573992729187,
-0.4583752751350403,
0.07726667821407318,
0.0764031782746315,
-0.7619660496711731,
0.9674594402313232,
-1.2959808111190796,
-0.6111447215080261,
... |
def more ( self, * args ) : return _ topods. topods _ iterator _ more ( self, * args ) | [
-1.1966487169265747,
0.07147245109081268,
0.4516659677028656,
-0.10350809246301651,
-0.08759763836860657,
-0.026461781933903694,
-0.157297283411026,
-1.5269170999526978,
-0.5480668544769287,
-0.232112318277359,
0.1326095461845398,
-0.4377385973930359,
-0.052771132439374924,
0.0837934836745... |
def pbstimestr _ to _ timedelta ( pbstime ) : t = [ int ( i ) for i in pbstime. split (':') ] return datetime. timedelta ( hours = t [ 0 ], minutes = t [ 1 ], seconds = t [ 2 ] ) | [
0.2823435962200165,
-0.5620021224021912,
0.3597296178340912,
0.17529217898845673,
-0.21177390217781067,
1.3817182779312134,
-0.3437620997428894,
-0.23374569416046143,
-0.5992327332496643,
0.3447132110595703,
-0.5944399237632751,
0.3756675720214844,
-1.2750930786132812,
-0.8234004974365234,... |
def _ get _ interactions ( rdf _ graph : rdflib. graph ) - > dict [ str, dict ] : return query _ result _ to _ dict ( rdf _ graph. query ( get _ all _ directed _ interactions _ sparql, initns = prefixes ), directed _ interaction = ('source ','target'), ) | [
-0.12388256937265396,
0.21849863231182098,
0.2488342672586441,
-0.85309237241745,
0.21691620349884033,
-0.3395238220691681,
-0.04622381925582886,
-0.061725128442049026,
-0.16853764653205872,
-0.41267603635787964,
-0.6509737372398376,
-0.11495915800333023,
0.19795408844947815,
-0.1597523242... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.