text
stringlengths
25
2.19k
embedding
listlengths
768
768
def badge ( pid ) : choice = input ( " enter the badge name : " ) while choice in nothing or ord ( choice [ 0 ] ) in invalid _ char _ array : print ( " invalid input " ) choice = input ( " enter the badge name : " ) cursor. execute ('''select count ( badges. bname ) from badges where badges. bname like?'' ', ('%'+ choi...
[ -0.4117625057697296, 0.4957902133464813, 1.0469865798950195, 0.28588491678237915, 0.37553301453590393, 1.2353770732879639, 0.9343603849411011, 0.28321728110313416, 0.016953203827142715, 0.08301346749067307, -0.7649950385093689, -0.4241885244846344, -0.7743653655052185, 0.32721349596977234,...
def mail ( self, sender, options = ( ) ) : optionlist ='' if options and self. does _ esmtp : if any ( x. lower ( ) = ='smtputf8'for x in options ) : if self. has _ extn ('smtputf8') : self. command _ encoding ='utf - 8'else : raise smtpnotsupportederror ('smtputf8 not supported by server') optionlist ='' +''. join ( o...
[ -1.0200785398483276, 0.2260894477367401, 0.6048646569252014, 0.22495535016059875, -0.38366517424583435, 0.2011115998029709, -0.108389712870121, -0.22100262343883514, 0.660778820514679, 0.9159834980964661, -0.3539959788322449, 0.30748504400253296, -0.8318467140197754, -0.16164514422416687, ...
def trove _ dashboard _ install ( relation _ id = none ) : status _ set ('maintenance ','git clone from repository') clone _ dir = trove _ dashboard _ git _ clone ( config ('openstack - origin - git') ) status _ set ('maintenance ','running pip install') trove _ dashboard _ pip _ install ( config ('openstack - origin -...
[ 0.44733262062072754, 0.42519399523735046, 0.7089483737945557, 0.24022038280963898, 1.1200776100158691, 0.3630565106868744, 0.440223753452301, 0.20475782454013824, -0.25461483001708984, 0.36889156699180603, -0.039220403879880905, 0.189341202378273, 0.07562892884016037, -0.13197387754917145,...
async def chat _ join ( self, event ) : # send a message down to the client await self. send _ json ( { " msg _ type " : settings. msg _ type _ enter, " group " : event [ " group _ id " ], " buddycode " : event [ " buddycode " ], }, )
[ 0.15862774848937988, -0.007505105342715979, 0.49593353271484375, 0.27896469831466675, 0.7568494081497192, -0.05883289873600006, -0.11799558252096176, -0.19385255873203278, -1.360803484916687, 0.4709412753582001, -0.469992071390152, 1.5983508825302124, -1.4012540578842163, 0.256297260522842...
def brinesa _ t ( t, p, saturation _ fraction = 1 ) : t, p, saturation _ fraction = np. broadcast _ arrays ( t, p, saturation _ fraction ) if np. logical _ or ( saturation _ fraction < 0, saturation _ fraction > 1 ). any ( ) : raise valueerror ('saturation _ fraction must be between zero and one.') p _ r = p * 1e - 4 #...
[ 0.15545451641082764, -0.323013037443161, 0.6897847652435303, -0.031008226796984673, 0.17039848864078522, 0.2909833788871765, -0.035507794469594955, -0.4008375108242035, -0.15726540982723236, 1.2739511728286743, -0.23784807324409485, 0.7387098670005798, 0.6251806020736694, 0.008493975736200...
def shutdown _ hook ( f ) : f. _ nvim _ shutdown _ hook = true f. _ nvim _ bind = true return f
[ -0.2900734543800354, -1.2248220443725586, 0.5026074647903442, 1.611698865890503, -0.4210476577281952, -0.030316030606627464, 0.8508043885231018, 0.26834940910339355, 0.362447053194046, -0.09526602178812027, 0.5640714168548584, -0.04492310434579849, -0.33324068784713745, 0.01117200031876564...
def setval ( self, * args ) : return _ snap. tintfltkdv _ setval ( self, * args )
[ -0.33544719219207764, 0.9276622533798218, 0.2992631793022156, 0.885709822177887, -0.17552103102207184, 0.07960881292819977, 0.23323172330856323, 0.1549040526151657, -1.2442669868469238, -0.49052801728248596, 0.17041954398155212, -0.42020490765571594, 0.13107773661613464, 1.2505396604537964...
def loadsprites ( self ) : self. player = player ( ) self. player _ sprites = pygame. sprite. renderplain ( ( self. player ) ) # stalls self. stall1 = staticimage ( 100, 100,'stall - 1. png') self. stall1 _ sprites = pygame. sprite. renderplain ( ( self. stall1 ) ) self. stall2 = staticimage ( 300, 100,'stall - 1. png'...
[ -0.8953915238380432, 0.04753385856747627, 0.8042973875999451, -0.22225356101989746, -0.260854572057724, 1.0138633251190186, 0.3646557927131653, 0.2309543341398239, 0.13309478759765625, 0.28751760721206665, -0.6406193971633911, -0.44631636142730713, -0.2292928397655487, 0.26182523369789124,...
def orxxxx ( p, mass, nhel, nsr ) : # this routines is a python translation of a routine written by # k. mawatari in fortran dated from the 2008 / 02 / 26 ro = wavefunction ( spin = 4 ) sqh = sqrt ( 0. 5 ) sq2 = sqrt ( 2 ) sq3 = sqrt ( 3 ) pt2 = p [ 1 ] * * 2 + p [ 2 ] * * 2 pp = min ( [ p [ 0 ], sqrt ( pt2 + p [ 3 ] *...
[ -0.07166735082864761, 0.11267170310020447, 0.727657675743103, -0.4773264527320862, -0.7985338568687439, 0.011360938660800457, 0.23036062717437744, 0.24268963932991028, 0.3724161982536316, -0.26007845997810364, -0.3347391188144684, -0.9338930249214172, -0.06608142703771591, 0.08819586783647...
def tint _ getmx ( * args ) : return _ snap. tint _ getmx ( * args )
[ -0.5443907976150513, 0.26605525612831116, 0.42301538586616516, 1.7348030805587769, 0.2953399419784546, -0.1584029197692871, -0.5101177096366882, -0.7790645360946655, -0.163331538438797, -0.6597303152084351, -0.5438646674156189, 0.2440471053123474, -1.5235347747802734, -0.24538564682006836,...
def perform ( self, repository, driver _ id ) : driver = repository. get ( driver _ id ) if driver is none : self. publish ('driver _ not _ found ', driver _ id ) else : self. publish ('driver _ found ', driver )
[ -0.028615478426218033, -0.5358158349990845, 0.325268030166626, 0.37502971291542053, 1.2930113077163696, -1.1954929828643799, -0.7063351273536682, 0.6838098764419556, 0.6233718395233154, 0.5152641534805298, 1.011218786239624, 0.774723470211029, -0.4130343794822693, 0.9624025821685791, 0.2...
def search ( self, state, depth, alpha, beta, maximizing _ player ) : u = self. utility ( state ) if self. no _ more _ time ( ) or depth = = 0 : return u, none next _ moves = state. legalmoves ( ) if not next _ moves : # this player has no moves. so the previous player is the winner. return infinity if state. currplaye...
[ -0.6527265906333923, -0.44664645195007324, 0.8622677326202393, -0.11801952123641968, 0.17720472812652588, -0.8658495545387268, -0.2582852840423584, -0.33055636286735535, -0.029196832329034805, -0.01052294485270977, -0.36099696159362793, 0.5930973887443542, -0.24601292610168457, 0.252916812...
def charge _ instrument _ list ( self, charge _ instrument _ list ) : self. _ charge _ instrument _ list = charge _ instrument _ list
[ -1.5022135972976685, -0.38384559750556946, 0.07498537749052048, 1.3167996406555176, 0.3716384172439575, 1.3370099067687988, 0.24602869153022766, -0.331402987241745, -0.6068750023841858, 0.4448404908180237, -0.7652275562286377, -0.7942265868186951, -1.0976570844650269, 0.8552773594856262, ...
def on ( self ) : self. status = 1 print ( self,'turned on')
[ 0.9540761709213257, -1.2261810302734375, 0.32990360260009766, 0.4345443844795227, 0.46922293305397034, 0.633281409740448, -0.5414789319038391, 1.7358001470565796, 0.21249017119407654, -0.3086027204990387, -1.338327407836914, 1.3741133213043213, -0.4526735246181488, 0.5954439640045166, 0....
def convertesubgraph _ pungraph _ pneanet ( * args ) : return _ snap. convertesubgraph _ pungraph _ pneanet ( * args )
[ -1.3860242366790771, 0.2258414775133133, 0.5493168830871582, 0.41347619891166687, -0.4362311065196991, 0.25518307089805603, -1.0211174488067627, 0.3392511308193207, -0.013370289467275143, -0.5482545495033264, -1.0949093103408813, -0.5797128677368164, 0.5620884895324707, 0.17886982858181, ...
def genrndpowerlaw ( * args ) : return _ snap. genrndpowerlaw ( * args )
[ -1.1714575290679932, 0.11853524297475815, 0.46357133984565735, 1.1350340843200684, -0.08226469159126282, 1.1020926237106323, 0.10433483123779297, 0.519989013671875, -1.8329529762268066, 1.0943723917007446, -0.6372681856155396, -1.43315589427948, -0.5886931419372559, 2.063995361328125, -0...
def plot ( self, * args ) : return _ snap. tgstatvec _ plot ( self, * args )
[ -1.0224237442016602, 1.4584405422210693, 0.05054261162877083, 0.4375329911708832, 0.25419479608535767, 0.47161296010017395, 2.1029741764068604, -0.6261454224586487, -1.3887742757797241, -0.376962810754776, -0.07872053235769272, 0.15736709535121918, 0.28546807169914246, 0.6381970643997192, ...
def is _ rfc1918 ( ip _ str ) : private _ networks = [ " 10. 0. 0. 0 / 8 ", " 172. 16. 0. 0 / 12 ", " 192. 168. 0. 0 / 16 " ] try : ip _ str _ network = ipaddr. ipv4network ( ip _ str ) except ipaddr. addressvalueerror : raise validationerror ( " { 0 } is not a valid ipv4 address ". format ( ip _ str ) ) for network in...
[ -0.2716609239578247, -0.07587525993585587, 0.5516223311424255, 0.1834399402141571, 0.11624380946159363, 0.0925622284412384, 0.5467272400856018, -0.7167603373527527, 0.40054774284362793, -0.3274541199207306, -0.06717922538518906, -0.6406086087226868, -0.7288965582847595, -0.4718484580516815...
def _ zeros _ like _ type _ none ( x ) : return x
[ -0.2623232305049896, -0.8740110993385315, 0.4879223108291626, -0.42182332277297974, -0.21817998588085175, -0.22339710593223572, 0.15536710619926453, -0.9523062109947205, 0.616327166557312, -1.0754945278167725, -0.25473472476005554, 0.1975759118795395, -0.17276641726493835, -0.1511449068784...
def _ _ init _ _ ( self, * args ) : _ snap. tuint _ swiginit ( self, _ snap. new _ tuint ( * args ) )
[ -1.0144461393356323, 0.6058364510536194, 0.08353880792856216, -0.7613233923912048, 0.5433804392814636, -0.028659099712967873, 0.44391965866088867, 0.17092981934547424, -0.974741518497467, -0.011376876384019852, -0.954915463924408, -0.9348217248916626, 0.13529296219348907, -0.57315361499786...
def supported _ position _ modes ( self ) : return [ positionmode. oneway ]
[ -1.0410922765731812, -0.29516783356666565, 0.4676019251346588, 0.35332655906677246, 0.7821446657180786, 1.3995155096054077, -0.41175976395606995, -0.4870802164077759, 0.7448936700820923, 0.058824967592954636, -1.2466620206832886, -1.5876972675323486, -0.2931472063064575, 0.4069126844406128...
def create _ tracks _ manager ( features : t. dict [ str, np. ndarray ], colors : t. dict [ str, np. ndarray ], segmentations : t. dict [ str, np. ndarray ], instances : t. dict [ str, np. ndarray ], matches : t. dict [ t. tuple [ str, str ], t. list [ t. tuple [ int, int ] ] ], min _ length : int, ) - > tracksmanager ...
[ -0.1281771957874298, 0.4060981571674347, 0.8510884642601013, -0.7917183637619019, 0.06876269727945328, 0.22163785994052887, -0.3681974411010742, -0.2334461212158203, -0.7794867157936096, -0.44613897800445557, 0.5964607000350952, -0.6005149483680725, 0.31962108612060547, 0.1747397631406784,...
def searchforw ( self, * args ) : return _ snap. tintv _ searchforw ( self, * args )
[ -1.2347356081008911, 1.1453161239624023, 0.6957187056541443, 0.665783703327179, 0.3658106029033661, -0.34448686242103577, 0.6868684887886047, -1.201557993888855, -1.1608525514602661, -1.1470227241516113, 0.23872633278369904, -0.15520408749580383, -0.9268370270729065, 1.2419513463974, -0....
def _ _ init _ _ ( self, value, output _ size, interp ='bilinear ', lazy = false, crop = false ) : self. value = value self. interp = interp self. lazy = lazy self. crop = crop # # remove black artifacts self. output _ size = output _ size
[ 0.6382076740264893, -0.3010823726654053, 0.4995569586753845, 0.14544495940208435, -0.9380589127540588, -0.6453661322593689, 0.8948851227760315, 0.40837302803993225, 0.9429047703742981, -0.20804432034492493, -0.48475220799446106, 0.04498789831995964, 0.3858591914176941, 0.16401053965091705,...
def test _ atomic _ language _ min _ length _ 4 _ nistxml _ sv _ iv _ atomic _ language _ min _ length _ 5 _ 2 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / language / schema + instance / nistschema - sv - iv - atomic - language - minlength - 5. xsd ", instance = " nistda...
[ 0.3706931173801422, -0.8423088788986206, 0.24119724333286285, 0.0988391786813736, -0.9514047503471375, -0.28389137983322144, -0.03492278233170509, -0.7765442132949829, -0.1677813082933426, 0.5130673050880432, -0.8194153904914856, 0.08506999909877777, -0.51737380027771, 0.12943574786186218,...
def range ( to, _ from = 1 ) : to + = 1 return xrange ( _ from, to )
[ -1.0219731330871582, 0.7267693877220154, 0.1443089097738266, 0.15158061683177948, -0.3808702528476715, -0.598056435585022, -1.1290690898895264, -0.20948077738285065, -1.0769567489624023, -0.5922263264656067, -0.7962247729301453, 0.1727869063615799, 0.44537848234176636, -1.2645187377929688,...
def tint _ loadfrugalint ( * args ) : return _ snap. tint _ loadfrugalint ( * args )
[ -0.3311275243759155, 0.11996634304523468, 0.4072856307029724, -0.24398186802864075, 0.23354238271713257, -0.3406662344932556, 0.5101930499076843, -0.9093815088272095, -0.8847941160202026, -0.33884140849113464, -0.2857874035835266, 0.22843874990940094, -1.5400800704956055, 0.933622241020202...
def test _ pizza ( self ) : hawaiian _ pizza = pizza. objects. get ( title ='hawaiian chicken') veggie _ pizza = pizza. objects. get ( title ='veggie lover') self. assertequal ( hawaiian _ pizza. ingredients,'with tomato sauce, chicken meat, pineapples, mozzarella cheese.') self. assertequal ( veggie _ pizza. ingredien...
[ 0.6098992824554443, 0.07414118200540543, 0.2915351986885071, 0.5302670001983643, -0.06526565551757812, 0.03293553739786148, -0.7230417728424072, 0.6862269639968872, 0.09017481654882431, 0.4981066882610321, -0.0948633998632431, -0.04005151614546776, -0.15423786640167236, 0.13885819911956787...
def get _ figure ( software1, software2, output _ path ) : map = { 1 : " pb2 ", 2 : " pb1 ", 3 : " pa ", 4 : " ha ", 5 : " np ", 6 : " na ", 7 : " mp ", 8 : " ns ", 9 : " concatenated " } wrf = [ ] uwrf = [ ] ed = [ ] for num1 in range ( 1, 10 ) : w = [ ] u = [ ] e = [ ] for num2 in range ( 1, 10 ) : segment1 = map [ n...
[ 0.4654603898525238, 0.16918133199214935, 0.9021434783935547, -0.11897197365760803, 0.3884428143501282, 0.8867035508155823, 0.9533660411834717, -0.23475970327854156, -1.2931872606277466, 0.1976734697818756, 0.703850269317627, 0.25990843772888184, 0.17002978920936584, 1.1131292581558228, 0...
def comp _ var _ mean ( inargs, idate, it, rootgroup, com _ ens _ list, sum _ ens _ list, raw _ data ) : # create temporarty numpy arrays arr _ shape = rootgroup. variables ['var _ m'] [ idate, it, :, :, : ]. shape tmp _ var _ m = np. zeros ( arr _ shape ) * np. nan tmp _ var _ n = np. zeros ( arr _ shape ) * np. nan t...
[ 0.03564724698662758, 0.13175208866596222, 0.7598263025283813, -0.2639077603816986, -0.18620575964450836, -0.3393958508968353, 0.7671095728874207, 0.1520397812128067, 0.10088750720024109, 1.432112693786621, 0.3823625147342682, 0.7794768810272217, 0.09956324100494385, 1.113407850265503, 0....
def multcreator ( self ) : self. question = " { } * { } ". format ( randint ( 2, 9 ), randint ( 2, 9 ) )
[ -0.5931616425514221, -0.20970293879508972, 0.5467957854270935, 0.11133403331041336, 0.15208958089351654, 0.9394993185997009, -0.48373696208000183, -0.5227883458137512, 0.5442252159118652, -0.4629775881767273, -0.48466935753822327, -0.4483982026576996, 0.22354663908481598, 0.521019876003265...
def searchforw ( self, * args ) : return _ snap. tfltprv _ searchforw ( self, * args )
[ -1.136535406112671, 1.0690253973007202, 0.39908742904663086, -0.43459752202033997, 0.7513185739517212, -0.4132205545902252, 0.5824292898178101, -0.2483774870634079, -1.8052864074707031, -0.5908902883529663, 0.6795586347579956, -1.753143548965454, -0.5555217266082764, 1.492629051208496, -...
def _ single ( self, func, start ='1d ', end ='now ', item = none ) : if item in self. _ rrds : rrd = self. _ rrds [ item ] else : self. logger. warning ( " rrdtool : not enabled for { } ". format ( item ) ) return # prepare consolidation function query = [ " { } ". format ( rrd ['rrdb'] ) ] if func = ='avg': query. ap...
[ -0.6326866149902344, 0.5078334212303162, 0.8644949197769165, -0.5813344717025757, -0.2441479116678238, -0.5069736838340759, -0.32636287808418274, -0.4507219195365906, -1.0461573600769043, 0.7496341466903687, 0.41521406173706055, 0.5456840991973877, 0.29297325015068054, -0.01380601059645414...
def test _ add _ to _ selected _ not _ shared ( self ) : item = shareditem ( ) entry = {'feed _ link':'atom - selected. xml'} item. assign _ feeds ( * * entry ) self. assertequal ( len ( item. feed _ type ), 0 ) self. asserttrue ('selected'not in item. feed _ type )
[ -0.6069355010986328, -0.06749612092971802, 0.32294565439224243, 0.39600762724876404, 1.625638723373413, 0.8753266334533691, 0.39492180943489075, -0.4482479989528656, 0.2109770029783249, -0.2536214590072632, -0.6417566537857056, 0.40042123198509216, -0.8653702735900879, 0.29180818796157837,...
def _ _ repr _ _ ( self ) : return \ ( f'< { self. _ _ class _ _. _ _ name _ _ }'f'( { self. address _ name } : { self. password } @ { self. domain } )'f'[ { self. address _ domain } ]'' >')
[ -0.8237190842628479, -1.1534894704818726, 0.7386756539344788, -1.00385582447052, -0.3816743493080139, 0.7287103533744812, -0.4605017304420471, 0.01657705195248127, 0.8499243855476379, -0.1392419934272766, 0.07315485179424286, 1.3333606719970703, 0.5487024188041687, -0.29806259274482727, ...
def isinbin ( self, * args ) : return _ snap. tintintvv _ isinbin ( self, * args )
[ -0.8832460641860962, -0.3667386472225189, 0.9496970772743225, 1.3919637203216553, 0.10765684396028519, 0.19246673583984375, -0.16828759014606476, -0.6794338226318359, -0.259446918964386, -0.2221154123544693, -0.48710840940475464, 1.3696528673171997, -1.8256481885910034, 0.3692628741264343,...
def test _ quatile _ split _ skewed _ variables ( index, fraction ) : df = pd. dataframe ( { " a " : [ index for it in range ( 0, fraction + 1 ) ] + [ it for it in range ( fraction + 1, 101 ) ], " b " : [ it for it in range ( 0, 101 ) ], } ) test = drophighpsifeatures ( split _ col = " a ", split _ frac = fraction / 10...
[ -0.29487234354019165, 0.31344255805015564, 0.41104549169540405, 0.07221803814172745, 0.633688747882843, 0.3198687732219696, 0.4469308853149414, 0.010960843414068222, 0.19918587803840637, -0.008871576748788357, 0.023926442489027977, -0.4596646726131439, -0.12578286230564117, -1.381426692008...
def addbacksorted ( self, * args ) : return _ snap. tintv _ addbacksorted ( self, * args )
[ -0.7587288618087769, 0.6214731931686401, 0.8513271808624268, 0.6186133027076721, 0.6761364340782166, -0.3692408800125122, 0.4281977415084839, -1.0066642761230469, -0.5404722094535828, -0.9281516075134277, -0.6657266020774841, 0.4829601049423218, -2.269141912460327, 0.4733617603778839, -0...
def gengraph ( * args ) : return _ snap. tforestfire _ gengraph ( * args )
[ -1.6431317329406738, 1.4908654689788818, 0.41106072068214417, 1.1142094135284424, 0.4900079369544983, 0.4271757900714874, 0.44258660078048706, 0.6875577569007874, -0.7099961042404175, -0.31008389592170715, -0.7258500456809998, -1.1792579889297485, -0.9569114446640015, 0.3041262924671173, ...
def loadturtle ( ) : cmds. loadplugin ('turtle ', quiet = true ) cmds. setattr ( " defaultrenderglobals. currentrenderer ", " turtle ", type = " string " ) turtlenodes = {'ilruioptionsnode':'turtleuioptions ','ilrbakelayermanager':'turtlebakelayermanager ','ilrbakelayer':'turtledefaultbakelayer ','ilroptionsnode':'turt...
[ -0.8953886032104492, 0.2741129696369171, 0.6940852403640747, -1.728574514389038, 0.04937103018164635, -0.6878623962402344, -0.24664585292339325, -0.857564389705658, -0.18293358385562897, 0.5272783637046814, -1.265906810760498, 0.3115420639514923, -0.8238124847412109, -0.09848891198635101, ...
def _ _ init _ _ ( self, stream, ffmpeg ='ffmpeg ', ffprobe ='ffprobe') : self. stream = stream self. ffmpeg = ffmpeg self. _ subprocess = none probe = subprocess. popen ( [ ffprobe,'- show _ streams ','- of ','json ','-'], stdin = stream, stderr = subprocess. devnull, stdout = subprocess. pipe ) info = json. load ( pr...
[ 0.471485435962677, -0.20128419995307922, 0.8192834258079529, 0.6773274540901184, -0.6341726183891296, -0.888594388961792, -0.2946825325489044, -0.891525149345398, 0.21428602933883667, -0.14369885623455048, -0.05177826061844826, 0.7136610150337219, 0.20990684628486633, 1.326882243156433, ...
def get _ edge _ from _ couple _ vertices ( self, v1, v2 ) : for e in self. list _ edges : if e. vertex _ source = = v1 and e. vertex _ destination = = v2 : return e return none
[ 0.2633971571922302, -0.6627865433692932, 1.0053229331970215, 0.31128036975860596, -0.1429176926612854, -0.22840620577335358, -0.9656892418861389, -0.36504116654396057, 0.14384107291698456, 1.1339507102966309, 0.09605884552001953, 1.1946654319763184, -0.23722483217716217, -1.002102613449096...
def _ _ getitem _ _ ( self, key ) : return self. deck [ key ]
[ -0.6863868236541748, -0.2361416518688202, 0.4004473090171814, -0.5467976927757263, -0.7700316905975342, -0.42275720834732056, -0.7807735204696655, -0.1912812739610672, -0.35142579674720764, -0.5893584489822388, 0.7108741998672485, 0.06252185255289078, 0.26408639550209045, 0.012942541390657...
def to _ unicode _ from _ fs ( string ) : if is _ binary _ string ( string ) : try : unic = string. decode ( fs _ encoding ) except ( unicodeerror, typeerror ) : pass else : return unic return string
[ -0.44112613797187805, -0.36389046907424927, 0.5163681507110596, 0.8105213046073914, -0.7621024250984192, -0.49892106652259827, 0.33083266019821167, 0.3931593596935272, 0.36376163363456726, -1.0958983898162842, -0.19937923550605774, -0.47018805146217346, -0.12165561318397522, -1.33993816375...
def azimplunge ( x ) : if x [ 0 ] > 0 : x * = - 1 ; # make downward pointing xh = sqrt ( x [ 1 ] * * 2 + x [ 2 ] * * 2 ) # get horizontal length plunge = 180. 0 * atan2 ( - x [ 0 ], xh ) / pi # plunge should be positive azim = 180 * atan2 ( x [ 2 ], - x [ 1 ] ) / pi # angle cw from n return ( azim, plunge )
[ -0.808484673500061, 0.7689570188522339, 0.436333566904068, -0.35954275727272034, -0.1200287789106369, 0.5432873368263245, -0.031128406524658203, 0.01906716078519821, 0.7756586670875549, 0.2207777500152588, -0.6016666889190674, -0.36514243483543396, -0.09416382014751434, -0.0712788999080658...
def _ _ generatenewparticleradius ( self ) - > float : return np. random. normal ( self. _ _ parameters [ " radiusmean " ], self. _ _ parameters [ " radiusvariance " ], 1 ) [ 0 ]
[ -0.29828333854675293, -0.7076404690742493, 0.46186256408691406, -1.3053548336029053, 0.1308920681476593, 0.46942266821861267, -0.8501699566841125, 0.09752058982849121, -0.5054892301559448, 0.22105829417705536, 0.4890727996826172, 0.8318781852722168, -1.8984735012054443, -0.0355230979621410...
def fmt ( * args ) : return _ snap. tstr _ fmt ( * args )
[ -0.35663771629333496, -0.3693715035915375, 0.29787543416023254, -0.3075904846191406, 0.4868011772632599, 0.27797895669937134, 0.47167447209358215, -0.36121052503585815, 0.17401044070720673, -0.5408002734184265, 0.42072388529777527, -0.7249079346656799, -0.06933655589818954, 0.5771359205245...
def _ convert _ query ( table : any, raw _ query : dict ) - > dict : def get _ field _ schema ( _ field : str ) - > dict : " " " for each field's type returns its own properties for jsonschema " " " _ field _ schema = {'integer': {'type': ['string ','number'],'pattern':'^ \ d + $'},'default': {'type':'string'} } try : ...
[ -0.7793181538581848, 0.05543959140777588, 0.8679142594337463, -0.43973952531814575, -0.8494701385498047, -0.8531923294067383, -0.31152960658073425, 0.14829577505588531, -0.02085907943546772, 0.2856297791004181, -0.05315699800848961, -0.5238221883773804, 1.6045197248458862, 0.00963222701102...
def plane _ angle _ by _ location ( loc ) - > float : return np. arctan ( loc [ 0 ] / loc [ 2 ] )
[ 0.09696879237890244, -0.9756483435630798, 0.20539385080337524, -0.29832902550697327, 0.4463909864425659, 0.372439444065094, 0.417561411857605, 0.8259768486022949, -0.48874136805534363, 1.2520434856414795, 0.494655042886734, -0.10730329900979996, 0.14571011066436768, -1.1409555673599243, ...
def generate _ report ( self, report _ name ) : self. console. generate _ report ( report _ name, self. temp _ file, self. scenario. sid )
[ 0.2541763186454773, 0.4286223351955414, 0.21792587637901306, 0.30973583459854126, 1.0655056238174438, -0.3006961941719055, 0.5700364112854004, 0.467438668012619, -0.2593105435371399, -0.31393012404441833, -0.566092312335968, -0.753476619720459, 0.038572631776332855, 0.22636939585208893, ...
def reviewphoneticcurrentitem ( self, inputevent, targetcursorcell = 0 ) : self. _ reviewcurrentitem ( inputevent, targetcursorcell, 3 ) return true
[ -0.365384966135025, -0.6273487210273743, 0.17432190477848053, -0.32739701867103577, -0.3977397084236145, 1.0232486724853516, -0.42686477303504944, -0.40652522444725037, -0.10371579229831696, 0.09885615855455399, 0.21283341944217682, -0.020961778238415718, -1.138983130455017, -1.38459908962...
def tneanetmp _ new ( * args ) : return _ snap. tneanetmp _ new ( * args )
[ 0.12972135841846466, -1.087051272392273, 0.17878565192222595, -1.0989587306976318, 0.9726553559303284, 0.19321772456169128, -0.16430017352104187, 0.016171446070075035, -1.0059040784835815, 0.8838265538215637, -0.479544460773468, -1.9393659830093384, 0.45963332056999207, 0.7887058258056641,...
def run _ rsync ( src, dst, dry _ run = false ) : dst _ dir = os. path. dirname ( dst ) if not os. path. exists ( dst _ dir ) : os. makedirs ( dst _ dir ) options ='- avzp'if dry _ run : options + ='nh'# also print human readable summary rsync _ cmd = ['rsync ', options, src, dst ] log. info ('{ 0 } - > { 1 } '. format...
[ 0.2215641587972641, 0.571677565574646, 0.8935026526451111, 0.3291833698749542, -0.276510626077652, 0.06587988883256912, 0.5707598924636841, -0.4439784586429596, 0.15975405275821686, 0.4163830876350403, 0.383378267288208, 1.1937150955200195, 0.542925238609314, -0.23451270163059235, 0.0049...
def getstrfromipuint ( * args ) : return _ snap. tuint _ getstrfromipuint ( * args )
[ -0.38219523429870605, 0.15648002922534943, 0.4154261350631714, 0.04911377280950546, 0.13028612732887268, 0.08578460663557053, -0.6434394121170044, -0.7691176533699036, -1.1518558263778687, -0.9152158498764038, 0.3028026223182678, -0.4519638419151306, -1.244061827659607, -1.2135450839996338...
def _ _ init _ _ ( self, request _ validator, token _ generator = none, token _ expires _ in = none, refresh _ token _ generator = none, * * kwargs ) : auth _ grant = authorizationcodegrant ( request _ validator ) refresh _ grant = refreshtokengrant ( request _ validator ) bearer = bearertoken ( request _ validator, to...
[ 0.1789683997631073, -0.031946539878845215, 0.8773298263549805, 1.5288223028182983, 0.054064951837062836, -0.13518165051937103, -0.19537453353405, 0.02870328538119793, 0.32753509283065796, -0.4844037592411041, 0.01717810332775116, -0.3394061326980591, 0.21180281043052673, 0.3126260042190552...
def load _ image ( filename, * * kwargs ) : try : surface = load _ pgm ( filename, * * kwargs ) if not surface : surface = pygame. image. load ( filename ) except pygame. error as exception : raise systemexit ('{ } : { } '. format ( filename, exception ) ) return surface
[ -0.16651950776576996, 0.5003684163093567, 0.7032838463783264, 0.49175480008125305, -0.40425175428390503, 0.4887251853942871, 0.42813053727149963, -0.9596813321113586, -1.0217463970184326, 0.0048363120295107365, 0.45155641436576843, -0.5594068765640259, -1.0656943321228027, 0.43517237901687...
def plot _ 2d ( x, y ) : plt. figure ( ) symlist = ['o ','s ','* ','x ','d ','+ ','p ','v ','h ','^'] collist = ['blue ','red ','purple ','orange ','salmon ','black ','grey ','fuchsia'] labs = np. unique ( y ) idxbyclass = [ y = = labs [ i ] for i in range ( len ( labs ) ) ] for i in range ( len ( labs ) ) : plt. plot ...
[ -1.0604888200759888, 0.13253870606422424, 0.9521245956420898, -0.5116130709648132, -0.4759915769100189, 0.3444129526615143, 0.513654351234436, -0.6872106194496155, 0.10924717783927917, -0.09195920079946518, -0.19873076677322388, 1.5813511610031128, 0.9500178098678589, 0.6317631602287292, ...
def setup _ url _ for _ address ( host, port ) : if not port : port = pywemo. ouimeaux _ device. probe _ wemo ( host ) if not port : return none return f " http : / / { host } : { port } / setup. xml "
[ 0.1280195713043213, 0.15708433091640472, 0.41138845682144165, -0.4346889555454254, -0.18464909493923187, -0.24207517504692078, 0.3470368981361389, 0.12939420342445374, -0.4996502995491028, 0.37691614031791687, 0.9672529697418213, 0.3716331124305725, -0.017706114798784256, 0.003023354336619...
def get _ perplexity ( self, batch _ samples ) : max _ length = self. model _ obj. config. n _ positions ppl _ values = [ ] for sample in batch _ samples : sample _ length = len ( sample ) # the model takes in a batch of sequences sample = np. expand _ dims ( sample, axis = 0 ) sample = torch. tensor ( sample, dtype = ...
[ -0.17051613330841064, -0.993146538734436, 0.9470817446708679, 0.5277493596076965, -0.2719879746437073, 0.4222105145454407, -0.16034558415412903, 0.3953321874141693, 0.1780884712934494, 0.14670105278491974, -0.2686024308204651, -0.347875714302063, -0.3149815499782562, 0.4358505308628082, ...
def checkout ( self, path ) : if os. path. isdir ( path ) : path = os. path. join ( path, self. name ) try : log. debug ('checking out % s to % s'% ( self. path, path ) ) f = open ( path,'w') f. write ( self. data ( ) ) f. close ( ) return true except exception, e : raise itemerror ( e )
[ -0.045733146369457245, 0.18566620349884033, 0.7496671080589294, -0.3965684473514557, -0.23712915182113647, 0.8493802547454834, 0.6539764404296875, 0.4292878806591034, -0.28654155135154724, 0.0843348279595375, -0.440072625875473, -0.002326869871467352, -0.4205898344516754, -0.48657375574111...
def md _ photo _ uri ( image _ name ) : return " photo / " + image _ name. strip ( ). lower ( ). replace ( '. jpg ','' )
[ -0.3439306616783142, -0.39705154299736023, 0.5234967470169067, 0.5413125157356262, -1.324628233909607, 0.1751244068145752, 0.2501910328865051, 1.4287683963775635, 0.11203434318304062, -0.063755102455616, 0.7411996126174927, -0.22773706912994385, 0.10052482038736343, 0.3223295211791992, -...
def attrvalueni ( self, * args ) : return _ snap. pneanetmp _ attrvalueni ( self, * args )
[ -0.8552865982055664, -0.044876828789711, 0.2829892337322235, 0.6985385417938232, -0.20740613341331482, 0.6541582942008972, -0.1882590651512146, 0.022327236831188202, -1.2428510189056396, -0.5657778978347778, -0.7562704682350159, -0.8042288422584534, -0.3272046744823456, 1.1841936111450195,...
def _ _ init _ _ ( self, * args ) : _ snap. tstrprstrhi _ swiginit ( self, _ snap. new _ tstrprstrhi ( * args ) )
[ -0.2753121852874756, -0.026473456993699074, 0.09609753638505936, -0.41273894906044006, -0.1905837208032608, 0.38419535756111145, 0.365537166595459, 0.1434052288532257, -0.8531089425086975, -0.27231264114379883, -0.9012718200683594, -0.37458574771881104, -1.2099852561950684, 0.3893749415874...
def endei ( self, * args ) : return _ snap. pneanetmp _ endei ( self, * args )
[ -0.447468101978302, 0.7715160846710205, 0.18730147182941437, 0.8780763745307922, 1.3842991590499878, 1.034300684928894, 0.3947843313217163, -0.37537822127342224, -1.4493992328643799, -0.34389451146125793, -0.6819366216659546, -1.1896222829818726, -1.6300277709960938, 0.6978504657745361, ...
def disconnect ( self ) : if self. is _ connected ( ) : self. _ device. disconnect ( ) self. _ device = none
[ -0.1997758448123932, 0.0555134192109108, 0.40931957960128784, 0.20840604603290558, 0.25637343525886536, -0.24862563610076904, 0.38983118534088135, -0.17073163390159607, 0.23566026985645294, -0.6519381403923035, 0.033052120357751846, -0.07797294855117798, -0.3514276444911957, 0.362126111984...
def boolean _ union _ mesh _ mesh ( a, b ) : raise notimplementederror
[ 0.1541309505701065, -0.0953865796327591, 0.49542587995529175, 1.381123423576355, 0.09370624274015427, 1.245774269104004, -0.3376595377922058, 0.46692946553230286, 0.1907832771539688, 0.4308848977088928, -0.31125447154045105, 0.7549890279769897, -0.2860475480556488, -0.4705546796321869, -...
def get ( self ) : parser = ak _ parser. copy ( ) parser. add _ argument ('lat ', type = str, required = true ) parser. add _ argument ('lng ', type = str, required = true ) args = parser. parse _ args ( strict = true ) wdata = get _ weather ( float ( args ['lat'] ), float ( args ['lng'] ) ) user _ query = db _ session...
[ -0.7762694954872131, -0.07917235791683197, 0.6828300356864929, 0.14326664805412292, -0.6264998316764832, 0.08126618713140488, -0.44596341252326965, -0.25420600175857544, -1.3760910034179688, 0.13086016476154327, -0.43316465616226196, 0.6719037294387817, -0.4310433864593506, 0.4149596393108...
def test _ get _ form _ class ( self ) : form _ class = self. omniform. get _ form _ class ( ) self. asserttrue ( issubclass ( form _ class, omnimodelformbaseform ) )
[ 0.584205687046051, 0.07364782691001892, 0.20452389121055603, 0.836379885673523, 0.7809202671051025, 0.2702299952507019, -0.7332484722137451, 0.11172572523355484, 0.9259490370750427, -1.8357036113739014, -1.055777668952942, -0.1530645489692688, -0.07972791790962219, 0.5272355675697327, 0....
def getaskmlpng ( self, session, path = none, documentname = none, colorramp = colorrampenum. color _ ramp _ hue, alpha = 1. 0, nodatavalue = none, draworder = 0, cellsize = none, resamplemethod ='nearestneighbour') : if type ( self. raster )! = type ( none ) : # set document name if documentname is none : try : docume...
[ 0.32245030999183655, -0.4482155442237854, 0.7344127893447876, 0.528923511505127, -1.4295873641967773, 0.10159311443567276, 0.18591275811195374, 0.006286262534558773, 0.1610603779554367, 0.7727053165435791, 0.6500370502471924, -0.5529182553291321, 0.28641706705093384, 0.3784703016281128, ...
def get _ frames ( time _ str ) : with open ( cf. eval _ dir + " \ \ " + time _ str + " \ \ data. csv ",'r') as f : reader = csv. reader ( f ) ; frames = [ ] ; for row in reader : if row = = [ ] : continue ; frames. append ( int ( row [ 1 ] ) ) ; return frames ;
[ -0.4305724799633026, -0.026240408420562744, 0.5266162753105164, 0.2949282228946686, -0.020228231325745583, -0.36200183629989624, -0.12398689240217209, -0.2559596300125122, -0.1042090356349945, 0.4265177845954895, -0.6275799870491028, 0.280093252658844, -0.47374463081359863, 0.9145995378494...
def getrel ( str ) : m = re. findall ( r " ['\ " ] ( [ \. ] { 1, 2 } /. * ) ['\ " ] ", str ) unique = util. uniquelist ( m ) print ('unique list : ', unique ) return unique
[ 0.3505045473575592, -0.26101744174957275, 0.6500358581542969, -0.2580088973045349, 0.31318315863609314, -0.1181919276714325, 0.2983327805995941, 0.24545618891716003, 0.37084344029426575, 0.26684802770614624, -1.0350898504257202, 0.6545191407203674, -0.8248724341392517, -0.9012270569801331,...
def convertsubgraph _ pungraph _ pngraph ( * args ) : return _ snap. convertsubgraph _ pungraph _ pngraph ( * args )
[ -0.955697774887085, 0.5741779804229736, 0.38752660155296326, 0.6485037207603455, -1.0201002359390259, 0.045334961265325546, -0.46186691522598267, 0.15385492146015167, -0.005283370614051819, -0.03773581236600876, -1.3217793703079224, 0.3407219350337982, 0.019921472296118736, -0.182498931884...
def make _ task _ upload ( env, dag, kind ) : return sqlupload ('{ { upstream [ " raw " ] } } ', product = sqliterelation ( ( none, f'raw _ { kind } ','table') ), dag = dag, name ='upload ', to _ sql _ kwargs = {'if _ exists':'replace'} )
[ -0.759473979473114, 1.1667091846466064, 0.6930999755859375, -0.2413143664598465, -0.7118416428565979, -0.14167796075344086, 0.48362189531326294, -0.05740334838628769, -1.121986746788025, 1.263852834701538, 0.09613263607025146, 0.2270645648241043, 1.238497018814087, -0.29741981625556946, ...
def re _ test ( exclusive, coverage, tbl ) : total = sum ( tbl ) norm = [ [ float ( x _ i ) / total ] * total for x _ i in coverage ] # ignore warnings with warnings. catch _ warnings ( ) : warnings. simplefilter ( " ignore " ) p _ value = saddlepoint ( exclusive, coverage, norm ) return p _ value
[ 0.8358538746833801, 0.42791247367858887, 0.42571666836738586, 0.509876012802124, -0.1932508498430252, -0.037297844886779785, 0.014201667159795761, 0.18786707520484924, 0.40699729323387146, 0.5915719270706177, 0.8887724876403809, -0.2865743935108185, -0.43532535433769226, -1.099740266799926...
def update _ output ( value ) : if value is none : return if value = = " game " : return visualized _ game else : number = int (''. join ( filter ( str. isdigit, value ) ) ) return visualized _ rounds [ number - 1 ]
[ -0.6156443357467651, 0.029456844553351402, 0.5279233455657959, -0.7050637602806091, -1.0809800624847412, -0.7225375771522522, 0.41813498735427856, -1.2736750841140747, 0.359321653842926, 0.7272120118141174, 1.276308298110962, -0.014992780052125454, -0.5788329243659973, 0.018926342949271202...
def tint _ savefrugalintv ( * args ) : return _ snap. tint _ savefrugalintv ( * args )
[ -0.6932079792022705, 0.04109812527894974, 0.3797524571418762, 0.27162712812423706, 0.622793972492218, -0.5394284725189209, 0.45526254177093506, -0.22368602454662323, -0.8359655737876892, -0.3650922179222107, -0.964428722858429, -0.04636743292212486, -1.5255886316299438, 1.1996797323226929,...
def gethexstr ( * args ) : return _ snap. tint _ gethexstr ( * args )
[ -0.08920304477214813, -0.026996128261089325, 0.21511255204677582, 1.1325223445892334, 0.3769689202308655, 0.8971481919288635, -0.5218943953514099, 0.002291589044034481, -0.8894672393798828, -0.6490110158920288, 0.14706775546073914, -0.5880183577537537, -1.3476706743240356, 0.55860924720764...
def loadedgelistnet ( * args ) : return _ snap. loadedgelistnet ( * args )
[ -0.9787683486938477, 0.7472335696220398, 0.48814061284065247, -0.004177408292889595, 0.1377328783273697, 0.3863811492919922, -0.19310595095157623, -0.6107713580131531, 0.3880530297756195, -0.9485476016998291, -1.391763687133789, -0.7499188780784607, -0.42815670371055603, 1.3352746963500977...
def process ( input _ path : path, export _ frames : bool = false ) : # sanitise input if isinstance ( input _ path, str ) : input _ path = path ( input _ path ) # send to appropriate processing function if input _ path. is _ dir ( ) : process _ directory ( input _ path, is _ export _ frames = export _ frames ) else : ...
[ -0.03089122287929058, 0.7910274267196655, 0.6528326272964478, 0.8148271441459656, 0.04753414914011955, -0.361197292804718, 0.6258598566055298, -0.2446310818195343, 1.1455841064453125, 0.12245432287454605, 0.03469089791178703, 0.2784469425678253, -0.4814649820327759, 0.3587285578250885, 0...
def plot _ confusion _ matrix ( cm, classes, normalize = false, title ='confusion matrix ', cmap = plt. cm. blues ) : if normalize : cm = cm. astype ('float') / cm. sum ( axis = 1 ) [ :, np. newaxis ] print ( " normalized confusion matrix " ) else : print ('confusion matrix, without normalization') print ( cm ) plt. im...
[ -0.09954901784658432, 0.2158925086259842, 0.6468432545661926, 0.07387810945510864, -0.7654226422309875, -0.031198963522911072, 1.0744245052337646, 0.14428573846817017, 0.43053653836250305, 0.32483285665512085, 1.1046675443649292, 0.44848284125328064, -0.1187119334936142, 0.1696049124002456...
def test _ atomic _ hex _ binary _ min _ length _ 2 _ nistxml _ sv _ iv _ atomic _ hex _ binary _ min _ length _ 3 _ 4 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / hexbinary / schema + instance / nistschema - sv - iv - atomic - hexbinary - minlength - 3. xsd ", instance ...
[ 0.5066125988960266, -0.15774689614772797, 0.46122869849205017, 0.4488581717014313, 0.04741591587662697, 0.49027103185653687, -0.9325497150421143, -0.28502872586250305, 0.40431562066078186, 0.12783858180046082, -0.38478294014930725, -0.45908495783805847, -0.5584955215454102, 0.1055416315793...
def process _ data ( root _ dir ) : print ( " processing data from % s " % root _ dir ) try : rows = [ ] for sess _ num in sort _ numbered _ files ( root _ dir, ext = " " ) : sess _ dir = os. path. join ( root _ dir, str ( sess _ num ) ) row = ordereddict ( ) # predicate path pred _ path = os. path. join ( sess _ dir, ...
[ -0.011598213575780392, -0.4313720166683197, 0.8672474026679993, 0.1842820942401886, -0.004060068167746067, 0.48042428493499756, 0.887620747089386, -0.45630258321762085, -0.2166980803012848, -0.19633415341377258, -0.03284424543380737, 0.3369760513305664, 0.8893548846244812, 1.12369215488433...
def getnodeoutdegv _ pneanet ( * args ) : return _ snap. getnodeoutdegv _ pneanet ( * args )
[ -1.6893105506896973, 0.8408851027488708, 0.40804600715637207, -0.188343346118927, 0.10513049364089966, 0.21991734206676483, -0.20545999705791473, -0.12930181622505188, -1.4546217918395996, -1.1203097105026245, 0.1322043389081955, -0.7150063514709473, 0.18095934391021729, 0.4697732329368591...
def test _ bad _ exe _ args ( ) : exe _ args = { " dict " : " is - wrong - type " } with pytest. raises ( typeerror ) : _ = runsettings ( " python ", exe _ args = exe _ args )
[ -0.4140540659427643, 0.37624481320381165, 0.5795912742614746, 0.40794697403907776, 1.1770062446594238, 0.4690386652946472, -0.3416169583797455, -0.13933400809764862, -0.547590434551239, 0.7993015050888062, -0.4632824659347534, 0.18378841876983643, -0.937370240688324, 0.6240336298942566, ...
def partition ( self, * args ) : return _ snap. tintfltkdv _ partition ( self, * args )
[ -0.18270869553089142, 0.3909301161766052, 0.2196146845817566, 0.34109804034233093, 0.025929376482963562, -0.432037353515625, 0.43566998839378357, -0.15506725013256073, -0.6026144623756409, -0.5824324488639832, 0.25984853506088257, -0.899167537689209, -1.1635375022888184, 1.9820064306259155...
def test _ fail _ threshold _ string ( self ) : self. assertfiltererrors ( {'threshold':'86 ','addresses': [ address ( self. trytes1 ) ], }, {'threshold': [ f. type. code _ wrong _ type ], }, )
[ 0.5786425471305847, -0.46829953789711, 0.2587277293205261, -0.3769058287143707, -0.2836909890174866, 0.09255866706371307, -0.4545406699180603, -0.534369170665741, -0.5808568000793457, 0.6358726620674133, -0.39472201466560364, 0.5445178151130676, -0.04081059247255325, 0.1444198340177536, ...
def as _ html ( self ) : return'< a href = " % s " > % s < / a >'% ( self. urlstr, self. display _ str )
[ 0.01692315563559532, -0.6653376221656799, 0.22133982181549072, -0.5493330359458923, -0.6331559419631958, 0.9345946311950684, -0.011344234459102154, 0.004065445624291897, 0.35154661536216736, -0.5935072898864746, 1.1914323568344116, 1.154068946838379, 0.7318463325500488, 0.39285001158714294...
def _ strip _ type _ comment ( comment : optional [ cst. comment ] ) - > optional [ cst. comment ] : if not _ is _ type _ comment ( comment ) : return comment assert comment is not none idx = comment. value. find ( " # ", 1 ) if idx < 0 : return none return comment. with _ changes ( value = comment. value [ idx : ] )
[ 0.5187817811965942, -0.8481462597846985, 0.5188577771186829, -0.20326556265354156, 0.07083558291196823, -0.5265859961509705, 0.9789307117462158, -0.6718078851699829, 0.503943681716919, 1.0453506708145142, 0.10797636955976486, 0.2602013647556305, -0.5358791351318359, -0.6042577624320984, ...
def solve ( self ) : start = time. time ( ) self. t = 0 self. initialize ( ) self. evaluate ( ) best = np. max ( self. fitness ) best _ index = np. argmax ( self. fitness ) self. best = copy. deepcopy ( self. population [ best _ index ] ) self. avefitness = np. mean ( self. fitness ) self. trace [ self. t, 0 ] = self. ...
[ 0.02917744591832161, 0.5189346671104431, 1.3153407573699951, 1.5577030181884766, -0.08004836738109589, -0.1840996891260147, 0.49788400530815125, -0.08269935846328735, -0.928594708442688, 0.2967721223831177, -0.47230425477027893, -0.3051491677761078, 0.14175522327423096, -0.3589976131916046...
def getstrattrdate ( self, * args ) : return _ snap. pneanetmp _ getstrattrdate ( self, * args )
[ 0.9156400561332703, -0.25741904973983765, 0.14727966487407684, -0.17297054827213287, 0.6748444437980652, 0.18947716057300568, -0.6185076832771301, -0.5807344913482666, -0.5615494847297668, -1.3169779777526855, -0.7977807521820068, -0.5164267420768738, -1.2243497371673584, 0.712153851985931...
def _ e _ step ( self, x ) : weighted _ log _ prob = self. _ estimate _ weighted _ log _ prob ( x ) log _ prob _ norm = logsumexp ( weighted _ log _ prob, axis = 1 ) log _ resp = weighted _ log _ prob - log _ prob _ norm [ :, np. newaxis ] return np. mean ( log _ prob _ norm ), np. exp ( log _ resp )
[ -0.21404001116752625, -0.2316247820854187, 0.8046382069587708, -0.16847112774848938, -0.480184406042099, 0.08401169627904892, -0.12215598672628403, 0.3450428545475006, 0.33887162804603577, 0.7694822549819946, 0.0048363832756876945, 0.31798508763313293, 0.005699172616004944, 0.2844868004322...
def plotindegdistr _ pneanet ( * args ) : return _ snap. plotindegdistr _ pneanet ( * args )
[ -0.8846584558486938, 0.5858048796653748, 0.32915517687797546, -0.4544689953327179, 0.07194690406322479, 1.149279236793518, -0.0956449806690216, -0.14913682639598846, -1.0014524459838867, -0.8227373957633972, -0.37370121479034424, 0.01642330177128315, -0.9445033073425293, -0.254067420959472...
def getpagerank _ v1 _ pngraph ( * args ) : return _ snap. getpagerank _ v1 _ pngraph ( * args )
[ -0.7078540325164795, 0.9691929221153259, 0.3135911226272583, 0.12547117471694946, 0.5314146876335144, -0.21433144807815552, -0.43345049023628235, -0.2235637754201889, -0.3879461884498596, 0.12092489749193192, 0.729833722114563, 1.5331611633300781, -0.2404857724905014, -0.2939799427986145, ...
def colmod ( self, * args ) : return _ snap. ptable _ colmod ( self, * args )
[ -0.6355801224708557, 0.098696768283844, 0.505620539188385, 0.9414366483688354, 0.2722715735435486, 1.1340960264205933, 0.5226284265518188, -0.46897709369659424, -0.7015321254730225, 0.47840169072151184, 0.1738211214542389, -0.14821158349514008, -0.5792883634567261, 0.05858590453863144, 0...
def dx ( m1, m2, k1, k2, b1, b2, u, fw, x, t ) : a = np. array ( [ [ 0, 0, 1, 0 ], [ 0, 0, 0, 1 ], [ - k1 / m1, k2 / m1, - b1 / m1, b2 / m1 ], [ k1 / m1, - k2 * ( 1 / m1 + 1 / m2 ), b1 / m1, - b2 * ( 1 / m1 + 1 / m2 ) ] ] ) b1 = np. array ( [ 0, 0, - 1 / m1, 1 / ( m1 + m2 ) ] ) b2 = np. array ( [ 0, 0, 1 / m1, - 1 / m1...
[ -0.08503516018390656, -0.057685207575559616, 0.9416184425354004, 0.21758593618869781, -1.0122219324111938, 0.3236210346221924, -0.6002970337867737, 0.31083375215530396, -0.4064100980758667, 0.1909015029668808, 0.3367125689983368, -0.20244120061397552, 0.1769385188817978, -0.538101434707641...
def insert ( template _ version _ manager, template ) : # save the template in database template _ api. upsert ( template ) try : # insert the initial template in the version manager version _ manager _ api. insert _ version ( template _ version _ manager, template ) # insert the version manager in database version _ m...
[ -0.501327395439148, -0.31343793869018555, 0.5955338478088379, -0.45940351486206055, -0.528609573841095, -0.034665822982788086, -0.7317209243774414, 0.5841614007949829, 0.004192913416773081, 0.766042172908783, -1.1023850440979004, -0.8648898005485535, -1.3385742902755737, 0.3784703612327575...
def set _ floatx ( floatx ) : global _ floatx if floatx not in {'float16 ','float32 ','float64'} : raise valueerror ('unknown floatx type :'+ str ( floatx ) ) _ floatx = str ( floatx )
[ 0.00948681402951479, 0.7671202421188354, 0.6211102604866028, 0.13469375669956207, -0.030034035444259644, 0.8373304009437561, -0.2022426873445511, -0.7828303575515747, -0.44527801871299744, -0.8097586035728455, -0.830467164516449, 1.0040059089660645, -0.148248553276062, 0.707320511341095, ...
def title ( self ) : if not self. is _ comment ( ) : return self. extra. get ('title') template = " comment from % ( actor ) s on % ( entry _ title ) s by % ( entry _ actor ) s " actor = _ get _ actor _ urlnick _ from _ nick ( self. actor ) entry _ title = self. extra. get ('entry _ title') entry _ actor = _ get _ acto...
[ 0.18247473239898682, -0.670110285282135, 0.5857163071632385, -1.168587327003479, -0.09431574493646622, -0.4502444267272949, -0.1163567304611206, 0.046331629157066345, 0.4180370569229126, 0.6273934245109558, -0.3090076148509979, 0.29957666993141174, -0.04389480501413345, -0.1210336908698082...
def gettrianglecnt _ pneanet ( * args ) : return _ snap. gettrianglecnt _ pneanet ( * args )
[ -0.4740730822086334, -0.0269547700881958, -0.0304507315158844, -0.6305420398712158, 0.4753734767436981, 0.2545005977153778, 0.21270880103111267, -0.06624410301446915, -0.6465098261833191, -1.1061877012252808, -0.6278389096260071, -0.7014372944831848, 0.780503511428833, -0.6473061442375183,...
def update _ science _ metadata ( self, sci _ metadata _ bytes, native _ identifier _ sid, record _ date, old _ version _ pid ) : try : new _ version _ system _ metadata = _ generate _ system _ metadata ( sci _ metadata _ bytes, native _ identifier _ sid, record _ date, self. sysmeta _ settings _ dict ) self. client. u...
[ -0.6866389513015747, -0.7713095545768738, 0.7147805690765381, -0.1530180126428604, 0.4885726571083069, 0.9634389281272888, -0.9743964076042175, -0.40048450231552124, 0.1403021663427353, 0.9070659279823303, -0.9080219864845276, 1.0191880464553833, -1.0820050239562988, -0.7736024260520935, ...