text stringlengths 25 2.19k | embedding listlengths 768 768 |
|---|---|
def execute ( self ) : self. spin ( ) | [
-0.03739702329039574,
-0.6230251789093018,
0.08557397127151489,
1.075119137763977,
1.0677669048309326,
0.8251510858535767,
0.6992568373680115,
0.5614588260650635,
0.028361408039927483,
-0.16396252810955048,
-0.3829846680164337,
0.12698568403720856,
-1.157774806022644,
-0.39284706115722656,... |
def close _ connection ( conn ) : conn. close ( ) return | [
0.20582126080989838,
-0.6612831354141235,
0.2485509216785431,
0.5635766983032227,
0.14596432447433472,
0.400423526763916,
-0.49289947748184204,
0.5757427215576172,
-1.1577808856964111,
-0.9638016819953918,
0.3841845989227295,
-0.7217491865158081,
-0.1575532704591751,
-0.16592349112033844,
... |
def verify _ status ( self, status1, status2, expected, task ) : task. subtasks [ 0 ]. task. _ status = status1 task. subtasks [ 1 ]. task. _ status = status2 self. assertequal ( task. status ( ), expected,'statuses were [ % s, % s ] expected status : % s actual status : % s'% ( status1, status2, expected, task. status... | [
0.36794614791870117,
-0.4065669775009155,
0.294663667678833,
0.70756995677948,
0.4862373173236847,
0.909437894821167,
-0.3029036223888397,
0.7880290746688843,
-0.684244692325592,
-0.4052882492542267,
-1.3507884740829468,
0.9402188062667847,
0.5166237354278564,
0.20514757931232452,
-0.074... |
def work _ with _ groups _ processor ( db _ exec : dbexec, form ) : " " " route :'/ sysadmin / manage _ groups'= > manage _ groups template : manage _ groups. jinja2 form : manage _ groups _ form. py processor : manage _ groups. py " " " function _ to _ execute = form. work _ function. data group _ name = form. group _... | [
-0.4042644500732422,
0.6378296613693237,
1.011623740196228,
0.2524226903915405,
0.5445517897605896,
-0.13418196141719818,
0.4115598201751709,
-0.35775262117385864,
-0.6869313716888428,
0.08670884370803833,
0.3788633346557617,
0.19640834629535675,
-0.047613706439733505,
0.6574960947036743,
... |
def get _ text _ compare ( self, xpaths, xpath _ index, text _ from _ xml, text _ index, ids, eng _ list ) : try : element _ text = self. common. element _ get _ text ( self. util. client, xpaths [ xpath _ index ] ['zone'], xpaths [ xpath _ index ] ['xpath'], xpaths [ xpath _ index ] ['comment'], self. logger _ name, x... | [
0.17352056503295898,
-0.5078997611999512,
0.7491797804832458,
-0.23896335065364838,
0.10065021365880966,
-0.24240641295909882,
-0.5175185203552246,
-0.16469600796699524,
0.8100366592407227,
0.8149428963661194,
-0.10099878162145615,
-0.14847084879875183,
-0.6187021136283875,
-0.402432739734... |
def verify _ pip ( get _ if _ needed = true, raise _ on _ failure = true, * * kwargs ) : log. trace ('verifying pip exists : get _ if _ needed = { } '. format ( get _ if _ needed ) ) kwargs. setdefault ('to _ console ', false ) kwargs. setdefault ('trace _ file ', ir _ artifact _ dir +'/ packages / pip / verify _ pip. ... | [
-0.3148435056209564,
-0.2561627924442291,
0.7336128354072571,
0.5718545317649841,
0.7371244430541992,
-0.3734528720378876,
-0.5847471356391907,
-0.36529892683029175,
-0.47893303632736206,
0.1787322610616684,
0.1335626244544983,
0.014756308868527412,
0.11860048770904541,
0.9036922454833984,... |
def read _ data _ from _ file ( file _ name ) : list _ of _ product _ objects = [ ] try : with open ( file _ name, " rb " ) as fh : try : list _ of _ product _ objects = pickle. load ( fh ) message = " data was successfully deserialized and loaded into a list of product objects in memory! " return list _ of _ product _... | [
-0.26147809624671936,
-0.9699665307998657,
0.7010127902030945,
0.05694243311882019,
0.4841812252998352,
-0.3225935399532318,
0.3912937641143799,
0.08816691488027573,
-0.2911112308502197,
0.06878211349248886,
-0.2746976613998413,
0.3028903603553772,
0.008555875159800053,
-0.1276107579469680... |
def calibration _ loss ( ens _ preds, batch _ y ) : concat _ preds = torch. cat ( ens _ preds, dim = 1 ) pred _ stds = torch. std ( concat _ preds, dim = 1 ) pred _ means = torch. mean ( concat _ preds, dim = 1 ) pred _ resids = pred _ means - torch. flatten ( batch _ y ) resid _ z _ scores = pred _ resids / pred _ std... | [
-0.8054799437522888,
-0.651346743106842,
0.4901893138885498,
0.4284561574459076,
-0.7663974761962891,
0.8053861260414124,
0.6986446380615234,
0.1316315233707428,
0.20109960436820984,
0.9422778487205505,
-0.05030491575598717,
0.2079186588525772,
0.5226036906242371,
0.5789534449577332,
0.7... |
def store ( self, filename ) : if not os. path. exists ( filename ) : print ('file does not exist.') return false with open ( filename ) as f : self. initialize _ file _ channel ( ) if not self. file _ channel : print ('no available file _ channel.') return false cmd ='stor'+ filename self. send _ cmd ( cmd ) data = f.... | [
-0.39342328906059265,
0.41622060537338257,
0.7507084608078003,
-0.8555585741996765,
0.5976172089576721,
0.3977792263031006,
0.22514739632606506,
-0.440093994140625,
-0.9812496900558472,
-0.035839613527059555,
-0.6175187826156616,
-0.5737760663032532,
-0.7908201217651367,
0.1176775544881820... |
def find _ cap _ lettre ( word ) : if word [ 0 ] in resourcepool ( ). capital _ letters : return 1 return 0 | [
-0.24892249703407288,
-1.0001246929168701,
0.46570178866386414,
-0.3665351867675781,
-0.25505968928337097,
0.3378153443336487,
0.10797694325447083,
-0.5555905103683472,
-0.12415904551744461,
0.8779572248458862,
0.7534570097923279,
0.3967582583427429,
-1.1422271728515625,
0.937190592288971,... |
def service _ view ( request, pk ) : customer = customer. objects. get ( id = pk ) requirement = requirement. objects. filter ( customer _ id = customer. id ). first ( ) # set context. # leads, sales _ people, roof _ types, storeys, electric _ powers, payments, installers are default options loaded in django admin # re... | [
0.19959214329719543,
-0.11069090664386749,
0.881645679473877,
0.06683067232370377,
-0.7010962963104248,
0.479580819606781,
0.7524886727333069,
0.09547890722751617,
-0.11186443269252777,
0.4744564890861511,
0.5876076817512512,
0.28446057438850403,
-0.20836177468299866,
1.1741938591003418,
... |
def _ update _ menu ( self ) : if self. read _ position _ running = = true : gps _ onoff = u " off " else : gps _ onoff = u " on " profile _ menu = ( u " scan profile ", ( ( u " lazy ", lambda : self. set _ scan _ config ( " lazy " ) ), ( u " turbo ", lambda : self. set _ scan _ config ( " turbo " ) ), ) ) set _ scan _... | [
-0.7942666411399841,
-0.3362191319465637,
0.6714693903923035,
0.43042075634002686,
-0.43222105503082275,
-0.21586255729198456,
-0.008067007176578045,
-0.17279770970344543,
-0.34688836336135864,
0.16976314783096313,
-0.01898004673421383,
-0.1939670443534851,
0.14573612809181213,
1.158911943... |
def is _ employee ( self ) : return self. role = = userroles. employee | [
0.043544918298721313,
-0.03859449550509453,
0.2847926616668701,
1.1759470701217651,
0.4284795820713043,
0.7593461275100708,
-0.28105273842811584,
0.5594691038131714,
0.955653727054596,
0.2924152910709381,
-0.3269546329975128,
0.19270050525665283,
-0.7663795948028564,
0.18932364881038666,
... |
def fix _ gt ( gt _ alt _ id, loop _ alt _ id ) : if gt _ alt _ id = = loop _ alt _ id : return 1 elif gt _ alt _ id! = 0 : return - 1 else : return 0 | [
-0.39765408635139465,
-0.9784956574440002,
0.42869630455970764,
0.32279887795448303,
-0.2594616711139679,
1.2041893005371094,
-0.4805700480937958,
-0.14620265364646912,
-1.0627806186676025,
0.7247304320335388,
0.7549710869789124,
1.8979676961898804,
-0.3759004473686218,
0.49020540714263916... |
def event _ count ( self, period ) : if period not in range ( 52, 4294967297 ) : raise valueerror ( " valid period is between 52 and 4294967297. " ) self. microblaze. write _ mailbox ( 0, period - 2 ) self. microblaze. write _ blocking _ command ( count _ events ) count = self. microblaze. read _ mailbox ( 0 ) return c... | [
-0.03314561769366264,
0.5079489946365356,
0.7921957969665527,
0.391874760389328,
0.3614550530910492,
0.055264271795749664,
1.7084643840789795,
-0.2786964774131775,
0.17171162366867065,
-0.29222342371940613,
-0.4784165918827057,
0.5339546799659729,
-0.9356464147567749,
-0.5285646915435791,
... |
def merge _ tri _ mesh ( self, merge _ list ) : logs. log _ info ( " merging close circumcenters... " ) quad _ cells = [ ] quad _ ccents = [ ] quad _ sa = [ ] # area of quadrilateral cell quad _ rcircs = [ ] # circumradius of quad quadcell _ i = [ ] # index of simplexes qcell _ verts = [ ] # verts of tri or quad simple... | [
0.7213503122329712,
-0.07190390676259995,
0.7284287214279175,
0.37896591424942017,
0.1491907685995102,
0.15145355463027954,
0.9405890107154846,
-0.13494132459163666,
1.0596486330032349,
0.12196820974349976,
-0.3558940887451172,
-0.5586236119270325,
-1.2547377347946167,
-0.14622850716114044... |
def exists _ header ( file, location ) : file. seek ( location ) sig = file. read ( 8 ) # compare but ignore the two changeable byts return int ( codecs. encode ( sig,'hex'), 16 ) & 0xffff0000ffffffff = = magic _ hdf & 0xffff0000ffffffff | [
-0.36546456813812256,
-0.49164485931396484,
0.5738030076026917,
-0.3287219703197479,
0.5461544394493103,
-0.016749590635299683,
-0.9091418385505676,
0.16518357396125793,
-0.3318897485733032,
0.37948015332221985,
-0.33463093638420105,
-0.08500096201896667,
-0.1961180716753006,
-0.5386847257... |
def speed _ count ( self ) - > int : return self. _ speed _ count or 100 | [
0.7499376535415649,
0.43658512830734253,
0.6464173197746277,
0.6162517666816711,
0.8651514053344727,
0.81475830078125,
0.5139111280441284,
0.17809824645519257,
-0.3934177756309509,
-0.29841843247413635,
-0.22333471477031708,
-0.3938741385936737,
0.02479727193713188,
0.1683163344860077,
0... |
def get ( self, path ) : return self. request ('get ', path ) | [
-0.9978340268135071,
-0.32124537229537964,
0.24276340007781982,
0.2321934998035431,
0.4471791982650757,
-0.1255015879869461,
-1.1468411684036255,
-1.1703495979309082,
-0.34085148572921753,
-0.7228000164031982,
0.3844127058982849,
0.9435581564903259,
-0.5298872590065002,
-0.6060463190078735... |
def tensor _ concatfromdict ( ds, inds, dim = 0 ) : # the storer _ storage = ds [ inds [ 0 ] ] # the update / concatenation for indx in range ( 1, len ( inds ) ) : torch. cat ( ( _ storage, ds [ inds [ indx ] ] ), dim ) return _ storage | [
-0.7686535716056824,
0.4707862436771393,
0.29592886567115784,
0.0026395409367978573,
-1.1253901720046997,
-0.6633672714233398,
-0.36661893129348755,
0.03585273027420044,
0.2864287793636322,
0.879311203956604,
0.6676688194274902,
-0.28727275133132935,
1.037752389907837,
-1.0657131671905518,... |
def count ( self ) : try : return int ( self. browser. text ( self. browser. element ( self. count, parent = self. _ title ) ) ) except nosuchelementexception : return none | [
0.00955380592495203,
0.17974801361560822,
0.6333368420600891,
0.32193413376808167,
-0.278038889169693,
-0.2533089518547058,
0.17892427742481232,
-0.4920215308666229,
0.15499268472194672,
-0.3265869617462158,
-0.06761107593774796,
-0.698386013507843,
-0.3681086599826813,
0.02735430747270584... |
def _ _ init _ _ ( self, * args ) : _ topods. topods _ tcompsolid _ swiginit ( self, _ topods. new _ topods _ tcompsolid ( * args ) ) | [
0.07635078579187393,
0.3370879590511322,
0.3462609052658081,
-0.6137329936027527,
-0.06606411188840866,
0.6760704517364502,
1.1354936361312866,
0.1197604089975357,
-0.10573268681764603,
0.3481818735599518,
-0.9469439387321472,
-1.7393227815628052,
-0.17059294879436493,
0.028888238593935966... |
def bundletype ( self ) : return b'none ', b'un ' | [
0.01639288291335106,
-0.15674570202827454,
0.522107720375061,
-0.135441392660141,
0.6041271090507507,
0.6347933411598206,
0.13349516689777374,
0.22684963047504425,
0.4115567207336426,
0.173415407538414,
-0.5813815593719482,
0.19707925617694855,
-0.9295307397842407,
0.43991467356681824,
-... |
def undetermined ( ) - >'possiblevalueset': return possiblevalueset ( ) | [
0.16766835749149323,
-0.10759623348712921,
0.4454303979873657,
0.37228795886039734,
0.6558597087860107,
-0.13910694420337677,
0.07279174774885178,
-0.4058254063129425,
-0.14486870169639587,
-2.26926589012146,
0.510675847530365,
0.2776239514350891,
-0.10605775564908981,
-0.23940697312355042... |
def create _ superuser ( self, name, email, password = none, * * extra _ fields ) : extra _ fields. setdefault ( " is _ staff ", true ) extra _ fields. setdefault ( " is _ superuser ", true ) if extra _ fields. get ( " is _ staff " ) is not true : raise valueerror ( " superuser must have is _ staff = true. " ) if extra... | [
0.09565774351358414,
1.4163285493850708,
0.6193769574165344,
1.0467413663864136,
-0.030936451628804207,
0.3039699196815491,
-0.6501682996749878,
0.5138419270515442,
0.092636339366436,
-0.16252368688583374,
-1.3631399869918823,
-0.05663879215717316,
-0.36276930570602417,
-0.5915172100067139... |
def test _ missing _ end _ date ( self ) : # validate a form with a missing ` ` end _ date ` ` value form = self. form _ data ( operator _ 1 = self. staff _ user. pk, role _ 1 = self. project _ role. pk, start _ date _ 1 = " 2020 - 06 - 22 ", end _ date _ 1 = " ", note _ 1 = " ", operator _ 2 = self. staff _ user. pk, ... | [
-0.026757681742310524,
0.06025214493274689,
0.5881778597831726,
-0.3448241353034973,
0.43471649289131165,
0.8350830078125,
-0.13824348151683807,
0.5614408254623413,
-1.2548450231552124,
-0.35854434967041016,
-0.4236108362674713,
0.05807429179549217,
-0.05937919765710831,
0.5486851334571838... |
def _ get _ files ( self, split _ file ) : files, classes, bboxes = [ ], [ ], [ ] with open ( split _ file,'r') as f : for line in f. readlines ( ) : fname, cls, xmin, ymin, xmax, ymax = line. strip ('\ n'). split ( ) files. append ( os. path. join ( self. data _ dir, fname ) ) classes. append ( int ( cls ) ) bboxes. a... | [
-0.9400172233581543,
-0.16234032809734344,
0.6456173658370972,
-0.6007341742515564,
0.30652916431427,
0.22919417917728424,
1.0964279174804688,
-0.052024658769369125,
-0.9680732488632202,
-0.2882654368877411,
-0.5496028661727905,
-0.5405834913253784,
0.6928215026855469,
-0.00937209650874137... |
def equal ( a, b ) : return 1 if a = = b else 0 | [
-0.3386019170284271,
-0.11541241407394409,
0.4664090871810913,
0.06900210678577423,
0.7982835173606873,
0.23635870218276978,
-0.21479634940624237,
-0.2342851161956787,
0.03054969385266304,
0.43608689308166504,
-0.493411123752594,
0.6475272178649902,
-0.2173919826745987,
-0.0526133403182029... |
def draw _ cities ( positions, connected = false, generation = - 1, distance = - 1 ) : # gui mode selected global screen, city _ radius, font _ color if screen is not none : screen. fill ( 0 ) for pos in range ( 0, len ( positions ) ) : pygame. draw. circle ( screen, city _ color, positions [ pos ], city _ radius ) myc... | [
-0.6617199778556824,
-0.25677746534347534,
0.7648597359657288,
-0.9616789221763611,
-0.29186663031578064,
1.1609930992126465,
-0.5265213847160339,
-0.2404497265815735,
-0.47097107768058777,
0.8002862930297852,
-0.21887972950935364,
-0.7887798547744751,
-0.3011254370212555,
0.28394681215286... |
def generate _ instance _ mask ( binary _ mask, masks _ dir ) : # label the binary label mask label _ img = label ( binary _ mask ) extension = '. png'print ( " generating masks... " ) for instance in regionprops ( label _ img ) : # seperate the crown struture labels according to the size if instance. area > 100 : inde... | [
-1.1830363273620605,
-0.8831623196601868,
0.6243172287940979,
-0.169806107878685,
0.33091288805007935,
0.6685197949409485,
0.5861565470695496,
0.062171731144189835,
0.3300328552722931,
0.46680575609207153,
-0.9247000217437744,
0.3083379566669464,
0.2022727131843567,
-0.06069738790392876,
... |
def get _ translatable _ field ( obj, field ) : try : lang = get _ language ( ) field = field if lang = ='en'else field +'_ fa'return getattr ( obj, field ) except attributeerror : return none | [
0.17625214159488678,
0.6724192500114441,
0.6637046337127686,
-0.8835926055908203,
-0.5243198275566101,
-0.5443036556243896,
-0.6979590058326721,
-0.913323700428009,
0.0167866013944149,
0.7044193744659424,
-0.49536439776420593,
-0.5301024913787842,
0.43131783604621887,
-0.8910906314849854,
... |
def set _ reference _ projector ( self, request, pk ) : reference _ projector = self. get _ object ( ) for projector in self. queryset. all ( ) : projector. reference _ projector = reference _ projector projector. save ( ) return response ( ) | [
-1.0111873149871826,
-0.07719574123620987,
0.5125365257263184,
0.0020864256657660007,
0.24396412074565887,
0.39923322200775146,
0.30918070673942566,
-0.3831027150154114,
0.5957275629043579,
1.350541591644287,
-0.2304692566394806,
-0.06972245126962662,
-0.6112565398216248,
0.440636664628982... |
def create _ netlist ( self ) : # this module has no wordlines # self. create _ all _ wordline _ names ( ) # this module has no bitlines # self. create _ all _ bitline _ names ( ) self. add _ modules ( ) self. create _ all _ wordline _ names ( ) self. add _ pins ( ) self. create _ instances ( ) | [
-0.16623297333717346,
0.0873432531952858,
0.3909566104412079,
-0.2623016834259033,
0.7870713472366333,
1.041453242301941,
0.03498901054263115,
-0.21466003358364105,
0.6098909974098206,
-0.40837040543556213,
-1.146219253540039,
-0.35855627059936523,
0.037737756967544556,
2.156805992126465,
... |
def format _ expr ( text ) : try : return format _ code ( text ) [ : - 1 ] except syntaxerror : return text | [
0.6988473534584045,
-0.4184821844100952,
0.4423659145832062,
0.35201939940452576,
-0.2527651786804199,
-0.4073622524738312,
-0.9084559082984924,
0.37871596217155457,
0.1127832904458046,
0.6167367696762085,
1.7684301137924194,
0.3123970329761505,
-0.9378727078437805,
0.5653846263885498,
1... |
def _ build _ networks ( self ) : # calling online _ convnet will generate a new graph as defined in # self. _ get _ network _ template using whatever input is passed, but will always # share the same weights. # dqn explore net. self. online _ convnet = tf. make _ template ('online ', self. _ network _ template ) self.... | [
-0.6640210747718811,
-0.4608232080936432,
0.273825466632843,
-0.07583778351545334,
0.3966057300567627,
-0.5795340538024902,
0.39681145548820496,
0.4280642867088318,
-0.12684835493564606,
-0.8482667803764343,
-0.5902108550071716,
-0.31322354078292847,
0.9291086792945862,
-0.5530589818954468... |
def _ is _ excuse _ token ( token ) : return token. type = = tokenize. comment and any ( regex. match ( token. string ) for regex in accepted _ excuse _ patterns ) | [
-0.06054264307022095,
-0.13791656494140625,
0.6962019205093384,
-0.3680127263069153,
-0.18868792057037354,
-0.08413664251565933,
-0.27295151352882385,
0.14694049954414368,
0.03397020697593689,
0.8941686153411865,
0.2548232674598694,
0.5169180035591125,
-0.9428507089614868,
0.17080870270729... |
def train ( mode : str, env _ params : dict, ac _ params : dict, rls _ params : dict, pid _ params : dict, results _ path : str, seed = 0, return _ logs = true, save _ logs = false, save _ weights = false, weight _ save _ interval : int = 10, save _ agents = false, load _ agents = false, agents _ path = " ", plot _ sta... | [
0.7994457483291626,
-0.07774420082569122,
0.7350558638572693,
-0.21396872401237488,
-0.11831989139318466,
0.5356652736663818,
0.44046518206596375,
-0.11670208722352982,
-0.2544986605644226,
-0.09671152383089066,
-0.16523794829845428,
-0.5644331574440002,
0.2233353555202484,
0.2104032933712... |
def _ _ contains _ _ ( self, key ) : return any ( [ item = = key for _, item in self. heap ] ) | [
-0.08896897733211517,
-0.6415992975234985,
0.36217179894447327,
0.18402668833732605,
-0.1960601508617401,
-0.03336913511157036,
-1.6264359951019287,
0.03801245614886284,
-0.4533405900001526,
0.1968691051006317,
-0.43911662697792053,
-0.36487916111946106,
-0.5899103879928589,
0.519385874271... |
def get _ submission _ from _ url ( reddit _ client : praw. models. reddit, url : str ) - > praw. models. reddit. submission : # split by /'s, find comments, find id, get submission url _ arr = url. split ( " / " ) submission _ id = url _ arr [ url _ arr. index ( " comments " ) + 1 ] return reddit _ client. submission ... | [
-0.1066860631108284,
-0.2783395051956177,
0.5409008860588074,
0.32624611258506775,
0.27077773213386536,
-0.5855019092559814,
-0.12689045071601868,
-0.6904697418212891,
-0.2452334314584732,
-0.08124133199453354,
-0.10664742439985275,
-0.09755712002515793,
-0.7230699062347412,
0.274608552455... |
def get _ s ( self ) : def _ pairs = json. load ( open ( '.. / data / definitional _ pairs. json') ) def _ pairs _ ind = [ [ self. word2ind [ pair [ 0 ] ], self. word2ind [ pair [ 1 ] ] ] for pair in def _ pairs if pair [ 0 ] in self. word2ind and pair [ 1 ] in self. word2ind ] diff = [ self. word _ embeddings [ ind _ ... | [
-0.11201635748147964,
-0.4166429042816162,
0.5314702987670898,
-0.1436520665884018,
-0.4933849275112152,
-0.033224958926439285,
0.3869263231754303,
-0.42394939064979553,
0.07451130449771881,
0.4035356342792511,
0.6220623850822449,
0.7976099848747253,
-0.7383432388305664,
0.1089982017874717... |
def time _ set _ mid ( ds, time _ name ) : if'bounds'not in ds [ time _ name ]. attrs : return ds # determine units and calendar of unencoded time values if ds [ time _ name ]. dtype = = np. dtype ('o') : units ='days since 0000 - 01 - 01'calendar ='noleap'else : units = ds [ time _ name ]. attrs ['units'] calendar = d... | [
-0.5905490517616272,
0.005658605135977268,
0.7566350698471069,
-0.9584535360336304,
-0.6812418699264526,
-0.0005417728098109365,
-0.44305920600891113,
-0.6627756953239441,
0.26354533433914185,
0.5871313810348511,
0.4438687562942505,
0.573485255241394,
0.6481255888938904,
0.7763922214508057... |
def vox _ xyzi _ content ( voxels : list [ tuple [ int, int, int, int ] ] ) - > bytes : w = bytearray ( ) w. extend ( struct. pack ('< i ', len ( voxels ) ) ) for ( x, y, z, i ) in voxels : assert ( x < 126 and y < 126 and z < 126 and i < = 254 ) # add 1 to the index, as the specification requires that index 0 in the #... | [
-0.5285258889198303,
-0.37815824151039124,
0.48450803756713867,
-0.5101858377456665,
-0.505452573299408,
-0.5492385029792786,
0.08982757478952408,
-0.8401461243629456,
-0.1177554801106453,
0.07990192621946335,
-0.45463430881500244,
-0.48254579305648804,
-0.6797050833702087,
-0.124405719339... |
def stats ( self ) : return self. _ stats | [
0.024974774569272995,
-0.08501002937555313,
0.10464537888765335,
-0.3686063885688782,
0.5590055584907532,
0.698523759841919,
0.1467607468366623,
-1.1614503860473633,
0.9244065880775452,
-1.3877676725387573,
-0.18800745904445648,
-0.23534274101257324,
0.015383660793304443,
-0.20613080263137... |
def _ _ init _ _ ( self, * args, * * kwargs ) : super ( patientprocessmeasure, self ). _ _ init _ _ ( * args, * * kwargs ) self. fields _ to _ group _ by = ['bene _ sk'] | [
0.3550940454006195,
0.6117023825645447,
0.4873422086238861,
-0.1734885275363922,
0.6028176546096802,
-0.2368835061788559,
0.26411324739456177,
-0.05243208259344101,
-0.8817475438117981,
-0.3550832271575928,
0.22604738175868988,
0.1131851002573967,
-0.008305493742227554,
0.7677831053733826,... |
def test _ exercise1 ( self ) : with connection. cursor ( ) as cursor : cursor. execute ( " " " insert into customers ( cust _ id, cust _ name, cust _ address, cust _ city, cust _ state, cust _ zip, cust _ country ) values ( 1000000007,'me gustas ','广 ','广 州 ','gd ','529999 ','cha') ; " " " ) cursor. execute ( " " " se... | [
0.8189007043838501,
-0.040073975920677185,
1.1040700674057007,
0.26959869265556335,
-0.1977653056383133,
-0.28246036171913147,
0.44862544536590576,
0.14833806455135345,
-0.2763253152370453,
-0.0360419861972332,
-0.7025325298309326,
-0.05994945019483566,
-0.24747426807880402,
0.224605023860... |
def previous _ sentence ( self ) : return self. document [ self. sentenceindex - 1 ] | [
0.19843491911888123,
0.08199388533830643,
0.7984557151794434,
-0.6155319213867188,
-0.21382471919059753,
-0.9894274473190308,
1.2417396306991577,
-0.9242066740989685,
0.10570274293422699,
0.503956139087677,
0.7056264877319336,
-0.5851055979728699,
-1.436583399772644,
-0.4353512227535248,
... |
def set _ 5gnr _ mixeroff ( self, pwr ) : self. write ( f'conf : nrmm : meas : rfs : mlof { pwr }') | [
-0.0032533081248402596,
-0.31215667724609375,
0.3545553982257843,
-0.21805813908576965,
-0.22659258544445038,
0.8917635083198547,
0.7101858258247375,
-0.40302330255508423,
0.13784249126911163,
-0.7988013029098511,
-0.33112382888793945,
-0.27930790185928345,
-1.4777770042419434,
1.339403390... |
def get _ agnocomplete _ context ( self ) : return getattr ( self, agnocomplete _ user _ attribute, none ) | [
0.25114771723747253,
-0.3265227973461151,
0.5587559342384338,
0.24408623576164246,
-0.5280545949935913,
-0.16284674406051636,
0.9643541574478149,
-1.8623491525650024,
0.2932393550872803,
-0.1047738641500473,
0.5172456502914429,
-0.165199413895607,
0.3888453245162964,
-0.3461770713329315,
... |
def authenticate ( self, username : optional [ str ] = none, password : optional [ str ] = none, * * kwargs ) - > optional [ user ] : if username is none : username = kwargs. get ( usermodel. username _ field ) try : user = usermodel. _ default _ manager. get _ by _ natural _ key ( username ) except usermodel. doesnote... | [
-0.6270175576210022,
0.41615650057792664,
0.49155282974243164,
1.1842901706695557,
-0.2508900761604309,
0.16706083714962006,
-0.30599117279052734,
-0.5277621746063232,
0.39990994334220886,
-0.31122881174087524,
0.1979566365480423,
-0.32559528946876526,
-0.5766295790672302,
-0.1875246614217... |
def lex _ net ( emb _ dim, grnn _ hidden _ dim, emb _ learning _ rate, crf _ learning _ rate, bigru _ num, word _ dict _ len, label _ dict _ len ) : word _ emb _ dim = emb _ dim grnn _ hidden _ dim = grnn _ hidden _ dim emb _ lr = emb _ learning _ rate crf _ lr = crf _ learning _ rate bigru _ num = bigru _ num init _ b... | [
0.6772552132606506,
0.15937882661819458,
0.9490568041801453,
-0.06891977787017822,
0.8501278162002563,
-0.6431348323822021,
0.33914244174957275,
0.42760753631591797,
-0.7149825692176819,
-0.6305016875267029,
-0.0030706797260791063,
0.48059362173080444,
0.37456420063972473,
-0.1211630254983... |
def test _ get ( parse _ conf ) : with patch ( " salt. modules. logrotate. _ parse _ conf ", magicmock ( return _ value = parse _ conf ) ) : # a single key returns the right value assert logrotate. get ( " rotate " ) = = 1 # a single key returns the wrong value assert logrotate. get ( " rotate " )! = 2 # a single key r... | [
-0.4717696011066437,
0.43399882316589355,
0.5907301902770996,
-0.5891649127006531,
0.99280846118927,
-0.6455461382865906,
-0.5127994418144226,
-0.4125462472438812,
-0.4048689305782318,
-0.22433960437774658,
0.06260127574205399,
0.19313324987888336,
-0.5667648911476135,
-0.8387894034385681,... |
def get _ gene _ groups _ from _ kmers ( kmer _ list, gene _ file _ dir, geneid2group, geneid2descriptions ) : if gene _ file _ dir [ - 1 ]! ='/': gene _ file _ dir + ='/'# make a dictionary where the kmers are keys to lists ( for the gene _ groups ) gene _ groups _ of _ kmer = { } for kmer in kmer _ list : gene _ grou... | [
0.525775134563446,
0.45862969756126404,
0.526188313961029,
0.8347684144973755,
-0.39532139897346497,
-0.3462955951690674,
-0.5965815186500549,
0.11571095138788223,
-0.889396607875824,
-0.026283305138349533,
0.15557515621185303,
0.13124817609786987,
-0.7505224347114563,
1.5573912858963013,
... |
def update ( self, newdict ) : raise typeerror ( self. _ _ msg ) | [
-1.19167160987854,
-0.2004898637533188,
0.34313663840293884,
-0.669205904006958,
-0.40993863344192505,
0.5265665650367737,
-0.007976429536938667,
-0.3462314307689667,
0.35277611017227173,
0.4719962477684021,
0.3519076704978943,
0.746903657913208,
-1.4187289476394653,
0.9536136388778687,
... |
def test _ delete _ step ( self ) : pass | [
0.20533113181591034,
0.4424290657043457,
0.05093763768672943,
1.1713496446609497,
0.391622930765152,
0.5176559090614319,
0.78630131483078,
0.2713281214237213,
-0.4834601879119873,
-1.2697468996047974,
-0.4619884192943573,
0.013839974999427795,
-1.0780895948410034,
1.2298572063446045,
-0.... |
def _ mgui _ set _ min ( self, value : float ) : super ( ). _ mgui _ set _ min ( value ) self. _ readout _ widget. setminimum ( value ) | [
-0.0021647545509040356,
-0.07659177482128143,
0.5143991112709045,
-0.010630732402205467,
-0.5482320189476013,
0.05864902585744858,
-0.11712491512298584,
-0.9847936034202576,
-0.01918252930045128,
-0.28312984108924866,
0.32360538840293884,
-0.558809220790863,
-0.7585443258285522,
0.66592025... |
def crossover ( self, parent1, list ) : state _ dict = parent1. state _ dict ( ) for bot in list : bot. load _ state _ dict ( state _ dict ) " " " param _ new = [ ] for param1, param2 in zip ( parent1. parameters ( ), parent2. parameters ( ) ) : param _ new = self. torch. rand ( param1. data. size ( ) ) for index, valu... | [
-0.8786811232566833,
0.047681909054517746,
0.8699812293052673,
0.5474188327789307,
-0.20627939701080322,
0.8042668700218201,
-0.26362133026123047,
0.04152088612318039,
-0.3989575505256653,
0.7945689558982849,
-1.1054850816726685,
0.1666303277015686,
-0.3824399709701538,
0.1900467425584793,... |
def visualize _ vec _ as _ mat ( self ) : r1 = randint ( self. dim, len ( self. d ) - 1 ) if self. x is not none : matrix = self. x [ r1 - self. dim : r1, : ] else : matrix = np. asarray ( self. docvecs ) [ r1 - self. dim : r1, : ] plt. matshow ( matrix ) | [
-0.4952491819858551,
0.34437230229377747,
0.5904140472412109,
-0.3990342617034912,
-0.8542683720588684,
0.42432069778442383,
0.7713282108306885,
-0.4840383231639862,
1.3640317916870117,
-0.527129590511322,
0.6822897791862488,
1.2676304578781128,
0.40858733654022217,
0.02340969257056713,
... |
def on _ connect ( client, userdata, flags, result _ code ) : # pylint : disable = unused - argument if result _ code = = mqtt. mqtt _ err _ success : client. connected = true logger. info ( f " mqtt { userdata ['type'] } client successfully connected to { userdata ['ip'] } : { userdata ['port'] } " ) else : client. co... | [
0.47426390647888184,
-0.7658835053443909,
0.2481665313243866,
-0.6393378973007202,
-0.6365342140197754,
0.4857620298862457,
-0.66276615858078,
-0.805478572845459,
-0.8191064596176147,
0.5345558524131775,
-0.4213942885398865,
-0.2767254412174225,
0.3839286267757416,
-0.03940941020846367,
... |
def build _ op _ from _ list ( cls, input _ list ) : if input _ list [ 0 ] ['mobile _ inverted _ conv'] ['expand _ ratio'] = = 1 : # removing the first block. input _ list = input _ list [ 1 : ] return cls ( [ proxylessnasblockspec. active _ index _ from _ block _ config ( config ) for config in input _ list ] ) | [
-0.3353286683559418,
0.1859128773212433,
0.32509681582450867,
1.1965479850769043,
-0.16700667142868042,
-0.6651418209075928,
0.459940105676651,
0.3409862518310547,
0.4857065677642822,
0.5917160511016846,
-0.33579838275909424,
-0.8774418830871582,
-0.8679044246673584,
-0.643207848072052,
... |
def test _ _ sticker _ _ eq ( ) : sticker _ id = 202201070034 guild _ id = 202201070035 available = true description ='komeiji'name ='koishi'pack _ id = 202201070036 sort _ value = 4 sticker _ format = stickerformat. png sticker _ type = stickertype. guild tags = ['rin ','okuu'] user = user. precreate ( 202201070037 ) ... | [
0.4054386615753174,
-0.010350045748054981,
0.5460337996482849,
0.7372955083847046,
0.5139749050140381,
0.39859217405319214,
0.27704063057899475,
-0.8956210017204285,
-0.5726161003112793,
-0.30511510372161865,
-1.1030739545822144,
-0.2955518960952759,
-0.680509090423584,
0.7800844311714172,... |
def raw ( self ) - > databytes : return self. m _ priv _ key. raw ( ) | [
-0.9001951217651367,
0.5140373706817627,
0.49693918228149414,
-0.09042718261480331,
-0.8845474123954773,
0.24880623817443848,
-1.4764312505722046,
-0.3500796854496002,
0.25640571117401123,
-0.7983911633491516,
-0.6265403628349304,
1.184465765953064,
0.09528598189353943,
0.03750045970082283... |
def synapse _ login ( ) : try : syn = synapseclient. login ( ) except exception as e : print ( " please provide your synapse username / email and password ( you will only be prompted once ) " ) username = raw _ input ( " username : " ) password = getpass. getpass ( ) syn = synapseclient. login ( email = username, passw... | [
-0.5073105096817017,
0.08539824932813644,
0.5418562889099121,
0.8202882409095764,
0.014174296520650387,
-0.2479909211397171,
0.3627549707889557,
0.4133594036102295,
0.3058960735797882,
-0.15923316776752472,
-0.439632385969162,
0.3805044889450073,
-0.413504034280777,
-0.35622087121009827,
... |
def cancion _ actual ( self ) : if self. lista _ canciones. esta _ vacia ( ) : return none try : cancion = self. lista _ canciones. get _ elemento ( self. actual ) except indexerror : return return cancion | [
-0.24786978960037231,
-1.2594174146652222,
0.5999150276184082,
1.1899646520614624,
0.34495270252227783,
0.17702347040176392,
0.5238813757896423,
-0.2563502788543701,
-0.15647335350513458,
0.57427579164505,
0.2957814931869507,
0.15354567766189575,
-0.2235659956932068,
-0.3514981269836426,
... |
def newdataentry ( crime ) : entry = {'eventindex': none,'lstevents': none } entry ['eventindex'] = m. newmap ( numelements = 30, maptype ='probing') entry ['lstevents'] = lt. newlist ('array _ list') return entry | [
0.369764506816864,
-0.036205973476171494,
0.35420775413513184,
-0.8882161378860474,
-0.05322394147515297,
0.4615539312362671,
0.08337961882352829,
-0.23694610595703125,
0.6553860306739807,
-0.24195843935012817,
-0.6172654032707214,
0.47889676690101624,
-0.016714125871658325,
0.231112763285... |
def as _ json ( self ) : result = super ( ). as _ json ( ) result [ " generator " ]. update ( { " height " : max ( 0, round ( self. height / 2. 0 ) ), " radius " : max ( 1, round ( self. diameter / 2. 0 ) ), " shape " : " circle " if self. is _ round else " square ", " slim " : ( self. height % 2 ) = = 1, " type " : " ... | [
-1.31936776638031,
-0.6656154990196228,
0.7183541655540466,
-1.3806113004684448,
-0.6271867156028748,
-0.7057380676269531,
-0.1798875778913498,
-1.1924906969070435,
0.38750359416007996,
0.08591620624065399,
-1.1611429452896118,
0.11045083403587341,
-0.344706654548645,
0.486023485660553,
... |
def _ get _ rule _ penalty ( self, rule ) : if rule not in self. rule _ to _ penalty : self. rule _ to _ penalty [ rule ] = _ get _ rule _ penalty ( rule, self. config, self. examples ) return self. rule _ to _ penalty [ rule ] | [
0.008881417103111744,
0.3673706650733948,
0.4376603960990906,
-0.5116072297096252,
0.7417559623718262,
-0.5046181082725525,
0.16220515966415405,
0.006936775986105204,
0.4418585002422333,
1.2900737524032593,
0.23433265089988708,
0.27339062094688416,
-0.14280074834823608,
0.12270285934209824... |
def fetch ( vms ) : for pid, vm _ data in vms. items ( ) : vm _ interface _ names = get _ vm _ network _ interface _ names ( pid ) sum _ incoming = 0 sum _ outgoing = 0 interface _ found = false with open ( " / proc / net / dev ", " r " ) as net _ file : for line in net _ file. readlines ( ) : tokens = line. split ( ) ... | [
0.08838135004043579,
-0.5293481945991516,
0.663221001625061,
-0.7709242701530457,
0.17346136271953583,
0.703148603439331,
0.12365613132715225,
-0.3463324308395386,
-0.721124529838562,
0.5877244472503662,
-0.014933359809219837,
-0.16320061683654785,
0.029161673039197922,
1.0740526914596558,... |
def start3 ( ) : return render _ template ('start3. html') | [
0.5126086473464966,
0.20121023058891296,
0.271170437335968,
0.9219971895217896,
-0.3565807342529297,
0.8600110411643982,
0.12664981186389923,
1.043994665145874,
-0.18481527268886566,
0.3117564022541046,
-0.2404726892709732,
0.1485995203256607,
-0.4482037127017975,
-0.8621161580085754,
-1... |
def locate ( xyz, num _ replicas, density ) : # determine the box size boxvol = ( num _ replicas * 1. 0e24 ) / ( density * 6. 02e17 ) # in nm ^ 3 boxsize = np. power ( boxvol, 1 / 3. ) # one dim of a cubic box, in nm max _ radius = np. max ( np. sqrt ( np. sum ( np. power ( xyz, 2 ), axis = 1 ) ) ) if boxsize < max _ r... | [
-0.36500218510627747,
0.17197321355342865,
0.7572464942932129,
-0.9316360354423523,
0.339221715927124,
-0.9538757801055908,
0.6540804505348206,
-0.2939775288105011,
0.5526311993598938,
0.2266978919506073,
0.5835963487625122,
-0.6335159540176392,
-0.16685084998607635,
-0.7924585342407227,
... |
def _ find _ ros2 _ workspace ( self ) : colcon _ prefix _ path = self. environment. get ( " colcon _ prefix _ path " ) if colcon _ prefix _ path : # takes the form of " < ros2 _ workspace > / src / install " if colcon _ prefix _ path. endswith ( os. sep +'src'+ os. sep +'install') : path = os. path. abspath ( colcon _... | [
-0.05049174278974533,
-1.19180166721344,
0.862488865852356,
-0.3997969329357147,
0.013040252961218357,
-0.8530781269073486,
0.5850500464439392,
-1.0417028665542603,
0.43018829822540283,
-0.31480640172958374,
0.9166988730430603,
0.06467165052890778,
-0.4581543505191803,
0.5631759166717529,
... |
def test _ single _ survey _ success ( self, client, all _ surveys ) : survey = client. single _ survey ( " d70c1273 - b5d8 - 45cd - bfe8 - a0ba75c44b7e " ) assert survey = = self. test _ survey | [
0.04371599853038788,
0.19176068902015686,
0.09332860261201859,
0.10851343721151352,
0.20313429832458496,
0.720787525177002,
0.23232460021972656,
0.31070592999458313,
1.1624590158462524,
-0.7293359041213989,
-0.3680226504802704,
-0.20657268166542053,
-0.5130884647369385,
-0.1244920492172241... |
def test _ post _ title ( self ) : post = create _ post ( title ='motley smells bad') post _ comment = create _ post _ comment ( post = post ) self. assertequal ( post _ comment. post _ title ( ),'motley smells bad') | [
0.8456280827522278,
-0.13834315538406372,
0.1674114614725113,
0.14641042053699493,
0.662425696849823,
0.04302644729614258,
-1.1467070579528809,
0.06415718793869019,
-0.37334078550338745,
-0.17490066587924957,
-0.5932652354240417,
-0.6024406552314758,
-0.3198358118534088,
0.0461228750646114... |
def get _ item ( self, path : str ) - > optional [ dict [ str, any ] ] : if path in self. _ entries : self. hits + = 1 self. _ entries. move _ to _ end ( path ) return copy. deepcopy ( self. _ entries [ path ] ) self. misses + = 1 return none | [
-0.5180114507675171,
-0.0650595873594284,
0.5661107897758484,
-0.12022405117750168,
-0.29949793219566345,
-0.10363133251667023,
0.12245666235685349,
-1.1028046607971191,
-0.15700893104076385,
-0.1876201629638672,
-0.044664788991212845,
0.7485194802284241,
-0.018675968050956726,
-1.38764798... |
def _ _ init _ _ ( self, * args ) : _ topods. topods _ vertex _ swiginit ( self, _ topods. new _ topods _ vertex ( * args ) ) | [
-0.09140077233314514,
0.6032460927963257,
0.3455236852169037,
0.5248028635978699,
-0.25593772530555725,
0.34958964586257935,
0.4632972478866577,
0.5571821928024292,
0.1808212399482727,
-0.32148200273513794,
-0.710750162601471,
-0.3164732754230499,
-0.010581543669104576,
0.1048974096775055,... |
def get _ filter _ bandpass ( self, filtername, * * kwargs ) : from sncosmo import bandpasses wave, trans = np. asarray ( [ l. split ( ) for l in open ( self. get _ filterfile ( filtername ) ). read ( ). splitlines ( ) if len ( l ) > 0 and not l. startswith ( " # " ) ], dtype = " float " ). t return bandpasses. bandpas... | [
-0.17121490836143494,
-0.6362406611442566,
0.5575644969940186,
0.5653525590896606,
-0.5131533145904541,
-0.15353648364543915,
-0.31292209029197693,
-0.6971634030342102,
-0.704048216342926,
0.05331531912088394,
-0.15773887932300568,
1.041320562362671,
-0.6464301347732544,
0.1786878705024719... |
def parquet _ wrapper ( module : str, use _ new _ client : bool = false, log _ traceback : bool = false ) - > none : wrapper = parquetwrapper ( ) wrapper. wrap _ algorithm ( module, use _ new _ client, log _ traceback ) | [
0.6969777345657349,
-0.1786765605211258,
0.4532642066478729,
0.08230757713317871,
-0.552960216999054,
1.1706361770629883,
0.023294880986213684,
-0.27786222100257874,
-0.12674030661582947,
0.6311179995536804,
0.5062923431396484,
0.551662802696228,
0.4643665850162506,
0.021122701466083527,
... |
def cycle _ it ( df, min, max, n, name ) : if n = = 1 : return df data = np. array ( [ df ] * n ). t names = np. zeros ( n ). astype ('object') ; names [ 0 ] = name for k in range ( 1, n ) : bound = float ( min ) + ( float ( max ) - float ( min ) ) * k / n data [ df < = bound, k ] + = max names [ k ] = name +'_'+ str (... | [
-1.126711130142212,
0.907174289226532,
0.5857970714569092,
0.11237328499555588,
-0.6805005669593811,
-0.13804316520690918,
-0.13784456253051758,
-1.3508189916610718,
-0.7337948679924011,
0.501056432723999,
-0.02096731588244438,
0.24916468560695648,
0.6701452136039734,
-0.5047213435173035,
... |
def get _ sensors ( headers ) : sensor _ l = [ ] for i in ( headers [ 7 : - 1 ] ) : if i [ 0 ]! ='-': sensor _ l. append ( i ) return sensor _ l | [
-0.8316132426261902,
-0.6978389620780945,
0.39832305908203125,
0.6797065138816833,
0.7978504300117493,
0.1837833672761917,
-1.1046220064163208,
0.1462821662425995,
0.3383186161518097,
0.5675541162490845,
-1.0752205848693848,
-0.18018214404582977,
-0.8793009519577026,
-0.32583948969841003,
... |
def get _ ambient _ temp ( self, target ) : return query _ int _ attribute ( self, target, 0, nv _ ctrl _ ambient _ temperature ) | [
-0.8039395809173584,
-0.15514642000198364,
0.32921215891838074,
0.7661749720573425,
0.1575949788093567,
-0.02654808945953846,
0.3655518591403961,
-1.040673851966858,
0.2638988494873047,
0.5660498142242432,
0.2504192888736725,
0.1262011080980301,
0.09892262518405914,
-0.08345946669578552,
... |
def _ _ init _ _ ( self, fn : union [ callable [ [ np. number ], np. number ], callable [ [ pd. timestamp, np. number ], np. number ] ], name : str = " mapper " ) : super ( ). _ _ init _ _ ( name ) self. _ fn = fn | [
-0.6688922643661499,
0.704806387424469,
0.7402783036231995,
0.7253074049949646,
-0.6455514430999756,
-0.2863014340400696,
-0.3294100761413574,
0.2614102363586426,
0.5483625531196594,
-0.5376596450805664,
-0.7122504115104675,
-0.11929737776517868,
1.3732572793960571,
0.38961270451545715,
... |
def aupr ( preds, labels ) : precision, recall, _ = precision _ recall _ curve ( labels, preds ) return auc ( recall, precision ) | [
0.4787256419658661,
-0.7856082916259766,
0.33648985624313354,
-0.810619592666626,
-0.7135339975357056,
-0.15033577382564545,
-0.2320633977651596,
0.5988558530807495,
0.5362401604652405,
0.17175431549549103,
1.7427372932434082,
1.0931675434112549,
0.4821051359176636,
-1.8172308206558228,
... |
def test _ 2d _ line ( ) : topo, cub = check _ subset ( discr2d, xdef [ : 2 ], lr = [ 0., 1. 0 ] ) velo = field ( domain = topo. domain, is _ vector = true, formula = v2d, name ='velo') vd = velo. discretize ( topo ) velo. initialize ( topo = topo ) i0 = cub. integrate _ field _ allc ( velo, topo ) vref = cub. real _ l... | [
1.1362916231155396,
0.30088481307029724,
0.5402039885520935,
0.4735778868198395,
0.6760551929473877,
0.9421884417533875,
0.1484304964542389,
0.29166844487190247,
-0.5343149900436401,
-1.004163146018982,
-0.6526603102684021,
0.0014167303452268243,
-0.03831884637475014,
0.3503935635089874,
... |
def _ try _ get _ matplotlib _ canvas ( view ) : try : from matplotlib. pyplot import figure from matplotlib. backends. backend _ qt5agg import figurecanvasqtagg if isinstance ( view, figure ) : view = figurecanvasqtagg ( view ) # case where the view has a. figure property which is a matplotlib figure. elif isinstance ... | [
1.4399974346160889,
0.32164037227630615,
0.5957901477813721,
-0.7895755171775818,
-1.0074670314788818,
-0.7861378192901611,
0.5590564608573914,
-1.367324948310852,
1.0646501779556274,
-0.7117400765419006,
0.4394904673099518,
0.5121323466300964,
0.3751763701438904,
0.4102995693683624,
-0.... |
def generatetweet ( ) : f _ dose = generateprogressbar ( float ( ( first _ dose + second _ dose ) / population ) ) s _ dose = generateprogressbar ( float ( second _ dose / population ) ) tweet _ message = f'{ f _ dose } - te vaksinuar me dozen e pare \ n { s _ dose } - te vaksinuar me dy doza \ ndata : { ( datetime. da... | [
-0.41528603434562683,
0.08025069534778595,
0.5396139025688171,
-0.5067307949066162,
0.6741623878479004,
0.10622874647378922,
-0.17123833298683167,
-0.7259148955345154,
-1.6026315689086914,
-0.10610485821962357,
-0.3895512521266937,
-0.5135801434516907,
0.8106629252433777,
0.914153873920440... |
def _ _ init _ _ ( self, map ) : self. name ='map built event'self. map = map | [
0.30979496240615845,
-1.3803917169570923,
0.6207221746444702,
0.545478105545044,
-0.5182867646217346,
0.7688578963279724,
-0.01732773892581463,
1.056839108467102,
0.6859946250915527,
-0.38232383131980896,
-0.7866461873054504,
0.13136741518974304,
0.6392266154289246,
0.6256441473960876,
0... |
def test _ compute _ constraints _ without _ secret _ constraint ( self ) : parameters = [ 3, 3, 3 ] constraints = { ( pair ( 0, 0 ), pair ( 2, 0 ) ), ( pair ( 0, 1 ), pair ( 1, 1 ) ), ( pair ( 1, 0 ), pair ( 2, 0 ) ) } solver = solver ( [ ], [ ] ) solver. data = parameters solver. constraints = constraints solver. rea... | [
-0.7990041375160217,
-0.19009001553058624,
0.43238723278045654,
0.3894065022468567,
0.31380829215049744,
-0.4065929651260376,
0.11042623221874237,
-0.11020425707101822,
-0.20355737209320068,
0.3945147693157196,
-1.3360381126403809,
-0.39824584126472473,
-0.9275847673416138,
-0.463436543941... |
def _ getfullname ( self ) : name = " " tmp = self while isinstance ( tmp, interface ) : if hasattr ( tmp, " _ name " ) : n = tmp. _ name else : n ='' if name = ='' : name = n else : name = n + '.'+ name if hasattr ( tmp, " _ parent " ) : tmp = tmp. _ parent else : tmp = none return name | [
0.11401709169149399,
0.000053913794545223936,
0.9115777611732483,
-0.23923780024051666,
-0.9976912140846252,
-0.1744030863046646,
0.22354625165462494,
-0.9134960770606995,
-0.25629922747612,
-0.0919981598854065,
-0.0386391207575798,
-0.5448031425476074,
0.22152207791805267,
0.9084216952323... |
def has _ ext _ modules ( self, _ ) : return true | [
-0.16852566599845886,
0.2121625393629074,
0.770965039730072,
0.5669119954109192,
0.12800616025924683,
1.1875251531600952,
-0.9923679828643799,
-0.09931289404630661,
0.40757471323013306,
0.3103112578392029,
-0.7698780298233032,
0.04387320578098297,
-0.4035806655883789,
0.8283546566963196,
... |
def calc _ max _ sum ( self ) : self. _ main ( ) max _ elems = { } for line _ sum _ x in self. sorted _ x : x _ row = line _ sum _ x [ 0 ] for y in range ( 1, self. size + 1 ) : y _ row ='% s - 0 - % s'% ( y, x _ row. split ('-') [ - 1 ] ) for z in range ( 1, self. size + 1 ) : z _ row ='% s - % s - 0'% ( y, z ) max _ ... | [
0.5068971514701843,
0.025939632207155228,
0.7267689108848572,
0.5861016511917114,
0.17583763599395752,
-0.49610012769699097,
0.7344996929168701,
0.07719564437866211,
0.004803264979273081,
-0.3411499559879303,
-0.5311703085899353,
-0.2517015337944031,
0.5042601227760315,
0.26896876096725464... |
def humanize _ bytes ( n, precision = 2 ) : # author : doug latornell # licence : mit # url : http : / / code. activestate. com / recipes / 577081 / abbrevs = [ ( 1 < < 50,'pb'), ( 1 < < 40,'tb'), ( 1 < < 30,'gb'), ( 1 < < 20,'mb'), ( 1 < < 10,'kb'), ( 1,'b') ] if n = = 1 : return'1 b'for factor, suffix in abbrevs : if... | [
-0.40725231170654297,
0.21624143421649933,
0.7898733615875244,
-0.4014115631580353,
-0.7078524231910706,
-0.3125423491001129,
-0.3219718933105469,
0.2347428798675537,
0.04126356169581413,
0.09746666997671127,
0.25761520862579346,
0.22260543704032898,
0.09339618682861328,
0.2327650785446167... |
def test _ quotient _ dist ( self ) : curve _ a _ resampled = self. curve _ fun _ a ( self. sampling _ times * * 2 ) curve _ b = gs. transpose ( gs. stack ( ( gs. zeros ( self. n _ sampling _ points ), gs. zeros ( self. n _ sampling _ points ), gs. linspace ( 1. 0, 0. 5, self. n _ sampling _ points ), ) ) ) result = se... | [
0.4614313840866089,
0.021496793255209923,
0.5436621308326721,
0.29968756437301636,
0.0610073022544384,
0.3901714086532593,
0.32580432295799255,
-0.7547092437744141,
0.16351549327373505,
0.11294180899858475,
-0.5095770955085754,
-0.5368201732635498,
-0.02258082665503025,
-0.6986868977546692... |
def kcot ( self, k2 ) : if self. d = = [ 0, 0, 0 ] : gamma _ val = 1. 0 z00 = self. z00. z00 ( k2 ) else : gamma _ val = self. gamma ( k2, self. d, self. l ) z00 = self. z00. z00d ( k2, gamma _ val ) return 2. 0 * z00 / ( self. l * np. sqrt ( np. pi ) ) / gamma _ val | [
0.6298280954360962,
-0.7594938278198242,
0.5391893982887268,
-0.7006775736808777,
-0.8385114669799805,
-0.011988184414803982,
-0.29045575857162476,
-0.2449832707643509,
-0.2816910743713379,
0.6095433235168457,
0.23802553117275238,
-0.023600634187459946,
-0.30263322591781616,
0.494118869304... |
def _ _ init _ _ ( self, path, validation _ size = 0, test _ size = 0, tmp _ dir = none, seed = 1234, camera = " dvs128 " ) : super ( ). _ _ init _ _ ( path, validation _ size = validation _ size, test _ size = test _ size, tmp _ dir = tmp _ dir, seed = seed, camera = camera ) | [
0.21827110648155212,
0.795998215675354,
0.45085155963897705,
1.3229955434799194,
-0.2254815399646759,
0.04966256394982338,
0.6050209999084473,
0.026164023205637932,
1.2171545028686523,
-0.7657796144485474,
-0.054203785955905914,
-0.19445458054542542,
-0.15817129611968994,
0.470597058534622... |
def beginday ( self ) : self. _ current _ day + = 1 # print ( " - " * 20 + " beginning day " + str ( self. _ current _ day ) + " - " * 20 ) dead _ solvers = [ ] for item in self. _ forces : item. beginday ( ) for pos, item in enumerate ( self. _ solvers ) : still _ living = item. beginday ( ) if not still _ living : de... | [
-0.9356951117515564,
-1.1033562421798706,
0.7097898125648499,
0.4188547730445862,
0.993145227432251,
0.40932390093803406,
0.4495099186897278,
-0.7960964441299438,
-0.1581898182630539,
-0.6219256520271301,
0.3152244985103607,
0.24344927072525024,
-0.19654491543769836,
0.5836091041564941,
... |
def multiple _ file _ check ( param : list ) - > bool : if len ( param ) > 1 : return true else : st. info ( " only one file present, can't perform operation. " ) return false | [
-0.6904098391532898,
0.735209047794342,
0.7159721255302429,
1.6747688055038452,
1.1729342937469482,
0.39829781651496887,
0.541843593120575,
0.9743647575378418,
-0.586646556854248,
0.19522427022457123,
0.09138672053813934,
-0.6949601769447327,
-0.524641752243042,
1.3952877521514893,
-1.57... |
def rooms _ generator _ bsp ( self, max _ num : int ) : if self. root = = none : self. root = self. space ( rect ( 0, 0, self. width, self. height ), none ) self. rooms _ generator _ bsp _ helper ( max _ num, 0, 0, self. width, self. height ) | [
-0.4880482852458954,
0.9538837671279907,
0.535746157169342,
1.3242881298065186,
-0.2783416509628296,
0.5660849809646606,
0.7696508765220642,
0.43256011605262756,
0.3386424481868744,
-0.3066944181919098,
0.015673698857426643,
0.1232241615653038,
-0.2608163058757782,
1.0987064838409424,
-0... |
def get _ height ( self ) : return self. _ height | [
0.25055965781211853,
0.30100253224372864,
0.3449993431568146,
1.093611478805542,
-0.1985550820827484,
0.7953266501426697,
1.2156987190246582,
0.06038593500852585,
-0.5266649723052979,
-0.82034832239151,
-0.6031270027160645,
0.45385047793388367,
-0.11950941383838654,
-1.0895425081253052,
... |
def generate _ tickets ( self ) : for problem in self. problems : for config in self. configs : self. tickets. append ( ticket ( * ( problem + config ) ) ) | [
-0.10663840174674988,
0.2170678824186325,
0.3488854765892029,
0.3024221956729889,
0.4651995897293091,
0.8195868730545044,
-0.11012968420982361,
0.6333621144294739,
-0.09328560531139374,
-0.9076154828071594,
-0.611867368221283,
-0.5832326412200928,
-0.2655304968357086,
0.7921774983406067,
... |
def nms ( boxes, scores, overlap = 0. 5, top _ k = 200 ) : import torch keep = scores. new ( scores. size ( 0 ) ). zero _ ( ). long ( ) if boxes. numel ( ) = = 0 : return keep x1 = boxes [ :, 0 ] y1 = boxes [ :, 1 ] x2 = boxes [ :, 2 ] y2 = boxes [ :, 3 ] area = torch. mul ( x2 - x1, y2 - y1 ) v, idx = scores. sort ( 0... | [
-0.5198531150817871,
-0.15079030394554138,
1.055751919746399,
0.4030340313911438,
-1.0975298881530762,
-0.12172827869653702,
0.6140238642692566,
-0.6649619936943054,
0.08786424994468689,
0.1106492429971695,
0.05720872804522514,
-0.3701270818710327,
1.150248408317566,
0.06112968176603317,
... |
def add _ game ( self, player _ 1 _ name : str, player _ 2 _ name : str ) - > int : s = self. _ session p1 _ id = s. query ( player ). filter _ by ( name = player _ 1 _ name ). first ( ). id p2 _ id = s. query ( player ). filter _ by ( name = player _ 2 _ name ). first ( ). id game = game ( player _ 1 = p1 _ id, player... | [
-0.6497938632965088,
0.11923176050186157,
1.337493658065796,
-0.020985567942261696,
-0.03885829448699951,
0.7556206583976746,
-0.847723126411438,
-0.6617420315742493,
-1.0618618726730347,
1.1524877548217773,
-0.07609379291534424,
-0.9633350968360901,
-1.1728874444961548,
-0.102657049894332... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.