text stringlengths 25 2.19k | embedding listlengths 768 768 |
|---|---|
def rkhttphandlerclassfactory ( globals ) : class rkhttprequesthandler ( basehttprequesthandler ) : " " " class rkhttprequesthandler derived from basehttprequesthandler, a subclass to handle all http requests. " " " sessioncookies = dict ( ) def _ _ init _ _ ( self, * args, * * kwargs ) : " " " constructor of rkhttpreq... | [
-0.5917232036590576,
-0.8629475235939026,
1.0467023849487305,
0.5603586435317993,
-0.33207547664642334,
0.46580731868743896,
-0.3724748492240906,
-0.9064606428146362,
0.6392163634300232,
-0.3083829879760742,
-0.45127245783805847,
-0.026640573516488075,
-0.05167274549603462,
0.5639114975929... |
def calculate _ tx _ slug ( filepath ) : result = md5 ( filepath. encode ( ) ) return result. hexdigest ( ) | [
0.63089519739151,
-0.08860813081264496,
0.2092452347278595,
-1.076445460319519,
-0.2095853090286255,
-0.2944377064704895,
0.11466926336288452,
1.4506055116653442,
-0.662747323513031,
0.5809493064880371,
-0.8228018283843994,
-0.943707287311554,
-0.39556238055229187,
-0.7003951072692871,
-... |
def get _ ipaddresses ( self, instance ) : # don't use ` ipaddresses ` property here to make use of # ` ethernet _ _ ipaddresses ` in prefetch related ipaddresses = [ ] for eth in instance. ethernet _ set. all ( ) : try : ipaddresses. append ( eth. ipaddress. address ) except attributeerror : pass return ipaddresses | [
-1.046656847000122,
0.5366475582122803,
0.4765089452266693,
-0.4422317445278168,
0.568320095539093,
-0.10292837768793106,
-0.5676743984222412,
0.27285516262054443,
0.6140246987342834,
0.7714848518371582,
0.39006590843200684,
-0.5041430592536926,
0.25494301319122314,
-0.01691216416656971,
... |
def change _ nik ( self, cr, uid, ids, context = none ) : if context is none : context = { } employee _ obj = self. pool. get ('hr. employee') for data in self. browse ( cr, uid, ids, context = context ) : ctx = context. copy ( ) ctx ['name _ related'] = data. nik _ br employee _ obj. write ( cr, uid, [ data. employee ... | [
-0.4723922908306122,
-0.2962888181209564,
0.873214066028595,
-0.7641439437866211,
-0.49999576807022095,
-0.08563319593667984,
0.9946340918540955,
0.47546884417533875,
-0.12257279455661774,
0.42516130208969116,
-0.8298172354698181,
0.08650192618370056,
-0.4804243743419647,
-0.05200953781604... |
def download ( url : str, save _ path : str ) : # create save _ dir if not present create _ dir ( os. path. dirname ( save _ path ) ) # download file gdown. download ( url, save _ path, quiet = false ) | [
0.5641994476318359,
-0.24776716530323029,
0.5885925889015198,
1.2390990257263184,
0.722723126411438,
1.0403167009353638,
0.765102744102478,
-0.10293541103601456,
-0.3198968768119812,
-0.0909406989812851,
-0.5357959866523743,
-0.2835102081298828,
-0.4941406548023224,
-0.3037455976009369,
... |
def test _ addcircuit _ simple _ inputs ( self ) : add = elementary. addcircuit ( ) circuit = cirq. circuit ( cirq. x ( cirq. gridqubit ( 0, 0 ) ) * * ( sympy. symbol ('alpha') * sympy. pi ) ) add ( [ circuit, circuit ], append = circuit ) add ( [ circuit, circuit ], prepend = circuit ) add ( circuit, append = circuit ... | [
-0.7431674599647522,
-0.2329290360212326,
0.5517857074737549,
-0.5814359784126282,
0.348333477973938,
0.5246956944465637,
0.2667067348957062,
-0.6643246412277222,
0.7130271792411804,
-0.9701980352401733,
-0.3312101662158966,
-0.1191994771361351,
-0.6415389180183411,
0.9633027911186218,
0... |
def update _ rate _ coefficients ( self, data, t, rfield ) : # return zeros for everything if rt is off if not self. pf ['radiative _ transfer'] : self. kwargs = self. rates _ no _ rt. copy ( ) return self. kwargs else : self. kwargs = { } # parse column densities, set attributes for attribute in ['logn _ by _ cell ','... | [
-0.3625105917453766,
-0.2362273931503296,
0.6723172068595886,
-0.7170343399047852,
0.4354815185070038,
-0.532995343208313,
-0.12813816964626312,
-0.3506070077419281,
-0.5351611971855164,
0.40121322870254517,
-0.365293949842453,
-0.12535639107227325,
-0.058640092611312866,
0.602564573287963... |
def test _ edit _ editform _ get ( self ) : user. objects. create _ user ( username ='edit _ editform ', password ='password') self. client. login ( username ='edit _ editform ', password ='password') with patch ('user _ auth. views. editform') as form : self. client. get ('/ user _ auth / edit /') user. objects. get (... | [
-0.3223271667957306,
0.184330016374588,
0.5710045695304871,
-0.23774832487106323,
0.4291033446788788,
-0.07888541370630264,
0.20330321788787842,
0.2702440023422241,
0.6207878589630127,
-1.3280062675476074,
-0.5029839873313904,
0.5983203053474426,
0.41869115829467773,
-0.2891401946544647,
... |
def _ generate _ workspace _ name ( self ) - > str : return self. app | [
-0.23091474175453186,
-0.729157567024231,
0.3375396728515625,
-0.1182476282119751,
-1.2116553783416748,
1.2615445852279663,
-0.28775471448898315,
-0.603204071521759,
0.6732745170593262,
0.08699623495340347,
0.632207989692688,
-0.24856281280517578,
0.37529441714286804,
0.2492694854736328,
... |
def effective _ rent _ period ( cls, start _ date, end _ date, * * kwargs ) : hourly _ price = kwargs. get ('hourly _ price') daily _ price = kwargs. get ('daily _ price') weekly _ price = kwargs. get ('weekly _ price') monthly _ price = kwargs. get ('monthly _ price') td = end _ date - start _ date days = td. days hou... | [
-0.32634133100509644,
-0.17297330498695374,
1.0474135875701904,
-0.4248499870300293,
0.3074953854084015,
0.2873440682888031,
-0.31670883297920227,
-0.8805443644523621,
-0.43181321024894714,
0.6516423225402832,
0.2116350680589676,
0.3919254541397095,
0.37694820761680603,
0.5140673518180847,... |
def right ( cls, parallel _ size = 2068, serial _ size = 2072, parallel _ overscan _ size = 20, serial _ prescan _ size = 51, ) : parallel _ overscan = reg. region2d ( ( parallel _ size - parallel _ overscan _ size, parallel _ size, 0, serial _ size - serial _ prescan _ size, ) ) serial _ prescan = reg. region2d ( ( 0,... | [
0.7251383066177368,
0.2542489767074585,
0.9515076279640198,
-0.2183053344488144,
-0.909550666809082,
-0.28247231245040894,
0.3937835693359375,
-0.747273862361908,
0.7222744226455688,
-0.9218008518218994,
0.5930600762367249,
0.3983384072780609,
-0.22479139268398285,
-0.7694404721260071,
0... |
def parse _ token _ sequence ( scanner, token _ types ) : return [ parse _ token ( scanner, t ) for t in token _ types ] | [
-1.2019597291946411,
-0.3395380973815918,
0.24225342273712158,
0.4542807936668396,
0.41585373878479004,
-0.6268467903137207,
-0.8624801635742188,
0.1306055784225464,
-1.147739291191101,
0.034516651183366776,
-0.8895827531814575,
-0.6502727270126343,
-0.05391574278473854,
0.7066612243652344... |
def list _ team _ codes ( ) : # sort teams by league, then alphabetical by code cleanlist = sorted ( team _ data, key = lambda k : ( k [ " league " ] [ " name " ], k [ " code " ] ) ) # get league names leaguenames = sorted ( list ( set ( [ team [ " league " ] [ " name " ] for team in cleanlist ] ) ) ) for league in lea... | [
0.8327491283416748,
-0.4340023994445801,
0.7035413384437561,
-1.3675278425216675,
-0.20322442054748535,
-0.8508105278015137,
-1.1513524055480957,
0.07074806094169617,
0.6462409496307373,
0.3240290582180023,
-1.0049654245376587,
1.2726598978042603,
1.3155279159545898,
0.10922890156507492,
... |
def load _ image ( self, im, bins = 256 ) : if not type ( im ) = = np. ndarray : raise valueerror ('must be passed numpy array. got'+ str ( type ( im ) ) +'instead') if im. ndim = = 3 : raise valueerror ('image must be greyscale ( and single value per pixel )') self. im = im hist, ranges = np. histogram ( im, bins ) hi... | [
-0.46820661425590515,
0.9492371082305908,
0.539611279964447,
0.1354093700647354,
0.1833437830209732,
-0.07732842862606049,
0.41791221499443054,
-0.35268181562423706,
1.299256443977356,
0.12172691524028778,
0.18201375007629395,
0.13473404943943024,
-0.47164660692214966,
0.8513922095298767,
... |
def _ dummy _ logger ( * args, * * kwargs ) - > none : print ( " what " ) | [
-0.331294983625412,
-0.4643588662147522,
0.8435854315757751,
-0.9918906688690186,
0.25131896138191223,
-0.04417520388960838,
-0.41646915674209595,
-0.6239398717880249,
0.04256421700119972,
-0.12495972216129303,
-0.4472399055957794,
1.1243304014205933,
-0.11141552031040192,
0.43440306186676... |
def d ( tag, message ) : # pylint : disable = invalid - name date = _ _ get _ date ( ) if log _ level _ stdout > = 5 : _ _ log _ to _ stdout ( colors. color _ deb, date, tag + " / d ", message ) if log _ level _ file > = 5 : _ _ log _ to _ file ( date, tag + " / d ", message ) | [
-0.03847769275307655,
0.40383124351501465,
0.6495841145515442,
0.3013758957386017,
-0.19027332961559296,
-0.16896457970142365,
0.5521203875541687,
-1.1312692165374756,
-1.4907547235488892,
-0.6825426816940308,
0.3224222958087921,
0.3611029386520386,
0.5797079205513,
1.3658132553100586,
0... |
def do _ update ( self, node _ id ) : _ error _ code, _ msg = ramstkdatamodel. do _ update ( self, node _ id ) if _ error _ code! = 0 : _ error _ code = 2006 _ msg ='ramstk error : attempted to save non - existent'\'designmechanic record id { 0 : d }. '. format ( node _ id ) return _ error _ code, _ msg | [
-0.2249709516763687,
0.17017421126365662,
0.5574561357498169,
-0.3155142068862915,
0.6028650999069214,
-0.3273540437221527,
0.055746156722307205,
-0.2525189220905304,
-0.3849359154701233,
0.9140800833702087,
-0.4264713227748871,
0.3891432583332062,
-0.28654202818870544,
-0.0364845879375934... |
def test _ transaction _ stellar _ filter ( client, acc1 _ usd _ deposit _ transaction _ factory, acc2 _ eth _ withdrawal _ transaction _ factory, ) : acc1 _ usd _ deposit _ transaction _ factory ( client _ address ) withdrawal = acc2 _ eth _ withdrawal _ transaction _ factory ( client _ address ) encoded _ jwt = sep10... | [
0.354690283536911,
0.5081796646118164,
0.5112834572792053,
0.27819862961769104,
0.004400813952088356,
-0.24298886954784393,
-0.29968664050102234,
-0.01919185183942318,
-0.24067062139511108,
-0.6360558271408081,
-0.49200522899627686,
0.20411284267902374,
1.2250947952270508,
-0.2470468431711... |
def make _ connector ( id ) : cons = { } def set _ val ( source, values ) : pass def has _ val ( ) : pass def forget ( ) : pass def connect ( ) : pass def dispatch ( message, source = none, values = none ) : if message = = " set _ val " : return set _ val ( source, values ) elif message = = " has _ val " : return has _... | [
-0.6695058345794678,
-0.5300843119621277,
0.6460177302360535,
-0.20445580780506134,
-0.4040205180644989,
-0.5514108538627625,
-0.2942746877670288,
-0.6411239504814148,
0.44246527552604675,
-0.385732501745224,
-0.6995475888252258,
-0.5080987215042114,
0.42985621094703674,
0.5685555934906006... |
def add _ async ( self, queue _ name = _ default _ queue, transactional = false, rpc = none ) : return queue ( queue _ name ). add _ async ( self, transactional, rpc ) | [
-0.40760907530784607,
0.12443464249372482,
0.7559338212013245,
0.20626360177993774,
0.2976989448070526,
-0.5739739537239075,
-1.2739181518554688,
-0.11299732327461243,
0.4661293029785156,
0.1218496561050415,
0.0378442145884037,
-0.06964105367660522,
-0.4279118776321411,
0.03978835418820381... |
def wrap _ make _ option _ parser ( self ) : self. times _ help _ printed = 0 self. parser _ errors = [ ] real _ make _ option _ parser = s3mysqldump. make _ option _ parser def fake _ print _ help ( ) : self. times _ help _ printed + = 1 def fake _ error ( msg ) : self. parser _ errors. append ( msg ) sys. exit ( 1 ) ... | [
-0.6775074601173401,
-0.5543493032455444,
0.5011489987373352,
-0.5878971815109253,
0.001014495617710054,
0.26925116777420044,
0.1665513664484024,
-0.4392254948616028,
0.5865217447280884,
-0.10555974394083023,
-0.3947194814682007,
0.19808313250541687,
0.7710732221603394,
-0.0163874309509992... |
def network _ watcher _ name ( self ) - > pulumi. output [ str ] : return pulumi. get ( self, " network _ watcher _ name " ) | [
0.3811395466327667,
-0.6511029005050659,
0.3472525477409363,
-0.27311140298843384,
-0.21006706357002258,
1.5360757112503052,
0.134487122297287,
-0.49678993225097656,
-0.5628852844238281,
-0.16624699532985687,
-0.32992395758628845,
0.07212700694799423,
0.6453447937965393,
0.0303433146327734... |
def py _ call _ shell ( cmd ) : status, output = commands. getstatusoutput ( cmd ) print " status : ", status for line in output. split ('\ n') : print line | [
0.07948926836252213,
-0.7081090211868286,
0.5879061818122864,
0.2806689143180847,
-0.3250826895236969,
0.1609784960746765,
-1.3298969268798828,
0.09426528215408325,
0.003871676977723837,
-0.04944668337702751,
-0.34589681029319763,
0.4607562720775604,
0.24252066016197205,
1.1895332336425781... |
def test _ quantity _ scalar _ type ( ) : test _ obj = uvtest ( ) test _ obj. _ quantity _ scalar. expected _ type = ( float, np. floating ) with uvtest. check _ warnings ( userwarning, " parameter _ quantity _ scalar is a quantity object, but the expected type " " is a precision identifier : ( < class'float'>, < class... | [
0.7104837894439697,
-0.47469353675842285,
0.5941401720046997,
0.6151765584945679,
0.5558573603630066,
0.3386707603931427,
0.5051223635673523,
-0.8334486484527588,
0.4200659692287445,
-0.6813417673110962,
-0.024679668247699738,
0.5145851373672485,
0.322763055562973,
0.3585765063762665,
0.... |
def expanded _ sorted _ listeners ( self ) - > list : # well, this doesn't really work because it only merged wildcards into # events that are already explicitly listened too # like uvicore. foundation. events. app. * only shows up under booted # not registered because no other event has explicitly listened to # regist... | [
0.23491895198822021,
-0.2920372486114502,
0.7177493572235107,
-0.005654247477650642,
-0.09404385089874268,
0.017146702855825424,
-0.40401703119277954,
-0.017869455739855766,
0.36624136567115784,
-0.09889346361160278,
-0.17634229362010956,
0.3381234109401703,
0.12574715912342072,
0.63730376... |
def get _ info ( domain ) : out = [ ] if domain. startswith ('http : / / web. archive. org /') or domain = = " " : return out f = tempfile. namedtemporaryfile ( delete = false ) exec _ command = " whois " + domain + " > " + f. name tt = command. _ run ( exec _ command, 15 ) if tt : for t in tt. split ( " \ r " ) : x = ... | [
-0.6884791254997253,
-0.2655394375324249,
0.8790873885154724,
-0.22937844693660736,
-0.5543226003646851,
-0.36289629340171814,
-0.24877579510211945,
0.2382054626941681,
0.1000138372182846,
0.4115358591079712,
-0.37837278842926025,
0.1439329981803894,
0.33146652579307556,
0.2959355413913727... |
def message ( self, message ) : self. _ message = message | [
-0.7333869934082031,
1.0515129566192627,
-0.018555233255028725,
-0.07605429738759995,
0.5721829533576965,
0.5068607926368713,
0.09689738601446152,
0.15324769914150238,
-0.9746397137641907,
-0.921058714389801,
-0.2712368369102478,
0.2585657238960266,
-0.5418626666069031,
1.4343664646148682,... |
def set _ 5gnr _ usermargin ( self, pwr ) : self. write ( f'conf : nrmm : meas : rfs : umar { pwr } db') | [
-0.9617898464202881,
0.2178560346364975,
0.43624886870384216,
-0.05161571502685547,
0.4328223764896393,
1.0157524347305298,
0.6002883315086365,
-0.49321117997169495,
0.7021002769470215,
-0.5959028005599976,
-0.035767827183008194,
-0.21844913065433502,
-1.109270453453064,
1.152326226234436,... |
def text ( self ) : try : return self. browser. text ( self. text, parent = self ) except nosuchelementexception : return none | [
0.319637656211853,
-0.3956313729286194,
0.5000029802322388,
0.7577054500579834,
-0.6754261255264282,
-0.40002763271331787,
0.07380714267492294,
-0.721392035484314,
0.8741660714149475,
-0.31611713767051697,
0.039232153445482254,
-0.6359462141990662,
-0.5382007360458374,
-0.26188886165618896... |
def get _ import _ group ( self, imp : str ) : for group in self. import _ groups : if imp. startswith ( group [ 0 ] ) : return group [ 1 ] return len ( self. import _ groups ) | [
-0.09122142940759659,
0.8258346319198608,
0.49467116594314575,
-0.5047226548194885,
-0.7132849097251892,
-0.6033305525779724,
0.5050579309463501,
-0.4605984389781952,
-0.06141800060868263,
1.1229705810546875,
-0.29323479533195496,
1.0558732748031616,
-1.0250495672225952,
0.0783874094486236... |
def test _ _ constant _ probability _ density ( self ) : # setup instance = univariate ( ) instance. constant _ value = 3 x = np. array ( [ 1, 2, 3, 4, 5 ] ) expected _ result = np. array ( [ 0, 0, 1, 0, 0 ] ) # run result = instance. _ constant _ probability _ density ( x ) # check compare _ nested _ iterables ( resul... | [
-0.308400958776474,
0.18601319193840027,
0.5720304250717163,
0.33856040239334106,
-0.21020084619522095,
0.8117431998252869,
0.16161859035491943,
0.9312729239463806,
-0.5243540406227112,
0.0031352373771369457,
0.09868437796831131,
-0.6024056077003479,
-0.12126632779836655,
0.040036160498857... |
def get _ sdk _ version ( self ) : pass | [
-0.7834310531616211,
0.09913583844900131,
0.195431187748909,
2.0190155506134033,
-0.2821541130542755,
-0.3259611129760742,
0.065700002014637,
-0.111084945499897,
-0.4759986400604248,
-0.3472841680049896,
-0.6197242140769958,
0.13213735818862915,
0.3223316967487335,
0.7231640219688416,
-0... |
def get _ main _ sphinx _ section _ name ( ) : return'% s _ % s'% ( default _ section _ prefix, configuration _ section _ main ) | [
0.08474747836589813,
-0.3873279094696045,
0.6473400592803955,
0.034635405987501144,
-0.4214094877243042,
0.4998665452003479,
-0.41459226608276367,
0.14832556247711182,
-0.5393818020820618,
0.20298422873020172,
0.938401997089386,
0.03641005977988243,
0.5798128247261047,
0.5570866465568542,
... |
def _ _ get _ origin _ resolution ( self ) : if self. _ _ cam is not none : if self. _ _ override _ camera _ res : res _ scale = self. _ _ res _ fraction if res _ scale = = " specific " : return self. _ _ res _ override else : return ( int ( self. _ _ cam. parmtuple ( " res " ). eval ( ) [ 0 ] * float ( res _ scale ) )... | [
-0.6570541858673096,
-0.7588000893592834,
0.9068179130554199,
-0.037172894924879074,
0.16318395733833313,
-0.7445439696311951,
-0.4157674312591553,
0.25465717911720276,
-0.15219075977802277,
-0.022599725052714348,
-0.22372770309448242,
-0.5044764876365662,
-0.7250543832778931,
0.2291357666... |
def make ( cls, name, managerorref, obj = none, inheritref = false ) : if managerorref is none : return none elif isinstance ( managerorref, objrefmanager ) : manager = managerorref return cls ( name, manager, obj ) elif isinstance ( managerorref, objref ) : oldref = managerorref newref = cls ( name, oldref. _ _ manage... | [
-0.013245257548987865,
-0.8171432018280029,
0.8866413831710815,
-0.43945926427841187,
-0.2482784539461136,
0.4390885531902313,
0.001432423829101026,
-0.4860142469406128,
0.9111867547035217,
-0.31133997440338135,
0.000518081069458276,
0.5351279973983765,
-0.7538792490959167,
-0.219216182827... |
def test _ q _ area _ too _ many _ args ( self ) : with self. assertraises ( typeerror ) : r = self. r1. area ( 1 ) | [
0.020048808306455612,
0.7143813967704773,
0.3713237941265106,
0.059443503618240356,
0.49150189757347107,
0.6905059218406677,
0.5636910200119019,
-0.8997440338134766,
0.6275534629821777,
0.3606674075126648,
0.2503863573074341,
-0.6244834065437317,
-0.5646123886108398,
1.1649458408355713,
... |
def norm _ bs ( ages, t ) : left, right = 0, len ( ages ) - 1 while left < = right : mid = ( right + left ) / / 2 if ages [ mid ] = = t : return mid elif ages [ mid ] > t : right = mid - 1 else : left = mid + 1 return left | [
-0.3267325162887573,
-0.9101241230964661,
0.6503098011016846,
0.3134783208370209,
-0.882887601852417,
0.6135156154632568,
0.25452518463134766,
-0.2988237142562866,
0.14294467866420746,
0.7538774013519287,
-0.1534261703491211,
0.36122578382492065,
-0.3329288065433502,
0.35048845410346985,
... |
def test _ add _ step _ parameter ( self ) : pass | [
-0.33958691358566284,
0.5149016976356506,
0.44748133420944214,
1.1491639614105225,
0.5795648097991943,
1.0110708475112915,
1.1143436431884766,
-0.12192834168672562,
-0.7287817001342773,
-0.7513307332992554,
-1.191213607788086,
-0.541938066482544,
-0.7173041701316833,
1.4648525714874268,
... |
def convert ( cls, xml _ data, parser ) : tag = xml _ data [ " @ tag " ] if " @ tag " in xml _ data and xml _ data [ " @ tag " ] else none dimensions = ( int ( xml _ data [ " @ c " ] ), int ( xml _ data [ " @ r " ] ) ) if " @ c " in xml _ data and " @ r " in xml _ data else none location = ( int ( xml _ data [ " @ x " ... | [
0.38426026701927185,
-0.8801862001419067,
0.5289198756217957,
-0.2497595250606537,
-1.2742818593978882,
-0.32514065504074097,
-0.4219299554824829,
-0.4647389054298401,
-0.13918879628181458,
-0.6348651051521301,
0.5085252523422241,
-0.8805051445960999,
0.7177327871322632,
-0.105912327766418... |
def get _ countries _ geo ( df ) : world _ path ='data / data. geo. json'with open ( world _ path ) as f : geo _ world = json. load ( f ) geo _ world found = [ ] missing = [ ] countries _ geo = [ ] # instanciating necessary lists # for simpler acces, setting " zone " as index in a temporary dataframe tmp = df. set _ in... | [
0.35996466875076294,
-0.5846795439720154,
0.46660178899765015,
-0.18310211598873138,
-0.14174075424671173,
0.6088210344314575,
0.1893407553434372,
0.2000129520893097,
-0.6465573310852051,
0.44627901911735535,
-0.48125705122947693,
-0.19826100766658783,
0.5558652877807617,
0.932270228862762... |
def get _ file _ extension ( filename : str ) - > str : return filename. split ( ". " ) [ - 1 ] | [
0.3688433766365051,
0.614029049873352,
0.3636038601398468,
0.6306730508804321,
0.06881864368915558,
0.1954786330461502,
0.11459649354219437,
0.7714298367500305,
-0.2621082067489624,
0.544822096824646,
0.131131112575531,
0.3934786915779114,
-0.12036433070898056,
-0.17473194003105164,
1.16... |
def createfooddict ( food _ item _ list ) : food _ dict = { } for food _ item in food _ item _ list : words = food _ item. split ('' ) first _ word = words [ 0 ] food _ dict [ first _ word ] = food _ item return food _ dict | [
0.25590768456459045,
-0.2131955772638321,
0.41492828726768494,
-0.10841929167509079,
-0.09194471687078476,
-0.33105432987213135,
-0.4874347746372223,
1.08048415184021,
-0.4846245348453522,
0.32026875019073486,
-1.0566673278808594,
0.02293458767235279,
-0.15495243668556213,
0.98259812593460... |
def highscore ( self, max _ entries : int ) - > iterable [ player ] : s = self. _ session result = s. query ( player ). order _ by ( sa. desc ( player. score ) ). limit ( max _ entries ) return ( x for x in result ) | [
-0.335584819316864,
0.3968427777290344,
0.6368253231048584,
0.740605354309082,
0.8426857590675354,
-0.4469061493873596,
-1.6295377016067505,
-0.07910805195569992,
-0.09284615516662598,
0.42049822211265564,
-0.08001117408275604,
0.12709940969944,
-0.12898623943328857,
-0.24763955175876617,
... |
def post _ resource ( self, url, data ) : # set up headers headers = dict ( ) headers. update ( {'accept':'application / json'} ) # do the post requests r = requests. post ( url, headers = headers, verify = self. verify, data = json. dumps ( data ), proxies = self. proxies ) # if successful return data ( or empty json ... | [
-0.5106738805770874,
-0.4689057171344757,
0.6980202198028564,
-0.12868094444274902,
-0.7481013536453247,
-0.47795742750167847,
-1.5120316743850708,
-0.46455028653144836,
-0.18673370778560638,
0.055119242519140244,
-0.8966917395591736,
-0.2933214604854584,
-1.0634872913360596,
0.00259641860... |
def delete _ drawn _ object ( self, index ='' ) : self. add _ drawn _ object ( index, delete = true ) | [
0.07308217138051987,
0.1507156640291214,
0.6172244548797607,
-0.6643387079238892,
0.18768930435180664,
0.9365932941436768,
0.28790196776390076,
-0.17043648660182953,
1.0263316631317139,
-0.8687396049499512,
-0.9198802709579468,
0.8740068078041077,
-0.4975757896900177,
-1.06443190574646,
... |
def resample ( self, dt ) : partials = [ p. resample ( dt ) for p in self. partials ] return spectrum ( partials ) | [
-0.09452593326568604,
-0.7562633752822876,
0.4498905539512634,
-0.25410276651382446,
-0.9478543400764465,
-0.2480233758687973,
-1.3367869853973389,
-0.38883572816848755,
-0.2556457221508026,
-0.5771849751472473,
-0.10108763724565506,
-0.07689816504716873,
-0.16659486293792725,
-0.266919612... |
def generate _ data ( n, p _ oc, p _ co ) : # variable to denote state of the channel # 1 = > channel is open # 0 = > channel is closed state = 0 # list to store values in all iterations trials = [ state ] for i in range ( n - 1 ) : trial = random. uniform ( 0, 1 ) if state = = 1 : if trial < p _ oc : state = 0 elif st... | [
-0.7926942110061646,
0.47092369198799133,
0.4133063852787018,
-0.623455286026001,
0.8061111569404602,
0.6722032427787781,
-0.5245356559753418,
-0.20655733346939087,
-0.1734619140625,
-0.07005062699317932,
0.12354039400815964,
0.10821659117937088,
-0.014168158173561096,
0.37191134691238403,... |
def train _ docterm ( self ) : def dummy _ function ( doc ) : return doc # countvectorizer count _ vec = countvectorizer ( tokenizer = dummy _ function, preprocessor = dummy _ function, token _ pattern = none, encoding = self. train _ params [ " vectorizer _ encoding " ], decode _ error = self. train _ params [ " vecto... | [
0.30017325282096863,
0.30390340089797974,
0.7776632308959961,
0.4905906021595001,
-0.10802344977855682,
0.21857962012290955,
0.2424412965774536,
0.45519810914993286,
-0.45165830850601196,
-0.22420334815979004,
0.11002461612224579,
0.7752667665481567,
0.05747666582465172,
-0.012743134051561... |
def _ check _ if _ every _ array _ of _ the _ same _ size _ and _ type _ has _ indeed _ same _ size ( writer, array _ parameters, is _ in _ type ) : type _ str ='in'if is _ in _ type else'out'# get the list of parameters with the same size ( list of arrayssamesize objects ) arrays _ same _ sizes _ list = _ get _ arrays... | [
-0.3119409382343292,
-0.7828260064125061,
0.6974350214004517,
0.8277667760848999,
0.4881128966808319,
-0.4072568416595459,
0.7207439541816711,
-0.15843018889427185,
0.519298791885376,
0.8163809776306152,
0.020664693787693977,
0.8022311329841614,
-0.32392728328704834,
1.562896728515625,
0... |
def apply _ lighting _ adjustment ( self ) : image = self. modification _ information. image min = - self. preference. lighting _ factor max = self. preference. lighting _ factor contrast _ factor = int ( min + random. random ( ) * ( max - min ) + 1 ) exposure _ factor = int ( min + random. random ( ) * ( max - min ) +... | [
-0.6765391230583191,
-0.6082184314727783,
0.6130877733230591,
-0.3034658133983612,
0.10541138052940369,
-0.21171687543392181,
0.11573387682437897,
0.4727471172809601,
0.6280395984649658,
-0.817132294178009,
0.3605252206325531,
0.857380747795105,
-0.16429981589317322,
1.2283869981765747,
... |
def copyfeature ( shpname, sdeconnect, keeplist, inputfc, sqlq ='#') : # set the workspace to the sdeconnect variable given. get output is used as # a string to path avoids some issues. wsconnect = sdeconnect. getoutput ( 0 ) arcpy. env. workspace = wsconnect # empty field mapping object created fmap = arcpy. fieldmapp... | [
0.07289324700832367,
-0.33218705654144287,
0.8020923733711243,
0.6489295959472656,
-0.08158006519079208,
0.43801701068878174,
0.9068204760551453,
0.02595730498433113,
0.24134352803230286,
-0.03534296900033951,
-0.24128443002700806,
0.09668281674385071,
0.22283560037612915,
-0.1220921501517... |
def test _ filter _ visibility ( self ) : t1 = taskfactory ( name = " private _ task ", creator = self. user, visibility = task. visibilities. private ) t2 = taskfactory ( name = " team _ only _ task ", creator = self. user, visibility = task. visibilities. team _ only ) t3 = taskfactory ( name = " public _ task ", cre... | [
-0.06495492905378342,
0.6701138019561768,
0.7450122237205505,
0.26079994440078735,
-0.22451339662075043,
0.6416003704071045,
0.3236350119113922,
-0.17341186106204987,
-0.2337297648191452,
0.3140209913253784,
-0.7968024611473083,
-0.4470994770526886,
0.6939510703086853,
0.5148248076438904,
... |
def init ( self, job, gvol _ name ) : root _ handle = pyglfs. volume ( {'volume _ name': gvol _ name,'volfile _ servers': [ {'host':'127. 0. 0. 1 ','proto':'tcp ','port': 0 } ] } ). get _ root _ handle ( ) # create the root dir try : root _ handle. mkdir ( root _ dir _ name ) except pyglfs. glfserror as e : if e. errno... | [
0.19528494775295258,
-0.08259762078523636,
0.7723394632339478,
0.5681461691856384,
-0.3175050616264343,
-0.2712256610393524,
0.6451078653335571,
0.005588581319898367,
-0.38507410883903503,
-0.5008741617202759,
0.7995858192443848,
0.6380242109298706,
0.1494578719139099,
0.49895867705345154,... |
async def voices ( self ) - > voicesiterable : self. maybe _ load _ voices ( ) for voice in self. voices _ dict. values ( ) : yield voice | [
0.13007014989852905,
-0.8360486030578613,
0.24740126729011536,
0.15113244950771332,
0.7455992102622986,
-0.21690887212753296,
-1.471466302871704,
-0.6843570470809937,
-0.49210625886917114,
0.01078865583986044,
0.8816256523132324,
0.014769763685762882,
0.41265028715133667,
1.110051631927490... |
def calc _ demen ( self, model ) : self. _ reg _ write ( model. vars. rac _ rfenctrl _ demen, 1 ) | [
-0.16729207336902618,
0.49698343873023987,
0.26164740324020386,
0.15010757744312286,
0.8659795522689819,
-0.2332947701215744,
1.229160189628601,
0.5639515519142151,
-0.5312811136245728,
-0.5944610834121704,
-1.6753233671188354,
-1.054213523864746,
-0.7267221212387085,
0.41652098298072815,
... |
def obj _ to _ raw _ data ( self, obj ) : raw = dict ( obj. _ data ) raw [ " host " ] = obj. _ host. name raw [ " annex " ] = obj. _ annex. name raw [ " path " ] = obj. _ path return raw | [
-0.6848629713058472,
-0.5471693277359009,
0.6477850079536438,
-1.481821894645691,
-1.0848747491836548,
0.706142008304596,
-1.0713945627212524,
-0.47394368052482605,
-0.0620928630232811,
-0.2938917279243469,
-1.306589961051941,
0.727462887763977,
1.519529104232788,
-0.3221552073955536,
0.... |
def testsettaginstancewithimplicittagwithmalformedpath ( self ) : self. store. commit ( ) with login ( u'username ', uuid4 ( ), self. transact ) as session : thriftvalue = createthriftvalue ( 42 ) objectid = uuid4 ( ) deferred = self. facade. settaginstance ( session, u'username / $ bad! ', str ( objectid ), thriftvalu... | [
-0.1419355571269989,
-0.04340954124927521,
0.30022427439689636,
-0.12162478268146515,
0.10485609620809555,
0.9170384407043457,
0.2121557891368866,
0.0582745298743248,
0.2325495332479477,
-0.060607489198446274,
-0.9086349010467529,
-0.3024718463420868,
0.084641233086586,
0.8629868030548096,... |
def require _ mapping ( self ) - > none : if not isinstance ( self. yaml _ node, yaml. mappingnode ) : raise recognitionerror ( ('{ } { } a mapping is required here'). format ( self. yaml _ node. start _ mark, os. linesep ) ) | [
0.18936142325401306,
-0.025355419144034386,
0.7189766764640808,
-0.2747591435909271,
-0.3545699119567871,
0.33585941791534424,
0.5649754405021667,
1.4056344032287598,
0.15216128528118134,
-0.7944048643112183,
0.25063517689704895,
0.7833070158958435,
0.1251187026500702,
1.5988256931304932,
... |
def handle _ default ( self, request, response ) : self. send _ response ( 200 ) self. send _ header ('content - type ','text / plain ; charset = utf - 8') self. end _ headers ( ) self. wfile. write ('rkhttp is active... '. encode ('utf - 8') ) | [
0.3862927556037903,
-0.6360011100769043,
0.43529635667800903,
0.3250132203102112,
1.0537525415420532,
0.09263423085212708,
-0.019038012251257896,
-0.25552260875701904,
-0.32533353567123413,
0.28493213653564453,
-0.7303723692893982,
-0.42129239439964294,
-0.7565041780471802,
-0.244047388434... |
def add _ files ( self, host _ files : iterable [ str ] ) - > none : assert not self. _ running # partition the files by host directory host _ files _ by _ dir = { } for host _ file in host _ files : if host _ file not in self. input _ file _ map : host _ files _ by _ dir. setdefault ( os. path. dirname ( host _ file )... | [
-0.22382423281669617,
-0.20038674771785736,
0.9301662445068359,
0.19896945357322693,
0.6492345333099365,
0.34291842579841614,
1.120465636253357,
0.2825559377670288,
-0.4610084891319275,
-0.6068733334541321,
0.23638643324375153,
-0.4261261224746704,
-0.5675583481788635,
0.04777951166033745,... |
def multi _ rnn _ cell ( self, batch _ size ) : rnn _ cell = tf. contrib. rnn. multirnncell ( [ self. rnn _ cell ( n _ cells ) for n _ cells in self. rnn _ layers ] ) state = rnn _ cell. zero _ state ( batch _ size, dtype = self. dtype ) return rnn _ cell, state | [
-0.021715177223086357,
-0.3161187469959259,
0.4322829246520996,
0.7470851540565491,
0.7360854148864746,
-0.7761796116828918,
-0.06829527765512466,
-0.12320847064256668,
0.3449481427669525,
-0.38341793417930603,
-0.4455423653125763,
-0.48282390832901,
0.8835667967796326,
1.3578109741210938,... |
def parse _ u ( rdata ) : lines = rdata. split ('\ n') # parse input file into list of lines data = [ ] for line in lines [ : - 1 ] : d1 = line. split ( " : " ) d2 = [ int ( d1 [ 1 ] [ : - 7 ] ) ] us = d1 [ 3 ] [ 2 : - 6 ]. split ( ", " ) for u in us : d2. append ( float ( u ) ) data. append ( tuple ( d2 ) ) return dat... | [
-0.5651004910469055,
0.10490745306015015,
0.5613192915916443,
-0.022694703191518784,
-0.1714302897453308,
0.8480574488639832,
0.2315206229686737,
1.1201703548431396,
-0.44129833579063416,
0.2207399606704712,
-0.5363158583641052,
-0.7772021889686584,
-0.12509548664093018,
-0.164999932050704... |
def _ delete _ consistencygroup ( self, context, group, volumes ) : ret = 0 volumes = self. db. volume _ get _ all _ by _ group ( context, group. id ) model _ update = { } model _ update ['status'] = group. status log. info ('start to delete consistency group : % ( cg _ name ) s ', {'cg _ name': group. id } ) try : sel... | [
-0.6899393796920776,
-0.3249209523200989,
0.39565515518188477,
-0.3661850094795227,
0.2739156484603882,
-0.5315467119216919,
0.14807316660881042,
0.5238869190216064,
-0.08612607419490814,
1.0107133388519287,
-0.06566274166107178,
-0.765395998954773,
-0.3979188799858093,
0.7732884287834167,... |
def get _ num _ possible _ values ( self ) : pass | [
-0.42841583490371704,
1.1192505359649658,
0.39093974232673645,
0.982738196849823,
0.700742244720459,
-0.20233981311321259,
0.0793931856751442,
1.252581238746643,
-1.0872466564178467,
-0.9806275367736816,
-1.239440679550171,
-0.21204106509685516,
0.32150501012802124,
0.8410042524337769,
0... |
def import _ note ( self, index, show _ note = none, full _ note = none, keyset = none ) : if not str ( index ). startswith ('%') : self. note _ stack. add ( ( str ( index ), show _ note, full _ note, keyset ) ) else : self. note _ stack. add ( ( str ( index ) ) ) | [
-0.02690122276544571,
1.26427161693573,
0.6335592865943909,
0.1028139516711235,
-0.009823516942560673,
0.3408234417438507,
0.01222962699830532,
-0.8256120085716248,
0.32116833329200745,
1.0644817352294922,
-0.5098812580108643,
0.5126889944076538,
-0.6275413036346436,
-0.570569634437561,
... |
def test _ check _ input _ invalid _ basevalues _ idx ( ) : with pytest. raises ( typeerror ) : mob. check _ inputs ( chmask, basevalues _ idx = 0, window _ idx ='invalid') | [
-0.1478002369403839,
0.06193949282169342,
0.31766968965530396,
1.3871185779571533,
0.7859124541282654,
0.9712940454483032,
0.014946908690035343,
-0.2741833031177521,
-0.06716430932283401,
-0.7163134217262268,
0.027501937001943588,
0.7725356817245483,
-0.8222891092300415,
0.5763100385665894... |
def add _ lines ( lines, output _ lines ) : status = highest _ priority ( [ line for line in ( lines + output _ lines ) if is _ status _ line ( line ) ] ) return [ status ] + [ line for line in ( lines + output _ lines ) if is _ metric _ line ( line ) ] | [
0.5364187955856323,
-0.4994818866252899,
0.4676438868045807,
1.2109079360961914,
0.1153794527053833,
0.4177851378917694,
-1.6134042739868164,
0.47114405035972595,
0.21567192673683167,
-0.20152083039283752,
1.5959503650665283,
-0.4601510465145111,
0.3861790895462036,
0.2957274913787842,
-... |
def validatetensorrepresentationsinschema ( schema : schema _ pb2. schema, tensor _ representation _ group _ name : str = _ default _ tensor _ representation _ group ) : tensor _ representations = gettensorrepresentationsfromschema ( schema, tensor _ representation _ group _ name ) if tensor _ representations is none :... | [
-0.6959336996078491,
0.32952603697776794,
0.45913898944854736,
-0.4498171806335449,
0.08428932726383209,
0.06751012802124023,
1.0711760520935059,
0.24947589635849,
-0.31178876757621765,
0.2037639319896698,
-0.02136269211769104,
0.056453462690114975,
-0.34693631529808044,
0.1339029520750045... |
def _ populate _ cache ( self ) : if self. _ data _ id is none : return if self. _ cache is none : # todo : implement fetching via the protocol once available. raise notimplementederror | [
-0.11279454082250595,
0.5916427373886108,
0.5036974549293518,
-0.3005964756011963,
0.4514084756374359,
0.44470396637916565,
-0.8160560727119446,
-0.7657123804092407,
0.4692472219467163,
0.06458310782909393,
0.07227510958909988,
0.16641952097415924,
0.06870895624160767,
0.6563380360603333,
... |
def processinput ( self ) : qobject. disconnect ( self. ui. inputwidget, signal ( " textchanged ( ) " ), self. processinput ) self. text = qstring ( self. ui. inputwidget. tohtml ( ) ) for emoticon in self. emoticonlist : if self. text. contains ( emoticon ) = = true : print emoticon self. text. replace ( emoticon, " <... | [
-0.6068548560142517,
-0.07741749286651611,
0.4507172703742981,
-0.25811466574668884,
-0.6891457438468933,
0.30450117588043213,
0.33372974395751953,
0.33736589550971985,
0.33121225237846375,
0.9369592666625977,
-0.9992218017578125,
-0.22470024228096008,
-0.6030750274658203,
0.59422057867050... |
def cleantext ( text ) : # clean : xml tags and mathtype - > spaces cleantext = replacewithspaces ( xmltagsre, text ) cleantext = replacewithspaces ( mathtypere, text ) # clean : non - letters - > spaces cleantext = nonletterre. sub ( " ", cleantext ) cleantext = digitre. sub ( " ", cleantext ) return cleantext | [
0.8583319187164307,
-0.2364082932472229,
0.36380770802497864,
0.16617442667484283,
-1.2281169891357422,
0.17794211208820343,
-0.12993568181991577,
-0.5984426140785217,
0.5609282851219177,
0.3042769432067871,
0.2808264493942261,
-0.5314298272132874,
-0.3379792869091034,
1.579430103302002,
... |
def calculate _ total ( diceresults ) : total = 0 for rollresult in diceresults : total = total + rollresult return total | [
-0.8743947744369507,
-0.07935522496700287,
0.3701856732368469,
-0.14195436239242554,
0.1360223889350891,
-0.6761030554771423,
0.41503360867500305,
0.2849969267845154,
1.2522798776626587,
0.1940562129020691,
-1.1605592966079712,
-0.7258734703063965,
-0.3946676552295685,
0.30210548639297485,... |
def test _ projection _ closed _ curves ( self ) : planar _ closed _ curves = self. space _ closed _ curves _ in _ euclidean _ 2d cells, _, _ = data _ utils. load _ cells ( ) curves = [ cell [ : - 10 ] for cell in cells [ : 5 ] ] for curve in curves : proj = planar _ closed _ curves. project ( curve ) expected = proj r... | [
-0.14147046208381653,
0.19480951130390167,
0.41562891006469727,
0.09823577851057053,
0.15422970056533813,
0.6498523950576782,
-0.027007456868886948,
-0.8497589826583862,
-0.1287679225206375,
0.15518231689929962,
0.25321483612060547,
-0.593925416469574,
-1.2090325355529785,
-0.6892198920249... |
def get _ user ( self, name ) : url = self. get _ url ( " users ", name ) return self. get _ resource ( url ) | [
-1.2194072008132935,
0.04489567130804062,
0.30015432834625244,
0.61417156457901,
-0.3078850209712982,
-0.9089949131011963,
-0.7337155938148499,
-0.9096617102622986,
0.4112679660320282,
-0.10076435655355453,
-0.36228692531585693,
0.31760692596435547,
-0.6851168870925903,
-0.3790065944194793... |
def postprocess _ data ( data : list ) : data = handle _ missing _ data ( data ) # normalize currency value in place c = currency _ converter. currencyconverter ('http : / / www. ecb. int / stats / eurofxref / eurofxref - hist. zip') for row in data : try : row ['amount'] = c. convert ( row ['amount'], row ['currency']... | [
0.0502534881234169,
-0.07677308470010757,
0.6142625212669373,
-0.14588801562786102,
0.2027134895324707,
0.364764928817749,
-0.23625846207141876,
0.2198106050491333,
1.174766182899475,
-0.2552904486656189,
-0.20165586471557617,
-0.7128638029098511,
-0.32484710216522217,
0.4529520571231842,
... |
def get _ url ( request, url ) : all _ responses = { } image _ responses = { } for ip in outpost _ ips : r = requests. get ( f " { ip } / fetch? url = { url } " ) all _ responses [ ip ] = r. text i = requests. get ( f " { ip } / screenshot? url = { url } " ) image _ responses [ ip ] = i. content response _ iter = iter ... | [
-1.6257692575454712,
-0.3462405204772949,
0.914810299873352,
-0.298327773809433,
-0.04816621169447899,
-0.4787197709083557,
0.11980576813220978,
-0.31076833605766296,
0.35265615582466125,
0.27038928866386414,
-0.07413932681083679,
-0.7371690273284912,
0.9266287684440613,
0.8125051856040955... |
def insert _ update ( self, stable, lfields, datavalues = none ) : sfields _ cond = lfields [ 0 ] for sfield in lfields [ 1 : - 1 ] : sfields _ cond + = ", " + sfield if lfields [ - 1 ] is none : sfield _ val = " " else : sfield _ val = lfields [ - 1 ] if lfields [ - 1 ] is none : iret = self. insert _ many _ temporal ... | [
-0.6650223135948181,
0.2738509774208069,
1.111264944076538,
-0.17691932618618011,
-0.4797801971435547,
0.4527386724948883,
0.5673496723175049,
0.2408616542816162,
-1.2621220350265503,
-0.14970727264881134,
-0.8210884928703308,
-1.0269354581832886,
-0.5035862326622009,
0.5212545990943909,
... |
def dlogpdf _ dlink ( self, link _ f, y, y _ metadata = none ) : return y / link _ f - 1 | [
-0.47134700417518616,
-0.4375825822353363,
0.4379345178604126,
-0.1641034185886383,
0.9163654446601868,
-0.30450505018234253,
-0.11774295568466187,
0.4969395399093628,
-0.46096882224082947,
-1.0300655364990234,
1.2115094661712646,
0.3741946816444397,
0.4647473096847534,
-0.2953256666660309... |
def _ _ init _ _ ( self, * * kwargs ) : pass | [
0.4641982614994049,
-0.6183441877365112,
0.4122273921966553,
1.0774389505386353,
0.17340177297592163,
0.4844728112220764,
-0.26746779680252075,
-0.18785180151462555,
0.17671945691108704,
-0.7009865045547485,
-0.7780328392982483,
-0.009314377792179585,
-0.531758725643158,
0.4010368287563324... |
def decode _ auth _ token ( auth _ token ) : try : payload = jwt. decode ( auth _ token,'secret ', algorithms = ['hs256'] ) except jwt. expiredsignatureerror : return'signature expired. please log in again.'except jwt. invalidtokenerror : return'invalid token. please log in again. ' | [
-0.38415247201919556,
-0.6129233837127686,
0.34868282079696655,
0.25759515166282654,
-0.44696810841560364,
-0.4819483160972595,
-0.8357735276222229,
-0.20728279650211334,
0.4613921642303467,
0.22356964647769928,
-1.076256275177002,
0.30894705653190613,
-0.05902779474854469,
-0.557981789112... |
def setup ( self ) : self. client = client ( ) | [
0.5491852164268494,
-0.7027661204338074,
-0.02560402639210224,
-0.7705169916152954,
1.0318137407302856,
0.3781515657901764,
0.9684716463088989,
0.061618827283382416,
-0.3185483515262604,
-0.49574339389801025,
-0.38924020528793335,
0.5686047673225403,
-0.6335025429725647,
0.0275592934340238... |
def tobs ( ) : session = session ( engine ) results = session. query ( measurement. date, measurement. tobs ). filter ( measurement. date < ='2017 - 08 - 23'). filter ( measurement. date >'2016 - 08 - 23'). all ( ) tobs _ list = [ ] for date, tobs in results : tobs _ dict = { } tobs _ dict [ " date " ] = date tobs _ di... | [
-0.6616275310516357,
0.10160480439662933,
0.7141382694244385,
-0.263842910528183,
-0.7883356213569641,
0.08177319914102554,
-0.4717176556587219,
-0.3617841601371765,
-0.05689333751797676,
1.2261067628860474,
-0.17168520390987396,
-0.2634039521217346,
1.021986484527588,
0.530164361000061,
... |
async def time _ left ( self, ctx ) : if not await self. bot. has _ perm ( ctx, ignored _ rooms = true ) : return channel = ctx. channel user = ctx. author # check if this channel is a temp channel db _ entry = self. bot. get _ temp _ room ( room _ id = channel. id ) if not db _ entry : await ctx. send ( " this channel... | [
0.10896988958120346,
0.07645636796951294,
0.863059937953949,
-0.46569570899009705,
0.4648807942867279,
0.6294543743133545,
-0.8709073066711426,
0.2931228578090668,
0.05601714178919792,
1.178879737854004,
-0.6808228492736816,
0.39550623297691345,
-1.2014795541763306,
1.2107460498809814,
0... |
def draw _ button ( self ) : self. screen. fill ( self. button _ color, self. rect ) self. screen. blit ( self. msg _ image, self. msg _ image _ rect ) | [
-0.042025722563266754,
0.07385437190532684,
0.41275668144226074,
-0.7636026740074158,
1.5888690948486328,
1.3687713146209717,
-0.1794673353433609,
-0.3685891926288605,
-0.3182855546474457,
-0.4050474464893341,
0.09544259309768677,
0.7195841073989868,
0.07929342985153198,
0.8145504593849182... |
def get _ gene _ groups _ from _ pfams ( pfam _ list, pfam _ file _ dir, geneid2group, geneid2descriptions ) : if pfam _ file _ dir [ - 1 ]! ='/': pfam _ file _ dir + ='/'# make a dictionary where the pfams are keys to lists ( for the gene _ groups ) gene _ groups _ of _ pfam = { } for pfam in pfam _ list : gene _ grou... | [
0.14910809695720673,
0.48535776138305664,
0.5690268874168396,
0.2465057373046875,
0.18120884895324707,
0.060928743332624435,
-0.22462201118469238,
0.2684059739112854,
-1.1282697916030884,
-0.01611105538904667,
-0.037091974169015884,
0.3934866487979889,
-0.17577993869781494,
0.9282899498939... |
def endswithfunc ( self, data ) : return unicode ( self. field. sortvalue ( data ) ). \ endswith ( unicode ( self. value ) ) | [
-0.08533288538455963,
-0.010199306532740593,
0.36997732520103455,
-0.2944789528846741,
-0.7864648699760437,
-0.0352172926068306,
-0.5704704523086548,
-1.1426235437393188,
-0.27683916687965393,
-0.23492851853370667,
-0.42425838112831116,
0.0991329699754715,
-0.6624963283538818,
0.5511293411... |
def set _ from _ seed ( self, length, seed ) : self. state = seed _ to _ state _ itr ( length, seed ) | [
0.112156942486763,
-0.4297850728034973,
0.09190285950899124,
-0.9873206615447998,
-0.5816424489021301,
0.12761180102825165,
-0.40516024827957153,
0.23043787479400635,
0.2263554334640503,
0.3009544610977173,
-0.5681682825088501,
1.06886887550354,
0.6030533909797668,
-0.05479063838720322,
... |
def run _ local ( name, model _ uri, flavor = none, config = none ) : # pylint : disable = unused - argument model _ path = _ download _ artifact _ from _ uri ( model _ uri ) model _ config _ path = os. path. join ( model _ path, mlmodel _ file _ name ) model _ config = model. load ( model _ config _ path ) if flavor i... | [
-0.305746853351593,
-0.20110483467578888,
0.8786814212799072,
0.30330219864845276,
-0.579892635345459,
-0.31415972113609314,
0.2336195409297943,
0.35192495584487915,
-0.814719557762146,
0.9932959079742432,
0.07213201373815536,
0.6557114124298096,
0.5108351111412048,
0.7064565420150757,
-... |
def enable _ proctitle _ on _ children ( ) : os. environ [ " dask _ parent " ] = str ( os. getpid ( ) ) | [
1.5184112787246704,
-0.22334635257720947,
0.6205689311027527,
-0.17831288278102875,
-0.31167852878570557,
0.7171832323074341,
-0.4624928832054138,
0.5155055522918701,
-0.8898494839668274,
-0.4565724730491638,
-0.012723731808364391,
0.5116970539093018,
0.026162847876548767,
-0.0657303109765... |
def evaluate _ binary _ output _ model ( preds _ df, chrom _ name, save _ dir = none, verbose = true ) : pr _ plot ( preds _ df. y. values, preds = preds _ df. preds. values, fname = os. path. join ( save _ dir,'precision _ recall _'+ chrom _ name + '. png') if save _ dir else none, verbose = verbose ) roc _ plot ( pre... | [
0.16724780201911926,
-0.4075112044811249,
0.7614350318908691,
0.06288495659828186,
0.06710092723369598,
0.24766504764556885,
0.9887400269508362,
0.07473182678222656,
-1.3297147750854492,
-0.08559895306825638,
0.054182738065719604,
1.0760432481765747,
0.2598971128463745,
0.3561044931411743,... |
def testnewstyleimagesummary ( self ) : event _ sink = _ eventgenerator ( self, zero _ out _ timestamps = true ) writer = test _ util. filewriter ( self. get _ temp _ dir ( ) ) writer. event _ writer = event _ sink with tf. compat. v1. graph ( ). as _ default ( ) : with self. test _ session ( ) as sess : ipt = tf. ones... | [
-0.15902481973171234,
0.6700698137283325,
0.6493934392929077,
0.18889756500720978,
0.815448522567749,
-0.731010913848877,
0.8802680969238281,
0.08155884593725204,
0.09718053787946701,
0.5550294518470764,
-0.15201805531978607,
0.13352113962173462,
1.1657960414886475,
-0.3765646815299988,
... |
def test _ class _ docstring ( self ) : self. asserttrue ( len ( rectangle. _ _ doc _ _ ) > = 1 ) | [
-0.05995424464344978,
0.30167990922927856,
0.3164360225200653,
0.3386821746826172,
0.5559939742088318,
0.894569993019104,
0.4511643946170807,
-0.45472484827041626,
1.0786266326904297,
-0.25254106521606445,
-0.15698014199733734,
-0.7481245398521423,
0.7044098377227783,
0.9982184171676636,
... |
def weighted _ rating ( x, m = m, c = c ) : v = x ['count'] r = x ['mean'] return ( v / ( v + m ) * r ) + ( m / ( m + v ) * c ) | [
1.0504652261734009,
0.5979724526405334,
0.31858953833580017,
-0.6576242446899414,
-0.7518855929374695,
0.5934104323387146,
-0.207450732588768,
-0.011030667461454868,
-1.220809817314148,
1.1881314516067505,
0.4365796446800232,
0.29145026206970215,
-0.9129160046577454,
-0.7101055383682251,
... |
def _ _ adaptive _ sampling _ enabled ( self, output = none ) : if output is none : output = self. output return output. enable _ adaptive _ sampling | [
0.4566710293292999,
-0.39713987708091736,
0.4785909056663513,
0.5829547643661499,
-1.6586270332336426,
-0.33197855949401855,
-0.1780109852552414,
-0.44943028688430786,
0.19306492805480957,
-0.17727333307266235,
-0.4849052429199219,
-0.17034727334976196,
-0.8158488869667053,
1.0509533882141... |
def delete _ tasks _ async ( self, task, rpc = none ) : try : tasks = list ( iter ( task ) ) except typeerror : tasks = [ task ] multiple = false else : multiple = true return self. _ _ deletetasks ( tasks, multiple, rpc ) | [
-0.8709954619407654,
1.4578980207443237,
0.5370916128158569,
1.5117779970169067,
0.5435095429420471,
-0.318951815366745,
0.31485265493392944,
-0.10881379246711731,
0.5758047103881836,
0.4441414475440979,
-0.1883641928434372,
-0.4297187030315399,
-0.6459937691688538,
1.014611005783081,
-1... |
def infer _ on _ stream ( args, client ) : # initialise the class infer _ network = network ( ) # set probability threshold for detections # prob _ threshold = args. prob _ threshold cur _ request _ id = 0 last _ count = 0 total _ count = 0 start _ time = 0 time _ on _ video = 0 time _ not _ on _ video = 0 image _ mode... | [
0.21227551996707916,
-0.2589446008205414,
0.9420814514160156,
1.2130823135375977,
0.25288209319114685,
-0.28543487191200256,
0.1144070029258728,
-0.4670037627220154,
-0.33126920461654663,
-0.5693835616111755,
0.04644857719540596,
0.6906769275665283,
-0.028470514342188835,
1.347411513328552... |
def create _ pairs ( np ) : pairs = [ ] for i in range ( 0, len ( np ) - 1 ) : pairs + = zip ( [ np [ i ] ] * 9, np [ i + 1 : i + 10 ] ) pairs + = zip ( np [ i + 1 : i + 10 ], [ np [ i ] ] * 9 ) return pairs | [
-0.45080456137657166,
0.8592795133590698,
0.6085648536682129,
-0.4068011939525604,
0.869469165802002,
0.26728737354278564,
0.8214234709739685,
-0.3421986699104309,
1.3421666622161865,
0.21891789138317108,
-0.21810777485370636,
-1.0688939094543457,
-0.4300767779350281,
0.7466076612472534,
... |
def get _ one _ hot _ encoder ( dataset : dataset ) - > callable : label _ list = label. objects. filter ( dataset _ id = dataset. id ). order _ by ( " id " ) def encoder ( label : label ) - > list [ int ] : array = [ ] for label _ entry in label _ list : array. append ( ( label. id = = label _ entry. id ) * 1 ) return... | [
-0.935234785079956,
-0.4714982509613037,
0.36440396308898926,
-0.1074659451842308,
0.36031463742256165,
-0.5293040871620178,
-0.09307975322008133,
0.22541946172714233,
0.986018180847168,
0.42521846294403076,
-0.5278812050819397,
0.3187287449836731,
0.333698570728302,
1.355783462524414,
0... |
def euler _ step ( u, f, dt ) : return u + dt * f ( u ) | [
0.22698116302490234,
1.2967058420181274,
0.3025626838207245,
0.8355964422225952,
0.06460774689912796,
0.31065642833709717,
-0.18476715683937073,
0.7353217601776123,
-1.3756159543991089,
-1.1881295442581177,
0.049418140202760696,
-0.1649310439825058,
0.7553849816322327,
-0.0508556142449379,... |
def _ get _ solution ( solution _ dir ) : solution _ file = join ( solution _ dir, solution _ file ) solution = _ read _ pred ( solution _ file ) return solution | [
-0.058953411877155304,
-0.5434011220932007,
0.38949453830718994,
0.3310021460056305,
-0.007626368664205074,
-0.5719099640846252,
0.6677758693695068,
0.22828635573387146,
-0.7049169540405273,
-0.19436772167682648,
0.28534698486328125,
0.9952038526535034,
0.9844459295272827,
-0.2840615212917... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.