text stringlengths 25 2.19k | embedding listlengths 768 768 |
|---|---|
def filenames ( self ) : return [ os. path. basename ( path ) for path in self. filepaths ] | [
0.5173787474632263,
-1.174312949180603,
0.4734742343425751,
0.6888994574546814,
0.763316810131073,
0.4389802813529968,
0.08820174634456635,
1.0387306213378906,
0.24650979042053223,
0.33913829922676086,
-0.14978119730949402,
-0.37043407559394836,
0.3462388217449188,
0.366787850856781,
-1.... |
def stop ( self ) : self. microblaze. write _ blocking _ command ( stop _ timer ) | [
-0.41888627409935,
0.36550867557525635,
0.12579888105392456,
1.1303426027297974,
0.5535102486610413,
0.5301727652549744,
1.2048919200897217,
0.8657479882240295,
-1.5777161121368408,
0.6482533812522888,
-0.7561489343643188,
0.2379380166530609,
-1.1872773170471191,
0.16177095472812653,
0.4... |
def vgg11 _ bn ( pretrained = false, * * kwargs ) : model = vgg ( make _ layers ( cfg ['a'], batch _ norm = true ), * * kwargs ) if pretrained : model. load _ state _ dict ( model _ zoo. load _ url ( model _ urls ['vgg11 _ bn'] ) ) return model | [
0.2736891806125641,
0.4866499900817871,
0.41195806860923767,
1.1460222005844116,
-0.1073300763964653,
0.6047070026397705,
0.15686887502670288,
0.9339324831962585,
0.0034325679298490286,
0.2978340685367584,
-0.09971583634614944,
0.13814570009708405,
-0.1312069296836853,
0.5524811744689941,
... |
def process _ tls _ uni _ data ( self, data ) : self. dec _ tls _ buffer + = data data = " " if self. tunnel _ chaff = = none : self. tunnel _ chaff = loopingcall ( self. chaffling ) self. tunnel _ chaff. start ( const. tls _ send _ chaff _ interval ) while true : ( self. dec _ tls _ buffer, http _ resp, resp _ body, u... | [
-0.04157806560397148,
-0.02146008610725403,
0.9510814547538757,
-0.5853638052940369,
-0.14255328476428986,
0.2999667525291443,
-0.0017103382851928473,
-0.2523665130138397,
0.4767196476459503,
-0.7057234048843384,
-0.2205042541027069,
-0.5592867732048035,
-0.43890783190727234,
0.24128547310... |
def deeplabv3 _ resnetd152b _ voc ( pretrained _ backbone = false, classes = 21, aux = true, * * kwargs ) : backbone = resnetd152b ( pretrained = pretrained _ backbone, ordinary _ init = false, bends = ( 3, ) ). features del backbone. final _ pool return get _ deeplabv3 ( backbone = backbone, classes = classes, aux = a... | [
-0.27582302689552307,
1.1338047981262207,
0.543715238571167,
0.043481819331645966,
0.1226143166422844,
0.026120027527213097,
0.04684673249721527,
-0.3341995179653168,
-0.06725015491247177,
-0.641838014125824,
0.2364668995141983,
1.0046896934509277,
-0.10856176167726517,
-0.6024225354194641... |
def append _ line ( self, output ='', scroll _ to = true ) : v = self. output _ view v. set _ read _ only ( false ) edit = v. begin _ edit ( ) v. insert ( edit, v. size ( ), output +'\ n') v. end _ edit ( edit ) v. set _ read _ only ( true ) end _ point = v. size ( ) if scroll _ to and v. visible _ region ( ). size ( )... | [
0.10215360671281815,
0.09591824561357498,
0.8886310458183289,
-0.05230208486318588,
-0.553486704826355,
0.2555045187473297,
0.4200538098812103,
-0.479433536529541,
0.36346903443336487,
-0.8153460621833801,
0.0893603041768074,
0.29960113763809204,
0.28293174505233765,
0.5305553078651428,
... |
def importrepeatsfromucsc ( infile, outfile ) : # scrum note - why are we access ing ucsc here # is this a legacy thing? andreas? would it be better to access biomart? pipelineucsc. getrepeatsfromucsc ( dbhandle = connecttoucsc ( ), repclasses = p. aslist ( params [ " ucsc _ repeattypes " ] ), outfile = outfile ) | [
0.09910638630390167,
0.21946945786476135,
0.4131554365158081,
0.4269183278083801,
0.3969060182571411,
0.128207266330719,
0.7039417028427124,
0.24863223731517792,
-0.29457223415374756,
0.1450187712907791,
-0.43690410256385803,
0.7394866943359375,
0.25880926847457886,
-0.8124503493309021,
... |
def _ create _ mocked _ ayla ( connect = none ) : mocked _ ayla = magicmock ( ) type ( mocked _ ayla ). sign _ in = propertymock ( side _ effect = connect ) type ( mocked _ ayla ). async _ sign _ in = propertymock ( side _ effect = connect ) return mocked _ ayla | [
-0.6186644434928894,
-1.0389235019683838,
0.49581512808799744,
0.10374706983566284,
0.5570799708366394,
-0.3393614590167999,
-0.0201407540589571,
-0.10587365180253983,
0.28030580282211304,
-0.14286476373672485,
0.9472107291221619,
-0.5245146155357361,
0.10991723090410233,
-0.53899407386779... |
def scd _ capabilities ( ) - > tuple [ str, int ] : return flask. jsonify ( capabilitiesresponse ( capabilities = [ capability. basicstrategicconflictdetection, capability. flightauthorisationvalidation, capability. highpriorityflights, ] ) ) | [
-0.047339409589767456,
-0.2911109924316406,
0.3744546175003052,
1.3159838914871216,
0.5746558308601379,
-1.2172820568084717,
-0.5608340501785278,
0.015450950711965561,
0.5156821012496948,
-0.3113938868045807,
-0.4825704097747803,
-0.015829002484679222,
0.46198832988739014,
0.33905434608459... |
def modified _ by ( self ) : url = self. _ data. get ('related ', { } ). get ('modified _ by') return self. _ tower. _ get _ object _ by _ url ('user ', url ) # pylint : disable = protected - access | [
0.12722817063331604,
-0.03201519697904587,
0.4230822026729584,
0.2281266152858734,
-0.0018878368427976966,
-0.4342837631702423,
0.8055727481842041,
-0.12929357588291168,
0.17500817775726318,
-0.6185937523841858,
0.127901092171669,
0.14436578750610352,
-0.13220523297786713,
-0.2641580104827... |
def cast ( self, features : features, new _ fingerprint ) - > " dataset " : dataset = copy. deepcopy ( self ) if sorted ( features )! = sorted ( dataset. _ data. column _ names ) : raise valueerror ( f " the columns in features ( { list ( features ) } ) must be identical " f " as the columns in the dataset : { dataset.... | [
-0.9442098140716553,
-0.18245768547058105,
0.39357513189315796,
0.048777591437101364,
0.10391002148389816,
0.5273053050041199,
-0.37925270199775696,
0.14921016991138458,
0.3517327308654785,
-0.35691380500793457,
0.42789560556411743,
0.5900797247886658,
-0.21985165774822235,
-0.330072879791... |
async def voices ( self ) - > voicesiterable : espeak _ cmd = [ self. espeak _ prog, " - - voices " ] _ logger. debug ( espeak _ cmd ) proc = await asyncio. create _ subprocess _ exec ( * espeak _ cmd, stdout = asyncio. subprocess. pipe ) stdout, _ = await proc. communicate ( ) voices _ lines = stdout. decode ( ). spli... | [
0.5238524675369263,
-0.44546836614608765,
0.617109477519989,
0.1554965376853943,
1.0500410795211792,
-0.3268950581550598,
-1.325228214263916,
-0.47486674785614014,
-1.0933034420013428,
0.3889411687850952,
0.1515742838382721,
0.37202438712120056,
0.3947521150112152,
0.5203540325164795,
-0... |
def init _ env ( ) : crop1 = cropsettings ( name = " thumb200 ", height = 200, width = 200 ) crop2 = cropsettings ( name = " thumb400 ", height = 400, width = 400 ) crop3 = cropsettings ( name = " home400 ", height = 0, width = 400 ) crop4 = cropsettings ( name = " home600 ", height = 0, width = 600 ) crop5 = cropsetti... | [
-0.2334170788526535,
0.28844279050827026,
1.2054059505462646,
0.6596055626869202,
0.44308361411094666,
-0.05247541144490242,
0.8252754807472229,
-0.3671020567417145,
0.739781379699707,
0.8608421683311462,
-0.692499041557312,
-0.24382393062114716,
0.5161267518997192,
0.08682576566934586,
... |
def head ( self, url, expected _ response = none, auth = none, * * kwargs ) : pnote ( " perform a http head ", " info " ) try : response = self. req. head ( url, auth = auth, * * kwargs ) except exception as e : status, response = self. catch _ expection _ return _ error ( e, url ) else : status = self. report _ respon... | [
-0.9720773100852966,
-0.48586320877075195,
0.6479846835136414,
0.5107242465019226,
0.5138018131256104,
0.5939838290214539,
0.050900768488645554,
-0.13440917432308197,
1.0416258573532104,
0.029898900538682938,
-0.052715301513671875,
0.48054516315460205,
-0.4693436324596405,
-0.7129580378532... |
def pop ( self, * args, * * kwargs ) : # real signature unknown pass | [
0.010652593336999416,
-0.0301363468170166,
0.3670397102832794,
0.3905581533908844,
0.34535521268844604,
0.1965952217578888,
0.45612162351608276,
0.011576229706406593,
-0.6733222007751465,
0.6942505240440369,
-0.44352132081985474,
-0.2506614923477173,
-0.3064206838607788,
-0.376539081335067... |
def _ affine _ layers ( self ) : layers = [ ] act = get _ activation ( self. hparams. activation ) in _ features = self. hparams. latent _ dim for width, dropout in reversedzip ( self. hparams. affine _ widths, self. hparams. affine _ dropouts ) : layers. append ( nn. linear ( in _ features = in _ features, out _ featu... | [
-0.05272657051682472,
0.09701050817966461,
0.4725174605846405,
0.6114016771316528,
0.419267475605011,
-0.4902679920196533,
-0.3253787159919739,
-0.2290230244398117,
0.2382441908121109,
0.25752031803131104,
0.2452009618282318,
-0.3551040291786194,
0.14606207609176636,
0.8697687387466431,
... |
def sign _ staking _ transaction ( transaction _ dict, private _ key ) : assert isinstance ( transaction _ dict, dict ), " only dictionaries are supported " # ordereddict is a subclass # chain _ id missing = > results in rlp decoding error for gaslimit assert " chainid " in transaction _ dict, " chainid missing " asser... | [
-0.3651541769504547,
-0.5692067742347717,
0.6083608865737915,
-0.3542713224887848,
-0.2839202880859375,
-0.025109773501753807,
-0.2846318185329437,
-0.05123768746852875,
-0.3470684885978699,
0.9984874725341797,
-0.05364394187927246,
-0.20962166786193848,
-0.10770241916179657,
-0.2335034459... |
def add _ service _ name _ binding ( svc, provider, name ) : if provider not in _ service _ name _ spec : _ service _ name _ spec [ provider ] = { } _ service _ name _ spec [ provider ] [ svc ] = name | [
-0.7373242378234863,
0.19901083409786224,
0.32135412096977234,
-0.5172610878944397,
-1.101080298423767,
0.4108545780181885,
-0.24722108244895935,
-0.20792268216609955,
0.2051849067211151,
0.757194459438324,
-0.8829345703125,
0.5050889849662781,
0.16788634657859802,
0.763960599899292,
0.9... |
def dicom _ read _ and _ write ( self, plotflag : object = false ) - > object : # get test data fulldicomfile = pydicom. dcmread ( self. pathtofile ) # export metadata into output text file to see all entries with open ( self. pathtofile + ". txt ", " w " ) as f : print ( fulldicomfile, file = f ) # assign image data i... | [
0.17560288310050964,
-0.2309740036725998,
0.6700729727745056,
-0.2700611352920532,
-0.02383369766175747,
-0.2679625153541565,
1.2966673374176025,
0.3641347289085388,
-0.42068707942962646,
0.029612325131893158,
0.4601767361164093,
0.0796087458729744,
0.4029642641544342,
-0.3860277533531189,... |
def mousereleaseevent ( self, event ) : self. item = self. itemat ( event. scenepos ( ), qtransform ( ) ) if event. button ( ) = = qt. leftbutton and hasattr ( self. item,'tile') : self. clearselection ( ) self. item. setcursor ( qt. arrowcursor ) if self. state in [ " setup ", " play " ] : collisions = self. item. col... | [
-0.21114180982112885,
-0.0023687996435910463,
0.5980736017227173,
0.03837462514638901,
0.22137320041656494,
-0.47494983673095703,
0.6061728596687317,
-0.2914847731590271,
0.9514161944389343,
0.5063236951828003,
-0.7164739370346069,
-0.5672628879547119,
0.4185071885585785,
0.162544131278991... |
def location ( self, * args ) : return _ topods. topods _ shape _ location ( self, * args ) | [
-0.6460541486740112,
-0.6102341413497925,
0.4660244286060333,
-0.5187328457832336,
0.5292138457298279,
0.5400222539901733,
1.58316171169281,
-0.5950257182121277,
-0.3622860312461853,
0.1410403847694397,
0.08404489606618881,
0.05753643065690994,
0.45976772904396057,
-0.6451054811477661,
-... |
def summarize ( self, fc _ name, fields, where _ clause = none ) : summary _ name = self. _ make _ layer _ name ( ) summary _ path ='in _ memory / % s'% ( summary _ name, ) with self. make _ layer ( fc _ name ) as layer _ name : if where _ clause : arcpy. selectlayerbyattribute _ management ( layer _ name, where _ clau... | [
-0.572097897529602,
0.9764570593833923,
0.6738373637199402,
-0.8611025810241699,
-0.71840500831604,
-0.9442774653434753,
0.2522742450237274,
-0.061449456959962845,
-0.5056681632995605,
0.2046048641204834,
-0.5077904462814331,
0.0046893092803657055,
0.7065379619598389,
-0.2873188555240631,
... |
def get _ disc _ scores ( request ) : if request. method = ='get': if'state'not in request. get or'county'not in request. get or'state _ abbr'not in request. get : return httpresponse ( status = 400 ) else : state = request. get ['state'] state _ abbr = request. get ['state _ abbr'] county = request. get ['county'] eli... | [
-0.35139980912208557,
0.06940385699272156,
1.0305131673812866,
0.20139609277248383,
1.157994270324707,
0.30535614490509033,
0.43189671635627747,
-0.5998194217681885,
-0.5376173853874207,
-0.4184485673904419,
-0.2568333148956299,
0.4545114040374756,
0.27852824330329895,
0.7214785218238831,
... |
def newgeneration2 ( self ) : # for i in range ( 0, len ( self. population ) ) : # " " " # depending of your experiment you need to use the most suitable algorithms for : # 1. select two candidates # 2. apply crossover # 3. apply mutation # " " " ia, ib = self. randomselection ( ) # * * * * single child implementation ... | [
-0.6575624942779541,
-0.5650315284729004,
0.6470788717269897,
1.287771463394165,
-0.16461028158664703,
0.9453145861625671,
0.9439135789871216,
0.12132617831230164,
0.19685056805610657,
0.5402469038963318,
-0.8103609681129456,
-0.15385468304157257,
-0.12007021903991699,
0.4047435224056244,
... |
def _ _ init _ _ ( self, quantity, tol ) : super ( haltwhen, self ). _ _ init _ _ ( ) if type ( quantity ) = = str : self. quantity = quantity else : raise typeerror ('haltwhen ( quantity, tol ) ; quantity must be a string for a monitored quantity') self. tol = tol | [
0.6306645274162292,
-0.21093779802322388,
0.6260789036750793,
0.6408753991127014,
-0.38023295998573303,
0.07707495987415314,
-0.5962697267532349,
-0.7308302521705627,
-0.5091862082481384,
0.14461477100849152,
-0.35884493589401245,
-0.14099009335041046,
-0.05630895122885704,
-0.761248171329... |
def get _ occurred _ log _ probs ( self, tokens : list [ str ] ) - > list [ tuple [ float, str ] ] : log _ probs = self. get _ log _ probs ( tokens ) out = [ ] for idx, token in enumerate ( tokens [ 1 : ] ) : out. append ( ( float ( log _ probs [ idx, self. token _ to _ id ( token ) ] ), token ) ) return out | [
0.1223142072558403,
-0.6704253554344177,
0.48468223214149475,
-0.14229589700698853,
0.49436166882514954,
-0.4630788266658783,
-0.8334418535232544,
0.028438640758395195,
-0.4229338467121124,
0.31791800260543823,
-0.48022347688674927,
0.41100382804870605,
-0.1921600103378296,
0.0032961589749... |
def main ( ) : black = ( 0, 0, 0 ) red = ( 255, 0, 0 ) blue = ( 0, 0, 255 ) turtle = turtle ( ) turtle. hideturtle ( ) # draw the stick figure face = circle ( 100, 0, 10, turtle, black ) body = line ( 100, - 10, 100, - 80, turtle, black ) arms = line ( 80, - 40, 120, - 40, turtle, black ) leftleg = line ( 100, - 80, 80... | [
0.15974560379981995,
0.5449362993240356,
0.9860081076622009,
-0.3084833025932312,
0.28037261962890625,
0.13876256346702576,
0.31516486406326294,
-0.14117200672626495,
-0.7038805484771729,
-0.38279104232788086,
-0.10309036821126938,
0.2565355896949768,
0.4237041473388672,
-0.095787249505519... |
def addword ( self, word ) : node = self. root for c in word : node = node. setdefault ( c, { } ) node [ none ] = none | [
0.003628119360655546,
0.8056880235671997,
0.16317465901374817,
0.06667017191648483,
0.3567792475223541,
0.1752055436372757,
-0.2978662848472595,
0.27669960260391235,
0.4745674729347229,
0.06055520102381706,
-0.7471923232078552,
0.4448215365409851,
-0.9862902760505676,
1.7968816757202148,
... |
def train _ single ( pos _ pkl, neg _ pkl ) : highest _ acc = 0 with open ( pos _ pkl ) as f : x _ pos = pkl. load ( f ) y _ pos = pkl. load ( f ) print x _ pos. shape, y _ pos. shape with open ( neg _ pkl ) as f : x _ neg = pkl. load ( f ) y _ neg = pkl. load ( f ) print x _ neg. shape, y _ neg. shape x, y = np. vstac... | [
-0.18872866034507751,
0.03999270871281624,
0.7679368257522583,
-0.048318419605493546,
0.2626793384552002,
0.04010285064578056,
0.29165953397750854,
0.7829928994178772,
-0.5147964954376221,
-0.09750180691480637,
-0.9798011779785156,
-0.5233743190765381,
0.4436934292316437,
0.190993219614028... |
def penalized _ logistic _ regression ( y, tx, w, lambda _ ) : pred = sigmoid ( tx. dot ( w ) ) loss = calculate _ loss ( y, tx, w, pred ) + lambda _ * np. linalg. norm ( w, 2 ) * * 2 gradient = calculate _ gradient ( y, tx, w, pred ) + 2 * lambda _ * w hessian = calculate _ hessian ( y, tx, w, pred ) + 2 * lambda _ re... | [
0.36201950907707214,
-0.16065147519111633,
0.7235138416290283,
-1.0132488012313843,
-0.38779938220977783,
-0.6398927569389343,
-0.699099600315094,
-0.5498190522193909,
-0.7939946055412292,
0.8081433773040771,
-0.39033544063568115,
0.44319963455200195,
-0.1904272437095642,
-0.20566150546073... |
def test _ func _ called _ only _ until _ succeeds ( self ) : err = valueerror val = mock. sentinel attrs = dict ( _ _ name _ _ ='f') # f succeeds on 3rd try f = mock. mock ( side _ effect = [ err, err, val. a, val. b ], * * attrs ) ret = retried ( 3 ) ( f ) ( ) self. assertequal ( ret, val. a ) self. assertequal ( f. ... | [
0.3672487139701843,
0.5300489664077759,
0.41124340891838074,
0.5065227746963501,
0.6378630995750427,
0.6459214687347412,
-0.36239928007125854,
-0.03231484442949295,
-0.15048687160015106,
-0.7226210236549377,
-0.09835762530565262,
0.29046252369880676,
0.2246057242155075,
0.3085175156593323,... |
def single ( self, seq = res + cal + trg + tok ) : cmdlist = [ ] cmdlist. append ( dtb. pg _ sync + 10 ) if ( seq & dtb. res ) > 0 : cmdlist. append ( dtb. pg _ resr + self. trc ) if ( seq & dtb. cal ) > 0 : cmdlist. append ( dtb. pg _ cal + self. tct ) if ( seq & dtb. trg ) > 0 : cmdlist. append ( dtb. pg _ trg + self... | [
-0.49502256512641907,
1.2598379850387573,
0.5993549227714539,
-0.14882303774356842,
0.43469858169555664,
0.2657459080219269,
0.33872637152671814,
0.6832962036132812,
-0.2906971275806427,
0.5138645172119141,
0.10971088707447052,
-0.5691558718681335,
-0.2153191715478897,
0.5243861079216003,
... |
def branch ( state : state ) - > list [ state ] : people = list ( state. variable ) if len ( people ) = = 0 : return [ ] person = people. pop ( ) out = [ ] s1 = state ( state. fixed, people ) s2 = state ( state. fixed + ( person, ), people ) if s1. fixed _ cost < = budget : out. append ( s1 ) if s2. fixed _ cost < = bu... | [
0.012177894823253155,
0.23248350620269775,
0.49452146887779236,
1.3194605112075806,
-0.531103253364563,
0.6478718519210815,
-0.27659979462623596,
0.23193733394145966,
0.6858012080192566,
0.3367556929588318,
-0.37990161776542664,
0.28398776054382324,
-0.8632173538208008,
0.19046127796173096... |
def get _ tickers ( self, quote _ ticker : str, * * kwargs ) - > tuple [ list [ ticker ], dict ] : raise notimplementederror | [
-1.1440917253494263,
0.11141528934240341,
0.2944687008857727,
0.14351476728916168,
0.48040950298309326,
-0.8001803755760193,
-0.14443886280059814,
-0.0514063835144043,
-0.4193795919418335,
0.6698188781738281,
-1.4903430938720703,
-0.10433196276426315,
0.12032774835824966,
1.249462008476257... |
def best _ first _ graph _ search ( root _ node, cost _ function ) : cost _ function = memoize ( cost _ function,'f') visit _ queue = priorityqueue ('min ', cost _ function ) node = root _ node visit _ queue. append ( node ) created _ count = 1 visit _ count = 0 visited = deque ( [ node. hashable ( ) ] ) s = time. time... | [
0.9162421822547913,
0.13819943368434906,
0.72799152135849,
-0.04454483836889267,
0.14155985414981842,
-0.8155251145362854,
0.33643388748168945,
0.013387150131165981,
-0.7289209961891174,
-0.057247139513492584,
0.1031876802444458,
0.9410768747329712,
-0.026391349732875824,
-0.17825463414192... |
def results ( ) : st. write ( " # results " ) st. text ( " this page allows to explore the analysis results. \ nalphapept uses the hdf container format which can be accessed here. " ) selection = st. selectbox ( " file selection ", ( " previous results ", " enter file " ) ) if selection = = " previous results " : resul... | [
0.8798920512199402,
0.7601012587547302,
0.7240301966667175,
0.19789524376392365,
0.24681656062602997,
-0.3269096612930298,
1.4148529767990112,
-0.19015328586101532,
-0.3610498607158661,
-0.03682990372180939,
0.8220552206039429,
0.1450522392988205,
0.5147547125816345,
0.22947250306606293,
... |
def parula _ map ( ) : from matplotlib. colors import linearsegmentedcolormap cm _ data = [ [ 0. 2081, 0. 1663, 0. 5292 ], [ 0. 2116238095, 0. 1897809524, 0. 5776761905 ], [ 0. 212252381, 0. 2137714286, 0. 6269714286 ], [ 0. 2081, 0. 2386, 0. 6770857143 ], [ 0. 1959047619, 0. 2644571429, 0. 7279 ], [ 0. 1707285714, 0. ... | [
1.3653531074523926,
-0.9095522165298462,
1.3769716024398804,
-0.647697925567627,
-0.11292622983455658,
1.437620759010315,
1.4619629383087158,
0.735690712928772,
0.21171031892299652,
-0.27054721117019653,
-0.21521005034446716,
0.3604583144187927,
0.119809091091156,
0.07856767624616623,
0.... |
def children ( self ) : return [ node ( self. graph, n ) for n in self. graph. redis. zrange ('{ } : cn '. format ( self. name ), 0, - 1 ) ] | [
-0.43816402554512024,
0.3479236662387848,
0.31957462430000305,
0.4446104168891907,
0.32368743419647217,
0.14482183754444122,
0.07061534374952316,
-0.17921167612075806,
0.3240537941455841,
-0.28911006450653076,
-1.271469235420227,
0.1510266661643982,
-0.17634201049804688,
-0.336838603019714... |
def read _ daily _ reports ( dir _ in, file _ pattern, rename _ col ) : list _ file = glob. glob ( dir _ in + " / " + file _ pattern ) print ( f'total daily reports : { len ( list _ file ) }') # read files in loop list _ df = list ( ) for file in list _ file : temp _ df = pd. read _ csv ( file ) temp _ df = rename _ df... | [
-0.4063447117805481,
0.036307480186223984,
0.7955095767974854,
0.34305742383003235,
1.244317889213562,
0.20273296535015106,
0.9303587079048157,
0.5574736595153809,
-0.6775540709495544,
0.15945608913898468,
0.7009829878807068,
-0.43074727058410645,
0.03470294922590256,
-0.06315173208713531,... |
def render ( obj, vertices, frame, color = false ) : # vertices = obj. vertices # scale _ matrix = np. eye ( 3 ) * 3 # h, w = model. shape for face in obj. faces : face _ vertices = face [ 0 ] points = np. array ( [ vertices [ vertex - 1 ] for vertex in face _ vertices ] ) points = np. array ( [ p [ 0 ] for p in points... | [
0.3606700897216797,
0.19809480011463165,
0.8532846570014954,
0.31838318705558777,
-0.15829873085021973,
0.77732253074646,
-0.11332657188177109,
-0.47023674845695496,
0.6342607140541077,
1.1731256246566772,
-0.4878900647163391,
0.06645895540714264,
-0.31343361735343933,
0.1500038206577301,
... |
def potential _ func ( self, q ) : # return - np. log ( target _ func ( q ) ) result = - self. log _ target _ func ( q ) return result | [
-0.7796018719673157,
-0.5805031657218933,
0.5471426248550415,
-0.004416964016854763,
0.04701210930943489,
-0.08570509403944016,
-0.6175570487976074,
-0.736822247505188,
0.9845187067985535,
-0.6403654217720032,
0.692837119102478,
1.4315134286880493,
0.2571716010570526,
-0.16097190976142883,... |
def sparse _ tuple _ from ( sequences, dtype = np. int32 ) : indices = [ ] values = [ ] for n, seq in enumerate ( sequences ) : indices. extend ( zip ( [ n ] * len ( seq ), xrange ( len ( seq ) ) ) ) values. extend ( seq ) indices = np. asarray ( indices, dtype = np. int64 ) values = np. asarray ( values ) #, dtype = d... | [
-1.0844786167144775,
-0.09248598664999008,
0.7352060675621033,
-0.35863131284713745,
-0.5818262100219727,
-0.652320921421051,
0.19007495045661926,
-0.2569902837276459,
0.3768511116504669,
0.9752780795097351,
-0.25947877764701843,
-0.5814400911331177,
0.2131575345993042,
-0.3197189569473266... |
def delete _ tasks ( self, task ) : return self. delete _ tasks _ async ( task ). get _ result ( ) | [
-0.6179836392402649,
1.458200216293335,
0.48708125948905945,
1.2926281690597534,
0.37717586755752563,
-1.0877015590667725,
0.22174113988876343,
-0.19279350340366364,
0.6191168427467346,
0.16995102167129517,
-0.7496902942657471,
-0.19358696043491364,
-0.17721788585186005,
0.3306971490383148... |
def train2 ( self ) : for epoch in range ( self. epochs ) : print " epoch : ", epoch self. train ( self. d ) self. alpha - = 0. 002 # decrease the learning rate self. min _ alpha = self. alpha # fix the learning rate, no decay | [
-0.38019222021102905,
-0.4688548147678375,
0.3746799826622009,
0.2821558713912964,
0.18822096288204193,
0.13153544068336487,
0.1881466656923294,
1.1664015054702759,
-0.7552540898323059,
-0.9019672870635986,
-0.30679720640182495,
0.5066403150558472,
0.8044456243515015,
1.1210076808929443,
... |
def resource _ group _ name ( self ) - > pulumi. output [ str ] : return pulumi. get ( self, " resource _ group _ name " ) | [
0.4097437560558319,
0.5457355380058289,
0.20104125142097473,
-0.6553590893745422,
-0.9241964221000671,
0.6605879664421082,
0.1244087740778923,
-0.08988843113183975,
-0.5165223479270935,
0.28039926290512085,
0.9054484963417053,
0.5088787078857422,
0.32193171977996826,
-0.15310561656951904,
... |
def check _ privileges _ for _ command ( cmd, opts, tenant _ uuid, datastore _ url, privileges ) : result = none if not privileges : result = error _ code _ to _ message [ errorcode. privilege _ no _ privilege ] return result cmd _ need _ mount _ privilege = [ cmd _ attach, cmd _ detach ] if cmd in cmd _ need _ mount _... | [
0.07006782293319702,
0.20231766998767853,
0.8699051141738892,
0.09327751398086548,
0.3640621602535248,
-0.6784240007400513,
-0.3062494695186615,
-0.11721217632293701,
0.6614259481430054,
-0.21631795167922974,
0.9973395466804504,
0.7086583971977234,
-0.06400296092033386,
0.5946536064147949,... |
def conditional _ mean ( self, gp ) : return self. gp _ link. transf ( gp ) | [
-0.8087491393089294,
0.023038484156131744,
0.19902156293392181,
0.06616663187742233,
-0.34205806255340576,
0.5488150715827942,
0.3337548077106476,
0.07028179615736008,
0.3604464828968048,
0.34750503301620483,
0.3087393343448639,
0.7927466034889221,
-0.8511743545532227,
0.15094555914402008,... |
def delrepeatedreservation ( self, id, filename = " scripts / addremovereservation / deleterepeatedres. xml " ) : print " remove repeated reservation, id : " + str ( id ) self. loadxmlfile ( filename ) self. modifyxml ( " cancel _ repeated ", " repeated _ id ", id ) self. send ( " in progress " ) | [
-0.2569214403629303,
-0.024131696671247482,
0.372699499130249,
0.07264308631420135,
-0.8387427926063538,
0.11013462394475937,
-0.0326586551964283,
1.2971478700637817,
0.1081080436706543,
0.5459011197090149,
-0.4974963068962097,
0.2628546953201294,
-0.7701640725135803,
-0.21545998752117157,... |
def generate _ predictions ( inventory _ of _ estimators, features ) : # generate predictions. inventory _ of _ probabilities = [ ] for ensemble in inventory _ of _ estimators : inventory _ of _ probabilities. extend ( [ ensemble. predict _ proba ( x = features ) ] ) # reshape probabilities. table _ of _ probabilities ... | [
-1.4826864004135132,
-0.857666552066803,
0.6878913640975952,
1.04205322265625,
0.47030022740364075,
-0.29338791966438293,
0.20319540798664093,
0.7275304794311523,
-0.903414785861969,
0.6026995182037354,
0.23676609992980957,
0.102647565305233,
0.6158724427223206,
-0.10181162506341934,
0.6... |
def notify _ event _ owners _ to _ input _ metrics ( ) : start = datetime. combine ( get _ date ( ), datetime. min. time ( ) ) end = datetime. combine ( get _ date ( ), datetime. max. time ( ) ) events = event. objects. filter ( end _ _ range = [ start, end ], has _ new _ metrics = true, eventmetricoutcome _ _ outcome ... | [
0.09679631143808365,
0.3516847789287567,
0.6875365972518921,
1.0459908246994019,
0.16053883731365204,
0.4009043574333191,
0.39568445086479187,
-0.2465912103652954,
-1.0604490041732788,
0.5596444606781006,
-0.08292005956172943,
0.8181204199790955,
0.3123190701007843,
-0.2355491816997528,
... |
def init _ all _ storage _ paths ( ) : init _ default _ storage _ path ( ) init _ workflows _ storage _ path ( ) | [
0.03489293158054352,
0.09941526502370834,
0.21465986967086792,
2.3473246097564697,
1.1591137647628784,
0.476438969373703,
0.7935090065002441,
-0.7165959477424622,
-0.42494237422943115,
-0.09231063723564148,
-1.232745885848999,
-0.9062139391899109,
0.23046809434890747,
0.6483783721923828,
... |
def sha256 _ treehash ( sexp : clvmobject, precalculated : optional [ set [ bytes32 ] ] = none ) - > bytes32 : if precalculated is none : precalculated = set ( ) def handle _ sexp ( sexp _ stack : list [ clvmobject ], op _ stack : list [ op ], precalculated : set [ bytes32 ] ) - > none : sexp = sexp _ stack. pop ( ) if... | [
0.9240801334381104,
0.6826907992362976,
0.9432320594787598,
0.6858656406402588,
-0.8896833062171936,
0.025950966402888298,
0.826921284198761,
0.04683889448642731,
-0.0256169606000185,
0.040609635412693024,
-1.233108401298523,
0.4278048276901245,
0.0023594137746840715,
-0.26264792680740356,... |
def _ trygetimagesize ( blob ) : image = images. image ( blob _ key = str ( blob. key ( ) ) ) try : image. crop ( 0. 0, 0. 0, 1. 0, 1. 0 ) data = image. execute _ transforms ( output _ encoding = images. jpeg ) transformed _ image = images. image ( image _ data = data ) return transformed _ image. width, transformed _ ... | [
0.030788492411375046,
-0.12093078345060349,
0.9297170042991638,
-0.522907018661499,
-0.8367432951927185,
-1.5189975500106812,
-0.06311952322721481,
-0.2826065719127655,
0.6706644296646118,
0.8022541403770447,
-0.3669804036617279,
-0.6445721983909607,
-0.16524899005889893,
0.109657175838947... |
def fit ( self, data ) : x = data [ :, 0 ] y = data [ :, 1 ] # denom = ( x [ - 1 ] - x [ 0 ] ) # if denom = = 0 : # raise zerodivisionerror # k = ( y [ - 1 ] - y [ 0 ] ) / denom # m = y [ 0 ] - k * x [ 0 ] a = np. vstack ( [ x, np. ones ( len ( x ) ) ] ). t k, m = np. linalg. lstsq ( a, y, none ) [ 0 ] self. params = [... | [
0.5615805983543396,
-0.23059050738811493,
0.6701271533966064,
0.2987934947013855,
-0.19701752066612244,
0.10982570052146912,
-0.3446245491504669,
0.3187888562679291,
-0.12869074940681458,
-0.2066032886505127,
0.21629096567630768,
0.061881087720394135,
-0.3976720869541168,
0.382596969604492... |
def _ _ init _ _ ( self, curr _ from, curr _ to, amt ) : self. curr _ from = curr _ from self. curr _ to = curr _ to self. amt = amt | [
0.32401636242866516,
-1.346297025680542,
0.40660205483436584,
-0.12771371006965637,
-0.6453157067298889,
0.28153276443481445,
-0.04071161150932312,
0.21905657649040222,
-0.9076750874519348,
0.5050056576728821,
0.20685873925685883,
0.4504576623439789,
-0.33813944458961487,
-0.20346015691757... |
def main ( content, title = " ", classes = [ ] ) : md = markdown. markdown ( content ) return'< div class = " admonition { 0 } " > \ n '. format ( " ". join ( classes ) ) + \'< p class = " admonition - title " > { 0 } < / p > \ n '. format ( title ) + \'< p > { 0 } < / p > \ n '. format ( md ) + \'< / div > ' | [
0.17170560359954834,
0.3867368996143341,
0.7930276989936829,
-0.6585293412208557,
-0.298287570476532,
0.6439741849899292,
-0.9425424337387085,
-0.03834644332528114,
0.03583235666155815,
0.2972699999809265,
1.1000878810882568,
0.5727614164352417,
-0.3690893352031708,
0.5644699335098267,
-... |
def add _ view ( self, view, position = none, closable = true, floatable = true, floating = none ) : logger. debug ( " add view % s to gui. ", view. _ _ class _ _. _ _ name _ _ ) name = self. _ set _ view _ name ( view ) self. _ views. append ( view ) self. _ view _ class _ indices [ view. _ _ class _ _ ] + = 1 # get t... | [
0.006455705966800451,
0.752472460269928,
0.5413739681243896,
-0.32906192541122437,
-0.5595123767852783,
-0.03721541166305542,
0.48811373114585876,
-0.5631716251373291,
0.23643825948238373,
-1.640665888786316,
0.20032303035259247,
0.12070809304714203,
-0.21520371735095978,
0.710816681385040... |
def getnumberavailableimages ( ) : andor _ solis. getnumberavailableimages. restype = ctypes. c _ uint first = ctypes. c _ long ( ) last = ctypes. c _ long ( ) result = andor _ solis. getnumberavailableimages ( ctypes. byref ( first ), ctypes. byref ( last ) ) check _ status ( result ) return int ( first. value ), int ... | [
-1.170642375946045,
-0.18190185725688934,
0.522818386554718,
-0.0853104516863823,
0.17940697073936462,
-0.7045429944992065,
0.7050275206565857,
0.4819239675998688,
-0.3741941750049591,
0.30384549498558044,
-0.8570353984832764,
0.4383256435394287,
-0.07140114158391953,
0.8401190042495728,
... |
def filterfile _ to _ filtername ( filterfile ) : _ io = io ( ) if len ( np. atleast _ 1d ( filterfile ) ) = = 1 : return _ io. get _ filtername ( filterfile ) return [ _ io. get _ filtername ( filt ) for filt in np. atleast _ 1d ( filterfile ) ] | [
-0.38125064969062805,
-0.4777088165283203,
0.8083628416061401,
0.6591460704803467,
-0.25498679280281067,
0.39088964462280273,
0.5522202849388123,
-0.28099921345710754,
-0.38980427384376526,
1.0789819955825806,
-0.7505344152450562,
0.7342998385429382,
0.7180747389793396,
0.41461509466171265... |
def setmenu ( self, menu ) : chldn = self. main _ menu. get _ children ( ) if len ( chldn ) is not 0 : for chl in chldn : self. main _ menu. remove ( chl ) common. createmenuitemsfromview ( self. main _ menu, menu. items ) self. main _ menu. show ( ) | [
-0.15875574946403503,
0.2069060057401657,
0.5613692402839661,
0.8190950751304626,
0.14226743578910828,
0.2534664571285248,
-0.0725516676902771,
1.2261189222335815,
0.3145503103733063,
-0.4512253403663635,
-0.35609593987464905,
-0.44524887204170227,
-0.806240975856781,
1.1465566158294678,
... |
def get _ current _ user ( ) : return getattr ( _ thread _ locals,'user ', none ) | [
-0.34275463223457336,
-1.0240074396133423,
0.5067764520645142,
0.6246206760406494,
0.2203882783651352,
-0.297699511051178,
1.242639422416687,
-1.0112347602844238,
-0.5909307599067688,
-0.7880474925041199,
-0.04923228174448013,
0.5158677697181702,
-0.4621034860610962,
-0.686520516872406,
... |
def test _ create _ multiple _ alumno _ curso _ repetido ( self ) : self. client. force _ authenticate ( user = self. user _ admin ) alumno _ 1 = alumno. objects. get ( apellido = " 1 " ). pk alumno _ 2 = alumno. objects. get ( apellido = " 2 " ). pk curso = curso. objects. get ( nombre = " curso2 " ). pk anio _ lectiv... | [
-0.15811073780059814,
-0.3575969636440277,
0.6589273810386658,
0.10218388587236404,
0.9518473148345947,
1.0997973680496216,
-0.23725512623786926,
-0.026845693588256836,
-0.24138294160366058,
0.7072006464004517,
-1.4841976165771484,
0.49057814478874207,
0.8224213123321533,
0.153295069932937... |
def fit ( self, data ) : n _ samples = data. shape [ 0 ] # init data into embedded space data _ embedded = self. _ random _ state. randn ( n _ samples, self. _ n _ components ) # compute asymmetric probablity function in original / old space neighbour _ distances, neighbour _ idx = \ nearestneighbors ( n _ neighbors = ... | [
0.6509049534797668,
-0.09164846688508987,
0.6499781608581543,
0.03867143392562866,
-0.557807445526123,
1.3704861402511597,
0.1180814653635025,
0.11740068346261978,
0.33358240127563477,
-0.09300122410058975,
0.44776713848114014,
0.588791012763977,
-0.40689703822135925,
0.05180835723876953,
... |
def update _ position ( self, loc ) : # this ensures that the new value of the location is set before # any other updates take place. self. _ loc = loc super ( skewxtick, self ). update _ position ( loc ) | [
-0.6583787202835083,
-0.3412334620952606,
0.22405743598937988,
-0.2782474458217621,
-0.6152230501174927,
-0.43229836225509644,
0.5755805373191833,
0.10257504880428314,
0.15981937944889069,
0.37282609939575195,
-0.8264793753623962,
-0.14114783704280853,
0.5219188332557678,
0.346968322992324... |
def get _ goal _ state ( self ) : return self. handeye. get _ goal _ state ( ) | [
-1.5729217529296875,
0.05418332666158676,
0.6455209851264954,
1.067503571510315,
-0.7991318702697754,
0.058834753930568695,
-0.6051079034805298,
-0.4571770429611206,
-0.4123762249946594,
0.24651038646697998,
-0.23055048286914825,
-0.44136491417884827,
-0.14131669700145721,
0.19214887917041... |
def _ _ init _ _ ( self, config ) : self. vggmodel = config [ " vgg16model " ] self. model _ input _ size = config [ " modelinputsize " ] self. dataset = [ ] | [
0.2753959894180298,
0.6501665115356445,
0.20824244618415833,
0.5143749117851257,
0.1698876917362213,
0.14951588213443756,
-0.11530829221010208,
0.41843050718307495,
-0.40987396240234375,
0.41350093483924866,
-1.1160333156585693,
-0.01489315927028656,
0.26998528838157654,
0.6736119985580444... |
def _ _ init _ _ ( self, *, respect _ robots : bool = true ) - > none : self. _ robot _ parser : optional [ robotfileparser ] = none self. _ user _ agent = none self. _ session = none self. _ connected = false self. respect _ robots = respect _ robots | [
0.6237264275550842,
-0.020075686275959015,
0.5214734673500061,
0.3720482587814331,
-0.05733804404735565,
0.2063794732093811,
-0.1354605108499527,
0.39780840277671814,
-0.016663862392306328,
-0.5735094547271729,
-0.4745948612689972,
-0.32453155517578125,
-0.6395180225372314,
0.1951357275247... |
def execute _ row1 ( self, sql : str, * params ) - > dict [ str, any ] : cursor = self. _ _ conn. cursor ( as _ dict = true ) cursor. execute ( sql, * params ) rows = cursor. fetchall ( ) cursor. close ( ) n = len ( rows ) if n! = 1 : raise resultexception ('1 ', n, sql ) return rows [ 0 ] | [
-0.3798118233680725,
1.052529215812683,
0.5686837434768677,
1.0105388164520264,
-0.07115419954061508,
-0.4694672226905823,
-0.8027545213699341,
-0.6379899978637695,
-0.44964325428009033,
0.58249831199646,
0.5188103318214417,
0.12341133505105972,
0.13060817122459412,
0.8209453225135803,
-... |
def testsettaginstancewithsetvalue ( self ) : tagapi ( self. user ). create ( [ ( u'username / bar ', u'description') ] ) tag = gettags ( paths = [ u'username / bar'] ). one ( ) objectid = uuid4 ( ) self. store. commit ( ) with login ( u'username ', uuid4 ( ), self. transact ) as session : thriftvalue = createthriftval... | [
-0.15221714973449707,
0.2979857325553894,
0.40087592601776123,
-0.43998095393180847,
0.15304936468601227,
0.5128332376480103,
0.013886909931898117,
-0.6336652040481567,
-0.28376591205596924,
-0.21434050798416138,
-0.7871240973472595,
-0.0999186560511589,
0.4079318940639496,
0.4960460662841... |
async def _ subscribe _ to _ ra3 _ occupancy _ groups ( self ) : _ log. debug ( " subscribing to occupancy group ( ra3 : area ) status updates " ) try : response, _ = await self. _ subscribe ( " / area / status ", self. _ handle _ ra3 _ occupancy _ group _ status ) _ log. debug ( " subscribed to occupancygroup status "... | [
-0.18463003635406494,
0.23716935515403748,
0.23486509919166565,
-0.11867796629667282,
-0.22582826018333435,
-0.2054937183856964,
-0.5080515742301941,
-0.11504301428794861,
0.5256637334823608,
0.3957873284816742,
0.20521250367164612,
-0.2966953217983246,
-0.337037056684494,
0.31376984715461... |
def index ( ) : # lets make sure the user isn't already logged in if not check _ if _ user _ logged _ in ( ) : form = loginform ( ) # post : lets handle the login form submission if form. validate _ on _ submit ( ) : try : shopping _ list _ app. login ( form. email. data, form. password. data ) # store user's informati... | [
-0.237822026014328,
0.07789280265569687,
0.4139164388179779,
0.5209705233573914,
0.28451207280158997,
0.43353989720344543,
0.42895635962486267,
0.7393532991409302,
0.9679579734802246,
-0.696429967880249,
-0.05057067424058914,
0.03508517146110535,
0.24741490185260773,
0.2533101439476013,
... |
def get _ tlr _ files ( mpdir = " " ) : rootdir = ( mplogs _ dir / mpdir ). absolute ( ) try : return get _ tlr _ files _ cache [ rootdir ] except keyerror : pass logger. info ( " looking for tlr files in { } ". format ( rootdir ) ) tlrfiles = [ ] for root, dirs, files in os. walk ( rootdir ) : root = root. rstrip ( " ... | [
0.384115070104599,
-0.6867331266403198,
0.9454041719436646,
-0.41680243611335754,
-0.8805722594261169,
-0.49239417910575867,
0.0826658383011818,
-0.28619086742401123,
-0.011408680118620396,
0.6066071391105652,
0.05248838663101196,
-0.4229968190193176,
-0.06943438202142715,
0.96807336807250... |
def load _ module ( self, filename, module _ path, plugin _ type ) : logger. debug ( " adding defaults : ( filename : % s, module _ path : % s, plugin _ type : % s ", filename, module _ path, plugin _ type ) module = os. path. splitext ( filename ) [ 0 ] section = ". ". join ( ( plugin _ type, module. replace ( " _ def... | [
-0.28734081983566284,
0.030057484284043312,
0.5047056078910828,
-0.47730740904808044,
1.1829309463500977,
-0.0740475282073021,
-0.5666968822479248,
-0.40045166015625,
-0.4345862865447998,
0.5677043795585632,
-0.6155770421028137,
0.03535311296582222,
-0.14874744415283203,
0.4069145321846008... |
def _ init _ widget ( self ) - > noreturn : self. upload _ title = tk. label ( self, text ='upload autobus') self. upload _ button = tk. button ( self, text ='upload ', command = self. _ get _ path ) | [
-0.28360527753829956,
-0.18135888874530792,
0.5453804135322571,
-0.32793882489204407,
0.710372269153595,
0.4151538014411926,
0.0802825316786766,
0.4891319274902344,
-0.9007611274719238,
-0.297894686460495,
-0.8477882742881775,
0.17183679342269897,
0.25615447759628296,
0.6433603167533875,
... |
def plot _ all _ channels ( hostname : str, lidar _ port : int = 7502, n _ scans : int = 5 ) - > none : import matplotlib. pyplot as plt # type : ignore # [ doc - stag - display - all - 2d ] # take sample of n scans from sensor metadata, sample = client. scans. sample ( hostname, n _ scans, lidar _ port ) # initialize ... | [
0.5596628189086914,
0.4777847230434418,
0.8264309763908386,
-0.2544006407260895,
-1.328420639038086,
0.20214581489562988,
0.32458609342575073,
-0.8854637145996094,
-0.476500928401947,
-0.3001609742641449,
0.41971555352211,
0.6443380117416382,
0.5925445556640625,
0.5566582679748535,
1.069... |
def _ create _ spec _ template _ code _ server ( self, username, password ) - > client. v1podtemplatespec : template = client. v1podtemplatespec ( ) template. metadata = client. v1objectmeta ( labels = { " app " : self. app } ) name = self. _ generate _ workspace _ name ( ) container = client. v1container ( name = name... | [
-0.2765697240829468,
-0.45231059193611145,
0.7128459215164185,
-0.04290839284658432,
-0.06432318687438965,
0.3282809257507324,
-0.33981120586395264,
-0.31907203793525696,
-0.31057167053222656,
0.3312142491340637,
-0.44193482398986816,
0.5254597663879395,
-0.13192430138587952,
0.13681182265... |
def get _ droprate ( self, delta, src _ adr = none ) : # count number of drop packets in each time / delta start _ time = none output = [ ] drop _ ctr = 0 for packet in self. packets : if src _ adr is not none and packet [ 1 ]. src _ adr = = src _ adr : if packet [ 1 ]. abr = ='d': if start _ time is none : start _ tim... | [
-1.0937520265579224,
0.2382194995880127,
0.8368167281150818,
-0.34004950523376465,
-0.6868299841880798,
-0.3695068955421448,
0.014752590097486973,
-0.23959025740623474,
0.2624766230583191,
0.4941233694553375,
-0.2929249703884125,
-0.0332845076918602,
-0.6091058254241943,
0.9729676842689514... |
def test _ single _ survey _ package _ fail ( self, client, all _ survey _ packages ) : with pytest. raises ( castorexception ) as e : client. single _ survey _ package ( " 71c01598 - 4682 - 4a4c - 90e6 - 69c0bd38fake " ) assert str ( e. value ) = = " 404 surveypackage not found " | [
-0.7638111710548401,
0.9264299273490906,
0.4795011579990387,
0.42207494378089905,
0.4240123927593231,
1.2979923486709595,
0.5693765878677368,
0.06591638922691345,
0.5341749787330627,
0.30125710368156433,
-0.20182181894779205,
-0.3541282117366791,
-0.22143587470054626,
0.2362556904554367,
... |
def _ check _ einsum _ no _ broadcast ( arrays : list [ np. ndarray ], dims : list [ list [ int ] ] ) : for idx _ 1, ( a1, dims _ 1 ) in enumerate ( zip ( arrays, dims ) ) : if len ( set ( dims _ 1 ) )! = len ( dims _ 1 ) : raise valueerror ( f'dimensions { idx _ 1 } contain duplicate axes :'f'{ dims _ 1 }.') for ax _ ... | [
0.07582974433898926,
0.07373270392417908,
0.8412517309188843,
0.14142324030399323,
0.025915149599313736,
0.016879552975296974,
1.1170246601104736,
-0.004619748797267675,
0.4608602523803711,
0.5391942262649536,
0.06413239240646362,
0.3250483572483063,
0.2595185935497284,
-0.475345253944397,... |
def overlap ( rect1, rect2 ) : rect1 = [ rect1 [ 0 ], rect1 [ 1 ], rect1 [ 0 ] + rect1 [ 2 ], rect1 [ 1 ] + rect1 [ 3 ] ] rect2 = [ rect2 [ 0 ], rect2 [ 1 ], rect2 [ 0 ] + rect2 [ 2 ], rect2 [ 1 ] + rect2 [ 3 ] ] if rect2 [ 0 ] > rect1 [ 2 ] or rect1 [ 0 ] > rect2 [ 2 ] or rect2 [ 1 ] > rect1 [ 3 ] or rect1 [ 1 ] > rec... | [
-0.18711790442466736,
0.19901300966739655,
1.5681777000427246,
-0.1858835369348526,
-0.9040806293487549,
-0.2003328800201416,
-0.8234090209007263,
-0.2211214303970337,
-0.09835948795080185,
-0.2985435426235199,
-0.2985306680202484,
-0.5384278297424316,
-0.17975251376628876,
-0.755751430988... |
def loseconnection ( self ) : self. xmlstream. connectionlost ( " no reason " ) | [
0.6942155957221985,
-1.004198670387268,
0.3509473502635956,
-0.8479103446006775,
0.2665240168571472,
0.16686305403709412,
-0.7065131068229675,
-0.7785854935646057,
-0.018970457836985588,
-1.0364307165145874,
1.018290400505066,
0.23830096423625946,
-0.9938293695449829,
0.37818244099617004,
... |
def multi _ or _ in _ process _ executor ( init _ context : " initexecutorcontext " ) - > " executor " : if " multiprocess " in init _ context. executor _ config : return _ core _ multiprocess _ executor _ creation ( check. dict _ elem ( init _ context. executor _ config, " multiprocess " ) ) else : return _ core _ in ... | [
0.23890875279903412,
-0.39926230907440186,
0.5308228135108948,
0.13593147695064545,
-0.1359408050775528,
-0.3048166036605835,
-0.7055768966674805,
0.6199823021888733,
0.6276885271072388,
-0.06980419903993607,
0.31443101167678833,
0.3374752402305603,
-0.2561972737312317,
0.6517252922058105,... |
def nin ( x, num _ units, idx ) : s = int _ shape ( x ) x = tf. reshape ( x, [ np. prod ( s [ : - 1 ] ), s [ - 1 ] ] ) x = fc _ layer ( x, num _ units, idx ) return tf. reshape ( x, s [ : - 1 ] + [ num _ units ] ) | [
-0.8327316045761108,
0.7540874481201172,
0.40722110867500305,
0.007640262134373188,
0.2718227207660675,
-0.7548093199729919,
0.2384876012802124,
-0.24427498877048492,
0.2778855264186859,
-0.39310920238494873,
-0.7075428366661072,
-0.15049277245998383,
-0.3218536674976349,
-1.63730752468109... |
def get _ run _ configs _ dir ( ) - > str : return join ( config _ dir,'configs') | [
-0.10696150362491608,
-0.18457913398742676,
0.5795987248420715,
0.6976281404495239,
0.13675153255462646,
0.22447536885738373,
0.9705089330673218,
0.2511526644229889,
-0.721268892288208,
0.20484231412410736,
0.14470823109149933,
0.9420321583747864,
-0.41341733932495117,
-0.2315526008605957,... |
def ping ( host ) : try : timeout _ ping except nameerror : timeout _ ping = 2 timeout = timeout _ ping * 1000 if platform. system ( ). lower ( ) = ='windows'else timeout _ ping number ='- n'if platform. system ( ). lower ( ) = ='windows'else'- c'devnull = open ( os. devnull,'w') # building the command. ex : " ping - c... | [
-0.6630762815475464,
1.22052800655365,
0.8334445357322693,
0.9451575875282288,
-0.36346614360809326,
0.7678748369216919,
0.04602350667119026,
0.42449951171875,
-0.25031977891921997,
0.8739701509475708,
0.04312767833471298,
-0.1750704050064087,
-0.5284344553947449,
0.603653609752655,
-0.6... |
def resize _ image ( image ) : return transform. resize ( image, [ config [ " image _ width " ], config [ " image _ width " ] ] ) | [
-1.2220410108566284,
0.5497426986694336,
0.33761245012283325,
-0.31401535868644714,
0.45808669924736023,
-0.5432406067848206,
-0.1993982195854187,
0.3328736424446106,
0.2800537347793579,
0.44679102301597595,
0.22637292742729187,
-0.36084139347076416,
-0.11637423932552338,
0.498033374547958... |
def substrings ( a, b, n ) : a = a. split ( " " ) result = [ ] # splits 1 text into a list whose elements are single words for word in a : listofsubs = find _ substrings ( word. strip ( " : ;,. " ), n ) for sub in listofsubs : if b. find ( sub )! = - 1 : if sub not in result : result. append ( sub ) return result | [
0.857815682888031,
0.30591073632240295,
0.5709435939788818,
0.9189733862876892,
-0.2127542495727539,
-0.11187203228473663,
-0.20333734154701233,
0.6964978575706482,
-0.00926920399069786,
1.094788670539856,
-0.2259574979543686,
0.07958251982927322,
-1.0927568674087524,
0.19837205111980438,
... |
def evaluate ( self, x1 : jaxarray, x2 : jaxarray ) - > jaxarray : pinf = self. stationary _ covariance ( ) h1 = self. observation _ model ( x1 ) h2 = self. observation _ model ( x2 ) return jnp. where ( self. coord _ to _ sortable ( x1 ) < self. coord _ to _ sortable ( x2 ), h2 @ pinf @ self. transition _ matrix ( x1,... | [
-0.1611766219139099,
-0.5190935134887695,
0.7597171664237976,
0.38833552598953247,
-0.21493326127529144,
-0.028619851917028427,
-1.0126718282699585,
-1.3387950658798218,
-1.2565170526504517,
0.458519846200943,
0.38741958141326904,
1.0364381074905396,
0.49824953079223633,
-0.495949119329452... |
def _ rotation _ matrix _ from _ quaternion ( cls, q ) : [ w, x, y, z ] = q nq = ( q * * 2 ). sum ( ) if ( nq > 0. 0 ) : s = 2. 0 / nq else : s = 0. 0 x = x * s ; y = y * s ; z = z * s wx = w * x ; wy = w * y ; wz = w * z xx = x * x ; xy = x * y ; xz = x * z yy = y * y ; yz = y * z ; zz = z * z rq = np. matrix ( [ [ 1.... | [
-0.030137157067656517,
-0.8188775777816772,
0.37491539120674133,
-1.532947301864624,
-0.30975377559661865,
0.00919092632830143,
0.09830653667449951,
-0.6867730021476746,
1.1947240829467773,
-0.6294415593147278,
-0.08277851343154907,
-0.1689164638519287,
-0.44586262106895447,
-0.36971741914... |
def setdefault ( self, default = none ) : raise typeerror ( self. _ _ msg ) | [
0.343627393245697,
0.8883357048034668,
0.283408522605896,
0.4119025468826294,
1.7532424926757812,
0.1361064463853836,
0.46313536167144775,
-0.39036333560943604,
-0.013508601114153862,
-0.5608965158462524,
-0.16010820865631104,
0.9305421710014343,
-1.6950792074203491,
1.168073296546936,
-... |
def words ( self ) : return list ( self ) | [
-0.2012072056531906,
-0.5749983191490173,
0.2297133505344391,
0.004567547235637903,
1.042834758758545,
0.5350123047828674,
-0.674277663230896,
0.5795629024505615,
1.1753387451171875,
-0.2964668273925781,
-0.6337247490882874,
0.24592505395412445,
-0.37027212977409363,
0.9618478417396545,
... |
def set _ globals ( self ) : logger. debug ( " setting global config " ) section = " global " self. add _ section ( title = section, info = " options that apply to all models " + additional _ info ) self. add _ item ( section = section, title = " coverage ", datatype = float, default = 68. 75, min _ max = ( 62. 5, 100.... | [
-0.04025910049676895,
0.34401270747184753,
0.9154496788978577,
-0.21118927001953125,
0.19299417734146118,
0.28166717290878296,
0.3607421815395355,
-0.48828333616256714,
-0.4115797281265259,
0.28023484349250793,
-0.6775875091552734,
0.29628342390060425,
0.6243526935577393,
1.314361691474914... |
async def voices ( self ) - > voicesiterable : nanotts _ voices = [ # english voice ( id = " en - gb ", name = " en - gb ", gender = " f ", locale = " en - gb ", language = " en " ), voice ( id = " en - us ", name = " en - us ", gender = " f ", locale = " en - us ", language = " en " ), # german voice ( id = " de - de ... | [
-0.3111075162887573,
0.05154692009091377,
0.4599190950393677,
-0.28117385506629944,
0.3483731150627136,
0.03658396750688553,
-1.6664795875549316,
-1.136905550956726,
-0.8897640109062195,
0.4457021653652191,
-0.39344608783721924,
-0.037391297519207,
0.9298568964004517,
0.5176370739936829,
... |
def set _ diameter ( self, syringe _ num, diameter _ mm ) : self. _ check _ syringe _ number ( syringe _ num ) self. _ check _ diameter ( diameter _ mm ) diameter _ mm = _ format _ float ( diameter _ mm ) self. write ( " dia " + _ int _ to _ char ( syringe _ num ) + diameter _ mm ) returned _ diameter = self. get _ dia... | [
-0.5207498073577881,
-0.6328558921813965,
0.7015109658241272,
0.5302215218544006,
-0.05883999168872833,
0.38695505261421204,
0.4832271933555603,
-0.050962939858436584,
1.3544622659683228,
0.0028394057881087065,
0.19025154411792755,
0.6213629245758057,
-1.0635452270507812,
0.168941527605056... |
def _ register _ receiver ( self, test, receiver, codes = [ 201 ], fail = test. fail ) : # use the test data as a template for creating new resources # register device device _ data = deepcopy ( self. test _ data [ " device " ] ) device _ data [ " id " ] = receiver [ " device _ id " ] device _ data [ " label " ] = " am... | [
-0.8449645042419434,
0.38853833079338074,
0.5112983584403992,
-1.0990557670593262,
0.7960550785064697,
-0.6580753922462463,
-0.3684108555316925,
0.37284642457962036,
0.19186818599700928,
0.12494803220033646,
-0.31746047735214233,
-0.12206296622753143,
-0.5618959665298462,
0.170417815446853... |
def reflexive _ heuristic ( doc ) : for np in doc. nps : # find the reflexive if np. gettext ( ). lower ( ) in data. reflexives : # possible anaphor anaphor = np # look back for the subject of the closest verb. r _ sent = reconcile. getannotsentence ( doc. getpath ( ), np ) marks _ in _ sent = doc. getcontainedmarkable... | [
0.16730201244354248,
0.22803160548210144,
0.8414514064788818,
-0.3739028573036194,
-0.6204864978790283,
-0.18273749947547913,
0.23272788524627686,
0.5346675515174866,
-0.3209179639816284,
0.517044186592102,
-0.08557453751564026,
0.013049851171672344,
0.18064947426319122,
0.3671201467514038... |
def ensure _ np ( im : union [ image. image, np. ndarray ] ) - > np. ndarray : return pil2np ( im ) if is _ pil ( im ) else im | [
-0.2594519555568695,
-0.11458975076675415,
0.4565838575363159,
0.24537016451358795,
0.3359597623348236,
-0.1576157510280609,
-0.6460731625556946,
-1.3445098400115967,
1.190180778503418,
0.31706568598747253,
0.5123831629753113,
0.47180691361427307,
-0.036672718822956085,
0.11317615211009979... |
def is _ valid _ var ( self ) : if self. datatype = = " var " and self. frame = = " gf " or self. frame = = " tf " or self. frame = = " lf " : pattern = re. compile ( r " ^ [ a - za - z _ $ & % *!? \ - ] [ a - za - z0 - 9 _ $ & % *!? \ - ] * $ " ) result = re. match ( pattern, self. value ) if result! = none : return t... | [
-0.18913374841213226,
-0.6269693970680237,
0.7440716028213501,
-0.21979573369026184,
-0.6044192314147949,
0.23648284375667572,
-0.25949519872665405,
0.1214451789855957,
-0.35497939586639404,
-0.5335313081741333,
-0.39864930510520935,
0.7039875984191895,
-0.6473682522773743,
0.2589935064315... |
def startpython ( self, script, args, ignoreexitstatus = false, stdouterr = none, environs = none, pythonpaths = none, * * kwargs ) : script = os. path. join ( self. input, script ) assert os. path. exists ( script ), script if not stdouterr : stdouterr = os. path. basename ( script ) env = dict ( os. environ ) env ['p... | [
0.06128823384642601,
-0.6405720710754395,
0.8280287981033325,
0.4191986322402954,
-0.32428187131881714,
0.5589520931243896,
0.35008686780929565,
-0.3335523307323456,
0.4203825294971466,
0.35435396432876587,
-0.08695412427186966,
0.5354223251342773,
-0.12450990825891495,
-0.1848366707563400... |
def set _ combo _ dosing ( max _ doses, num _ doses, eq = false, num _ replicates = 1 ) : dose _ lists = [ ] for md, nd in zip ( max _ doses, num _ doses ) : dose _ range = md * 1e - 4 * np. logspace ( 0, 4, 9 ) dose _ range = sorted ( list ( set ( dose _ range ) ) ) [ : : - 1 ] dose _ range = [ round ( s, 4 ) for s in... | [
-0.4204559028148651,
0.7804803848266602,
0.5794517397880554,
0.43252021074295044,
0.33479002118110657,
-0.4899463653564453,
0.10736320912837982,
0.6433236598968506,
1.0445283651351929,
0.9327266812324524,
0.02615036815404892,
0.5265326499938965,
0.5066342949867249,
-0.012068565934896469,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.