text stringlengths 25 2.19k | embedding listlengths 768 768 |
|---|---|
def load _ settings ( ) : global _ settings if _ settings is none : _ settings = current _ loader ( ). conf return _ settings | [
-0.008886060677468777,
0.28517788648605347,
0.3812139630317688,
0.562557578086853,
-0.07301528751850128,
-0.8114977478981018,
0.03477959707379341,
-0.975974977016449,
-0.7540128827095032,
0.9475534558296204,
-0.4484943747520447,
-0.09021446853876114,
-1.0863752365112305,
0.7279762625694275... |
def create _ user _ pool ( poolname = none, policies = none, lambdaconfig = none, autoverifiedattributes = none, aliasattributes = none, smsverificationmessage = none, emailverificationmessage = none, emailverificationsubject = none, smsauthenticationmessage = none, mfaconfiguration = none, deviceconfiguration = none, ... | [
-0.35787972807884216,
0.3057103455066681,
0.5306714177131653,
0.5490466952323914,
0.28693634271621704,
0.7163478136062622,
0.8598446249961853,
-0.25445809960365295,
0.945681095123291,
-0.4123333692550659,
-1.3765116930007935,
0.9914963841438293,
-0.7154988050460815,
-0.6420392990112305,
... |
def test _ cant _ retrieve _ processing _ following _ user _ post ( self, mock ) : user = make _ user ( ) following _ user = make _ user ( ) user. follow _ user ( user = following _ user ) test _ image = get _ test _ image ( ) with open ( test _ image ['path'],'rb') as file : file = file ( file ) post = following _ use... | [
0.288993239402771,
0.8099070191383362,
0.6329019069671631,
1.0723567008972168,
-0.2426145374774933,
1.081130027770996,
0.009115822613239288,
-1.0544990301132202,
-0.3280388414859772,
-1.2025842666625977,
-0.39673715829849243,
0.4077918827533722,
-0.09817121177911758,
0.03876252472400665,
... |
def _ _ lt _ _ ( self, * args ) : return _ snap. tfltv _ _ _ lt _ _ ( self, * args ) | [
0.2123797982931137,
-0.18943369388580322,
-0.0023110562469810247,
-0.8941932916641235,
0.22369511425495148,
-1.0171757936477661,
-0.20270515978336334,
-0.47387346625328064,
-1.198119044303894,
-1.215972661972046,
-0.47185617685317993,
-1.1175068616867065,
-0.14637434482574463,
1.6517125368... |
def get _ adv _ stats ( start _ date, end _ date ) : " " " since the official stats api ('statsapi. web. nhl. com / api / v1 /') does not contain advanced player stats, a different url is used " " " # establishing the column names for the dataframes that will eventually consolidate to a single'playerstats'dataframe col... | [
-0.13176073133945465,
-0.29975712299346924,
0.8260520696640015,
-0.38531410694122314,
-0.177056223154068,
-0.10988102108240128,
-0.38781222701072693,
-0.7559342980384827,
-0.1983025223016739,
0.2634599804878235,
0.010805304162204266,
0.47253698110580444,
0.658375084400177,
0.36396375298500... |
def forget _ device ( accesstoken = none, devicekey = none ) : pass | [
-0.7808763384819031,
0.9883933663368225,
0.3012141287326813,
1.0283784866333008,
0.4008543789386749,
-0.31500664353370667,
0.5169187784194946,
-0.2574208080768585,
0.33366891741752625,
-0.24766816198825836,
0.5009932518005371,
1.477090835571289,
-0.7687581181526184,
-0.20947681367397308,
... |
def isinnid ( self, * args ) : return _ snap. tungraphnodei _ isinnid ( self, * args ) | [
-0.20313090085983276,
0.11981575191020966,
0.3312229812145233,
0.623473048210144,
-0.18060356378555298,
0.39658087491989136,
-0.026791023090481758,
-0.249921515583992,
0.006939908489584923,
-0.08909675478935242,
-0.060792289674282074,
0.8528740406036377,
-1.756947636604309,
-0.229870080947... |
def load _ from _ path ( attrib _ path ) : segments = attrib _ path. split ( '.') if len ( segments ) < 2 : raise importerror ( " { 0 } is not a valid import path ". format ( attrib _ path ) ) attr = segments [ - 1 ] mod = import _ module ( ". ". join ( segments [ : - 1 ] ) ) return getattr ( mod, attr ) | [
0.22919373214244843,
-1.1325362920761108,
0.6097051501274109,
0.0814548209309578,
-0.6698744297027588,
-0.1996503472328186,
0.7562451958656311,
-0.6211150288581848,
0.12044046074151993,
0.801792323589325,
0.22621406614780426,
0.2877476215362549,
-0.1930515617132187,
-1.1148873567581177,
... |
def mapphrases ( usfm ) : logger = logging. getlogger ( logger _ name ) reader = usfmwordreader ( usfm ) phrase = none lastverse = none laststrong = none for line, strong, index in reader : book, chapter, verse = reader. location ( ) # init if not phrase : phrase = twphrase ( index ) # tricky : break phrases that span ... | [
-0.3484286367893219,
-0.872337281703949,
0.5827012658119202,
-1.076603889465332,
-0.832708477973938,
-0.17390689253807068,
-0.21351048350334167,
0.21853573620319366,
1.0524340867996216,
0.4704926908016205,
0.5874553918838501,
-1.3240587711334229,
-0.4825868010520935,
-0.05819530412554741,
... |
def _ _ setitem _ _ ( self, index, value ) : self. attrs [ index ] = value | [
-1.2459819316864014,
-0.37566229701042175,
0.27626141905784607,
-1.2448722124099731,
-0.4334067106246948,
0.2502254843711853,
0.013401948846876621,
-0.11587148159742355,
-0.4543200135231018,
0.046139463782310486,
-0.41954752802848816,
0.44366469979286194,
0.6010258197784424,
-0.90618234872... |
def movecentertoglobal ( self, position, speed, center = " roi " ) : scope = self. scopedev camcenter = np. array ( self. globalcenterposition ( center ) ) scopecenter = np. array ( pg. vector ( scope. globalposition ( ) ) ) scopepos = scopecenter + np. array ( position ) - camcenter return scope. setglobalposition ( s... | [
0.669920802116394,
-0.474152535200119,
0.6712493300437927,
-0.005419099237769842,
-0.4319636821746826,
0.13510185480117798,
-0.46677613258361816,
0.38514673709869385,
0.7163679599761963,
1.5442795753479004,
-0.35609427094459534,
0.4971263110637665,
-1.1527512073516846,
-0.13516025245189667... |
def schemify _ attributes ( attributes _ path ) : util. log ( f " schemifying attributes for { attributes _ path }... " ) outfile _ path = " units. csv " with open ( attributes _ path, encoding = " utf - 8 " ) as attributes _ file : reader = csv. dictreader ( attributes _ file ) with open ( outfile _ path, " w ", encod... | [
-0.04459288343787193,
-0.3883597254753113,
0.5388330221176147,
-1.362973690032959,
0.31856870651245117,
0.6141781210899353,
0.29094454646110535,
0.21879105269908905,
0.06457789242267609,
0.16473020613193512,
0.2203238308429718,
0.6414585709571838,
1.1392501592636108,
-0.1906917840242386,
... |
def _ _ add _ _ ( self, * args ) : return _ snap. tintprv _ _ _ add _ _ ( self, * args ) | [
-1.7011953592300415,
0.051924191415309906,
0.48772022128105164,
-0.2571280896663666,
-0.2305973917245865,
0.040326815098524094,
-0.9871865510940552,
0.0885218158364296,
-0.32114121317863464,
-0.5767711400985718,
-0.3014061152935028,
-0.31534332036972046,
-0.8496646285057068,
0.344652712345... |
def _ import _ interfaces _ for _ device ( self, device, net _ driver, networking, lldp, is _ vm = false ) : output = [ ] for device _ interface in device. interfaces. all ( ) : # clean up potential # # primary # # interfaces if device _ interface. name = = primary _ iface _ name and'primary'in networking : primary _ i... | [
-0.6554133296012878,
0.49124670028686523,
0.605513870716095,
-0.07465481013059616,
0.26500290632247925,
-0.06126880273222923,
0.8711519241333008,
-0.6439741253852844,
0.09500990062952042,
0.5793319940567017,
-0.12664735317230225,
-0.4403858184814453,
-0.1007598266005516,
0.5863875150680542... |
def sample _ movie ( user, * * params ) : defaults = {'title':'sample movie ','description':'sample description ','stock': 100,'rental _ price': 2. 50,'sale _ price': 10. 00,'availability': true } defaults. update ( params ) return movie. objects. create ( user = user, * * defaults ) | [
-0.37053224444389343,
-0.2753467559814453,
0.528583824634552,
1.192360520362854,
-0.07452519237995148,
0.32901567220687866,
-1.1475008726119995,
0.06560152024030685,
-0.2821146845817566,
0.21503716707229614,
-0.994529128074646,
0.6810623407363892,
-0.6344769597053528,
0.11289424449205399,
... |
def tstrhashf _ md5 _ getprimhashcd ( * args ) : return _ snap. tstrhashf _ md5 _ getprimhashcd ( * args ) | [
1.4289181232452393,
0.1616065353155136,
0.3662412166595459,
0.2441447526216507,
-0.756574273109436,
0.5229583382606506,
0.3867744505405426,
0.8400499820709229,
-0.8759042620658875,
-0.456916481256485,
0.049205631017684937,
-0.28618916869163513,
-0.8483733534812927,
0.08243092894554138,
1... |
def addatm ( self, * args ) : return _ snap. tintv _ addatm ( self, * args ) | [
-1.2725342512130737,
-0.2922498881816864,
0.39311909675598145,
0.20515941083431244,
0.48959681391716003,
0.4824942350387573,
0.09904124587774277,
-0.7168620824813843,
-0.29902416467666626,
-0.7952107787132263,
0.10667754709720612,
0.1259472519159317,
-0.5884600877761841,
0.4658725261688232... |
def redefine _ attrs ( self, attrs ) : if isinstance ( attrs, basestring ) : attrs = [ attrs ] self. _ _ dict _ _ [ " attrs " ] = attrs return self | [
-1.1382931470870972,
0.6671430468559265,
0.112326480448246,
-0.5068700909614563,
0.14833635091781616,
-0.6809308528900146,
-0.5230914354324341,
0.7048777937889099,
0.6948810815811157,
-0.35807979106903076,
-0.5059492588043213,
0.7438760995864868,
-0.16577759385108948,
0.3306543231010437,
... |
def printinfo _ pungraph ( * args ) : return _ snap. printinfo _ pungraph ( * args ) | [
-0.7788624167442322,
-0.05924973264336586,
0.4635142683982849,
0.5805026292800903,
-0.3072287142276764,
0.06790786236524582,
-0.14745083451271057,
-0.37205690145492554,
-0.4972298741340637,
0.2655845284461975,
-0.9125658869743347,
-0.15371349453926086,
-0.8946027159690857,
0.13416869938373... |
def select _ action ( self, state ) : sample = np. random. rand ( ) self. eps _ threshold * = eps _ decay self. eps _ threshold = max ( eps _ end, self. eps _ threshold ) self. step + = 1 if sample > self. eps _ threshold : state = torch. floattensor ( state ). cuda ( ) if use _ cuda else torch. floattensor ( state ) s... | [
-0.7558635473251343,
-0.6775557994842529,
0.5611982345581055,
0.7272146940231323,
-0.12714193761348724,
-0.07397864758968353,
0.38437017798423767,
-0.17232251167297363,
0.8358110785484314,
-0.16226141154766083,
0.1949056088924408,
0.6699816584587097,
0.2986072301864624,
-0.3955570161342621... |
async def trigger ( self, * args, * * kwargs ) : await self. _ execute ( args, kwargs ) | [
-0.6049023270606995,
0.825025200843811,
0.33960777521133423,
0.3565751910209656,
0.8554954528808594,
-0.5032302737236023,
-1.019535779953003,
0.6624279618263245,
-0.9511551856994629,
-0.5751839280128479,
-0.8462826013565063,
0.4800077974796295,
-0.47529667615890503,
-0.6846469640731812,
... |
def printlonlat ( self ) : print " % s is at % s. " % ( self. label, ( self. latitude, self. longitude ) ) | [
0.257158100605011,
-1.7318458557128906,
0.48236083984375,
-1.248157262802124,
-0.26029324531555176,
1.1990504264831543,
-1.0485105514526367,
0.11605846136808395,
-0.8182255029678345,
-0.08695299178361893,
-0.1011635959148407,
1.2399439811706543,
-0.030097050592303276,
-0.05248640477657318,... |
def saveedgelist _ pngraph ( * args ) : return _ snap. saveedgelist _ pngraph ( * args ) | [
-1.978251338005066,
1.0751904249191284,
0.044126562774181366,
0.11292450875043869,
0.06360474973917007,
-0.362890362739563,
-0.28389623761177063,
-0.48127129673957825,
0.20483329892158508,
1.027516484260559,
-2.1274538040161133,
-0.3644471764564514,
-0.3812009394168854,
0.6634920835494995,... |
async def stop _ bert ( self ) - > stopbertresponse : request = stopbertrequest ( ) return await self. _ unary _ unary ( " / gnoi. diag. diag / stopbert ", request, stopbertresponse ) | [
-1.9885003566741943,
0.22049841284751892,
0.2845594882965088,
-0.25177446007728577,
0.9879401922225952,
-0.17740942537784576,
0.08199374377727509,
-0.9671432971954346,
-0.7282160520553589,
-0.2765272855758667,
-0.11930263042449951,
0.600531816482544,
-0.6458596587181091,
-0.577379941940307... |
def register ( self, pattern, handler ) : if isinstance ( pattern, _ basestring ) : pattern = self. parser ( pattern ) self. bindings. append ( ( pattern, handler ) ) | [
-0.5343974828720093,
0.30575940012931824,
0.37778258323669434,
0.09947735071182251,
0.2684065103530884,
0.613649308681488,
-0.7397943735122681,
0.4840419888496399,
0.28137949109077454,
-1.5942744016647339,
-0.8532336950302124,
0.8227019906044006,
-0.23814423382282257,
0.7568314671516418,
... |
def _ _ init _ _ ( self, in _ channels, output _ size, hidden _ channels = 16, lstm _ input _ size = 20, lstm _ hidden _ size = 64, num _ layers = 1, kernel _ size = 11, padding = 5, stride = 1 ) : # todo : save parameters and load them back if needed. super ( convolutional _ lstm _ mlp, self ). _ _ init _ _ ( ) self. ... | [
1.1863089799880981,
-0.21247965097427368,
0.8304632306098938,
-0.16758911311626434,
-1.1058884859085083,
-0.06111997738480568,
-0.352299302816391,
0.4510316252708435,
0.009916422888636589,
0.03988783806562424,
-1.0902243852615356,
0.43446871638298035,
0.3113367259502411,
-0.169814318418502... |
def getni ( self, * args ) : return _ snap. tneanet _ getni ( self, * args ) | [
-0.17427735030651093,
0.662706732749939,
0.3270363211631775,
0.7916444540023804,
1.2590340375900269,
-0.9507359862327576,
0.028488436713814735,
-1.2864927053451538,
-0.8197891116142273,
-0.47300514578819275,
-0.39468029141426086,
-2.0637593269348145,
0.13653402030467987,
-0.061390314251184... |
def linear _ model ( x, attr, xvars, fit _ intercept = none, name = none, cut = none, residuals = true, quiet = true, model ='linearregression') : if model is not'linearregression': raise exception ( " currently only model ='linearregression'implmented. " ) from sklearn. linear _ model import linearregression import pa... | [
0.19200733304023743,
-0.7011964321136475,
0.735763669013977,
-0.8768836259841919,
-0.1877022236585617,
0.25286778807640076,
-0.41418272256851196,
-0.05385928601026535,
0.10813320428133011,
0.4123436510562897,
-0.31890982389450073,
0.4716934561729431,
0.13787880539894104,
-0.747361421585083... |
def code _ file ( ) : if os. path. exists ( " code. txt " ) : return else : with open ( " code. txt ", " w " ) as file : return | [
1.0459420680999756,
0.09051632881164551,
0.4701404869556427,
-0.12888984382152557,
1.1861470937728882,
1.0059001445770264,
0.43493497371673584,
1.152245044708252,
-0.717503547668457,
0.5181979537010193,
0.36457720398902893,
-0.30248379707336426,
-0.10544274747371674,
0.4690166711807251,
... |
def _ _ bool _ _ ( self ) : return bool ( self. _ entries ) | [
-0.2225748598575592,
-0.6055153012275696,
0.25172242522239685,
-0.2066883146762848,
0.4900433123111725,
0.7255501747131348,
-0.36984843015670776,
1.234043002128601,
-0.21211139857769012,
-0.4350607991218567,
-0.5591896772384644,
0.13494451344013214,
-0.038161501288414,
0.062055207788944244... |
def device _ state _ attributes ( self ) : # # maybe should filter rather than sending them all return visonicapi. panelstatus | [
-0.9930359125137329,
-0.3543357849121094,
0.42835861444473267,
-0.33584773540496826,
-0.6632189154624939,
0.2705341875553131,
-0.5928279757499695,
-0.2678699195384979,
0.12426892668008804,
0.161850705742836,
-0.6822715997695923,
-0.30196788907051086,
0.053465839475393295,
0.860891997814178... |
def test _ cant _ retrieve _ draft _ pending _ connection _ user _ post ( self ) : user = make _ user ( ) pending _ connection _ user = make _ user ( ) user. connect _ with _ user _ with _ id ( user _ id = pending _ connection _ user. pk ) circle = make _ circle ( creator = pending _ connection _ user ) post = pending ... | [
0.04225166141986847,
0.4834047555923462,
0.6458366513252258,
-0.22447651624679565,
0.15456818044185638,
0.6312074065208435,
-0.3662535846233368,
-0.9190090894699097,
-0.05351166054606438,
-0.7213181257247925,
0.059443578124046326,
0.3671378791332245,
-0.6429429054260254,
-0.018535703420639... |
def uboot _ expect ( ) : spawned = false timed _ out = false reset = false warning = false # output string specifying that the u - boot command line is ready prompt ='zynq - uboot >'# terminal object used for coloring output term = terminal ( ) while 1 : try : # determine uart serial device path try : uart _ dev = glob... | [
-0.3497096598148346,
-0.19845370948314667,
0.8516037464141846,
0.5059397220611572,
-0.36335620284080505,
0.21076600253582,
0.952202320098877,
0.046337153762578964,
0.30970460176467896,
-0.5200327038764954,
0.3468252718448639,
-0.03426770120859146,
-0.3642072081565857,
0.10981053113937378,
... |
def title ( self ) : return self. _ _ title | [
0.02040145732462406,
-0.6830307841300964,
0.3190874755382538,
-0.3340834677219391,
-0.043651238083839417,
0.5647100806236267,
-0.39141687750816345,
-0.3903163969516754,
0.758918285369873,
-0.7630566954612732,
0.3763911724090576,
0.03404131904244423,
-0.9679756760597229,
-0.6186490654945374... |
def flatten ( self, root : treenode ) - > none : node = root while node : if node. left : most _ right = node. left while most _ right. right : most _ right = most _ right. right most _ right. right = node. right node. right = node. left node. left = none node = node. right | [
-0.4423500895500183,
0.5741146802902222,
0.71729576587677,
-0.05750875547528267,
-0.38270941376686096,
0.028128450736403465,
-0.04139672592282295,
-0.4507792592048645,
0.028166092932224274,
0.14207987487316132,
-0.5358881950378418,
0.2654274106025696,
-0.7217833995819092,
1.704858064651489... |
def bin _ to _ sparse _ arrays ( one _ or _ more _ files, cc _ number, max _ events = none, verbose = true, pedestals = none, cm _ matrix = none, scale = none ) : filelist = one _ or _ more _ files if type ( one _ or _ more _ files ) = = list else [ one _ or _ more _ files ] # read the file in " chunks " of 10000 event... | [
0.5472339987754822,
-0.008138297125697136,
1.0786519050598145,
-0.015581099316477776,
0.4710228741168976,
-0.1652313619852066,
0.3915165960788727,
0.25415414571762085,
-0.1095593124628067,
0.9666692018508911,
0.06689596176147461,
0.17640115320682526,
-0.2320091426372528,
0.5372517704963684... |
def strattrvalueei ( self, * args ) : return _ snap. tneanet _ strattrvalueei ( self, * args ) | [
-0.19790765643119812,
-0.03821893408894539,
0.08068736642599106,
-0.3245476484298706,
0.7233292460441589,
0.36102405190467834,
0.723016083240509,
-0.9016798734664917,
-1.8899909257888794,
0.20642809569835663,
0.09049348533153534,
-1.0249377489089966,
0.16306740045547485,
0.1178650036454200... |
def free _ pars ( self ) : return self. list _ of _ pars ( " free " ) | [
-0.7675822973251343,
0.23711389303207397,
0.5159981846809387,
-0.02959219180047512,
-0.8127537369728088,
0.7031207084655762,
-0.5119385719299316,
-1.0281329154968262,
0.34342125058174133,
1.048896312713623,
-0.7567135095596313,
0.3847891390323639,
-0.9292987585067749,
0.6584515571594238,
... |
def savesettings ( self, table, settings ) : self. logger. debug ( " entering savesettings " ) cursor = self. conn. cursor ( ) for key, value in settings. items ( ) : cursor. execute ( " replace into % s ( key, value ) values (?,? ) " % table, ( key, value ) ) self. conn. commit ( ) | [
-1.1585359573364258,
0.5318135023117065,
0.4009200930595398,
0.6375395655632019,
0.5294126868247986,
-0.4218037724494934,
-0.5255728363990784,
-0.043650440871715546,
-1.1071749925613403,
1.6911638975143433,
-0.8824726343154907,
-1.1276636123657227,
-0.9011498093605042,
-0.02815520577132702... |
def getactivityforworkshops ( workshopcodes, disabled ='0 ', deleted ='0') : objtypes = ['resource ','discussion ','idea'] finalactivitylist = [ ] try : activitylist = meta. session. query ( thing ) \. filter ( thing. objtype. in _ ( objtypes ) ) \. filter ( thing. data. any ( and _ ( data. key = = u'workshopcode ', da... | [
-0.6728456616401672,
-0.06539898365736008,
0.5778711438179016,
0.3203738331794739,
-0.00873840507119894,
0.03789139166474342,
0.5332547426223755,
-0.48531749844551086,
0.6576496362686157,
0.23270322382450104,
0.9408829808235168,
0.4166525900363922,
-0.9358199238777161,
-0.05613095685839653... |
def trunc ( self, * args ) : return _ snap. tcncomv _ trunc ( self, * args ) | [
0.6027883887290955,
0.684181809425354,
0.44353166222572327,
-0.7470383644104004,
1.0106676816940308,
0.2042427659034729,
1.1041555404663086,
0.1913079470396042,
-0.5067636966705322,
-0.1820041388273239,
-0.24706581234931946,
0.5405331254005432,
0.2107035219669342,
0.4744693338871002,
0.8... |
def test _ display _ offset ( self ) : base. _ base _ _ nb _ objects = 0 r1 = rectangle ( 2, 3, 2, 2 ) dis _ stdout = stringio ( ) sys. stdout = dis _ stdout r1. display ( ) sys. stdout = sys. _ _ stdout _ _ self. assertequal ( " \ n \ n # # \ n # # \ n # # \ n ", dis _ stdout. getvalue ( ) ) | [
0.6962917447090149,
-1.2611218690872192,
0.7624205350875854,
-0.11204911768436432,
-0.7623735070228577,
0.8901504874229431,
0.8199366331100464,
-0.9034644961357117,
-0.4140990674495697,
-0.5052072405815125,
-0.010238170623779297,
0.5035001635551453,
-0.05152547359466553,
0.4859887659549713... |
def test _ cant _ publish _ foreign _ user _ draft _ community _ post ( self ) : user = make _ user ( ) foreign _ user = make _ user ( ) headers = make _ authentication _ headers _ for _ user ( user ) post _ text = make _ fake _ post _ text ( ) community = make _ community ( ) foreign _ user. join _ community _ with _ ... | [
0.4816003739833832,
1.0012491941452026,
0.9093643426895142,
0.6760777235031128,
0.2493479698896408,
1.0973625183105469,
0.07617467641830444,
-0.5472037196159363,
-0.42638638615608215,
-0.017589375376701355,
-0.2562033236026764,
-0.6204801797866821,
-0.6966907382011414,
0.36139535903930664,... |
def onnotifyfmt ( self, * args ) : return _ snap. tnotify _ onnotifyfmt ( self, * args ) | [
0.3352017402648926,
-0.397902250289917,
0.2567438781261444,
0.18020646274089813,
0.06879477202892303,
-0.9730668663978577,
-0.4877431094646454,
-0.29944437742233276,
-0.4702090620994568,
0.794275164604187,
-0.9601173400878906,
-1.1829220056533813,
-0.24611933529376984,
1.3966271877288818,
... |
def add _ cookies _ for _ url ( self, cookies, url ) : cookie _ list = [ ] for c in cookies : if isinstance ( c, dict ) : cookie _ list. append ( qnetworkcookie ( c ['name'], c ['value'] ) ) else : return self. _ _ cookie _ jar. setcookiesfromurl ( cookies, qtcore. qurl ( url ) ) return self. _ _ cookie _ jar. setcooki... | [
-1.0990402698516846,
-0.09849844872951508,
0.4688855707645416,
-0.08771175891160965,
0.10256756097078323,
-0.10498446971178055,
-0.3356156051158905,
0.18150943517684937,
0.35854265093803406,
-0.23334920406341553,
0.13666898012161255,
-0.4836481213569641,
-0.5825108289718628,
0.681099236011... |
def step _ info ( t, yout ) : os = ( yout. max ( ) / yout [ - 1 ] - 1. 0 ) * 100. 0 tr = t [ next ( ( i for i in range ( 0, len ( yout ) - 1 ) if yout [ i ] > yout [ - 1 ] *. 66 ), len ( yout ) ) - 1 ] - t [ 0 ] ts = t [ next ( ( len ( yout ) - i for i in range ( 2, len ( yout ) - 1 ) if abs ( yout [ - i ] / yout [ - 1... | [
-0.0745096206665039,
-0.03954212740063667,
0.7367486357688904,
-0.2097848653793335,
-0.7894716858863831,
-0.4093949496746063,
0.4514840543270111,
-0.3331802785396576,
-1.708221197128296,
0.6250752806663513,
-0.8349211812019348,
-0.12422006577253342,
0.44356027245521545,
0.338422030210495,
... |
def _ add _ processes _ recursive ( self, processtreedict ) : pid = processtreedict ['pid'] ppid = processtreedict ['ppid'] nodename = " pid { 0 } ". format ( pid ) ppid _ node = " pid { 0 } ". format ( ppid ) self. digraph. add _ node ( nodename, type ='pid ', pid = pid, parent _ id = ppid ) self. nodemetadata [ noden... | [
-0.23526327311992645,
-0.08671802282333374,
0.925039529800415,
-1.1069567203521729,
0.43842557072639465,
0.5913287997245789,
-0.5303163528442383,
0.1066727414727211,
-0.1260836273431778,
-0.048036932945251465,
0.2045554518699646,
0.18058417737483978,
-0.03015192784368992,
0.403397709131240... |
def _ process _ binding _ address ( self, binding, is _ ipv6, is _ anycast, vip _ exempt ) : addr = binding [ " address " ] if is _ ipv6 : # we need to translate the netmask6 exposed by puppet into a prefix length since ipaddress # library does not support this case. nm = self. _ get _ ipv6 _ prefix _ length ( binding ... | [
-0.5220106244087219,
-0.14024773240089417,
0.672808825969696,
-0.06586480885744095,
-0.8121494650840759,
-0.4955642521381378,
0.25205886363983154,
0.05149165540933609,
1.3674434423446655,
0.20809803903102875,
0.9758170247077942,
0.6021848320960999,
-0.7126432061195374,
-0.2911667823791504,... |
def extract _ state ( model, buffer = none ) : if buffer is none or model. getnnodes ( ) = = 1 : buffer = { } # update state from buffer if any s = model. getstate ( buffer ['scip _ state'] if'scip _ state'in buffer else none ) buffer ['scip _ state'] = s if'state'in buffer : obj _ norm = buffer ['state'] ['obj _ norm'... | [
-0.11827893555164337,
-0.6057778596878052,
0.7279297113418579,
-0.101286381483078,
-0.6810559034347534,
-0.3809519112110138,
0.921781063079834,
-0.38786980509757996,
0.0993824452161789,
0.10497494786977768,
-1.031724452972412,
-0.12902580201625824,
0.04263092577457428,
-0.46805283427238464... |
def delete _ demo _ by _ guid ( guid ) : # create and format request to erp url ='% s / api / v1 / demos / % s'% ( get _ service _ url ('lw - erp'), guid ) headers = get _ apic _ credentials ( ) try : response = requests. request ( " delete ", url, headers = headers ) except exception as e : raise apiexception ('erp th... | [
-0.05252181738615036,
-0.23545965552330017,
0.6821641325950623,
0.08868762105703354,
0.11986576020717621,
-0.2191740870475769,
-0.09389603137969971,
-0.5754755735397339,
0.8126035928726196,
-0.03461737185716629,
0.06059175729751587,
0.6737887859344482,
-0.05683900788426399,
0.7057031393051... |
def forward ( self, indices : torch. tensor ) - > torch. tensor : # ( n, max _ sentence _ len, max _ word _ len ) - > ( n, max _ sentence _ len, max _ word _ len, e _ char ) x = self. embedding _ part. forward ( indices ) # ( n, max _ sentence _ len, max _ word _ len, e _ char ) - > ( *, e _ char, max _ word _ len ) 中 ... | [
-0.06760594248771667,
0.3479675352573395,
0.7722427845001221,
-0.4039236307144165,
-0.5837330222129822,
-0.17448389530181885,
0.8777400255203247,
0.30780619382858276,
-0.026971226558089256,
0.2613809406757355,
-0.7459598183631897,
0.30055248737335205,
-0.22851316630840302,
-0.9126955270767... |
def load ( self, * args, * * kwargs ) : if " somef115 " in self. controller. globals : return self. controller. globals [ " somef115 " ] = true location = self. controller. globals [ " procurement _ file _ path " ] self. datelimit = " show all year " self. ministry = " show all " datelist = [ " show all year " ] dateli... | [
0.05340488627552986,
0.4528833031654358,
0.8064777255058289,
-0.2711386978626251,
-0.2606944739818573,
0.684686005115509,
0.8390511870384216,
0.5392412543296814,
-0.19851325452327728,
-0.9873702526092529,
0.007595248054713011,
0.035252176225185394,
0.3365859091281891,
1.2784215211868286,
... |
def _ builddiff ( self ) : outputlist = [ ] for tag, alo, ahi, blo, bhi in self. cruncher. get _ opcodes ( ) : if tag = ='replace': # text replaced = deletion + insertion outputlist. append ( self. deltag % " ". join ( self. source [ alo : ahi ] ) ) outputlist. append ( self. instag % " ". join ( self. target [ blo : b... | [
-0.5601650476455688,
-0.5896999835968018,
0.7584840059280396,
-0.4614092707633972,
-0.14226660132408142,
-0.6575693488121033,
0.376434862613678,
0.3782305121421814,
-0.1999836266040802,
0.02064174972474575,
-0.47778815031051636,
-0.09534098207950592,
0.04310205206274986,
1.058179259300232,... |
def signer _ autoresponded ( self ) : self. update _ signer ( status ='auto _ responded') | [
-0.08210186660289764,
-1.6530256271362305,
0.35652273893356323,
0.29740044474601746,
-0.02521667629480362,
-0.15574437379837036,
0.615001380443573,
0.8356731534004211,
0.3817257285118103,
-0.6939501166343689,
-1.4398880004882812,
-0.2056005597114563,
-0.1506182700395584,
0.1199144423007965... |
def getfirstselection ( filternb = none, longname = false ) : selection = cmds. ls ( selection = true, long = longname ) if filternb and selection : selection = cmds. filterexpand ( selection, sm = filternb ) return libpython. getfirstitem ( selection,'' ) | [
-0.18556781113147736,
0.31847599148750305,
0.6358550190925598,
0.3596811890602112,
0.02339833602309227,
-0.8485472798347473,
0.544581949710846,
-0.7563498616218567,
0.5727471709251404,
-0.8069512248039246,
0.15572801232337952,
0.19633449614048004,
-0.19829978048801422,
0.5104732513427734,
... |
def detail ( self, req ) : req. get. pop ('name ~ ', none ) req. get. pop ('description ~ ', none ) req. get. pop ('description ', none ) return self. _ get _ snapshots ( req, is _ detail = true ) | [
-0.8604824542999268,
1.039863109588623,
0.5538368821144104,
0.38900110125541687,
0.36376723647117615,
-0.3723759353160858,
-0.779337465763092,
0.0907331109046936,
0.31570446491241455,
-0.285179078578949,
-0.12600380182266235,
0.3235163390636444,
-0.01892983727157116,
1.1255699396133423,
... |
def from _ ansi ( cls, id ='', ansi ='' ) : self = object. _ _ new _ _ ( cls ) self. _ ansi = ansi if id and id not in cls. cached : cls. cached [ id ] = self self. id = id return self | [
0.3698837459087372,
-0.5100018382072449,
0.45531022548675537,
0.31176120042800903,
-1.51857590675354,
0.10688468813896179,
-1.1080026626586914,
0.04961638152599335,
1.1160669326782227,
0.0571318194270134,
-1.6637601852416992,
0.22849471867084503,
0.4001542627811432,
-0.003135095117613673,
... |
def _ evaluate ( self, states, actions, tasks ) : dist = tf. norm ( states - tasks, axis = 1 ) dones = dist < self. _ at _ goal _ dist if self. _ use _ neg _ rew : rewards = tf. cast ( dones, tf. float32 ) - 1. 0 # rewards in { - 1, 0 } else : rewards = tf. cast ( dones, tf. float32 ) # rewards in { 0, 1 } return rewar... | [
-0.5336659550666809,
0.11189784854650497,
0.4065127670764923,
-0.41372594237327576,
-0.34614965319633484,
0.3613646626472473,
-0.05089950188994408,
-0.27085164189338684,
-0.37712880969047546,
0.5491172075271606,
0.022117141634225845,
0.12626610696315765,
0.9931212067604065,
-0.251754581928... |
def _ get _ pattern _ or _ empty ( pattern, group = 1 ) : try : p = re. compile ( pattern ) return p. search ( _ general _ info ). group ( group ) except attributeerror : attr = pattern. split (':') [ 0 ] self. logger. warning ( "'% s'not found for series'% s '. returning empty string " % ( attr, name ) ) return'' | [
-0.8318411111831665,
0.6839869618415833,
0.44820287823677063,
-0.5347139835357666,
-0.08912293612957001,
0.2664092481136322,
0.15911972522735596,
-0.8814346790313721,
0.04887419193983078,
0.09152926504611969,
1.2984551191329956,
0.3998223543167114,
-0.24013079702854156,
-0.8806124329566956... |
def log _ to _ kafka ( topic, event ) : producer. send ( topic, json. dumps ( event ). encode ( ) ) | [
0.10363328456878662,
-0.473704069852829,
0.5822882652282715,
0.3523843586444855,
-0.25098875164985657,
-0.12338719516992569,
-0.947394073009491,
-0.053926125168800354,
0.1096523180603981,
1.1933841705322266,
-0.8382526636123657,
1.068192958831787,
0.5901904106140137,
-0.31966468691825867,
... |
def simulate _ psdf _ cython _ 2 ( ) : # input # norm = sim _ input ['norm'] dt = sim _ input ['dt'] psdpar = sim _ input ['psdpar'] inorm = 0 if norm = ='var'else 1 if norm = ='leahy'else 2 sims = [ ] for isim in range ( 1, args. nsim + 1 ) : az. misc. print _ progress ( isim, args. nsim + 1, isim = = args. nsim ) # s... | [
0.2316482961177826,
0.21335580945014954,
0.9087499380111694,
-0.2796410620212555,
-0.014471725560724735,
-0.20923785865306854,
0.14192357659339905,
-0.6965821385383606,
-0.39142653346061707,
-0.33371198177337646,
-0.11965629458427429,
0.11888622492551804,
-0.3588443100452423,
0.58769041299... |
def test _ alphabeta _ interface ( self ) : h, w = 7, 7 # board size test _ depth = 1 starting _ location = ( 5, 3 ) adversary _ location = ( 0, 0 ) # top left corner iterative _ search = false search _ method = " minimax " heuristic = lambda g, p : 0. # return 0 everywhere # create a player agent & a game board agentu... | [
-0.48455607891082764,
0.1334308236837387,
0.6393701434135437,
0.5781325101852417,
0.5318218469619751,
0.3447335362434387,
0.3839472234249115,
-0.14579305052757263,
0.25924739241600037,
0.38634708523750305,
-0.29844343662261963,
-0.41587144136428833,
-0.9039855003356934,
-0.2799149453639984... |
def maxcpgreedybetter3 ( * args ) : return _ snap. maxcpgreedybetter3 ( * args ) | [
-1.171875,
0.37551620602607727,
0.33200016617774963,
1.0395439863204956,
0.7583327889442444,
1.4915484189987183,
-0.46943244338035583,
-0.2675124704837799,
-0.7677316069602966,
-0.42305514216423035,
-0.9494684934616089,
-0.20614348351955414,
-1.5454694032669067,
1.0450670719146729,
0.228... |
def load _ coco ( self, dataset _ dir, subset, shift = none ) : # add classes. self. add _ class ( " coco ", 1, " dog " ) self. add _ class ( " coco ", 2, " cake " ) self. add _ class ( " coco ", 3, " bed " ) # train or validation dataset? assert subset in [ " train2017 ", " val2017 ", " samples ", " dark " ] dataset _... | [
-0.3881472051143646,
0.2417871206998825,
0.8395193219184875,
-0.5218603610992432,
-1.0936721563339233,
-0.4501180052757263,
0.6280325055122375,
-0.08940034359693527,
-0.8147674202919006,
0.7914146184921265,
-0.37185320258140564,
0.763810396194458,
1.0917437076568604,
0.07778269797563553,
... |
def perf _ check ( self, i, input1, input2, output _ list1 ) : output = [ ] for j in range ( 0, len ( input2 ) ) : if i in input2 [ j ] ['inventory'] : # checking if the order is present in inventory if input1 [ i ] = = input2 [ j ] ['inventory'] [ i ] or input1 [ i ] < = input2 [ j ] ['inventory'] [ i ] : self. match ... | [
-0.5129561424255371,
-0.7740328311920166,
0.6725095510482788,
0.43629658222198486,
-0.5535966157913208,
0.4483034014701843,
-0.25793519616127014,
-0.23927854001522064,
-0.9433096051216125,
1.2688792943954468,
0.532721996307373,
-0.4919399619102478,
-0.925106942653656,
-0.10497936606407166,... |
def get _ jsd _ scores ( type2freq _ 1, type2freq _ 2, base = 2, alpha = 1, weight _ 1 = 0. 5, weight _ 2 = 0. 5 ) : # normalize reference and comparison frequencies type2p = get _ relative _ freqs ( type2freq _ 1 ) type2q = get _ relative _ freqs ( type2freq _ 2 ) # get mixed distribution type2m = get _ mixed _ distri... | [
-0.39638635516166687,
-0.852798581123352,
1.1510251760482788,
-0.08836529403924942,
-0.11009050905704498,
0.1700916290283203,
-0.453805148601532,
-1.3740648031234741,
-0.9070361256599426,
0.4330112040042877,
0.0022720659617334604,
0.8103020787239075,
-0.0672001838684082,
0.9152346253395081... |
def get _ valid _ session _ paths ( root _ folder, depth = 2 ) : def get _ valid _ session _ paths _ ( search _ from _ path, depth ) : " " " performs search from given child path " " " assert depth > = 0 if not os. path. isdir ( search _ from _ path ) : return [ ] res = [ ] for file in os. listdir ( search _ from _ pat... | [
-0.2980056405067444,
-0.896839439868927,
1.0291264057159424,
1.5733362436294556,
-0.740370512008667,
0.5680592656135559,
1.346670150756836,
-0.40526634454727173,
0.2116786241531372,
-0.34969788789749146,
-0.10967861860990524,
0.37966910004615784,
-0.6163206100463867,
0.5424029231071472,
... |
def geteolnln ( self, * args ) : return _ snap. tmout _ geteolnln ( self, * args ) | [
0.23164652287960052,
0.07457148283720016,
0.5286628007888794,
-0.7345987558364868,
0.5488874912261963,
-0.7242998480796814,
0.5643269419670105,
0.29366445541381836,
-0.3651014566421509,
0.008577831089496613,
-0.7416914701461792,
-0.972043514251709,
0.010121971368789673,
0.16398659348487854... |
def list _ user _ pool _ clients ( userpoolid = none, maxresults = none, nexttoken = none ) : pass | [
-1.0133121013641357,
-0.11092441529035568,
0.049206122756004333,
0.391683965921402,
-0.041722074151039124,
-0.4325886368751526,
0.6868783235549927,
-1.3488832712173462,
0.7563725709915161,
-0.338438481092453,
-0.7698395252227783,
1.3072494268417358,
-1.0401263236999512,
-0.6099951863288879... |
def test _ auto _ threshold _ calculation ( ) : transformer = drophighpsifeatures ( threshold = " auto ", p _ value = 0. 001, bins = 10 ) assert math. isclose ( transformer. _ calculate _ auto _ threshold ( n = 500, m = 500, bins = 10 ), 0. 11150865948502628, ) transformer = drophighpsifeatures ( threshold = " auto ", ... | [
0.28272247314453125,
0.22700701653957367,
0.6343369483947754,
0.9472402930259705,
0.35745885968208313,
-0.5397873520851135,
0.6200929284095764,
-0.1348104029893875,
-0.8741565346717834,
-0.709890604019165,
-1.563833475112915,
0.18144796788692474,
0.6543051600456238,
0.3415355980396271,
0... |
def writesandboxspec ( self, appc _ pod _ manifest _ path, output _ path ) : if os. path. isfile ( output _ path ) : raise valueerror ('refusing to write sandboxspec to file % s which already exists!'% output _ path ) appc _ contents = json. loads ( osutils. readfile ( appc _ pod _ manifest _ path ) ) # use the file na... | [
-0.06229691952466965,
-1.187174916267395,
0.44482213258743286,
0.3987788259983063,
-0.01715048961341381,
-0.07081715762615204,
-0.15410184860229492,
-0.43779197335243225,
-0.3374684751033783,
0.2648608386516571,
0.09113983809947968,
0.19788704812526703,
0.713901162147522,
-0.16484382748603... |
def _ prepare _ server _ nics ( neutron _ client, ctx, server ) : network _ ids = get _ openstack _ ids _ of _ connected _ nodes _ by _ openstack _ type ( ctx, network _ openstack _ type ) port _ ids = get _ openstack _ ids _ of _ connected _ nodes _ by _ openstack _ type ( ctx, port _ openstack _ type ) management _ n... | [
-0.6299165487289429,
0.5156347751617432,
0.405158668756485,
-0.8770134449005127,
0.7468203902244568,
0.12787671387195587,
-0.6456380486488342,
-0.7220165133476257,
-0.36089950799942017,
0.413589745759964,
-0.5785479545593262,
1.0914909839630127,
0.05722423642873764,
0.3712683320045471,
0... |
def get _ fetch _ response ( self, raw ) : p = payload ( raw ) p. _ body = p. body return p | [
0.4112494885921478,
-0.4545484185218811,
0.3248865306377411,
-1.0111322402954102,
-1.5093048810958862,
0.1096314862370491,
-1.0255799293518066,
-1.284994125366211,
0.9554391503334045,
-0.5670952200889587,
-0.6873794794082642,
-0.016625115647912025,
0.6123852133750916,
-0.8100019097328186,
... |
def deploy ( ) : update _ code ( ) update _ reqs ( ) syncdb ( ) collectstatic ( ) restart _ supervisord ( ) | [
-0.047882914543151855,
-0.13711461424827576,
0.3942883014678955,
0.7899055480957031,
0.4066985547542572,
0.2834729850292206,
-0.09649189561605453,
-0.04188099876046181,
-0.8108997344970703,
0.7329142093658447,
-0.061510052531957626,
0.5232870578765869,
-0.495842844247818,
0.827222228050231... |
def print _ screen ( self, history ) : # clear the terminal screen print ( ) os. system ('cls'if os. name = ='nt'else'clear') # print screen contents print ( " robco industries ( tm ) termalink protocol \ n " + \ " enter password now \ n \ n " + \ str ( self. logic. attempts ) + " attempt ( s ) left : " + ( " " * self.... | [
-0.3640180230140686,
-0.02570425532758236,
0.6092360019683838,
-0.13805368542671204,
-0.17784281075000763,
-0.13481636345386505,
0.15612530708312988,
-0.36923012137413025,
0.25515276193618774,
0.06384915113449097,
0.9607909917831421,
0.571733295917511,
-0.2756015956401825,
1.13008654117584... |
def plotoutdegdistr _ pngraph ( * args ) : return _ snap. plotoutdegdistr _ pngraph ( * args ) | [
-0.769553005695343,
1.2777531147003174,
0.23428085446357727,
-0.8771620392799377,
-0.6582674384117126,
0.6825037002563477,
0.37017136812210083,
-0.02669060230255127,
-0.18818636238574982,
-0.26231029629707336,
0.0246733408421278,
0.3530816435813904,
0.3264251947402954,
-0.26800140738487244... |
def _ update _ directory ( operation, path, recursive = false, line _ by _ line = false, extension ='' ) : files _ updated = [ ] for name in os. listdir ( path ) : full _ path = os. path. join ( path, name ) # ignore directories if not recursive. if not recursive and os. path. isdir ( full _ path ) : continue results =... | [
-0.5855509638786316,
0.20368073880672455,
0.8352349996566772,
0.8070791363716125,
-0.8072570562362671,
-1.1603344678878784,
0.5895304679870605,
0.028242778033018112,
-0.035772379487752914,
0.6188554763793945,
0.34710782766342163,
-0.48588836193084717,
0.3035065233707428,
0.0060657393187284... |
def _ dispatch _ event ( self, * args ) : # name of the dispatched event, like'on _ draw'name = args [ 0 ] # start the clock, and keep the time if this is on _ draw for fps calcs. start _ time = time. perf _ counter ( ) if name = ='on _ draw': _ frame _ times. append ( start _ time ) # call pyglet's dispatch event func... | [
-0.09253975003957748,
1.1339412927627563,
0.913936972618103,
-0.16186299920082092,
0.2171611785888672,
-0.05421848222613335,
0.28232988715171814,
0.15971559286117554,
0.0743303894996643,
0.783033013343811,
-0.66669762134552,
0.23612262308597565,
0.6858763694763184,
0.830780565738678,
-0.... |
def set _ conversion _ function ( self ) : from conversions import ( ionization _ gauge, hall _ current _ sensor, pfeiffer _ single _ gauge, baratron, mfc, ) conversions = { " ionization gauge " : ionization _ gauge, " pfeiffer single gauge " : pfeiffer _ single _ gauge, " hall sensor " : hall _ current _ sensor, " no ... | [
-0.6318981647491455,
-0.5604943633079529,
0.48875582218170166,
0.41213613748550415,
0.7588353753089905,
-0.3744332194328308,
-0.09557002037763596,
-0.13819275796413422,
-0.1729372888803482,
0.0765288844704628,
-1.0287123918533325,
0.03312189131975174,
0.14718899130821228,
0.921298086643219... |
def runscript ( script : str ) - > bool : if not uppertester : printmd ('* * no command interface available * * ', c ='red') return false return requests. post ( uppertester, headers = {'x - m2m - utcmd': script } ). status _ code = = 200 | [
-1.315610408782959,
0.2647004723548889,
0.7540427446365356,
0.6113122701644897,
0.09306524693965912,
0.421454519033432,
0.20919767022132874,
-0.8782994747161865,
0.4581473767757416,
-0.08017390221357346,
-0.45258620381355286,
0.4624378979206085,
-1.430643916130066,
0.920126736164093,
-0.... |
def delete _ click ( self, sender, e ) : definition _ file = self. definition _ file if not definition _ file : self. invalid _ definition _ file ( ) return confirmed = alert ( " are you sur you want to delete followinge parameters : \ n { } ". format ( " \ n ". join ( [ item. name for item in self. datagrid. selectedi... | [
0.8279454112052917,
0.21060693264007568,
0.6239779591560364,
0.4433380365371704,
0.14822794497013092,
0.10740221291780472,
0.5686855912208557,
0.3979254961013794,
-0.8194975256919861,
0.6301929354667664,
0.09722647815942764,
0.7649979591369629,
-0.18773353099822998,
1.1520740985870361,
-... |
def create _ ex ( cls, img, elev _ unit, dinner, douter, dens _ t, dens _ w, elev _ w, edge, edge _ elev, opt, survey _ type ) : ret _ val = gxapi _ cy. wraptc. _ create _ ex ( gxcontext. _ get _ tls _ geo ( ), img, elev _ unit, dinner, douter, dens _ t, dens _ w, elev _ w, edge, edge _ elev, opt, survey _ type ) retur... | [
-0.13442735373973846,
0.711466372013092,
0.5074194669723511,
-0.30102261900901794,
-0.23690293729305267,
0.374918669462204,
-0.37179866433143616,
-0.5968306660652161,
0.2298257052898407,
0.045564983040094376,
0.9253824949264526,
0.3481198251247406,
0.6138854026794434,
-0.02037840150296688,... |
def selectatomicfltconst ( self, * args ) : return _ snap. ptable _ selectatomicfltconst ( self, * args ) | [
0.1638532429933548,
-0.32947102189064026,
0.18000201880931854,
0.24393106997013092,
0.35059964656829834,
-0.49328622221946716,
0.67425137758255,
-1.6073367595672607,
-0.8523847460746765,
-0.007427333854138851,
0.17898662388324738,
0.17336609959602356,
-0.24739237129688263,
0.19864930212497... |
def generate _ training _ data ( self, corpus ) : if len ( corpus ) = = 0 : raise valueerror ('you need to specify a corpus of text.') training _ data = [ ] corpus _ processed = self. _ preprocess ( corpus ) self. _ mapping ( corpus _ processed ) for sentence in corpus _ processed : for i, word in enumerate ( sentence ... | [
-0.9324501156806946,
0.2826108932495117,
0.8046284317970276,
-0.3110533654689789,
-0.14284950494766235,
-0.01877034269273281,
0.9110181927680969,
0.6441388130187988,
0.15880468487739563,
0.31527504324913025,
-0.5861812829971313,
0.3491682708263397,
-0.6124017238616943,
1.1526050567626953,
... |
def _ gettrackinglocation ( self, node ) : return ', '. join ( node [ key ] for key in ('event'+ i for i in ['city ','state ','country'] ) \ if node [ key ] ) or \'usa ' | [
-0.6190629005432129,
0.18267647922039032,
0.5372049808502197,
-0.32754382491111755,
-0.2924852669239044,
0.14603635668754578,
0.056363265961408615,
0.3959650695323944,
-0.09928794205188751,
1.0521090030670166,
0.3282594382762909,
-0.4436884820461273,
0.4878057837486267,
-0.1281324774026870... |
def genstar _ pngraph ( * args ) : return _ snap. genstar _ pngraph ( * args ) | [
-2.041424036026001,
0.6726685166358948,
0.463979035615921,
-0.19635383784770966,
-0.7966611981391907,
0.48299679160118103,
0.15950171649456024,
0.03992167487740517,
-0.27493253350257874,
-0.13783779740333557,
-1.2665083408355713,
-0.048451442271471024,
-0.2222168892621994,
0.10858622938394... |
def getuserid ( id ) : userprofile = userprofile. query. filter _ by ( id = int ( id ) ). first ( ) return render _ template ('view _ user. html ', userprofile = userprofile ) | [
0.8054009079933167,
0.6170389652252197,
0.39800167083740234,
0.42135047912597656,
-0.47563499212265015,
0.272731214761734,
0.7682520747184753,
-0.4329308867454529,
-0.03303596377372742,
0.07812279462814331,
-0.2519110441207886,
-0.05732719972729683,
-0.1880359947681427,
0.18050245940685272... |
def naked _ twins ( values ) : newvalues = values. copy ( ) # looping over all units to check the presence of twins for unit in unitlist : unit _ values = [ newvalues [ k ] for k in unit ] # converting unit keys into values twins = find _ twins ( unit _ values ) # find twins in the list. if twins : # if we wind twins i... | [
-0.5967758893966675,
-0.32915806770324707,
0.6318317651748657,
-0.289058119058609,
-0.8475381731987,
-0.2734540104866028,
0.5282771587371826,
-0.1837785840034485,
0.08381621539592743,
0.1603062003850937,
-0.892072319984436,
0.486062616109848,
-0.12265203893184662,
1.149404764175415,
-0.3... |
def _ _ ge _ _ ( self, other ) : return self. area ( ) > = other. area ( ) | [
-0.15809224545955658,
0.005299894604831934,
0.7360831499099731,
0.26847243309020996,
-0.11033456772565842,
1.0816642045974731,
-0.7258238196372986,
-1.3362988233566284,
0.0268144179135561,
0.10391449183225632,
-0.2588139474391937,
-0.13533730804920197,
0.3231668472290039,
0.545710504055023... |
def download _ to ( url, file _ path ) : # see https : / / stackoverflow. com / questions / 7243750 / download - file - from - web - in - python - 3 import urllib. request import shutil # download the file from ` url ` and save it locally under ` file _ name ` : with urllib. request. urlopen ( url ) as response, \ open... | [
1.2542744874954224,
-0.7359400391578674,
0.3342367708683014,
0.6301089525222778,
0.0546102374792099,
0.416454941034317,
0.15565696358680725,
0.8754855990409851,
-0.13789387047290802,
0.556158721446991,
-0.9676068425178528,
-0.32724180817604065,
0.39372172951698303,
-0.6776779890060425,
-... |
def test _ atomic _ qname _ max _ length _ nistxml _ sv _ iv _ atomic _ qname _ max _ length _ 1 _ 5 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / qname / schema + instance / nistschema - sv - iv - atomic - qname - maxlength - 1. xsd ", instance = " nistdata / atomic / qn... | [
0.34657132625579834,
-0.36980190873146057,
0.2355094999074936,
0.28250303864479065,
-0.79971843957901,
0.35172149538993835,
0.06978049129247665,
-0.5392521023750305,
0.4245785176753998,
0.6337524652481079,
-0.5488045811653137,
-0.253864049911499,
-0.15199851989746094,
0.22370517253875732,
... |
def generate _ data ( n ) : x = np. array ( [ i * np. pi / 180 for i in range ( 60, ( 60 + ( n * 4 ) ) + 1, 4 ) ] ) np. random. seed ( 10 ) # setting seed for reproducibility y = 4 * x + 7 + np. random. normal ( 0, 3, len ( x ) ) return x, y | [
-1.3634566068649292,
0.44999977946281433,
0.5081955194473267,
-1.4637833833694458,
-0.1523333191871643,
0.6186069846153259,
-0.7725552916526794,
-0.35233011841773987,
0.631879985332489,
-0.18856452405452728,
-0.7867290377616882,
-0.2397540956735611,
0.05992497131228447,
-0.0854832679033279... |
def _ _ init _ _ ( self, * columns ) : self. _ _ columns = _ columns ( columns ) self. _ _ data _ area = { } self. _ _ row _ index = 1 | [
-0.5035340785980225,
0.6808866858482361,
0.40125396847724915,
-0.000023148277250584215,
-0.08076289296150208,
0.2500547170639038,
0.29649341106414795,
-0.23365186154842377,
-0.9342647790908813,
-0.8476091623306274,
-0.7639280557632446,
-0.28478673100471497,
0.7347590923309326,
0.2828180193... |
def gradient _ update ( theta, x, y ) : # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # compute the gradient update # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # your code here qq = sigmoid ( x. dot ( theta. reshape ( x. shape [ 1 ], 1 ) ) ) q = qq - y. reshape ( x. shape [ 0 ], ... | [
-0.23589922487735748,
-0.291058748960495,
0.705657958984375,
-0.919427752494812,
-0.9621533751487732,
-0.24528953433036804,
-0.14936833083629608,
-0.08502314984798431,
-0.9721989035606384,
1.2370901107788086,
-0.3181629776954651,
0.8289743065834045,
-0.8112677931785583,
-0.4146848618984222... |
def test _ can _ retrieve _ public _ community _ not _ member _ of _ post ( self ) : user = make _ user ( ) headers = make _ authentication _ headers _ for _ user ( user ) community _ owner = make _ user ( ) community = make _ community ( creator = community _ owner ) post = community _ owner. create _ community _ post... | [
0.723089337348938,
0.24137422442436218,
0.35869747400283813,
0.5951019525527954,
0.5095490217208862,
0.694036066532135,
-0.35979220271110535,
-0.9902767539024353,
-0.421669602394104,
-1.1689108610153198,
-0.666614294052124,
-0.3457837700843811,
-0.8913403153419495,
-0.08395523577928543,
... |
def regr _ model _ site _ effects ( self, ignore _ sse _ outliers = true, view = true ) : assert ( self. roi _ saresid _ df is not none ), " run remove _ sa _ effects ( ) first. " # use visit - 01 saresid data if possible, excluding dropped rois if ( self. visit _ code = ='1') or ( self. visit _ code = ='123') : suff _... | [
-0.27768391370773315,
0.8732084035873413,
0.5849195718765259,
-0.5456636548042297,
-0.20255614817142487,
0.46120837330818176,
0.5913776159286499,
0.4714601933956146,
0.4383194148540497,
0.6755455136299133,
-0.1874723732471466,
0.6462835669517517,
0.2685646414756775,
-0.0018293755128979683,... |
def test _ constructor ( self ) : assert isinstance ( self. o, ocean ) | [
0.12885873019695282,
-0.3877839744091034,
0.14953631162643433,
0.2513079047203064,
0.6911717653274536,
1.4387623071670532,
1.580348253250122,
-0.637624204158783,
0.7832924723625183,
-1.2013157606124878,
-0.19911567866802216,
0.5461615324020386,
0.26322853565216064,
0.3654967248439789,
-0... |
def add _ handler ( configobj, section _ name, c _ config ) : section = configobj [ section _ name ] module _ name = section ['module'] module = importlib. import _ module ( module _ name ) module. add _ handler ( configobj, section _ name, c _ config ) | [
0.22231926023960114,
-0.883815348148346,
0.4303019046783447,
0.06952186673879623,
-0.3601730763912201,
1.0519136190414429,
0.4088309109210968,
0.8650957942008972,
-0.48300445079803467,
0.49081435799598694,
-0.8855131268501282,
-0.26024818420410156,
0.6277609467506409,
0.8223493695259094,
... |
def clone _ by _ id ( self, ids, target _ gid, clone _ executor, including _ disabled = false, including _ pinned = true ) : if isinstance ( ids, ( int, long ) ) : ids = [ ids ] ids = [ int ( id ) for id in ids ] if target _ gid = = bot. remote. public _ token ( ) : target _ gid = public _ group _ id filter _ dict = { ... | [
-1.1175007820129395,
0.3403475284576416,
0.4751424491405487,
0.6520556807518005,
-0.6597002148628235,
-0.2717471420764923,
-0.47220367193222046,
0.16711114346981049,
0.1369352489709854,
1.224350094795227,
0.02063783071935177,
1.1151647567749023,
-0.556694746017456,
-0.2405092567205429,
-... |
def coadd _ one _ object ( spec1dfiles : list [ str ], objids : list [ str ], coaddfile : str, spectrograph : str, user _ config _ lines : list [ str ], debug : bool = false ) : par = load _ spectrograph ( spectrograph ). default _ pypeit _ par ( ) default _ cfg _ lines = par. to _ config ( ) par = pypeitpar. pypeitpar... | [
-0.30981385707855225,
-0.7524673342704773,
0.5887361168861389,
0.13701139390468597,
0.2847174406051636,
1.6171141862869263,
0.836216390132904,
0.2584693729877472,
0.35232409834861755,
0.5310646891593933,
-0.3344627320766449,
0.2516006827354431,
-0.5587771534919739,
0.18354862928390503,
0... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.