text stringlengths 25 2.19k | embedding listlengths 768 768 |
|---|---|
def agent _ process _ entrypoint ( * * kwargs ) : import inspect import rich # import locally so only the ` dev ` command breaks if typer internals change from typer. models import parameterinfo # typer does not process default parameters when calling a function # directly, so we must set ` start _ agent `'s default pa... | [
0.5157061219215393,
-1.0324028730392456,
0.7911584377288818,
0.432689905166626,
1.0021253824234009,
-0.6769910454750061,
0.3812888562679291,
-0.9969824552536011,
0.18526367843151093,
0.8354672789573669,
-0.11920572817325592,
0.6928824186325073,
0.713738203048706,
-0.01975666731595993,
0.... |
def main ( args ) : rospy. init _ node ('node _ ur5 _ 2 ', anonymous = true ) ur5 = ur5moveit ( sys. argv [ 1 ] ) rospy. sleep ( 60 ) url2 = " https : / / spreadsheets. google. com / feeds / list / 1xsqam7 _ yopxe25fs " + \ " blj4me2 - frbx9rzomh8tjaiogmu / 5 / public / full? alt = json " sscontent2 = requests. get ( u... | [
-0.11801616847515106,
0.25548988580703735,
0.7684906125068665,
0.22600489854812622,
0.8493137955665588,
-0.243025541305542,
0.30123835802078247,
-0.13562655448913574,
-0.27472442388534546,
0.0773855447769165,
-0.3839726150035858,
0.43932196497917175,
0.21793408691883087,
0.5741659998893738... |
def send _ event ( event ) : event [ " timestamp " ] = time. time ( ) connection = pika. blockingconnection ( pika. connectionparameters ( " localhost " ) ) channel = connection. channel ( ) channel. queue _ declare ( queue = events _ queue ) channel. basic _ publish ( exchange = " ", routing _ key = events _ queue, bo... | [
-0.3489867150783539,
0.005644120741635561,
0.5832121968269348,
0.23793017864227295,
0.5009098052978516,
-0.21584509313106537,
-0.8611311912536621,
-0.35924383997917175,
-0.014250724576413631,
0.6069619059562683,
-0.9741549491882324,
0.8363599181175232,
-0.1390247493982315,
0.40290904045104... |
def gf _ normal ( f, p ) : return gf _ strip ( [ a % p for a in f ] ) | [
-0.14498856663703918,
0.03250029310584068,
0.2796992063522339,
0.21550676226615906,
-0.6600439548492432,
0.7334299683570862,
-1.0141831636428833,
1.214184045791626,
-0.9610679745674133,
0.8009688258171082,
0.7769620418548584,
-0.03720583766698837,
-0.731475293636322,
-0.7553528547286987,
... |
def get _ rod _ stress _ strain ( model, key, is _ stress, vm _ word, itime, oxx, txy, max _ principal, min _ principal, ovm, is _ element _ on, eids, header _ dict, keys _ map ) : if is _ stress : rods = [ model. crod _ stress, model. conrod _ stress, model. ctube _ stress, ] else : rods = [ model. crod _ strain, mode... | [
-0.785408616065979,
0.21887390315532684,
0.5954821109771729,
-0.1257110983133316,
-0.1330229640007019,
-0.6502028703689575,
0.42001014947891235,
-0.41470831632614136,
-0.24764575064182281,
1.2538748979568481,
-0.3096950948238373,
0.21086278557777405,
-0.06282445788383484,
0.013836482539772... |
def delete _ many ( self, keys ) : keys = [ self. client. key ( * k ) for k in keys ] self. client. delete _ multi ( keys ) | [
-1.1063982248306274,
0.6135979294776917,
0.19904419779777527,
0.5764477849006653,
0.8383893966674805,
-0.2840379774570465,
-1.3071410655975342,
-0.1134304627776146,
-0.47838929295539856,
0.8361873030662537,
-0.7388971447944641,
-0.29557281732559204,
-0.41034239530563354,
1.0394827127456665... |
def get _ rp _ ra _ trev ( rv, vv ) : import numpy as np import math # get vector norms : v = np. linalg. norm ( vv ) ; r = np. linalg. norm ( rv ) ; # calculate eccentricity, semi - major axis energy = 0. 5 * ( v * v ) - gt6. mu _ jupiter / r ; a = - gt6. mu _ jupiter / ( 2 * energy ) ; c = np. cross ( rv, vv ) ; h = ... | [
-0.21685776114463806,
-0.8083962202072144,
0.7545598745346069,
-0.9870759844779968,
0.3288569748401642,
-0.34007319808006287,
-0.15106503665447235,
0.7172977924346924,
-0.1378595232963562,
1.8450278043746948,
-0.5549452304840088,
0.23506276309490204,
-0.8313568830490112,
-0.876818060874939... |
def content ( self ) - > optional [ str ] : return pulumi. get ( self, " content " ) | [
1.1328225135803223,
0.13816657662391663,
0.42385032773017883,
0.5373224020004272,
0.39734524488449097,
1.002892017364502,
-0.29092609882354736,
-0.5915464162826538,
0.3059461712837219,
0.22723910212516785,
0.8799203038215637,
0.1512630134820938,
-0.03922713175415993,
-1.7434605360031128,
... |
def _ addview ( self, win, fn = none, noname = " ", addnext = false, indexes = none ) : editor = win. geteditor ( ) if not fn : if not noname : self. untitledcount + = 1 noname = self. tr ( " untitled { 0 } " ). format ( self. untitledcount ) if addnext : index = self. currenttabwidget. currentindex ( ) + 1 self. curre... | [
-0.5536336302757263,
-0.2745872139930725,
0.7784889340400696,
-0.36724430322647095,
-0.730822741985321,
0.17689202725887299,
0.4356328248977661,
0.10043349862098694,
-0.4876677989959717,
-0.6595897674560547,
0.3788244426250458,
-0.390553742647171,
-0.11708857119083405,
0.5098782181739807,
... |
async def test _ discovery _ device _ remove ( hass : homeassistant, mqtt _ mock : mqttmockhaclient, setup _ tasmota ) - > none : config = copy. deepcopy ( default _ config ) config [ " rl " ] [ 0 ] = 2 config [ " lt _ st " ] = 1 # 1 channel light ( dimmer ) unique _ id = f " { default _ config ['mac'] } _ light _ ligh... | [
0.450295090675354,
0.7975754737854004,
0.20071037113666534,
0.6364114880561829,
0.4614643156528473,
0.029855050146579742,
0.9439977407455444,
0.8171772956848145,
0.3779798448085785,
-0.7279006838798523,
-0.9979868531227112,
-0.5881086587905884,
0.09042587131261826,
0.8909990191459656,
0.... |
def run _ command ( ) : def inner ( args ) : return clirunner ( ). invoke ( cli, args, catch _ exceptions = false ) return inner | [
-0.48323631286621094,
-0.17766878008842468,
0.4291064143180847,
-0.16343078017234802,
-0.20270311832427979,
0.13680234551429749,
-0.4416465759277344,
0.21439442038536072,
-0.43760624527931213,
-1.0755947828292847,
0.15391039848327637,
0.11324159801006317,
-0.35618165135383606,
-0.623994469... |
def codebasegenerator ( chdict ) : # evidently codebase names must be alpha - numeric, so we just strip non - alpha # numeric characters from the project name. return get _ codebase _ name ( str ( chdict [ " project " ] ) ) | [
-0.6724647283554077,
-0.1923437863588333,
0.26837146282196045,
-0.5704665780067444,
-0.8592145442962646,
0.991632878780365,
-0.707550048828125,
-0.16017648577690125,
-0.6088995337486267,
0.21163025498390198,
-0.03619668260216713,
-0.7913278937339783,
-0.4329959452152252,
0.2043762505054474... |
def has _ isomorphism ( tmplt, world, *, candidates = none, verbose = false, count _ iterations = false, * * kwargs ) : global n _ iterations n _ iterations = 0 if candidates is none : tmplt, world, candidates = uclasm. run _ filters ( tmplt, world, filters = uclasm. all _ filters, candidates = np. ones ( ( tmplt. n _ ... | [
-1.0996334552764893,
0.5316999554634094,
0.901159405708313,
0.8551062941551208,
-0.6947774291038513,
0.21044817566871643,
0.8274326324462891,
0.599538266658783,
-0.02929305098950863,
0.9584951400756836,
-0.025039834901690483,
-0.0019075050950050354,
-0.2007192075252533,
0.6345075964927673,... |
def test _ 01 _ dawn ( self ) : l _ time ='dawn'l _ time, l _ seconds = timefield ( ). _ rise _ set ( l _ time, self. m _ riseset ) # print ('d1 - 01 - a - seconds { } - " { } " \ n '. format ( l _ seconds, l _ time ) ) self. assertequal ( l _ seconds, ( 6 * 60 + 4 ) * 60 + 52 ) | [
0.19406847655773163,
0.3061234652996063,
0.32666733860969543,
0.31914255023002625,
-0.18478550016880035,
0.1433343142271042,
0.20045368373394012,
-0.897003710269928,
-0.11624183505773544,
-0.5685508847236633,
-0.5232890248298645,
0.15416847169399261,
0.5162063837051392,
0.7769370675086975,... |
def count _ players ( ) : return _ value = execute _ query ( " select count ( * ) from players \ where tournament _ id = % s ", ( tournament _ id, ) ) return return _ value [ 0 ] [ 0 ] | [
0.07376936078071594,
-0.13952654600143433,
0.5825961828231812,
-0.13092830777168274,
0.9852839708328247,
-0.22955113649368286,
-0.2599346935749054,
0.5237457752227783,
-0.7356407642364502,
0.6191406846046448,
0.05699869990348816,
-0.4664684236049652,
-0.6492976546287537,
-0.643557667732238... |
def _ glm _ l2 _ propagate _ return ( l2 _ block, reference _ image, logger ) : assert l2 _ block [ " fsfprototype " ] = = " set prototype path " assert l2 _ block [ " subjectfile " ] = = " l2 _ sublist. csv " assert l2 _ block [ " modelname " ] = = " example " assert reference _ image = = " set reference " | [
0.10635613650083542,
-0.9757086038589478,
0.3919413685798645,
-0.07327745854854584,
-0.020019840449094772,
-0.00006959146412555128,
0.004027891904115677,
-0.3004976212978363,
-0.5701258778572083,
0.08711884915828705,
0.2304145246744156,
1.0264387130737305,
-0.1532570719718933,
0.8238502144... |
def inverse ( self, z ) : raise notimplementederror | [
-0.9544641971588135,
-0.5588666796684265,
0.4217483699321747,
0.659203290939331,
-0.2862171530723572,
0.40528595447540283,
0.9245811104774475,
0.6868347525596619,
-0.10503323376178741,
-0.35433897376060486,
-1.0427498817443848,
0.2716427743434906,
-0.7825800776481628,
0.13653609156608582,
... |
def _ build _ close _ node _ result ( self ) : print ('start building close node result') bounding _ boxes = self. bounding _ boxes struc _ box = self. struc _ box is _ close = self. is _ close for n in range ( self. nverts ) : is _ close [ n ] = _ box _ intersect ( bounding _ boxes [ n, : ], struc _ box ) struc _ edge... | [
-1.0438554286956787,
-0.39538073539733887,
0.8822017312049866,
0.31325051188468933,
0.07776830345392227,
0.3403453528881073,
0.590115487575531,
-0.18739140033721924,
-0.3722381293773651,
0.1231214627623558,
0.0017112798523157835,
0.4708629846572876,
-0.9799599051475525,
-0.1433773040771484... |
def get _ options ( self, table : str ) - > dict [ optional [ str ], optional [ str ] ] : return { " table " : table, " keyspace " : self. keyspace, " spark. cassandra. auth. username " : self. username, " spark. cassandra. auth. password " : self. password, " spark. cassandra. connection. host " : self. host, " spark.... | [
-0.08698633313179016,
0.1453266143798828,
0.4398123621940613,
-0.17945589125156403,
-0.2526240348815918,
-0.6016061902046204,
-0.7265274524688721,
-0.2690160274505615,
-0.2807742655277252,
0.11332868039608002,
-0.4530646800994873,
-0.19612306356430054,
0.12226280570030212,
0.56384998559951... |
def jboss _ standalone _ conf _ file ( broker ) : log _ files = broker [ jdrspecs. jboss _ standalone _ server _ log ] if log _ files : log _ content = log _ files [ - 1 ]. content results = [ ] for line in log _ content : if " sun. java. command = " in line and ". jdr " not in line and " - djboss. server. base. dir " ... | [
0.05059836059808731,
-0.584841251373291,
0.7442415952682495,
0.8410194516181946,
-0.534858226776123,
0.3560168147087097,
0.384630024433136,
1.0109909772872925,
-1.0460330247879028,
0.20837219059467316,
-0.038753692060709,
-0.18623046576976776,
-0.4519529640674591,
1.6534395217895508,
0.5... |
def get _ dnf _ stats _ json ( self ) : return {'ret': self. get _ ret ( ),'nc': self. get _ nc ( ),'dnq': self. get _ dnq ( ),'dnpq': self. get _ dnpq ( ),'dsq': self. get _ dsq ( ),'dns': self. get _ dns ( ),'dnp': self. get _ dnp ( ),'ex': self. get _ ex ( ),'wd': self. get _ wd ( ),'total _ dnf': self. get _ total ... | [
-1.107553243637085,
-0.19161446392536163,
0.6601452827453613,
-1.0200457572937012,
-0.1589038223028183,
-0.8808943629264832,
-0.09413984417915344,
-1.546586036682129,
-0.32790473103523254,
-0.19480489194393158,
-1.1544890403747559,
0.5783748626708984,
0.3669683635234833,
0.6754599809646606... |
def extract _ columns ( spec, data ) : lines = [ [ s [ 0 ] for s in spec ] ] # column titles. for item in data : lines. append ( [ s [ 1 ] ( item ) for s in spec ] ) return lines | [
-0.33587247133255005,
-1.0145838260650635,
0.2970705032348633,
0.020395703613758087,
0.5032472014427185,
-0.7924519181251526,
-0.8491113185882568,
0.09283226728439331,
-0.5025783181190491,
0.3449922502040863,
-0.520707368850708,
0.12059582769870758,
0.5927883982658386,
-0.49709102511405945... |
def multiclass _ nms ( multi _ bboxes, multi _ scores, score _ thr, nms _ cfg, max _ num = 50, score _ factors = none ) : num _ classes = multi _ scores. size ( 1 ) - 1 # exclude background category if torch. onnx. is _ in _ onnx _ export ( ) : if multi _ bboxes. shape [ 1 ] > 4 : bboxes = multi _ bboxes. view ( multi ... | [
-0.40864628553390503,
-0.20326942205429077,
0.7959225177764893,
0.5998988747596741,
0.23012205958366394,
-0.6303454041481018,
-0.13096633553504944,
-0.7554139494895935,
0.5989659428596497,
0.10931376367807388,
-0.2907769978046417,
-0.24564053118228912,
0.12230191379785538,
0.72503769397735... |
def test _ destructor ( self ) : # dropping from instance instance = hardwarethread ( ) self. assertisnotnone ( instance ) instance. _ drop ( ) self. assertisnone ( instance. _ hardwarethread _ _ singleton ) self. assertisnone ( hardwarethread. _ hardwarethread _ _ singleton ) # dropping from class instance = hardwaret... | [
-0.7195978164672852,
0.3270849883556366,
0.5824869275093079,
-1.1674436330795288,
0.9337620139122009,
0.5241573452949524,
0.4162401258945465,
-0.1064843162894249,
0.19623509049415588,
-0.5765505433082581,
-0.08005627244710922,
0.2350115180015564,
-0.37154901027679443,
0.9841679334640503,
... |
def project _ get _ networks ( context, project _ id, associate = true ) : return impl. project _ get _ networks ( context, project _ id, associate ) | [
-0.520993173122406,
0.9263777136802673,
0.3711789548397064,
0.1435328722000122,
1.1134324073791504,
-0.11829541623592377,
-0.03809286653995514,
-0.7273454070091248,
0.24043750762939453,
0.5815646648406982,
0.2572517395019531,
-0.43742454051971436,
0.45445263385772705,
0.4376780092716217,
... |
def task _ log _ end _ task ( context, task _ name, period _ beginning, period _ ending, host, errors, message = none, session = none ) : return impl. task _ log _ end _ task ( context, task _ name, period _ beginning, period _ ending, host, errors, message, session ) | [
-0.7992082238197327,
0.11269832402467728,
0.5893215537071228,
0.1447170078754425,
-0.45138609409332275,
0.26245155930519104,
-0.19426310062408447,
0.10130789875984192,
-1.2282170057296753,
0.7224946022033691,
-0.1216241866350174,
1.043817162513733,
0.7079853415489197,
-0.3020629286766052,
... |
def convert _ to _ dataframe ( revs _ list, stars _ list ) : assert isinstance ( revs _ list, list ) assert isinstance ( stars _ list, list ) print ( " converting to dataframe " ) np _ revs = np. asarray ( [ revs _ list ] ). t np _ stars = np. asarray ( [ stars _ list ] ). t stacked _ revs = np. hstack ( ( np _ revs, n... | [
-0.5156729221343994,
0.2420371174812317,
0.42285558581352234,
-0.1733294278383255,
-0.41434597969055176,
0.2806973457336426,
-1.0899895429611206,
0.8499801754951477,
-0.18386897444725037,
0.2868764102458954,
-0.0036732954904437065,
1.032584309577942,
-0.3165733814239502,
0.0339687988162040... |
def subword _ map _ by _ spacer ( subwords, marker = subwordmarker. spacer ) : flags = [ 0 ] * len ( subwords ) for i, tok in enumerate ( subwords ) : if marker in tok : if case _ markup ( tok. replace ( marker, " " ) ) : if i < len ( subwords ) - 1 : flags [ i ] = 1 else : if i > 0 : previous = subwords [ i - 1 ]. rep... | [
0.10290007293224335,
-0.17052653431892395,
0.9360625147819519,
0.378235399723053,
-0.30928951501846313,
0.00881898868829012,
0.6474025845527649,
0.4283331036567688,
-0.025218140333890915,
0.8906100392341614,
0.12991327047348022,
0.4338095486164093,
-0.2569727599620819,
0.8982962369918823,
... |
def write ( self, file _ name = none ) : if file _ name is none : if self. file _ name is not none : file _ name = self. file _ name else : raise valueerror ('file _ name must be specified') if self. integer _ size is none : raise valueerror ( " integer size must be specified to write to a image file. " ) with open ( f... | [
-1.2807657718658447,
0.24638202786445618,
0.6690108776092529,
0.18460765480995178,
0.48867711424827576,
0.3062668740749359,
0.4661794602870941,
1.05465829372406,
-0.3060816526412964,
0.18443091213703156,
-0.07498914003372192,
-0.09842685610055923,
-0.13523399829864502,
1.1063532829284668,
... |
def get _ mill _ coords ( self, player, level, row, column ) : # column mill if np. all ( self. board [ level, row, : ] = = player ) : return [ ( level, row, c ) for c in range ( state. board _ size ) ] # row mill if np. all ( self. board [ level, :, column ] = = player ) : return [ ( level, r, column ) for r in range ... | [
-0.40174421668052673,
-0.8445509672164917,
0.5628068447113037,
-0.10038235783576965,
-0.07140761613845825,
0.26019734144210815,
0.3266463279724121,
-0.13724961876869202,
-0.3032049834728241,
0.26639804244041443,
0.05628557503223419,
-0.030205819755792618,
-0.8454030156135559,
0.07473673671... |
def _ _ init _ _ ( self ) : self. _ server _ url = " broker. mqttdashboard. com " self. _ server _ port = 1883 self. _ qos = 0 self. _ pub _ topic = " / eyrc / vb / airiakak / ur5 _ 2 " self. _ mqtt _ client = mqtt. client ( ) self. _ mqtt _ client. on _ publish = self. mqtt _ on _ publish self. _ mqtt _ client. connec... | [
0.5583505034446716,
-0.07106035947799683,
0.4436158239841461,
0.2755563259124756,
0.21029870212078094,
0.4785093069076538,
0.41680607199668884,
0.28398391604423523,
-1.029874324798584,
-0.5779941082000732,
-0.5804528594017029,
0.29731014370918274,
0.1627303510904312,
0.5750733017921448,
... |
def condor _ job _ id _ from _ workspec ( workspec ) : batchid _ str = str ( workspec. batchid ) # backward compatibility if workspec. batchid does not contain procid if '.'not in batchid _ str : batchid _ str + = '. 0'return'{ 0 } # { 1 } '. format ( workspec. submissionhost, batchid _ str ) | [
1.1969478130340576,
-1.3451992273330688,
0.3791729807853699,
0.07411707192659378,
-0.326852023601532,
0.9701898097991943,
-0.05856139957904816,
0.1886700838804245,
-0.575360894203186,
-0.2075667530298233,
0.5631569623947144,
1.131096363067627,
-0.3319440484046936,
0.39573508501052856,
0.... |
def detect _ language ( text ) : from google. cloud import translate _ v2 as translate translate _ client = translate. client. from _ service _ account _ json ( translation _ key _ path + " / knowledge - bot - development - b8ed9d8c16cb. json " ) result = translate _ client. detect _ language ( text ) return str ( resu... | [
0.2937861382961273,
-0.6670147776603699,
0.22189712524414062,
0.30992552638053894,
-0.5883136987686157,
0.3717869818210602,
-0.6846082806587219,
-0.48093634843826294,
-0.05383966863155365,
0.2895413637161255,
-0.6297895312309265,
0.3508725166320801,
-0.2902163863182068,
0.2058805674314499,... |
def decision _ function ( self, x ) : check _ is _ fitted ( self, ['w _ ','c _ w _'] ) x = validation. check _ array ( x ) if x. shape [ 1 ]! = self. w _. shape [ 1 ] : raise valueerror ( " x has wrong number of features \ n " " found = % d \ n " " expected = % d " % ( self. w _. shape [ 1 ], x. shape [ 1 ] ) ) dist = ... | [
-0.6968200206756592,
-0.4570246934890747,
0.7056882977485657,
0.21778130531311035,
0.3484719693660736,
0.032184768468141556,
0.8439460396766663,
0.07513265311717987,
0.28396663069725037,
-0.08464893698692322,
-0.47017616033554077,
0.8117126226425171,
0.5533809065818787,
0.5281808376312256,... |
def _ _ call _ _ ( self, x ) : return self. evaluate ( x ) | [
-0.7595124840736389,
-0.264621376991272,
0.3113860487937927,
-0.6440894603729248,
-0.690808117389679,
0.5508280992507935,
-1.1256872415542603,
-0.3821556866168976,
0.20389172434806824,
-0.9225987792015076,
-0.9530254006385803,
-0.15306653082370758,
-0.42549213767051697,
-0.7754676938056946... |
def lb ( self ) : return self. get _ domain _ min ( ) | [
0.3757122755050659,
-0.8974165916442871,
0.3098622262477875,
-0.02279648929834366,
0.5063009858131409,
0.9984661340713501,
-0.4256672263145447,
-1.2881860733032227,
0.6175756454467773,
-1.205916404724121,
-0.07137948274612427,
0.6816511154174805,
-0.9404541850090027,
0.32328101992607117,
... |
def push ( self, key ) : try : self. stacks [ key ]. insert ( 0, none ) except keyerror : self. stacks [ key ] = [ ] self. push ( key ) | [
-0.1460014134645462,
1.6782879829406738,
0.4864344000816345,
0.6821074485778809,
0.6183010339736938,
-0.3206096589565277,
-0.08894576877355576,
-0.6627992391586304,
-0.053437720984220505,
1.0647071599960327,
-0.5447438955307007,
-0.727059543132782,
-0.9547451138496399,
1.0154865980148315,
... |
def aggregate _ metadata _ add ( context, aggregate _ id, metadata, set _ delete = false ) : impl. aggregate _ metadata _ add ( context, aggregate _ id, metadata, set _ delete ) | [
-0.4605444073677063,
0.8799409866333008,
0.6876248121261597,
0.3836997151374817,
1.186924934387207,
0.010495142079889774,
-1.157158613204956,
0.06312233954668045,
-0.22025595605373383,
1.0720759630203247,
0.2788723111152649,
0.7201982140541077,
0.18691299855709076,
-0.08101090043783188,
... |
def show _ tag _ screen ( self, tag _ id, is _ prev _ screen = false ) : if not is _ prev _ screen : self. _ push _ prev _ screen _ to _ history ( ) self. sm. transition. direction ='left'else : self. sm. transition. direction ='right'if self. sm. current = ='tag': self. tag _ screen, self. other _ tag _ screen = self.... | [
-0.02644578367471695,
0.38301464915275574,
0.8414281606674194,
-0.2512584626674652,
0.3506537675857544,
-0.06478608399629593,
0.7013065814971924,
-0.3638855814933777,
0.5682087540626526,
0.926439106464386,
-0.18974778056144714,
0.5905621647834778,
0.6375828981399536,
2.0209689140319824,
... |
def connect ( self ) : return transport ( connect _ addr = self. connect _ addr, local _ addr = ( " 127. 0. 0. 1 ", 6666 ), logic = self ) | [
0.501421332359314,
-0.7284098267555237,
0.3956659436225891,
0.0703078880906105,
0.07358167320489883,
-0.09489122778177261,
0.052516598254442215,
-0.5710407495498657,
0.2405482828617096,
-0.425729364156723,
0.07895558327436447,
-0.3399873673915863,
-0.5536123514175415,
-0.4390906095504761,
... |
def fib ( n ) : # write fibonacci series upto n a, b = 0, 1 while a < n : print ( a, end ='' ) a, b = b, a + b print ( ) # now call the fibonacci that we just defined fib ( 2000 ) | [
0.6644395589828491,
-0.5266469717025757,
0.3877294361591339,
0.6093160510063171,
0.5371288657188416,
-0.07635387033224106,
0.42013847827911377,
-0.6739493012428284,
0.1126432716846466,
-0.5114374756813049,
-0.42837458848953247,
0.564196765422821,
0.445198655128479,
0.35863396525382996,
0... |
def _ _ init _ _ ( self, matrix8x8 ) : self. matrix = matrix8x8 # self. matrix. begin ( ) self. iterations = 0 self. fib1 = 1 self. fib2 = 1 self. fib3 = 2 | [
0.5034521818161011,
0.7668614983558655,
0.20112070441246033,
0.858478844165802,
0.17350280284881592,
-0.14981764554977417,
0.6285542845726013,
0.12037993222475052,
0.6297100782394409,
0.3759108781814575,
-0.30406928062438965,
0.042389459908008575,
-0.862996518611908,
1.1936267614364624,
... |
async def test _ sign _ resign ( image _ config : imageconfig, image _ config _ signed : imageconfig, config _ digest _ canonical : str, ) : signer = fakesigner ( ) assert ( await image _ config. sign ( signer, signaturetypes. resign ) = = signer. signature _ value ) assert ( await image _ config _ signed. sign ( signe... | [
-0.7363316416740417,
-0.3505624830722809,
0.465955525636673,
0.15199683606624603,
0.5386785864830017,
-0.2780718207359314,
0.46799856424331665,
0.15468770265579224,
-0.0722242146730423,
0.3664480447769165,
-0.9573149681091309,
-0.4079956114292145,
0.1368737518787384,
1.0195631980895996,
... |
def get _ left _ wall ( self ) : x1, y1 = self. left, self. top + 1 x2, y2 = x1, self. top + self. height - 2 return self. level. get _ tiles _ along _ line ( x1, y1, x2, y2 ) | [
0.6905860304832458,
-0.05066870152950287,
0.6581132411956787,
0.9689169526100159,
0.08106844127178192,
0.15236403048038483,
0.06200386583805084,
-1.3104815483093262,
-0.49025362730026245,
0.1531991958618164,
-0.801714301109314,
0.012571578845381737,
-0.7291404008865356,
1.5167022943496704,... |
def main ( ) : secret _ word = get _ word ( ) dashes = play _ game ( secret _ word ) length = len ( secret _ word ) n = 0 print ('the word now looks like this :'+ str ( dashes ) ) print ('you have'+ str ( initial _ guesses ) +'guesses left') while secret _ word! = dashes : letter = input ( " please guess a single lette... | [
0.2995866537094116,
0.31765449047088623,
0.9321362376213074,
0.7091757655143738,
0.27174291014671326,
0.5587482452392578,
0.15415191650390625,
0.2669130265712738,
-0.1685400903224945,
-0.1996111124753952,
-0.36345353722572327,
1.218550205230713,
-0.6309854388237,
0.6726421117782593,
1.42... |
def get _ network ( name ) : if name. split ('_') [ 0 ] = ='lstm': if name. split ('_') [ 1 ] = ='train': return lstm _ train ( ) elif name. split ('_') [ 1 ] = ='test': return lstm _ test ( ) else : raise keyerror ('unknown dataset : { } '. format ( name ) ) | [
-0.8827820420265198,
0.15711291134357452,
0.5773913860321045,
-0.42092764377593994,
-0.510768711566925,
-0.603302001953125,
-0.31696054339408875,
-0.79537034034729,
-0.14222058653831482,
-0.9249557256698608,
-0.697029173374176,
0.5249152183532715,
0.22961822152137756,
-0.10879348963499069,... |
def from _ config ( cls, cfg : cfgnode _ ) : assert " video _ height " in cfg. tracker _ heads assert " video _ width " in cfg. tracker _ heads video _ height = cfg. tracker _ heads. get ( " video _ height " ) video _ width = cfg. tracker _ heads. get ( " video _ width " ) max _ num _ instances = cfg. tracker _ heads. ... | [
-0.650359034538269,
0.09835458546876907,
0.7057938575744629,
-0.7175348401069641,
0.12260979413986206,
-0.3099878132343292,
0.5301730632781982,
-0.048268746584653854,
-0.8806003928184509,
0.1451127976179123,
-1.0957080125808716,
0.44081875681877136,
0.517155647277832,
-0.2604515850543976,
... |
def numchips ( self, player ) : count = 0 assert ( player = = self. player _ a or player = = self. player _ b ), \ " player should be % d or % d " % ( self. player _ a, self. player _ b ) for r in range ( self. num _ rows ) : for c in range ( self. num _ cols ) : if self. _ grid [ r, c ] = = player : count + = 1 return... | [
-0.7675184011459351,
-0.00769122363999486,
0.8141409754753113,
-0.6429985761642456,
-0.09833971410989761,
-0.6933021545410156,
1.4028377532958984,
-0.07652216404676437,
-0.02545243315398693,
0.17356915771961212,
0.3534800708293915,
0.15535041689872742,
-0.10621629655361176,
0.4600422680377... |
def deletenode ( node ) : node. val = node. next. val node. next = node. next. next | [
0.28991034626960754,
0.3353533446788788,
0.4530653655529022,
-0.3902347981929779,
-0.17066019773483276,
-0.03098231740295887,
-0.34874647855758667,
0.6480385065078735,
0.9048944115638733,
-0.14234119653701782,
0.024634411558508873,
1.3406931161880493,
-0.4441322088241577,
0.684495866298675... |
def undo ( self, * args ) : key = self. data [ key ] command = deletecommand ( track = false ) command. do ( key ) | [
-0.2057913839817047,
0.030302442610263824,
0.6176490187644958,
-0.37566322088241577,
0.6750481724739075,
0.2776571214199066,
0.5137071013450623,
1.069143533706665,
-0.7840026021003723,
-0.38471052050590515,
0.5854572653770447,
0.6968193054199219,
-0.27487948536872864,
-0.7400334477424622,
... |
def openlinesforpoint ( self, n, p, num ) : othern = self. othernumber ( n ) lines = self. linesforpoint ( p ) openlines = [ ] for l in lines : blocked = false values = self. linetovalues ( l ) p1 = 0 for v in values : if ( v = = othern ) : blocked = true break elif ( v = = n ) : p1 + = 1 if ( p1 = = num and not blocke... | [
-0.17232364416122437,
-0.2044261395931244,
0.560582160949707,
0.9116688966751099,
-0.21780449151992798,
0.11662007868289948,
-0.11431504786014557,
0.017337584868073463,
0.4592525362968445,
-0.09495826065540314,
0.07451602816581726,
-0.43845051527023315,
-0.14490178227424622,
0.228724420070... |
def on _ event _ prepare _ finished ( self ) : logger. info ( " preparations finished ", extra = dict ( event ='prepare _ finished') ) | [
0.28561481833457947,
-0.591745138168335,
0.5149867534637451,
0.01832466572523117,
0.12211579829454422,
-0.3897521197795868,
-0.45938050746917725,
0.574198842048645,
-0.1103811115026474,
0.7058714628219604,
-1.5112394094467163,
0.3885047137737274,
1.4042840003967285,
1.1628217697143555,
0... |
def sms _ service _ request ( ) : rcv _ msg = request. form ['body'] # start our response resp = messagingresponse ( ) match = patt. search ( rcv _ msg ) if ( match ) : rcv _ msg = " water " in _ dic = actions. get ( rcv _ msg ) # if command is present in dictionary if ( in _ dic = = none ) : action _ msg = " i only un... | [
-0.23559309542179108,
-0.10431055724620819,
0.6406846642494202,
-0.10580791532993317,
0.12028329819440842,
-0.4926104247570038,
-0.26929566264152527,
-0.1454746127128601,
0.8628968000411987,
-0.5032334923744202,
0.8643685579299927,
0.5398910045623779,
-0.791592001914978,
0.5491093993186951... |
def service _ destroy ( context, instance _ id ) : return impl. service _ destroy ( context, instance _ id ) | [
-0.8922450542449951,
-0.39267370104789734,
0.21132996678352356,
-0.8881019949913025,
0.3764244318008423,
-0.146651029586792,
0.22526906430721283,
0.37705400586128235,
0.37211257219314575,
0.4409594237804413,
0.5021923780441284,
0.8613176941871643,
-0.4862818121910095,
0.23567445576190948,
... |
def available ( ) - > int : storage = psutil. disk _ usage ('/') return storage. free | [
-0.5489644408226013,
0.6775742173194885,
0.6795963048934937,
0.1381954848766327,
-0.5208845138549805,
0.13359853625297546,
0.5829572081565857,
0.29954445362091064,
-0.6373603343963623,
0.37425854802131653,
0.14126020669937134,
-0.31161531805992126,
-0.05652787163853645,
0.4982367157936096,... |
def maxprofit ( self, prices : list [ int ] ) - > int : total _ profit = 0 curr _ hold = prices [ 0 ] for num in prices [ 1 : ] : if num > curr _ hold : total _ profit + = num - curr _ hold curr _ hold = num return total _ profit | [
-0.24057161808013916,
-0.35724472999572754,
0.7631761431694031,
1.2662713527679443,
0.5701079368591309,
0.498857319355011,
0.3512781858444214,
0.058017630130052567,
0.5602543354034424,
0.2525656521320343,
-0.15734758973121643,
-0.11333035677671432,
-1.1500447988510132,
-0.4338950514793396,... |
def get _ form _ details ( form ) : details = { } # get the form action ( requested url ) action = form. attrs. get ( " action " ). lower ( ) # get the form method ( post, get, delete, etc ) # if not specified, get is the default in html method = form. attrs. get ( " method ", " get " ). lower ( ) # get all form inputs... | [
-0.6256464719772339,
-0.27399832010269165,
0.6678962111473083,
-0.30289387702941895,
0.20356439054012299,
-0.5570090413093567,
-0.3114679753780365,
-0.19359812140464783,
-0.5179069638252258,
-0.6183565855026245,
-0.6502560973167419,
-0.5935247540473938,
0.5191611647605896,
1.65929341316223... |
def test _ unsubscribe _ not _ authorized ( subscriptions ) : subscriptions. get _ by _ id. return _ value = mock ( uri ='acct : bob @ hypothes. is ', active = true ) request = magicmock ( authenticated _ userid ='acct : fred @ hypothes. is ', get = {'subscription _ id':'subscription _ id'} ) with pytest. raises ( http... | [
0.48435577750205994,
0.18525007367134094,
0.29960140585899353,
0.8723018765449524,
-0.3906192183494568,
0.03289174288511276,
-0.5000835657119751,
0.07977775484323502,
-0.2222602516412735,
-1.0857417583465576,
0.033601466566324234,
0.004292132332921028,
0.12036919593811035,
0.08569001406431... |
def _ _ init _ _ ( self, options, * args, * * kwargs ) : super ( ). _ _ init _ _ ( [ ] ) self. options = [ str ( option ) for option in options ] self. multi _ select = widgets. selectmultiple ( options = self. options, description = " label : " ) widgets. link ( ( self, " options " ), ( self. multi _ select, " options... | [
-0.27669790387153625,
0.1985148936510086,
0.6137839555740356,
-0.01892275922000408,
0.10381514579057693,
0.30611035227775574,
-0.2615344822406769,
-0.3026907742023468,
0.4584936797618866,
0.2405841052532196,
-0.47946056723594666,
-0.6369215846061707,
0.24670721590518951,
0.5103556513786316... |
def _ _ init _ _ ( self, state _ tran, state _ word _ len, variables, outputs ) : self. state _ tran = state _ tran self. state _ word _ len = state _ word _ len self. outputs = outputs self. next _ state = self. internaloptimizer ( state _ word _ len, variables ) self. output = self. internaloptimizer ( state _ word _... | [
0.424242228269577,
0.15489588677883148,
0.2963677644729614,
-0.14055313169956207,
-0.7640778422355652,
-1.2770003080368042,
0.30052754282951355,
0.23591475188732147,
-0.0951065942645073,
0.12632633745670319,
-0.500549852848053,
-0.17962485551834106,
-0.006515262182801962,
-0.04263646900653... |
def torrent _ stream _ player ( torrent _ file ) : return {'content _ id': receive _ content _ id ( torrent _ file ),'torrent _ stream _ player': torrent _ stream _ player, } | [
0.48001542687416077,
-1.0996865034103394,
0.24365739524364471,
-1.3497060537338257,
0.28652164340019226,
-0.012952106073498726,
-0.14170141518115997,
-1.0724645853042603,
-0.5668114423751831,
0.8287515044212341,
-0.6716606020927429,
0.09339571744203568,
-0.5169338583946228,
-0.573105752468... |
def test _ xp _ keywords ( self ) : self. assertequal ( self. image. xp _ keywords, baseline ( " " " xp - style keywords " " " ) ) | [
0.9548807144165039,
0.054680999368429184,
0.16112621128559113,
0.6247423887252808,
0.35006633400917053,
0.49493408203125,
-1.4844492673873901,
-0.23530523478984833,
0.8874725699424744,
0.43805909156799316,
-0.5393984317779541,
0.45447492599487305,
-1.0830694437026978,
0.2055119127035141,
... |
def get ( self, get _ id ) : sheet = self. open ( ) position = sheet. find ( str ( get _ id ) ) try : data = sheet. cell ( position. row, position. col + 1 ). value data = data. replace ('\'', " \ " " ) print ( data ) return json. loads ( data ) except gs. exceptions. cellnotfound : return json. loads ( {'error':'id'+ ... | [
-0.6589258313179016,
-0.7039445042610168,
0.8144897222518921,
-0.2257918119430542,
-0.2440764456987381,
-0.5529335141181946,
-1.1946649551391602,
-0.7163867950439453,
-0.8822028040885925,
0.49283453822135925,
0.2015036642551422,
1.112489938735962,
0.3311387896537781,
0.06487374007701874,
... |
def enforce _ species _ splitting ( self, group ) : if not self. must _ enforce _ single _ species : return [ group ] max _ length = max ( group, key = op. itemgetter ('length') ) max _ length = max _ length ['length'] if max _ length < nr _ min _ homogeneous _ size or len ( group ) = = 1 : return [ group ] self. logge... | [
-0.6548516750335693,
0.7858676910400391,
0.42857658863067627,
0.40054890513420105,
0.17822931706905365,
0.12455687671899796,
0.44759082794189453,
-0.28827017545700073,
0.06219704821705818,
0.1133066937327385,
0.36573657393455505,
0.5143500566482544,
-1.3024680614471436,
0.849981427192688,
... |
def get _ meta _ and _ content ( self ) : meta _ notation = " - - - " with io. open ( self. src _ file _ path, " rt ", encoding = " utf - 8 " ) as fd : textlist = fd. read ( ). lstrip ( ). splitlines ( ) if textlist [ 0 ]! = meta _ notation : raise exception ( " disallow anything except newline " " before begin meta no... | [
-0.10628393292427063,
-0.2791256606578827,
0.8718249797821045,
0.26605260372161865,
-0.5738123655319214,
-0.08966140449047089,
-0.20859701931476593,
0.638385534286499,
-1.191642165184021,
0.24875570833683014,
0.43848922848701477,
0.1357027143239975,
-0.18487732112407684,
0.6518563628196716... |
def from _ dict ( cls, dikt ) - >'comadobecqsocialuserendpointsimplusersgroupfrompublishservletproperties': return util. deserialize _ model ( dikt, cls ) | [
0.06760110706090927,
0.029567262157797813,
0.008397872559726238,
0.10766175389289856,
-1.0426753759384155,
1.100647211074829,
-0.3033443093299866,
0.23589803278446198,
-0.01240983884781599,
0.3752666115760803,
0.24307788908481598,
-0.8252365589141846,
-0.06701276451349258,
-0.3197396397590... |
def instance _ get _ all _ by _ filters ( context, filters, sort _ key ='created _ at ', sort _ dir ='desc ', limit = none, marker = none ) : return impl. instance _ get _ all _ by _ filters ( context, filters, sort _ key, sort _ dir, limit = limit, marker = marker ) | [
-0.6791616678237915,
0.3495604395866394,
0.5407367944717407,
0.17432056367397308,
0.34658628702163696,
-0.25001972913742065,
0.07395803928375244,
-0.44574370980262756,
-0.25325754284858704,
-0.25088903307914734,
0.734856128692627,
0.9581197500228882,
0.48969921469688416,
-0.050272800028324... |
def create _ size _ specific ( bouquet _ designs : list [ bouquetdesign ], composer _ class : type [ composer ] ) - > dict [ size, composer ] : bouquet _ design _ by _ size : dict [ size, list [ bouquetdesign ] ] = defaultdict ( list ) for bouquet _ design in bouquet _ designs : bouquet _ design _ by _ size [ bouquet _... | [
-0.36605995893478394,
0.6510668396949768,
0.48448115587234497,
-0.10286074876785278,
-0.09283579885959625,
-0.37806275486946106,
0.5032872557640076,
0.015213844366371632,
0.9434987306594849,
-0.22948786616325378,
-1.5806548595428467,
-0.9302739500999451,
0.9346354603767395,
0.5691730976104... |
def _ get _ frame ( frame _ no ) : # + 1 since the calling ` get _ frame ` adds one more frame # pylint : disable - msg = w0212 return sys. _ getframe ( frame _ no + 1 ) | [
-0.08496659994125366,
0.9479231238365173,
0.4177413582801819,
0.5946622490882874,
0.216512069106102,
-2.0950353145599365,
0.6761066317558289,
-1.1533511877059937,
0.33040645718574524,
-1.3289088010787964,
-0.017665540799498558,
1.0876705646514893,
0.1882103532552719,
0.5773999094963074,
... |
def list _ inventory ( self ) : # check if there are any item's at all if len ( self. inventory ) < 1 : print ( " there are no items in the inventory... things can be picked up using'ta [ obj ]'" ) return for item in self. inventory : data = self. inventory [ item ] print ( " {! s } - {! s } ". format ( data ['name'], ... | [
-0.632854700088501,
-1.1845200061798096,
0.4451671540737152,
-0.4508335590362549,
0.6435911655426025,
0.2980448007583618,
-0.6833871603012085,
0.371946781873703,
0.060997799038887024,
0.3905612826347351,
-0.01355061773210764,
0.644584596157074,
0.427766889333725,
0.19256821274757385,
-0.... |
def encoding ( self ) : return self. settings. get ('encoding ', default = default _ encoding ) | [
-0.2695382237434387,
0.8984814286231995,
0.30270639061927795,
1.0879225730895996,
0.9442142248153687,
0.1461048722267151,
0.45387089252471924,
-0.26880592107772827,
0.2570793628692627,
0.24342209100723267,
-0.4827769696712494,
-0.46733328700065613,
-0.5238360166549683,
-0.25528284907341003... |
def join ( self, * args, append ='' ) : new _ args = [ ] for arg in args : if isinstance ( arg, file ) or isinstance ( arg, filenode ) : new _ args. append ( arg. path ) else : assert isinstance ( arg, str ),'expected either file, filenode'\'or str, but found ` { 0 } ` '. format ( type ( arg ). _ _ name _ _ ) new _ arg... | [
-0.1003604531288147,
0.14334431290626526,
0.5261772274971008,
0.29635703563690186,
0.4924347400665283,
0.18479031324386597,
-0.04852793365716934,
0.30220118165016174,
-0.847391664981842,
-1.1413015127182007,
1.5005351305007935,
0.08761465549468994,
-0.7888128161430359,
0.7819107174873352,
... |
def standings _ to _ str ( standings ) : string ='\ n'prev _ points = 0 place _ tie = 0 for i, team in enumerate ( standings, 1 ) : points = team ['points'] if points = = prev _ points : place = place _ tie else : place, place _ tie = i, i # increment string + = f " { place }. { team ['name'] } ( { points } ) \ n " pre... | [
-0.20428955554962158,
-1.249332308769226,
0.5025376677513123,
-0.04997216910123825,
-0.4170593321323395,
0.26701411604881287,
0.1535390019416809,
-0.5593054294586182,
0.1886502206325531,
0.7423138618469238,
0.4439604878425598,
-0.07151748985052109,
0.7627221941947937,
-0.78840172290802,
... |
def test _ determine _ job _ array _ parameters ( self ) : self. assertequal ( self. job _ 1. iterate _ by, ['species ','conformers'] ) self. assertequal ( self. job _ 1. number _ of _ processes, 3 * 6 ) self. assertequal ( self. job _ 1. workers, 4 ) | [
-0.3260701894760132,
-0.7294188737869263,
0.4996231496334076,
0.1740833818912506,
1.0117074251174927,
0.45403987169265747,
-0.06557240337133408,
-0.35884255170822144,
-1.1232496500015259,
-0.2538065016269684,
-0.44481953978538513,
0.3493881821632385,
-0.644442617893219,
0.8194368481636047,... |
def test _ intraday _ fill _ missing _ times ( self ) : def mock _ get _ history _ db _ config ( db ) : return { " bar _ size " : " 2 hours ", " universes " : [ " usa - stk " ], " vendor " : " ibkr ", " fields " : { " close " : " float ", " open " : " float ", " high " : " float ", " low " : " float ", " volume " : " f... | [
-0.5836027264595032,
0.5329434871673584,
0.9646819233894348,
-0.38180482387542725,
0.6131054162979126,
0.18493272364139557,
0.6406679153442383,
-0.541430652141571,
-0.40726330876350403,
0.22464004158973694,
-0.24094800651073456,
-0.10042248666286469,
-0.20944994688034058,
0.493139982223510... |
def _ _ eq _ _ ( self, other ) : if not isinstance ( other, paymentsummaryinfooperationsoperation ) : return false return self. _ _ dict _ _ = = other. _ _ dict _ _ | [
-0.3646082282066345,
0.4806937575340271,
0.9653050899505615,
-0.2127329260110855,
-0.6263301968574524,
-0.11018741130828857,
0.7659936547279358,
-0.8083411455154419,
1.2974294424057007,
0.007565097883343697,
-0.3943774998188019,
-1.0465608835220337,
0.0023183394223451614,
-1.04308331012725... |
def place _ schematic _ components ( self ) : switch _ tpl = self. jinja _ env. get _ template ( " schematic / keyswitch. tpl " ) component _ count = 0 components _ section = " " # place keyswitches and diodes for key in self. keyboard. keys : placement _ x = int ( 600 + key. x _ unit * 800 ) placement _ y = int ( 800 ... | [
-0.733638346195221,
-0.08538956195116043,
0.6202714443206787,
-1.4636222124099731,
-0.04907811060547829,
0.39948973059654236,
0.1736295223236084,
0.3294432461261749,
-0.09914371371269226,
0.20893774926662445,
0.6279138326644897,
-0.636687695980072,
0.14978563785552979,
0.12361606955528259,... |
def contains _ any ( str, str _ set ) : return 1 in [ c in str for c in str _ set ] | [
-0.28786608576774597,
-0.7396147847175598,
0.05122895911335945,
-0.9144535660743713,
-0.2795499265193939,
-0.39537179470062256,
-1.4559139013290405,
-0.5039134621620178,
-1.2956405878067017,
-0.2834531366825104,
0.6726758480072021,
0.5670584440231323,
-1.0078192949295044,
0.130232304334640... |
def buy _ cow ( cb _ settings, herd, genotypes, screen ) : if cb _ settings. score > = 200 : cb _ settings. score - = 200 cow = cow ( cb _ settings, genotypes, genotypes, screen ) herd. add ( cow ) | [
-0.5028557181358337,
0.7475714087486267,
0.4218306541442871,
1.1757514476776123,
1.6100860834121704,
0.24452057480812073,
0.395500123500824,
-1.1646398305892944,
0.1620725840330124,
0.27429693937301636,
-0.2402483969926834,
0.8941125273704529,
0.14332273602485657,
0.30686673521995544,
0.... |
def delete _ short _ circuit ( self, name ='sc') : # get the events folder evt _ folder = self. app. getfromstudycase ('intevt') # find short circuit events and clear if they exist sc = evt _ folder. getcontents ( name + '. evtshc') scc = evt _ folder. getcontents ( name +'_ clear'+ '. evtshc') if sc : sc [ 0 ]. delete... | [
0.8953922986984253,
-0.37149524688720703,
0.7664667367935181,
0.08963677287101746,
-0.8603689670562744,
0.2036595493555069,
0.4467594027519226,
-0.3212118148803711,
0.7643207907676697,
1.2008678913116455,
-0.11585576087236404,
0.6910828948020935,
0.2031814455986023,
0.5087977647781372,
0... |
def status ( self ) : today = datetime. date. today ( ) if self. due _ date is not none and self. due _ date < today : return " overdue " else : return self. _ status | [
0.018063398078083992,
-0.710949718952179,
0.62044757604599,
-0.6026670336723328,
-0.5259268879890442,
0.3306935429573059,
-0.679014265537262,
-0.7731865644454956,
-0.10877612233161926,
-0.550914466381073,
1.4070425033569336,
-0.058455269783735275,
0.4747564196586609,
0.09623255580663681,
... |
def roundedcorner ( radius, fill = 255, outline = 50 ) : corner = image. new ('l ', ( radius, radius ), white ) draw = imagedraw. draw ( corner ) draw. pieslice ( ( 0, 0, radius * 2, radius * 2 ), 180, 270, fill = fill, outline = outline ) return corner | [
-0.019280189648270607,
-0.5749728679656982,
0.5509072542190552,
-2.051485061645508,
-0.8863335847854614,
0.04574832692742348,
0.0611945316195488,
-0.48167306184768677,
0.4726853370666504,
-0.20922856032848358,
0.16960446536540985,
0.7025018334388733,
0.24209682643413544,
0.9602322578430176... |
async def get _ all _ tasks _ for _ callback ( self, callback : union [ callback, dict ] ) - > mythicresponse : url = " { } { } : { } / api / v { } / tasks / callback / { } ". format ( self. _ http, self. server _ ip, self. _ server _ port, self. _ server _ api _ version, callback. id if isinstance ( callback, callback... | [
-0.654496967792511,
-0.12092567980289459,
0.6470529437065125,
0.20433586835861206,
0.27317410707473755,
-0.8766708374023438,
-0.19674326479434967,
0.24933931231498718,
0.8399649858474731,
0.05548611655831337,
-0.9126320481300354,
-0.1292964667081833,
-0.36431601643562317,
0.807823717594146... |
def freedom ( a ) : n = 1 for i in range ( len ( a ) ) : if a [ i - 1 ] is a [ i ] : n * = 2 return n | [
-0.21799620985984802,
0.5458899736404419,
0.6564359664916992,
1.1857008934020996,
-0.521072506904602,
-0.6749606132507324,
1.485371708869934,
0.5788966417312622,
1.0331417322158813,
0.28677842020988464,
-0.8944592475891113,
0.5924256443977356,
-0.17209765315055847,
1.1734014749526978,
0.... |
def convert _ df _ to _ lists ( df, convert _ to _ vector = true ) : lists = df. values. tolist ( ) input = [ ] output = [ ] for list in lists : input. append ( list [ : len ( list ) - 1 ] ) output. append ( int ( list [ len ( list ) - 1 ] ) ) if convert _ to _ vector : for pos in range ( len ( output ) ) : match _ res... | [
-1.652342677116394,
-0.11129605770111084,
0.5361150503158569,
0.3721042275428772,
0.42612066864967346,
-0.6392431259155273,
0.7204083204269409,
0.7710896134376526,
0.044244080781936646,
0.3056289553642273,
-0.6648101806640625,
-0.40011879801750183,
0.2153625786304474,
0.36125636100769043,
... |
def prime ( num ) : if num < = 1 : return false elif num < = 3 : return true else : for var in range ( 2, int ( math. sqrt ( num ) + 1 ) ) : # math. squrt will give square root of num if num % var : f = true else : f = false break if f : return true else : false | [
-0.4727742671966553,
0.6695963144302368,
0.6424282193183899,
0.3955075442790985,
-0.474828839302063,
0.34156227111816406,
-0.9601808190345764,
-0.06419329345226288,
1.083767294883728,
-0.5584946274757385,
0.11874154210090637,
-0.6458717584609985,
-1.3663179874420166,
-0.2655433714389801,
... |
def test ( ) : import doctest try : from entrian import coverage coverage. start ('pymeldlite') except importerror : coverage = false import pymeldlite result = doctest. testmod ( pymeldlite ) if coverage : analysis = coverage. getanalysis ( ) analysis. printanalysis ( ) return result | [
0.48142609000205994,
0.19353343546390533,
0.42845234274864197,
0.24244984984397888,
0.3024753928184509,
-0.1085796058177948,
0.3345814049243927,
-0.7854995727539062,
0.8263452649116516,
-0.7149197459220886,
0.7047460675239563,
-0.048920828849077225,
-0.7934496402740479,
-0.2707791924476623... |
def sleep _ timer ( enable = none, period = 1800, add = none, clear = none, refresh = none, * * kwargs ) : reason = kwargs. setdefault ( " reason ", " unknown " ) if enable! = none : log. warning ( " using deprecated argument'enable'- use'add'or'clear'instead " ) # helper function to get all scheduled sleep timers def ... | [
0.159425288438797,
0.2741900384426117,
0.801916778087616,
0.5442171692848206,
-1.0652196407318115,
-0.06891528517007828,
-0.7788548469543457,
-0.03587371110916138,
0.47180411219596863,
0.6945120096206665,
0.19849605858325958,
0.585221529006958,
-0.7427686452865601,
0.5116227269172668,
0.... |
def get _ operations ( calc ) : if check _ integrity ( calc ) : return [ key for key in calc ['operations'] ] | [
-0.309539258480072,
1.3197063207626343,
0.33790498971939087,
1.0601880550384521,
0.34169983863830566,
-0.3411712050437927,
0.23339316248893738,
-0.38903558254241943,
0.35866859555244446,
0.42870569229125977,
0.2682899236679077,
-1.128718376159668,
0.27382224798202515,
-0.45142823457717896,... |
def read _ table ( filename, n _ chunk = 100000, format = " ipac " ) : names = none lines = [ ] for i, line in enumerate ( open ( filename,'r') ) : lines. append ( line. rstrip ( os. linesep ) ) if i % n _ chunk = = n _ chunk - 1 : if i < n _ chunk : # first chunk = ascii. read ( lines, format = format, guess = false )... | [
-0.003289892105385661,
-0.5853844881057739,
0.8910525441169739,
0.46076732873916626,
-0.7348856925964355,
-0.23006322979927063,
-0.4179501235485077,
-0.7425384521484375,
-1.5258259773254395,
-0.13292627036571503,
0.5666791796684265,
-0.5619943737983704,
0.503635823726654,
0.327625244855880... |
def _ load ( self ) : dbc = self. _ dbh. cursor ( ) # fmt : off dbc. execute ( " select destination " " from relocated " " where gid = % s and address = % s ", ( self. _ gid, self. _ addr. localpart ), ) # fmt : on destination = dbc. fetchone ( ) dbc. close ( ) if destination : destination = destinationemailaddress ( d... | [
0.26385632157325745,
0.2234542816877365,
0.577886700630188,
-1.1419438123703003,
-0.30864161252975464,
-0.3779028654098511,
-0.47706088423728943,
0.4283868670463562,
-0.5054813623428345,
0.4972788691520691,
0.08895979076623917,
0.5496070384979248,
0.06311864405870438,
-0.4894525408744812,
... |
def getactiveset ( cell, targetdir ) : # add the already active sides activeset = set ( ). union ( filter ( lambda side : side. isactive ( ), cell. sides ) ) # get the sides adjacent the targetdir adjsidedirs = targetdir. getadjacentsides ( ) for adjsidedir in adjsidedirs : adjside = cell. sides [ adjsidedir ] # if the... | [
0.7037081718444824,
-0.3011411726474762,
0.6707361936569214,
-0.9107924103736877,
-0.28840669989585876,
-0.8660365343093872,
-0.1596129983663559,
-0.4836724102497101,
0.5403894186019897,
-0.39355024695396423,
0.8460620641708374,
1.0146478414535522,
-0.15847505629062653,
-0.797684907913208,... |
def locallyconvdense ( n _ modules, n _ units, mode, kernel _ size = 1, length _ kernel _ size = 1 ) : if n _ modules = = 1 : return tl. dense ( n _ units ) if kernel _ size % 2! = 1 : raise valueerror ('currently we only handle odd kernel sizes.') half = ( kernel _ size - 1 ) / / 2 pad _ widths = [ [ 0, 0 ], [ 0, 0 ],... | [
0.3655906915664673,
-0.10906492918729782,
0.6774056553840637,
-0.4882758855819702,
-0.11692377179861069,
-0.4264434278011322,
-0.244095578789711,
-0.5167946815490723,
0.07786538451910019,
0.3989191949367523,
0.08450879156589508,
-0.3270878195762634,
0.3275333642959595,
-0.18685385584831238... |
def _ fit _ cutout _ wcs ( self, cutout _ wcs, cutout _ shape ) : # getting matched pixel, world coordinate pairs # we will choose no more than 100 pixels spread evenly throughout the image # centered on the center pixel. # to do this we the appropriate " step size " between pixel coordinates # ( i. e. we take every it... | [
0.4867115318775177,
-0.08887050300836563,
0.5763447880744934,
-0.4437626898288727,
-0.7160595655441284,
-0.22805656492710114,
0.04946540296077728,
0.2442699372768402,
0.7095847725868225,
0.3682914674282074,
0.5326675772666931,
0.5981500744819641,
-0.20968544483184814,
0.26548153162002563,
... |
def get _ node _ label ( self, id : str ) - > str : if id not in self. _ id _ to _ label : return id return self. _ id _ to _ label [ id ] | [
-0.9706625938415527,
-0.38393592834472656,
0.24651183187961578,
-1.0757930278778076,
0.044140178710222244,
0.5122283697128296,
-0.7497530579566956,
-1.3290101289749146,
0.5915830731391907,
1.0640541315078735,
0.6144367456436157,
0.7689357399940491,
-0.10753665864467621,
-0.3998730182647705... |
def test _ parse _ fault _ response ( self ) : # example cpe - > acs fault response. copied from : # http : / / djuro82. blogspot. com / 2011 / 05 / tr - 069 - cpe - provisioning. html cpe _ string = b'''< soapenv : envelope soapenv : encodingstyle = " http : / / schemas. xmlsoap. org / soap / encoding / " xmlns : soap... | [
0.6137167811393738,
-0.21610970795154572,
0.5277989506721497,
-0.5815707445144653,
0.08102229982614517,
-0.2505000829696655,
0.23949916660785675,
-0.1866179257631302,
0.6664150953292847,
-0.6509380340576172,
-0.1624101996421814,
0.13771452009677887,
-0.4130103886127472,
0.19545309245586395... |
def certificate _ name ( self ) - > str : return pulumi. get ( self, " certificate _ name " ) | [
0.8671055436134338,
0.10788966715335846,
0.4945909380912781,
0.3944585621356964,
-0.1119728609919548,
0.9907582402229309,
-0.5436179041862488,
0.41358304023742676,
0.15249817073345184,
0.7501164674758911,
0.33763936161994934,
0.16585701704025269,
0.47629642486572266,
-1.1827338933944702,
... |
def main ( ) : service. prepare _ service ( ) conf. set _ override ('debug ', true,'music _ api') conf. set _ override ('mock ', true,'music _ api') conf. set _ override ('hostnames ', ['music2'],'music _ api') music = db _ backend. get _ client ( ) print ( " music version % s " % music. version ( ) ) # randomize the n... | [
-0.04611785337328911,
0.22962069511413574,
0.7628933787345886,
0.32276174426078796,
0.24522395431995392,
-0.2949863076210022,
-0.4122315049171448,
0.34218630194664,
-0.9570149183273315,
0.23938705027103424,
0.011528628878295422,
0.34190961718559265,
0.12274343520402908,
-0.2140554636716842... |
def _ _ init _ _ ( self, name, identification ) : self. identification = identification self. name = name | [
0.14103931188583374,
-1.2801628112792969,
0.4830714762210846,
0.5109186768531799,
-0.3173418343067169,
0.21486105024814606,
-1.22581148147583,
0.37596365809440613,
-0.06939628720283508,
0.49214622378349304,
-1.4714373350143433,
0.5305742025375366,
0.5367967486381531,
-0.08988640457391739,
... |
def getvalue ( self, searcher ) : find _ spec = file _ system _ searcher. findspec ( location _ regex = self. path, case _ sensitive = false ) path _ specs = list ( searcher. find ( find _ specs = [ find _ spec ] ) ) if not path _ specs : raise errors. preprocessfail ( u'unable to find path : { 0 : s } '. format ( self... | [
-0.5865398645401001,
-0.6517599821090698,
0.5531496405601501,
0.5691591501235962,
0.09198734909296036,
-0.1809738576412201,
1.290466070175171,
-0.4709060490131378,
-0.46695494651794434,
-0.0010595438070595264,
0.8463116884231567,
-0.3503310978412628,
0.30160412192344666,
0.4970185458660126... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.