text stringlengths 25 2.19k | embedding listlengths 768 768 |
|---|---|
def stove _ forward ( self, x, actions = none, x _ color = none ) : t = x. shape [ 1 ] skip = self. c. skip cl = self. c. cl # 1. obtain supair states. # 1. 1 obtain partial states ( sizes and positions ). # apply supair to all images in sequence. shape ( nt, o, 8 ) # supair does not actually have any time _ dependence... | [
-0.1091797798871994,
-0.12335557490587234,
0.7351478934288025,
0.13420461118221283,
-0.96482914686203,
-0.2937454879283905,
1.325039029121399,
0.09556085616350174,
0.5154531598091125,
-0.03846096992492676,
-0.6046876311302185,
-0.5280188322067261,
0.8008759021759033,
0.1251377910375595,
... |
def collect ( cls, block _ structure ) : # there is nothing to collect pass # pylint : disable = unnecessary - pass | [
0.0761115700006485,
-1.1165622472763062,
0.30540624260902405,
0.5855381488800049,
0.32697510719299316,
0.576995849609375,
0.44915494322776794,
-0.6543402075767517,
0.19318696856498718,
-0.05571305379271507,
-0.46924254298210144,
-0.21164759993553162,
0.30467936396598816,
1.2167266607284546... |
def example ( arg1, arg2 = 0 ) : arg1 = try _ int ( arg1, none ) if arg1 = = none : raise typeerror ( " arg1 is invalid " ) arg2 = try _ int ( arg2, 0 ) print ( " sum of { } + { } = { } ". format ( arg1, arg2, arg1 + arg2 ) ) | [
-0.0168069489300251,
-0.1756531447172165,
0.7067408561706543,
0.10054338723421097,
-0.04159436747431755,
-0.24493955075740814,
-0.7465987205505371,
-0.6634750366210938,
-0.704667866230011,
0.237447127699852,
-0.24903613328933716,
0.8892068862915039,
-0.10363098978996277,
0.2960275411605835... |
def test _ repo _ field _ values ( self ) : fields = self. _ get _ repository _ fields ('git ', fields = {'hosting _ url':'https : / / example. com ','rbgateway _ repo _ name':'myrepo ', } ) self. assertequal ( fields ['path'],'https : / / example. com / repos / myrepo / path') | [
0.32168522477149963,
0.4799237549304962,
0.16139335930347443,
-0.8180162906646729,
1.0077357292175293,
1.0159999132156372,
-0.196782186627388,
0.222396582365036,
-0.5843430161476135,
-0.10283641517162323,
-1.285547137260437,
-0.151258185505867,
-0.2215833216905594,
-0.3299298584461212,
-... |
def maybe _ download ( filename, expected _ bytes, force = false ) : dest _ filename = os. path. join ( data _ root, filename ) if force or not os. path. exists ( dest _ filename ) : logger. info ('attempting to download : ', filename ) filename, _ = urlretrieve ( url + filename, dest _ filename, reporthook = download ... | [
0.404742956161499,
0.282331645488739,
0.7803727984428406,
0.24591246247291565,
0.4791913330554962,
0.06579433381557465,
-0.1295684576034546,
0.3772203326225281,
0.22349339723587036,
-0.34939044713974,
0.11832869797945023,
0.5484673380851746,
0.17548857629299164,
0.9820536375045776,
-0.47... |
def facebook _ disconnect ( ) : facebook _ id = flask. session. get ('facebook _ id') if facebook _ id is none : response = flask. make _ response ( json. dumps ('current user not connected'), 401 ) response. headers ['content - type'] ='application / json'return response url = ('https : / / graph. facebook. com / { } ... | [
0.2962207496166229,
-0.7229812741279602,
0.9997705221176147,
0.627014696598053,
-0.10319018363952637,
-1.1972029209136963,
-0.13494345545768738,
-0.5944443345069885,
0.8437617421150208,
0.07411455363035202,
0.5865694284439087,
-0.3298485577106476,
-0.47431111335754395,
-0.6795896291732788,... |
def fill _ na _ as _ prediction ( df : pd. dataframe, cols _ na : list [ str ], model = none ) : quantitative _ na _ cols = df. loc [ :, df. isna ( ). any ( ) ] \. select _ dtypes ( exclude = ['category ','object ','bool'] ) \. columns. tolist ( ) if model is none : model = randomforestclassifier ( n _ jobs = - 1 ) for... | [
-0.7287217378616333,
0.42079317569732666,
0.5215260982513428,
0.4565414786338806,
0.04397048428654671,
-0.408963680267334,
0.42664635181427,
-0.1959850788116455,
-0.38505637645721436,
0.3859025239944458,
-0.2806433439254761,
0.09727784991264343,
1.3981212377548218,
0.5434753894805908,
-0... |
def encoder _ unit ( data, num _ filter, stride, dim _ match, name, bottle _ neck = 0, \ dilation = 1, irv2 = false, deform = 0, sqex = 1, bn _ mom = 0. 9, unitbatchnorm = false, workspace = 256, memonger = false ) : # # if 0 : use conventional conv3, 3 - conv3, 3 if bottle _ neck = = 0 : conv1 = mx. sym. convolution (... | [
0.07487216591835022,
0.2987929880619049,
1.0046422481536865,
0.730130672454834,
-0.9279394745826721,
0.4671317934989929,
0.18324622511863708,
0.568350613117218,
0.5536033511161804,
0.12452734261751175,
-0.29226788878440857,
0.90317302942276,
0.16546259820461273,
0.12765270471572876,
0.50... |
def update _ packages ( self, dev = true ) : filepath = base _ path ( " package. json " ) if not os. path. exists ( filepath ) : return configuration _ key = " devdependencies " if dev else " dependencies " with open ( filepath, " r + " ) as f : packages = json. load ( f ) # add new packages packages [ configuration _ ... | [
-0.7320176959037781,
-0.08101030439138412,
0.41478389501571655,
-0.550562858581543,
0.06515973806381226,
0.16191750764846802,
0.12342018634080887,
-0.09895569086074829,
0.11989476531744003,
0.5477780103683472,
-0.533157229423523,
-0.4364227056503296,
0.2961675226688385,
0.42388254404067993... |
def apt _ get _ localinstall ( package ) : dpkg _ ret = dpkg _ install ( package ) if not dpkg _ ret. success : log. debug ('failure : { 0. command } : { 0. stderr } '. format ( dpkg _ ret. result ) ) return dpkg _ ret apt _ ret = apt _ get _ install ('- - fix - missing') if not apt _ ret. success : log. debug ('failur... | [
-0.5562015175819397,
0.04604960232973099,
0.7518193125724792,
-0.06748773902654648,
0.1523982286453247,
-1.0349630117416382,
0.016572382301092148,
-0.022383470088243484,
0.2945248782634735,
0.12099283188581467,
0.03157264366745949,
-0.7399091720581055,
-0.1298726350069046,
0.05230776220560... |
def get _ random _ trips ( locations _ list, time _ step, min _ trips, max _ trips, class _ proportion, origins = none, destinations = none, classed = false, ) : trips = list ( ) # weights = np. zeros ( len ( locations _ list ) ) # weights [ 0 ] = 1 # choose random location from _ locations = random. choices ( ( origin... | [
-1.1479344367980957,
-0.03981142118573189,
0.5561622977256775,
0.20091772079467773,
0.4374488592147827,
0.6713103652000427,
-0.5541027784347534,
0.4962399899959564,
0.05069039762020111,
0.1432817131280899,
0.3948744535446167,
-0.035976190119981766,
1.0581766366958618,
0.16505172848701477,
... |
def as _ vectors ( self ) - > tuple [ np. ndarray, np. ndarray ] : return self. x _ vec, self. y _ vec | [
-0.550405740737915,
-0.5823449492454529,
0.6203123927116394,
-0.8346702456474304,
1.0748871564865112,
0.1915081888437271,
-0.24102191627025604,
-0.3800759017467499,
0.036710526794195175,
-0.07285645604133606,
-0.16413559019565582,
0.4511161744594574,
1.1543117761611938,
0.23997703194618225... |
def sitemap _ filter ( self, entries ) : for entry in entries : ts = entry. get ( " lastmod ", none ) if not ts is none : # convert ts to a datetime for comparison ts = dateparser. parse ( ts, settings = { " return _ as _ timezone _ aware " : true }, ) # preserve the converted timestamp in the entry entry [ " lastmod "... | [
-0.3889222741127014,
-0.5544110536575317,
0.6116207838058472,
0.05826425924897194,
-0.054459407925605774,
-0.4537021219730377,
-0.7072470784187317,
0.1466047465801239,
0.8295897245407104,
0.7421588897705078,
0.7291816473007202,
0.22320425510406494,
-0.05351456254720688,
0.7902881503105164,... |
def test _ repository _ raises ( self ) : self. assertraises ( typeerror, repository ) | [
-0.2704497277736664,
0.820565402507782,
0.012010189704596996,
-0.09969880431890488,
0.7708718776702881,
0.24037767946720123,
-0.2996925115585327,
0.24191007018089294,
0.5497292876243591,
-0.3008386492729187,
-0.3602806329727173,
-0.23284535109996796,
-0.5059303641319275,
0.7491302490234375... |
def ocr _ words ( self ) - > iterable ['ocrwordentity'] : yield from chain. from _ iterable ( e. ocr _ words ( ) for e in self. children ) | [
-0.4449082314968109,
-0.2618880867958069,
0.6085522770881653,
-0.30697357654571533,
0.5169683694839478,
-0.3369410037994385,
-0.20545800030231476,
-0.24806493520736694,
0.7374882698059082,
0.5855925679206848,
0.6305413842201233,
0.19960510730743408,
0.22112315893173218,
0.9688771367073059,... |
def _ _ call _ _ ( self, websocket, path ) : if path! = self. _ path : log. error ( " client connected on path % s ; dropping connection ", path ) return notifier = yield from self. _ cache. notifier ( ) client = client ( websocket, self. _ cache, notifier ) try : yield from client. process ( ) finally : notifier. clos... | [
0.12234016507863998,
-0.5828772783279419,
0.6900209784507751,
-0.6283766031265259,
-0.34351441264152527,
-0.19209927320480347,
0.08582012355327606,
-0.8902759552001953,
-0.12151189148426056,
0.4115053713321686,
-0.2929592728614807,
0.4020238518714905,
-0.4562063217163086,
-0.23906937241554... |
def get _ vector _ count ( index _ dir : str, start _ date : str ='0000 - 00 - 00 ', end _ date : str ='9999 - 99 - 99 ', recursive : bool = false ) - > int : n _ vect = 0 iso _ seed = str ('\ d { 4 } [ - / ] \ d { 2 } [ - / ] \ d { 2 }') for ( p _ dir, _, files ) in os. walk ( index _ dir ) : for f in files : if f. en... | [
-0.5840654373168945,
0.6032758951187134,
0.9295113682746887,
0.5898998379707336,
-0.20366579294204712,
-0.13674110174179077,
1.2090058326721191,
0.14956538379192352,
-0.1899631917476654,
-0.16143949329853058,
0.21292723715305328,
0.8506253361701965,
0.5644145011901855,
-0.07372406870126724... |
def patch ( self, uuid, patch ) : def _ update _ node _ attr ( context, nic _ obj, patch ) : i = 0 while i < len ( patch ) : p = patch [ i ] if p ['path']. lstrip ('/') = ='node': node = objects. node. get _ by _ name ( context, p ['value'] ) p ['value'] = node. id p ['path'] ='/ node _ id'i + = 1 context = pecan. requ... | [
-1.4392997026443481,
-0.6671780347824097,
0.5407148003578186,
-0.7179439067840576,
-0.2487642616033554,
-0.19660860300064087,
0.07230181246995926,
-0.09688980877399445,
0.20991750061511993,
0.20254768431186676,
-0.4440288841724396,
-0.06470669060945511,
-0.4991036355495453,
-1.032572031021... |
def _ detect _ variant _ type ( self, ref, alt ) : if len ( ref ) = = len ( alt ) : return varianttype. snp elif len ( ref ) < len ( alt ) : return varianttype. insertion else : return varianttype. deletion | [
0.7970080375671387,
-0.2353673130273819,
0.5440324544906616,
-0.17598313093185425,
0.2391887903213501,
0.08205944299697876,
-0.26694270968437195,
-1.1980336904525757,
1.2442541122436523,
0.34151574969291687,
0.3440835177898407,
1.1400290727615356,
-0.19928334653377533,
0.29912757873535156,... |
def get _ table _ width ( self ) : widths = [ w. get _ actual _ column _ char _ len ( w. get _ calculated _ desired _ width ( ), check _ remaining _ row _ chars = false ) for w in self. wrappers ] chars _ used _ by _ data = sum ( widths ) width = self. non _ data _ chrs _ used _ by _ table + chars _ used _ by _ data re... | [
-1.3424482345581055,
-0.028145553544163704,
0.6863566637039185,
0.5782224535942078,
-0.25286638736724854,
-0.3888569176197052,
0.5354194641113281,
-0.07976657897233963,
-0.46580061316490173,
-0.4287121891975403,
-0.48813238739967346,
0.6399745941162109,
0.15195882320404053,
0.7506344914436... |
def assert _ user _ can _ change _ status ( user ) : if user and user. is _ authenticated ( ) and user. is _ staff : return raise onlystaffcanupdatestatus ( " only staff can update a flag's status " ) | [
-0.01910429261624813,
0.447687566280365,
0.20715150237083435,
1.6509901285171509,
-0.6817452311515808,
1.1193758249282837,
0.31318366527557373,
0.0562812015414238,
-0.06931474059820175,
-0.3600624203681946,
-0.35495316982269287,
0.6224259734153748,
0.06736751645803452,
1.6957892179489136,
... |
def save _ plugin _ data ( name, value ) : | [
-1.1023001670837402,
-0.9961162209510803,
0.2793692946434021,
0.027905959635972977,
-0.18621507287025452,
-0.27224141359329224,
-0.45366400480270386,
-0.5833749175071716,
0.28758862614631653,
0.4579457938671112,
-2.0754339694976807,
0.17283783853054047,
-0.46763819456100464,
-0.24725756049... |
def _ write _ file ( self, processes ) - > none : if not isinstance ( processes, list ) : processes = list ( processes ) processes. sort ( key = lambda p : ( p. pid, p. site ) ) with suppress ( ioerror ), open ( self. ctrlfilename,'w') as f : for p in processes : f. write ( format _ line. format _ map ( p. _ asdict ( )... | [
-0.03848491609096527,
-1.19648015499115,
0.20077566802501678,
-0.06691335886716843,
1.2835736274719238,
0.45944032073020935,
0.23134872317314148,
0.31919291615486145,
-0.4147323966026306,
-0.30858314037323,
-0.22072796523571014,
-0.6829250454902649,
0.0557652972638607,
0.30303606390953064,... |
def tracking _ url ( self, tracking _ url ) : self. _ tracking _ url = tracking _ url | [
-0.6102772951126099,
0.520374596118927,
-0.1380387395620346,
1.2049094438552856,
0.13910304009914398,
1.2769298553466797,
0.7066816687583923,
1.4580554962158203,
-0.9658320546150208,
0.37976816296577454,
-2.18365478515625,
-0.29734084010124207,
-0.009932414628565311,
-0.08256808668375015,
... |
def plotline ( self, dataframe, x, y, title, xlabel, ylabel, directory, filename ) : filename = directory + filename plot = bokeh. charts. line ( dataframe, x = x, y = y, title = title, xlabel = xlabel, ylabel = ylabel ) bokeh. charts. output _ file ( filename ) | [
-0.2302822768688202,
0.1813656985759735,
0.4891890585422516,
-0.12725502252578735,
0.7738818526268005,
0.154450923204422,
-0.16721920669078827,
0.14463134109973907,
-0.6082897782325745,
-0.7948598861694336,
-0.36280322074890137,
1.075457215309143,
0.7142786383628845,
-0.9918143153190613,
... |
def finish _ receive ( self ) : if self. in _ data : idx = self. buf. rfind ( self. sep + self. delimiter [ : - 2 ] ) if idx > 0 : self. feed _ part ( self. buf [ : idx ] ) self. end _ part ( ) | [
0.22125394642353058,
-0.31783753633499146,
0.8210992217063904,
-0.4637325704097748,
-0.04947872459888458,
-0.06035931408405304,
-0.3673675060272217,
-0.4249376058578491,
-0.972990870475769,
-0.1948433518409729,
-0.4091203510761261,
0.5397070646286011,
-1.3670369386672974,
-0.37647405266761... |
def process _ tokens ( tokens ) : p _ tokens = [ ] i = 0 while i < len ( tokens ) : tok = tokens [ i ] if tok = = " < target > " : p _ tokens. append ( tok ) p _ tokens + = tokens [ i + 1 ]. split ( " _ " ) # tokens of the mention are glued together using _ i + = 1 elif tok not in skip _ tokens : # skip { " < em > ", "... | [
-1.39435613155365,
-0.13180632889270782,
0.9438626170158386,
-0.5532929301261902,
-0.19740743935108185,
-0.32498833537101746,
0.31704363226890564,
0.20488668978214264,
-0.000694918620865792,
1.0288496017456055,
0.0013425175566226244,
0.18615351617336273,
0.07285866886377335,
-0.15681475400... |
def predict _ localization _ model ( self ) : if self. ct _ scan _ localization is not none : self. localization _ results = self. localization _ neural _ network. predict _ using _ model ( self. ct _ scan _ localization ) else : self. debug ( " [! ] no reshaped images found! prediction cant be done! " ) raise exceptio... | [
-0.016421964392066002,
-0.21158361434936523,
0.2731798589229584,
0.6467086672782898,
0.5775158405303955,
0.034852221608161926,
0.42586153745651245,
0.6264503598213196,
-0.2779938280582428,
-0.19134382903575897,
-0.18343500792980194,
-0.9335156679153442,
0.35590460896492004,
0.4745481908321... |
def generate _ n _ ints ( num : int = 6 ) - > list : return [ random. randrange ( 256 ) for _ in range ( num ) ] | [
-1.3754414319992065,
0.7074929475784302,
0.28403717279434204,
-0.0546179935336113,
-0.03601960092782974,
-0.04956459254026413,
-0.16805335879325867,
-0.08092568069696426,
0.6719596982002258,
-0.40084657073020935,
-1.647138237953186,
-0.7210760116577148,
-0.21904408931732178,
0.485202789306... |
def choose _ formatter _ factory ( options _ list : " namespace ", ) - > type [ formatters. baseformatter [ any ] ] : r : type [ formatters. baseformatter [ any ] ] = formatters. formatter if options _ list. format = ='quiet': r = formatters. quietformatter elif options _ list. parseable _ severity : r = formatters. pa... | [
-0.5883165001869202,
-0.692737877368927,
0.5683127045631409,
-0.08821234852075577,
0.5401129126548767,
-0.5204788446426392,
-1.0900182723999023,
-1.0114742517471313,
0.7948166728019714,
-0.9543987512588501,
-0.22415846586227417,
0.8632168173789978,
-0.38201454281806946,
1.3512523174285889,... |
def _ getplugins ( self, interface, package = none ) : self. plugincalls. append ( ( interface, package ) ) return list ( self. pluginresults ) | [
-1.0984512567520142,
0.8843529224395752,
0.49826565384864807,
0.002574826357886195,
0.9081260561943054,
-0.8294389247894287,
-0.7947031259536743,
-0.9636459350585938,
0.9649677872657776,
-0.0625523179769516,
-0.5383124351501465,
0.1058264747262001,
-0.7910239696502686,
0.2436971515417099,
... |
def version ( self ) - > pulumi. input [ str ] : return pulumi. get ( self, " version " ) | [
0.450851172208786,
-0.3244789242744446,
0.3141283094882965,
0.5402794480323792,
0.9114288091659546,
1.9552968740463257,
0.7709672451019287,
0.2996710538864136,
0.44452303647994995,
0.5564655065536499,
-0.33836111426353455,
0.7001930475234985,
0.3123554289340973,
-1.1910896301269531,
-0.2... |
def divide _ video _ into _ images ( input _ video, image _ folder, format ='jpg') : assert format = ='jpg'or format = ='jpeg'or format = ='jpg'or format = ='png'or format = ='png'# the this function, each frame of the video will be stored into the folder def store _ image ( img ) : " " " store the each frmae image int... | [
-0.8420403003692627,
-0.0926498994231224,
0.7902069091796875,
1.2516770362854004,
-0.05600540339946747,
-0.692208468914032,
1.1685099601745605,
0.30539458990097046,
0.4648682177066803,
-0.4502624273300171,
0.28104934096336365,
0.31667831540107727,
-0.2820117175579071,
1.4809274673461914,
... |
def isabs ( s ) : return s. startswith ('/') | [
-0.04157384857535362,
-0.6523255705833435,
0.5005137324333191,
0.7153769135475159,
-0.993439257144928,
0.17298360168933868,
-0.15086841583251953,
-0.666988730430603,
1.4069290161132812,
0.06503768265247345,
0.3023580014705658,
0.5914382338523865,
0.7260047197341919,
-0.016540976241230965,
... |
def message _ callback _ remove ( self, sub ) : if sub is none : raise valueerror ( " sub must defined. " ) for i in range ( 0, len ( self. on _ message _ filtered ) ) : if self. on _ message _ filtered [ i ] [ 0 ] = = sub : self. on _ message _ filtered. pop ( i ) return | [
0.5372742414474487,
0.2832634449005127,
0.777981698513031,
0.22341255843639374,
-1.080725908279419,
-0.009016859345138073,
0.6127995252609253,
-0.5282998085021973,
-0.1525103598833084,
0.6492546796798706,
-0.33843380212783813,
1.2435585260391235,
-1.113964319229126,
0.5097209811210632,
0... |
def mwe _ tokenize ( s, mwes = none, sep ='' ) : if not mwes : mwes = [ ] for mwe in mwes : mwe = sep. join ( list ( mwe ) ) if mwe in s : s = s. replace ( mwe, mwe. replace ('','< mwe >') ) tokens = word _ tokenize ( s ) for i, e in enumerate ( tokens ) : if'< mwe >'in e : tokens [ i ] = e. replace ('< mwe > ','' ) re... | [
0.013480700552463531,
-0.4140397906303406,
0.7478684186935425,
0.15130303800106049,
-0.7955154180526733,
-0.6844226121902466,
-0.08942058682441711,
1.1082271337509155,
0.8555970788002014,
0.06306443363428116,
-0.1512122005224228,
0.4394097924232483,
-0.831581711769104,
0.7221666574478149,
... |
def list ( self, request ) : profiles = coach. objects. all ( ). order _ by ('user') serializer = profileserializer ( profiles, many = true, context = {'request': request } ) return response ( serializer. data ) | [
0.03525654599070549,
0.2189457267522812,
0.4380842447280884,
1.0081446170806885,
0.49290335178375244,
0.16456905007362366,
0.5287045836448669,
-0.6732911467552185,
0.046925269067287445,
0.3549632132053375,
-0.10410042107105255,
0.35072362422943115,
0.17377565801143646,
-0.1967034786939621,... |
def diff _ html ( html _ dict, base _ ip, other _ ip ) : diff = htmldiff ( wrapcolumn = 60 ) return diff. make _ table ( fromlines = html _ dict [ base _ ip ]. splitlines ( ), tolines = html _ dict [ other _ ip ]. splitlines ( ), ) | [
-0.5443480014801025,
0.10069625824689865,
0.4627763330936432,
-0.3443412184715271,
-0.6189160346984863,
0.25484907627105713,
-0.8723874688148499,
0.24391710758209229,
-0.6662425994873047,
0.453959196805954,
0.6068839430809021,
-0.1508210003376007,
0.5919497013092041,
-0.5848494172096252,
... |
def top _ level _ dirname ( mod ) : top = module ( mod. _ _ name _ _. split ( '. ', 1 ) [ 0 ] ) return path. dirname ( top. _ _ file _ _ ) | [
-1.040390133857727,
-0.4649999439716339,
0.9584102034568787,
0.2673987150192261,
-1.2868846654891968,
0.0533522292971611,
1.0716156959533691,
-0.5536073446273804,
0.22275198996067047,
0.015517693012952805,
0.19233544170856476,
0.5953586101531982,
0.005007466301321983,
0.07148829102516174,
... |
def _ make _ enc ( self, block, planes, blocks, share _ planes = 8, stride = 1, nsample = 16 ) : encoder _ inputs = [ layers. input ( shape = ( 3 ) ), layers. input ( shape = ( self. in _ planes ) ), layers. input ( shape = ( 0, ), dtype = tf. int64 ) ] x = transitiondown ( self. in _ planes, planes * block. expansion,... | [
0.7870742678642273,
0.35838639736175537,
0.6229506134986877,
0.7668851613998413,
-0.703620195388794,
0.6562339067459106,
0.6408696174621582,
0.004195072688162327,
-0.7661982774734497,
0.2206098735332489,
-0.1150737926363945,
-0.6916496157646179,
-0.21396175026893616,
0.034575022757053375,
... |
async def test _ form ( hass, smarttub _ api ) : result = await hass. config _ entries. flow. async _ init ( domain, context = { " source " : config _ entries. source _ user } ) assert result [ " type " ] = = " form " assert result [ " errors " ] = = { } with patch ( " homeassistant. components. smarttub. async _ setup... | [
-0.2147093266248703,
0.45949041843414307,
0.7063812613487244,
0.20077528059482574,
0.7018300890922546,
-0.5841372013092041,
0.04212159290909767,
-0.10503175109624863,
0.27615952491760254,
-0.42783650755882263,
-0.49947619438171387,
0.23812298476696014,
0.6417162418365479,
0.212680786848068... |
def get _ fi _ subset _ exstracs ( full _ path, i, instance _ label, class _ label, filter _ poor _ features ) : scores = [ ] # to be filled in, in filted dataset order. data _ name = full _ path. split ('/') [ - 1 ] if os. path. exists ( full _ path + " / multisurf / pickledforphase4 / " ) : # if multisurf was done pr... | [
-0.2587239444255829,
-0.15968263149261475,
0.6773831844329834,
-0.21079306304454803,
-0.04200226441025734,
-0.38683000206947327,
0.49885714054107666,
-0.045015450567007065,
0.0989544466137886,
0.6087844967842102,
0.016659120097756386,
-0.13550101220607758,
0.2446030229330063,
0.29568576812... |
def read _ link ( filename, sheet, num _ link ) : book = xlrd. open _ workbook ( filename ) sheet = book. sheet _ by _ name ( sheet ) # sheet = book. sheet _ by _ index ( 0 ) # open the first sheet in the book origin = sheet. col _ values ( 1, 1, num _ link + 1 ) destination = sheet. col _ values ( 2, 1, num _ link + 1... | [
-0.8116453289985657,
-0.6376585960388184,
0.5132263898849487,
-0.15110701322555542,
0.39760667085647583,
0.35055479407310486,
-0.4846969246864319,
1.2078195810317993,
-0.6825212836265564,
0.06774774938821793,
-0.08298319578170776,
0.4941198229789734,
-0.023166462779045105,
-0.6142508983612... |
def test _ check ( ) : test _ obj = uvtest ( ) assert test _ obj. check ( ) | [
0.25442957878112793,
0.4438386857509613,
0.11999686062335968,
1.5709967613220215,
0.8806041479110718,
0.8518690466880798,
0.8100810050964355,
0.6228154301643372,
0.12685026228427887,
-0.6328782439231873,
0.20405805110931396,
-0.3157062232494354,
-0.5407516956329346,
-0.027620548382401466,
... |
def amount ( self ) : return self. _ played | [
0.3102948069572449,
-0.6588442325592041,
0.6227203607559204,
-0.2630397379398346,
-0.04714756831526756,
0.7068176865577698,
1.3093358278274536,
-0.9076511859893799,
0.8385769128799438,
-0.135090634226799,
-0.38344353437423706,
0.48537614941596985,
0.298269122838974,
-0.0190623477101326,
... |
def test _ list _ alumno _ con _ anio _ lectivo _ no _ numerico ( self ) : self. client. force _ authenticate ( user = self. user _ admin ) response = self. client. get ( f " / api / alumnos / list /? anio _ lectivo = x " ) self. assertequal ( response. status _ code, status. http _ 400 _ bad _ request ) self. asserteq... | [
0.3646697998046875,
-0.42803075909614563,
0.5094883441925049,
0.14942243695259094,
0.4868295192718506,
1.5636954307556152,
-1.686335802078247,
-0.409769743680954,
-0.021435651928186417,
-0.2466193437576294,
-0.6520425081253052,
0.649948239326477,
0.7774669528007507,
0.18651270866394043,
... |
def test _ add _ step ( self ) : pass | [
0.07123886048793793,
0.5642428398132324,
0.24828630685806274,
1.440666913986206,
0.9828504920005798,
0.9887655377388,
0.11188104003667831,
-0.267985075712204,
-0.7293341159820557,
-1.8666409254074097,
-0.7088581323623657,
-0.6964796781539917,
-0.9299013018608093,
1.4437333345413208,
-0.3... |
def _ nodelistfromsource ( self, value ) : tree = _ generatetree ( " < x > " + value + " < / x > " ) return tree. children [ 0 ]. children | [
-0.9891932010650635,
0.8824466466903687,
0.4198773205280304,
-0.6429315805435181,
-1.2619096040725708,
-0.13557380437850952,
-0.28982648253440857,
0.21022821962833405,
0.881693422794342,
0.939226508140564,
-1.0658799409866333,
-0.38911983370780945,
0.7035501599311829,
0.4249454736709595,
... |
def affect _ docs ( documents, language, cursor ) : print " documents count = ", len ( documents ) offset = 0 jointext = list ( ) boundaries = dict ( ) for doc in documents : text = doc. get _ text ( ) id = doc. get _ id ( ) length = len ( text ) boundaries [ id ] = ( offset, length ) jointext. append ( text ) offset +... | [
0.3735591471195221,
-0.9019344449043274,
0.9191639423370361,
-0.8500416278839111,
-0.010851914063096046,
0.3505710959434509,
0.7190402746200562,
0.3104002773761749,
-0.24048122763633728,
0.43949344754219055,
-0.19036158919334412,
-0.565201461315155,
-0.4621303677558899,
0.6698498129844666,... |
def write _ to _ csv ( filename, chan ) : stats = chanstats [ chan ] with open ( filename, mode ='a ', newline ='' ) as channel _ stats : chan _ writer = csv. writer ( channel _ stats ) try : chan _ writer. writerow ( [ chan, stats ['group'], stats ['resolution'], stats ['fps'], stats ['bitrate'], stats ['atype'], stat... | [
-0.12509293854236603,
-0.1302150934934616,
0.4425561726093292,
-0.5473129153251648,
0.6871627569198608,
-0.15840744972229004,
-0.218705415725708,
-0.6584929823875427,
-0.024572642520070076,
-0.4189961552619934,
-0.07926923036575317,
0.9985418915748596,
0.26664334535598755,
0.70313107967376... |
def _ _ eq _ _ ( self, other ) : if not isinstance ( other, matchalliance ) : return false return self. _ _ dict _ _ = = other. _ _ dict _ _ | [
-0.10308977961540222,
-0.9641386270523071,
0.9819486737251282,
-0.24976782500743866,
-0.04005279764533043,
0.18179592490196228,
0.11945811659097672,
-0.29869139194488525,
1.9768341779708862,
0.08395788073539734,
-0.8953457474708557,
-0.32446396350860596,
-0.14950411021709442,
-0.3028371334... |
def test _ can _ get _ branch ( self ) : api _ call ( self, " post ",'/ branch / create ', dict ( city = " london ", postcode = " e1w 3ss ", capacity = 5 ), 200 ) json _ response = api _ call ( self, " get ",'/ branch / get ', dict ( id = 1 ), 200, true ) self. assertequal ( json _ response ['city'],'london') self. ass... | [
0.18851405382156372,
0.3842746615409851,
0.8450095057487488,
0.3545474708080292,
0.8551994562149048,
0.605354368686676,
-0.5800312757492065,
0.19671745598316193,
-0.748702347278595,
-0.9285947680473328,
-0.6624919772148132,
0.7568807601928711,
-0.5126442313194275,
0.2851182222366333,
0.9... |
def solve ( l ) - > int : m, a = l [ 0 ] for n, b in l [ 1 : ] : x = solve _ mod _ eq ( a, m, b, n ) a = x m = m * n return a | [
-1.2966793775558472,
0.6957100629806519,
0.4198378920555115,
0.3595896065235138,
0.3610699772834778,
-0.9110207557678223,
0.6635887622833252,
0.2711774706840515,
0.32175445556640625,
0.0019498110050335526,
-1.073615550994873,
-1.4060035943984985,
-0.8349826335906982,
1.0508700609207153,
... |
def restore _ func ( ) : try : self. clowder _ user, self. clowder _ pass, self. clowderspace = old _ un, old _ pw, old _ space self. sensors. base = sensor _ old _ base self. sensors. station = old _ station if added _ station and sitename and sitename in stations : del stations [ sitename ] except exception as ex : l... | [
-0.7439582347869873,
-0.5907637476921082,
0.4080757796764374,
-0.11133503168821335,
0.004285967908799648,
-0.1923990100622177,
0.3852786123752594,
-0.43455201387405396,
0.24684713780879974,
0.048876628279685974,
0.24718207120895386,
0.11462745070457458,
-0.17175190150737762,
0.170991256833... |
def send _ command ( self, command, arguments = [ ], immediate = false ) : line =''. join ( [ command ] + arguments ) +'\ n'if not immediate : self. staged _ script. append ( line ) else : self. run _ script ( [ line ] ) | [
-0.2746206223964691,
-0.23578687012195587,
0.44267815351486206,
0.5358865261077881,
0.2911795377731323,
0.6623175144195557,
-0.45926761627197266,
0.40038979053497314,
-0.6384004354476929,
0.9545158743858337,
-0.1895686686038971,
1.0122275352478027,
-0.6030741930007935,
0.5373446345329285,
... |
def find _ padding ( generator ) : comparator = 0 for array in generator : if array. shape [ 0 ] > comparator : comparator = array. shape [ 0 ] else : continue return int ( comparator ) | [
-0.21367596089839935,
0.030091948807239532,
0.7281164526939392,
-0.21605439484119415,
-0.4264489710330963,
-0.18553555011749268,
0.831068754196167,
-0.0528150275349617,
-0.10955947637557983,
0.03033500164747238,
0.5310395359992981,
-0.3313525319099426,
-0.5069670677185059,
2.28165936470031... |
def index ( self ) : content = jsonify ( { " guestbook " : [ { " id " : book. guestbookid, " name " : book. author, " message " : book. message, " isguest " : book. userid = = 1, " admincomment " : book. admincomment, " createdat " : book. created, " updatedat " : book. updated, } for book in guestbook. query. order _ ... | [
-0.9512470364570618,
-0.9231802821159363,
0.5661372542381287,
0.9955918192863464,
0.3670235574245453,
0.5348571538925171,
0.45960378646850586,
-0.5482364892959595,
-1.041082739830017,
0.7596719264984131,
-0.5930418372154236,
0.45786428451538086,
-0.6653228402137756,
0.056782059371471405,
... |
def format ( self, use _ prefix = true, use _ gene = true, use _ counsyl = false ) : if self. kind = ='c': allele ='c.'+ self. format _ cdna ( ) elif self. kind = ='p': allele ='p.'+ self. format _ protein ( ) elif self. kind = ='g': allele ='g.'+ self. format _ genome ( ) else : raise notimplementederror ( " not imple... | [
0.056866955012083054,
-0.5013049244880676,
0.688581645488739,
0.1354789286851883,
-0.2299724817276001,
0.09429164230823517,
-0.6989888548851013,
0.5875346660614014,
-0.08780129253864288,
0.6169098615646362,
1.0366027355194092,
1.3114650249481201,
0.2574921250343323,
0.5610061883926392,
0... |
def varianza ( n ) : suma1 = 0 suma2 = 0 for _ in xrange ( n ) : mazo = range ( 1, 101 ) # lista de 100 cartas random. shuffle ( mazo ) # desordena el mazo # chequeo todo el mazo para ver si hay algun'exito ', de ser asi lo # lo sumamos. exito = sum ( [ mazo [ i - 1 ] = = i for i in xrange ( 1, 101 ) ] ) suma1 + = exit... | [
-0.22525086998939514,
-0.08006688207387924,
0.468961626291275,
0.289333313703537,
-0.348531037569046,
0.20326058566570282,
0.3491760492324829,
-0.07652167975902557,
0.797537624835968,
0.2788989245891571,
-0.6498234272003174,
0.38861510157585144,
0.4914081394672394,
0.13753312826156616,
-... |
def _ make _ traceable _ instancemethod ( unbound _ function, logger ) : # functions have a _ _ get _ _ method ; they can act as descriptors proxy = _ functiontracingproxy ( unbound _ function, logger ) @ wraps ( unbound _ function ) def autologging _ traced _ instancemethod _ delegator ( self _, * args, * * keywords )... | [
-0.1667667180299759,
0.00947203766554594,
1.0806621313095093,
-0.8460386395454407,
-0.202519953250885,
-0.04416234791278839,
0.3439442813396454,
0.03156711161136627,
0.6140140891075134,
-0.2624657452106476,
0.11853162199258804,
0.40913745760917664,
0.47215259075164795,
0.007463490124791861... |
def scatter ( seq : int, m : int ) - > list [ int ] : # special case to avoid calling int ('', 2 ) if seq. bit _ length ( ) < m : return [ ( seq > > i ) & 1 for i in range ( m ) ] bits = format ( seq, " b " ) res = [ ] offset = ( len ( bits ) - 1 ) % m for i in range ( m ) : start = ( offset - i ) % m res. append ( int... | [
-0.9232348203659058,
0.0041060373187065125,
0.5682623386383057,
0.32688790559768677,
-1.2407476902008057,
0.02875998057425022,
0.15117886662483215,
0.6339007019996643,
0.5910437107086182,
1.3374812602996826,
-0.7562450170516968,
0.32551074028015137,
-0.7130527496337891,
0.34273332357406616... |
async def create _ task ( self, task : task, return _ on = " preprocessing ", timeout = none ) - > mythicresponse : url = " { } { } : { } / api / v { } / tasks / callback / { } ". format ( self. _ http, self. server _ ip, self. _ server _ port, self. _ server _ api _ version, task. callback. id if isinstance ( task, ta... | [
-0.1993570327758789,
0.27484583854675293,
1.0793832540512085,
0.20858123898506165,
0.45685112476348877,
-0.6156675815582275,
-0.009582363069057465,
0.2066143900156021,
-0.252153217792511,
0.5502592921257019,
-0.5624364614486694,
0.012454455718398094,
0.4918419122695923,
1.2009938955307007,... |
def maximum _ value ( lim, items ) : cache = { } items. sort ( key = lambda item : item ['value'], reverse = false ) # sorts items in ascending order by value def subproblem ( lim, i ) : if len ( items ) = = 0 : return 0 if lim < = 0 : return 0 if ( lim, i ) in cache : return cache [ ( lim, i ) ] item = items [ i ] ite... | [
0.5826261043548584,
-0.061467669904232025,
0.8810548782348633,
0.4463525414466858,
-0.5798859000205994,
0.25839558243751526,
-0.29788151383399963,
0.1302812248468399,
-0.014716013334691525,
0.4760104715824127,
-0.43986284732818604,
-0.422929584980011,
-0.5851494669914246,
-0.61633557081222... |
def create ( self ) : os. makedirs ( self. _ path, exist _ ok = true ) | [
0.3892775774002075,
0.10757901519536972,
0.3948974609375,
0.1388118416070938,
0.9795559048652649,
1.0197863578796387,
1.275949239730835,
-0.09866687655448914,
-0.4382762908935547,
-1.3267910480499268,
-0.3204367160797119,
-0.6164546608924866,
0.15422584116458893,
-0.26552149653434753,
-0... |
def structural _ variant _ hg19 ( testapp, project, institution ) : item = { " project " : project [ " @ id " ], " institution " : institution [ " @ id " ], " chrom " : " 5 ", " start " : 123445, " end " : 234556, " sv _ type " : " dup ", " hg19 _ chr " : " 5 ", " hg19 _ start " : 123456, " hg19 _ end " : 234567, } ret... | [
0.4354168772697449,
-0.22360806167125702,
0.3937130570411682,
0.11203184723854065,
0.6837137937545776,
0.3162096440792084,
0.6683091521263123,
-0.20240700244903564,
-0.21261680126190186,
0.4160277247428894,
-0.7158255577087402,
0.7876567840576172,
-0.9319260120391846,
-1.424748182296753,
... |
def randomwindow ( side, fl, xs, ys, zs, floorheight, fixed = none ) : res = [ ] if fixed : # - - determine the number of windows, their origin and side if side = = 0 or side = = 2 : w = { } w ['width'] = fixed [ 0 ] w ['height'] = fixed [ 1 ] maxwindows = fixed [ 2 ] woriginy = ( fl - 1 ) * floorheight + fixed [ 3 ] n... | [
-0.6121404767036438,
0.08956672996282578,
0.9081343412399292,
0.029336394742131233,
-1.1725959777832031,
-0.057514116168022156,
0.941176176071167,
0.8150522708892822,
0.032856348901987076,
0.402890682220459,
-0.8708594441413879,
0.04196235537528992,
-0.6139339804649353,
1.3462145328521729,... |
def test _ is _ token _ oov ( self ) - > none : doc1 = self. nlp ( " we're number one " ) # " number " isn't in the table... self. asserttrue ( self. px. is _ token _ oov ( doc1 [ 2 ] ) ) #... but " one " is self. assertfalse ( self. px. is _ token _ oov ( doc1 [ 3 ] ) ) | [
-0.5885381102561951,
0.35304784774780273,
0.3021465837955475,
1.351089358329773,
0.054033055901527405,
0.6667009592056274,
-0.5287145972251892,
-0.05711115524172783,
0.4798828363418579,
0.10136330872774124,
-0.2694474458694458,
-0.37289512157440186,
0.14813542366027832,
-0.4291277825832367... |
def frequency ( self ) : return self. currentfrequency | [
-0.13150723278522491,
-0.9780986905097961,
0.21813681721687317,
0.23527087271213531,
0.1418595314025879,
-0.45006194710731506,
0.6231692433357239,
-0.1834184229373932,
-0.20017245411872864,
-1.2187576293945312,
0.7702154517173767,
-0.059199120849370956,
-0.7746334075927734,
0.2467173188924... |
def candidates ( base, match _ ext ) : chop = len ( base ) + 1 for ( dirpath, dirnames, filenames ) in os. walk ( base ) : for filename in filenames : qualified = path. join ( dirpath, filename ) ( name, ext ) = path. splitext ( qualified ) if ext in match _ ext : relative = name [ chop : ] if not is _ dotfile ( relati... | [
-0.110385462641716,
-1.4219269752502441,
1.0855271816253662,
0.22383509576320648,
-1.2147631645202637,
0.3401031196117401,
0.4089817404747009,
0.41664567589759827,
-0.17882664501667023,
-0.033063728362321854,
-0.3170223832130432,
-0.05688468739390373,
-0.6074047088623047,
0.111249007284641... |
def clip _ coords ( boxes : list [ int ], img _ shape : tuple [ int ] ) - > none : boxes [ :, 0 ]. clip ( 0, img _ shape [ 1 ], out = boxes [ :, 0 ] ) # x1 boxes [ :, 1 ]. clip ( 0, img _ shape [ 0 ], out = boxes [ :, 1 ] ) # y1 boxes [ :, 2 ]. clip ( 0, img _ shape [ 1 ], out = boxes [ :, 2 ] ) # x2 boxes [ :, 3 ]. cl... | [
-0.9706771969795227,
-0.39390063285827637,
0.533294677734375,
0.1957395225763321,
-0.446030855178833,
0.20304681360721588,
-0.028909830376505852,
-0.5370244383811951,
-0.5429727435112,
0.7539112567901611,
-0.2661917805671692,
-0.16471576690673828,
1.2344330549240112,
-0.673302412033081,
... |
def create _ item ( tif _ href, additional _ providers = none ) : with rio. open ( tif _ href ) as f : tags = f. tags ( ) band _ tags = f. tags ( 1 ) bounds = f. bounds # item id item _ id = os. path. basename ( tif _ href ). replace ( '. tif ','' ) # bounds geom = mapping ( box ( bounds. left, bounds. bottom, bounds. ... | [
0.10894636064767838,
-0.16822369396686554,
0.6094082593917847,
-0.07637004554271698,
0.6924709677696228,
0.8398858308792114,
0.18667887151241302,
0.021583445370197296,
-0.8567855358123779,
0.8158245086669922,
-0.1728336066007614,
0.3167669475078583,
0.19528985023498535,
-0.3926862776279449... |
def list _ images ( self, include _ details, absolutize _ url ) : images _ store = self. image _ store. create _ image _ store ( self. tenant _ id ) images = [ ] for image in images _ store : if self. region _ name! = " iad " and isinstance ( image, onmetalimage ) : continue if include _ details : images. append ( imag... | [
-0.04665176570415497,
0.009234449826180935,
0.27701956033706665,
-0.5934562087059021,
-0.4406704008579254,
-0.4935374855995178,
-1.1761915683746338,
0.8345717787742615,
0.8501208424568176,
0.6026838421821594,
0.4051883816719055,
0.4141791760921478,
0.27452340722084045,
0.7323481440544128,
... |
def has _ good _ alignment ( self, all _ alignments, group1, group2 ) : db _ id1 = group1 ['db _ id'] db _ id2 = group2 ['db _ id'] if db _ id1 not in all _ alignments : self. logger. debug ( " splitting % s % s : no alignments for % s ", group1 ['id'], group2 ['id'], group1 ['id'] ) return false alignments = all _ ali... | [
-0.8878673315048218,
-0.28900304436683655,
0.8093366622924805,
0.014138869941234589,
-0.8153743743896484,
0.27465662360191345,
-0.6429839730262756,
0.2790360748767853,
-0.5063617825508118,
0.05832767114043236,
0.383363276720047,
-0.14591582119464874,
-0.761762797832489,
0.20274609327316284... |
def get _ now ( format = " % d % m % y _ % h % m % s " ) : return get _ now ( format ) | [
-0.9201269745826721,
-0.07238995283842087,
0.7651511430740356,
-0.10772348195314407,
-0.4176127016544342,
-0.7305182814598083,
-1.4765127897262573,
-0.581960141658783,
-1.1332921981811523,
0.23937664926052094,
-0.3811889886856079,
0.3776004910469055,
0.4405665993690491,
0.07020904868841171... |
def extractx509user ( author ) : if author : try : cnre, eare = extractx509user. _ regexps except attributeerror : import re cnre = re. compile ( ur'/ cn = ( [ ^ / ] + ) ', re. i ) eare = re. compile ( ur'/ emailaddress = ( [ ^ / ] + ) ', re. i ) extractx509user. _ regexps = ( cnre, eare ) author = author. decode ('utf... | [
0.1684689074754715,
-0.34413060545921326,
0.5824958086013794,
0.20504099130630493,
-0.6962717771530151,
-0.558302640914917,
0.6601703763008118,
0.38222843408584595,
1.2241270542144775,
0.5107741355895996,
-0.21213990449905396,
-0.16989213228225708,
-0.5807428956031799,
-0.8751930594444275,... |
def _ _ cleanup _ node ( self, session, node ) : \ # pylint : disable = no - self - use # ensure session node cache entry is removed for failed launch self. addhostapi. clear _ session _ node ( node ) for nic in node. nics : session. delete ( nic ) session. delete ( node ) | [
-0.32568350434303284,
-0.3261242210865021,
0.2811105251312256,
-0.3732985854148865,
-0.24490979313850403,
0.07174869626760483,
0.017337795346975327,
-0.18305379152297974,
1.1899572610855103,
0.4440028667449951,
0.04351771995425224,
0.012156464159488678,
0.3921297490596771,
-0.0044768797233... |
def count _ no _ goals _ received ( ) : if no _ goals _ received = = { } : create _ team _ list ( rounds [ " 1 " ], no _ goals _ received ) for match _ round in rounds : for match in rounds [ match _ round ] : if match [ " guest score " ] = = 0 : no _ goals _ received [ match [ " host " ] ] [ i _ total ] + = 1 no _ goa... | [
-0.2612169682979584,
0.1307775229215622,
0.5715446472167969,
-0.7101470232009888,
0.36742034554481506,
0.3322688639163971,
0.3194476068019867,
0.3079371452331543,
-1.1775919198989868,
-0.019217003136873245,
-0.4376648962497711,
-0.40508702397346497,
0.29100823402404785,
0.37556201219558716... |
def float _ positive ( string ) : try : floating _ point = float ( string ) except valueerror : raise argparse. argumenttypeerror ('{ } cannot be converted into float. '. format ( string ) ) if floating _ point < 0. : raise argparse. argumenttypeerror ('{ } is not positive. '. format ( floating _ point ) ) else : retur... | [
0.7154313921928406,
-0.6922268867492676,
0.7839469313621521,
0.3582625389099121,
0.14177872240543365,
0.9740932583808899,
-0.3275240361690521,
0.008388916030526161,
-1.531986951828003,
-0.43392500281333923,
0.9683176279067993,
-0.029350420460104942,
-0.41415876150131226,
0.2131984382867813... |
def approx _ date _ diff ( start, end, mode = " e ", as _ years = false ) : if not end : end = datetime. date. today ( ) elif not hasattr ( end,'date') : print end. split ('-') end = approximatedate ( * map ( int, end. split ('-') ) ). date ( mode ) if not start : start = datetime. date. today ( ) elif not hasattr ( st... | [
-0.6432289481163025,
0.18735085427761078,
0.7261128425598145,
-0.4374677240848541,
-0.7506951689720154,
0.4538484811782837,
-0.5913208723068237,
0.3412618339061737,
-0.3015667796134949,
0.5370817184448242,
-0.13265492022037506,
0.6688715219497681,
0.18495400249958038,
0.5612884759902954,
... |
def show _ parents ( tensor : tensor, all _ nodes = [ ] ) - > none : assert isinstance ( tensor, tensor ), valueerror ( f " expected \ type tensor got, { type ( tensor ) } " ) for node in tensor. _ parent _ nodes : all _ nodes. append ( node ) if tensor. _ parent _ nodes = = [ ] : for member in reversed ( all _ nodes )... | [
0.576731264591217,
0.6842334270477295,
0.7046007513999939,
0.14707903563976288,
0.0679863691329956,
0.35451406240463257,
0.3982298970222473,
-0.5760878920555115,
-0.5003780722618103,
0.2506701350212097,
0.3770647943019867,
1.0183627605438232,
0.29680925607681274,
0.272204726934433,
-0.03... |
def routing _ vpcs ( self ) - > pulumi. output [ sequence ['outputs. hubroutingvpc'] ] : return pulumi. get ( self, " routing _ vpcs " ) | [
-0.6370219588279724,
0.09926764667034149,
0.7111899256706238,
0.7075375318527222,
1.9623409509658813,
0.8246756792068481,
0.3938902020454407,
-0.3083561956882477,
0.9326979517936707,
0.4196579158306122,
-0.7310193777084351,
0.02934163063764572,
0.30498194694519043,
-1.1692668199539185,
-... |
def create _ user _ query _ response ( username, password, first _ name, last _ name, email, role ) : is _ user _ exist _ query _ response = \ _ db _ objects. graph _ db ( ). aqlquery ( user _ exist _ or _ not ( username ) ). response if is _ user _ exist _ query _ response ['result'] [ 0 ] is true : query _ response =... | [
-0.3567810654640198,
-0.2549079656600952,
0.4475918114185333,
0.0501558855175972,
0.11554986238479614,
0.008648316375911236,
0.4279899001121521,
-0.7197166085243225,
0.03750597685575485,
0.9052822589874268,
0.1946268230676651,
-0.8407449126243591,
-0.3180120885372162,
-0.4069412648677826,
... |
def sample ( self, num _ samples ) : raise notimplementederror | [
0.3070448338985443,
-0.41852033138275146,
0.33816471695899963,
0.3047674000263214,
0.13273170590400696,
0.24742959439754486,
0.32847097516059875,
-0.3030502200126648,
0.44877222180366516,
-0.5219420194625854,
0.23387938737869263,
-0.09760863333940506,
-0.09165611863136292,
-0.1106443777680... |
def check _ tweet ( self, tweet : str, tweet _ id : str ) - > none : print ( tweet ) logging. info ( f " new formula : { tweet } " ) parsed _ formula = str ( self. parser. parse ( tweet ) ) print ( parsed _ formula ) logging. info ( f " translation : { parsed _ formula } " ) proved _ byte = subprocess. check _ output (... | [
0.8768520951271057,
-0.349607914686203,
0.44582173228263855,
0.06472225487232208,
1.019736647605896,
-0.22978679835796356,
-0.5100603699684143,
0.09330012649297714,
-0.3582739233970642,
0.04077068343758583,
0.05711900815367699,
0.4247562289237976,
-0.49510490894317627,
0.6331592202186584,
... |
def assert _ starts _ with ( actual, desired ) : try : assert len ( actual ) > = len ( desired ) except baseexception : print ( " actual string too short ( { } < { } characters ) ". format ( len ( actual ), len ( desired ) ) ) print ( " actual : { } ". format ( actual ) ) raise try : return assert _ string _ equal ( st... | [
0.19547821581363678,
-0.5451188683509827,
0.7329223155975342,
-0.6108683347702026,
0.6118215322494507,
-0.1268334686756134,
-0.35115665197372437,
-0.8485402464866638,
-0.11784156411886215,
-0.006611956749111414,
0.914308488368988,
1.6057932376861572,
-0.07759764790534973,
-0.11138818413019... |
def query ( self, query, check _ return _ code = true, use _ tempfile = false ) : if use _ tempfile : with tempfile. namedtemporaryfile ( prefix ='tmp - hive - query - ', suffix = '. hiveql') as f : logger. debug ('writing hive query to tempfile { 0 }. '. format ( f. name ) ) f. write ( query ) f. flush ( ) out = self.... | [
-0.22498266398906708,
0.00884771067649126,
0.6903544664382935,
0.4835500121116638,
0.25322386622428894,
-0.05647030845284462,
0.09218387305736542,
-0.1528104543685913,
0.18850038945674896,
0.649340033531189,
0.7493773102760315,
-0.4947720170021057,
-0.27946025133132935,
0.00634592259302735... |
def can _ be _ used ( self ) : return os. path. isdir ( self. path ) | [
-0.3977010250091553,
-0.22237670421600342,
0.6026332974433899,
0.6629952788352966,
0.09495630115270615,
0.12068226933479309,
1.3823227882385254,
0.059114787727594376,
0.2522628605365753,
-1.1096473932266235,
0.5950986742973328,
0.466846764087677,
-0.319418728351593,
-0.03685040399432182,
... |
def player _ amount ( self ) : return max ( set ( self. _ numbers _ of _ people ), key = self. _ numbers _ of _ people. count ) | [
0.09955713152885437,
-0.5344778299331665,
0.6068928241729736,
0.15187470614910126,
-0.04816233739256859,
0.06419951468706131,
0.4524903893470764,
0.002312920056283474,
0.01023218035697937,
0.18836632370948792,
0.2896990478038788,
-0.2859867215156555,
-0.099699966609478,
0.01488753780722618... |
def flatten ( array : iterable [ union [ v, iterable [ v ] ] ] ) - > list [ v ] : return flattendepth ( array ) | [
-0.9946874976158142,
0.22420310974121094,
0.27514880895614624,
1.2026000022888184,
-0.009114794433116913,
0.7613731026649475,
0.20752529799938202,
-0.071082204580307,
1.2739672660827637,
0.17801181972026825,
0.3417447507381439,
0.45587602257728577,
-0.49157655239105225,
1.199791669845581,
... |
def start ( wiimote, idx, configfile ) : if idx > 4 : print ( " cannot handle more than 4 wiimotes. " ) return cfg = pywiiconfig ( configfile ) mac, name = wiimote [ 0 : 2 ] wiimote _ o = wiimote ( mac, name, idx, cfg ) wiimote _ o. daemon = true wiimote _ o. start ( ) return wiimote _ o | [
-0.3809354901313782,
-0.019584260880947113,
0.3638177514076233,
-0.5876269936561584,
-0.46976304054260254,
-0.3507353365421295,
-0.1406838297843933,
0.11509445309638977,
-0.4452878534793854,
-0.3556619882583618,
-0.7768040299415588,
-0.37456214427948,
-0.7854977250099182,
-0.68350529670715... |
def _ int _ to _ char ( x ) : return chr ( x + 64 ) | [
-0.9607102274894714,
-0.18361444771289825,
0.20254476368427277,
-0.4142611026763916,
-0.6082568168640137,
0.4745647609233856,
-0.36270952224731445,
-1.2438876628875732,
0.4431558847427368,
0.017483575269579887,
0.14099764823913574,
0.5652369260787964,
1.0065803527832031,
-1.258379697799682... |
def test _ cat _ version ( self ) : bucket _ uri = self. createversionedbucket ( ) # create 2 versions of an object. uri1 = self. createobject ( bucket _ uri = bucket _ uri, contents = b'data1 ', gs _ idempotent _ generation = 0 ) uri2 = self. createobject ( bucket _ uri = bucket _ uri, object _ name = uri1. object _ n... | [
0.0573316253721714,
-0.17406831681728363,
0.6864063739776611,
0.34559762477874756,
0.6181349754333496,
0.7639467716217041,
-0.4394734501838684,
-0.19110339879989624,
-0.7353824973106384,
-0.45925021171569824,
-0.09098521620035172,
0.24142256379127502,
0.731865644454956,
0.2392486035823822,... |
def mapview ( request ) : date _ picker _ initial = datepicker ( name ='date1 ', display _ text ='initial date ', autoclose = true, format ='mm d, yyyy ', start _ date ='1 / 1 / 2000 ', start _ view ='decade ', today _ button = false, initial ='january 1, 2018') date _ picker _ final = datepicker ( name ='date2 ', disp... | [
0.47562921047210693,
-0.09489219635725021,
1.0077916383743286,
-0.20453494787216187,
-0.9718904495239258,
0.7971456050872803,
0.4842279255390167,
-0.17040130496025085,
-0.11071373522281647,
-0.16844426095485687,
0.2904893457889557,
0.48201510310173035,
0.7796444296836853,
-0.07435810565948... |
def cleanup ( self ) : track _ history = self. options [ " track _ history " ] if track _ history : self. _ design _ hdl. close ( ) | [
0.944426417350769,
0.4989835321903229,
0.38680166006088257,
0.5757551789283752,
0.3419152498245239,
1.0811249017715454,
1.3136779069900513,
-0.5041844248771667,
-0.06123565137386322,
-0.9082216620445251,
0.8382580280303955,
0.26832315325737,
0.46894583106040955,
0.6905031800270081,
0.178... |
def load ( cls, basename, * * kwargs ) : sess = kwargs. get ('session ', kwargs. get ('sess ', tf. session ( ) ) ) model = cls ( ) with open ( basename + '. saver') as fsv : saver _ def = tf. train. saverdef ( ) text _ format. merge ( fsv. read ( ), saver _ def ) checkpoint _ name = kwargs. get ('checkpoint _ name ', b... | [
0.24005380272865295,
-0.4686163067817688,
0.7953943610191345,
0.5238893032073975,
-0.22457511723041534,
0.24852539598941803,
0.6275182962417603,
0.00428177323192358,
-0.37035176157951355,
0.24035243690013885,
-0.5977550745010376,
-0.5152261257171631,
0.9204370975494385,
-0.2312037050724029... |
def add _ field _ option ( self, field _ id, context _ id, * * kwargs ) : data = self. _ mandatory _ variable ( kwargs, ['options'] ) return self. _ raw _ execution ( path = f'/ field / { field _ id } / context / { context _ id } / option ', method ='post ', data = data ) | [
-0.8229058384895325,
0.7425829768180847,
0.4225364327430725,
0.10215714573860168,
1.5649633407592773,
0.2733876705169678,
-0.5715033411979675,
-0.7805757522583008,
0.5322444438934326,
0.04483688622713089,
-0.45918381214141846,
0.38706910610198975,
-1.0745413303375244,
-0.4132223129272461,
... |
def get _ ip ( ) : p1 = popen ( [ " iwconfig " ], stdout = pipe ) iwconfig = p1. communicate ( ) [ 0 ] if iwconfig. _ _ contains _ _ ( " unassociated " ) : lcd. write _ line ( 0, 0, " unassociated " ) else : # change ipconfig to ifconfig p2 = popen ( [ " ipconfig " ], stdout = pipe ) ifconfig = p2. communicate ( ) [ 0 ... | [
-0.34402117133140564,
-0.5566579103469849,
0.766861617565155,
0.3427150845527649,
-0.4691632390022278,
-0.123759426176548,
0.1347896307706833,
0.45157667994499207,
-0.765430212020874,
0.6329038143157959,
0.40820664167404175,
0.2944960594177246,
-1.1262880563735962,
-0.09943993389606476,
... |
def go ( self, state, direction ) : state1 = vector _ add ( state, direction ) return state1 if state1 in self. states else state | [
-0.031137686222791672,
0.6679620742797852,
0.46935197710990906,
-0.1943693459033966,
0.40690872073173523,
0.07868723571300507,
-0.1637304425239563,
-0.5777698755264282,
0.7452691793441772,
-0.05692388862371445,
0.18326698243618011,
0.6517138481140137,
-0.17237204313278198,
-0.7354172468185... |
def _ walk _ config ( config, modules, f, prefix ='', required = true ) : for module in modules : name = getattr ( module,'config _ name ', none ) if name is none : raise yakonfig. programmererror ('{! r } must provide a config _ name '. format ( module ) ) new _ name ='{ } { } '. format ( prefix, name ) if required : ... | [
-0.5693217515945435,
0.07798115164041519,
0.6456325054168701,
-0.1795550137758255,
-0.7246670722961426,
-0.10438162088394165,
0.6709277033805847,
0.30662912130355835,
-0.5372099280357361,
0.33424851298332214,
-0.18789967894554138,
0.099052794277668,
0.4279593825340271,
1.028269648551941,
... |
def try _ running ( self, func, error, args = [ ] ) : try : return func ( * args ) except exception, e : self. report ( error, " error " ) # self. report ( str ( e. message ), " " ) if debug : traceback. print _ exc ( ) # sys. exit ( ) | [
-0.16386421024799347,
0.41489899158477783,
0.5076417326927185,
0.1693725287914276,
0.7618409991264343,
0.1863694190979004,
0.20499412715435028,
0.06843941658735275,
-0.5617362260818481,
-0.44506317377090454,
1.025336503982544,
0.00701706949621439,
-0.8088362216949463,
-0.3671838343143463,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.