text
stringlengths
25
2.19k
embedding
listlengths
768
768
def test _ export _ database _ command _ key _ order ( self, mock _ g ) : mock _ g. user = security _ manager. find _ user ( " admin " ) example _ db = get _ example _ database ( ) command = exportdatabasescommand ( [ example _ db. id ] ) contents = dict ( command. run ( ) ) metadata = yaml. safe _ load ( contents [ " ...
[ 0.06747458875179291, 1.0366727113723755, 0.4538255035877228, 0.7910669445991516, 0.5876563191413879, 0.3260773718357086, -0.34815099835395813, -0.10574129968881607, 0.06079740449786186, 0.5605550408363342, -1.087487816810608, 0.6296510696411133, -0.13236059248447418, 0.5597873330116272, ...
def pop ( self :'linked _ list') - >'linked _ list': if self. head is none or self. size = = 0 : raise indexerror ( " list is empty! " ) return self. remove ( lambda x : true )
[ 0.07466534525156021, 0.7424412369728088, 0.511746346950531, 0.37683120369911194, 0.12837012112140656, -0.09432367980480194, 0.300794780254364, 0.8744829297065735, 0.3168907165527344, 0.24438340961933136, -0.4098273515701294, -0.5834577679634094, -0.7098380327224731, 0.038474369794130325, ...
def show _ asset ( self, asset : asset ) : self. _ asset = asset self. _ display. setpixmap ( self. _ asset. load _ thumbnail _ cached ( self. image _ size ) )
[ -0.1460837572813034, 0.03293890133500099, 0.24920183420181274, -1.3466202020645142, -0.9586150646209717, -0.05978301167488098, 0.6957590579986572, -0.2370229810476303, 0.560737669467926, 0.07394774258136749, 0.24273915588855743, 1.064892292022705, 1.2533262968063354, 0.6938124895095825, ...
def get _ core _ threshold ( self, target ) : return query _ int _ attribute ( self, target, 0, nv _ ctrl _ gpu _ core _ threshold )
[ -0.45842528343200684, 0.7026497721672058, 0.5204450488090515, 0.803410530090332, -0.3343932628631592, -0.40639686584472656, 0.4291377365589142, -1.5585063695907593, 0.1709050089120865, 0.5159749388694763, -0.18747638165950775, 0.10484275966882706, -1.2966127395629883, -0.2691335082054138, ...
def lower _ frequency ( center, order ) : return center * 2. 0 * * ( - 1. 0 / ( 2. 0 * order ) )
[ 1.0216660499572754, -0.8544312715530396, 0.2156679630279541, -0.03769479691982269, -0.07267419248819351, -0.6388776302337646, -0.6031484007835388, -0.8202537894248962, 0.42185479402542114, -0.7504128217697144, 0.5327478051185608, 0.27359291911125183, -0.5816370248794556, 0.3614919781684875...
def worker ( args ) : # step 1. create the envelope with " created " ( draft ) status args [ " envelope _ args " ] [ " status " ] = " created " # using worker from example 002 results = eg002controller. worker ( args ) envelope _ id = results [ " envelope _ id " ] # step 2. create the sender view view _ request = retur...
[ -0.6215765476226807, -0.1476401686668396, 0.9311811327934265, -0.29153943061828613, -0.16985003650188446, -0.25198042392730713, 0.4368443787097931, 0.3889330327510834, -0.044357310980558395, 0.0034089386463165283, -0.6615211963653564, 0.11579342186450958, 0.19962374866008759, 0.62900686264...
def build _ mismatched _ common _ meta _ report ( common _ meta _ df _ shapes, sources, all _ meta _ df, all _ meta _ df _ with _ dups ) : expanded _ sources = [ ] for ( i, shape ) in enumerate ( common _ meta _ df _ shapes ) : src = sources [ i ] expanded _ sources. extend ( [ src for i in range ( shape [ 0 ] ) ] ) ex...
[ 0.14556322991847992, -0.09751347452402115, 0.6814582347869873, -0.2061544805765152, 0.4211026430130005, -0.3969157636165619, 0.84405517578125, 0.7427716255187988, 0.29635757207870483, 0.02685431018471718, 0.12123139202594757, 0.12308193743228912, 0.2591872811317444, -0.05640656128525734, ...
def plot _ data ( lidar, title = " " ) : fig = plt. figure ( ) ax = fig. add _ subplot ( 111, projection ='3d') #, axisbg ='black') # ax. title ( title ) colors = ( lidar [ ele ] / lidar [ ele ]. max ( ) ) # * 255 ax. scatter ( lidar [ lat ], lidar [ long ], zs = lidar [ ele ], zdir ='z ', marker ='+ ', c = colors, s =...
[ 0.28196167945861816, 0.44812116026878357, 0.9194704294204712, -0.540489912033081, -0.9463685154914856, 1.5461959838867188, -0.31300088763237, 0.6087359189987183, 0.4085516333580017, 0.04576348140835762, 0.12109372764825821, 1.048225998878479, 0.5085384845733643, -0.6137286424636841, 0.45...
def _ _ init _ _ ( self, cell ) : super ( freestatecell, self ). _ _ init _ _ ( ) self. _ cell = cell self. _ state _ built = false self. _ state _ variables = tf. contrib. checkpoint. list ( [ ] ) self. _ states _ structure = none
[ 0.6949539184570312, 0.8532435894012451, 0.3602059483528137, 0.4117741882801056, -0.21993298828601837, 0.01224750466644764, 1.07473886013031, -0.5981751084327698, 0.45717188715934753, -0.3515757918357849, -0.9246559143066406, -0.9362642168998718, 0.3064441978931427, 0.6048041582107544, 0....
def _ installvboxondarwin ( self ) : sdmg = self. _ findfile ('^ virtualbox -. * \ \. dmg $') ; if sdmg is none : return false ; # mount the dmg. frc = self. _ darwinmountdmg ( sdmg ) ; if frc is not true : return false ; # uninstall any previous vbox version first. suninstaller = os. path. join ( self. _ darwindmgpath...
[ -0.26083165407180786, 0.40534430742263794, 0.7695056200027466, 0.05449056625366211, 0.1467440128326416, -0.5882282257080078, -0.06406554579734802, -0.010051034390926361, -0.25625142455101013, 0.1758546233177185, 0.09532343596220016, -0.5315982699394226, -0.4904218018054962, 0.6533361673355...
def _ inject ( ) : import vispy show _ warnings = vispy. config ['show _ warnings'] import opengl. gl. framebufferobjects as fbo # import functions here ns = globals ( ) funcnames = _ desktop. _ glfunctions for name in funcnames : func = _ get _ function _ from _ pyopengl ( name ) ns [ name ] = func # import functions ...
[ 0.425075501203537, 0.5830445885658264, 0.8829339146614075, 0.07267633080482483, -0.9012160897254944, -0.258200466632843, 0.2596099078655243, -1.4754383563995361, -0.24803774058818817, -0.5983551144599915, -1.0829330682754517, 0.4642741084098816, 0.27989819645881653, 0.4718046188354492, 0...
async def _ create _ offer _ for _ ids ( self, offer _ dict : dict [ union [ int, bytes32 ], int ], tx _ config : txconfig, driver _ dict : optional [ dict [ bytes32, puzzleinfo ] ] = none, solver : optional [ solver ] = none, fee : uint64 = uint64 ( 0 ), extra _ conditions : tuple [ condition,... ] = tuple ( ), taking...
[ -0.934214174747467, 0.4002269208431244, 0.6993829607963562, -0.9486101269721985, -0.20594574511051178, -1.0650428533554077, -0.3327082693576813, -0.33988916873931885, 0.19598092138767242, 0.7997526526451111, 0.2504579424858093, -0.12819114327430725, -0.03702378645539284, -0.026284756138920...
def visualize _ financial _ records ( args ) : with open ('financial _ records. csv ', newline ='' ) as csv _ file : record _ reader = csv. dictreader ( csv _ file ) all _ records = [ record for record in record _ reader ] # sort all records by date to make them appear in the correct # order in the generated chart all ...
[ 0.14470379054546356, 1.018039584159851, 1.1431245803833008, -0.0801323801279068, -0.5789816975593567, 0.5511956810951233, 0.1557656079530716, -0.02068936638534069, -0.2730887532234192, -0.35829684138298035, 1.2144685983657837, 0.4581187665462494, 0.8982320427894592, -0.03863266482949257, ...
def _ check _ gids ( gids, gid _ ranges, valid _ cells, arg _ name, same _ type = true ) : _ validate _ type ( gids, ( int, list, range, str, none ), arg _ name,'int list, range, str, or none') # convert gids to list if gids is none : return list ( ) if isinstance ( gids, int ) : gids = [ gids ] elif isinstance ( gids,...
[ -0.6077484488487244, 0.19024613499641418, 0.3373169004917145, 0.2721525728702545, 0.8461143970489502, 0.295654833316803, -0.13970449566841125, -0.5600720047950745, 0.03956792876124382, 1.1789084672927856, 0.9459273219108582, 0.8443580269813538, -1.138893961906433, 1.2883504629135132, 0.2...
def test _ transaction _ multiple _ filters ( client, acc1 _ usd _ deposit _ transaction _ factory, acc2 _ eth _ withdrawal _ transaction _ factory, ) : acc1 _ usd _ deposit _ transaction _ factory ( client _ address ) withdrawal = acc2 _ eth _ withdrawal _ transaction _ factory ( client _ address ) encoded _ jwt = sep...
[ 0.032562438398599625, 0.5905183553695679, 0.6762059926986694, 0.13565410673618317, 0.38718175888061523, -0.04573894664645195, -0.37259194254875183, -0.41579484939575195, -0.328201025724411, -0.7274209856987, -0.5979394912719727, 0.06696968525648117, 0.9572016000747681, -0.3266565501689911,...
def test _ division _ vector _ by _ scalar ( self ) : vector = vector ( [ 9, 12, 15 ] ) vector2 = vector / 3 self. assertequals ( vector2. coordinates, [ 3. 0, 4. 0, 5. 0 ] ) self. assertraises ( zerodivisionerror, self. vector. _ _ div _ _, 0. 0 ) vector2 = vector / - 1 self. assertequals ( vector2. coordinates, [ - 9...
[ -0.27895060181617737, -0.47753486037254333, 0.49072542786598206, 0.5359899401664734, 0.33615586161613464, 0.4770641326904297, 1.2400821447372437, -0.529574990272522, -0.07176601141691208, -0.992428183555603, -0.21401365101337433, -0.06532934308052063, 0.48876744508743286, 0.407153278589248...
def _ _ getitem _ _ ( self, item ) : if isinstance ( item, slice ) : if item. start is none and item. stop is none and item. step is none : return self return sliceddataset ( self, item ) elif item is... : return self elif isinstance ( item, int ) : return self. take ( item ). list ( ) [ - 1 ] else : raise valueerror (...
[ -0.47801095247268677, 0.11197260022163391, 0.6229119300842285, 0.41164630651474, -0.2736532688140869, -0.46957120299339294, 0.33095115423202515, -0.48891231417655945, 0.7667660713195801, -0.5297529101371765, 0.007812880910933018, 0.31136080622673035, -0.5015701651573181, -1.010960936546325...
def get _ chat _ by _ video _ id ( self, video _ id, params ) : initial _ info = self. _ get _ initial _ video _ info ( video _ id ) title = initial _ info. get ('title') duration = initial _ info. get ('duration') start _ time = initial _ info. get ('start _ time') is _ live = initial _ info. get ('is _ live') return ...
[ 0.5897545218467712, -0.9237252473831177, 0.5985230207443237, 1.2934465408325195, 0.07316472381353378, -0.40625932812690735, -0.062460776418447495, -0.4660469591617584, -0.42060813307762146, 0.19131700694561005, 0.378152459859848, 0.6935268044471741, -0.26862308382987976, 0.1774588972330093...
def _ _ eq _ _ ( self, other ) : if not isinstance ( other, notificationtyperesource ) : return false return self. _ _ dict _ _ = = other. _ _ dict _ _
[ -0.22307497262954712, -0.2992563247680664, 0.697009265422821, -0.1465619057416916, 0.04668647423386574, 0.39710086584091187, 0.5659003853797913, -0.9412018656730652, 0.5921931862831116, 0.299589067697525, -1.1585315465927124, -0.3115418553352356, -0.07853870093822479, 0.6110984683036804, ...
def testfeature ( self, img ) : try : # set aside current pattern and check for anything decodeddata = self. decodebc ( img, verifypattern = true ) # return current pattern if isinstance ( decodeddata, list ) : return true else : return false except exception as e : print ( e ) # some unknown error, assume test failed ...
[ -0.4144861102104187, -0.16221433877944946, 0.5054384469985962, 0.19702951610088348, -0.14050400257110596, 0.029306350275874138, 0.3237421214580536, 0.2098199725151062, 0.7333386540412903, -0.8676408529281616, -0.774242639541626, -0.10704722255468369, -1.7456759214401245, 0.2913640439510345...
def project ( self, request, pk ) : projector = self. get _ object ( ) elements = request. data. get ( " elements " ) preview = request. data. get ( " preview " ) history _ element = request. data. get ( " append _ to _ history " ) delete _ last _ history _ element = request. data. get ( " delete _ last _ history _ ele...
[ -1.0435744524002075, 1.0035521984100342, 0.8427169919013977, 0.2508578598499298, -0.16182008385658264, 0.5636322498321533, 0.2662928104400635, 0.5099837779998779, 1.3686619997024536, 0.07603411376476288, 0.27620989084243774, -0.17669221758842468, -0.42001092433929443, 0.31719231605529785, ...
def test _ gf _ write _ feature _ header _ without _ tags _ with _ description _ without _ background ( disabled _ colors, capsys, mocker ) : # given feature = mocker. magicmock ( spec = feature ) feature. keyword = " feature " feature. short _ description = " my feature " feature. description = [ " foo ", " bar ", " b...
[ 0.791678786277771, -0.1529429852962494, 0.3691297769546509, 0.2309473156929016, 0.5927335619926453, 0.43065929412841797, -0.47768864035606384, -0.12209390103816986, -0.9317631125450134, -0.501254141330719, -0.372748464345932, 0.22333544492721558, -0.5708341598510742, 0.5098392963409424, ...
def update _ ref ( self, new _ observed ) : for observer in self. observers : observer. update _ ref ( new _ observed )
[ -0.6521818041801453, -1.226473331451416, 0.6699702143669128, -0.19785788655281067, 0.5000496506690979, 0.4485648572444916, -0.43987521529197693, -0.25557741522789, -0.6497913002967834, 1.3557078838348389, -0.17230898141860962, 0.47387903928756714, -0.1818404495716095, 1.4175270795822144, ...
def overlay _ image _ alpha ( img, img _ overlay, pos, alpha _ mask ) : x, y = pos # image ranges y1, y2 = max ( 0, y ), min ( img. shape [ 0 ], y + img _ overlay. shape [ 0 ] ) x1, x2 = max ( 0, x ), min ( img. shape [ 1 ], x + img _ overlay. shape [ 1 ] ) # overlay ranges y1o, y2o = max ( 0, - y ), min ( img _ overla...
[ -0.1382375955581665, -1.1039830446243286, 1.0547629594802856, -0.3038904368877411, -0.23658086359500885, 0.07240656018257141, 0.24966242909431458, 0.28405532240867615, 0.14456269145011902, 0.510245680809021, 0.04631103202700615, -0.5335856676101685, -0.2054772824048996, -0.1011941954493522...
def bisection _ solver ( f, a, b, epsilon = 0. 001, verbose = false ) : validate _ conditions ( f, a, b, epsilon ) m = calculate _ midpoint ( a, b ) fm = f ( m ) remaining _ iterations = max _ iterations if verbose : # print de header van de tabel. header = map ( lambda x : x. ljust ( 10,'' ), ['step ','a ','b ','m ','...
[ 0.12910759449005127, -0.019260292872786522, 0.765261173248291, 0.14705044031143188, -0.4068114757537842, -0.5688309669494629, 0.36754465103149414, -0.535396158695221, -1.1633011102676392, 0.8589586615562439, 0.9103381633758545, -0.14627104997634888, -0.5288596153259277, -0.3968341052532196...
def interpolate ( self, obj _ idx ) : prev _ frame = - 1 prev _ box = none cls = none for frame in range ( 0, self. length ) : try : for row in self. labels [ frame ] : if int ( row [ 2 ] ) = = obj _ idx : # see if obj _ idx is in this frame # if we have prev _ box, interpolate all boxes between if prev _ frame! = - 1 ...
[ -0.6719024777412415, 0.10918013751506805, 1.2714837789535522, -0.32709863781929016, 0.00502211507409811, -0.03372783586382866, 0.637262225151062, -0.7425861954689026, 0.7338024973869324, -0.15103350579738617, 0.002409260021522641, 0.03536447882652283, -0.37206387519836426, 0.20287901163101...
def ensure _ deviceset _ for _ cpt ( self, lib, cpt ) : dsname = cpt. attributes. get ('eaglexml _ deviceset ', cpt. name ) if ( lib, dsname ) in self. dscache : return self. dscache [ lib, dsname ] deviceset = g. deviceset ( name = dsname ) deviceset. gates = g. gates ( ) deviceset. devices = g. devices ( ) lib. devic...
[ 0.05127137899398804, 0.3360908031463623, 0.28814560174942017, -1.1475661993026733, -0.5081180930137634, -0.27850815653800964, -0.062266841530799866, -0.7247724533081055, 0.33565235137939453, -0.4898245930671692, 0.21035413444042206, 0.09217046201229095, -0.5626454949378967, -0.232369467616...
def update _ fits ( self, original _ file _ path, new _ file _ path ) : new _ file _ dir = os. path. split ( new _ file _ path ) [ 0 ] if not os. path. exists ( new _ file _ dir ) : os. makedirs ( new _ file _ dir ) if not os. path. exists ( new _ file _ path ) : shutil. copy ( original _ file _ path, new _ file _ path...
[ 0.14701880514621735, -1.4850590229034424, 0.8145435452461243, 0.7402427792549133, -0.3959965705871582, 0.8485098481178284, 0.7191125750541687, 0.5420272946357727, -0.2092818021774292, 0.3016841411590576, 0.5719204545021057, 0.4919581115245819, -0.5290685296058655, -0.6179807186126709, 0....
def commonpaths ( paths ) : import posixpath common ='' if len ( paths ) > 1 and " / " not in paths : common = posixpath. commonprefix ( paths ) if common [ - 1 : ]! = " / " : common = common [ : common. rfind ( " / " ) + 1 ] idx = len ( common ) if idx > 0 : paths = [ path [ idx : ] or ". / " for path in paths ] commo...
[ -0.16478148102760315, 0.024645520374178886, 0.6627379655838013, 0.8042693138122559, 0.12939712405204773, -0.08893147855997086, 0.6511446833610535, 0.31402587890625, 0.13765060901641846, 0.6366015672683716, 0.46941322088241577, -1.5706311464309692, -0.47766008973121643, 0.6526867747306824, ...
def new ( loc ) : db = db ( loc ) return db
[ 0.03160218894481659, -0.6267886161804199, 0.05511699989438057, -0.4411469101905823, -0.48264390230178833, 0.4662603437900543, 0.22782158851623535, 0.4391738176345825, 0.07087110728025436, -0.4296441078186035, -0.7956903576850891, -0.14421498775482178, -0.38058096170425415, -0.1899888962507...
async def test _ flow _ works _ with _ 2fa ( hass, aioclient _ mock ) : from homeassistant. components. hangouts. hangups _ utils import google2faerror flow = config _ flow. hangoutsflowhandler ( ) flow. hass = hass with patch ( " homeassistant. components. hangouts. config _ flow. get _ auth ", side _ effect = google2...
[ -0.28892675042152405, -0.03590355068445206, 0.3971318006515503, 0.6877496242523193, 0.7487024068832397, 0.10069075226783752, 0.415630578994751, 0.11252578347921371, 0.1221732422709465, -0.889858603477478, -0.7512664794921875, 0.23932060599327087, 0.7268580198287964, 0.4541965425014496, 0...
def from _ hit ( cls, hit ) : if isinstance ( hit, hit ) : doc = hit. to _ dict ( ) meta = hit. meta. to _ dict ( ) elif isinstance ( hit, dict ) : meta = hit ['meta'] del hit ['meta'] doc = hit else : raise attributeerror ('the hit has to be of type hit or dict, found % s.'% hit. _ _ class _ _ ) # build the page page ...
[ -0.046332355588674545, -0.3336814045906067, 0.6477250456809998, -0.2425951510667801, -0.3179841637611389, 0.44913220405578613, 0.07888210564851761, 0.13477808237075806, 0.6494171023368835, 0.22892355918884277, 1.0931724309921265, -0.3623761534690857, 0.2662180960178375, -1.166818618774414,...
def conditional _ memory _ profile ( func ) : if config. opts. profile _ mem : from memory _ profiler import profile return profile ( func ) else : return func
[ 1.7090238332748413, 0.6081230640411377, 0.2931053638458252, 0.9682539105415344, -0.044128529727458954, -0.07087834924459457, 0.5858443975448608, -0.850738525390625, 0.9964292645454407, 0.440422385931015, -0.025772318243980408, 0.4887941777706146, -0.6415183544158936, 0.15450836718082428, ...
def process _ item ( self, item ) : return { " task _ id " : item [ " task _ id " ], " task _ type " : self. task _ type ( item ) }
[ -0.7113195061683655, -0.6186046600341797, 0.3175426423549652, -0.45090457797050476, 0.034897856414318085, -0.054903656244277954, -0.046117912977933884, -0.19662635028362274, 0.33820486068725586, 1.0357987880706787, -1.0431410074234009, -0.17306393384933472, 0.6009331941604614, 0.2757007181...
def main ( ) : parser = argparse. argumentparser ( description = " update randomizer nexus dataset " ) parser. add _ argument ( " - - dustkid ", default = default _ dustkid _ root, required = false, help = " dustkid website root url ", ) parser. add _ argument ( " - - atlas ", default = default _ atlas _ root, required...
[ 0.15141630172729492, -0.25128981471061707, 1.0145018100738525, 0.07576317340135574, -0.183854341506958, -0.4350663721561432, 0.13993754982948303, 0.4649498164653778, -0.5916174054145813, 0.12310053408145905, -0.3261479437351227, 0.6213134527206421, -0.25531694293022156, 0.04856085777282715...
async def xpinfo ( self, ctx ) : server = ctx. message. server channel = ctx. message. channel servername = server. name hourlyxp = int ( self. settings. getserverstat ( server, " hourlyxp " ) ) if not hourlyxp : hourlyxp = 0 onlyonline = self. settings. getserverstat ( server, " requireonline " ) xpprom = self. settin...
[ -0.0414162278175354, 0.0351690836250782, 0.8565050363540649, -0.08963385224342346, -0.014407391659915447, 0.3719145655632019, -0.5905027985572815, -0.1776852160692215, 0.03633059188723564, -0.07268082350492477, -0.4880978763103485, 0.6207845211029053, -0.3353336751461029, 0.431541651487350...
def get _ relationship _ info ( self, rc _ name ) : rc = arcpy. describe ( os. path. join ( self. path, rc _ name ) ) origin = rc. originclassnames [ 0 ] destination = rc. destinationclassnames [ 0 ] keys = rc. originclasskeys primary = [ k [ 0 ] for k in keys if k [ 1 ] = ='originprimary'] [ 0 ] foreign = [ k [ 0 ] fo...
[ -0.14107570052146912, -1.0473778247833252, 0.8519141674041748, -1.1255780458450317, -0.11523204296827316, 0.0037989539559930563, 0.21145208179950714, -0.49377572536468506, -0.11115533858537674, -0.06462009251117706, -0.23200947046279907, -0.20130236446857452, 0.16700905561447144, -0.590436...
def rand _ randomuser ( df, col1, col2, outfile, outfile _ start = 0, outfile _ end = 100 ) : nodes _ u = list ( df [ col1 ]. unique ( ) ) nodes _ o = list ( df [ col2 ]. unique ( ) ) num _ o = len ( nodes _ o ) num _ graphs = 0 while num _ graphs < ( outfile _ end - outfile _ start ) : print num _ graphs r = nx. graph...
[ -0.18645517528057098, 0.4992412328720093, 0.7349684238433838, 1.1022013425827026, -0.592338502407074, 0.5719047784805298, 1.8562883138656616, -0.29324105381965637, 0.24762561917304993, 0.21608960628509521, -0.5885534882545471, 0.5636922717094421, 0.0500795841217041, -0.6037781238555908, ...
def make _ newrange ( self, oldrange, optimising _ list, background _ arr, background _ method, * * kwargs ) : mode = kwargs. get ('mode ','primary') threshold = kwargs. get ('threshold ', 0. 001 ) scale _ factors = kwargs. get ('scale _ factors ', {'narrow': 2,'wide': 5,'factor': 5 } ) narrow = scale _ factors ['narro...
[ -0.842681884765625, -0.4867652356624603, 0.7877877950668335, 0.5279855728149414, 0.49961772561073303, -0.6519112586975098, 0.13318797945976257, 0.09337693452835083, -0.32847484946250916, 0.7711579203605652, 0.0916869193315506, 0.842175304889679, -0.1870231330394745, 0.5412282943725586, 0...
def test _ get _ comment _ list ( self ) : url = reverse ( " comment - list " ) response = self. client. get ( url, format = " json " ) self. assertequal ( response. status _ code, status. http _ 200 _ ok )
[ -0.23137404024600983, -0.35323724150657654, 0.46540939807891846, -0.0774322897195816, 1.5212550163269043, 0.48408547043800354, -0.1791732758283615, 0.6090455651283264, -0.11932303756475449, -0.22398120164871216, -0.9609116315841675, 0.5619381666183472, 0.2859010100364685, -0.19983157515525...
def show _ paths _ template _ using _ on ( self, template _ name ) : request = tsquerytemplatereq ( self. _ _ session _ id, template _ name, templatequerytype. show _ using _ templates. value, ) response = self. _ _ client. queryschematemplate ( request ) logger. debug ( " show paths template using { }, on { } ". forma...
[ 0.2193412482738495, 0.40249502658843994, 0.5075454711914062, -0.2818984091281891, -1.0396318435668945, -0.3531607985496521, -0.0337691493332386, -0.1995343714952469, 0.28551000356674194, 0.9117935299873352, 0.17285749316215515, -0.7418947815895081, -0.9305233359336853, 0.7471978068351746, ...
def run ( diagram _ structure ) : global nodes _ dict, synapses _ dict structure _ data = json. loads ( diagram _ structure ) for ii in range ( len ( structure _ data [ " nodedataarray " ] ) ) : # # # set up the nodes # # # try : node _ type = structure _ data [ " nodedataarray " ] [ ii ] ['neuron _ type'] # # im doing...
[ -0.23903138935565948, -0.3312584161758423, 0.7313411831855774, -0.6819335222244263, 0.7846103310585022, -0.1728437840938568, 0.34109410643577576, 0.3742564022541046, 0.045488860458135605, -0.1269529163837433, -0.22574615478515625, 0.20737142860889435, -0.13432379066944122, 0.50174450874328...
def display _ usage ( ) : print ( " usage : python2 people _ counting _ depth. py [ < filename > [ < replay " \ " rate > ] ] " ) print ( " - if filename is not specified the script will try to connect to " \ " a depth camera " ) print ( " - if replay rate is not specified the default value is 30 fps " )
[ 0.3600229322910309, 0.07081704586744308, 0.6845079064369202, 0.11635322123765945, 0.34556594491004944, 0.27355077862739563, 0.7755860686302185, -0.15098337829113007, -0.7840072512626648, 0.47283613681793213, 0.6811959743499756, 1.4007880687713623, -0.3928104043006897, 0.6479039192199707, ...
def main ( ) : # allows warnings from divide by zero or log / ln negative number to be caught in try except warnings. filterwarnings ('error') args = command _ line _ parameters ( ) if os. path. exists ( args. config ) : paths, process _ log, exp = config _ variables ( args ) process _ log = functions ( args, paths, pr...
[ 0.377731055021286, -0.23473665118217468, 0.7622607946395874, 0.9059892296791077, 0.7681706547737122, -0.03195207938551903, 0.28929227590560913, 0.2664855420589447, -0.8946906924247742, 0.315303772687912, -0.20291101932525635, 0.34245923161506653, 0.2501649558544159, 0.2754615545272827, 1...
def get _ local _ service _ id ( service ) : return _ internal _ services [ service ]
[ 0.11060108989477158, -0.8772284388542175, 0.17134395241737366, -0.6097382307052612, -1.135428786277771, -0.1024482250213623, 0.5107220411300659, -0.7497546672821045, 1.0137298107147217, -0.2479414939880371, 0.21975383162498474, 0.9251285791397095, -0.9600400924682617, 0.549498438835144, ...
def test _ delete _ vcs _ root _ entry ( self ) : pass
[ 1.3181531429290771, -0.7109594941139221, 0.006049399729818106, 1.328583836555481, 0.5024994015693665, 0.23850762844085693, 1.1021479368209839, 0.2631097137928009, 0.8482871055603027, -0.5122754573822021, -0.08657388389110565, 0.6459173560142517, -1.2008846998214722, 0.44446703791618347, ...
def train _ gridsearch _ extratree ( self, verbose = 0 ) : parameters = {'min _ samples _ split': range ( 5, 30, 5 ) } # searches over the given parameter grid to find the best set clf = gridsearchcv ( extratreesclassifier ( n _ estimators = 10, max _ depth = 8, criterion ='gini'), parameters, cv = 5 ) clf. fit ( self....
[ -0.06199060007929802, 0.46562305092811584, 0.6795271635055542, -0.47034159302711487, 0.9852010011672974, -0.08177223801612854, 0.45881643891334534, -0.02622378058731556, -0.3578699827194214, -0.048885077238082886, 0.27000683546066284, 1.4948921203613281, -0.39500612020492554, 0.68380087614...
def analyser ( self, baseschema, override ) : if ( baseschema, override ) in self. analysers : return true debug = self. debug verbose = self. verbose schemaroots = self. schemaroots e = elements ( debug = debug, verbose = verbose ) e. configure ( baseschema, override = override, roots = schemaroots. get ( baseschema, ...
[ -0.8468101024627686, 0.5425097346305847, 0.5197714567184448, -0.2179732620716095, 0.18081042170524597, -0.6585323810577393, -0.02458447404205799, -0.07106573134660721, 0.7761335968971252, -0.8073742985725403, -0.5415683388710022, -0.2831084728240967, -1.1841559410095215, 1.0039832592010498...
def _ extract _ funcs ( self, v ) : return ( isinstance ( v, ast. functiondef ) and ( v. name [ 0 ]! ='_') )
[ -0.7665866613388062, 0.43872755765914917, 0.3677234649658203, -0.23897330462932587, -0.4431392252445221, -1.533781886100769, -0.1787838637828827, -0.49770331382751465, 0.5147607922554016, 0.03828001022338867, -1.4174846410751343, 0.11955293267965317, -0.352441668510437, 0.544256865978241, ...
def handle _ parse _ result ( self, ctx, opts, args ) : if self. name in opts : if self. depends _ on not in opts : raise click. usageerror ( " % s requires % s " % ( self. _ fmt _ opt ( self. name ), self. _ fmt _ opt ( self. depends _ on ), ) ) for name in self. incompatible _ with : if name in opts : raise click. us...
[ -0.21626493334770203, 0.12043961137533188, 0.6726502180099487, -0.33465924859046936, -0.17611292004585266, -0.4575450122356415, -0.7425869107246399, -0.394635409116745, -0.008707352913916111, -0.06144293397665024, 0.08539154380559921, -0.3881790041923523, -0.338393896818161, 0.288457274436...
def species _ to _ node ( spc ) : rmgmol = spc. molecule [ 0 ] obmol = toobmol ( rmgmol ) ardmol = gen3d. molecule ( obmol ) ardmol. addh ( ) ardmol. gen3d ( make3d = true ) return ardmol. tonode ( )
[ -0.20379579067230225, -0.5813043713569641, 0.4294820725917816, -0.38686299324035645, 0.17853713035583496, 0.43871644139289856, 0.13422834873199463, -0.21383526921272278, 0.5130795836448669, 0.301035076379776, 0.07588761299848557, 1.059068202972412, 0.024704568088054657, -0.6442019939422607...
def to _ pandas ( cur ) : if cur. description! = none : data = pd. dataframe ( cur. fetchall ( ), columns = [ rec [ 0 ] for rec in cur. description ] ) else : data = " " return data
[ 0.4238700270652771, 0.36968064308166504, 0.30140674114227295, 0.21693725883960724, 0.16812792420387268, -0.26662859320640564, -0.6478047966957092, 0.5408386588096619, 0.039288487285375595, -0.17690198123455048, 0.8924676179885864, 0.9646497964859009, -0.5675709247589111, -0.094324439764022...
def list _ files ( self, prefix = " ", flat = false ) : for f in self. _ interface. list _ files ( prefix, flat ) : yield f
[ -0.9624302387237549, 0.01300816424190998, 0.5076694488525391, 0.023732967674732208, 0.04980937018990517, -0.2539956867694855, -0.2809181213378906, 0.04916153475642204, -0.29570165276527405, -0.6708146333694458, 0.09558718651533127, 0.09548241645097733, -0.06031809374690056, 0.2668914198875...
def stationary _ covariance ( self ) - > jaxarray : raise notimplementederror
[ -0.6104040741920471, -0.9325017333030701, 0.823823869228363, 1.2581243515014648, -0.2827540338039398, 0.17729055881500244, 0.4703092575073242, -0.4682856500148773, -0.5002599954605103, 0.01848650351166725, -0.2707226872444153, 0.7745963931083679, 0.6127780675888062, 0.285563200712204, -0...
def follow _ group _ with _ http _ info ( self, group _ id, logged _ in _ user _ id, access _ token, client _ token, * * kwargs ) : all _ params = ['group _ id ','logged _ in _ user _ id ','access _ token ','client _ token ','fields'] all _ params. append ('callback') all _ params. append ('_ return _ http _ data _ onl...
[ -0.2540428638458252, 0.4848968982696533, 0.802765965461731, 0.10335975885391235, -0.8647320866584778, -0.05728663504123688, 0.31714171171188354, -1.6229140758514404, -0.7196054458618164, 0.09037521481513977, 0.24626311659812927, 0.8342582583427429, -0.2869719862937927, 1.118579626083374, ...
def status ( self, status ) : allowed _ values = [ " pending ", " accepted " ] if status not in allowed _ values : raise valueerror ( " invalid value for ` status ` ( { 0 } ), must be one of { 1 } ". format ( status, allowed _ values ) ) self. _ status = status
[ -0.04617908224463463, 0.1927473098039627, -0.2957412898540497, 0.2526707947254181, -0.4759294092655182, 1.0041834115982056, -0.05367226153612137, 1.5099283456802368, -0.35583430528640747, -0.2616848349571228, -0.42475059628486633, 0.15030966699123383, 0.16354608535766602, 0.973187625408172...
async def async _ step _ init ( self, _ : none = none ) - > flowresult : return await self. async _ step _ confirm _ change _ plan ( )
[ -0.010728389024734497, 0.4324311316013336, 0.32422253489494324, 0.7803747653961182, 0.13117291033267975, -0.6629587411880493, -0.13563214242458344, -0.04740961641073227, 0.021592671051621437, 0.03748646751046181, -0.5931932330131531, 1.363670825958252, 0.6235716342926025, 0.179821237921714...
def choosedirectory ( self ) : dialog = qfiledialog ( ) self. dir = dialog. getexistingdirectory ( self, " open directory ", ". / ", qfiledialog. showdirsonly | qfiledialog. dontresolvesymlinks ) self. ui. dirstring. settext ( self. dir ) self. state ='struct + angio'self. data = load ( directory = self. dir ) self. pr...
[ -0.2946123480796814, -0.46467259526252747, 0.4046979248523712, -0.10769011080265045, 0.08867881447076797, 0.16293205320835114, 1.2929877042770386, 0.11293891817331314, 0.3364630341529846, -1.271028995513916, -0.11043445020914078, 0.8936845064163208, 0.8812916278839111, 0.2600584030151367, ...
def _ _ init _ _ ( self, name, mix, * args, * * kwargs ) : kwargs. update ( { " mix " : mix } ) super ( zeroinflatednegativebinomial, self ). _ _ init _ _ ( name, * args, * * kwargs )
[ -0.019311215728521347, -0.013763891533017159, 0.7358169555664062, 0.4518309235572815, 0.55401211977005, 0.35756298899650574, -0.03306710720062256, 0.09704452753067017, 0.356370210647583, -0.6719993948936462, -0.6160287857055664, -0.5598485469818115, -1.016639232635498, 1.250834345817566, ...
def butter _ lowpass _ filter ( self, data, cutoff, fs, fwbw, order = 5 ) : b, a = self. butter _ lowpass ( cutoff, fs, order = order ) if fwbw : y = scipy. signal. filtfilt ( b, a, data ) else : y = scipy. signal. lfilter ( b, a, data ) return y
[ 0.4911321997642517, -0.3126225471496582, 0.5388713479042053, -0.394782692193985, -0.5470665693283081, -0.5937755107879639, -0.7526342272758484, -0.6709973216056824, 0.515285074710846, -0.7832195162773132, 0.32249897718429565, 0.9707728624343872, -0.7331554889678955, 0.5981800556182861, -...
def _ _ delitem _ _ ( self, key ) : del self. raw [ key ]
[ -1.1055128574371338, 0.17666542530059814, 0.5729408264160156, -1.0061017274856567, -1.665330410003662, 0.6497143507003784, -0.6381309032440186, 0.7096878886222839, 0.1766294538974762, -0.17328831553459167, 0.023993242532014847, -0.02745363861322403, 0.5317505598068237, -0.36334195733070374...
def check _ enable _ mode ( self, * args, * * kwargs ) : pass
[ -0.4699855148792267, -0.7140237092971802, 0.60112464427948, 0.7641903758049011, 0.9125447273254395, 0.8888348340988159, -0.13728487491607666, 0.478898286819458, -0.5520081520080566, 0.25046849250793457, -0.060012124478816986, 0.005071124993264675, -1.1146137714385986, 0.16791579127311707, ...
def writetoplevel ( self, config _ list, spec _ name, output _ path, xml _ file ) :
[ -1.4336683750152588, -1.0211011171340942, 0.13377468287944794, 0.6600443720817566, 0.029073592275381088, 0.06457293033599854, 0.45324185490608215, 0.9046216607093811, -0.8438525795936584, 0.6982263922691345, -0.33315494656562805, -0.2335151731967926, -0.07763253897428513, 0.399911880493164...
def get _ download _ progress _ all ( self ) : # take all the files names from download dir names = os. listdir ( self. dir _ download ) # wait until first download starts while len ( names ) = = 0 and self. start _ download : names = os. listdir ( self. dir _ download ) self. start _ download = false crd = [ ] # keep ...
[ 0.6935466527938843, -0.9311155080795288, 0.985855758190155, 0.35707908868789673, 0.26698818802833557, 0.1409570723772049, -0.16033761203289032, 0.2610456347465515, -0.30111002922058105, -0.05414161458611488, 0.237651064991951, -0.2942796051502228, -0.7181572914123535, 1.3118168115615845, ...
def calculate _ fuel _ consumption ( maf, fuel _ type = fueltypes. gasoline. value ) : return ( maf * 3600 ) / ( fuel _ type [ 0 ] * fuel _ type [ 1 ] )
[ 0.155294269323349, -0.4574778079986572, 0.20350350439548492, 0.14837589859962463, 0.314007043838501, -0.8958755135536194, -0.6161412000656128, 0.2746623158454895, -1.1882603168487549, 0.29262444376945496, -0.0295722633600235, -0.34884026646614075, -0.2077498584985733, 0.9684712290763855, ...
def get _ system _ shared _ memory _ status ( self, region _ name : str =..., headers : dict [ str, t. any ] =..., as _ json : t. literal [ false ] =..., ) - > service _ pb2. systemsharedmemorystatusresponse :
[ -0.17693985998630524, -0.5850826501846313, 0.4842996299266815, -0.20073775947093964, -0.1735890954732895, -0.25399136543273926, 0.4077439606189728, -0.4618379473686218, 0.7242777943611145, -0.6123853325843811, -1.2255100011825562, 0.7290366291999817, -0.6128742694854736, 0.5855703353881836...
def fibonacci ( ) - > _ iterable [ int ] : a : int = 1 b : int = 2 while true : yield a a, b = b, a + b
[ 0.047315362840890884, 0.06994342803955078, 0.4671741724014282, 0.6251171231269836, 0.4054763615131378, -0.6475025415420532, 0.3208778202533722, -0.6902342438697815, -0.8257811069488525, -0.42061781883239746, -0.3629586696624756, 0.11790859699249268, -0.21994253993034363, -0.240340679883956...
def update ( self ) : self. insects = [ ] for pos in self. cells : if self [ pos ] is not none : insect = self [ pos ] insect. update _ check ( ) self. insects. append ( insect )
[ -0.6151772141456604, -1.341868281364441, 0.24536755681037903, 0.31333526968955994, 0.36017924547195435, -0.3412369191646576, -0.6613368391990662, 0.2846636176109314, -0.3756539225578308, 0.752586841583252, 0.5486605763435364, -0.12703067064285278, -0.8140136003494263, 0.4510059654712677, ...
def create _ discriminator _ logits _ layer ( regularizer ) : with tf. variable _ scope ( name _ or _ scope = " discriminator ", reuse = tf. auto _ reuse ) : # flatten layer to get final block conv tensor ready for dense layer. flatten _ layer = tf. layers. flatten ( name = " discriminator _ flatten _ layer " ) print _...
[ -0.3761225938796997, -0.40209656953811646, 0.41022685170173645, 0.28677231073379517, 0.2869071960449219, -0.0015359994722530246, 0.12872865796089172, 0.2603673040866852, 0.7087841629981995, -0.9007035493850708, -0.4742259681224823, 0.30623510479927063, -0.1372009962797165, 0.21571250259876...
def pitch _ class _ in _ f ( x ) : pitch _ class _ matrix = np. array ( [ n % octave for n in range ( num _ notes ) ] ) pitch _ class _ matrix = torch. longtensor ( pitch _ class _ matrix ) pitch _ class _ matrix = pitch _ class _ matrix. repeat ( ( x. shape [ : 2 ] + ( 1, ) ) ) return get _ variable ( pitch _ class _ ...
[ -0.37998881936073303, 0.6256372928619385, 0.4880248010158539, 0.1271274834871292, -0.4351902902126312, 0.0317857600748539, 0.7297908663749695, -0.2082473486661911, -0.6410067677497864, 0.43170833587646484, -0.1854625791311264, -0.3968469202518463, 0.40810108184814453, -0.6989186406135559, ...
def create _ dirs _ for ( filepath ) : # otherwise, don't have to create any directories if filepath. find ('/') > - 1 : dir _ path = filepath [ : filepath. rfind ('/') ] if not os. path. isdir ( dir _ path ) : os. makedirs ( dir _ path )
[ -0.15749624371528625, 0.3073789179325104, 0.19751295447349548, 0.2623825669288635, 0.9937589764595032, 0.7719008922576904, 1.22704017162323, -0.7648475170135498, 0.2376927137374878, -0.63570237159729, 0.04407835751771927, -0.9304081797599792, 0.14856885373592377, 0.9840857982635498, -0.7...
def test _ construct ( self ) : suite = runner. loggedsuite ( ) self. assertequal ( suite. counttestcases ( ), 0 )
[ -0.349878191947937, 0.5824086666107178, 0.18458501994609833, 0.4366166591644287, 1.1964811086654663, 0.9806168675422668, 0.8418329358100891, 0.5350284576416016, 0.008902041241526604, -1.499265432357788, 0.2512304484844208, -0.4217439591884613, 0.20237118005752563, 0.6034441590309143, 0.5...
def plan ( self ) - > optional ['outputs. armplanresponse'] : return pulumi. get ( self, " plan " )
[ 0.7396215796470642, 0.13419067859649658, 0.2545989155769348, 0.05399412661790848, 0.9510721564292908, 1.0465803146362305, -0.03069518506526947, -0.5156815648078918, 1.3743120431900024, -0.9531102180480957, -0.15667307376861572, 1.075385332107544, 0.554632842540741, -1.3261833190917969, -...
def delete _ entry ( self, id ) : conn = self. conn sql ='delete from { entries } where id =? '. format ( entries = self. table _ name ) cur = conn. cursor ( ) cur. execute ( sql, ( id, ) ) conn. commit ( )
[ 0.6142672300338745, -0.1877710521221161, 0.20782266557216644, 0.12876158952713013, 0.8868273496627808, -0.10523654520511627, -0.47626861929893494, 0.5007060170173645, 0.007115991786122322, 0.37299272418022156, -0.023903697729110718, 0.050446219742298126, -0.45533955097198486, 0.58013367652...
def start ( self ) : self. return _ load _ section = false # tells that is need to go back there to load a new action ( avoiding push a load _ section above another in the stack ) self. curr _ sec ='main'self. _ load _ default _ actions ( ) self. _ running = true while self. _ running : self. return _ load _ section = ...
[ 0.23957574367523193, -0.1960422396659851, 0.4483460783958435, 0.8883389234542847, 0.708678662776947, 0.17486101388931274, 0.14781083166599274, -0.01707454025745392, -0.7998654246330261, 0.0831698477268219, 0.12836678326129913, 0.6266630291938782, -0.6750926971435547, 0.8164205551147461, ...
def _ get _ config _ path _ for _ localizer ( ) : repo _ dir = osp. dirname ( osp. dirname ( osp. dirname ( _ _ file _ _ ) ) ) config _ dpath = osp. join ( repo _ dir,'configs / localization') if not osp. exists ( config _ dpath ) : raise exception ('cannot find config path') config _ fpaths = list ( glob. glob ( osp. ...
[ -0.5520347952842712, 0.19416747987270355, 0.6794474720954895, 0.5324660539627075, 0.12114845961332321, 0.11460482329130173, 0.7799122929573059, 0.6432209014892578, -0.5500121712684631, 1.0588383674621582, -0.3892059922218323, -0.8062516450881958, 0.40647801756858826, 1.1797524690628052, ...
def test _ background ( self ) : self. assertequal ( text. assembleformattedtext ( a. normal [ a. bg. red ['hello,'], a. bg. green ['world!'] ] ),'\ x1b [ 41mhello, \ x1b [ 42mworld!')
[ 0.5083602070808411, -0.6105579137802124, 0.5427561402320862, 0.3650606870651245, -0.1557793915271759, 0.6071245074272156, -0.2962394654750824, -0.11912397295236588, 0.1373075544834137, 0.4950743615627289, -0.14255072176456451, 0.47280973196029663, -1.1092522144317627, -0.19892968237400055,...
def get _ filelists ( srcdir, shuffle = true ) : dataset = [ ( os. path. join ( os. path. join ( srcdir, dirname ), filename ), label [ dirname ] ) for dirname in os. listdir ( srcdir ) for filename in os. listdir ( os. path. join ( srcdir, dirname ) ) ] if shuffle : random. shuffle ( dataset ) return dataset
[ -1.1752904653549194, 0.0405069924890995, 0.48323193192481995, -1.087010383605957, -0.6825729608535767, 0.25211387872695923, 0.4887545108795166, 0.667625367641449, 0.9860402345657349, -0.2411113828420639, 0.33855605125427246, 0.07162725925445557, 0.22265811264514923, 1.0078080892562866, -...
def override _ 3i _ specimen _ project ( self, specimen _ df : dataframe ) : specimen _ df. withcolumn ( " _ project ", when ( specimen _ df [ " _ datasource " ] = = " 3i ", col ( " phenotyping _ consortium " ) ). otherwise ( " _ project " ), ) return specimen _ df
[ -0.5339691042900085, 0.9509704113006592, 0.3624480068683624, 0.3952626585960388, 0.1552600860595703, 0.14674663543701172, -0.16180112957954407, 0.509350061416626, 0.340223491191864, 0.8267164826393127, -0.062355462461709976, 0.1661018580198288, -0.30946552753448486, -1.4171034097671509, ...
def checkout ( numbr, digit ) : dval = 1 ans = 0 while dval < = numbr : nval = dval * 10 lftnumb = ( numbr / / nval ) * dval rgtnumb = numbr % dval odigit = ( numbr / / dval ) % 10 ans + = lftnumb if odigit > digit : ans + = dval if odigit = = digit : ans + = rgtnumb + 1 dval = nval return ans
[ 0.6939128637313843, 1.0497080087661743, 0.7187588214874268, -0.3997730314731598, -0.4713422954082489, -0.25926437973976135, 0.8054776787757874, 0.1251334846019745, 0.3278988301753998, -0.19089964032173157, 0.6015187501907349, 0.1683807522058487, -0.6236231923103333, 0.4786798059940338, 0...
def insert ( self, item ) : try : item = str ( item ) h = hashes ( item, self. d, self. packed ) for di in range ( self. d ) : self. store [ di ] [ h [ di ] % self. w ] + = 1 self. store [ di ] [ h [ di ] % self. w ]. self _ check ( ) except exception as e : print " exception on insert : ", e
[ -0.5601595640182495, 0.9752627611160278, 0.6087732315063477, 0.2313905656337738, -0.03696966543793678, 0.3719344139099121, 1.4649358987808228, 0.41762667894363403, 0.3122716248035431, -0.04519328847527504, -1.155128836631775, -1.2574825286865234, -1.1481503248214722, -0.360276997089386, ...
def _ get _ data _ from _ pull _ request ( data _ directory, pull _ request ) : # translate the author to a fake name real _ author = pull _ request ['createdby'] ['displayname'] if real _ author in _ fake _ authors : fake _ author = _ fake _ authors [ real _ author ] else : fake _ author = _ faker. name ( ) _ fake _ a...
[ -0.7418967485427856, 0.09147438406944275, 0.4064474105834961, -0.8496984243392944, 0.4630945920944214, -0.16524606943130493, -0.7605790495872498, 0.08383398503065109, -0.2899182140827179, 0.22036023437976837, -0.14887692034244537, 0.3118393123149872, 0.5312120318412781, 0.3285154104232788,...
def find _ connecting _ edges ( inds, network = none, am = none ) : nodes = np. array ( inds, ndmin = 2 ) # short - circuit function if nodes is an empty list if nodes. size = = 0 : return [ ] if network is not none : edge _ prefix = get _ edge _ prefix ( network ) am = dict _ to _ am ( network, weights = np. arange ( ...
[ -0.9044204354286194, -0.21152432262897491, 0.6225644946098328, 0.9171891212463379, 0.21741428971290588, 0.002309612464159727, -0.04348195344209671, 0.36264437437057495, 0.6217461824417114, 1.3456134796142578, 1.0119454860687256, 0.24426254630088806, -0.19090723991394043, 0.5405193567276001...
def get _ domain _ max ( self ) : return get _ domain _ max ( self. domain )
[ -0.7474158406257629, 0.661186695098877, 0.38008320331573486, 1.0568889379501343, 0.2948935031890869, 0.017199872061610222, -0.9397343397140503, -0.291983425617218, 0.20354077219963074, -0.8943077921867371, -0.2119595855474472, 1.6559041738510132, 0.33175891637802124, 0.39873719215393066, ...
def div ( name ) : return wrap _ html ( " ", " div ", id = name )
[ -0.60427325963974, 0.20827174186706543, 0.2741416096687317, 0.3509103059768677, -0.5177001357078552, 0.14265650510787964, -0.6379509568214417, -0.724195659160614, 0.126603364944458, -0.025360696017742157, -0.05614978075027466, -0.15518279373645782, 0.47920918464660645, 0.14181770384311676,...
def gen _ next _ floats _ range ( self, low, high, amount ) : floats = self. gen _ next _ floats ( amount ) return floats * ( high - low ) + low
[ -0.19343046844005585, 0.14888925850391388, 0.5225923657417297, 0.20189659297466278, -0.06924585998058319, 0.02915167436003685, 0.21263933181762695, -1.0122153759002686, -0.7919341325759888, -0.9173107147216797, -0.09373993426561356, 0.21279136836528778, -0.5881412625312805, 0.2120818644762...
def test _ create _ group ( self ) : url = reverse ('group - create') data = {'name':'secsi ','description':'secsi, do you speak it ','creator': self. user. id } response = self. client. post ( url + ". json ", data ) self. assertequal ( response. status _ code, status. http _ 201 _ created )
[ 0.2565840184688568, 1.0211225748062134, 0.27048978209495544, 0.8753728866577148, 0.5030637383460999, 1.330438256263733, -0.593615710735321, -0.16040992736816406, -0.8717867732048035, -1.14365553855896, -0.678049623966217, -0.20658330619335175, 0.06437627226114273, 0.36738094687461853, 0....
def short _ tl ( self ) : return self. ci _ field [ 0 ] in ( 0x61, 0x65, 0x6a, 0x6e, 0x74, 0x7a, 0x7b, 0x7d, 0x7f, 0x8a )
[ 1.306795597076416, -0.3376443088054657, 0.5100666880607605, -0.710034966468811, -0.20842546224594116, 0.3915761411190033, 0.5149032473564148, -0.4954124689102173, 0.8026426434516907, 1.1307857036590576, -0.735731840133667, -0.08630286902189255, -1.162636399269104, -0.5788325667381287, -0...
def detect _ phrases ( input _ dir, phrase _ model _ fp, phrase _ dump _ fp, common _ words, min _ count, threshold, token _ key, max _ layers = 2 ) : streamer = spacyreader ( folder = input _ dir, data _ key = get _ sub _ docs, token _ key = token _ key ) phrases = phrases ( streamer, common _ terms = common _ words, ...
[ 0.6349285244941711, 0.17563988268375397, 0.8756275773048401, 0.039077796041965485, 0.1736656278371811, -0.19522681832313538, -0.12490236014127731, -0.539877712726593, -0.21511566638946533, 0.6594969034194946, -0.7060617208480835, -0.09085030853748322, -0.8729267120361328, 0.455804049968719...
def _ _ ne _ _ ( self, other ) : return self. name! = other. name
[ -0.8049985766410828, -0.6093192100524902, 0.7949275970458984, -0.0515722893178463, -0.4580889642238617, 0.5761836767196655, -1.0919137001037598, -1.3117696046829224, -0.25774192810058594, -0.199729323387146, -1.1199740171432495, -0.15116968750953674, 0.051309891045093536, -0.12992517650127...
def _ client _ secret _ basic ( self, client _ id, client _ secret ) : auth _ data = {'identity': {'methods': ['application _ credential'],'application _ credential': {'id': client _ id,'secret': client _ secret } } } try : token = authentication. authenticate _ for _ token ( auth _ data ) except exception. error as er...
[ 0.4078001379966736, -1.175305962562561, 0.6822410821914673, -0.30817610025405884, -0.3301618695259094, -0.8164915442466736, -0.8987328410148621, -0.5058531761169434, -0.2691724896430969, 0.09614832699298859, -0.1838194727897644, 1.0773569345474243, 0.5146564841270447, -0.3268240690231323, ...
def get _ all _ actors ( ) : # vtk supports implicit functions of the form f ( x, y, z ) = constant. these # functions can represent things spheres, cones, etc. here we use a # general form for a quadric to create an elliptical data field. quadric = vtk. vtkquadric ( ) quadric. setcoefficients (. 5, 1,. 2, 0,. 1, 0, 0,...
[ 0.04118148982524872, -0.7403398156166077, 0.7616268396377563, 0.15155759453773499, -0.31121110916137695, -0.40889492630958557, 0.720761775970459, -0.20117048919200897, 0.6658754944801331, -0.4785430431365967, -0.37455999851226807, 0.1951308250427246, 0.38070833683013916, 0.0525449179112911...
def _ _ len _ _ ( self ) : return len ( self. conditionlist )
[ -0.14769768714904785, -0.3857632875442505, 0.2764352560043335, -0.8975690007209778, -0.018250882625579834, 0.3042217493057251, 0.38992196321487427, 1.348131775856018, 0.18781423568725586, -0.18834704160690308, -0.9521153569221497, -0.7587203979492188, -0.14689432084560394, 0.23551432788372...
def gastep ( self, config ) : self. updatematingpool ( ) if config = = 1 : self. newgeneration1 ( ) elif config = = 2 : self. newgeneration2 ( ) elif config = = 3 : self. newgeneration3 ( ) elif config = = 4 : self. newgeneration4 ( ) elif config = = 5 : self. newgeneration5 ( ) elif config = = 6 : self. newgeneration6...
[ -0.9771337509155273, -0.03472867235541344, 0.5532748699188232, 0.8486391305923462, 0.12170284241437912, 0.3858630657196045, 1.2087725400924683, -0.11536212265491486, -0.7173342704772949, 0.4817008078098297, -1.3198524713516235, -0.4885048568248749, -0.2100776582956314, 0.8922351002693176, ...
def match _ statistics ( ) : print ('home wins [ % ] : ', win _ statistics ( ) [ 0 ] * 100 ) print ('draws [ % ] : ', win _ statistics ( ) [ 1 ] * 100 ) print ('away wins [ % ] : ', win _ statistics ( ) [ 2 ] * 100 ) print ('- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -') print ('b...
[ 0.7677252292633057, -0.18263064324855804, 1.0874192714691162, -0.10624251514673233, -0.04857764393091202, 0.5387740731239319, 0.5999733805656433, -0.6548787355422974, -0.5383564829826355, -0.006104286760091782, -0.0924539864063263, 0.882309079170227, 1.096178412437439, 0.0831536129117012, ...
def get _ costs ( date ) : with open ('products. csv ', newline ='' ) as csv _ file : costs = 0 product _ reader = csv. dictreader ( csv _ file ) sold _ products = [ product for product in product _ reader if product ['sell _ date'] ] for sold _ product in sold _ products : if sold _ product ['sell _ date'] = = date : ...
[ -0.6264586448669434, -0.23069822788238525, 0.5454885959625244, 0.32089874148368835, 0.23969468474388123, -0.1955956369638443, 0.08709399402141571, -0.46236976981163025, 0.03021830879151821, 0.7973978519439697, -0.39618033170700073, 0.07127849757671356, 0.8553200364112854, 0.369901090860366...
def add _ edge ( self, node, neighbor, weight, timestamp ) : # assign value as a negative logarithm for bellman ford # to find a negative cycle self. graph [ node ] [ neighbor ] = [ - math. log10 ( weight ), timestamp ] # add neighbor node to graph self. add _ node ( neighbor ) # inverse conversion rate from neighbor g...
[ 0.318509042263031, 0.5139633417129517, 0.6832082867622375, -0.09910942614078522, 0.5293775796890259, 0.6007905602455139, -0.45095300674438477, 0.40677785873413086, 0.031724728643894196, 0.6814720034599304, 0.6705442667007446, 0.09191243350505829, -0.46453505754470825, 0.44440141320228577, ...
def validatecnv ( filepath ) : print ( " validating cnv file " ) total _ error = " " warning = " " cnvdf = pd. read _ csv ( filepath, sep = " \ t ", comment = " # " ) cnvdf. columns = [ col. upper ( ) for col in cnvdf. columns ] if cnvdf. columns [ 0 ]! = " hugo _ symbol " : total _ error + = " your cnv file's first co...
[ -0.3319409191608429, -0.5912805199623108, 0.8250679969787598, 0.12082410603761673, 0.1684512346982956, 0.40137627720832825, 0.4330816864967346, 0.4759591817855835, -0.6717764735221863, 0.3664163053035736, -0.556058406829834, 0.5149656534194946, 0.10962920635938644, -0.09873908013105392, ...
def count _ words ( doc ) : # normalize the string normalize _ doc =''. join ( c. lower ( ) if c. isalpha ( ) else'' for c in doc ) frequencies = { } for word in normalize _ doc. split ( ) : frequencies [ word ] = frequencies. get ( word, 0 ) + 1 return frequencies
[ 0.38719597458839417, 0.137764111161232, 0.3779589533805847, -0.2931337356567383, -0.8235517144203186, -0.3801913559436798, 0.27146434783935547, 0.7684602737426758, -0.10980155318975449, 0.08559548109769821, -0.6902217268943787, -0.11402952671051025, -0.7859337329864502, 0.7289445996284485,...
def test _ boostable ( self, * _ ) : self. asserttrue ( models. status ( privacy = " public " ). boostable ) self. asserttrue ( models. status ( privacy = " unlisted " ). boostable ) self. assertfalse ( models. status ( privacy = " followers " ). boostable ) self. assertfalse ( models. status ( privacy = " direct " ). ...
[ 0.02787032164633274, 0.9064748287200928, 0.4088650643825531, 1.2774628400802612, 1.0805622339248657, 1.0495835542678833, -0.5448845028877258, -0.3712940216064453, -0.38187432289123535, -0.29025712609291077, -1.196456789970398, 0.06310497969388962, -0.043942999094724655, 0.7771593928337097,...