text stringlengths 25 2.19k | embedding listlengths 768 768 |
|---|---|
def pink _ noise ( self, mode, fmin = none ) : # configure depending on mode setting if'pink'in mode : nstep = 2 * self. nstep nstep2 = 2 * self. nstep2 f = self. f2 p _ filter = self. p _ filter2 elif'acn'in mode : nstep = self. nstep nstep2 = self. nstep2 f = self. f1 p _ filter = self. p _ filter1 elif'ref _ inst'in... | [
-0.29367268085479736,
0.18376192450523376,
0.9367698431015015,
-0.24672098457813263,
-0.7883626222610474,
-0.06404834240674973,
-0.11049101501703262,
-0.18004854023456573,
-0.15971523523330688,
0.38669028878211975,
0.10059721022844315,
0.121140256524086,
0.15987960994243622,
0.860804915428... |
def apply _ zoom _ out _ transformation ( self ) : image = self. modification _ information. image min = image. shape [ 0 ] max = int ( min / 1. 5 ) original _ dimensions = image. shape [ 0 ] new _ dimensions = int ( min + random. random ( ) * ( max - min ) + 1 ) transformed _ image = im. zoom _ out ( image, new _ dime... | [
-0.32023221254348755,
-0.15783317387104034,
0.4740896224975586,
-0.3072129786014557,
-0.951797604560852,
-0.17002445459365845,
0.7083721160888672,
0.6738283634185791,
0.5373205542564392,
-0.47750747203826904,
-0.44237321615219116,
0.7787581086158752,
0.3991893231868744,
0.1963977813720703,... |
def from _ ldap ( cls, ldap _ data ) : # type : ( str ) - > univentionoffice365data result = base64. b64decode ( ldap _ data ) result = zlib. decompress ( result ) result = json. loads ( result. decode ( " ascii " ) ) if six. py2 : result = jsonify ( result, " ascii " ) return univentionoffice365data ( result ) # self.... | [
-0.5432486534118652,
-0.4716890752315521,
0.42192181944847107,
-0.504756510257721,
-0.4033488929271698,
-0.763094961643219,
-0.8514667749404907,
0.06720346957445145,
0.9989726543426514,
-0.39258772134780884,
-1.1895948648452759,
-0.22632282972335815,
-0.9341860413551331,
-1.340209603309631... |
def password ( self ) - > optional [ str ] : return self. _ _ password | [
0.443004310131073,
-0.6170079112052917,
0.39307528734207153,
0.6605492830276489,
0.5017142295837402,
0.41791000962257385,
0.0851856917142868,
-0.21361318230628967,
0.8524273037910461,
-0.5023056268692017,
0.6527739763259888,
-0.01130874827504158,
-0.05961621552705765,
-0.48931223154067993,... |
def show _ grid ( arr, sweep _ signal ) : # starting + min / max values for slider default _ energy _ index = arr. shape [ - 1 ] / / 2 energy _ min = 0 energy _ max = arr. shape [ - 1 ] - 1 fig, ax = plt. subplots ( ) ax. set _ position ( [ 0. 125, 0. 175, 0. 80, 0. 80 ] ) s _ ax = fig. add _ axes ( [ 0. 2, 0. 10, 0. 6... | [
0.3898233473300934,
-0.06781481951475143,
0.7842640280723572,
-0.745251476764679,
-1.0541144609451294,
0.17847664654254913,
0.4326232075691223,
0.37249428033828735,
-0.6725255250930786,
0.5124171376228333,
0.27516990900039673,
0.7146647572517395,
1.0788995027542114,
0.5868248343467712,
0... |
def collect _ logs _ and _ get _ archive ( self ) : files _ to _ collect = [ ] try : # clear previous run's output and create base directories if they don't exist already. self. _ create _ base _ dirs ( ) logcollector. _ reset _ file ( output _ results _ file _ path ) start _ time = datetime. utcnow ( ) _ logger. info ... | [
0.08477780222892761,
-0.5008420348167419,
0.9532555341720581,
0.5058900713920593,
0.4622192680835724,
-0.44007939100265503,
0.7089341878890991,
-0.7599543333053589,
-1.0937288999557495,
0.0913769006729126,
0.3265484571456909,
0.16194231808185577,
-0.0008160119177773595,
0.4052439033985138,... |
def create ( ) : if request. method = ='post': data = normalize _ data ( request. form, request. files ) if data ['id'] = = 0 : doc _ id = document. create _ document ( data ['title'], data ['author'], data ['doi'], data ['tags'] ) document. index _ document _ by _ id ( es, doc _ id ) else : d = { } whitelist = ['id ',... | [
-0.41376569867134094,
0.4469296336174011,
1.0151846408843994,
0.2864550054073334,
0.5216855406761169,
0.6645484566688538,
0.42837926745414734,
-0.304830938577652,
-0.2397993803024292,
-0.24814485013484955,
0.32641568779945374,
-0.4143538773059845,
0.1983327567577362,
0.46524786949157715,
... |
def feedforward ( self, datum : list [ float ] ) - > list [ int ] : # can also be represented by the dot product. datum = np. array ( datum ). transpose ( ) # this function represents an activation function classify = np. vectorize ( lambda a, r : 1 if a > r else 0 ) return classify ( np. matmul ( self. perceptron, dat... | [
-0.7614669799804688,
0.3792380094528198,
0.7496030926704407,
-0.6666498780250549,
0.1414339542388916,
-0.7744536399841309,
0.2181519716978073,
0.0923369750380516,
0.903022289276123,
-0.4535270929336548,
-0.29382479190826416,
1.7722446918487549,
0.39428138732910156,
-0.17750078439712524,
... |
def decode _ position ( cpu4 _ reshaped, cpu4 _ mem _ gain ) : signal = np. sum ( cpu4 _ reshaped, axis = 0 ) fund _ freq = np. fft. fft ( signal ) [ 1 ] angle = - np. angle ( np. conj ( fund _ freq ) ) distance = np. absolute ( fund _ freq ) / cpu4 _ mem _ gain return angle, distance | [
0.26887789368629456,
-0.8518565893173218,
0.5804072618484497,
-0.08549775183200836,
-0.510093629360199,
-0.5421309471130371,
0.34271711111068726,
0.5467650890350342,
0.177840918302536,
0.05896981805562973,
-0.44983983039855957,
-0.9284418821334839,
-0.027936944738030434,
-0.665420055389404... |
def test _ detect _ peak _ sequence _ cwt ( rugr _ wav _ str ) : rugr _ audio = audio. from _ file ( rugr _ wav _ str ) detections = sp. detect _ peak _ sequence _ cwt ( rugr _ audio, sample _ rate = 400, window _ len = 10, center _ frequency = 50, wavelet = " morl ", peak _ threshold = 0. 2, peak _ separation = 15 / 4... | [
0.30524942278862,
-0.32828885316848755,
0.49448809027671814,
0.8787308931350708,
0.5628318190574646,
0.17317460477352142,
0.6816148161888123,
0.31004273891448975,
0.45062029361724854,
0.14049699902534485,
-0.9101350903511047,
0.19210107624530792,
-0.08738376200199127,
0.2559235692024231,
... |
def test _ add _ vcs _ root _ entry ( self ) : pass | [
0.9245457649230957,
-0.26362526416778564,
0.3458591103553772,
1.204225778579712,
0.8573187589645386,
0.5847111940383911,
0.7760212421417236,
-0.29780644178390503,
0.8597497940063477,
-0.6875400543212891,
-0.5128264427185059,
0.3131742775440216,
-1.0221065282821655,
0.35614657402038574,
-... |
def test _ crawl ( ) : assert common | [
0.6673047542572021,
0.7922943830490112,
0.31598541140556335,
0.7216862440109253,
2.2724719047546387,
1.5499653816223145,
1.8621923923492432,
-0.08952433615922928,
-0.6836718916893005,
-0.9103305339813232,
0.3456680178642273,
-0.759689450263977,
-0.6446839570999146,
-0.5886242389678955,
-... |
def subscribe ( self, topic, qos = 0 ) : print ( " subscribe " ) topic _ qos _ list = none if isinstance ( topic, str ) : if qos < 0 or qos > 2 : raise valueerror ('invalid qos level.') if topic is none or len ( topic ) = = 0 : raise valueerror ('invalid topic.') topic _ qos _ list = [ ( topic. encode ('utf - 8'), qos ... | [
-0.542162299156189,
0.031993042677640915,
0.7456411123275757,
0.4141366481781006,
-0.4216086268424988,
-0.18581029772758484,
-0.595619261264801,
-0.7094215154647827,
-0.2958212196826935,
0.23199772834777832,
-0.18915443122386932,
-0.1724400669336319,
-0.8359586000442505,
0.0602119006216526... |
def test _ nfc _ wps _ handover _ with _ pw _ token _ set ( dev, apdev ) : ssid = " test - wps - nfc - handover2 " params = ap _ wps _ params ( ssid ) hapd = hostapd. add _ ap ( apdev [ 0 ], params ) # enable a password token ( which won't be used in this test case ) pw = hapd. request ( " wps _ nfc _ token ndef " ). r... | [
0.2655565142631531,
0.22286227345466614,
0.7406216263771057,
-0.18745440244674683,
0.437618225812912,
0.21940264105796814,
-0.250512033700943,
-0.10030972957611084,
0.10743110626935959,
-0.6271209120750427,
0.24209341406822205,
-0.16457879543304443,
-0.073215551674366,
0.4687711000442505,
... |
def get _ game _ info ( gameid ) : session = get _ new _ db _ session ( ) game = session. query ( game ). filter ( game. id = = gameid ). first ( ) game _ players = gameinfoplayers ( host _ player = game. host _ player, invited _ players = json. loads ( game. invited _ players ), accepted _ players = json. loads ( game... | [
-0.5445350408554077,
-0.5213843584060669,
0.6764320731163025,
-0.8288699984550476,
-0.17222094535827637,
-0.08742467314004898,
-1.4198918342590332,
-0.8032390475273132,
-0.7387381196022034,
1.030476450920105,
-0.4895782172679901,
-0.10233999043703079,
-0.3802390396595001,
0.725645065307617... |
def dns _ mx ( self, domainname ) : # rfc 4408 section 5. 4 " mx " # to prevent dos attacks, more than 10 mx names must not be looked up mxnames = self. dns ( domainname,'mx') if len ( mxnames ) > max _ mx : self. note _ error ('more than % d mx records returned'% max _ mx ) if self. strict : max = max _ mx if self. st... | [
-0.5057241916656494,
1.1604478359222412,
0.5109130144119263,
0.24632298946380615,
-0.27580705285072327,
-0.778724193572998,
-1.0190188884735107,
-0.4498845636844635,
0.9530152082443237,
-0.11076204478740692,
-0.4980144798755646,
0.34491515159606934,
-0.3695703148841858,
-0.2019852548837661... |
def events _ init ( sc, drivers, rpcmgr ) : event _ id _ list = [ gen _ cfg _ const. event _ configure _ interfaces, gen _ cfg _ const. event _ clear _ interfaces, gen _ cfg _ const. event _ configure _ routes, gen _ cfg _ const. event _ clear _ routes, gen _ cfg _ const. event _ configure _ healthmonitor, gen _ cfg _ ... | [
-0.7854477763175964,
0.3133428990840912,
0.6017257571220398,
0.656054675579071,
1.2487361431121826,
-0.35279130935668945,
-0.26484376192092896,
0.09532025456428528,
-0.3807385265827179,
0.3337719738483429,
-0.8460914492607117,
-0.20506651699543,
-0.04871755838394165,
0.8780455589294434,
... |
def replace _ random _ edges ( a, noise _ level ) : m, m = a. shape n = int ( noise _ level * a. nnz / / 2 ) indices = np. random. permutation ( a. nnz / / 2 ) [ : n ] rows = np. random. randint ( 0, m, n ) cols = np. random. randint ( 0, m, n ) vals = np. random. uniform ( 0, 1, n ) assert len ( indices ) = = len ( ro... | [
0.4779828190803528,
-0.04911109060049057,
0.7715839743614197,
-0.882819652557373,
-0.3253323435783386,
-0.37626051902770996,
0.6834115982055664,
1.2042752504348755,
1.0518739223480225,
0.5113849639892578,
0.39642566442489624,
-0.027023956179618835,
0.2542800009250641,
0.31032055616378784,
... |
def upper _ xlim ( self ) : return self. transdatatoaxes. inverted ( ). transform ( [ [ 0., 1. ], [ 1., 1. ] ] ) [ :, 0 ] | [
-0.4342404901981354,
0.18515059351921082,
0.5599664449691772,
0.19100572168827057,
-0.33098044991493225,
-0.020395003259181976,
-0.12631316483020782,
0.0013908655382692814,
0.312233567237854,
0.5119704008102417,
-0.7482315897941589,
0.5036980509757996,
0.41159531474113464,
-0.8707427382469... |
def getvalue ( self, searcher ) : raise notimplementederror | [
-1.162536382675171,
-0.46850329637527466,
0.3756197392940521,
1.3972653150558472,
-0.41764113306999207,
0.4878620207309723,
-0.03234894201159477,
-1.101579189300537,
-0.3158832788467407,
-0.1469501107931137,
-0.4644933044910431,
-0.11163453012704849,
0.3279518485069275,
0.9532216787338257,... |
def output _ to _ text ( output, payload _ data ) : output = output. replace ('[ 0m ','' ) output = output. replace ('[ 32m ','' ) output = output. replace ('[ 31m ','' ) output = output. replace ('[ 33m ','' ) return output | [
0.48428449034690857,
-0.5742117166519165,
0.6035256385803223,
-1.1930102109909058,
-1.2393091917037964,
-0.5269602537155151,
-0.5903334617614746,
-0.2601182162761688,
-0.03142056241631508,
1.0670371055603027,
-0.3494931161403656,
-0.12155330926179886,
-0.6396482586860657,
-0.42173129320144... |
def get _ xsec _ version ( self, run ) : return self [ str ( run ) ]. get _ xsec _ version ( ) | [
0.1878766119480133,
-0.5729418992996216,
0.24452243745326996,
0.9139567613601685,
-0.10395768284797668,
-0.611891508102417,
-0.09334827959537506,
-1.8045755624771118,
-0.175289124250412,
0.9687945246696472,
-0.6022443771362305,
1.2754653692245483,
-0.5379695296287537,
0.09388992190361023,
... |
def _ _ init _ _ ( self, prior _ prob = 0. 5 ) : self. _ children = none self. _ log _ odds = math. log ( prior _ prob / ( 1 - prior _ prob ) ) | [
0.4736015200614929,
0.07817656546831131,
0.5763899683952332,
0.14432251453399658,
-0.5873972773551941,
0.34969964623451233,
0.8868628144264221,
0.2254735231399536,
-0.020736241713166237,
-0.666826605796814,
-0.06193120405077934,
-0.07715538144111633,
-0.44319814443588257,
0.546451807022094... |
def _ load _ checkpoint ( self, path ) : path + ='_ checkpoint. pth'print ( " [ loading checkpoint ] { 0 } ". format ( path ) ) state = torch. load ( path ) self. model. load _ state _ dict ( state ['model _ state _ dict'] ) self. optim. load _ state _ dict ( state ['optimizer _ state _ dict'] ) self. writer. log _ dir... | [
-0.49959781765937805,
-0.04115213826298714,
0.4829501807689667,
-0.1166977807879448,
-0.5730593204498291,
-0.19672591984272003,
0.6067805886268616,
0.3320634663105011,
-0.7187020182609558,
0.44783851504325867,
-0.436870813369751,
-0.977483868598938,
-0.05942506715655327,
-0.677707135677337... |
def set _ image _ pixel _ ratio ( self, image : qimage, target _ width : int, target _ height : int ) : # pixel ratios ratio _ width = image. width ( ) / target _ width ratio _ height = image. height ( ) / target _ height ratio _ factor = ratio _ width if ratio _ width > ratio _ height else ratio _ height # reset cell ... | [
-0.9884651303291321,
0.241453617811203,
0.5093211531639099,
0.033162396401166916,
-0.12931102514266968,
-0.07883565872907639,
-0.42405086755752563,
-0.7500630021095276,
0.0666312724351883,
0.7279996871948242,
1.482893943786621,
-0.05453462153673172,
0.05962729826569557,
0.22650787234306335... |
def test _ planform _ olap ( ) : ophi = mob. calculate _ planform _ overlap ( chmap, fsurf, basevalues _ idx = basevalue, window _ idx = time _ window ) assert pytest. approx ( ophi. values ) = = np. array ( [ [ 1., 0. 66666667, 0. 33333333, 0., - 0. 33333333 ] ] ) | [
-0.14734487235546112,
-0.1339954137802124,
0.5004719495773315,
-0.31595543026924133,
0.3332180678844452,
0.8156523108482361,
0.4160548448562622,
-0.2730599641799927,
0.4798424541950226,
-0.8166821002960205,
-0.7034859657287598,
-0.14208859205245972,
0.01820243149995804,
0.06294705718755722... |
def short _ token ( ) : hash = hashlib. sha1 ( shortuuid. uuid ( ). encode ('utf - 8') ) hash. update ( settings. secret _ key. encode ('utf - 8') ) return hash. hexdigest ( ) [ : : 2 ] | [
0.7528553009033203,
-0.49109306931495667,
0.381150484085083,
0.1261698454618454,
-0.415181428194046,
0.20697005093097687,
-0.9191028475761414,
1.1039581298828125,
-0.22275075316429138,
0.2007402628660202,
-0.436515748500824,
1.087311029434204,
0.33467382192611694,
-1.3801460266113281,
-0... |
def sensor _ application ( * args ) : sensor = args [ 0 ] reading = { } server _ ip = server. objects. get ( pk = 1 ). ip sensor _ url = sensor. uri sensor = sensor while 1 : # fetch reading import pdb ; pdb. set _ trace ( ) reading = call. get _ reading ( server _ ip, sensor _ url, sensor ) # dt = datetime. datetime. ... | [
-0.3819192349910736,
-0.19555158913135529,
0.7695425748825073,
0.22780586779117584,
0.07950050383806229,
1.1357691287994385,
0.025436026975512505,
-0.6377313137054443,
-0.5190503597259521,
0.23604561388492584,
0.8831346035003662,
-0.22262200713157654,
-0.034205690026283264,
0.4795688092708... |
def get _ compiler _ name ( self ) : if self. compiler : # distutils doesn't keep the type of self. compiler uniform ; we # compensate : if isinstance ( self. compiler, str ) : name = self. compiler else : name = self. compiler. compiler _ type else : name = get _ default _ compiler ( ) return name | [
-0.5908998250961304,
-0.33374038338661194,
0.5274397134780884,
0.5492397546768188,
-0.3078228533267975,
-0.4884387254714966,
0.13567601144313812,
-0.10856569558382034,
-0.2631014883518219,
-0.32270634174346924,
0.7263633012771606,
0.497387170791626,
-0.5943904519081116,
1.0213550329208374,... |
def read _ data ( port, datatype, outformat = " repr ", sep = ", ", fromfile = " ", header = false ) : cmd = { " live " : 0x11, " saved " : 0x12, " logger " : 0x13 } dat = none if datatype not in cmd. keys ( ) : sys. exit ( " unknown data type'{ }'". format ( datatype ) ) else : if len ( fromfile ) > 0 : infile = open ... | [
0.4633749723434448,
-0.3234293758869171,
0.8505064249038696,
-0.4818577468395233,
-0.6768393516540527,
-0.043628010898828506,
-0.3137669265270233,
-0.32649949193000793,
-0.43384596705436707,
-0.2409224659204483,
0.20461305975914001,
0.16025681793689728,
-0.9488396644592285,
-0.465712308883... |
def _ float _ feature ( values ) : return tf. train. feature ( float _ list = tf. train. floatlist ( value = values ) ) | [
0.42585277557373047,
0.3033357560634613,
0.19989246129989624,
-0.04198350012302399,
0.6724715232849121,
-0.0014762597857043147,
-0.40054118633270264,
0.6438250541687012,
-0.808675229549408,
-1.0942102670669556,
-1.1930921077728271,
0.1097390353679657,
0.031130623072385788,
0.02188643999397... |
def partition ( ary, predicate, extra _ args = [ ], preamble = " ", queue = none, wait _ for = none ) : if len ( ary ) > np. iinfo ( np. uint32 ). max : scan _ dtype = np. uint64 else : scan _ dtype = np. uint32 extra _ args _ types, extra _ args _ values = extract _ extra _ args _ types _ values ( extra _ args ) knl =... | [
0.22188417613506317,
0.39258408546447754,
0.8543466925621033,
0.4367203414440155,
-1.1968263387680054,
-0.8844966888427734,
-0.030985185876488686,
0.2842859625816345,
0.19233539700508118,
1.1346503496170044,
0.1663549542427063,
-0.10834004729986191,
0.36321917176246643,
0.3447548449039459,... |
def test _ new _ user _ invalid _ email ( self ) : with self. assertraises ( valueerror ) : get _ user _ model ( ). objects. create _ user ( none,'test123') | [
0.5933889150619507,
0.8662449717521667,
-0.011614575982093811,
0.5669586658477783,
0.7622933983802795,
0.6075789332389832,
-0.2033897191286087,
0.5202744603157043,
-0.34444037079811096,
-0.41569268703460693,
-0.8217785954475403,
-0.21349911391735077,
-0.7160801887512207,
0.3127332031726837... |
def schedule ( self ) : logger. debug ( " starting systemd timers " ) results = self. _ run _ systemctl _ commands ( self. loaded _ timers, " enable ", " - - now " ) return results and self. active | [
0.05178842321038246,
0.19138404726982117,
0.4924227297306061,
0.5159431099891663,
0.1387341022491455,
0.01940876618027687,
-0.003687340999022126,
0.8693662881851196,
-0.21908575296401978,
-0.34282469749450684,
-1.0889778137207031,
-0.2957908511161804,
-1.0730053186416626,
0.247079521417617... |
def add _ books ( self, * args ) : for book in args : book. enshelf ( self ) print ( " \ nadded books. { shelf } shelf now contains : \ n ". format ( shelf = self. name ) ) self. report ( ) | [
-0.34121766686439514,
-0.1352575421333313,
0.3137388825416565,
0.779225766658783,
1.6108344793319702,
1.5662521123886108,
0.4593135714530945,
-0.49121424555778503,
-1.3283098936080933,
-0.24858348071575165,
-0.16898590326309204,
-0.17848825454711914,
-0.9267781972885132,
1.594928503036499,... |
def dump _ reads _ table ( self, reads, table _ file ) : tab _ out = open ( table _ file,'w') for read in reads : print > > tab _ out,'% s \ t % d'% read tab _ out. close ( ) print > > sys. stderr,'wrote read position table to % s'% table _ file | [
0.23014317452907562,
-0.989358127117157,
0.7581338882446289,
-0.0939226821064949,
0.626076340675354,
1.322736382484436,
0.37975114583969116,
-0.025180252268910408,
-1.3571016788482666,
0.012344008311629295,
1.1259695291519165,
-0.4271405041217804,
0.43220072984695435,
0.20206190645694733,
... |
def genomic _ to _ cdna _ coord ( transcript, genomic _ coord ) : exons = [ exon. get _ as _ interval ( ) for exon in get _ exons ( transcript ) ] if len ( exons ) = = 0 : return none strand = transcript. strand if strand = = " + " : exons. sort ( key = lambda exon : exon. chrom _ start ) else : exons. sort ( key = lam... | [
0.30404356122016907,
-0.688265323638916,
0.9968131184577942,
-0.20676317811012268,
-1.1677114963531494,
-0.33034947514533997,
-0.5894858837127686,
0.19875267148017883,
-0.615479052066803,
0.3699990212917328,
-0.6051792502403259,
0.9643747210502625,
0.18962031602859497,
-0.6354276537895203,... |
def micd ( x, y, k = 3, base = 2, warning = true ) : assert len ( x ) = = len ( y ), " arrays should have same length " entropy _ x = entropy ( x, k, base ) y _ unique, y _ count = np. unique ( y, return _ counts = true, axis = 0 ) y _ proba = y _ count / len ( y ) entropy _ x _ given _ y = 0. for yval, py in zip ( y _... | [
0.5026587843894958,
-0.039118580520153046,
0.8378220200538635,
-0.1722394973039627,
-0.9545806646347046,
0.345079630613327,
-1.2537715435028076,
-0.0910521075129509,
-0.5091475248336792,
0.7060304284095764,
-0.15446877479553223,
0.8165773749351501,
0.19576212763786316,
-0.5816868543624878,... |
def test _ double _ h _ plot _ 2 ( self ) : inch _ per _ unit = 1. 0 x _ units = 10 y _ units = 4 left = [ 1, 5 ] bottom = 1 width = [ 3, 4 ] height = 2 figsize, coords = pt. make _ coordinates ( inch _ per _ unit, x _ units, y _ units, left, bottom, width, height ) self. assertequal ( figsize, ( 10, 4 ) ) self. assert... | [
0.06522177159786224,
0.808977484703064,
0.7142452597618103,
0.05391845107078552,
-0.24195966124534607,
1.1538853645324707,
0.9316439032554626,
-0.9661198854446411,
-1.1534291505813599,
-0.827164888381958,
-1.1037120819091797,
0.147996723651886,
0.1749262809753418,
-0.2760826647281647,
1.... |
def get _ history ( calc ) : if check _ integrity ( calc ) : return calc ['history'] | [
1.188689947128296,
1.4393049478530884,
0.1432810127735138,
0.5360831618309021,
0.5601921081542969,
-0.10001635551452637,
0.5415011644363403,
-0.6906521320343018,
0.26396334171295166,
-0.5837050080299377,
0.5968021750450134,
0.4615653157234192,
0.11396308988332748,
-0.5869807004928589,
0.... |
def insertion _ sort ( items, reverse = false ) : # sorts in ascending order if false, # descending if false if reverse = = false : for i in range ( len ( items ) - 1 ) : m = i while items [ m ] > items [ m + 1 ] and m > = 0 : items [ m ], items [ m + 1 ] = items [ m + 1 ], items [ m ] m - = 1 return items else : for i... | [
-0.6172103881835938,
0.9062313437461853,
0.6752601861953735,
-0.42236801981925964,
0.06808716058731079,
0.5897324681282043,
0.5701192021369934,
0.5175052285194397,
-0.8750917315483093,
0.8614826798439026,
-0.12822623550891876,
-0.2646920084953308,
-1.6997106075286865,
0.15098154544830322,
... |
def get _ buckets ( self, reversed = false ) : xdcr _ num _ buckets = self. parami ('xdcr _ num _ buckets ', 1 ) if xdcr _ num _ buckets > 1 : num _ replicated _ buckets = self. parami ('num _ replicated _ buckets ', xdcr _ num _ buckets ) buckets = ['bucket - { 0 } '. format ( i ) for i in range ( xdcr _ num _ buckets... | [
-0.944328784942627,
1.1288551092147827,
0.6538688540458679,
0.3842044174671173,
0.8676019906997681,
0.20220524072647095,
0.13073086738586426,
0.22333510220050812,
-0.7389495968818665,
0.31407132744789124,
-0.5593490600585938,
0.7918276786804199,
-0.10005979239940643,
-0.5957378149032593,
... |
def cnn _ mlp _ model ( train = false, load = true, report = true, show _ plots = false ) : x _ train, y _ train, x _ test, y _ test, x _ val, y _ val = get _ matrix _ inputs ( new _ audio _ path, coswara _ audio _ path, coswara _ audio _ path, parameters. saved _ load _ loc, load = true ) test _ data _ vec, train _ da... | [
0.8102896809577942,
-0.4653489589691162,
0.7471141219139099,
0.22249238193035126,
0.029741570353507996,
0.22171925008296967,
0.5112734436988831,
0.4710448980331421,
-0.5703345537185669,
-0.08899401128292084,
0.13696187734603882,
0.7668293118476868,
0.25997984409332275,
-0.1716611385345459,... |
def herbs _ directory ( ) : herbs = produce. query. filter _ by ( prod _ type = 3 ). all ( ) return render _ template ('/ herbs. html ', herbs = herbs ) | [
-0.0479411855340004,
0.8069770336151123,
0.38772404193878174,
0.5194350481033325,
0.22129210829734802,
0.6431701183319092,
0.17703808844089508,
0.336983859539032,
0.6955265402793884,
-0.08502287417650223,
0.9785733819007874,
0.7453533411026001,
1.0091100931167603,
0.3764692544937134,
-0.... |
def reload _ modules ( ) : import logging logger = logging. getlogger ('kcaa. manipulator') # so, here are the modules referenced by other modules, in this order. # if a module a contains a class definition referenced in another module b, # the module a should precede b. ( or it * * must * * if the classes rely on # de... | [
-0.822601854801178,
-0.23755203187465668,
0.6224587559700012,
0.18871772289276123,
1.1335909366607666,
0.020097384229302406,
0.7062537670135498,
-1.3594839572906494,
-0.07311608642339706,
0.15292727947235107,
0.30100786685943604,
0.5933355689048767,
-0.2406192272901535,
0.8595752716064453,... |
def hit ( self, timestamp ) : self. q. append ( timestamp ) | [
0.08433554321527481,
0.6544716954231262,
0.2273312509059906,
-0.17857877910137177,
0.8821013569831848,
0.7358816862106323,
-0.3869832456111908,
-0.7337648868560791,
0.289162814617157,
0.11408017575740814,
-0.5370213389396667,
0.2681969106197357,
0.2758742868900299,
-0.6350552439689636,
-... |
def drop _ comment ( line ) : return line. partition ( " # " ) [ 0 ] | [
0.45058566331863403,
-0.35878872871398926,
0.7791218757629395,
-0.6148842573165894,
0.6888343095779419,
0.06791620701551437,
0.29920685291290283,
-0.32705894112586975,
-0.4953985810279846,
0.6514575481414795,
0.41422709822654724,
-0.33862194418907166,
-0.9330934286117554,
-1.55858731269836... |
def load ( self ) : address = 0 if len ( sys. argv )! = 2 : print ('usage : ls8. py < progam name >') sys. ext ( 1 ) progname = sys. argv [ 1 ] with open ( progname ) as f : for line in f : line = line. split ('#') [ 0 ] line = line. strip ( ) if line = ='' : continue # change the string to integer & binary value = int... | [
-0.3140413761138916,
-0.4011845588684082,
0.7930891513824463,
-0.6886172890663147,
-0.2820746600627899,
0.017881229519844055,
0.5078375935554504,
0.5857635736465454,
0.40526536107063293,
0.10379298031330109,
-0.8130757212638855,
0.9346322417259216,
-0.7361756563186646,
0.2959754765033722,
... |
def scale ( image, factor, resample = image. nearest ) : if factor = = 1 : return image. copy ( ) elif factor < = 0 : raise valueerror ( " the factor must be greater than 0 " ) else : size = ( int ( round ( factor * image. width ) ), int ( round ( factor * image. height ) ) ) return image. resize ( size, resample ) | [
-0.573236882686615,
-0.42574310302734375,
0.3686071038246155,
0.34550732374191284,
-1.22670578956604,
-0.15243859589099884,
-1.0460903644561768,
-0.14897210896015167,
0.23766054213047028,
0.2572217285633087,
1.1010252237319946,
0.22270919382572174,
-0.5509731769561768,
0.9773319959640503,
... |
def get _ all ( self, server : server ) - > sequence [ alias ] : keys = ( server. transport. id. lower ( ), server. id. lower ( ) ) node = self. aliases for key in keys : if key in node : node = node [ key ] else : return [ ] return node. values ( ) | [
-0.7788364887237549,
-0.4859980046749115,
0.45463937520980835,
0.21659916639328003,
-0.14285866916179657,
0.6595603227615356,
-1.2998416423797607,
0.4062166213989258,
-0.4753078818321228,
0.6362703442573547,
-0.9156731367111206,
1.175917148590088,
-0.2508256733417511,
1.2234752178192139,
... |
def write _ bit32 ( data ) : return pack ('l ', data ) [ 1 ] | [
0.013273168355226517,
0.43068644404411316,
0.37971484661102295,
-0.6444067358970642,
0.11876927316188812,
0.9343748688697815,
-0.6223613023757935,
-1.4140087366104126,
0.5090423822402954,
-0.11132422089576721,
-0.7834365367889404,
0.4040496051311493,
-0.9564961194992065,
0.0171774402260780... |
def makedatebins ( self ) : dates = self. meta. date. unique ( ) self. date _ bins = pd. date _ range ( dates. min ( ), dates. max ( ), periods = self. n _ datebins ) date _ bins = [ ] for d in dates : try : assigned _ bin = self. date _ bins [ np. where ( self. date _ bins < = d ) [ 0 ]. max ( ) ] date _ bins. append ... | [
-0.8808459639549255,
0.21031728386878967,
0.5414841175079346,
0.803359866142273,
0.08982815593481064,
1.210889458656311,
0.5332815647125244,
0.12731732428073883,
-0.22556990385055542,
-0.4826512038707733,
0.5255378484725952,
0.5752441883087158,
0.4358295500278473,
0.39981168508529663,
0.... |
def info ( ) : return render _ template ('syntax. html ', page ='info') | [
0.989464521408081,
0.6025052666664124,
0.43906915187835693,
-0.17315636575222015,
0.13525959849357605,
-0.09562234580516815,
-0.44686082005500793,
1.0013760328292847,
-1.3816946744918823,
0.12843039631843567,
0.32019707560539246,
-0.1429571509361267,
0.46075764298439026,
0.5792835354804993... |
def add _ game ( self, game _ name ) : self. _ games _ played + = 1 if game _ name in self. _ game _ counter : self. _ game _ counter [ game _ name ] + = 1 else : self. _ game _ counter [ game _ name ] = 1 | [
-0.2881707549095154,
0.13851803541183472,
0.908270537853241,
-0.39245283603668213,
0.5631823539733887,
0.6251891255378723,
-0.5740702748298645,
-0.2778649628162384,
0.2755679190158844,
0.5549793839454651,
-0.3500584065914154,
-0.2775181233882904,
-0.5610091686248779,
0.4603041410446167,
... |
def valid ( self, val ) : _ val = np. asfarray ( val ) if self. _ closed _ bounds : valid = np. where ( np. isfinite ( self. lnprob ( _ val ) ), _ val, self. rvs ( size = _ val. shape ) ) else : valid = np. where ( _ val < self. _ ub, _ val, 2 * self. _ ub - _ val ) valid = np. where ( valid > self. _ lb, valid, 2 * se... | [
-0.02407977730035782,
-0.22399228811264038,
0.6989074945449829,
0.28652480244636536,
-0.6108564734458923,
0.7363928556442261,
-0.4632333219051361,
-0.773618757724762,
0.11421479284763336,
-0.1376875936985016,
0.6646541953086853,
0.5919678807258606,
-0.9584768414497375,
0.14598295092582703,... |
def len ( self ) : i = 0 temp = self. head. next while temp! = none : i = i + 1 temp = temp. next return i | [
-0.026740971952676773,
0.06173298880457878,
0.4095271825790405,
-0.9610146880149841,
0.13479095697402954,
-0.1355457603931427,
0.923679530620575,
1.1172302961349487,
0.40154844522476196,
-0.5269378423690796,
-1.3962986469268799,
0.054167259484529495,
-0.9189661741256714,
0.3684313595294952... |
def write _ doc ( self, * args, * * kwargs ) : self. dom _ element. write _ doc ( * args, * * kwargs ) | [
-0.937160074710846,
0.39817795157432556,
0.2109837830066681,
0.7063896059989929,
1.0273350477218628,
0.42188146710395813,
0.6688327789306641,
0.41744759678840637,
-0.11817136406898499,
-0.9383301734924316,
0.09976013004779816,
0.6514561176300049,
-0.11448691785335541,
0.534934937953949,
... |
def test _ power _ law _ converter _ init _ power _ greater _ than _ 2 ( power _ law _ converter, power ) : x = 3 powerlawconverter. _ _ init _ _ ( power _ law _ converter, power = power, scale = 200 ) assert power _ law _ converter. _ power = = ( power + 1 ) assert power _ law _ converter. _ f ( x ) = = ( x * * ( 1 / ... | [
-0.41969969868659973,
-0.15711510181427002,
0.6313090324401855,
1.215112566947937,
-0.11748625338077545,
0.5571975111961365,
-0.8338108062744141,
0.17294920980930328,
-1.2951583862304688,
-0.3304823338985443,
-0.9998447299003601,
-0.46177563071250916,
1.072480320930481,
0.6578968167304993,... |
def upload _ to _ dataset ( connector, host, clowder _ user, clowder _ pass, datasetid, filepath ) : logger = logging. getlogger ( _ _ name _ _ ) for source _ path in connector. mounted _ paths : if filepath. startswith ( connector. mounted _ paths [ source _ path ] ) : return _ upload _ to _ dataset _ local ( connecto... | [
0.02514032833278179,
0.22494012117385864,
0.5924403667449951,
-0.11455771327018738,
0.2987334430217743,
-0.07884576171636581,
-0.01033697184175253,
-0.587838888168335,
-0.5838428735733032,
0.44636061787605286,
0.1600763201713562,
-0.2675427496433258,
-0.3039555251598358,
0.4754075407981872... |
def get _ head _ commit _ hash ( git _ repo : optional [ pathstr ] = none ) - > str : return get _ head _ commit _ format ( git _ repo,'% h') | [
0.524937629699707,
0.10592734813690186,
0.4224752187728882,
0.6475714445114136,
-0.4754292964935303,
0.834399938583374,
-0.4545401632785797,
-0.37532880902290344,
-0.5790467858314514,
0.6238653063774109,
0.5438337922096252,
0.5572198033332825,
-0.2751384675502777,
-0.6967313885688782,
0.... |
def get _ dhcp _ mt ( self, buff ) : ether _ packet = scapy. ether ( buff ) dhcp _ packet = ether _ packet [ scapy. dhcp ] # ('message - type ', 1 ) message = dhcp _ packet. options [ 0 ] return constants. dhcp _ messate _ type [ message [ 1 ] ] | [
-0.5259105563163757,
0.48723167181015015,
0.4988270103931427,
-0.1777116358280182,
0.8878315091133118,
-0.06931086629629135,
-0.26781293749809265,
-1.42769193649292,
0.510252058506012,
-0.15810784697532654,
0.5958787202835083,
-0.17190974950790405,
-0.8986581563949585,
0.18147367238998413,... |
def position _ data _ concatenated _ across _ recordings ( self ) : if not self. check _ if _ all _ recordings _ have _ same _ position _ sampling _ rate ( ) : raise exception ('all recordings must have same position sampling rate to concatenate position data.') position _ sample _ shift = 1. / float ( self. position [... | [
-0.07987916469573975,
0.2023797333240509,
0.806839644908905,
-0.38399699330329895,
0.17595776915550232,
0.04855947196483612,
-0.18544675409793854,
-0.3917291760444641,
0.0056296344846487045,
0.6870173215866089,
-0.06618215143680573,
-0.8350261449813843,
0.06234866380691528,
0.5736437439918... |
def extend _ query _ with ( self, query _ items ) : original _ query _ items = compat. parse _ qsl ( self. query or " " ) if not isinstance ( query _ items, list ) : query _ items = list ( query _ items. items ( ) ) return self. add _ query _ from ( original _ query _ items + query _ items ) | [
0.23374535143375397,
-0.21259576082229614,
0.4775221049785614,
0.7594019174575806,
-0.4619012773036957,
0.6142737865447998,
-1.7764112949371338,
0.35811999440193176,
1.1777554750442505,
-0.6357297897338867,
0.3182675838470459,
-0.20869000256061554,
-0.32163238525390625,
-0.0272331666201353... |
def execute ( presto _ conn, sql, params = none ) : # prestodb. cursor. execute does not use parameters. # the sql _ mogrify function will do any needed parameter substitution # and only returns the sql with parameters formatted inline. presto _ stmt = sql _ mogrify ( sql, params ) presto _ cur = _ cursor ( presto _ co... | [
-0.3086974322795868,
0.279523640871048,
0.7482976913452148,
0.704628586769104,
-0.2509500980377197,
-0.4381757378578186,
-1.4946192502975464,
0.2948951721191406,
-0.6298421621322632,
0.6368799209594727,
0.1897684931755066,
-0.24047993123531342,
0.42425966262817383,
0.6093564033508301,
0.... |
def get _ capacity ( self ) : return self. _ capacity | [
-0.04792223498225212,
-0.4497781991958618,
0.3606049716472626,
0.43025854229927063,
-0.24631698429584503,
-0.11513249576091766,
1.3775442838668823,
-0.3391408920288086,
-0.5925729274749756,
-0.7247562408447266,
0.08882542699575424,
0.04252807796001434,
0.25341618061065674,
-0.6305607557296... |
def get _ all _ sub _ folders _ within _ folder ( path ) : return [ name for name in os. listdir ( path ) if os. path. isdir ( os. path. join ( path, name ) ) ] | [
0.2163357436656952,
0.015087921172380447,
0.8774397969245911,
0.8535524010658264,
-1.6100027561187744,
1.0262407064437866,
-0.015052447095513344,
-0.5707698464393616,
0.15795904397964478,
-0.344175785779953,
-0.8214493989944458,
0.394151896238327,
-0.2983003258705139,
0.13660643994808197,
... |
def hex _ to _ string ( x : str ) - > str : return str ( binascii. unhexlify ( x ),'iso - 8859 - 1') | [
-0.06482533365488052,
-0.6491397619247437,
0.3225235342979431,
0.18224747478961945,
0.05003608018159866,
0.8843154907226562,
-1.8028327226638794,
0.10411623120307922,
0.2934299111366272,
0.8420610427856445,
-0.7201870679855347,
0.24962261319160461,
1.0695254802703857,
-1.2350963354110718,
... |
def test _ register _ input _ and _ post _ and _ passwords _ bad _ no _ lower ( self, * _ ) : self. open ( base _ url +'/ logout') # go to main page self. open ( base _ url +'/ register') # validate that the user is taken to / login assert self. get _ current _ url ( ) = = base _ url +'/ register'self. type ('# email '... | [
-0.2552552819252014,
0.39537397027015686,
0.5162303447723389,
0.9020808935165405,
0.40104299783706665,
0.5698680877685547,
-0.24004937708377838,
-0.209245502948761,
-0.307750403881073,
-0.7476321458816528,
-0.6030780673027039,
0.45599839091300964,
-0.7604202032089233,
0.9676902294158936,
... |
def toogle _ cpl ( self, e ) : for item in self. footprint _ list. getselections ( ) : row = self. footprint _ list. itemtorow ( item ) ref = self. footprint _ list. gettextvalue ( row, 0 ) fp = get _ footprint _ by _ ref ( self. board, ref ) toggle _ exclude _ from _ pos ( fp ) self. populate _ footprint _ list ( ) se... | [
-0.16028407216072083,
0.4119197130203247,
0.35041144490242004,
0.13376961648464203,
0.11240753531455994,
0.5735378265380859,
1.3011633157730103,
0.9901474714279175,
0.274877667427063,
0.5464072227478027,
0.43212592601776123,
-0.8015121221542358,
-0.4052203893661499,
0.4901415705680847,
0... |
def test _ del _ node _ cleanup ( gr ) : gr. add _ edge ('a ','b') gr. del _ node ('b') assert len ( gr. edges _ list ) = = 0 | [
0.30051112174987793,
1.162400722503662,
0.3911423981189728,
-0.7410211563110352,
0.9385378956794739,
0.5005971789360046,
-0.3504374325275421,
0.33558669686317444,
0.7069962620735168,
0.1605461686849594,
0.057586390525102615,
0.8869099020957947,
-0.19320757687091827,
-0.7843946814537048,
... |
def _ rows _ check _ key _ df ( df : dataframe, by : list [ str ], df _ name : str ) - > none : y _ miss = setdiff ( by, df. columns, _ _ calling _ env = callingenvs. regular ) if len ( y _ miss ) > 0 : raise valueerror ( f " all ` by ` columns must exist in ` { df _ name } `. " ) if any ( df. duplicated ( by ) ) : rai... | [
-0.47922348976135254,
0.8754818439483643,
0.3962372839450836,
0.5283130407333374,
0.4631717801094055,
-0.3808426260948181,
0.36216607689857483,
0.6229878664016724,
-0.7052469849586487,
0.6370072960853577,
-0.1019163727760315,
0.16963666677474976,
0.5321550369262695,
0.5178399682044983,
-... |
def test _ get _ customer _ not _ found ( self ) : resp = self. app. get ( " / customers / 0 " ) self. assertequal ( resp. status _ code, status. http _ 404 _ not _ found ) | [
0.19120824337005615,
-0.6500574350357056,
0.2906384766101837,
0.5971724390983582,
0.9320068359375,
0.9552940726280212,
0.1562228947877884,
0.7743470668792725,
-0.6411715745925903,
-1.166872501373291,
0.2681979835033417,
0.8621113896369934,
0.2639051377773285,
0.13109838962554932,
0.44088... |
def get _ 5gnr _ extattn ( self ) : rdstr = self. queryfloat ( f'conf : nrmm : meas : rfs : eatt?') return rdstr | [
-0.1693524867296219,
0.5326216816902161,
0.36065730452537537,
-0.5990248918533325,
-0.08922609686851501,
-0.29619431495666504,
-0.20568375289440155,
-1.6615544557571411,
0.015474165789783001,
0.22558976709842682,
0.262003093957901,
-0.13123078644275665,
-1.0968819856643677,
0.4374113082885... |
def network _ interface _ id ( self ) - > optional [ pulumi. input [ str ] ] : return pulumi. get ( self, " network _ interface _ id " ) | [
0.7356225252151489,
0.46483463048934937,
0.2176864743232727,
0.43936893343925476,
0.4810938835144043,
1.4742785692214966,
-0.01592206582427025,
-0.37738850712776184,
0.7616216540336609,
-0.1591995507478714,
-0.2672308683395386,
0.259940505027771,
-1.0249617099761963,
-0.26396116614341736,
... |
def is _ suffix ( self, word ) : if numberparser in self. config. enabled _ modules : nump = numberparser ( self. config ) if nump. is _ roman _ numeral ( word )! = ( false, 0 ) : return true word = word. replace ( '. ','' ). upper ( ) return word in self. suffixes | [
0.46486297249794006,
-0.296439528465271,
0.4722162187099457,
0.8838382363319397,
-0.5935927629470825,
0.47946006059646606,
-0.7133545875549316,
0.45614174008369446,
0.9930925369262695,
-0.24626056849956512,
-0.8895407915115356,
1.2897684574127197,
-0.9133720993995667,
1.460873007774353,
... |
def _ _ init _ _ ( _ _ self _ _, resource _ name : str, opts : optional [ pulumi. resourceoptions ] = none, description : optional [ pulumi. input [ str ] ] = none, labels : optional [ pulumi. input [ mapping [ str, pulumi. input [ str ] ] ] ] = none, name : optional [ pulumi. input [ str ] ] = none, project : optional... | [
0.041421324014663696,
-0.1952148675918579,
0.6283871531486511,
-0.7140432596206665,
0.06335151195526123,
0.713197648525238,
-0.2875251770019531,
0.4363468587398529,
0.816554605960846,
-0.15213637053966522,
0.2994155287742615,
0.7666418552398682,
0.3397925794124603,
-1.0260190963745117,
-... |
def testgetorder ( self ) : if not self. _ _ class _ _. order1 : self. testcreateorders ( ) self. assert _ ( isinstance ( self. _ _ class _ _. service. getorder ( self. _ _ class _ _. order1 ['id'] ), tuple ) ) | [
-0.4320991039276123,
0.9522464275360107,
0.37297409772872925,
0.717851996421814,
1.4638444185256958,
-0.028660427778959274,
-0.7642823457717896,
-0.567865788936615,
0.33470895886421204,
-0.5866702198982239,
-0.5026829838752747,
-0.08765455335378647,
-0.605186939239502,
0.09913438558578491,... |
def draw _ lines ( self ) : for i in self. annlines : i. remove ( ) for i in self. anntexts : i. remove ( ) self. annlines = [ ] self. anntexts = [ ] # decide if pixels or wavelength is being plotted plotx = self. _ detns if self. _ wavepix = = 0 and self. _ fitdict ['fitc'] is not none : # plot wavelength pixel _ fit ... | [
1.0500330924987793,
-0.35213765501976013,
0.5185889601707458,
-0.29395997524261475,
-0.37060606479644775,
0.6059612035751343,
0.06303445994853973,
0.6256898045539856,
0.19092446565628052,
-0.6011888384819031,
0.6526702642440796,
0.9337948560714722,
-0.33882296085357666,
0.9646399617195129,... |
def _ transformation ( self ) - > transformation : cls = self ['transform'] try : obj = cls ( * * { key : value for key, value in self. items ( ) if key not in ['transform ','input'] } ) except typeerror : raise virtualproductexception ( " transformation { } could not be instantiated ". format ( cls ) ) self. _ assert ... | [
-0.6675258278846741,
-0.36248978972435,
0.28882014751434326,
0.21726417541503906,
0.2969711124897003,
-0.17535385489463806,
0.2666350305080414,
-1.2999404668807983,
1.1726163625717163,
0.5159642100334167,
-0.38107678294181824,
-0.17427916824817657,
-0.4518161714076996,
-0.5934362411499023,... |
def _ binarymatrixranksmall ( matrix : list [ int ] ) - > int : m = matrix [ : ] rank = 0 for i in range ( len ( m ) ) : if m [ i ] : rank + = 1 msb = 1 < < ( m [ i ]. bit _ length ( ) - 1 ) for j in range ( i + 1, len ( m ) ) : if m [ j ] & msb : m [ j ] ^ = m [ i ] return rank | [
0.08742760121822357,
0.7648735642433167,
1.0017094612121582,
-0.4158250093460083,
-0.7125149369239807,
-0.321308434009552,
0.6587378978729248,
0.6275588870048523,
0.15024858713150024,
0.21503758430480957,
-0.05384105071425438,
0.5841620564460754,
-1.066521406173706,
0.44259440898895264,
... |
def predictone ( self, s, target = false ) : return self. predict ( s. reshape ( 1, image _ stack, image _ width, image _ height ), target = target ). flatten ( ) | [
-1.3861812353134155,
0.7295024394989014,
0.29542362689971924,
0.43929359316825867,
-0.31284013390541077,
-1.6130295991897583,
0.24668286740779877,
-0.0034940887708216906,
0.4104005992412567,
0.09818828105926514,
0.24355457723140717,
0.16670186817646027,
0.11426638811826706,
-0.082361236214... |
def test _ parse _ inform _ cavium ( self ) : cpe _ string = b'''<? xml version = " 1. 0 " encoding = " utf - 8 "? > < soap - env : envelope xmlns : soap - env = " http : / / schemas. xmlsoap. org / soap / envelope / " xmlns : soap - enc = " http : / / schemas. xmlsoap. org / soap / encoding / " xmlns : xsi = " http : ... | [
0.37154266238212585,
-0.2423262745141983,
0.8441935181617737,
0.35716283321380615,
-0.05702401325106621,
0.21499782800674438,
0.28511929512023926,
0.5667575001716614,
0.5039579272270203,
-0.26924964785575867,
-0.37516850233078003,
0.36909109354019165,
0.18159177899360657,
0.559961616992950... |
def get _ token ( token ) : cur. execute ( " select expired _ tokens from tokens where expired _ tokens = % s ; ", ( token, ) ) token = cur. fetchone ( ) return token | [
0.046440329402685165,
0.05298889800906181,
0.330700159072876,
-0.37269461154937744,
-0.08191995322704315,
-0.7413630485534668,
-1.3031795024871826,
0.2728594243526459,
-0.43744876980781555,
-0.4373462498188019,
-0.3231196403503418,
0.6742883920669556,
-0.3013855218887329,
-0.83117520809173... |
def page _ writer ( self, database : database, tables : list [ table ], new _ file : str ) : columns _ amount = 0 tables _ amount = 0 views _ amount = 0 constraints _ amount = len ( foreignkeyconstraint. get _ all _ foreign _ key _ constraints ( database. get _ tables ( ) ) ) routines _ amount = 0 anomalies _ amount = ... | [
-0.2334701120853424,
0.2422942817211151,
0.8182292580604553,
-0.003439541906118393,
-0.21427984535694122,
0.27310097217559814,
0.8446792960166931,
0.8684729933738708,
-0.3222825825214386,
0.5529844164848328,
0.06336206942796707,
-0.5083247423171997,
0.1433083415031433,
0.795787513256073,
... |
def solver _ numba _ positive ( x, y, theta, r, alpha, maxiter, tol, verbose, computeobj ) : n _ tasks = len ( x ) n _ samples, n _ features = x [ 0 ]. shape ls = utils. lipschitz ( x ) dg _ tol = tol * np. linalg. norm ( y ) * * 2 z = theta. copy ( ) z = np. asfortranarray ( z ) loss = [ ] for i in range ( maxiter ) :... | [
0.26252490282058716,
-0.8131348490715027,
1.0900315046310425,
0.44983044266700745,
-0.9849407076835632,
-0.1076810210943222,
0.3419191241264343,
-0.2587980628013611,
-0.5042017698287964,
0.8095687627792358,
-0.336643248796463,
-0.40407595038414,
0.18856699764728546,
0.22725701332092285,
... |
def _ to _ edges ( l ) : it = iter ( l ) last = next ( it ) for current in it : yield last, current last = current | [
-0.4867279827594757,
-0.32740092277526855,
0.5828050374984741,
-1.08977472782135,
0.15962658822536469,
-0.10439211130142212,
-0.29248887300491333,
0.6328060030937195,
0.06644327193498611,
0.9027085900306702,
-0.4393090009689331,
-0.3073766827583313,
-0.8998159766197205,
-0.0249496344476938... |
def compile _ fit ( model, x _ train, y _ train, x _ valid, y _ valid ) : # compiling the model model. compile ( optimizer ='adam ', loss ='sparse _ categorical _ crossentropy ', metrics = ['accuracy'] ) # callbacks to stop training earlier than planned early _ stop = earlystopping ( monitor ='val _ accuracy ', min _ d... | [
0.9394248723983765,
-0.2729887068271637,
0.5812268853187561,
0.6208847165107727,
-0.32850420475006104,
0.36906498670578003,
-0.7319071292877197,
0.1832011342048645,
-0.5284936428070068,
-0.2982642650604248,
0.24718575179576874,
0.39605969190597534,
0.39829710125923157,
-0.2692858576774597,... |
def dnn _ score ( model, x, y, c, x _ len, max _ length, clip _ time, model _ type, return _ states = false ) : # mask to ignore padding mask = model. layers [ 0 ]. compute _ mask ( x ) # forward pass if return _ states : print ('return states feature not programmed') else : # if model _ type = ='gru': y _ hat = tf. sq... | [
-0.09714645892381668,
-0.08192640542984009,
0.7157524228096008,
-0.2714889347553253,
-0.2642695903778076,
-0.29194632172584534,
-0.3740215301513672,
-0.2732492983341217,
-0.4858747124671936,
1.263012170791626,
-1.3464455604553223,
0.07424352318048477,
0.8092923164367676,
-0.010344425216317... |
def parse _ intervals ( annot, mappability _ bw, output _ dir, prefix, min _ length = 1000, min _ mappability = 0. 95 ) : exclude = set ( ['retained _ intron ','readthrough _ transcript'] ) bw = pybigwig. open ( mappability _ bw ) gintervals = { } for c in annot. chr _ list : exon _ coords = [ ] for g in annot. chr _ g... | [
0.09378042072057724,
-0.622283935546875,
0.8406875729560852,
0.03963618353009224,
-0.4428565800189972,
0.6037194728851318,
0.5631493330001831,
0.48037487268447876,
-0.28194141387939453,
0.03126978129148483,
-0.49505528807640076,
0.3176473379135132,
-0.2434997409582138,
0.24944350123405457,... |
def rescale _ images ( self, dimension : tabledimension, index : int ) : # run through all cells in column or row if dimension = = tabledimension. row : for i in range ( self. columncount ( ) ) : self. rescale _ image ( index, i ) elif dimension = = tabledimension. column : for i in range ( self. rowcount ( ) ) : self.... | [
-0.4234065115451813,
-0.16168418526649475,
0.5325925350189209,
0.8678333759307861,
0.29713568091392517,
-0.5994887351989746,
-0.2249940037727356,
0.0006314901984296739,
-1.0048985481262207,
0.5867879390716553,
0.43697187304496765,
0.13272471725940704,
0.30883124470710754,
0.939662098884582... |
def test _ runnerdebuggerwithexplicitlypassedpdb ( self ) : self. parseoptions ( ['- - reporter ','capturing ','- - debugger ','pdb ','- - debug ','twisted. trial. test. sample ', ] ) self. runcall _ called = false def runcall ( pdb, suite, result ) : self. runcall _ called = true self. patch ( pdb. pdb, " runcall ", r... | [
-0.6468066573143005,
0.6303485631942749,
0.785190224647522,
0.3953375816345215,
0.04229774326086044,
0.8007000088691711,
0.0754811093211174,
0.3947756290435791,
0.1862143725156784,
-0.5792551636695862,
-0.740222156047821,
-0.3500842750072479,
-0.5444533824920654,
0.6433201432228088,
-0.0... |
def deriv _ progress ( self, parameter, parin ) : i = 0 for each in parin : i + = 1 if each = = parameter : done = i / len ( parin ) utils. messages. cprint ( self,'derivatives { :. 2 % } evaluated. '. format ( done ) ) | [
-0.5648300051689148,
-0.14017899334430695,
0.4852554202079773,
-0.3403337299823761,
0.6515045166015625,
0.4369162321090698,
0.7322130799293518,
-0.713009774684906,
-1.3394012451171875,
0.22517041862010956,
-0.16831539571285248,
0.5619713664054871,
-0.8566393256187439,
0.3981339931488037,
... |
def reset ( self ) : # maxx, maxy = self. shape # self. position = ( self. rand. randint ( 0, maxx - 1 ), self. rand. randint ( 0, maxy - 1 ) ) if self. randomize _ on _ reset : self. _ generate _ maze ( ) self. position = ( 0, 0 ) self. last _ position = none self. keys _ left = self. keys [ : ] self. current _ fuel _... | [
-1.0279052257537842,
-0.03453682363033295,
0.5632878541946411,
-0.34041067957878113,
-0.05138029903173447,
-0.9973554611206055,
0.9148572683334351,
-0.34843769669532776,
-0.7430415153503418,
0.49318233132362366,
-0.27693620324134827,
-0.7093684673309326,
-0.9771286845207214,
-0.13284292817... |
def teardown ( self ) : if hasattr ( self,'_ starttime') : executiontime = time. time ( ) - self. _ starttime self. lg ('testcase % s executiontime is % s sec.'% ( self. _ testid, executiontime ) ) | [
0.794985830783844,
-0.014262419193983078,
0.3389732539653778,
-0.955303430557251,
0.35983264446258545,
-0.06534353643655777,
0.9269377589225769,
-0.348804771900177,
-0.1668558120727539,
0.6553621888160706,
0.37777575850486755,
0.6521834135055542,
-0.9524049758911133,
1.7724369764328003,
... |
def removetreated ( self ) : self. treated _ individuals = self. treatments [ self. treatments. apply ( lambda x : len ( x ) > 0 ) ]. index self. original _ infections = self. original _ infections [ ~ self. original _ infections. cohortid. isin ( self. treated _ individuals ) ] | [
-0.7051565051078796,
-1.3414093255996704,
0.38622748851776123,
-1.2394826412200928,
-0.2845649719238281,
0.3600649833679199,
1.0784704685211182,
1.0126971006393433,
-0.2225353717803955,
-0.062662273645401,
-0.14774088561534882,
1.481729507446289,
-1.2470859289169312,
-1.2720892429351807,
... |
def test _ passes _ gene _ inheritance _ hemizygous ( self ) : gene = " test " inh = " hemizygous " cnv = self. create _ variant ( " female " ) # check that female hemizygous cnv must be dups cnv. child. gender = " f " cnv. child. chrom = " x " cnv. child. info [ " cns " ] = " 3 " self. inh. known _ gene [ " inh " ] [ ... | [
-0.01452032569795847,
0.12456904351711273,
0.8025903105735779,
1.0321087837219238,
0.3954373300075531,
0.8024049997329712,
-0.22168774902820587,
0.5854601263999939,
-0.44610869884490967,
-0.21718855202198029,
-1.466934323310852,
0.4225004017353058,
0.3668373227119446,
0.3486481010913849,
... |
def _ deploy ( app _ name, model _ uri, execution _ role _ arn = none, assume _ role _ arn = none, bucket = none, image _ url = none, region _ name = " us - west - 2 ", mode = deployment _ mode _ create, archive = false, instance _ type = default _ sagemaker _ instance _ type, instance _ count = default _ sagemaker _ i... | [
-0.0902334600687027,
-0.171639546751976,
0.684235692024231,
0.49064165353775024,
-0.019556481391191483,
-0.33119314908981323,
-0.05537647381424904,
0.3182000517845154,
-0.7114352583885193,
1.1387542486190796,
0.1952352225780487,
0.605601966381073,
0.4766477048397064,
0.29022952914237976,
... |
def gen _ next _ int ( self ) : return self. _ gen _ next ( ) | [
-1.6005622148513794,
0.3157247006893158,
0.4797881245613098,
-0.061579879373311996,
-1.3052500486373901,
-0.012654420919716358,
0.8921548128128052,
-0.40260037779808044,
-0.6276736259460449,
-1.2502894401550293,
-0.4564409852027893,
-0.41987189650535583,
-0.7589097023010254,
-0.22760897874... |
def area ( r, shape _ constant ) : assert r > 0, " a length must be positive " return r * r * shape _ constant | [
0.4822017550468445,
-0.9042043089866638,
0.2877010405063629,
-0.8820697069168091,
-0.35370609164237976,
0.44502168893814087,
0.09665881097316742,
0.5140219926834106,
0.38101786375045776,
1.106452465057373,
0.03135118633508682,
0.14025528728961945,
0.3912358582019806,
0.48255297541618347,
... |
def _ _ matmul _ _ ( self, individual ) : offspring = individual ( ) for key in self. keys ( ) : if not key. startswith ( " _ _ " ) : ga = self. get ( key ) gb = individual. get ( key ) if ga = = gb : offspring [ key ] = np. random. choice ( [ ga, gb ] ). copy ( ) elif ga > gb : offspring [ key ] = ga. copy ( ) else : ... | [
-1.2537786960601807,
0.05220385268330574,
0.5320053696632385,
-0.3759123682975769,
-0.6711896657943726,
0.9077951312065125,
0.20420542359352112,
-0.24480098485946655,
0.22953294217586517,
0.6764593124389648,
0.09256632626056671,
0.49122190475463867,
-0.29007628560066223,
-0.512385547161102... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.