text stringlengths 25 2.19k | embedding listlengths 768 768 |
|---|---|
def get _ imgs _ incr ( used, img, n ) : img _ incr _ list = [ ] for j in range ( num _ incr ) : img _ incr = copy. deepcopy ( img ) index = 0 cx = random. randint ( margin, img _ width - margin - width ) cy = random. randint ( margin, img _ height - margin - height ) while index < n : if cx + width + spacing < = used ... | [
-0.6170684099197388,
-0.13666470348834991,
0.7819235324859619,
-0.7577976584434509,
-0.5670007467269897,
-0.05593288317322731,
0.5734442472457886,
-0.05409669131040573,
0.7346469163894653,
0.5659376978874207,
0.02217244915664196,
-0.2136579304933548,
0.06365126371383667,
0.8487033247947693... |
def getstrrowidxbymap ( self, * args ) : return _ snap. ttable _ getstrrowidxbymap ( self, * args ) | [
-0.1606086641550064,
-0.0444771870970726,
0.19514283537864685,
0.501278281211853,
-0.7542276382446289,
-0.5220082402229309,
0.8999987840652466,
-0.5150613188743591,
-0.06864555925130844,
0.07450766116380692,
-0.7232493758201599,
-0.6948410868644714,
-0.6594212055206299,
-0.0338818058371543... |
def serialize ( self ) : return {'text': self. text,'title': self. title,'day': self. day. date. strftime ('% d - % m - % y'),'id': self. id } | [
-1.413543462753296,
-1.0777322053909302,
0.641587495803833,
-1.222470760345459,
-1.1453275680541992,
0.3550574779510498,
-1.0601975917816162,
-0.6138909459114075,
-0.20557774603366852,
-0.5358892679214478,
-0.8027352690696716,
-0.16600124537944794,
-0.5301350951194763,
0.3936011791229248,
... |
def test _ is _ valid _ image _ positive ( monkeypatch ) : integration _ path = os. path. normpath ( os. path. join ( f'{ git _ path ( ) } / demisto _ sdk / tests ','test _ files ','not _ default _ image _ integration - zoom. yml') ) structure = mock _ structure ( file _ path = integration _ path ) # adding monkey patc... | [
-0.03002277761697769,
0.1253465712070465,
0.42462798953056335,
0.39622774720191956,
0.3209601938724518,
0.6162273287773132,
0.3213590681552887,
0.5747449994087219,
0.21484865248203278,
-0.32479220628738403,
-0.3243613839149475,
-0.38648197054862976,
0.12086449563503265,
0.9614869952201843,... |
def merge _ parent _ settings ( cls ) : # get a list of all of the inner queryset classes from the bases querysets = [ getattr ( parent,'queryset ', false ) for parent in cls. _ _ bases _ _ ] # add in the inner queryset class defined on the child if'queryset'in cls. _ _ dict _ _ : querysets = [ cls. queryset ] + querys... | [
-0.5247125625610352,
0.5391277074813843,
0.6367409229278564,
-0.11523251980543137,
0.12037895619869232,
0.6077868938446045,
-0.6162813305854797,
-1.066153883934021,
-0.22299037873744965,
-1.0970712900161743,
-0.3905836045742035,
-0.31371331214904785,
-0.3259483873844147,
0.4731701314449310... |
def optiminer _ parser ( ) : for line in sys. stdin : if ('[ gpu0 ]'in line ) or ('[ gpu1 ]'in line ) : if ('share accepted!'in line ) : # [ 2017 - 02 - 13 12 : 04 : 03. 012 ] [ info ] [ gpu0 ] share accepted! ( 93 / 93 ) data = line. split ('' ) msg ='{ " timestamp " : "'+ data [ 0 ] [ 1 : - 1 ] +'", " share " : " acc... | [
0.19401155412197113,
-0.03520034998655319,
0.7045313715934753,
0.6073750257492065,
-0.04650037735700607,
-0.18842123448848724,
-0.2512928545475006,
-0.47425851225852966,
-0.7693893313407898,
0.2245083749294281,
-0.1010596826672554,
-0.1384347379207611,
-0.4994300901889801,
0.64826571941375... |
def hasflag ( self, * args ) : return _ snap. tneanetmp _ hasflag ( self, * args ) | [
0.30144065618515015,
0.10356513410806656,
0.36599263548851013,
-0.34962767362594604,
1.3516786098480225,
0.8441926836967468,
-0.3638378381729126,
0.9999740123748779,
-0.9333274364471436,
-0.47979509830474854,
-0.5363908410072327,
-1.6771125793457031,
-0.2806777358055115,
1.5072346925735474... |
def escape ( u ) : if not isinstance ( u, unicode _ type ) : raise valueerror ('only unicode objects are escapable.'+'got % s of type % s.'% ( u, type ( u ) ) ) # letters, digits, and the characters'_. -'are already treated as safe # by urllib. quote ( ). we need to add'~'to fully support rfc5849. return quote ( u, saf... | [
-0.7638782262802124,
-0.0930347740650177,
0.43202757835388184,
0.2395581603050232,
-0.7738502025604248,
-0.15986549854278564,
0.08724397420883179,
-0.11387486755847931,
0.4877951741218567,
-0.18121877312660217,
-0.7798643708229065,
1.0079902410507202,
-0.5253311395645142,
-0.64522022008895... |
def endnaintvi ( self, * args ) : return _ snap. pneanet _ endnaintvi ( self, * args ) | [
-0.6231169700622559,
0.38381850719451904,
0.17373061180114746,
-0.5745270252227783,
0.6027520895004272,
0.5341362953186035,
-0.3699496388435364,
-0.9021451473236084,
-0.7062480449676514,
-0.3973584771156311,
-0.7248798608779907,
-0.7405054569244385,
-1.35181725025177,
0.7239867448806763,
... |
async def _ async _ long _ polling ( self, * _ ) - > none : # this task will be cancelled once _ async _ stop _ long _ polling is called while true : if self. _ webhook _ reachable : self. _ long _ poll _ task = none await self. _ async _ stop _ long _ polling ( ) return try : channels = await self. _ api. pull _ point... | [
0.09201670438051224,
-0.5793072581291199,
0.6855788230895996,
0.1997164487838745,
0.34284013509750366,
-0.2939879596233368,
-0.6424989104270935,
0.4738790988922119,
0.33618849515914917,
0.979573667049408,
0.166547954082489,
-0.3054036796092987,
0.21602319180965424,
-0.23854650557041168,
... |
def z _ gifa ( zbior _ bitmap ) : imageio. mimsave ( os. getcwd ( ) +'\ \ movie _ ca. gif ', zbior _ bitmap ) | [
0.036666978150606155,
-0.5214258432388306,
0.19170768558979034,
1.0693551301956177,
0.8422256112098694,
0.0007800022140145302,
1.765878438949585,
-0.019848067313432693,
-0.26522308588027954,
0.9176056385040283,
-0.7140395641326904,
0.5707837343215942,
-1.2792562246322632,
0.267698049545288... |
def maxcpgreedybetter1 ( * args ) : return _ snap. maxcpgreedybetter1 ( * args ) | [
-1.3376414775848389,
-0.13578933477401733,
0.45248234272003174,
1.8804758787155151,
0.3549986183643341,
1.514523983001709,
0.2552852928638458,
0.2657703757286072,
-1.4567183256149292,
-0.089331716299057,
-0.6528212428092957,
0.30259811878204346,
-1.1680567264556885,
1.2769838571548462,
-... |
def test _ as _ form _ field ( self ) : form = omnimodelformfactory. create ( ) field = omnifloatfield ( name ='title ', label ='please give us a title ', required = true, widget _ class ='django. forms. widgets. numberinput ', order = 0, initial _ data = 10. 8, min _ value = 10, max _ value = 999, form = form ) field.... | [
0.023411763831973076,
0.28464841842651367,
0.45209160447120667,
-0.5530644655227661,
0.6372572779655457,
0.8630445599555969,
-0.49777284264564514,
0.3479020595550537,
0.49026817083358765,
-0.72593754529953,
-1.5478792190551758,
-0.46910765767097473,
0.43960684537887573,
0.7399653792381287,... |
def abs _ sobel _ thresh1 ( img, orient ='x ', sobel _ kernel = 3, thresh = ( 0, 255 ) ) : if orient = ='x': abs _ sobel = np. absolute ( cv2. sobel ( img, cv2. cv _ 64f, 1, 0 ) ) if orient = ='y': abs _ sobel = np. absolute ( cv2. sobel ( img, cv2. cv _ 64f, 0, 1 ) ) # rescale back to 8 bit integer scaled _ sobel = np... | [
-0.17203950881958008,
-0.11512594670057297,
0.8947199583053589,
1.1992764472961426,
-0.8274291753768921,
0.042316682636737823,
-0.7485625147819519,
-0.36511993408203125,
0.5616291165351868,
1.0793040990829468,
0.22412973642349243,
0.27253395318984985,
0.4677512049674988,
0.4557853937149048... |
def lookup _ name ( self, name ) : if isinstance ( name, symbol ) : name = name. name name = auto _ bytes ( name ) return self. _ _ functions [ name ] if name in self. _ _ functions else none | [
-0.7165209054946899,
-0.01944497786462307,
0.5340211987495422,
-0.30098170042037964,
-0.562170684337616,
-1.6213831901550293,
0.17165473103523254,
-1.7950032949447632,
0.5710585117340088,
-0.27333733439445496,
-1.0315650701522827,
-0.1083269864320755,
-0.6062626242637634,
-0.19150632619857... |
def main ( ) : run _ task ( globals ( ), sys. argv [ 1 ] ) | [
-0.45739102363586426,
0.5904164910316467,
0.5784388780593872,
1.0923742055892944,
0.6609403491020203,
0.8938031196594238,
1.1953959465026855,
0.8224614262580872,
-1.4625409841537476,
0.8720495104789734,
-1.0524439811706543,
0.8042750358581543,
0.07231017202138901,
0.6523991227149963,
-0.... |
def issorted ( self, asc = true ) : return _ snap. tintfltkdv _ issorted ( self, asc ) | [
0.10996497422456741,
-0.2174319326877594,
0.13469520211219788,
0.02628942020237446,
-0.4192502498626709,
-0.5308042764663696,
0.32996413111686707,
-0.46249356865882874,
-0.47814103960990906,
-0.5947958827018738,
-0.2902214527130127,
0.17926517128944397,
-0.46880751848220825,
1.647607922554... |
def getfltkeyide ( self, * args ) : return _ snap. tneanetmp _ getfltkeyide ( self, * args ) | [
0.6330060958862305,
-0.3594900965690613,
0.42676469683647156,
-0.48369836807250977,
1.3643690347671509,
0.19380754232406616,
-0.9861548542976379,
-0.4125736653804779,
-0.9999362230300903,
-0.30237749218940735,
-0.38679665327072144,
-0.8212825059890747,
-1.3147902488708496,
1.52928113937377... |
def validate _ request _ token ( self, client _ key, token, request ) : raise notimplementederror ( " subclasses must implement this function. " ) | [
-1.0763158798217773,
-0.4664137065410614,
0.5300599336624146,
0.5483139157295227,
-0.2595175802707672,
0.6445840001106262,
-0.580115020275116,
-0.43022316694259644,
-0.65976881980896,
-0.4696890413761139,
0.4643949270248413,
0.35356926918029785,
0.16909228265285492,
0.0849398747086525,
-... |
def setup ( self ) : self. submitter = domain. user ( 1234, email ='j. user @ somewhere. edu ', forename ='jane ', surname ='user ', endorsements = ['cs. dl'] ) # create and finalize a new submission. cc0 ='http : / / creativecommons. org / publicdomain / zero / 1. 0 /'with self. app. app _ context ( ) : classic. creat... | [
0.44463396072387695,
-0.2500429153442383,
0.6554287672042847,
0.16194027662277222,
0.7557668685913086,
0.17977970838546753,
-0.0876733586192131,
-0.2812754809856415,
-0.45209091901779175,
-0.17205263674259186,
-0.33638834953308105,
0.09749910980463028,
0.524803102016449,
0.8500496745109558... |
def get _ creates ( self ) : return { group : createtableas ( self. get _ table _ name ( group ), next ( iter ( sels ) ). limit ( 0 ) ) for group, sels in self. get _ selects ( ). items ( ) } | [
-0.8069057464599609,
0.04800715297460556,
0.3215740919113159,
-0.19904977083206177,
0.030783500522375107,
-0.1373542845249176,
-0.30939623713493347,
-1.4583114385604858,
-0.6908448934555054,
-0.0696551501750946,
-0.29589417576789856,
-0.2091810256242752,
0.23096208274364471,
0.697072446346... |
def getnormalizedurl ( * args ) : return _ snap. tstrutil _ getnormalizedurl ( * args ) | [
-0.23645974695682526,
0.33327704668045044,
0.25921550393104553,
0.5249140858650208,
0.031476736068725586,
0.3336884081363678,
0.5322975516319275,
0.5655992031097412,
-0.7333688735961914,
-0.9159393310546875,
-0.3273831605911255,
0.39858758449554443,
-0.10196924209594727,
-0.016917394474148... |
def test _ example _ input _ two _ required _ field _ interval ( self, ucc _ smartx _ selenium _ helper, ucc _ smartx _ rest _ helper ) : input _ page = inputpage ( ucc _ smartx _ selenium _ helper, ucc _ smartx _ rest _ helper ) input _ page. create _ new _ input. select ( " example input two " ) input _ page. entity2... | [
-0.6174779534339905,
0.1539263278245926,
0.688075065612793,
0.3775661885738373,
0.46222764253616333,
1.4332356452941895,
0.09149200469255447,
-0.3801432251930237,
-0.5203776955604553,
0.1454572230577469,
-1.4292181730270386,
-0.0659462958574295,
-0.25093239545822144,
0.14288826286792755,
... |
def getcmnnbrs _ pneanet ( * args ) : return _ snap. getcmnnbrs _ pneanet ( * args ) | [
-1.142369270324707,
0.6822102069854736,
0.36905214190483093,
0.07088786363601685,
0.2346995323896408,
0.1733233481645584,
-1.0791926383972168,
-1.053257942199707,
-0.6178101897239685,
-0.9495605230331421,
-0.5534266233444214,
-0.9524562954902649,
-1.2979005575180054,
0.760193407535553,
-... |
def get _ joint _ axis ( self, joint : joint ) - > cs. dm : axis = cs. dm ( joint. axis ) if joint. axis is not none else cs. dm ( [ 1. 0, 0. 0, 0. 0 ] ) return unit ( axis ) | [
0.17502042651176453,
0.09132401645183563,
0.3816435635089874,
0.5641754865646362,
0.06258675456047058,
0.0875038132071495,
0.17327405512332916,
-0.4443817138671875,
-0.30518293380737305,
-0.8073577880859375,
0.43148574233055115,
0.31342679262161255,
-0.5588854551315308,
-0.4092349708080292... |
async def feels ( self, ctx, user : discord. member = none, is _ gif = false ) : if user is none : user = ctx. message. author async with ctx. channel. typing ( ) : feels _ img = await self. make _ feels ( user, is _ gif ) if feels _ img is none : await ctx. send ( " sorry something went wrong! " ) return file = discor... | [
-0.4231640696525574,
1.1888066530227661,
0.5227952599525452,
0.5803337097167969,
-0.4542565941810608,
0.6601359248161316,
-0.12255850434303284,
0.4502881169319153,
0.30649274587631226,
-0.49821704626083374,
-0.21424444019794464,
1.3753288984298706,
-0.5814308524131775,
0.28607407212257385,... |
def ip ( self ) : return self. _ ip | [
-0.7992520928382874,
-0.6735657453536987,
0.09438054263591766,
0.7129170894622803,
-0.8608337044715881,
0.7782575488090515,
0.8554133772850037,
0.79534912109375,
0.3753914535045624,
-1.1033097505569458,
0.9686251282691956,
-0.19532909989356995,
-0.05752967670559883,
-1.8919129371643066,
... |
def split _ contigs ( headers, input _ dir, output _ dir ) : all _ gene _ ids = [ ] source = [ ] type = [ ] phase = [ ] attributes = [ ] all _ sequences = [ ] strand = [ ] isolates = [ ] regions = [ ] starts = [ ] ends = [ ] all _ raw = [ ] non _ cds = [ ] non _ divis = [ ] duplicates = [ ] not _ start = [ ] stop _ in ... | [
-0.1675870418548584,
-0.8997920751571655,
0.609082818031311,
0.0667504221200943,
-0.5762448906898499,
-1.2251613140106201,
0.32067471742630005,
0.41425734758377075,
-0.6455232501029968,
0.3581598997116089,
-0.3423321843147278,
0.2998342514038086,
-0.3374386131763458,
0.8209350109100342,
... |
def velocity _ optimized _ joint _ limits ( self ) - > cs. dm : return cs. dm ( [ self. get _ velocity _ joint _ limit ( jnt ) for jnt in self. urdf. joints if jnt. name in self. optimized _ joint _ names ] ) | [
0.0671086311340332,
0.04307961091399193,
0.43522652983665466,
0.7722498178482056,
-0.02907237596809864,
-0.28379616141319275,
-0.7106961011886597,
-0.7287349700927734,
-0.3704811930656433,
0.3609805405139923,
-0.35907143354415894,
0.3243371844291687,
-0.5837814211845398,
-0.875844478607177... |
def begnaintvi ( self, * args ) : return _ snap. tneanet _ begnaintvi ( self, * args ) | [
-0.1536775678396225,
-0.14113657176494598,
0.09548033773899078,
0.035183750092983246,
0.9639037251472473,
-0.04506613314151764,
0.598019003868103,
-0.9741197228431702,
-1.076612949371338,
-0.32743382453918457,
0.5571475028991699,
-0.38994792103767395,
-1.0749863386154175,
0.613559305667877... |
def main ( ) : # check command line arguments arguments = sys. argv [ 1 : ] if len ( arguments )! = 1 : print ( " error! one command line argument is required. " ) sys. exit ( ) else : print ( " \ nnow opening file... " ) # print the path provided and try to open the file for reading path = arguments [ 0 ] print ( path... | [
0.24338769912719727,
-0.6762879490852356,
0.9679270386695862,
-0.4596879482269287,
-0.4178924262523651,
0.551110029220581,
-0.04311145097017288,
-0.14790382981300354,
-0.8367536664009094,
-0.07546130567789078,
-0.406040757894516,
0.5237717032432556,
-0.15025033056735992,
-0.030108265578746... |
def local _ recall _ scores ( generated, ref _ data ) : recalled = defaultdict ( int ) total = defaultdict ( int ) for image, references in ref _ data. items ( ) : # count the content words in each of the reference descriptions. word _ counter = counter ( ) for reference in references : words = { word for word, tag in ... | [
0.89748215675354,
-0.14563702046871185,
0.49917247891426086,
-1.2603399753570557,
0.5445852875709534,
-0.8063881993293762,
0.15907110273838043,
-0.3327123820781708,
-0.12458671629428864,
0.480097234249115,
0.5125727653503418,
0.38517993688583374,
-0.01942746527493,
1.026151180267334,
-0.... |
def getdat ( self, * args ) : return _ snap. tstruint64vhi _ getdat ( self, * args ) | [
0.07073920220136642,
0.31057924032211304,
0.4413309097290039,
-0.15467071533203125,
0.8625692129135132,
0.48079872131347656,
0.2756972014904022,
-0.1954451948404312,
-0.5020899772644043,
-0.7227886319160461,
0.8168250918388367,
-0.4319271743297577,
0.4652663469314575,
0.1649124026298523,
... |
def get _ pdf _ source ( self, url, driver = none ) : pdf _ pages = get _ pdf _ contents ( file = url ) return pdf _ pages | [
-0.6933318376541138,
-0.10050452500581741,
0.28631412982940674,
0.14691393077373505,
0.23697179555892944,
-1.3988699913024902,
-0.1759825348854065,
0.5846261382102966,
0.23642151057720184,
-0.28293243050575256,
0.19986091554164886,
-0.8257125020027161,
0.1600855439901352,
-0.48309591412544... |
def test _ sla _ delete _ exclusion _ period ( self ) : pass | [
0.9178299307823181,
0.4179885685443878,
0.15575605630874634,
0.5161089301109314,
-0.6461348533630371,
1.5091131925582886,
0.7035254836082458,
0.6752915382385254,
1.7562990188598633,
0.03946884721517563,
-0.008923565968871117,
0.8598359227180481,
-1.1532174348831177,
-0.025179371237754822,
... |
def acoustics2d ( use _ petsc = false, kernel _ language ='fortran ', iplot = false, htmlplot = false, solver _ type ='classic ', outdir = '. / _ output ', nout = 10 ) : if use _ petsc : import petclaw as pyclaw else : import pyclaw if solver _ type = ='classic': solver = pyclaw. clawsolver2d ( ) elif solver _ type = =... | [
0.4292682111263275,
0.16669785976409912,
0.8248860836029053,
-0.2758598029613495,
0.21390317380428314,
-0.30890125036239624,
0.3960868716239929,
-0.852217972278595,
-1.0046857595443726,
-0.9531969428062439,
-0.11007261276245117,
0.1754225492477417,
0.3852331042289734,
0.46197938919067383,
... |
def getnodewcc _ pneanet ( * args ) : return _ snap. getnodewcc _ pneanet ( * args ) | [
-0.8292723298072815,
0.40722185373306274,
0.44884613156318665,
-0.35544514656066895,
0.37297824025154114,
-0.3850001096725464,
-0.031332969665527344,
-1.5268497467041016,
-0.781345784664154,
-1.435021162033081,
0.29477864503860474,
-0.10576896369457245,
-0.028983917087316513,
0.95964688062... |
def percentdegree _ pungraph ( * args ) : return _ snap. percentdegree _ pungraph ( * args ) | [
-0.7971217036247253,
0.6692371368408203,
0.12208157777786255,
0.6131067276000977,
-0.9124946594238281,
0.4793054163455963,
0.1641504019498825,
0.5057905316352844,
-0.15973640978336334,
0.25762397050857544,
-0.2600606381893158,
-0.39888128638267517,
-1.3090347051620483,
0.3084893822669983,
... |
def full _ cubic _ check ( test _ coeff ) : for perm in itertools. permutations ( np. arange ( test _ coeff. ndim ) ) : if not cubic _ check ( test _ coeff. transpose ( perm ) ) : return false return true | [
0.5785267353057861,
-0.1609819084405899,
0.3722667098045349,
0.13862381875514984,
-0.10598451644182205,
0.32899966835975647,
1.296670913696289,
0.6078511476516724,
0.32736736536026,
0.6091538667678833,
-0.4332217574119568,
-0.06812318414449692,
-1.040974497795105,
-0.6397836804389954,
-1... |
def stop ( self ) : pid = self. get _ pid ( ) if self. is _ running ( pid ) : try : os. kill ( pid, signal. sigterm ) except : pass else : logging. warning ('process % d already stopped'% pid ) self. remove _ pid ( ) | [
0.2079424262046814,
-1.1340651512145996,
0.19659262895584106,
0.0624198243021965,
0.6358563303947449,
0.3764623999595642,
-0.6484097242355347,
0.652479887008667,
-0.009013275615870953,
0.596576452255249,
-0.2790757417678833,
-0.055582303553819656,
-0.19808056950569153,
0.05634763464331627,... |
def get _ zone _ state ( self, zone _ id : str ) - > actuator : if self. _ state _ by _ endpoint is not none : return self. _ state _ by _ endpoint [ zone _ id ] raise homeassistanterror ( " unknown zone " ) | [
-0.020052123814821243,
-0.4892633259296417,
0.10484256595373154,
0.6858319044113159,
0.1305539906024933,
-1.129199504852295,
0.7032861709594727,
-0.5131984949111938,
1.561206340789795,
0.12805773317813873,
0.3106957972049713,
0.8213433027267456,
-0.5245087742805481,
-0.10713684558868408,
... |
def test _ list _ integer _ length _ 4 _ nistxml _ sv _ iv _ list _ integer _ length _ 5 _ 1 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / list / integer / schema + instance / nistschema - sv - iv - list - integer - length - 5. xsd ", instance = " nistdata / list / integer / schem... | [
-0.5350567102432251,
-0.043166328221559525,
0.27362099289894104,
0.4634266495704651,
-0.45624101161956787,
-0.14142310619354248,
0.17126737534999847,
0.04625361040234566,
0.771569013595581,
1.074202299118042,
-1.2371366024017334,
-0.43766167759895325,
-0.8436983227729797,
0.918535590171814... |
def get _ size ( self, bucket _ name : str, object _ name : str ) - > int : self. log. info ( " checking the file size of object : % s in bucket _ name : % s ", object _ name, bucket _ name ) client = self. get _ conn ( ) bucket = client. bucket ( bucket _ name ) blob = bucket. get _ blob ( blob _ name = object _ name ... | [
0.413898229598999,
-0.6494722962379456,
0.9909873604774475,
-0.3974955081939697,
0.0011488478630781174,
0.07997369021177292,
-0.2629559636116028,
-0.5213817358016968,
-1.1390297412872314,
0.4684355854988098,
-1.0285342931747437,
0.4896138608455658,
-0.31933102011680603,
-0.5947898030281067... |
def getabspath ( filename ) : app _ folder = os. getcwd ( ) # path. dirname ( os. path. realpath ( sys. argv [ 0 ] ) ) filepath = os. path. join ( app _ folder, filename ) return filepath | [
0.08941078931093216,
-1.368482232093811,
0.7168232202529907,
0.5497512817382812,
0.19018255174160004,
1.230055332183838,
1.634989857673645,
0.2051098644733429,
-1.0139214992523193,
0.02453860081732273,
0.6992666721343994,
0.012597151100635529,
0.21170228719711304,
1.3299856185913086,
0.3... |
def read _ config ( conf ) : try : output = json. load ( open ( conf ) ) except valueerror : log. critical ('error reading configuration file. please check if it'' is in the right format') raise return output | [
-0.16927307844161987,
-0.9622992873191833,
0.5667414665222168,
0.19992975890636444,
-1.3522708415985107,
-0.3296666443347931,
0.4467892348766327,
-0.09855514764785767,
-1.1076836585998535,
1.2379074096679688,
0.05417842045426369,
-0.5024527907371521,
-0.1911371648311615,
-0.637458264827728... |
def _ _ run _ scripts ( self, migrations ) : try : conn = self. _ _ get _ db _ connection ( ) cursor = conn. cursor ( ) for migration in migrations : print " \ tapplying revision : " + migration ['name'] + "... ", log _ update _ one = " " " insert into ` dbmarshal _ log ` set ` change _ number ` = % d, ` description ` ... | [
-0.44379445910453796,
-0.2579072415828705,
0.8871588706970215,
0.03271448239684105,
-0.07032356411218643,
-0.7684811353683472,
-0.04029051586985588,
0.04890383034944534,
-0.14451786875724792,
1.2334086894989014,
0.0731138288974762,
0.021150825545191765,
-0.2652641832828522,
0.7512400150299... |
def get _ drops ( self ) : return { group : " drop table if exists % s ; " % self. get _ table _ name ( group ) for group in self. groups } | [
-1.22953200340271,
0.02917754277586937,
0.33030450344085693,
-0.20620208978652954,
-0.30718836188316345,
0.175983726978302,
-0.02249380201101303,
-1.3072173595428467,
-1.5392638444900513,
0.4796922206878662,
-0.1370629221200943,
-0.2324519008398056,
0.16497214138507843,
0.5994269251823425,... |
def delifin ( self, * args ) : return _ snap. tintv _ delifin ( self, * args ) | [
-0.6702736020088196,
0.41368567943573,
0.7762284278869629,
0.9328490495681763,
-0.3924082815647125,
0.664228081703186,
0.21823441982269287,
-0.10951939225196838,
-0.41003531217575073,
-1.1285326480865479,
-0.6833750009536743,
0.5636327266693115,
-1.6919838190078735,
0.6247175931930542,
-... |
def micromovetheta ( self, angle ) : self. logger. debug ( " handling micro move theta with angle { } ". format ( angle ) ) # mark location as dirty, since i'm about to issue a move command self. bot _ loc [ " dirty " ] = true self. logger. info ( " bot loc is now marked as dirty " ) # pass distance to comm and block f... | [
-0.7886779308319092,
-0.27430927753448486,
0.40139034390449524,
-1.0453922748565674,
-0.05075737461447716,
0.2509790062904358,
0.8893725275993347,
0.00032551062759011984,
0.2885359525680542,
0.057075630873441696,
-0.6508145928382874,
-0.2926858961582184,
-0.5214065313339233,
0.146987751126... |
def putindent ( self, indentlev = 1 ) : return _ snap. tsout _ putindent ( self, indentlev ) | [
0.4337872862815857,
0.43920785188674927,
0.32997775077819824,
-0.11595644801855087,
-1.3463796377182007,
-0.4378424882888794,
0.9439959526062012,
0.8691802024841309,
-1.05983304977417,
0.7849462628364563,
-0.8549144864082336,
-0.6907514333724976,
-1.1828895807266235,
0.37588033080101013,
... |
def simulate _ dynamics ( env, x, u, dt = 1e - 5 ) : env. dt = dt env. state = x. copy ( ) x1, _, _, _ = env. step ( u ) xdot = ( x1 - x ) / dt return xdot | [
-0.5937718749046326,
1.092392921447754,
0.5025234222412109,
0.16334852576255798,
0.3119843900203705,
0.5974684953689575,
0.03167007863521576,
-0.9028507471084595,
-0.14973311126232147,
-0.8644253015518188,
-0.5924259424209595,
0.4386718273162842,
0.9736468195915222,
-0.48786303400993347,
... |
def testremoveoperrorstates ( self ) : ssd = self. original ( ) op = iecorescene. removesmoothskinninginfluencesop ( ) op. parameters ( ) ['input']. setvalue ( ssd ) op. parameters ( ) ['influencenames']. setvalue ( iecore. stringvectordata ( [ " newa ", " newb ", " newc " ] ) ) # index validity op. parameters ( ) ['mo... | [
-0.40524494647979736,
0.3557010591030121,
0.6928521394729614,
-0.0546828955411911,
-0.5330630540847778,
0.3189655542373657,
0.5085980296134949,
0.49263861775398254,
0.25875502824783325,
0.07735714316368103,
-0.5543028116226196,
-0.463080495595932,
-0.5854448676109314,
-0.40258297324180603,... |
def test _ directed _ edge _ v _ from _ and _ v _ to ( self ) : v0 = directedvertex ( val ='v0') v1 = directedvertex ( val ='v1') v2 = directedvertex ( val ='v2') v3 = directedvertex ( val ='v3') e01 = directededge ( ( v0, v1 ) ) self. assertequal ( e01. v _ from, v0 ) self. assertequal ( e01. v _ to, v1 ) with self. a... | [
-0.23395965993404388,
-0.4078763723373413,
0.40941423177719116,
-0.3046250343322754,
0.11700074374675751,
0.8260161280632019,
0.10552003979682922,
0.2448488026857376,
-0.14440220594406128,
0.2129402607679367,
-0.4297947287559509,
0.06824840605258942,
0.5445114970207214,
0.17901702225208282... |
def issorted ( self, asc = true ) : return _ snap. tintprv _ issorted ( self, asc ) | [
-1.1497000455856323,
-0.6573759913444519,
0.3810933828353882,
-0.018682964146137238,
-0.4838424623012543,
-0.06549777835607529,
-0.1123335137963295,
-0.40836209058761597,
0.07852213829755783,
-0.42264097929000854,
-0.7994770407676697,
0.2597326338291168,
-1.6556757688522339,
0.604523599147... |
def to _ item ( self, entity ) : item = item ( url = entity. url, c4 = entity. c4 ) for meta in entity. meta : item. tag ( meta. key. content, meta. value. content ) return item | [
-0.08181910216808319,
0.11063585430383682,
0.33887502551078796,
-0.2476823627948761,
0.04913369193673134,
0.6421362161636353,
-0.5296250581741333,
0.20651470124721527,
-0.31061145663261414,
0.09648994356393814,
-0.04241735860705376,
-0.23434428870677948,
0.9432342052459717,
0.4527147412300... |
def _ _ init _ _ ( self, word _ list ) : self. _ _ word _ list = self. _ _ merge _ sort ( word _ list ) self. _ _ encountered _ word = [ false ] * len ( word _ list ) | [
0.2625097930431366,
0.6160754561424255,
0.3140537440776825,
-0.06576675176620483,
0.29912909865379333,
0.30596858263015747,
0.7258703708648682,
0.8840897679328918,
0.08102118223905563,
0.3204253613948822,
-1.0455199480056763,
-0.4144443869590759,
-1.1822969913482666,
2.160443067550659,
-... |
def frame _ dapi _ 2d _ change ( self ) : self. frame _ dapi _ raw. setcurrentindex ( self. frame _ dapi _ 2d. currentindex ) | [
-1.930616855621338,
-0.6730237603187561,
0.29248863458633423,
-0.07369788736104965,
-0.3300473093986511,
-0.07015968859195709,
0.9036282300949097,
-0.1612396538257599,
-0.27877146005630493,
-0.5513584017753601,
-0.3864147663116455,
1.290766954421997,
0.5412138104438782,
0.22718793153762817... |
def group _ message _ keys ( cls, message ) : group _ key = super ( basemultivaluereport, cls ). group _ base _ message _ key ( message ) # we use assumption ( and simplification ) in here : # " multivalue " dimensions have always only one - level hierarchy extracted _ dimensions = message. dimension [ cls. dimension _... | [
-0.01685856096446514,
0.7408304810523987,
0.3783727288246155,
-0.06783884018659592,
-0.17167025804519653,
-0.638511061668396,
0.7621250152587891,
-0.7676102519035339,
-1.0980044603347778,
0.02787330560386181,
0.17340196669101715,
0.20208248496055603,
-0.6011401414871216,
1.7031657695770264... |
def get _ loss ( self, batch _ samples, batch _ labels, per _ point = true ) : if per _ point : return ( self. loss _ fn _ no _ reduction ( self. model _ obj ( torch. tensor ( batch _ samples ) ), torch. tensor ( batch _ labels ), ). detach ( ). numpy ( ) ) else : return self. loss _ fn ( self. model _ obj ( torch. ten... | [
-0.20238934457302094,
-0.5298012495040894,
0.3914099335670471,
0.4966849386692047,
0.26164400577545166,
-0.0862225815653801,
-0.074369877576828,
0.3945853114128113,
-0.31806299090385437,
-0.3347625434398651,
0.3181819021701813,
0.016949765384197235,
0.17449341714382172,
-0.6365469694137573... |
def _ _ init _ _ ( self, * args, * * kwargs ) : super ( registrationpage, self ). _ _ init _ _ ( * args, * * kwargs ) | [
-0.0008147747721523046,
1.130702018737793,
0.5785869359970093,
0.28501585125923157,
0.9297295212745667,
0.11859390139579773,
-0.43091532588005066,
0.8512458801269531,
-0.059009309858083725,
0.041944388300180435,
-0.49022218585014343,
-0.43868234753608704,
-0.13594935834407806,
0.9552611708... |
def get _ dataesr ( ) : # set working directory os. chdir ( data _ path ) # # # patent # # # patent = pd. read _ csv ( " patent. csv ", sep = " | ", encoding = " utf - 8 ", dtype = types. patent _ types, engine = " python " ) patent = patent [ [ " key _ appln _ nr ",'appln _ filing _ date ','appln _ auth ','ipr _ type ... | [
0.03265256807208061,
-0.3439357280731201,
0.8394654393196106,
-0.33044877648353577,
-0.20459049940109253,
-0.00942804291844368,
-1.0411089658737183,
1.1179838180541992,
-0.6296306252479553,
0.08250412344932556,
0.9375540018081665,
0.2295609563589096,
0.45030421018600464,
-0.457812130451202... |
def _ _ getitem _ _ ( self, key ) : return self. prefs. get ( key, none ) | [
-0.643711507320404,
-0.05621003732085228,
0.5079798102378845,
-0.24527190625667572,
-0.49491405487060547,
-0.5261005759239197,
-1.0956076383590698,
-1.2115541696548462,
-0.008382538333535194,
0.13134804368019104,
0.5367997288703918,
0.42614465951919556,
-0.3872627913951874,
-1.042153477668... |
async def blackpill ( self, ctx ) : msg = copy ( ctx. message ) msg. content = ctx. prefix + " pill # 000000 " ctx. bot. dispatch ( " message ", msg ) | [
0.7613808512687683,
-0.4520803987979889,
0.5167612433433533,
-0.6919962167739868,
1.006825566291809,
0.9962561726570129,
-0.7301603555679321,
0.14382104575634003,
0.940482497215271,
0.30628520250320435,
0.13300706446170807,
2.184109687805176,
-0.710884153842926,
-0.18921883404254913,
-0.... |
def getval ( self, * args ) : return _ snap. tgstat _ getval ( self, * args ) | [
0.2792590856552124,
1.1453672647476196,
0.273508757352829,
0.13011424243450165,
0.3275996744632721,
0.24255652725696564,
0.7948635816574097,
-0.9967835545539856,
-1.0291881561279297,
0.010849050246179104,
-0.2837071716785431,
-0.7688217163085938,
0.3995772898197174,
0.5768826603889465,
-... |
def _ _ init _ _ ( self, * args ) : _ snap. tsflt _ swiginit ( self, _ snap. new _ tsflt ( * args ) ) | [
0.3905591368675232,
0.43989723920822144,
0.22086280584335327,
-0.5647934675216675,
-0.203929141163826,
0.06348759680986404,
0.6529452204704285,
0.45484933257102966,
-1.2741621732711792,
-0.2532585561275482,
-1.7095869779586792,
-0.6169598698616028,
-0.08764667063951492,
1.2720671892166138,... |
def calculatersi ( stock, pricecolumn ) : if not isinstance ( stock, pd. dataframe ) : print ( " first parameter is not a dataframe. please try again \ n " ) return - 1 # df = stock ['adj close'] df = stock [ [ pricecolumn ] ]. copy ( ) # print ( type ( stock ) ) n = 14 df ['change'] = stock [ pricecolumn ]. diff ( ) d... | [
-1.184999942779541,
-0.0996258482336998,
0.7822909355163574,
-0.31879517436027527,
0.09658420830965042,
-1.1280516386032104,
0.519818127155304,
-0.2639979124069214,
-0.2185337394475937,
1.1344890594482422,
-0.6335307359695435,
0.6102514863014221,
-0.26382383704185486,
0.08285774290561676,
... |
def perform ( cls, client, machine _ id ) : up _ since = cls. get _ up _ since ( client, machine _ id ) client. juju ('run ', ('- - machine ', machine _ id,'sudo ','reboot'), check = false ) for x in until _ timeout ( 300 ) : try : reboot _ up _ since = cls. get _ up _ since ( client, machine _ id ) except subprocess. ... | [
-0.10226978361606598,
1.244644284248352,
0.6329390406608582,
1.1418211460113525,
0.30575817823410034,
0.0035586226731538773,
-0.14415045082569122,
-0.05511599779129028,
-0.3859533369541168,
0.2904822826385498,
-0.11340830475091934,
0.5861111879348755,
-0.7382336258888245,
0.347830623388290... |
def test _ form _ handle _ method _ calls _ handlers ( self, patched _ method ) : form _ class = self. omniform. get _ form _ class ( ) form = form _ class ( { } ) form. full _ clean ( ) form. handle ( ) self. assertequal ( patched _ method. call _ count, 2 ) patched _ method. assert _ any _ call ( form ) | [
0.023882664740085602,
0.22635574638843536,
0.48982560634613037,
0.17150935530662537,
0.3466990888118744,
0.6061998009681702,
-0.3831722140312195,
0.04640694335103035,
0.4874427318572998,
-2.041006088256836,
-0.7621755003929138,
-0.8036338686943054,
0.19120460748672485,
0.8099741339683533,
... |
def tundirnet _ load ( * args ) : return _ snap. tundirnet _ load ( * args ) | [
-1.474379062652588,
-0.40687739849090576,
0.30744150280952454,
-0.7585878372192383,
0.4585774540901184,
0.605185866355896,
0.5918155312538147,
-1.1722922325134277,
-0.661483883857727,
0.7168451547622681,
-0.38365158438682556,
-0.9200050830841064,
-1.0774167776107788,
-0.43971970677375793,
... |
def test _ base _ url ( self ) : self. storage. _ base _ url = none # this standard django test is no longer relevant since we don't make use of @ cached _ property # with self. assertraises ( valueerror ) : # self. storage. url ('test. file') self. assertequal ( self. storage. url ( " test. file " ), " / { } / test. f... | [
-0.09143517911434174,
-0.5685326457023621,
0.477922260761261,
0.8001890182495117,
1.0260848999023438,
0.5137020349502563,
0.2320283204317093,
0.03145291656255722,
-0.8135222792625427,
-0.31262531876564026,
-0.1897905468940735,
-0.17429634928703308,
-0.044220708310604095,
0.3788314163684845... |
def test _ run _ alpha _ rarefaction ( self ) : run _ alpha _ rarefaction ( self. test _ data ['biom'] [ 0 ], self. test _ data ['map'] [ 0 ], self. test _ out, call _ commands _ serially, self. params, self. qiime _ config, tree _ fp = self. test _ data ['tree'] [ 0 ], num _ steps = 5, parallel = false, min _ rare _ d... | [
0.20357219874858856,
-0.17294515669345856,
0.733421266078949,
-0.12690263986587524,
0.9717054963111877,
0.39827170968055725,
0.8589019179344177,
-0.004471482243388891,
-0.2536081373691559,
-0.5284872651100159,
0.46970975399017334,
0.2774866223335266,
-0.017433088272809982,
0.46403783559799... |
def getmaxkey ( self ) - > str : if not self. map : return " " else : return max ( self. map, key = self. map. get ) | [
-0.5714774131774902,
-0.7996380925178528,
0.5221417546272278,
0.4973696172237396,
-0.3509245812892914,
0.4282888174057007,
-1.7402974367141724,
-0.17943565547466278,
-0.02953861653804779,
0.2182084619998932,
0.8520022034645081,
0.4164932668209076,
-0.10434848070144653,
0.2716921865940094,
... |
def heuristic ( current, goal ) : ( current _ x, current _ y ) = current ( goal _ x, goal _ y ) = goal return math. sqrt ( ( current _ x - goal _ x ) * * 2 + ( current _ y - goal _ y ) * * 2 ) | [
-0.19837841391563416,
-0.8007680177688599,
0.5470146536827087,
0.36034899950027466,
-0.45461350679397583,
0.2885931134223938,
-0.2919002175331116,
0.8241169452667236,
-0.9755786061286926,
0.4810675084590912,
0.370549738407135,
0.37293797731399536,
0.2567436099052429,
-0.267058402299881,
... |
def test _ change ( clip : sw. copytoclip ) - > none : # test value test _ value = " tot " # change the widget value clip = sw. copytoclip ( ) clip. v _ model = test _ value # check assert clip. tf. v _ model = = test _ value return | [
-0.8413904905319214,
0.3751795291900635,
0.16108320653438568,
-0.09866909682750702,
-0.27540454268455505,
0.09480414539575577,
0.09563969820737839,
0.056189633905887604,
0.3003512918949127,
0.6946554780006409,
-0.46854087710380554,
0.155384361743927,
1.0280081033706665,
-0.587087094783783,... |
async def test _ config _ google _ home _ entity _ id _ to _ number ( hass : homeassistant, hass _ storage : dict [ str, any ] ) - > none : conf = config ( hass, { " type " : " google _ home " }, " 127. 0. 0. 1 " ) hass _ storage [ data _ key ] = { " version " : data _ version, " key " : data _ key, " data " : { " 1 " ... | [
-0.3865317404270172,
-0.32573986053466797,
0.6158009171485901,
0.21953900158405304,
0.9350228309631348,
-0.3189625144004822,
0.4448990225791931,
0.13541895151138306,
0.061514340341091156,
0.15101514756679535,
-1.3998427391052246,
0.3256070613861084,
1.0341304540634155,
0.9187980890274048,
... |
def post ( self ) : # step [ 1 ] : identify the action name ( if there is ) if self. req. params. has _ key ('action') : self. triggered _ action = self. req. params ['action'] # step [ 2 ] : detect the data type ( http, occi : json or occi + json ) # jbody = self. req _ adapter. convert _ request _ entity _ content ( ... | [
-0.4310307502746582,
-0.7856349349021912,
0.5794983506202698,
-0.10790977627038956,
0.5495780110359192,
-0.6246717572212219,
0.027916671708226204,
-0.20041389763355255,
-0.021670199930667877,
-0.35129880905151367,
-0.12523649632930756,
0.39528772234916687,
-0.503959596157074,
0.33479699492... |
def run _ daemon ( cfg, environ ) : name = cfg ['name'] proc = none cfg ['log'] = os. path. join ( cfg ['dir'],'server. log') daemon _ log _ file = open ( cfg ['log'],'w') cfg ['args'] = args = [ cfg ['binary'] ] + cfg ['additional'] logging. getlogger ('deckard. daemon. % s. env'% name ). debug ('% s ', environ ) logg... | [
0.13744741678237915,
-0.47610005736351013,
0.8905881643295288,
-0.9273130297660828,
-0.39577266573905945,
-0.1876625120639801,
0.48126861453056335,
0.05000903084874153,
-0.0048620388843119144,
-0.32085612416267395,
-0.1258007287979126,
0.9187236428260803,
0.14732778072357178,
0.28118607401... |
def calculate _ velocity ( self ) : phi _ pl = self. data. phiplanet ( vr _ p, vphi _ p, _ ) = self. data. cyl _ planet _ velocity vr, vphi = self. data. u - vr _ p, self. data. v - vphi _ p phi _ grid = self. grid. phi - phi _ pl vx = vr * np. cos ( phi _ grid ) - vphi * np. sin ( phi _ grid ) vy = vr * np. sin ( phi ... | [
-0.30463001132011414,
0.0009705882403068244,
0.6438581943511963,
-0.5693072080612183,
0.28504666686058044,
0.786208987236023,
-0.040239620953798294,
0.9323326945304871,
0.042666856199502945,
0.2099764049053192,
-0.12111392617225647,
0.4070751667022705,
-0.5800614356994629,
0.71751284599304... |
def vfconv ( velorfreqstr, frame, restfstr, veltype ) : if ( qa. quantity ( velorfreqstr ) ['unit']. find ('m / s') > - 1 ) : dop = me. doppler ( veltype, qa. quantity ( velorfreqstr ) ) retvf = me. tofrequency ( frame, dop, qa. quantity ( restfstr ) ) elif ( qa. quantity ( velorfreqstr ) ['unit']. find ('hz') > - 1 ) ... | [
0.6543631553649902,
-0.8379938006401062,
0.6597119569778442,
0.1776065081357956,
0.09082311391830444,
-0.7873625755310059,
-0.4368271231651306,
-0.17478661239147186,
0.33252963423728943,
0.10051246732473373,
0.39627605676651,
0.2920117676258087,
-0.49337947368621826,
0.18751974403858185,
... |
def delete _ storage _ account ( self ) : print ('deleting storage account % s from the vault'% self. config. storage _ account _ name ) self. keyvault _ sp _ client. delete _ storage _ account ( vault _ base _ url = self. sample _ vault _ url, storage _ account _ name = self. config. storage _ account _ name ) | [
1.1762614250183105,
-0.8278619050979614,
0.22398029267787933,
1.8604133129119873,
-0.015434741973876953,
0.19937695562839508,
0.5988715887069702,
0.011084574274718761,
0.6076204776763916,
-0.12447144836187363,
-0.3226360082626343,
1.078048586845398,
-0.48358163237571716,
-0.092939451336860... |
def _ _ init _ _ ( self, roles, components ) : self. roles = roles self. components = components self. propositions = recordpropositions ( ) self. basepropositions = recordbasepropositions ( ) self. inputpropositions = recordinputpropositions ( ) self. legalpropositions = recordlegalpropositions ( ) self. goalpropositi... | [
0.13923226296901703,
-0.49918222427368164,
0.6034255623817444,
-0.4366563558578491,
0.5553392171859741,
0.2627313733100891,
0.14385397732257843,
0.03603365644812584,
-0.2444152534008026,
-0.015416024252772331,
0.21470221877098083,
-0.4369282126426697,
-0.10494854301214218,
-0.1831633299589... |
def colmax ( self, * args ) : return _ snap. ttable _ colmax ( self, * args ) | [
-1.2540549039840698,
0.4015038013458252,
0.44261786341667175,
1.3383028507232666,
0.5049049854278564,
0.05836543068289757,
-0.01985851861536503,
-0.040978629142045975,
-1.144553542137146,
0.4769020676612854,
-0.9045565724372864,
-0.44864436984062195,
0.22188211977481842,
0.1436512619256973... |
def test _ atomic _ base64 _ binary _ enumeration _ nistxml _ sv _ iv _ atomic _ base64 _ binary _ enumeration _ 1 _ 4 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / base64binary / schema + instance / nistschema - sv - iv - atomic - base64binary - enumeration - 1. xsd ", i... | [
-0.42805686593055725,
-0.9089685678482056,
0.5388694405555725,
1.131533145904541,
0.28732573986053467,
-0.06703142821788788,
0.6527031064033508,
-0.3306224048137665,
-0.018657546490430832,
0.41575753688812256,
-0.2454216629266739,
-0.09039565920829773,
-0.6120768785476685,
0.23356960713863... |
def glauber _ step ( self ) : # choose a random spin within the grid x = random. randrange ( self. _ x ) y = random. randrange ( self. _ y ) de = self. calc _ delta _ energy ( x, y ) # the probability that the spin should flip p = min ( 1, np. exp ( - de / self. t ) ) if ( random. random ( ) < p ) : # flip the spin bas... | [
-0.4690033793449402,
-0.11465635895729065,
0.6968521475791931,
-0.11500101536512375,
-0.21321113407611847,
1.3534376621246338,
-0.008413569070398808,
0.049026425927877426,
-0.532943069934845,
0.16789835691452026,
-0.12539145350456238,
-0.004872545134276152,
-0.7779611945152283,
0.140104785... |
def _ _ init _ _ ( _ _ self _ _, *, data _ attribute _ id : pulumi. input [ str ], data _ taxonomy _ id : pulumi. input [ str ], data _ access _ spec : optional [ pulumi. input ['googleclouddataplexv1dataaccessspecargs'] ] = none, description : optional [ pulumi. input [ str ] ] = none, display _ name : optional [ pulu... | [
-0.6201536655426025,
-0.11000870168209076,
0.6421288847923279,
-1.2929545640945435,
0.2269374430179596,
0.6183294653892517,
-0.24586962163448334,
0.35697758197784424,
0.017538752406835556,
-0.04097888618707657,
-0.37550172209739685,
0.9107156991958618,
0.5732350945472717,
-0.78348481655120... |
def select _ action ( self, state : np. ndarray ) - > np. int64 : if self. epsilon > np. random. random ( ) : selected _ action = np. random. random _ integers ( 0, self. action _ dim - 1 ) else : selected _ action = self. dqn ( torch. floattensor ( state ). to ( self. device ) ) selected _ action = np. argmax ( select... | [
-0.8432453870773315,
-0.5044702887535095,
0.3914918303489685,
0.3150109648704529,
0.8055113554000854,
-0.34315910935401917,
0.49976983666419983,
-0.6263895630836487,
1.618908166885376,
0.02609017863869667,
0.272372305393219,
0.8021512627601624,
-0.35192081332206726,
-0.2007399946451187,
... |
def download _ avoided _ costs _ data _ db ( url _ prefix, year, skip _ if _ exists ) : db _ filename = f " { year }. db " output _ filepath = os. path. join ( database _ location ( ), db _ filename ) path ( database _ location ( ) ). mkdir ( parents = true, exist _ ok = true ) if skip _ if _ exists and os. path. exist... | [
-0.32581639289855957,
0.09747432917356491,
0.7804767489433289,
0.050324946641922,
0.2911822199821472,
0.6920807957649231,
0.3002881705760956,
0.06104809418320656,
0.16893348097801208,
0.12190068513154984,
-0.40741202235221863,
0.09204019606113434,
-0.2557409703731537,
-0.2753526270389557,
... |
def test _ atomic _ any _ uri _ min _ length _ 4 _ nistxml _ sv _ iv _ atomic _ any _ uri _ min _ length _ 5 _ 3 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / anyuri / schema + instance / nistschema - sv - iv - atomic - anyuri - minlength - 5. xsd ", instance = " nistdata... | [
0.13528282940387726,
-0.2995296120643616,
0.43998467922210693,
0.39034202694892883,
-0.4886254072189331,
-0.19202809035778046,
-0.2579991817474365,
-0.6960423588752747,
0.413775235414505,
-0.20499393343925476,
-0.131206214427948,
-0.29552316665649414,
-1.0742241144180298,
0.103464968502521... |
def isprefix ( self, * args ) : return _ snap. tstr _ isprefix ( self, * args ) | [
-0.4328464865684509,
0.17556560039520264,
0.6328275203704834,
0.3110179007053375,
0.6639500260353088,
-0.21908199787139893,
0.3331848680973053,
-0.29545941948890686,
-0.15135377645492554,
0.7823498845100403,
-0.39181894063949585,
0.2265470325946808,
-0.022800447419285774,
0.547388613224029... |
def remove ( self, index ) : card = self. cards [ index ] del self. cards [ index ] return card | [
-0.9344413876533508,
-0.6204277276992798,
0.4508586823940277,
-1.6005315780639648,
-0.797580897808075,
-0.22910642623901367,
-0.5796899795532227,
0.12975677847862244,
0.9734755754470825,
0.2581252157688141,
-0.531724214553833,
0.24090145528316498,
-0.9568724632263184,
-1.3463305234909058,
... |
def get _ intersections ( self, typ, branch _ or _ interval ) : idx = self. _ branch _ or _ interval _ idx ( typ, branch _ or _ interval ) return self. _ paths [ :, idx ] | [
-0.5314629673957825,
0.013791469857096672,
0.7067323923110962,
1.0171586275100708,
0.9993208646774292,
0.08992787450551987,
0.4471049904823303,
-0.33753472566604614,
-0.3049446940422058,
-0.05124080926179886,
0.6741004586219788,
-0.3616255521774292,
-0.8260332345962524,
-0.5492607355117798... |
async def change _ charge _ limit ( self, value : float ) - > none : # only wake car if the value is different wake _ if _ asleep = value! = self. charge _ limit _ soc data = await self. _ send _ command ( " change _ charge _ limit ", percent = int ( value ), wake _ if _ asleep = wake _ if _ asleep ) if data and data [... | [
-0.33965522050857544,
0.1356826275587082,
0.7257996797561646,
0.934097170829773,
0.04122823104262352,
0.1881200522184372,
-0.6183880567550659,
-0.37662896513938904,
0.5248461961746216,
0.42701834440231323,
-0.1907481849193573,
0.8984285593032837,
-0.31430694460868835,
-0.17690002918243408,... |
def wx _ zmien _ parametry ( self, evt ) : okno _ potomne = okno _ zmiany _ parametrow ( ) okno _ potomne. show ( ) | [
0.7399073243141174,
0.16500338912010193,
0.4788386821746826,
-0.18383413553237915,
-1.4069641828536987,
0.4872336983680725,
0.6158584356307983,
-0.3150709867477417,
-0.3230491578578949,
1.025863528251648,
0.23471392691135406,
0.7526029348373413,
0.3094428479671478,
-0.08269555866718292,
... |
def test _ model _ result _ total _ length _ split _ codon ( self ) : _ data = { " human " : " atgcggctcgcggaggccgcgctcgcggag ", " mouse " : " atgcccggcgccaaggcagcgctggcggag ", " opossum " : " atgccagtgaaagtggcggcggtggctgag ", } aln = make _ aligned _ seqs ( data = _ data, moltype = " dna " ) model1 = evo _ app. model ... | [
0.19160833954811096,
0.2328520268201828,
0.4972829520702362,
-0.9451671838760376,
0.6192024946212769,
0.22633232176303864,
0.6273974776268005,
0.3851904571056366,
0.18830378353595734,
0.4343263804912567,
-1.5118502378463745,
-0.24638499319553375,
0.3398268520832062,
0.07191912829875946,
... |
def mat2voigt ( m ) : return np. array ( [ m [ 0, 0 ], m [ 1, 1 ], m [ 2, 2 ], m [ 1, 2 ], m [ 0, 2 ], m [ 0, 1 ] ] ) | [
0.10853718221187592,
0.06110594794154167,
0.6482820510864258,
-0.31868547201156616,
0.27156519889831543,
0.14217156171798706,
-0.3905857801437378,
-0.48566412925720215,
-0.27348703145980835,
0.8599790334701538,
0.1078377515077591,
0.19967831671237946,
-0.6309781670570374,
-0.18886214494705... |
def get _ patch _ fields ( self ) : # todo : it would be nice if the methodology here could be made more # generic? values = self. extract _ field ( field _ no _ field, lambda v : int ( float ( v ) ) ) fields = { } # id : [ patch _ no,... ] # there should be at least one row... for patch in values [ 0 ] : if values [ 0... | [
-0.13586948812007904,
0.08701545745134354,
0.4604513645172119,
-0.9588807821273804,
-0.3237442970275879,
-0.39084020256996155,
0.2985958456993103,
-0.16925707459449768,
-0.1689414381980896,
-0.364741712808609,
-1.323221206665039,
-0.5727424621582031,
0.008549491874873638,
0.089804694056510... |
def clr ( self, * args ) : return _ snap. tstrintprv _ clr ( self, * args ) | [
0.07580002397298813,
-0.1741929054260254,
0.07531224191188812,
-1.1097140312194824,
-0.14562125504016876,
0.5746341943740845,
-0.2235974818468094,
0.14599348604679108,
-1.2275968790054321,
0.0024380485992878675,
0.779321014881134,
0.07119841873645782,
-1.060171127319336,
0.1993478685617447... |
def get _ ticker ( instrument : str ) : client = publicbitwyrewsclient ( ) client. ticker ( instrument ) while true : print ( " " ) print ( " receiving message " ) success, response, error _ code, error _ msg = client. receive _ conn ( ) if not success : exit _ message ( response, error _ code, error _ msg ) client. cl... | [
-0.23244744539260864,
0.24904827773571014,
0.7719648480415344,
-0.6173893213272095,
0.20510193705558777,
-0.09087828546762466,
0.6943836212158203,
-1.919443964958191,
-1.1390162706375122,
-0.3086561858654022,
-0.6737073659896851,
1.2770441770553589,
-1.0907137393951416,
0.5163896679878235,... |
def main ( ) : # get config and processing of words config = config ( load = false ) # processing _ word = get _ processing _ char ( lowercase = true ) # # dev = conlldataset ( config. filename _ dev, config. elmofile _ dev, # config. elmo _ option _ file, config. elmo _ dim, processing _ word ) # test = conlldataset (... | [
0.6067059636116028,
0.4357999861240387,
0.7148411273956299,
0.49881651997566223,
0.45789802074432373,
0.7634825110435486,
0.9718645215034485,
0.9228448271751404,
0.034673817455768585,
0.9598392844200134,
-0.6108415722846985,
0.7398931980133057,
0.5909401178359985,
-0.18445546925067902,
0... |
def gethashcd ( * args ) : return _ snap. tpairhashimpl2 _ gethashcd ( * args ) | [
0.7020765542984009,
-0.3696800768375397,
0.7669400572776794,
0.6201798915863037,
-0.1997411549091339,
0.9558610320091248,
0.07869459688663483,
0.4843866229057312,
-0.7144778966903687,
-0.44819608330726624,
0.28143489360809326,
0.04246511682868004,
-0.2797977328300476,
0.4860396981239319,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.