text
stringlengths
25
2.19k
embedding
listlengths
768
768
def new ( * args, * * kargs ) : obj = itksmoothingrecursivegaussianimagefilteriul3iul3. _ _ new _ orig _ _ ( ) import itktemplate itktemplate. new ( obj, * args, * * kargs ) return obj
[ 0.5432926416397095, 0.8752459287643433, 0.3544785678386688, -0.405490905046463, -1.0421226024627686, 1.1935373544692993, -0.1868644505739212, 0.11776217073202133, 0.2685282826423645, -0.44719672203063965, -0.6033197641372681, 0.6374873518943787, -0.20902888476848602, -0.033770546317100525,...
def custom _ score ( game, player ) :'''hli code'''return float ( custom _ heuristics ( game, player, choice = 3 ) )'''hli code'' '
[ 0.46327733993530273, 0.026599036529660225, 0.42754822969436646, -0.06111421063542366, 0.01721016876399517, -0.41531768441200256, -0.8589576482772827, 0.40508463978767395, -1.0585280656814575, 0.9306793808937073, 0.0041246311739087105, -0.5215069651603699, -0.03200985863804817, -0.200618579...
def flatten ( nestedlst ) : flatlst = [ bottomelem for sublist in nestedlst for bottomelem in ( flatten ( sublist ) if ( isinstance ( sublist, sequence ) and not isinstance ( sublist, str ) ) else [ sublist ] ) ] return flatlst
[ -0.4857165217399597, -0.8608683347702026, 0.48544636368751526, 0.9012484550476074, -0.5445867776870728, 0.6581600904464722, -0.44097352027893066, 0.16257092356681824, 0.28614845871925354, -0.35007545351982117, -1.0063031911849976, 1.1534465551376343, -1.3766525983810425, 1.2949087619781494...
def test _ duplicate _ assignments ( self ) : # validate a form with duplicate entries form = self. form _ data ( operator _ 1 = self. staff _ user. pk, role _ 1 = self. project _ role. pk, start _ date _ 1 = " 2020 - 06 - 22 ", end _ date _ 1 = " 2020 - 06 - 27 ", note _ 1 = " ", operator _ 2 = self. staff _ user. pk,...
[ -0.7154971957206726, 0.24212849140167236, 0.5546154379844666, -0.10575853288173676, -0.12490832805633545, 0.6356815099716187, 0.7312940955162048, -0.15047131478786469, -0.7633683085441589, -0.19725102186203003, -0.18481628596782684, -0.0955064594745636, 0.24305298924446106, 0.3868350088596...
def calculate _ complexity ( self, minterms ) : complexity = len ( minterms ) if complexity = = 1 : complexity = 0 mask = ( 1 < < self. numvars ) - 1 for minterm in minterms : masked = ~ minterm [ 1 ] & mask term _ complexity = bitcount ( masked ) if term _ complexity = = 1 : term _ complexity = 0 complexity + = term _...
[ -0.4017038345336914, -0.16122011840343475, 0.44414812326431274, 0.4808262288570404, 0.02647087350487709, -0.4924773573875427, 0.8477088212966919, -0.3589805066585541, 1.1286728382110596, 0.3348584771156311, -0.6655024290084839, 0.32552430033683777, -0.955337643623352, 0.44306501746177673, ...
def linked _ estimate ( self ) - > optional [ int ] : events = self. _ zenhub. get _ issue _ history _ private ( self. repository. id, self. number ) linked = set ( ) for event in events. json ( ) ['events'] : if event ['type'] = ='connectpr': linked. add ( ( event ['other _ issue'] ['repo _ id'], event ['other _ issue...
[ 0.3160911202430725, -0.3240179717540741, 0.9576799273490906, -0.3891445994377136, 0.18570250272750854, -0.874771773815155, -0.19654886424541473, -0.12210626155138016, 0.5653475522994995, -0.19406937062740326, 0.6178374290466309, 0.0734453946352005, -1.6925208568572998, 0.4458252489566803, ...
def revise _ value _ from ( self, states ) : ancestors = { } for state in states : node = self. states _ to _ nodes [ state ] self. update _ ancestors _ of ( node = node, ancestors = ancestors ) ancestor _ list = list ( ancestors. values ( ) ) self. dynamic _ programming ( ancestor _ list ) return ancestors
[ -0.8586452603340149, 0.09986457228660583, 0.40415650606155396, -0.45851898193359375, -0.8768910765647888, -0.9379444718360901, 0.1555217206478119, 0.14677923917770386, -0.1350044161081314, 1.1717638969421387, 0.08255347609519958, 0.14877381920814514, 1.1171371936798096, 0.6736125349998474,...
def reduce _ assumption ( proof _ from _ affirmation : proof, proof _ from _ negation : proof ) - > proof : assert proof _ from _ affirmation. is _ valid ( ) assert proof _ from _ negation. is _ valid ( ) assert proof _ from _ affirmation. statement. conclusion = = \ proof _ from _ negation. statement. conclusion asser...
[ 0.8451071977615356, -0.3902614414691925, 0.7733979225158691, 0.5507395267486572, -0.11573582142591476, 0.004173832945525646, 0.5166560411453247, 0.46587103605270386, -0.13785700500011444, 1.0175741910934448, 0.12430579960346222, -0.133488729596138, 0.4489020109176636, 0.39536604285240173, ...
def new _ game _ from _ repo ( self, repo ) : print " creating a new game for { } ". format ( repo. name ) g = game. objects. create ( repository = repo. name, user = self. user ) g. save ( )
[ 0.46683230996131897, 0.18268465995788574, 0.31294581294059753, -0.14129765331745148, 0.7986001968383789, 1.0218645334243774, -1.3786730766296387, -0.583544135093689, -0.7772867679595947, 1.1714348793029785, -1.0741826295852661, -0.8262708783149719, -0.30762889981269836, 0.31644612550735474...
def clean ( self, cleanup _ wait = true, cleanup _ timeout = none ) : self. logger. debug ( f " starting clean ( cleanup _ wait = { cleanup _ wait }, cleanup _ timeout = { cleanup _ timeout } )... " ) if self. cleaning : raise inprogress ('cleanup currently underway.') def cleanall ( self, cleanup _ wait, cleanup _ tim...
[ 0.08878006786108017, -0.3660888373851776, 0.5471541881561279, 0.8867561221122742, -0.19011174142360687, -0.34286847710609436, -0.0072091869078576565, 0.5693103671073914, 0.0032058623619377613, -0.30968958139419556, -0.10116712749004364, 0.18487349152565002, 0.2186817079782486, 1.3114888668...
def display _ notes ( data : dictionary, category : str ) : for index, note in enumerate ( data [ category ], start = 1 ) : print ( f " ( { index } ) { note } " )
[ -0.20394186675548553, -0.24582846462726593, 0.3718900680541992, -1.3018345832824707, 0.23561668395996094, 0.110035240650177, -0.012384332716464996, -0.6757635474205017, -0.6637923717498779, 0.8863120675086975, 0.8889902234077454, 1.088318943977356, 0.23997031152248383, -0.3275432288646698,...
def get _ portfolio ( path ) : try : df = pd. read _ excel ( path, index = false ) return df except filenotfounderror as e : logger. debug ('please import portfolio in correct path') raise e
[ 0.343455970287323, 0.2170214205980301, 0.5583897829055786, 0.8333002328872681, 0.3859994411468506, 0.759324848651886, 0.611050009727478, -0.9996083974838257, -0.5933842062950134, 0.24864651262760162, 0.4515019357204437, 0.5937002301216125, -0.5848329067230225, -1.6776777505874634, 0.3483...
def test _ can _ create _ car ( self ) : api _ call ( self, " post ", " / driver / create ", dict ( first _ name = " alan ", last _ name = " turing ", dob = " 23 / 06 / 1962 " ), 200, true ) json _ response = api _ call ( self, " post ", " / car / create ", dict ( make = " tesla ", model = " model 3 ", year = 2018, ass...
[ -0.3996421992778778, -0.06960724294185638, 0.4131280779838562, 0.330652117729187, 0.8471164107322693, 0.8061863780021667, -0.7084861397743225, 0.038047388195991516, -1.0720678567886353, 0.09088362753391266, -0.6776346564292908, -0.14523983001708984, -0.11783940345048904, 0.5861092805862427...
def read _ file ( filename = " ", outputfile = " " ) : with open ( filename, encoding = " utf8 " ) as juanito : finall _ text = " " lines = [ line for line in juanito ] prev _ line = " " i = 0 for line in lines : if ( lines [ i - 1 ] ) : prev _ line = lines [ i - 1 ] temporal _ text = " " if ( len ( line. strip ( ) ) >...
[ -0.12867213785648346, -0.2142021805047989, 1.1802434921264648, 0.22032973170280457, -0.8121439814567566, -0.11720467358827591, 0.04147947579622269, 1.026845932006836, -0.4556053578853607, 0.9910027980804443, 0.5319553017616272, -0.04530259221792221, 0.4399771988391876, -0.17396682500839233...
def copy ( self ) : import numpy as np copy _ sample = np. copy ( self. sample ) copy _ time = np. copy ( self. time ) return latency ( sample = copy _ sample, time = copy _ time, sf = self. sf )
[ 0.685803234577179, -1.6260175704956055, 0.8213820457458496, 0.4442150592803955, -0.8832288384437561, -0.23291584849357605, -0.7735515236854553, -0.6371808648109436, 0.4658564329147339, 0.802725076675415, 0.10690832883119583, 0.6493099331855774, -0.42887642979621887, -0.851046621799469, -...
def pop _ back ( self ) : if self. is _ empty ( ) : raise indexerror ( " linked list is empty. " ) if self. size = = 1 : data = self. head. data self. head = none else : current = self. head while current. next is not none : current = current. next data = current. data current. prev. next = current. next self. size - =...
[ 0.4726385176181793, 0.6179463267326355, 1.0395103693008423, -0.3306635618209839, -0.2419215440750122, -0.34710222482681274, 0.3427311182022095, -0.1223585456609726, 0.5582675933837891, 0.07553631067276001, -0.07001277804374695, 0.6260908246040344, -1.4764862060546875, -0.6746544241905212, ...
def test _ delete _ tag ( self ) : with app. test _ client ( ) as client : resp = client. post ( f'tags / { self. tag _ id } / delete ', follow _ redirects = true ) html = resp. get _ data ( as _ text = true ) self. assertequal ( resp. status _ code, 200 ) self. assertin ('there are currently no tags in use ', html ) s...
[ 0.29839369654655457, 0.7305635213851929, 0.10738908499479294, -0.011869411915540695, 1.8995009660720825, 0.04629802331328392, -0.19138257205486298, 0.35656192898750305, -0.10953035205602646, -0.696599543094635, 0.03514032065868378, 0.3303835690021515, -0.21624837815761566, 1.46917533874511...
def _ _ init _ _ ( self, on _ invalid, * args, * * kwargs ) : self. _ on _ invalid = on _ invalid self. arg _ types = tuple ( ( t if not t or isinstance ( t, tuple ) else tuple ( [ t ] ) ) for t in args ) self. kwarg _ types = { k : ( t if not t or isinstance ( t, tuple ) else tuple ( [ t ] ) ) for k, t in six. iterite...
[ -0.39302027225494385, 0.28808102011680603, 0.6449733972549438, 0.5733200907707214, -0.13056108355522156, 0.060248684138059616, -0.9328253865242004, 0.1574181318283081, -0.7439237236976624, 0.3587922751903534, -0.43010929226875305, -0.17714372277259827, -0.7186798453330994, 0.56071639060974...
def test _ increment _ self _ with _ multiplication _ by _ matrix ( self ) : self. vector * = matrix ( [ [ 1, 2 ], [ 2, 3 ], [ 3, 1 ] ] ) assert ( self. vector = = [ 14. 0, 11. 0 ] ) self. assertraises ( differentdimensionerror, vector ( [ 1, 2, 3 ] ). _ _ imul _ _, matrix ( [ [ 1, 2 ], [ 2, 3 ] ] ) ) self. assertraise...
[ -0.5535222291946411, 0.042754966765642166, 0.8462910056114197, 0.7205808162689209, -0.795750617980957, 0.3071158230304718, 1.0186550617218018, -0.23710116744041443, 0.5782924294471741, -0.37506169080734253, -0.5351881384849548, -0.16546452045440674, -0.040257327258586884, 0.308968245983123...
def kodi _ info ( self ) : return {'plot': self. description,'mediatype':'movie ','title': self. title }
[ -0.3124380111694336, -0.8053758144378662, 0.4837387502193451, -0.3917423486709595, -1.1043328046798706, -0.20319408178329468, -1.344933271408081, -0.8612563014030457, -0.38366273045539856, 0.6282503008842468, -0.6840987801551819, 1.4192479848861694, -0.7315876483917236, 0.824022650718689, ...
def feed _ rich ( self, x ) : a, z = self. feed ( x ) z _ prime = self. _ activation _ function. gradient ( z ) return a, z, z _ prime
[ -0.5022083520889282, -0.0790359377861023, 0.3022843599319458, -0.5035317540168762, 0.14580479264259338, -0.5870290398597717, 0.5194047689437866, -0.7123689651489258, 0.06748558580875397, -0.5683241486549377, -1.5706361532211304, 1.4420421123504639, 0.3059834837913513, -0.38771823048591614,...
def test _ get _ context _ dict ( self ) : context _ dict = self. old _ manifest. get _ context _ dict ( ) test _ dict = {'maven : formula':'sprinter. formulas. unpack ','maven : specific _ version':'2. 10 ','ant : formula':'sprinter. formulas. unpack ','mysql : formula':'sprinter. formulas. package ','sub : rc':'temp ...
[ 0.8844242691993713, -0.18783588707447052, 0.6801267266273499, -0.3859979808330536, -0.46505236625671387, 0.1635759323835373, -0.22055132687091827, 0.19436690211296082, 0.4979135990142822, -0.1174079030752182, -0.15838749706745148, 0.0013229019241407514, 0.24871475994586945, 0.3882990479469...
def get _ certificate ( self, filename ) : import chilkat cert = chilkat. ckcert ( ) f = self. get _ file ( filename ) data = chilkat. ckbytedata ( ) data. append2 ( f, len ( f ) ) success = cert. loadfrombinary ( data ) return success, cert
[ 0.6854386329650879, -0.307055801153183, 0.538260281085968, 0.45326167345046997, -0.48398590087890625, -0.04425109922885895, -0.632055938243866, 0.6801000237464905, -0.9098922610282898, 0.520041286945343, -1.1744409799575806, 0.02734249085187912, -0.6244604587554932, -0.25149697065353394, ...
def _ _ mro _ entries _ _ ( self, bases ) : return ( self. _ _ class _ _, )
[ -0.49318286776542664, -0.6761075258255005, 0.43985000252723694, -0.49229586124420166, 0.11767008900642395, -0.3692951202392578, -0.6723898649215698, -0.4253053665161133, 0.22014029324054718, -0.15973632037639618, -0.334499716758728, -0.12895575165748596, -0.25391507148742676, 0.79344326257...
def compute _ te ( x, y ) : x = tens2num ( x ) y = tens2num ( y ) symx = symbolize ( x, 3 ) symy = symbolize ( y, 3 ) print ( symx ) print ( len ( symx ) ) print ( len ( symy ) ) mi = symbolic _ mutual _ information ( symx, symy ) txy = symbolic _ transfer _ entropy ( symx, symy ) tyx = symbolic _ transfer _ entropy ( ...
[ -0.24783581495285034, 0.13591471314430237, 0.827750563621521, -1.0335627794265747, 0.21213176846504211, -0.1313440352678299, -0.08197563141584396, -0.5375953316688538, -0.26036667823791504, 1.099143385887146, -0.11825986206531525, 0.27155041694641113, -0.07009044289588928, -0.5262365341186...
def _ _ init _ _ ( self, expected _ values = none, * * kwargs ) : super ( expectedvaluesmixin, self ). _ _ init _ _ ( * * kwargs ) self. _ expected _ values = expected _ values
[ -0.18363964557647705, 0.4298170804977417, 0.4978245198726654, 0.7015758156776428, 0.43206459283828735, 0.6607260704040527, -0.4957663118839264, 0.9986956119537354, 0.741165280342102, -1.105315923690796, -0.6944733262062073, -0.4349554777145386, -0.048915524035692215, 1.0693942308425903, ...
def build _ default _ rotor _ settings ( degen _ mgr : dg. degengeommgr, default _ rpm = 0. 0, default _ template = none ) \ - > charmrotorsettingscollection : # provided default template current template is empty if default _ template is none : with open ( os. path. join ( os. path. dirname ( _ _ file _ _ ), " test ",...
[ -0.25894400477409363, -0.19516274333000183, 0.5030825138092041, 0.07274596393108368, 0.44625192880630493, 0.06632175296545029, 0.42308467626571655, -0.5231794118881226, -0.2533983886241913, -0.22783097624778748, -0.27306824922561646, -0.7040679454803467, -0.768774688243866, 0.1961433887481...
def _ _ call _ _ ( self, infunction ) : def wrapped _ f ( * args, * * kwargs ) : # start progress self. start ( ) # call original function infunction ( * args, * * kwargs ) # end progress self. end ( ) # add special methods to the wrapped function wrapped _ f. step = self. step wrapped _ f. progress = self. progress wr...
[ -0.41374337673187256, -0.3063652515411377, 0.7340674996376038, 0.06040768325328827, -0.8838034272193909, 0.6856954097747803, 0.0021453716326504946, 0.5798442363739014, -0.0803108736872673, -0.020289679989218712, 0.5058838129043579, 0.0919819101691246, -0.47598275542259216, -0.8414993286132...
def proof _ or _ counterexample ( formula : formula ) - > union [ proof, model ] : assert formula. operators ( ). issubset ( {'- > ','~'} ) # task 6. 3b if is _ tautology ( formula ) : # if it tautology, return a proof return prove _ tautology ( formula, { } ) else : # if its not tautology, than there must be a model w...
[ 0.25844311714172363, -0.1671629250049591, 0.39423802495002747, 1.0078818798065186, 0.3958267271518707, 0.0817682072520256, 0.5392598509788513, -0.25594186782836914, 0.15870322287082672, -0.21227304637432098, 0.6067516803741455, -0.7337495684623718, -0.11527657508850098, 1.2070039510726929,...
def url _ to _ id ( url : str ) - > str : try : parsed = urlparse. urlparse ( url ) video _ id = urlparse. parse _ qs ( parsed. query ) ['v'] return video _ id [ 0 ] except keyerror as err : print ( err ) except typeerror as err : print ( err ) except attributeerror as err : print ( err ) return none
[ 0.03677375614643097, -0.9591834545135498, 0.6392397880554199, 0.40050333738327026, 0.3886297643184662, 0.1338789314031601, 0.11724989116191864, 0.0959051325917244, 1.244250774383545, 0.18484580516815186, -0.09236687421798706, 1.096759557723999, -0.7152191400527954, 0.21447552740573883, 0...
def user _ stories _ v1 ( self, user _ id : int, amount : int = none ) - > list [ story ] : params = { " supported _ capabilities _ new " : json. dumps ( config. supported _ capabilities ) } user _ id = int ( user _ id ) reel = self. private _ request ( f " feed / user / { user _ id } / story / ", params = params ) [ "...
[ 0.34871453046798706, -0.11678110808134079, 0.38015711307525635, 1.6421054601669312, -0.04342251271009445, -0.31333017349243164, -0.32057860493659973, -0.3599039912223816, 0.18262894451618195, 0.1406952142715454, -0.35824331641197205, 0.44466280937194824, 0.1383724957704544, 0.1913958042860...
def clean ( self, value ) : if value is none : value = self. default try : value = self. to _ python ( value ) self. validate ( value ) except validationerror as error : raise validationerror ( " invalid value for { } : { } ". format ( self. name, error. args [ 0 ] ) ) return value
[ 0.001063977018930018, 0.053089242428541183, 0.48029887676239014, -0.22901317477226257, -0.09541546553373337, 0.09324680268764496, 0.09993494302034378, -0.37057745456695557, 0.03906332701444626, 0.0724545568227768, 0.02160789631307125, -0.21262919902801514, -0.34769168496131897, 0.407003760...
def location ( self ) - > pulumi. output [ str ] : return pulumi. get ( self, " location " )
[ 0.45260345935821533, -0.7542973160743713, 0.4379081130027771, 0.24586907029151917, 0.04911693558096886, 0.7845203280448914, 0.9222183227539062, 0.525368869304657, 0.21348519623279572, -0.023150619119405746, 0.6090440154075623, 0.3721252381801605, 0.5930888652801514, -1.33687162399292, -1...
def merge _ trees ( dest, src ) : # take all the leaf values from the source and insert into the destination for value, path in scan _ leaves ( src ) : set _ path ( dest, path, value )
[ -0.3995230495929718, 0.7401289939880371, 0.5518465638160706, 0.2294176071882248, 0.2921294867992401, -0.12330467998981476, -1.3309115171432495, 0.6045882701873779, -0.5487052202224731, 0.1250828355550766, 0.013496551662683487, -0.1559223234653473, 0.3179662227630615, -0.2834916412830353, ...
def receive ( self, void, p _ int, p _ int _ 1 ) :...
[ -0.224144846200943, -0.14113782346248627, 0.36971428990364075, -0.36124834418296814, 0.3396182656288147, 0.3889501094818115, -0.5302374362945557, 0.0024896604008972645, -0.7847365140914917, 0.04133523255586624, -0.33612075448036194, 0.8354313373565674, -0.21179892122745514, -0.489202141761...
def list _ directory ( self, path, revision = none ) : raise notimplementederror
[ -0.5113704204559326, -0.08942907303571701, 0.5407219529151917, 0.23304826021194458, -0.31627267599105835, -0.3328689634799957, -0.31248733401298523, 0.26286780834198, 1.0964933633804321, -0.7328987121582031, 0.412109375, 0.7906911969184875, 0.35345223546028137, -0.2428184449672699, -1.80...
def print _ state ( self ) : print ( " - - - - - - - " ) print ( " input nueron count : ", self. input _ neuron _ count ) print ( " hidden nueron count : ", self. hidden _ neuron _ count ) print ( " output nueron count : ", self. output _ neuron _ count ) print ( " - - - - - - - " ) print print ( " input i " ) print ( ...
[ 0.5153878331184387, -0.6250191330909729, 0.9624865651130676, -0.08036427944898605, -0.3298647701740265, 1.0197806358337402, 0.7877499461174011, -0.45488524436950684, -0.4339793026447296, -0.4314860999584198, -0.07431982457637787, 0.7077226042747498, 0.014787385240197182, 0.7117170691490173...
def setupclass ( cls ) : app. config ['testing'] = true app. config ['debug'] = false app. config [ " sqlalchemy _ database _ uri " ] = database _ uri app. logger. setlevel ( logging. critical ) init _ db ( )
[ 0.26016154885292053, 0.11902037262916565, 0.528274416923523, 0.9227425456047058, 0.9726970195770264, 0.2290685623884201, 0.055892717093229294, 0.5074345469474792, 0.08453574776649475, 0.22165067493915558, -0.7400845885276794, -0.6696321964263916, -0.1304081678390503, 1.0803889036178589, ...
def config _ file _ name ( self ) : # pylint : disable = line - too - long return default _ experiment _ json _ filename if not self. experiment _ json _ file \ else self. experiment _ json _ file # pylint : enable = line - too - long
[ -0.34207919239997864, -0.1107940748333931, 0.4435056746006012, -0.06734810024499893, 0.5535515546798706, 0.3386780321598053, -0.06940525770187378, 0.238466277718544, -0.7764225006103516, 0.9086742401123047, 0.6072186231613159, -0.2682521939277649, 0.12568524479866028, 0.31586331129074097, ...
def _ _ init _ _ ( self, room _ min _ size = 1, room _ max _ size = 5, max _ rooms = 20, level _ width = 0, level _ height = 0, level _ font = none, tile _ size = 16, sprites = none, entities = [ ] ) : self. room _ min _ size = room _ min _ size self. room _ max _ size = room _ max _ size self. max _ rooms = max _ room...
[ -0.09336904436349869, 0.022377625107765198, 0.6428813934326172, 0.09835776686668396, -0.2585105299949646, 0.22883343696594238, -0.09705142676830292, 0.5638875365257263, -0.2670748829841614, 0.1856340616941452, -0.5932397842407227, 0.29344984889030457, -0.20000067353248596, 1.28880858421325...
def restart ( name ) : cmd = _ service _ cmd ( name, " restart " ) return not _ _ salt _ _ [ " cmd. retcode " ] ( cmd )
[ -0.6654688715934753, 0.5561424493789673, 0.7816351056098938, -0.0026263736654073, -0.7706828117370605, -0.019449623301625252, -0.14341510832309723, -0.5348517298698425, 0.07126288115978241, 0.40721815824508667, -0.5888394713401794, 0.3280085623264313, -1.5675967931747437, -0.54713737964630...
def user _ stories ( self, user _ id : int, amount : int = none ) - > list [ story ] : # todo : add user _ stories _ gql return self. user _ stories _ v1 ( user _ id, amount )
[ 0.4530278742313385, 0.16537389159202576, 0.013326392509043217, 1.7126632928848267, 0.2296506017446518, 0.003007462713867426, 0.003914965316653252, -0.6187660694122314, 0.12027689069509506, -0.4460252523422241, -0.30529582500457764, -0.26680994033813477, 0.8202157020568848, 0.11705817282199...
def _ gid _ to _ type ( gid, gid _ ranges ) : for gidtype, gids in gid _ ranges. items ( ) : if gid in gids : return gidtype
[ 0.3417147397994995, -0.21161037683486938, 0.15908949077129364, -0.8950390815734863, 0.8874950408935547, 0.3081200420856476, -0.40095055103302, -0.6803485751152039, -0.382481187582016, 1.1251212358474731, 0.606156051158905, 1.5378235578536987, -1.1997510194778442, 0.5365369915962219, 0.37...
def changesecurity ( self, name, question, answer ) : with self. con : self. cur. execute ( " update users " " set question ='" + question + " ', " " answer ='" + answer + "'" " where name ='" + name + "'; " )
[ -0.0621647834777832, -0.8199955224990845, 0.5036062598228455, 0.6050466895103455, -1.0105787515640259, 0.4261462688446045, -0.5837351679801941, -0.8752189874649048, 0.07787114381790161, 0.953641414642334, -0.8748680353164673, 0.3376471996307373, -1.112332820892334, -1.076203465461731, -0...
def rotate _ petals ( fp ) : # now rotate the x / y offsets based on the petal location. petals = list ( sorted ( fp. keys ( ) ) ) for petal in petals : devlist = list ( sorted ( fp [ petal ]. keys ( ) ) ) for dev in devlist : # the petal location of this petal id petal _ loc = fp [ petal ] [ dev ] [ " petal " ] # peta...
[ -0.3038055896759033, -0.38195347785949707, 0.5380042791366577, -1.5860812664031982, -0.20159240067005157, 1.0550116300582886, 0.04158613830804825, 0.46778610348701477, -0.3444444537162781, 0.11502493172883987, -0.6441603899002075, -0.5657758116722107, 0.21000048518180847, -0.79535216093063...
def _ resolve _ composite _ schemas ( self, descriptor ) : for field in descriptor. fields : if field. type = = fielddescriptor. type _ message : type _ name = self. _ fields _ to _ resolve [ field. name ] type = self. _ factory. pool. findmessagetypebyname ( type _ name ) field. message _ type = type
[ -0.6006035208702087, 0.2317786067724228, 0.6848259568214417, -1.0323623418807983, 1.7608997821807861, -0.5014554262161255, 0.41063764691352844, -0.3415084183216095, -0.6851034164428711, 0.015318711288273335, -0.44213029742240906, 0.10250163823366165, -0.507989764213562, 0.09854519367218018...
def _ get _ shift ( img, seg, x, y ) : # slide in x direction if x! = 0 : img = np. append ( img [ x :, : ], img [ : x, : ], axis = 0 ) seg = np. append ( seg [ x :, : ], seg [ : x, : ], axis = 0 ) # slide in y direction if y! = 0 : img = np. append ( img [ :, - y : ], img [ :, : - y ], axis = 1 ) seg = np. append ( se...
[ -0.8919184803962708, -0.4168080985546112, 0.9534924626350403, -0.24260219931602478, 0.5046849846839905, -0.3541193902492523, -0.652246356010437, -0.06587535887956619, 0.5840371251106262, 0.11153970658779144, 0.13580627739429474, -0.07487788051366806, 0.47326478362083435, 0.114456906914711,...
def test _ subscription _ api _ with _ wrong _ expiry _ date ( self ) : data = { " event _ id " : self. event. id, " user _ id " : self. user _ id, " no _ of _ tickets " : 10, " card _ number " : 5039303342356004, " expiry _ year " : 2019, " expiry _ month " : 1, " amount " : 1000, " discount _ amount " : 0 } response ...
[ 0.8835574388504028, -0.29940512776374817, 1.0253158807754517, 0.4212897717952728, 0.5938038229942322, 0.6862558126449585, -0.949462354183197, 0.08823100477457047, -0.022548986598849297, 0.25203001499176025, -0.839324414730072, 0.4022490978240967, -0.37064459919929504, 1.0397006273269653, ...
def _ user _ key ( self, key ) : if ( key > 0 ) and ( key < = vivi _ defines. categories _ number ) : self. judged _ cat. emit ( key - vivi _ defines. categories _ center _ offset ) elif key = = 8 : utils. play ( self. judge _ filename + '. wav') elif key = = 9 : self. judged _ cat. emit ( judgement _ cancel ) elif key...
[ -0.26121827960014343, -0.5135768055915833, 0.6143418550491333, 0.6690705418586731, -0.0924791544675827, 0.08922950178384781, 0.4877004623413086, 0.15127581357955933, -0.7615792155265808, 0.5580154657363892, -0.05531333386898041, 0.030217109248042107, 0.4522971510887146, 0.658977210521698, ...
def map _ dict _ values ( func, d ) : return dict ( ( k, func ( v ) ) for k, v in viewitems ( d ) )
[ -0.7254863381385803, 0.27652379870414734, 0.26797357201576233, -0.25330305099487305, -1.6060630083084106, -0.28736424446105957, -0.1982548087835312, 0.7303457260131836, -0.14912442862987518, -0.8372212052345276, 0.1206391304731369, 0.2311953455209732, 2.1679129600524902, 0.4256439208984375...
def sync _ update ( rpr _ context, obj : bpy. types. object, is _ updated _ geometry, is _ updated _ transform, * * kwargs ) : log ( " sync _ update ", obj, is _ updated _ geometry, is _ updated _ transform ) updated = false if obj. type = ='light': updated | = light. sync _ update ( rpr _ context, obj, is _ updated _ ...
[ -0.3051164448261261, -1.1036523580551147, 1.1086233854293823, 0.3691713213920593, -0.6390681266784668, 0.3235596716403961, -0.1452471911907196, -1.3139376640319824, 0.6623096466064453, 0.4315422475337982, -0.651040256023407, 0.636911928653717, -0.42366620898246765, 0.13944707810878754, -...
def validate _ entry ( vocabulary _ key, entry _ key ) : vocabulary = vocabularies. get _ vocabulary ( vocabulary _ key ) obj = vocabulary. get _ entry _ by _ dict ( entry _ key ) if not obj : raise validationerror ( vocabulary. get _ invalid ( entry _ key ) )
[ 0.8776699900627136, -0.7377447485923767, 0.42842063307762146, -0.11377793550491333, 0.6380507946014404, -0.20298925042152405, -0.9195585250854492, 0.15734492242336273, -0.014112704433500767, 1.0825831890106201, 1.012009859085083, 0.8495697975158691, -0.11070927232503891, 0.5750725865364075...
def main ( ) : # display instructions show _ welcome ( ) # get birthday object calculator = get _ bday ( ) cont ='y'while cont = ='y': valid = false while not valid : try : # get unit user wants to see their birthday in unit = input ( " what do you want to know? the years, months, days, hours, minutes or seconds since ...
[ 0.3198682963848114, 0.1461186408996582, 0.8869314789772034, 1.0805003643035889, 0.10776511579751968, 0.9723271131515503, 0.9215627908706665, -0.41421791911125183, -0.805906355381012, -0.6586707830429077, 0.3742412030696869, 0.9667958617210388, 0.09147823601961136, 0.21331287920475006, 0....
def get _ ancestors ( self, asset _ key : assetkey, include _ self : bool = false ) - > abstractset [ assetkey ] : ancestors = { asset _ key } if include _ self else set ( ) parents = self. get _ parents ( asset _ key ) - { asset _ key } # remove self - dependencies return ancestors. union ( * [ self. get _ ancestors (...
[ -0.06825755536556244, 0.5336649417877197, 0.9149630665779114, -0.656927227973938, -1.0424941778182983, -0.3297942280769348, 0.3568805754184723, -0.08575010299682617, -0.36032602190971375, 1.0331189632415771, 0.1911933273077011, 0.6225220561027527, -0.06701488047838211, 0.8241333365440369, ...
def is _ sorted ( items, reverse = false ) : if reverse = = false : for i in range ( len ( items ) - 1 ) : if items [ i ] > items [ i + 1 ] : return false else : for i in range ( len ( items ) ) : if items [ i ] < items [ i + 1 ] : return false return true
[ -0.5377572774887085, 0.5290045738220215, 0.853318452835083, 0.27003583312034607, 0.11469321697950363, 0.3468685746192932, -0.14670000970363617, 0.12163408100605011, -0.6630511283874512, 0.3835141062736511, -0.9772934913635254, -0.1299678385257721, -1.2803611755371094, -0.06379712373018265,...
def is _ power _ of _ two _ or _ zero ( x ) : return ( x & ( ~ x + 1 ) ) = = x
[ -0.7310498356819153, -1.0295368432998657, 0.3749091327190399, 1.4355616569519043, -0.35493069887161255, -0.10475875437259674, -0.863543689250946, -0.14556193351745605, 1.0042283535003662, -0.39883115887641907, -0.03081747144460678, -0.04880956932902336, 0.504818320274353, 0.079210825264453...
def get _ sub _ range _ generator ( start, stop, steps = 100 ) : step _ increment = abs ( stop - start ) / steps for i in lrange ( start + step _ increment, stop + 1, step _ increment ) : yield start, i start = i if start < stop : yield start, stop
[ -0.6648972630500793, -0.07849149405956268, 0.5462886691093445, 0.0731455534696579, -1.5490541458129883, 0.5637405514717102, -0.35427984595298767, -0.08870634436607361, -1.3606936931610107, -0.6262217164039612, -0.3408193290233612, 0.025280263274908066, 0.5312603712081909, -0.28735882043838...
def nonnegative _ softmax _ kernel _ feature _ creator ( self, x, is _ query ) : if self. _ normalize _ data : # we have e ^ { qk ^ t / sqrt { d } } = e ^ { q _ norm k _ norm ^ t }, where # w _ norm = w * data _ normalizer for w in { q, k }. data _ normalizer = 1. 0 / ( jnp. sqrt ( jnp. sqrt ( x. shape [ - 1 ] ) ) ) el...
[ 0.16329459846019745, 0.24829939007759094, 0.938443124294281, 0.5767632722854614, -1.0668529272079468, -0.24629142880439758, -0.3035070300102234, 0.10658340901136398, 0.5465148091316223, -0.5419558882713318, 0.4175422191619873, 0.2321808785200119, 0.9535732865333557, 0.5775702595710754, -...
def read _ position ( self, pos ) : pos [ " systime " ] = time. time ( ) pos = self. simplify _ position ( pos, isotime = false ) if self. config [ " track _ debug " ] : self. data [ " position _ debug " ]. append ( pos ) if len ( self. data [ " position _ debug " ] ) > self. config [ " max _ debugpoints " ] : self. da...
[ -0.20118211209774017, -0.38942602276802063, 0.7339280247688293, -0.2952941954135895, 0.37550488114356995, -0.3468686640262604, -0.4496142268180847, 0.8143540620803833, 0.22298090159893036, 0.20424358546733856, -0.04847634956240654, -0.08374343067407608, 0.31992971897125244, 0.4440793991088...
def main ( ) : auth = tweepy. oauthhandler ( twitter _ comsumer _ key, twitter _ comsumer _ secret ) auth. set _ access _ token ( twitter _ access _ token, twitter _ access _ secret ) api = tweepy. api ( auth ) public _ tweets = api. user _ timeline ( ) " " " set the notion page that you want to edit " " " page = clien...
[ 0.6046472191810608, -0.6267898082733154, 0.9889724254608154, -0.13649380207061768, 0.5613433718681335, 0.1552981287240982, 0.18611298501491547, 0.5504668951034546, -0.4335158169269562, 0.02691439352929592, 0.11129976809024811, 1.0159434080123901, -0.08776895701885223, 0.7886064648628235, ...
def check _ play _ button ( cb _ settings, genotypes, herd, play _ button, screen, wolf _ pack, mouse _ x, mouse _ y ) : if play _ button. rect. collidepoint ( mouse _ x, mouse _ y ) : if cb _ settings. game _ over = = true : herd. empty ( ) wolf _ pack. empty ( ) cb _ settings. score = 0 cb _ settings. game _ over = f...
[ 0.704334557056427, -0.5899367332458496, 0.68459552526474, 0.9722513556480408, 0.9271873235702515, 0.9363609552383423, 0.12280845642089844, -1.23688805103302, -0.09718942642211914, 0.9353511929512024, -0.14997804164886475, 0.028065063059329987, -0.6441691517829895, -0.19342203438282013, 0...
def meat ( ) : # query all meat data results = db. session. query ( meat. year, meat. beef, meat. lamb, meat. pork, meat. chicken ). all ( ) # create a dictionary from the row data and append to a list of all _ meat all _ meat = [ ] for year, beef, lamb, pork, chicken in results : meat _ dict = { } meat _ dict [ " year...
[ -0.7598184943199158, -0.33010172843933105, 0.808535635471344, -0.2241930216550827, -0.4760715663433075, -0.4211340844631195, -1.8969923257827759, 0.34797585010528564, 0.029834110289812088, 0.18405671417713165, -0.5886690020561218, 0.8629873991012573, 0.5735856294631958, 1.049505352973938, ...
def project _ box ( df ) : df [ " box _ utm _ left " ] = df. image _ utm _ left + ( df. resolution * df. x ) df [ " box _ utm _ bottom " ] = df. image _ utm _ top - ( df. resolution * df. y ) df [ " box _ utm _ right " ] = df. image _ utm _ left + ( df. resolution * ( df. x + df. width ) ) df [ " box _ utm _ top " ] = ...
[ -0.6751835942268372, 0.951938807964325, 0.7310190200805664, -0.5093568563461304, 0.09298250824213028, 0.5870837569236755, -0.4486711621284485, -0.22643251717090607, -0.17998871207237244, 0.18149350583553314, 0.9765481948852539, -0.3816726803779602, 0.2641855776309967, -0.5080053806304932, ...
def movecamera ( self, x, y ) : for sprite in self. visibleobjects : sprite. rect. topleft = sprite. rect. topleft [ 0 ] + x, sprite. rect. topleft [ 1 ] + y for character in self. visiblecharacters : character. rect. topleft = character. rect. topleft [ 0 ] + x, character. rect. topleft [ 1 ] + y self. allsprites. upd...
[ -0.9680689573287964, -1.335646390914917, 0.7319748997688293, -0.8823994398117065, -0.5596054196357727, 0.5616977214813232, -0.30136001110076904, -0.6076759099960327, 0.31794649362564087, 1.3698827028274536, -1.1576893329620361, 0.49093711376190186, -0.28795233368873596, 0.06242050975561142...
def transformation _ jacobian ( transformations, pre _ replaced ) : dim = len ( pre _ replaced ) jacobian = np. eye ( dim ) for constr in transformations : block _ indices = constr [ " index " ] jacobian _ func = getattr ( kt, f " { constr ['type'] } _ from _ internal _ jacobian " ) jac = jacobian _ func ( pre _ replac...
[ -0.8805352449417114, -0.5091111660003662, 0.33101505041122437, -0.20040589570999146, -0.5937570929527283, -0.4840429425239563, 0.9807053804397583, 0.49526265263557434, -0.3445645272731781, 0.29484766721725464, -0.8071900606155396, 0.39568257331848145, 0.022782184183597565, 0.06434805691242...
def fit ( self, dataset, force _ retrain = true ) : logger. info ( " fitting probabilistic intent parser... " ) dataset = validate _ and _ format _ dataset ( dataset ) self. fit _ builtin _ entity _ parser _ if _ needed ( dataset ) self. fit _ custom _ entity _ parser _ if _ needed ( dataset ) intents = list ( dataset ...
[ -0.38887694478034973, -0.5501877069473267, 0.4728533625602722, -0.06355874985456467, 0.06054592505097389, 0.27137333154678345, -0.016300018876791, 0.6861073970794678, 0.25461307168006897, -0.6847735643386841, 0.2834469676017761, 1.269813060760498, -0.5905155539512634, 0.6817212700843811, ...
def fishertransformation ( correlation, size _ length ) : z = 0. 5 * log ( ( 1. 0 + correlation ) / ( 1. 0 - correlation ) ) # fisher transformation error = 1. 0 / ( sqrt ( size _ length - 3. 0 ) ) # standard error err _ low, err _ up = z - 1. 96 * error, z + 1. 96 * error # 95 confidence interval err _ low = ( e * * (...
[ 0.04602520912885666, -0.3131588101387024, 0.6676286458969116, -0.5391053557395935, -0.3150606155395508, -0.6692233681678772, 1.053597092628479, 0.30340608954429626, 0.07023158669471741, 0.4505045711994171, -0.850348949432373, 0.2907436490058899, -1.052597999572754, -0.03447606414556503, ...
def local _ search ( string, privacy _ level = private ) : from. models import document return list ( document. objects. filter ( q ( name _ _ contains = string ) | q ( content _ _ contains = string ) ) )
[ -0.2276989221572876, -0.9152127504348755, 0.19725055992603302, -0.18393270671367645, -0.5794111490249634, 0.10301899164915085, -0.32800912857055664, -0.5676124691963196, -0.3560165762901306, 0.5682392716407776, -0.26924338936805725, 0.17861908674240112, -0.8864867687225342, 0.1103842630982...
def see ( ) : current _ config = jsondataoperations. read ( ) if len ( current _ config ['projects'] ) = = 0 : typer. echo ('seems like you have not added any project yet!!!') command = typer. style ( " copen add ", bg = typer. colors. bright _ white, fg = typer. colors. black ) typer. echo ('use'+ command +'to add new...
[ 0.07370027899742126, 0.3435388505458832, 0.960578441619873, -1.1407967805862427, 0.2942315340042114, 0.14863191545009613, 0.07165627926588058, -0.6180823445320129, -0.024031786248087883, 0.43650996685028076, -0.10342469066381454, 0.7435525059700012, 0.33007973432540894, 0.41901180148124695...
def get _ keyword _ values _ from _ header ( pp, hdict, keys, filename = none ) : # deal with a non - list set of keys if type ( keys ) not in [ list, np. ndarray ] : keys = [ keys ] # try to get values values = [ ] for key in keys : # see if key is a keyword list if key in pp : if type ( pp [ key ] ) in [ list, np. nd...
[ -0.03313087671995163, -0.11093565821647644, 0.7234032154083252, 0.7316344976425171, -0.43201372027397156, -0.06473120301961899, -1.612625241279602, 1.0940848588943481, -0.9074533581733704, 0.8328072428703308, 0.3322111964225769, -0.04383685812354088, -0.932411789894104, 1.1969012022018433,...
def test _ 500 _ kruskal _ matched ( self ) : np. random. seed ( 987654321 ) x _ parms = [ 1. 7 ] x _ input _ array = st. weibull _ min. rvs ( * x _ parms, size = 100 ) y _ input _ array = st. weibull _ min. rvs ( * x _ parms, size = 100 ) z _ input _ array = st. weibull _ min. rvs ( * x _ parms, size = 100 ) alpha = 0...
[ -0.028599858283996582, -0.3412550687789917, 0.5447967648506165, -0.13693325221538544, -0.3350827693939209, 0.8922544121742249, 0.823925256729126, -0.27114126086235046, -0.22320298850536346, 0.15243396162986755, 0.38745760917663574, 0.5774438977241516, -0.5426612496376038, 0.960595846176147...
def main ( ) : if len ( sys. argv ) = = 3 : database _ filepath, model _ filepath = sys. argv [ 1 : ] print ('loading data... \ n database : { } '. format ( database _ filepath ) ) x, y, category _ names = load _ data ( database _ filepath ) x _ train, x _ test, y _ train, y _ test = train _ test _ split ( x, y, test _...
[ 0.16905678808689117, 0.16247667372226715, 0.7343870401382446, 0.2640805244445801, 1.809114933013916, 0.6977630257606506, 0.576421320438385, 1.2054991722106934, -0.9145694375038147, -0.010727916844189167, -0.8891783356666565, -0.03606303408741951, -0.2721925973892212, -0.04508572071790695, ...
def set _ eps _ delta ( self, eps : float, delta : optional [ float ] ) - > none : if eps is none : raise assertionerror ( " eps must not be none. " ) self. _ eps = eps self. _ delta = delta return
[ 0.045177001506090164, 0.3040165305137634, 0.8302261233329773, -0.04078429937362671, 0.38713642954826355, 0.9484853744506836, -0.1250181347131729, 0.2569688856601715, 0.1514417976140976, -1.4465627670288086, -0.7931210398674011, -0.4374430775642395, 0.2828156650066376, 0.048044364899396896,...
def bgm _ variant _ sample ( bgm _ project, institution, variant ) : item = { " project " : bgm _ project [ " @ id " ], " institution " : institution [ " @ id " ], " variant " : variant [ " @ id " ], " call _ info " : " some _ bgm _ sample ", " file " : " some _ bgm _ vcf _ file ", } return item
[ 0.3656911551952362, -0.4372633993625641, 0.1488947719335556, -0.41061460971832275, -0.2300662249326706, -0.5059570670127869, -0.4714698791503906, 0.36275097727775574, -0.5500503182411194, 1.3011915683746338, -0.4154428243637085, 0.7292002439498901, -1.1589211225509644, -0.8317058086395264,...
def testdistinctjp10conf ( self ) : ( q, n ) = conftest. distinctjp10conf ( ) self. assertequal ( q, false )
[ 0.2095491737127304, 0.061403363943099976, 0.17095977067947388, -0.5184926986694336, 1.163099765777588, 1.148945927619934, 0.6644610166549683, 0.6892218589782715, 0.06551243364810944, -0.5649194121360779, -1.0898773670196533, -0.31312012672424316, -0.5357969403266907, -0.04239150881767273, ...
def _ get _ volume _ type _ extra _ spec ( self, volume, spec _ key ) : spec _ value = none ctxt = context. get _ admin _ context ( ) typeid = volume ['volume _ type _ id'] if typeid : volume _ type = volume _ types. get _ volume _ type ( ctxt, typeid ) volume _ specs = volume _ type. get ('extra _ specs') for key, val...
[ 0.08138658106327057, -0.6534100770950317, 0.5004929304122925, -0.0782364010810852, -0.2989819347858429, -0.659961462020874, -0.48812955617904663, -0.020652879029512405, -0.15459638833999634, 1.3354884386062622, 0.5778363943099976, 0.6317513585090637, -0.060185156762599945, 0.22960983216762...
def blog _ recent _ posts ( limit = 5 ) : return list ( blogpost. objects. published ( ) [ : limit ] )
[ 0.42542749643325806, 0.8940953612327576, 0.21551142632961273, 0.3011247217655182, 0.16812823712825775, -0.29729384183883667, 0.0010548575082793832, 0.18430495262145996, -0.4010798931121826, 0.43379834294319153, -0.8677434921264648, 0.3652277886867523, -0.588634192943573, -1.230101227760315...
def schedule _ week ( self, season, week ) : url = f " http : / / www. nfl. com / schedules / { season } / reg { week } " return self. get ( url, encoding = " iso - 8859 - 1 " )
[ -1.392364501953125, 1.1053621768951416, 0.42872175574302673, -0.7806816101074219, 0.3535229563713074, -1.4349406957626343, -0.8495516180992126, -0.35095277428627014, 0.595118522644043, -0.008816108107566833, 0.0056987665593624115, 0.3135342597961426, -0.5631555914878845, -0.776958525180816...
def is _ hard _ coded _ join ( self, group1, group2 ) : def simple ( ife _ id ) : parts = ife _ id. split ('|') return ( parts [ 0 ], parts [ - 1 ] ) id1 = ( simple ( group1 ['id'] ), simple ( group2 ['id'] ) ) id2 = ( simple ( group2 ['id'] ), simple ( group1 ['id'] ) ) return id1 in equivalent _ pairs or id2 in equiv...
[ -1.0547869205474854, -0.04397096484899521, 0.5937897562980652, 0.7664453387260437, -0.41504764556884766, 0.04743480682373047, -0.6753564476966858, 0.1312926858663559, -0.7256242632865906, 0.7719748616218567, -0.09631426632404327, 0.12871406972408295, -1.095302700996399, 0.4329426884651184,...
def ordered _ indices ( self ) : if self. shuffle : indices = np. random. permutation ( len ( self ) ) else : indices = np. arange ( len ( self ) ) if self. langpair _ dataset. tgt _ sizes is not none : indices = indices [ np. argsort ( self. langpair _ dataset. tgt _ sizes [ indices ], kind ='mergesort') ] return indi...
[ -1.0247576236724854, 0.025154437869787216, 0.6025460958480835, -0.9928913712501526, -0.1544787436723709, 0.25432538986206055, -0.12210343033075333, -0.27624014019966125, 0.804628849029541, -0.33560165762901306, 1.0407809019088745, 0.03262902423739433, -0.3054366111755371, -0.63349854946136...
def get _ user _ sign ( ) : artist = input ( " enter the sign for searching : " ) return artist
[ -0.6242499351501465, -0.17199213802814484, 0.13291163742542267, 1.1544170379638672, -0.5993353724479675, 0.2985233962535858, 0.9133679270744324, 0.03460739180445671, -0.285814493894577, -0.7556373476982117, -0.834416389465332, 0.32519155740737915, -0.9620552659034729, -0.6885116100311279, ...
def _ init _ build ( self ) : # clone the source so we don't affect the host file system during the run logging. info ('cloning source repository') os. makedirs ( os. path. dirname ( operator _ src _ dir ) ) # we have a private fork of the operator - sdk which prevents this from working # clone _ cmd = ['git ','clone '...
[ -0.14278936386108398, 0.5122895240783691, 0.6601463556289673, -0.14167824387550354, 0.1521744430065155, 0.2200007289648056, 0.6472628712654114, 0.42793262004852295, -0.18205483257770538, 0.6563635468482971, -0.10986743867397308, -0.14483313262462616, 0.4847443401813507, 0.9132744073867798,...
def forward ( self, inputs, encoder _ hidden _ state, projected _ keys, encoder _ outputs, teacher _ forcing =. 4 ) : hidden, outputs, alphas _ out, pre _ outputs = encoder _ hidden _ state, [ ], [ ], [ ] # 10 / 26 changed loss such that true _ y starts at n + 1... this # was done in order to allow the model to start a...
[ -0.7092530131340027, 0.22815433144569397, 0.5223191380500793, 0.2192400097846985, -0.21085217595100403, 0.11991234868764877, 0.037998851388692856, 0.15591010451316833, -0.9219925999641418, 0.05704252049326897, 0.31774652004241943, 0.0702328011393547, 0.11508458852767944, 0.6530614495277405...
def parse ( cls, expr : str ) - > expr : return parse _ expression ( str ( expr ) )
[ 0.1460282951593399, -0.5580371618270874, 0.08826274424791336, -0.12445415556430817, -1.3460454940795898, -0.34534648060798645, -0.7436245083808899, 0.5456251502037048, 0.2765115797519684, -0.7366695404052734, -0.17691436409950256, 0.2695961594581604, -0.07771757990121841, -0.65638905763626...
def _ _ get _ corner _ candidates ( self, start, room ) : # initialise list candidates = [ ] # iterate corners in room for i, corner in enumerate ( room. corners ) : # skip visisted if not corner. unused : continue # get offset dx, dy = self. _ _ corner _ offset ( room. corners, i ) # check if corner is candidate mater...
[ -0.6023337841033936, -1.5275272130966187, 0.6338784694671631, -0.538242518901825, 0.023380620405077934, 0.43323490023612976, -0.38387441635131836, 0.19439175724983215, 0.057596925646066666, 0.919190526008606, -0.000037359637644840404, 0.9777427315711975, 0.19567808508872986, 0.322622627019...
def parse _ from _ path ( self, infile _ path ) : with open ( infile _ path,'r') as infile : return self. parse ( infile )
[ 0.540439784526825, -1.203794002532959, 0.48710471391677856, -0.3584757149219513, -0.5285348892211914, 0.5879405736923218, -0.2442401498556137, 0.25642067193984985, -0.7250045537948608, -0.551125168800354, -0.28800174593925476, -0.4177803099155426, -1.052288293838501, -1.3171299695968628, ...
def test _ successful _ update ( self ) : response = self. client. post ( self. url, { } ) self. assertredirects ( response, reverse ('tasks : home'), status _ code = 302, target _ status _ code = 200 ) self. task. refresh _ from _ db ( ) self. asserttrue ( self. task. is _ removed )
[ 0.787298321723938, 0.4403628706932068, 0.5571463108062744, 1.0616097450256348, 0.31325164437294006, 0.8822396397590637, 0.1078973263502121, 0.709811270236969, 0.34501534700393677, -0.07227403670549393, -1.1997255086898804, -0.33614227175712585, 0.7062594294548035, -0.17402327060699463, -...
def date _ format _ regex ( self ) : # we lead with the best formatting to use, add on the rest return [ r'( \ d { 4 } ( / | - ) { 1 } \ d { 1, 2 } ( / | - ) { 1 } \ d { 1, 2 } ) ', r'( \ d { 1, 2 } ( / | - ) { 1 } \ d { 1, 2 } ( / | - ) { 1 } \ d { 4 } )']
[ -0.20332475006580353, -0.7331283092498779, 0.9104827642440796, 0.3312685191631317, 0.12764568626880646, -0.12269316613674164, -0.5547155141830444, 0.6171747446060181, 0.266805499792099, -0.4968836307525635, -0.057337675243616104, 0.029751455411314964, 0.31431713700294495, 0.608936131000518...
def test _ new _ obstacle ( is _ top ) : runs = 10 game = game ( ) og _ obs = len ( game. obstacles ) og _ sprites = len ( game. all _ sprites ) for _ in range ( runs ) : game. create _ new _ obstacle ( is _ top ) assert len ( game. obstacles ) = = runs + og _ obs assert len ( game. all _ sprites ) = = runs + og _ spri...
[ -0.6728028655052185, -0.1330924779176712, 0.6460033655166626, 0.21073037385940552, 0.22422438859939575, 1.3571325540542603, 0.0029152960050851107, -1.0710259675979614, 0.3878885507583618, 0.4219541549682617, -0.10196419060230255, -0.02403322607278824, 0.6007721424102783, 0.1652784198522567...
def initial _ condition ( self, initial _ condition ) : initial _ condition = ensure _ non _ negative _ value ( initial _ condition ) setattr ( self, " _ initial _ condition ", initial _ condition )
[ 0.9137545824050903, -0.6938049793243408, 0.4881312847137451, -0.17688299715518951, -0.02025212161242962, 1.2235558032989502, 0.8453074097633362, 1.1352165937423706, -0.3976518511772156, -0.4274759888648987, 0.0840047225356102, 0.3090461790561676, 0.645098090171814, 1.2004200220108032, -0...
def test _ eggholder ( self ) : myfunc = simul. eggholder nvar = 2 vbounds = np. zeros ( ( nvar, 2 ) ) vbounds [ 0, 0 ] = - 512. vbounds [ 0, 1 ] = 512. vbounds [ 1, 0 ] = - 512. vbounds [ 1, 1 ] = 512. mypb = genop. genop ( 1000 ) mypb. verbose = false self. assertequal ( mypb. popsize, 1000 ) self. assertequal ( mypb...
[ -0.19311274588108063, 1.0077860355377197, 0.5487750172615051, 0.3964794874191284, 0.005114216823130846, 0.8020809888839722, 0.27317336201667786, -0.2479313164949417, 0.31025248765945435, 0.34751978516578674, -1.0439952611923218, -0.2636609375476837, -0.7586588263511658, 0.48049506545066833...
def generate _ list _ of _ mailing _ lists ( ) : groups = admin. groups ( ) members = admin. members ( ) result = [ ] for group in call _ google ( groups. list ( customer = cid ) ) [ " groups " ] : v = list ( member ['email'] for member in call _ google ( members. list ( groupkey = group ['email'] ) ). get ( " members ...
[ -0.5413647294044495, 0.6107360124588013, 0.34242865443229675, -0.8979801535606384, -0.43649911880493164, 0.42852672934532166, -0.5146304965019226, 0.45356595516204834, 0.020454758778214455, 0.728513777256012, -1.0089988708496094, 0.9019052982330322, -0.2851308286190033, 1.0831809043884277,...
def get _ match _ result _ array ( matches ) : matches _ outcome _ array = [ ] home _ goals = matches ['home _ team _ goal']. to _ numpy ( ) away _ goals = matches ['away _ team _ goal']. to _ numpy ( ) for pos in range ( len ( home _ goals ) ) : if home _ goals [ pos ] > away _ goals [ pos ] : matches _ outcome _ arra...
[ -0.7522531747817993, -0.9983776807785034, 0.6396492123603821, 0.06440585106611252, 0.48839071393013, 0.24952968955039978, 0.3435026705265045, -0.220864936709404, -0.5738892555236816, 0.365949809551239, -0.051310740411281586, -0.4102441668510437, 0.2795683443546295, -0.4642919898033142, 0...
def txt2set ( text ) : return set ( [ element. strip ( ). lower ( ) for element in text. split ( ',') if element. strip ( )! ='' ] )
[ 1.14267897605896, -0.32936447858810425, 0.4275685250759125, -1.2763290405273438, -0.5896786451339722, 0.8821479082107544, -1.2622509002685547, 0.5531328916549683, -0.26340341567993164, 0.5847443342208862, -0.5046089887619019, 0.1895250678062439, -0.6445828676223755, -0.24512802064418793, ...
def tag _ adjective ( node, context ) : if node. attribute = = " a " : word = word _ from _ file ('data / adjectives') if word [ 0 ] in'aeiou': return " an " + word else : return " a " + word else : return word _ from _ file ('data / adjectives')
[ 0.1617603749036789, -0.1585279107093811, 0.44210705161094666, -1.1369761228561401, 0.08685057610273361, 0.2174348533153534, -0.42300692200660706, -0.041840560734272, -0.03715519234538078, 0.7480219006538391, 1.0090709924697876, 0.892730712890625, 0.7727941870689392, 0.3835936188697815, -...
def download _ image ( url _ string, context, imgdir = none, delete _ on _ exit = true, decompress = true, timeout = 300 ) : logging. debug ( " about to download % s to the host ", url _ string ) now = time. time ( ) tries = 0 while true : try : logging. info ( " downloading image : % s ", url _ string ) if not imgdir ...
[ -0.20484790205955505, 0.2102869600057602, 0.5866232514381409, 0.18788763880729675, -0.5773574113845825, -0.8658144474029541, -0.3928230106830597, 0.26463836431503296, 0.44195711612701416, 0.1945985108613968, -0.4019321799278259, -0.3003380298614502, -0.05888836830854416, 0.5622087121009827...
def dmol _ vs _ props ( mol _ params, properties, snaps, labels = none, bin _ nums = 50, std _ bars = true, foutname ='dmol _ vs _ props. png') : # get plot stylization linewidths, colors, linestyles = plt _ set. setup _ plot _ style ( len ( snaps ), properties = mol _ params, style ='color - linestyle') # set up subpl...
[ 0.3787809908390045, -0.14541888236999512, 1.1131620407104492, -0.018369009718298912, -0.07741693407297134, 0.5165698528289795, 0.37927278876304626, -0.2983056306838989, -0.4525214433670044, -0.5393714308738708, 0.6390018463134766, 0.3634244501590729, 0.8808173537254333, -0.0542011708021163...
def discover _ source ( config _ file : path | none, root _ dir : path | none ) - > source : if config _ file is none : src = _ locate _ source ( ) if src is none : src = _ create _ default _ source ( root _ dir ) elif config _ file. is _ dir ( ) : src = none for src _ type in source _ types : candidate : path = config...
[ 0.1851743906736374, 0.2620706558227539, 0.3989243507385254, 0.7550532817840576, 0.7890890836715698, -0.7279623746871948, 0.7038193345069885, -0.01800769940018654, -0.38551971316337585, 0.3062474727630615, 0.35692813992500305, 0.0032521483954042196, -0.4424048662185669, 0.9187179207801819, ...
def add _ bit ( cls, canbit : canbit ) : current _ field = cls. get _ current _ field ( ) current _ field. canbits. append ( canbit )
[ -0.2675895094871521, -0.2075907289981842, 0.4460289180278778, 1.0649880170822144, 0.13631853461265564, 1.9801779985427856, 0.34625890851020813, -0.3713410198688507, -0.5369155406951904, -0.5456485748291016, -0.4328608810901642, 0.8060884475708008, -0.8064615726470947, 0.744305431842804, ...
def share _ with _ neighbours ( self, neighbourhood ) : " " " if this distance is less than neighbourhood share the store " " " for agent in self. agents : if agent is not self : # agent does not share with itself distance = self. distance _ between ( agent ) if distance < = neighbourhood : average = ( self. store + ag...
[ 0.5698887705802917, -0.7374698519706726, 0.35297954082489014, 0.04140086472034454, -0.2611318528652191, 0.15014931559562683, 0.3508012294769287, 0.2322378307580948, 0.7373387813568115, 0.20207951962947845, 0.02615215815603733, 0.01697576232254505, -1.2122215032577515, 0.8791123032569885, ...