text
stringlengths
25
2.19k
embedding
listlengths
768
768
def sendmessage ( self, msg, formatting = none ) : # for the moment, no smiley substitution... ( todo ) self. onmessagereceived ( msg, formatting = formatting ) message = papyon. conversationmessage ( str ( msg ), formatting ) self. _ conv. send _ text _ message ( message )
[ -0.7708535194396973, 0.15659217536449432, 0.5406739115715027, 0.17824704945087433, -0.4833141565322876, 0.01918201707303524, -0.5438148379325867, -0.09972729533910751, 1.0375503301620483, -1.0535939931869507, 0.05966668948531151, -0.47454753518104553, -0.33043745160102844, 0.98740565776824...
def test _ get _ metadata ( self ) : pass
[ 0.24136467278003693, 0.7079724669456482, 0.25772905349731445, 1.8222744464874268, 1.6556060314178467, 0.40590783953666687, 0.5504584312438965, -0.2996237576007843, -0.26664021611213684, -0.5044195652008057, -0.3977801501750946, 0.5072319507598877, -0.48021772503852844, -0.5231972336769104,...
def orderhistory ( scene, analyzer, test _ number, workbook = none, sheet _ format = none, agg _ dict = none ) : order _ history = analyzer. get _ analysis ( ) # columns _ keys = [ " datetime ", " ma " ] # columns _ values = [ k for k in global _ out [ next ( iter ( global _ out ) ) ]. keys ( ) ] if scene [ " save _ db...
[ -0.417574405670166, 0.84405118227005, 0.5781219005584717, 0.6019797921180725, 0.10740046203136444, -0.33569711446762085, 0.5719425082206726, 0.3252115845680237, -0.7411679625511169, 0.07319491356611252, 0.5133965015411377, 0.10417614877223969, 0.09263001382350922, 0.6176571846008301, 0.6...
def expand _ at ( self, state ) : node = self. states _ to _ nodes [ state ] assert node. state in self. states _ to _ nodes, " only visited states can be expanded " assert id ( self. states _ to _ nodes [ node. state ] ) = = id ( node ), " node needs to be inside the explicit graph " assert not node. expanded assert n...
[ -0.9951776266098022, 1.0616556406021118, 0.7912153005599976, -0.363653302192688, -0.4629097282886505, -0.2727152407169342, 0.5143362879753113, -0.1816428303718567, 1.4177591800689697, 0.033612221479415894, -0.18827220797538757, 0.36849603056907654, 0.6823667883872986, 0.06660622358322144, ...
def writebatchscripttemplates ( self ) : self. lxbatch _ template = " " " #! / bin / sh export atlas _ local _ root _ base = / cvmfs / atlas. cern. ch / repo / atlaslocalrootbase source $ { atlas _ local _ root _ base } / user / atlaslocalsetup. sh - - quiet alias setupatlas ='source $ { atlas _ local _ root _ base } /...
[ 0.3289715051651001, -0.5503268837928772, 0.7348228693008423, 0.0909728854894638, 0.19702059030532837, -0.2978054881095886, 0.4836311638355255, 0.2109767198562622, -0.6582573652267456, 0.007728083059191704, -0.9343764185905457, 0.13265752792358398, 0.7555506229400635, 0.5543221235275269, ...
def profile _ decorator ( func ) : @ wraps ( func ) def wrapped ( * args, * * kwargs ) : " " " allows us to wrap the call we want in other functions " " " import cprofile import pstats from io import stringio profiler = cprofile. profile ( ) text = stringio ( ) profiler. enable ( ) wrap _ func = func ( * args, * * kwar...
[ 0.6258535981178284, 0.6362013220787048, 0.5655828714370728, 0.16841809451580048, -0.5248300433158875, 0.28659823536872864, 0.14622613787651062, -0.7040177583694458, 0.4336104989051819, 0.14118929207324982, 0.5545817613601685, 0.5231261253356934, -0.24502898752689362, 0.34305456280708313, ...
def add _ affine _ constraint ( self, param, constraint _ type, a = 1. 0, b = 0. 0 ) : indices = self. parameter _ indices try : for p in param : indices = indices [ p ] except keyerror : print'warning : parameter % s does not exist in % s, skipping affine constraint - - % s, % s, % s'% ( param, self, constraint _ type...
[ -0.556026041507721, 0.34417831897735596, 0.5243402719497681, 0.877166748046875, 0.6752792000770569, -0.07183254510164261, 0.24442562460899353, -0.558698832988739, 0.08663216233253479, 1.0613784790039062, 0.3360007405281067, -0.05559208616614342, -0.30461829900741577, 0.34871768951416016, ...
def receive _ message ( self, message : messages. basemessage ) : if issubclass ( message, messages. baseactionmessage ) : if not self. validate _ action ( message ) : return super ( targettableblock, self ). receive _ message ( message )
[ -0.23599517345428467, 0.3728075325489044, 0.7103947997093201, 1.1334503889083862, 0.6622716784477234, -0.21490946412086487, -0.002768554026260972, -0.9066336154937744, -0.2601597309112549, -0.3064707815647125, 0.8375033736228943, 0.8481722474098206, -0.5870171785354614, 0.9762201905250549,...
def basepath ( request ) : if request. is _ secure ( ) : scheme ='https : / /'else : scheme ='http : / /'return scheme + request. get _ host ( ) + settings. subpath
[ -0.24327461421489716, -0.435234934091568, 0.6899599432945251, 1.345577597618103, 0.6551203727722168, 1.068210244178772, 0.06153934448957443, -0.5665711164474487, 0.35867130756378174, 0.3158561587333679, 0.8996675610542297, -0.28303900361061096, -0.142288938164711, -0.14208801090717316, -...
def checkargs ( args ) : if len ( args ) = = 2 : try : p = int ( args [ 1 ] ) except valueerror : return false return 1024 < = p < = 65535 else : print ( " incorrect # of args " ) return false
[ -0.5661550760269165, 0.5091093182563782, 0.6082025170326233, 0.5337846279144287, 0.3853711485862732, 0.8945271372795105, -0.5780773758888245, 0.1551816314458847, -0.46680548787117004, 0.5012195110321045, 0.3093571066856384, 0.20370876789093018, -1.2861891984939575, 0.10000769048929214, -...
def normalcdf ( x : float, mean : float, variance : float ) - > float : return ( 1 + math. erf ( ( x - mean ) / math. sqrt ( 2 * variance ) ) ) / 2
[ 0.42858248949050903, -0.08040246367454529, 0.21103890240192413, 0.3590070307254791, -1.510541319847107, 0.018510617315769196, -0.21138744056224823, 0.2975958287715912, -0.30666404962539673, -0.1941368281841278, 0.15475675463676453, 0.9616270065307617, -0.8636285662651062, -0.47007665038108...
def acl6perhits ( self ) : try : return self. _ acl6perhits except exception as e : raise e
[ 1.2440969944000244, 0.11339017748832703, 0.3507223129272461, 0.34843623638153076, -0.019015248864889145, 0.07228078693151474, 1.696776032447815, -0.2777043581008911, 0.22436532378196716, -0.06208229809999466, 0.17586800456047058, -0.450077086687088, 0.2779589891433716, -1.0828053951263428,...
def network _ get _ all _ by _ instance ( context, instance _ id ) : return impl. network _ get _ all _ by _ instance ( context, instance _ id )
[ -0.8323342204093933, 0.02718965895473957, 0.44419434666633606, -0.03342166543006897, 0.9344890117645264, -0.14330805838108063, -0.22869910299777985, -0.07740965485572815, 0.48619455099105835, -0.44379013776779175, -0.5107502341270447, 0.40658020973205566, 0.4446229040622711, 1.006885409355...
def _ update _ metadata ( self, output _ cube : cube, original _ units : unit ) - > none : new _ name = self. cube. name ( ). replace ( " { } _ threshold ". format ( probability _ is _ above _ or _ below ( self. cube ) ), " between _ thresholds ", ) output _ cube. rename ( new _ name ) new _ thresh _ coord = output _ c...
[ -0.23319992423057556, -1.2271878719329834, 0.5216012597084045, -0.14040616154670715, -0.8511425256729126, 0.7359098196029663, -0.12746000289916992, -0.4222162663936615, -1.4273322820663452, 0.7346972227096558, 0.5252782702445984, 1.3643851280212402, 0.4186011552810669, -1.059198021888733, ...
def _ _ init _ _ ( self, node : yaml. node ) - > none : self. yaml _ node = node
[ 0.5159310698509216, -0.09429746866226196, 0.3097534775733948, -0.7432031035423279, 0.08852830529212952, -0.5724995136260986, -0.27169927954673767, 1.379855990409851, 0.10820212960243225, -0.476465106010437, -0.405555784702301, 1.2189068794250488, 1.0622830390930176, 1.165489673614502, 0....
def gf _ monic ( f, p ) : if not f : return 0, [ ] else : lc = f [ 0 ] if lc = = 1 : return 1, f [ : ] else : return lc, gf _ div _ const ( f, lc, p )
[ 0.3483314514160156, 0.7656869292259216, 0.30930832028388977, 0.5984178781509399, 0.6964952945709229, 0.027122046798467636, -0.6335796117782593, 0.45274612307548523, -0.9107100963592529, 0.9619468450546265, -0.31689760088920593, -0.1037505716085434, -0.5949615240097046, 0.000603587424848228...
def published ( self, for _ user = none ) : if for _ user is not none and for _ user. is _ staff : return true status = self. status = = status _ published publish _ date = self. publish _ date is none or self. publish _ date < = now ( ) expiry _ date = self. expiry _ date is none or self. expiry _ date > = now ( ) aut...
[ -0.36228668689727783, -0.41624292731285095, 0.4251542091369629, 0.9291741847991943, -0.33565056324005127, 0.7727115154266357, -0.28273704648017883, 1.2849124670028687, -0.3166046738624573, -0.4243645668029785, 0.17483213543891907, 0.4658558666706085, 0.02648012526333332, 0.858224630355835,...
def validate ( self, data ) : original _ validation = super ( translationserializer, self ). validate ( data ) if not original _ validation : return original _ validation transltr = transltr ( ) try : translation = transltr. translate _ to _ en ( data ['original _ text'] ) except transltrerror : raise serializers. vali...
[ 0.004492902662605047, 0.09857465326786041, 0.4655068814754486, -0.38524699211120605, -1.4218130111694336, -0.18106678128242493, -0.6786976456642151, 0.6726760864257812, 0.15806332230567932, -0.14776787161827087, -0.5199065208435059, -1.00882887840271, -0.2074677050113678, -0.75884801149368...
def test _ contains _ middle ( ) - > none : lst = linkedlist ( ) node1 = _ node ( 1 ) node2 = _ node ( 2 ) node3 = _ node ( 3 ) node1. next = node2 node2. next = node3 lst. _ first = node1 assert ( 2 in lst ) is true
[ 0.09555626660585403, 0.006888515315949917, 0.509246289730072, 0.16994497179985046, -0.14312009513378143, 0.40898579359054565, -0.2968704104423523, -0.22179660201072693, 0.11124932765960693, 0.0011123032309114933, -0.7702360153198242, 0.35430964827537537, -1.0812547206878662, 0.013168012723...
def validate _ base _ sequence ( base _ sequence, rnaflag = false ) : return set ( base _ sequence ) < = ( rnabases if rnaflag else dnabases )
[ -0.03575805202126503, -0.1463022530078888, 0.3474382162094116, 0.1832931637763977, -0.1831035315990448, 1.110546588897705, -0.5160943269729614, -0.6442494988441467, -0.11287156492471695, 0.9626801013946533, -0.19096341729164124, 0.07343389838933945, -1.3868257999420166, 0.3634476661682129,...
def pick _ item ( self, item ) : self. item = ['needle ','tube ','ether'] self. items _ collected + = 1 print ( " vous avez ramasse : ", item )
[ -0.0010646362788975239, -0.5287401080131531, 0.028588738292455673, -0.08899319171905518, 0.6431803107261658, 0.4228879511356354, 0.32689058780670166, -0.4521072506904602, -0.017743542790412903, 0.26143163442611694, -1.360127329826355, 0.2714516222476959, 0.003841896541416645, -0.2796767950...
def string _ as _ list ( strng ) : lst = [ ] if type ( strng ) = = type ('' ) : try : result = eval ( strng ) if type ( result ) = = type ( [ ] ) : lst = result elif result : lst. append ( str ( result ) ) except exception : strng _ split = strng. split ( ',') for data in strng _ split : if data. strip ( ) : lst. appen...
[ 0.3466838002204895, -0.758899986743927, 0.46533337235450745, -0.6738056540489197, -0.4367309808731079, 0.07474136352539062, -0.6964552402496338, 1.0156880617141724, 1.3005611896514893, 0.06973417103290558, -0.4438307583332062, 0.9980348348617554, -0.300880491733551, 0.35150566697120667, ...
def sayname ( first, last ) : print ('{ } { } '. format ( first, last ) )
[ 0.9253993034362793, -1.056993007659912, 0.7634032964706421, -0.8767374157905579, 0.13095861673355103, 0.06222975626587868, -1.669111967086792, -0.8162978887557983, -1.6455941200256348, 0.444184273481369, -0.22165155410766602, 1.2977970838546753, -0.38715142011642456, 0.3555157780647278, ...
def response ( self ) : lemma = self. extract _ components ( ) return self. generate _ random _ response ( lemma )
[ -0.6802173256874084, -1.0197956562042236, 0.5020605325698853, -0.5698400735855103, 0.20520833134651184, -0.0028363231103867292, -0.31373128294944763, 0.7803100347518921, 0.9624786376953125, 0.2645983397960663, -0.06103148311376572, -0.6620276570320129, -0.8947124481201172, -0.3378152251243...
def close ( self ) : self. connection. close ( ) self. connection = none
[ 0.13603220880031586, -1.2827444076538086, 0.3647211492061615, -0.7088425159454346, 0.2105511873960495, 0.05811648815870285, -0.33470433950424194, 0.2908179759979248, -0.9191093444824219, -1.088712453842163, 0.43817877769470215, 0.4369112253189087, -1.1386616230010986, 0.8917789459228516, ...
def plotinterval ( time, upper, lower, color ='black') : if time is none : plt. plot ( upper,'- - ', color = color ) plt. plot ( lower,'- - ', color = color ) else : plt. plot ( time, upper,'- - ', color = color ) plt. plot ( time, lower,'- - ', color = color )
[ 0.7907766103744507, -0.21085159480571747, 0.722234308719635, -0.23991572856903076, 0.2274637371301651, 0.7126321196556091, -0.7169843912124634, 0.10175380110740662, -0.30309852957725525, 0.07988370954990387, -0.048810865730047226, 1.3567065000534058, -0.5568023324012756, 0.710308313369751,...
def pfam _ for _ pf ( self, dataframe ) : indexy = dataframe. index for i in indexy : dataframe = dataframe. rename ( index = { i : i [ : 2 ]. upper ( ) + i [ 4 : ] } ) dataframe ['pvalue'] = dataframe ['pvalue']. map ('{ :. 3e } '. format ) dataframe ['in what percentage'] = dataframe ['in what percentage']. map ('{ :...
[ -0.2752554416656494, -0.15695835649967194, 0.6831730008125305, -0.372222900390625, 0.47763484716415405, -0.09882516413927078, 0.1580972522497177, -0.19023865461349487, -0.30081868171691895, 0.100901760160923, 0.978416919708252, 0.0188746377825737, 0.5220837593078613, 0.40874624252319336, ...
def getinittarget ( sc, regdict, rank = 1, initcc = 90 ) : # get params data = regdict ['data'] regdict ['initcc'] = initcc length = regdict ['data']. shape [ 0 ] y = regdict ['initclusternums'] clusters = regdict ['initclusters'] maxcluster = np. argpartition ( y, - rank ) [ - rank : ] [ 0 ] maxindex = np. where ( clu...
[ 0.34025096893310547, 0.26061350107192993, 0.7917696833610535, -0.4424552619457245, 0.6409069895744324, -0.5105530023574829, 0.2365797460079193, 0.2645811140537262, -0.6364443302154541, 0.6415773630142212, 0.09861378371715546, 1.389978051185608, -0.6258386969566345, 0.45874181389808655, 1...
def _ _ init _ _ ( self, method, url _ match, path, json = none, text = none, status _ code = 200, headers = none, max _ calls = - 1, * * kwargs ) : super ( ). _ _ init _ _ ( * * kwargs ) self. method = method self. url _ match = url _ match self. path = path self. max _ calls = max _ calls self. headers = self. defaul...
[ -0.11838138848543167, 0.6239256858825684, 0.9156439900398254, -0.12993782758712769, -0.9252925515174866, -1.0062578916549683, -0.6243387460708618, 0.025064894929528236, 0.492660790681839, -0.6348598003387451, -0.3968895971775055, 0.009895652532577515, -0.13751022517681122, 0.39423948526382...
def get _ list _ of _ genes _ in _ neigh ( self, list _ of _ genes, index _ list ) : list _ of _ genes _ in _ neigh = [ ] for pfam _ domain in index _ list : list _ of _ genes _ in _ neigh. append ( list _ of _ genes [ pfam _ domain ] ) return list _ of _ genes _ in _ neigh
[ 0.012841133400797844, -0.34538668394088745, 0.6348663568496704, 1.386539101600647, 0.05282805114984512, 0.1886909157037735, -1.1211811304092407, 0.07156406342983246, -0.560258150100708, -0.548467218875885, -0.8253220319747925, 1.0909894704818726, -0.5032973289489746, 0.5294316411018372, ...
def test _ msda ( finetune _ lr = 0. 1, pretraining _ epochs = 200, pretrain _ lr = 0. 01, training _ epochs = 1000, dataset ='mnist. pkl. gz ', batch _ size = 16 ) : datasets = load _ data ( dataset ) train _ set _ x, train _ set _ y = datasets [ 0 ] valid _ set _ x, valid _ set _ y = datasets [ 1 ] test _ set _ x, te...
[ 0.0651913434267044, 0.7615510821342468, 0.8359056711196899, -0.025286482647061348, 0.033061277121305466, -0.03176147863268852, 0.967225193977356, 0.49823516607284546, 0.7431113123893738, -0.18264177441596985, -0.6055951118469238, 0.4276653230190277, 0.1852341592311859, 0.23126478493213654,...
def print _ groups ( self, out : io. textiobase = sys. stdout ) - > none : try : groups = self. make _ groups ( ) for student in range ( 1, self. num _ students + 1 ) : if student in groups [ 0 ] : group = 1 elif student in groups [ 1 ] : group = 2 else : raise exception ( f'student { student } is not listed in any gro...
[ -1.0694429874420166, 0.09265720844268799, 0.4357047975063324, 0.5614629983901978, -0.16622969508171082, -0.058948151767253876, 0.7194755673408508, -0.44123998284339905, -1.1659437417984009, -0.08616405725479126, 0.576194167137146, 0.6520442366600037, -0.3886094093322754, 0.3286391496658325...
def _ handler _ autosample _ acquire _ status ( self, * args, * * kwargs ) : next _ state = none result = [ ] with self. _ pause _ logging ( ) : self. _ handler _ command _ acquire _ status ( * args, * * kwargs ) return next _ state, ( next _ state, result )
[ -0.8219529390335083, -0.7525971531867981, 0.29473212361335754, 0.5214560627937317, 0.22310633957386017, -0.6391697525978088, 0.4489232897758484, -0.35183748602867126, -0.03427525609731674, -0.5174760818481445, -0.8858593106269836, 0.026132704690098763, 0.16134653985500336, 0.37827250361442...
def expire _ messages _ for _ all _ subscription ( self, stream, expire _ time, local = false ) : if self. persistent : url _ endpoint ='/ streams / persistent / stream / { } / all _ subscription / expiremessages / { }? local = { }'\. format ( stream, expire _ time, local ) # else : # url _ endpoint ='/ streams / non -...
[ 0.060340993106365204, -0.25341132283210754, 1.0200819969177246, 0.544719934463501, 0.4890347123146057, -0.6575365662574768, -0.7179833650588989, -0.23609156906604767, -0.06337053328752518, 0.4108414947986603, 0.009026841260492802, 0.6737794280052185, -0.9113671183586121, 1.5388435125350952...
def cosmtauscreen ( zg, e = 1. 0, dist = dust. dustspectrum ( ), scatm = ss. scatmodel ( ) ) : eg = e * ( 1 + zg ) kappa = ss. kappascat ( e = eg, scatm = scatm, dist = dist ). kappa return dist. md * kappa
[ -0.5962129235267639, -0.42099371552467346, 0.3549525737762451, 0.05363943427801132, -0.9858625531196594, 0.009483474306762218, 0.23987647891044617, 0.017335832118988037, -0.016442570835351944, 0.23258325457572937, 0.44066882133483887, 0.4022016227245331, 0.5741281509399414, 0.9672147035598...
def _ await _ active _ commitment ( self, commitment : capacitycommitment ) - > capacitycommitment : start = time. time ( ) deadline = start + 60 now = start while commitment. state! = commitment. state. active : if now > deadline : self. deactivate ( ) log. error ('commitment % r in state % r after %. 3fs seconds.'' c...
[ 0.3905203938484192, -1.428389310836792, 0.7480192184448242, -0.9516915678977966, -0.6124207377433777, -0.5574443340301514, 0.19893676042556763, -0.49598467350006104, -0.4669550359249115, 0.6852389574050903, 0.26114872097969055, -0.4077983796596527, -0.11928751319646835, -0.9196373224258423...
def seq2point ( input _ window _ length ) : input _ layer = tf. keras. layers. input ( shape = ( input _ window _ length, ) ) reshape _ layer = tf. keras. layers. reshape ( ( 1, input _ window _ length, 1 ) ) ( input _ layer ) conv _ layer _ 1 = tf. keras. layers. convolution2d ( filters = 30, kernel _ size = ( 10, 1 )...
[ 0.07333526015281677, -0.802401065826416, 0.8700805306434631, -0.007804210763424635, -0.6223340034484863, 0.09485423564910889, 0.39416539669036865, 0.00810853112488985, 0.2904382348060608, 1.042385458946228, -0.515861451625824, -0.0064916969276964664, -0.033406078815460205, -0.1262915432453...
def sling _ servlet _ methods ( self, sling _ servlet _ methods : confignodepropertystring ) : self. _ sling _ servlet _ methods = sling _ servlet _ methods
[ 0.8273663520812988, -0.23402534425258636, -0.242098867893219, 0.5848290324211121, -0.9187175631523132, 0.8735809326171875, -0.008365526795387268, -0.17030341923236847, 0.2643950879573822, -0.7796278595924377, -0.932228147983551, -0.6942100524902344, 0.419664591550827, 0.23702888190746307, ...
def generator _ formatter ( generator, pp, cycle ) : for i, item in enumerate ( generator ) : pp. text ( repr ( item ) ) pp. breakable ( ) # prevent iterating forever... if i > 128 : pp. text ( "... " ) pp. breakable ( ) pp. text ( " too many items to display " ) return
[ -0.8919399976730347, -0.09148259460926056, 0.47218260169029236, -0.8613697290420532, -0.9025157690048218, 0.4328121542930603, 0.5075753331184387, 0.11830858886241913, -0.47964397072792053, 0.4129858613014221, 0.9945322871208191, -0.48948487639427185, -0.11701036989688873, 0.666605532169342...
def varslike ( self, pattern = none, by = none, engine = " re ", within = none ) : if within is none : within = self. variables search _ in = within. get ( by, within. index ). fillna ( " " ) if ( engine = = " regex " ) or ( engine = = " re " ) : import re mask = [ ( re. search ( pattern, candidate ) is not none ) for ...
[ -1.1364610195159912, -0.11905191093683243, 0.6629485487937927, -0.30808737874031067, -0.16428214311599731, -0.5922128558158875, -0.3120404779911041, -0.3412838280200958, 0.35039934515953064, 0.011170996353030205, 0.3388668894767761, 0.7817314863204956, -1.0559049844741821, -0.1291509121656...
def _ _ init _ _ ( self, pid, _ list, priority, parent = none ) : self. pid = pid self. status = { " type " : " ready ", " list " : _ list } # _ list can be an instance of readylist or rcb self. creation _ tree = { " parent " : parent, " children " : [ ] } self. other _ resources = { } # a dictionary representing resou...
[ 0.15768378973007202, 0.11320227384567261, 0.6675313711166382, -0.047605715692043304, -0.25822728872299194, 0.4649966359138489, -0.8865259289741516, 0.7946438789367676, 0.6866509318351746, -0.5128997564315796, -1.1380810737609863, -0.9688054919242859, -0.364492803812027, 1.3830053806304932,...
def add _ celery _ chord ( self, chord, dependencies ) : body, header = inspect. get _ chord _ tasks ( chord ) header _ depend _ on = [ ] for task in header : task _ dependencies = self. add _ celery _ canvas ( task, dependencies ) header _ depend _ on. extend ( task _ dependencies ) # body needs to depend on dependenc...
[ -0.21188558638095856, -0.13651175796985626, 0.8429643511772156, 0.037954267114400864, -0.5245673060417175, 0.2189955860376358, 0.32197850942611694, -0.4682973027229309, 0.18069037795066833, 0.10043949633836746, -0.7332589626312256, -0.205102801322937, 0.4893968105316162, 0.7547241449356079...
def job ( algorithm, train _ file _ path, test _ file _ path, full _ path, n _ trials, timeout, lcs _ timeout, export _ hyper _ sweep _ plots, instance _ label, class _ label, random _ state, cvcount, filter _ poor _ features, do _ lcs _ sweep, nu, iterations, n, training _ subsample, use _ uniform _ fi, primary _ metr...
[ 0.741197943687439, 0.5771734118461609, 0.572722315788269, 0.4409136176109314, 0.20831722021102905, 0.7041657567024231, 0.43100783228874207, 1.1906561851501465, -0.6655930876731873, -0.1754457801580429, -0.16349995136260986, 0.33789482712745667, 0.7888124585151672, -0.1357177197933197, -0...
def itksmoothingrecursivegaussianimagefilterif3if3 _ cast ( * args ) : return _ itksmoothingrecursivegaussianimagefilterpython. itksmoothingrecursivegaussianimagefilterif3if3 _ cast ( * args )
[ 0.4312014877796173, 1.5370469093322754, 0.1938343048095703, -0.9464872479438782, -0.0049970499239861965, 0.812242865562439, -0.18592149019241333, -1.1614978313446045, 0.44135355949401855, 0.43453583121299744, 0.47435399889945984, 0.21639175713062286, -1.376908540725708, 1.3549946546554565,...
def generate _ rows _ and _ columns ( self ) : print ( " grouping keys in rows and columns... " ) # for each key in the board, determine the x, y of the center of the key. this determines # the row / column a key is in keysinrow = [ 0 ] * max _ rows for index, key in enumerate ( self. keyboard. keys ) : centery = key. ...
[ -0.28496241569519043, 0.9067927002906799, 0.42842012643814087, -0.5186012387275696, -0.11844563484191895, -0.4567776024341583, 0.7983688712120056, 0.7139208316802979, -0.2459585964679718, 0.20205147564411163, 0.24776065349578857, -0.7527526617050171, -0.27650654315948486, 0.738476336002349...
def get _ all _ hashtags _ and _ links ( tweet = tweet ) : m = re. compile ( r'http \ s + | # \ w +') return m. findall ( tweet )
[ 0.48377954959869385, -0.348088800907135, 0.5037645101547241, 0.4850270450115204, 0.56453537940979, -0.19734136760234833, -0.34937381744384766, 0.6773849129676819, -0.14799968898296356, -0.6834267973899841, -0.42237377166748047, -0.11574583500623703, -0.4150811731815338, 1.637749433517456, ...
def get _ nearest _ neighbor _ degree ( network ) : degrees = [ ] # to be replaced nearest _ neighbor _ degrees = [ ] # to be replaced degrees _ d = nx. degree ( network ) nnd _ dic = nx. average _ neighbor _ degree ( network ) for node in network : degrees. append ( degrees _ d [ node ] ) nearest _ neighbor _ degrees....
[ -0.2324337363243103, 0.11245118826627731, 0.15615087747573853, 0.2336980402469635, -0.874500036239624, 0.07804587483406067, 0.5131284594535828, -0.263558566570282, -0.5839554667472839, 0.796385645866394, -0.825016438961029, -0.6084563136100769, 0.04324101656675339, 1.424520492553711, -0....
def loadmat ( path, var _ name = none, ret _ names = false ) : raw _ dict = spio. loadmat ( path ) if var _ name is none : values = [ ] names = [ ] for val in raw _ dict. items ( ) : if val [ 0 ] = ='_ _ globals _ _'or val [ 0 ] = ='_ _ header _ _'or val [ 0 ] = ='_ _ version _ _': continue values. append ( val [ 1 ] )...
[ -0.1347542256116867, -0.613392174243927, 0.6418077945709229, -0.9389806389808655, -0.9999812841415405, -0.14539113640785217, -0.7608652710914612, 0.2256384640932083, -0.47328126430511475, 0.5881189107894897, 0.11246763914823532, -0.037457603961229324, -0.18563584983348846, 0.34336087107658...
def scoring ( self ) - > int : return - 100 if self. lose ( ) else 0
[ -0.96937495470047, -0.17731493711471558, 0.795888364315033, 0.14012323319911957, 0.5441814064979553, 0.25554805994033813, 0.47809094190597534, -1.0584876537322998, 0.16010954976081848, 1.0459585189819336, 0.29362931847572327, -0.5230656862258911, -0.11183594167232513, 0.01457144320011139, ...
def seam _ names ( self ) : rv = { } for b in self. bases. values ( ) : for s in b. seams. keys ( ) : rv [ s ] = true return rv
[ -0.8139201402664185, -0.4300698935985565, 0.6701796054840088, -0.70382159948349, -0.8963107466697693, 0.6141053438186646, -0.9143565893173218, -0.609951376914978, 0.009616544470191002, 0.7214309573173523, -1.2160289287567139, 0.5782419443130493, 0.2977598011493683, 0.8718376755714417, -1...
def testtotfindchromeuprevcandidate ( self ) : stable _ ebuilds = self. _ getstableebuilds ( ) candidate = cros _ mark _ chrome _ as _ stable. findchromeuprevcandidate ( stable _ ebuilds, constants. chrome _ rev _ tot, self. sticky _ branch ) self. assertequal ( candidate. ebuild _ path, self. tot _ stable )
[ 0.09791789948940277, 0.02930849976837635, 0.37936171889305115, 0.25490471720695496, 0.7596482038497925, 0.31168943643569946, 1.0113012790679932, 0.02234005741775036, -0.4402725100517273, -0.04910661280155182, -0.039279211312532425, 0.3767637014389038, -0.15011195838451385, -0.0798124670982...
def handle _ get _ initial _ state ( req ) : global mazeinfo initial _ state = mazeinfo [ 0 ] return getinitialstateresponse ( initial _ state [ 0 ], initial _ state [ 0 ], initial _ state [ 2 ], initial _ state [ 3 ] )
[ 0.1951793134212494, -1.0276107788085938, 0.3326336145401001, 0.6879324913024902, 0.6124279499053955, -0.5857380628585815, 0.7744926810264587, -0.05971810594201088, 0.7036975622177124, -0.15557904541492462, -0.39057931303977966, -0.5743225812911987, -0.9570755362510681, 0.029461616650223732...
def print _ confmat ( true _ labels, predicted _ labels, label _ names = none ) : import sys output _ str = " [ confusion matrix ] " if label _ names is not none : n _ labels = len ( label _ names. keys ( ) ) else : n _ labels = true _ labels. size if true _ labels. size! = predicted _ labels. size : sys. exit ('dimens...
[ -0.26745107769966125, -0.9200857281684875, 0.7497109770774841, -0.7107989192008972, -0.29641616344451904, 0.34102022647857666, -0.5267415046691895, 0.39627471566200256, -1.19960355758667, 0.5519119501113892, 0.997096598148346, 0.22552607953548431, 0.08815785497426987, -0.0378706157207489, ...
def _ get _ activate ( self ) : return self. _ _ activate
[ -0.5746929049491882, -0.9761101007461548, 0.5080419778823853, -0.10151009261608124, 0.14222094416618347, -0.22635707259178162, 0.09423394501209259, -0.48058822751045227, -0.35077908635139465, -0.14259880781173706, -0.08861415088176727, 0.5120301246643066, -0.7163368463516235, -1.4364936351...
def test _ blocked _ port ( self ) - > none : self. lookups [ " matrix. org " ] = [ ( ipv4address, " 10. 1. 2. 3 " ) ] bad _ url = quote ( " http : / / matrix. org : 8888 / foo " ) good _ url = quote ( " http : / / matrix. org / foo " ) channel = self. make _ request ( " get ", " preview _ url? url = " + bad _ url, sho...
[ -0.028526252135634422, 1.034091591835022, 0.7105768322944641, -0.509447455406189, 0.46260806918144226, 0.002959110774099827, 0.19970552623271942, -0.5469143390655518, -0.24467463791370392, -0.4332737624645233, -0.02916484884917736, 0.6670387983322144, -0.0273190438747406, -0.33513262867927...
def consumer ( cond ) : logging. debug ('starting consumer thread') t = threading. currentthread ( ) with cond : cond. wait ( ) logging. debug ( " resource is available to consumer " )
[ 1.049318552017212, -0.7172482013702393, 0.4853920042514801, 0.25643762946128845, -0.014895284548401833, 1.1796140670776367, 0.6178843975067139, 0.7606090307235718, -0.7474998235702515, 0.7247630953788757, 0.18158257007598877, 0.510641872882843, 0.37532302737236023, 0.4113616347312927, 0....
def handle _ auth _ error ( ex ) : response = jsonify ( ex. error ) response. status _ code = ex. status _ code return response
[ -1.2325259447097778, -1.114776372909546, 0.4954840838909149, 0.4375978410243988, -0.7668970823287964, -0.8128532767295837, -0.3844994306564331, 0.941320538520813, 1.2283856868743896, 0.46932193636894226, -0.4780522584915161, 0.42128685116767883, 0.633429229259491, -0.8753462433815002, 1....
def projective _ forward _ homography ( src _ images, intrinsics, pose, depths ) : n _ layers, n _ batch, height, width, _ = src _ images. get _ shape ( ). as _ list ( ) # format for planar _ transform code : # rot : relative rotation, [..., 3, 3 ] matrices # t : [ b, 3, 1 ], translations from source to target camera (...
[ -0.2640085816383362, 0.5358606576919556, 0.7699418663978577, 0.16042909026145935, -0.421167254447937, 0.34471940994262695, 0.20554444193840027, 0.28000542521476746, 0.0700131431221962, 0.7140877842903137, 0.2143852859735489, -0.3287336528301239, -0.013900920748710632, -0.3505062758922577, ...
def start ( self ) : self. fen _ buffer = [ ] self. moves _ buffer = [ ] self. scores _ buffer = [ ] self. idx = 0 with processpoolexecutor ( max _ workers = 7 ) as executor : files = find _ pgn _ files ( self. config. resource. play _ data _ dir ) print ( files ) for filename in files : games = get _ games _ from _ fi...
[ -0.4980040490627289, 0.3056381940841675, 0.7714119553565979, 0.24782291054725647, 1.6537954807281494, 0.4368807375431061, 0.6214019656181335, -0.6397144794464111, -1.0435277223587036, -0.31753474473953247, -0.29978758096694946, 0.6408857107162476, -0.35999879240989685, -0.12511494755744934...
def isempty ( self ) : if self. head. next = = none : return true else : return false
[ -1.0701732635498047, -0.07406121492385864, 0.5113784670829773, -0.1500564068555832, 0.7118070721626282, 0.09580589085817337, -0.4877621531486511, 0.454722136259079, 0.3096681237220764, -0.3116445243358612, -0.5540223121643066, 0.5248901844024658, -1.2145498991012573, 0.49403953552246094, ...
def masks _ to _ flows ( masks ) : if masks. ndim > 2 : lz, ly, lx = masks. shape mu = np. zeros ( ( 3, lz, ly, lx ), np. float32 ) for z in range ( lz ) : mu0, _ = masks _ to _ flows ( masks [ z ] ) mu [ [ 1, 2 ], z ] + = mu0 for y in range ( ly ) : mu0, _ = masks _ to _ flows ( masks [ :, y ] ) mu [ [ 0, 2 ], :, y ] ...
[ 0.1416940987110138, -0.6017173528671265, 1.0136922597885132, 0.4851394295692444, -0.17595471441745758, -0.3086245059967041, 1.2047876119613647, -0.6161060333251953, 0.8001410365104675, 0.3403809070587158, 0.13749629259109497, 0.34329745173454285, 0.16484011709690094, 0.09133639186620712, ...
def match ( self, * args ) : if self. fall or not args : return true elif self. value in args : # changed for v1. 5, see below self. fall = true return true else : return false
[ -0.5369805097579956, -0.35250210762023926, 0.5797066688537598, 0.9446763396263123, -0.10514672845602036, 0.9475805759429932, 0.3053377866744995, -0.16327063739299774, -0.31880858540534973, -0.4008420705795288, 0.013384535908699036, -1.0735313892364502, -1.4796974658966064, 0.89926528930664...
def enumerate _ layer _ fields ( self, layer ) : descriptor = self. get _ descriptor _ for _ layer ( layer ) return [ field ['name'] for field in descriptor ['fields'] ]
[ -0.9271414279937744, 0.10110829770565033, 0.6262482404708862, -0.9695517420768738, 0.4167865514755249, -0.013211768120527267, -0.9533671140670776, -0.33841821551322937, 0.027128098532557487, 0.49147480726242065, -1.4022448062896729, 0.27786773443222046, 0.49315181374549866, -0.020379990339...
def _ _ init _ _ ( self, id = none, domain _ name = none, fnc = increment _ by _ one, init _ val = none ) : self. _ db = none self. _ value = none self. last _ value = none self. domain _ name = domain _ name self. id = id if init _ val is none : init _ val = fnc ( init _ val ) if self. id is none : import uuid self. i...
[ -0.5139069557189941, 0.27207812666893005, 0.6262651085853577, 0.4280473589897156, 0.22726915776729584, -0.5164340734481812, -0.242543026804924, 0.35973259806632996, -0.2652324140071869, -1.201254963874817, -0.634393572807312, 0.2719682455062866, 0.814462423324585, 0.37469372153282166, 0....
def resource _ group _ name ( self ) - > pulumi. input [ str ] : return pulumi. get ( self, " resource _ group _ name " )
[ 0.2080364227294922, 0.7879703044891357, 0.1602003425359726, -0.6612582802772522, -0.7099349498748779, 0.8718096017837524, 0.32899659872055054, 0.07465369999408722, -0.2563268840312958, 0.20640063285827637, 0.7173269391059875, 0.5904358625411987, 0.28491759300231934, -0.13593041896820068, ...
def find _ nearest _ index ( array, value ) : return np. abs ( array - value ). argmin ( )
[ -0.5138184428215027, -1.2722612619400024, 0.4527720808982849, 0.5632012486457825, -1.8277920484542847, 0.7570133805274963, -0.07377064973115921, -1.132596731185913, -0.24622729420661926, 0.5256472826004028, 0.9399040937423706, 0.7367627024650574, -0.23366008698940277, 0.7825249433517456, ...
def is _ valid ( self ) : for dart, alpha _ 0 _ of _ dart in self. alphas [ 0 ]. items ( ) : if dart = = alpha _ 0 _ of _ dart : return false # no fixed point if dart! = self. alpha ( 0, alpha _ 0 _ of _ dart ) : return false # alpha _ 0 is an involution for dart, alpha _ 1 _ of _ dart in self. alphas [ 1 ]. items ( ) ...
[ -0.6013333797454834, -0.5627797245979309, 0.8006107211112976, -0.2783447206020355, -0.5343031883239746, 0.544529378414154, 0.26155343651771545, 0.7769863605499268, 0.14825738966464996, -0.3829958438873291, -0.5148469805717468, -0.6090623736381531, -0.7130406498908997, 0.7206718325614929, ...
def get _ station _ sensors ( station _ ids = none, sensor _ ids = none, resolutions = none ) : # pra & sensornums = 76 & dur _ code = h & start = 2019 - 02 - 02 & end = 2019 - 02 - 04 station _ sensors = { } if station _ ids is none : station _ ids = get _ stations ( ). index for station _ id in station _ ids : url ='...
[ -0.9107115864753723, -0.048332683742046356, 0.41961079835891724, 0.34592148661613464, -0.14545711874961853, -0.2266712337732315, -0.3927024304866791, -0.3089335560798645, -0.27137812972068787, 0.5722855925559998, -0.45017117261886597, -0.03398537635803223, -0.14548221230506897, 0.404963493...
def domain _ name ( self ) - > str : return self. _ values. get ('domain _ name')
[ -0.025086654350161552, 0.5620005130767822, 0.21846507489681244, 0.7677412629127502, 0.5914684534072876, 0.7482599020004272, -0.31162312626838684, 0.23197780549526215, 0.1583828628063202, -0.543845534324646, -0.1461729109287262, 0.9380306601524353, 0.7991217970848083, -0.2260352224111557, ...
def get _ prod _ info ( self, product ) : return self. db. query ( product. select _ sql _ query _ info )
[ -0.6485006809234619, 0.2387373000383377, 0.3454280197620392, 0.6879420876502991, 0.07853005081415176, 0.31282442808151245, -0.4156726598739624, -1.2121204137802124, -0.11980156600475311, 0.092574343085289, -0.25399619340896606, -0.24718891084194183, -0.1768817901611328, -0.5111575126647949...
def test _ deny _ closing _ for _ task _ of _ others ( self ) : task2 = taskfactory ( creator = self. profile2. user, completed _ by = self. user, status = task. status. completed, visibility = task. visibilities. public ) url = reverse ( " tasks : close _ task ", kwargs = { " pk " : task2. pk } ) response = self. clie...
[ 0.13351500034332275, 1.017579436302185, 0.9431111216545105, 1.4061335325241089, 0.014504325576126575, 1.6510757207870483, 1.6375080347061157, -0.20930565893650055, -0.7936858534812927, -0.12520289421081543, -0.24372994899749756, -0.24807167053222656, 0.3340001404285431, 0.8011597394943237,...
def df _ 2 _ ambiguous _ sequence ( df _ in, cov _ df = none ) : assert'freq'in df _ in. columns # select calls with freq > 15 % df _ in = df _ in [ df _ in ['freq'] > = 0. 15 ] # aggregate calls for the same position all _ nt = df _ in. groupby ( ['pos'] ). agg ( {'mut': lambda x :''. join ( sorted ( x ) ) } ) # creat...
[ -0.43053460121154785, 0.08986695855855942, 0.8364635705947876, -0.08303116261959076, 0.5069002509117126, -0.5285360813140869, -0.43398359417915344, -0.5661900043487549, 0.4004041850566864, 0.7289237976074219, 0.22598528861999512, 0.020831512287259102, 0.6102084517478943, -0.271618574857711...
def currently _ selected ( self ) : return self. browser. text ( self. button _ locator, parent = self )
[ -0.2907539904117584, -1.7325831651687622, 0.4892256557941437, 0.44218909740448, 0.052236221730709076, -0.13167452812194824, 0.9141280651092529, -0.7783446907997131, 0.8087239265441895, 0.016261741518974304, 0.06855744123458862, -0.00871985498815775, 0.07299215346574783, -0.7182133197784424...
def select _ node _ in _ tree ( self, node ) : # # gets selected _ node instance in treeview selected _ node = self. pcd _ tree. nodes _ dict [ node. legacyid ] # # opens closed treeviewnodes self. cascade _ tree _ nodes ( selected _ node ) # # selects node in treeview self. treeview. select _ node ( selected _ node ) ...
[ -0.4132387042045593, -0.7044579386711121, 0.4694060683250427, -0.582520604133606, -0.6035010814666748, 0.3522827923297882, -0.1557619273662567, 0.23660731315612793, 0.4718955457210541, -0.578145444393158, 0.4448702037334442, 1.1253249645233154, 0.036201026290655136, 0.25688350200653076, ...
def viterbi ( observation, emission, transition, initial ) : try : t = observation. shape [ 0 ] n, _ = emission. shape viterbi = np. empty ( ( n, t ) ) backpointer = np. empty _ like ( viterbi ) for t in range ( t ) : for j in range ( n ) : idx _ obs = observation [ t ] if t = = 0 : viterbi [ :, t ] = initial. t * emis...
[ 0.09102039784193039, -1.2117546796798706, 0.7790095210075378, 0.1914837509393692, 0.04852072522044182, -0.028704557567834854, -0.48534518480300903, 0.5990920662879944, -0.39560994505882263, 1.2337536811828613, 0.036175452172756195, 0.153012216091156, -0.3751586377620697, -0.697326421737670...
def test _ config ( self ) - > none : self. assertequal ( self. provider. _ callback _ url, callback _ url ) self. assertequal ( self. provider. _ client _ auth. client _ id, client _ id ) self. assertequal ( self. provider. _ client _ auth. client _ secret, client _ secret )
[ -0.41315561532974243, 0.27714547514915466, 0.049226999282836914, -0.069132961332798, 0.9843137860298157, 0.5432018637657166, 0.17832328379154205, -0.06273697316646576, 0.4988788068294525, -0.033042747527360916, -0.8723160028457642, -0.0371146984398365, -0.08867169916629791, 0.6204058527946...
def backward ( info : dict [ str, ndarray ], weights : dict [ str, ndarray ] ) - > dict [ str, ndarray ] : # derivative of the mse at its input p dldp = - 2 * ( info ['y'] - info ['p'] ) # partial derivatives of the bias addition operation dpdn = np. ones _ like ( info ['n'] ) dpdb = np. ones _ like ( weights ['b'] ) #...
[ 0.14862321317195892, 0.14013177156448364, 0.951687753200531, -0.973461389541626, -0.7235749959945679, -0.09074848890304565, -0.1525641530752182, 0.2868589460849762, -0.7935162782669067, 0.5987001657485962, -0.24685066938400269, 0.4896012544631958, -0.24193499982357025, 0.8536335825920105, ...
def smash ( self ) - > bool : if self. level = = 0 or self. level = = self. max _ depth : return false else : new _ upper _ left = random _ init ( self. level + 1, self. max _ depth ) new _ upper _ right = random _ init ( self. level + 1, self. max _ depth ) new _ low _ right = random _ init ( self. level + 1, self. ma...
[ -1.1493521928787231, 0.5744125843048096, 0.8303619027137756, -0.24420106410980225, -0.5040443539619446, 0.3717089891433716, 0.7050037980079651, 0.14331847429275513, -0.13495391607284546, -0.5822879076004028, -1.4562677145004272, -0.651340663433075, -0.6449775099754333, 0.12490621209144592,...
def fit ( self, x, y = none ) : x = check _ array ( x, ensure _ 2d = false ) validate _ params ( self. get _ params ( ), self. _ hyperparameters ) # reshape filter function values derived from functiontransformer if x. ndim = = 1 : x = x [ :, none ] return self. _ fit ( x )
[ -0.4103415310382843, 0.2657214105129242, 0.49291232228279114, 0.8968957662582397, -0.3241908848285675, -0.7511462569236755, -0.26597338914871216, -0.3731207847595215, -0.21523918211460114, -0.6634650826454163, -0.48538675904273987, 0.8505975604057312, -0.010232127271592617, 0.4109708666801...
def wtrs ( self, alias, timeout ='none ', unity ='none') : if ( timeout = ='none'and unity = ='none') : line _ to _ print = " wtrs [ { 0 } ] ". format ( alias ) # + alias + " \ n " self. scn _ line _ list. append ( line _ to _ print ) else : line _ to _ print = " wtrs [ { 0 } ] ( { 1 } { 2 } ) ". format ( alias, str ( ...
[ -0.034209005534648895, 0.07105842977762222, 0.5641626119613647, -1.0427086353302002, 0.9426589012145996, -0.42556649446487427, -0.5869900584220886, 0.3518100082874298, -0.07240831106901169, 0.4497343897819519, 0.16194863617420197, 0.8852282762527466, -0.25210294127464294, 0.544005751609802...
def handle ( req ) : data = json. loads ( req ) host = data. get ( " host " ) port = data. get ( " port ", 443 ) if host is none : raise exception ( " host required " ) username = read _ secret ( " vcenter _ account " ) password = read _ secret ( " vcenter _ password " ) template _ name = data. get ( " template " ) nam...
[ -0.4361411929130554, -0.3489837348461151, 1.0848289728164673, 0.34499314427375793, -0.04659706726670265, -0.670016348361969, -0.8700544834136963, -0.6414628028869629, -0.20752489566802979, 0.6651814579963684, -0.3141646683216095, 0.24577242136001587, -0.4607853591442108, -0.652388751506805...
def createlayers ( self, networksize ) : layers = [ ] for layernum, layersize in enumerate ( networksize ) : layer = [ ] for layerindex in range ( layersize ) : layer. append ( neuron ( random. uniform ( - 1, 1 ), random. uniform ( - 1, 1 ), layernum, layerindex, inputlayer = layernum = = 0, outputlayer = layernum = = ...
[ -0.8949892520904541, -0.0343870110809803, 0.5971367359161377, 0.16513440012931824, 0.78299480676651, 0.2249431163072586, 0.5283957123756409, -0.9262973070144653, 1.4398034811019897, -0.2721610367298126, -0.6493802666664124, -1.1428495645523071, -0.7554441094398499, 0.7986709475517273, -1...
def get _ items ( self, * ids ) : if not ids : ids = self. get _ items _ ids ( ) else : ids = ids [ 0 ] if isinstance ( ids, int ) : return self. _ request ( " items ", ids = str ( ids ) ) elif len ( ids ) < = 200 : return self. _ request ( " items ", ids = ', '. join ( str ( id ) for id in ids ) ) else : return self. ...
[ -2.0307223796844482, 0.2814328670501709, 0.34302079677581787, 0.3540416657924652, 1.1770247220993042, -0.6523274183273315, -1.0655152797698975, -0.2506300210952759, 0.11540594696998596, -0.06730735301971436, 0.04786820709705353, 0.23987820744514465, -0.27110937237739563, -0.225021660327911...
def plot ( self ) : import matplotlib. pyplot as plt plt. plot ( self. e ) plt. show ( )
[ 1.127030372619629, 0.7876750826835632, 0.2789973318576813, -0.49044904112815857, 0.33120012283325195, 0.9723892211914062, 1.0571823120117188, 1.1849397420883179, 0.4035909175872803, -0.5113270878791809, 0.7450287342071533, 1.425452470779419, 0.5548182129859924, 0.5559147596359253, 0.3952...
def read _ ann _ arbor _ gages ( aa _ dir = os. path. join ( homedir, aa _ dir ) ) : # initialize empty dict to hold data d = { } # loop through directory for fn in os. listdir ( aa _ dir ) : # read files d [ fn [ 0 ] ] = pd. read _ csv ( aa _ dir +'/'+ fn ) # rename columns d [ fn [ 0 ] ]. rename ( columns = {'reading...
[ -0.14795222878456116, -0.7070615887641907, 0.7772287726402283, -0.846968948841095, -0.5236161351203918, 1.2127796411514282, 0.4218660593032837, 0.6460679769515991, -0.474947452545166, 0.3412186801433563, 0.7340719103813171, 0.16756999492645264, 0.6389104723930359, 0.10857073217630386, 0....
def load _ template ( self, request, obj, names = none ) : if not names : names = [ ] return self. get _ template _ loader ( request, obj ). select _ template ( names )
[ -1.169124722480774, 0.2155715525150299, 0.34122028946876526, 0.31207457184791565, -0.823380708694458, -0.9800100326538086, -0.9899400472640991, -0.9080994129180908, 0.44512739777565, 0.40605735778808594, -0.7052485942840576, -0.3439905643463135, -0.441334068775177, -0.03889136016368866, ...
def predict _ captcha _ telangana ( img ) : final _ output = clean _ image _ telangana ( img ) cnts = cv2. findcontours ( final _ output. copy ( ), cv2. retr _ external, cv2. chain _ approx _ simple ) cnts = cnts [ 1 ] predictions = { } # set height and width of a digit and number of digits w _ digit = 10 h _ digit = 1...
[ -0.42815348505973816, -0.68626469373703, 0.8480039834976196, 0.14434100687503815, -0.7921659350395203, -0.46794307231903076, 1.0290786027908325, -0.45084646344184875, -0.17197123169898987, 0.38942641019821167, -0.5604493021965027, -0.8841624855995178, 0.5101636648178101, 0.4466889202594757...
def post ( self ) : data = json. loads ( request. data. decode ( ) ) # check the username if ( " userid " not in data or data [ " userid " ] = = 1 ) : exists = users. query. filter _ by ( name = data [ " name " ] ). first ( ) if exists : error = { " success " : false, " error " : " username already in use by a register...
[ -1.1520341634750366, 0.4559679627418518, 0.63751220703125, 1.3962539434432983, -0.1519552618265152, 0.7527368068695068, 0.5832065939903259, 0.049606047570705414, -0.42113640904426575, 0.14008019864559174, -0.8150153756141663, -0.09540015459060669, -0.9264229536056519, 0.4797521233558655, ...
def getsrcprotocol ( self, conn _ id ) : if not conn _ id in self. connections : return none return self. connections [ conn _ id ]
[ 0.23129503428936005, -0.1324814260005951, 0.49054884910583496, -0.9272434711456299, 0.3057316839694977, -1.2383285760879517, -0.7539257407188416, -0.9869386553764343, 0.7290610074996948, 0.5007874369621277, -0.3599852919578552, 0.1896822601556778, -1.302160382270813, -0.6278361082077026, ...
def test _ 01 _ file ( self ) : api _ obj = self. image _ create ( self. rurl ) # the dest _ file's installed path. dest _ file _ name = " file " file10 _ pfmri = self. plist [ dest _ file _ name ] [ 0 ] dest _ file = os. path. join ( self. get _ img _ path ( ), dest _ file _ name ) src = os. path. join ( self. get _ i...
[ -0.26854613423347473, -0.1567726582288742, 0.6265408396720886, -0.08666757494211197, 1.4824333190917969, -0.2570084035396576, 1.0644928216934204, 0.743585467338562, 0.06398329138755798, 0.17222613096237183, -0.20377148687839508, -0.8132681846618652, 0.49845337867736816, 0.6394266486167908,...
def get _ rng _ state ( ) - > tensor : return _ get _ default _ mps _ generator ( ). get _ state ( )
[ -0.5488506555557251, 0.2771037817001343, 0.4340827167034149, -0.09636266529560089, -0.20998825132846832, 0.030320508405566216, 0.5464586615562439, -0.2735172212123871, -0.4701685607433319, -0.5158036351203918, -0.11297658830881119, 0.32192936539649963, -0.4866989850997925, -0.8059973120689...
def wrap _ angle ( self, angle ) : return ( angle + np. pi ) % ( 2 * np. pi ) - np. pi
[ -1.0511667728424072, -0.5353043079376221, 0.1511007845401764, -0.5682141780853271, -0.14893226325511932, 1.0408885478973389, -0.9859142303466797, 0.030098050832748413, 0.6243828535079956, 0.12326321750879288, 0.9386931657791138, 0.43630486726760864, -0.29870542883872986, 0.0456938929855823...
def connect ( ) : pg = psycopg2. connect ( " dbname = tournament " ) c = pg. cursor ( ) return pg, c
[ -0.6132345795631409, -0.7579177021980286, 0.7074233889579773, -0.23631994426250458, 0.398934543132782, -0.047240953892469406, -0.6443189382553101, 0.7110260128974915, -1.609973669052124, 1.1976443529129028, -0.045217860490083694, -0.6997237205505371, -0.13568441569805145, -0.62257897853851...
async def test _ subscribe _ unsubscribe _ logbook _ stream _ big _ query ( recorder _ mock : recorder, hass : homeassistant, hass _ ws _ client : websocketgenerator ) - > none : now = dt _ util. utcnow ( ) await asyncio. gather ( * [ async _ setup _ component ( hass, comp, { } ) for comp in ( " homeassistant ", " logb...
[ 0.16372954845428467, 0.738544762134552, 0.9147847294807434, 0.013652293011546135, 0.2832925021648407, -0.44815245270729065, -0.24178636074066162, -0.6977599859237671, -0.15539701282978058, -0.2987258732318878, -0.6543877124786377, 0.9445834159851074, 0.06921130418777466, 0.5038233399391174...
def comparison ( rankings : dict [ str, list [ str ] ], teams : dict [ str, cfr. team ], length : int ) : # select ranks to show. options = list ( rankings. keys ( ) ) selected _ names = st. multiselect ( " select rankings to compare ", options = options, default = options ) selected = { name : rankings [ name ] for na...
[ 0.23888133466243744, 1.1982531547546387, 0.6958600878715515, -1.3708328008651733, -0.27167296409606934, -0.6601829528808594, 0.6077605485916138, -0.11179236322641373, -0.45566418766975403, 0.23387335240840912, -0.014697709120810032, 0.5610549449920654, 0.5335648059844971, -0.47088843584060...
def cassette ( tmpdir ) : cassette _ path = str ( tmpdir. join ('test. yml') ) with vcr. use _ cassette ( cassette _ path, record _ mode ='all') : urlopen ( default _ uri ) return cassette _ path
[ 0.4473240077495575, -0.07168030738830566, 0.47818228602409363, 0.03892027214169502, 0.10752466320991516, 0.09820910543203354, 1.1836961507797241, 0.2983672022819519, -0.37630796432495117, -0.4192086160182953, 0.4725026786327362, 0.12601712346076965, -0.41004276275634766, 0.2369293272495269...
def _ _ init _ _ ( self, size, offset = 0 ) : # initialize empty memory self. _ data = ['\ x00'] * size self. _ offset = offset
[ 0.619104266166687, -0.5252213478088379, 0.5569844841957092, -1.131600022315979, -1.0255380868911743, 0.21349824965000153, -0.7865999937057495, 0.6805956959724426, 0.36345651745796204, -0.6792036890983582, -1.3773810863494873, 0.4198160767555237, -0.3867645263671875, 0.4312802255153656, -...
def get _ extension ( t _ path ) : path _ parts = str. split ( t _ path, '.') extension = path _ parts [ - 1 : ] [ 0 ] extension = extension. lower ( ) return extension
[ 0.9697510004043579, -0.27072376012802124, 0.535457193851471, 0.1085471585392952, -0.0838392972946167, -0.2781350314617157, 0.2615065574645996, -0.0369289331138134, 0.5884320735931396, 1.4463332891464233, -0.2808245122432709, 0.17060697078704834, -0.14069320261478424, -0.7281206250190735, ...
def factoranalysis ( n = 10, p = 5, d = 2, sigma = 1, niter = 1000 ) : # # fill code here # create simulated data w _ true = np. random. normal ( 0, 1, d * p ). reshape ( p, d ) z _ true = np. random. normal ( 0, 1, n * d ). reshape ( d, n ) epsilon = np. random. normal ( 0, 1, p * n ). reshape ( p, n ) x = np. dot ( w...
[ -0.4582782983779907, -0.08481422066688538, 0.8306730389595032, -0.9599918723106384, -0.7037224173545837, -0.3187660872936249, 0.6192806959152222, 0.0365573950111866, 0.03840305283665657, 0.13229799270629883, -0.011882076039910316, 0.3581666350364685, -0.3125508725643158, 0.8956931233406067...
def spectral _ resolution ( self, true _ dispersion, delta _ dispersion, axis = - 1 ) : pass
[ -0.3013289272785187, 0.10986106097698212, 0.5664445161819458, 0.31759345531463623, 0.17595742642879486, -0.049712661653757095, 0.35166841745376587, 0.47337934374809265, -0.7498010396957397, -0.15372221171855927, 0.13181141018867493, -0.20549145340919495, -0.8462016582489014, -0.30966937541...