text stringlengths 25 2.19k | embedding listlengths 768 768 |
|---|---|
async def async _ discover ( hass : homeassistant, timeout : float ) - > list [ sensemedevice ] : started = async _ start _ discovery ( hass ) discovery : sensemediscovery = hass. data [ domain ] [ discovery ] if not started : # already running discovery. stop ( ) discovery. start ( ) await asyncio. sleep ( timeout ) d... | [
-0.28519555926322937,
0.20365020632743835,
0.5120788216590881,
1.565453290939331,
0.2533780634403229,
-0.8887880444526672,
-0.7559147477149963,
-0.24858351051807404,
1.3229954242706299,
0.387505441904068,
0.4520983397960663,
0.11154378205537796,
0.4030359387397766,
1.1494909524917603,
0.... |
def test _ get _ rapid _ data _ correct ( self ) : got _ const, resp, self. cookies = rapid _ datatypes. get _ rapid _ data ('local ', self. cookies, self. digest _ auth,'t _ rob1 ','mainmodule ','const _ number') self. asserttrue ( got _ const ) | [
0.738580048084259,
-0.16089431941509247,
0.3420369625091553,
0.7667675018310547,
1.0838053226470947,
0.46044743061065674,
-0.24856559932231903,
0.4766295552253723,
-0.6248195767402649,
-0.5166565179824829,
-0.9969950914382935,
0.8555903434753418,
-0.08365857601165771,
-0.4143061339855194,
... |
def current _ year ( self ) : return self. _ _ policy. current _ year | [
0.29918086528778076,
-1.5199558734893799,
0.3611656725406647,
0.3901286721229553,
0.268405556678772,
2.150627374649048,
0.5099419355392456,
-0.09440279006958008,
0.2954091727733612,
0.6326569318771362,
0.7089500427246094,
0.8019326329231262,
-0.10976739972829819,
-0.5598047971725464,
0.5... |
async def run _ once ( options, loop, cfg ) : rslts = [ ] first = true for cnt in range ( 1 ) : rslt = await timon. run. run _ once ( options, loop = loop, first = first, cfg = cfg ) first = false print ( " rslt ", rslt ) rslts. append ( rslt ) await asyncio. sleep ( 0. 1 ) return rslts | [
-0.6453185081481934,
1.122842788696289,
0.39372074604034424,
0.5319260358810425,
1.1902247667312622,
-0.278499960899353,
0.2729678153991699,
-0.5494256019592285,
0.29962456226348877,
0.641929566860199,
-0.799470067024231,
-0.465958833694458,
-1.2240952253341675,
1.1415736675262451,
-0.42... |
def create _ dictionaries ( self ) : captions = self. train [ 0 ] # todo : add beginning and end of setence tokens thats not zero self. word _ to _ index = {'< blank >': 0,'< sos >': 1,'< eos >': 2,'< unk >': 3 } self. index _ to _ word = { 0 :'< blank > ', 1 :'< sos > ', 2 :'< eos > ', 3 :'< unk >'} pad = len ( self. ... | [
-0.6812660694122314,
0.13218583166599274,
0.6578754782676697,
-1.2146430015563965,
0.029407350346446037,
0.1240624263882637,
0.535125732421875,
0.321382611989975,
-1.0849496126174927,
0.07480359077453613,
-0.25217685103416443,
-0.18368424475193024,
0.3608388602733612,
0.2947368323802948,
... |
def get _ location _ metres ( original _ location, dnorth, deast ) : earth _ radius = 6378137. 0 # radius of " spherical " earth # coordinate offsets in radians dlat = dnorth / earth _ radius dlon = deast / ( earth _ radius * math. cos ( math. pi * original _ location. lat / 180 ) ) # new position in decimal degrees ne... | [
0.22509273886680603,
-0.4777035713195801,
0.3757573962211609,
-1.0649763345718384,
-1.122887134552002,
0.42758092284202576,
0.27096742391586304,
0.6360288262367249,
0.3233214020729065,
0.3181242346763611,
0.23049460351467133,
0.26804083585739136,
0.24768216907978058,
-0.7163309454917908,
... |
def admin _ username ( self ) - > str : return pulumi. get ( self, " admin _ username " ) | [
0.5207459330558777,
0.23283515870571136,
0.26897475123405457,
0.07775112986564636,
0.1631646454334259,
0.9255481958389282,
0.1378917098045349,
-0.2279311716556549,
0.45446741580963135,
0.09922748804092407,
0.20293989777565002,
1.1479066610336304,
0.531965970993042,
-0.7531428337097168,
-... |
def b _ td _ 0 ( rewards, states, alpha ) : # # taken form, # # sutton and barto, reinforcement learning : # # an introduction, mit press, 1998, # # td is : # # intializa v ( s ) and pi ( policy ) # # repeat ( for each trial ) # # intializa s # # repeat ( for each step / state ) # # a is the action given by pi for s # ... | [
0.304938942193985,
-0.3326239585876465,
0.7840461730957031,
-0.23548069596290588,
0.009790637530386448,
-0.09743471443653107,
-0.12062476575374603,
0.07299605011940002,
0.23534636199474335,
1.020041823387146,
-0.012890211306512356,
-0.0959843322634697,
0.9679161906242371,
-0.05977142974734... |
def take ( self ) : return self. cards. pop ( ) | [
0.298001766204834,
-0.3202742040157318,
0.520422637462616,
-0.7685626149177551,
-0.1893993616104126,
0.09797608107328415,
-0.4877606928348541,
0.20766472816467285,
-0.4621579945087433,
0.023476464673876762,
-0.30628082156181335,
-0.3312576115131378,
-1.1489678621292114,
-1.7223385572433472... |
def calculate _ fixture _ multiplier ( json _ object, json _ fixture _ object, gameweek = 0 ) : print ('# calculate _ fixture _ multiplier ( { }..., { }..., { } ) '. format ( json. dumps ( json _ object ) [ : 100 ], json. dumps ( json _ fixture _ object ) [ : 100 ], gameweek ) ) next _ match = json _ fixture _ object [... | [
-1.0603313446044922,
0.13345877826213837,
0.6744154691696167,
-0.8687547445297241,
-0.6350366473197937,
-0.21193507313728333,
0.5042572021484375,
0.230098158121109,
0.09914475679397583,
0.6288847327232361,
-0.2602885067462921,
-0.3000139892101288,
0.6296805143356323,
0.30441856384277344,
... |
def plot _ select _ single ( sim _ name, fname = none ) : print'select single : ', sim _ name # settings fig _ sz = ( 10, 8 ) xlbl ='metric min / max p - values'ylbl ='average human performance'miny = 0. 35 maxy = 1. 0 axis _ pad _ x = 0. 5 axis _ pad _ extra _ y = 0. 1 y _ ticks _ lbl = ['inv'] + list ( np. arange ( 0... | [
0.260231614112854,
0.2172078937292099,
0.8707873821258545,
-0.18479393422603607,
-0.6464611291885376,
0.8886210322380066,
1.3837707042694092,
0.16485485434532166,
-0.04638442397117615,
0.376677006483078,
0.20396557450294495,
0.8041037917137146,
-0.06371201574802399,
-0.14369148015975952,
... |
def cn _ applydilation ( self, scale ) : depr ('applydilation ', 1. 1,'obj = obj. dilate ( scale )') new _ obj = self. copy ( ). dilate ( scale ) self. _ profile = new _ obj. _ profile self. _ profile _ for _ stored = none # reset the stored profile as it is no longer up - to - date self. _ _ class _ _ = new _ obj. _ _... | [
-0.10632988065481186,
-0.42161691188812256,
0.8441044688224792,
0.9020496606826782,
-0.6806859374046326,
0.2488553524017334,
0.7363640069961548,
-0.6599783897399902,
0.6292102932929993,
-0.5201349258422852,
-0.7491559386253357,
-0.18427161872386932,
-0.07679278403520584,
0.4285496175289154... |
def build _ from _ doctype _ code ( path ) : for ( basepath, folders, files ) in os. walk ( path ) : messagespy = [ ] messagesjs = [ ] for fname in files : if fname. endswith ('py') : messagespy + = get _ message _ list ( os. path. join ( basepath, fname ) ) if fname. endswith ('js') : messagesjs + = get _ message _ li... | [
-0.17879413068294525,
-0.2760092616081238,
0.6478036642074585,
-0.031098181381821632,
0.6833347082138062,
-0.008598119020462036,
1.3407649993896484,
-1.1981943845748901,
0.3952515423297882,
-0.049205973744392395,
-0.3537953197956085,
-0.16568732261657715,
0.020401256158947945,
1.3715903759... |
def diff ( data, regularisation = 0, filter = 3. 54, weighting = true ) : def func ( weights ) : result = 0 for whole, parts, weight in data : if filter and weight < filter : # remove sentispin - only entries continue while len ( parts ) > 1 : left, right = parts [ - 2 : ] vector = ( left, right, left * right ) output ... | [
-0.04121924564242363,
0.45262137055397034,
0.5325396656990051,
0.09420545399188995,
-0.7456343173980713,
-0.2693536579608917,
0.4769730567932129,
0.22661305963993073,
0.418729305267334,
0.5267752408981323,
-0.28364402055740356,
-0.19369053840637207,
-0.4352002441883087,
-0.3381828665733337... |
def patch ( ) : # update the render methods web. form. form. render = form. _ _ dict _ _ ['render'] web. form. form. rendernote = form. _ _ dict _ _ ['rendernote'] web. form. input. render = input. _ _ dict _ _ ['render'] web. form. file. render = file. _ _ dict _ _ ['render'] web. form. textarea. render = textarea. _ ... | [
-0.7034627795219421,
-0.8946476578712463,
0.8131987452507019,
-0.6764423847198486,
-0.3062227666378021,
0.08958718925714493,
0.00941997580230236,
0.04469955712556839,
-0.1013435646891594,
-0.5555616021156311,
-0.3148149847984314,
0.32104164361953735,
-0.061295799911022186,
0.53727644681930... |
def activities ( self ) : return [ x for x in self. _ objects. values ( ) if isinstance ( x, activity ) ] | [
0.27571362257003784,
-0.8896530270576477,
0.18025293946266174,
1.342260718345642,
0.7943781614303589,
0.2187579721212387,
1.2312908172607422,
-0.584124743938446,
1.0529325008392334,
-0.008703191764652729,
0.29423871636390686,
1.7340118885040283,
-0.7740751504898071,
-0.07143428921699524,
... |
def report _ test _ results ( self ) : if self. failed _ suites : msg = colorize ('red ', " \ n \ n { bar } \ ntests failed in the following suites : \ n * ". format ( bar = " = " * 48 ) ) msg + = colorize ('red ','\ n * '. join ( [ s. root for s in self. failed _ suites ] ) +'\ n \ n') else : msg = colorize ('green ',... | [
0.6559605002403259,
0.4935450553894043,
0.6792847514152527,
-0.46406471729278564,
0.49610888957977295,
0.4671236276626587,
0.04501604288816452,
-0.29443326592445374,
-0.32510218024253845,
-0.8772485256195068,
0.10238301753997803,
0.42805060744285583,
-0.5392498970031738,
1.0619921684265137... |
def _ topology _ iter ( source ) : pending = [ ( name, set ( deps ) ) for name, deps in source ] emitted = [ ] while pending : next _ pending = [ ] next _ emitted = [ ] for entry in pending : name, deps = entry # remove deps we emitted last pass deps. difference _ update ( emitted ) # still has deps? recheck during nex... | [
-0.596088707447052,
-0.33630380034446716,
0.6272715330123901,
-0.8755146861076355,
-0.9418742656707764,
0.09741271287202835,
0.4001842439174652,
-0.6919428706169128,
0.13852955400943756,
0.2094300240278244,
0.1502392590045929,
-0.18265961110591888,
0.842934787273407,
0.730204701423645,
0... |
def test _ list _ decimal _ length _ 1 _ nistxml _ sv _ iv _ list _ decimal _ length _ 2 _ 3 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / list / decimal / schema + instance / nistschema - sv - iv - list - decimal - length - 2. xsd ", instance = " nistdata / list / decimal / schem... | [
-0.2431964874267578,
-0.2660532593727112,
0.4940928518772125,
0.603905200958252,
0.1699983924627304,
0.02989250235259533,
-0.3888062536716461,
0.5213485956192017,
0.5998712778091431,
-0.10936136543750763,
-1.1824837923049927,
-0.4371698498725891,
0.14868247509002686,
0.6536883115768433,
... |
def construct ( self, x, * * kwargs ) : return x | [
-0.35864296555519104,
-0.5361599922180176,
0.1609877496957779,
-0.1490165889263153,
-0.8743691444396973,
0.6640394926071167,
-0.6853946447372437,
-0.32946133613586426,
0.23757541179656982,
-1.3291130065917969,
-0.9720364809036255,
0.26496148109436035,
0.44017577171325684,
-0.31109005212783... |
def get _ contact _ name ( ip, contacts ) : for contact in contacts : if contacts [ contact ] [ " ip " ] = = ip and contact! = ip : return contact return ip | [
-0.3466931879520416,
-0.865470290184021,
0.49603718519210815,
0.39447399973869324,
-1.0031554698944092,
-0.24037174880504608,
-0.62465900182724,
-0.840059757232666,
0.12289796024560928,
1.2138854265213013,
1.0925161838531494,
-1.2061560153961182,
-0.5262981653213501,
-0.7563794851303101,
... |
def add _ spend ( pot, amount, asset = a _ eth, price = one, taxable = true ) : pot. add _ spend ( event _ type = accountingeventtype. transaction _ event, notes ='test ', location = location. blockchain, timestamp = example _ timestamp, asset = asset, amount = amount, taxable = taxable, given _ price = price, count _ ... | [
0.43014732003211975,
-0.30820271372795105,
0.6676303148269653,
-0.05373629927635193,
0.6675398349761963,
-0.17776842415332794,
0.24369244277477264,
-0.7396107316017151,
0.4374605417251587,
0.9721682071685791,
0.29933619499206543,
-0.2713635265827179,
-0.22959662973880768,
-0.73229986429214... |
def parse _ output _ file ( filename, rel _ number, states, path, class _ name, min _ ver _ support, class _ 1 _ tirp _ file _ name, to _ add _ entities ) : if not input _ validation ( filename ) : return if rel _ allen _ seven is rel _ number : relations _ dict = { " < " : " before ", " m " : " meets ", " o " : " over... | [
-0.11706908792257309,
-0.049045126885175705,
0.8164284229278564,
-0.8482359647750854,
-0.5155990719795227,
0.053392194211483,
0.465589702129364,
0.7339484691619873,
-0.09942217916250229,
0.9897461533546448,
-0.08993315696716309,
-0.5214225053787231,
-0.20665650069713593,
-0.594231426715850... |
def add _ addr ( self, addr, length ) : self. addrs. append ( ( addr, length ) ) | [
0.061453111469745636,
-0.08788949251174927,
0.37731513381004333,
-0.8316211104393005,
-0.0583641491830349,
0.4505438208580017,
-0.9451184868812561,
0.21092358231544495,
1.5799789428710938,
-0.6711170673370361,
-0.25483182072639465,
1.0622763633728027,
-0.6070584654808044,
-0.02603868022561... |
def deletefields ( doc ) : for field in fields _ to _ delete : innerobject = doc subfields = field. split ( '.') # get inner object in document try : for subfield in subfields [ : - 1 ] : innerobject = innerobject [ subfield ] del innerobject [ subfields [ - 1 ] ] except keyerror : continue # if the doc doesn't contain... | [
-0.2188066989183426,
-0.16612301766872406,
0.6834338307380676,
-0.3436480462551117,
-0.06028503179550171,
0.6465966701507568,
0.9486450552940369,
0.13281844556331635,
-0.32871371507644653,
0.20104177296161652,
-0.9412952065467834,
0.13756155967712402,
-0.8689810633659363,
-0.93609845638275... |
def astar ( grid, heuristic ) : start _ pose = grid. getstart ( ) goal _ poses = grid. getgoals ( ) shortest _ path = [ ] shortest _ path _ visited = set ( ) for goal _ pose in goal _ poses : frontier = priorityqueue ( ) frontier. put ( ( 0, start _ pose ) ) came _ from = { } cost _ so _ far = { } came _ from [ start _... | [
-0.26561254262924194,
0.08306078612804413,
0.8260840773582458,
0.3984694480895996,
-0.4464820623397827,
-0.5218898057937622,
0.04129188880324364,
1.1292887926101685,
-0.0772145614027977,
0.2949773967266083,
0.16189010441303253,
-0.32961443066596985,
0.6946933269500732,
0.6681662797927856,
... |
def test _ direct _ set _ env _ vars _ mutation ( ) : sample _ exe = " python " cmd = " echo " env _ vars = { " k1 " : " v1 ", " k2 " : " v2 " } orig _ env = { " k1 " : " v1 ", " k2 " : " v2 " } rs = runsettings ( sample _ exe, run _ command = cmd ) rs. env _ vars = env _ vars # verify initial expectations assert len (... | [
-1.2063740491867065,
-0.8191172480583191,
0.6628331542015076,
-0.12412680685520172,
-0.19806541502475739,
1.1862081289291382,
-0.02155226096510887,
-0.38202425837516785,
-0.9128837585449219,
0.6331460475921631,
-0.33795836567878723,
1.1017162799835205,
0.19713176786899567,
0.20368759334087... |
def get _ facts ( self ) : facts = { " vendor " : " oneaccess ", " uptime " : none, " os _ version " : none, " boot _ version " : none, " serial _ number " : none, " device _ id " : none, " model " : none, " hostname " : none, " fqdn " : none, " mgmt _ interface " : none } # get output from device show _ system _ statu... | [
-0.14981581270694733,
0.05140850692987442,
0.5842574834823608,
-0.5714526176452637,
-0.3821335434913635,
-0.2739226222038269,
0.3779079020023346,
-0.4234022796154022,
-0.9889317154884338,
-0.5443565249443054,
-0.6681663990020752,
0.84307861328125,
0.5100567936897278,
1.2646092176437378,
... |
def netinfo _ prefixes ( self, asn ) : endpoint = " { } / { } ". format ( self. ep _ netinfo _ prefixes, asn ) return self. _ make _ request ( endpoint = endpoint ) | [
-1.058902382850647,
0.22896884381771088,
0.5770101547241211,
-0.7672737836837769,
0.280883252620697,
-0.5635531544685364,
-1.1121209859848022,
-0.5438230633735657,
1.0671218633651733,
0.07020704448223114,
-0.9171417355537415,
-0.14929845929145813,
0.5097996592521667,
0.5338208079338074,
... |
def monthly ( self, pattern _ dict ) : if isinstance ( pattern _ dict, bool ) : pattern _ dict = { } pattern _ dict ['freq _ type'] ='monthly'schedule _ pattern = schedulepattern ( self. _ pattern ) self. _ pattern = schedule _ pattern. create _ schedule _ pattern ( pattern _ dict ) self. _ modify _ task _ properties (... | [
-0.294010192155838,
0.49762868881225586,
0.6144300699234009,
0.24015583097934723,
-0.3914422392845154,
0.7519683241844177,
0.45890140533447266,
0.922688364982605,
0.4820275604724884,
-0.3560503423213959,
0.20186728239059448,
0.3574989140033722,
-0.06731317937374115,
0.1481553167104721,
-... |
def makeset ( self, x ) : self. new _ set = listaligada ( ) self. new _ set. head = nodo ( ) self. new _ set. tail = self. new _ set. head self. nododir [ x ] = self. new _ set. head self. new _ set. head. setdato ( x ) self. new _ set. head. l _ head = self. new _ set | [
-0.19282647967338562,
0.6834482550621033,
0.42126530408859253,
-1.0159212350845337,
-0.640410304069519,
0.48472338914871216,
-0.22801923751831055,
-0.5748732686042786,
0.2572486400604248,
-0.3077104389667511,
-1.1713510751724243,
0.7965536117553711,
0.9185569882392883,
-0.22287292778491974... |
def mass _ centre _ tag ( self ) - > str : if self. mass _ centre is none : return " " y = " { 0 :. 2f } ". format ( self. mass _ centre [ 0 ] ) x = " { 0 :. 2f } ". format ( self. mass _ centre [ 1 ] ) return f " _ _ { conf. instance ['notation'] ['setup _ tags'] ['mass'] ['mass _ centre'] } _ ( { y }, { x } ) " | [
0.896117627620697,
-1.711810827255249,
0.6121723651885986,
-1.249728798866272,
0.39569008350372314,
0.11592624336481094,
-0.05173001438379288,
-0.4849033057689667,
-0.5663800239562988,
0.9740607142448425,
0.3167394995689392,
-0.08269654214382172,
0.6963640451431274,
0.8581349849700928,
-... |
def getuseraction ( state, actionfunction ) : import graphicsutils action = none while true : keys = graphicsutils. wait _ for _ keys ( ) if'up'in keys : action ='north'if'down'in keys : action ='south'if'left'in keys : action ='west'if'right'in keys : action ='east'if'q'in keys : sys. exit ( 0 ) if action = = none : c... | [
-0.38138049840927124,
-0.7350438833236694,
0.5772894620895386,
0.7990976572036743,
-0.31537479162216187,
-0.16853347420692444,
0.32176294922828674,
-1.2626078128814697,
0.07104487717151642,
0.4790279269218445,
-0.05472363159060478,
0.7280005216598511,
0.29430046677589417,
-0.94571352005004... |
def get _ area _ state ( self, area _ id : str ) - > area : if self. _ state _ by _ endpoint is not none and area _ id : return self. _ state _ by _ endpoint [ area _ id ] raise homeassistanterror ( " unknown area " ) | [
-0.05338212102651596,
-0.5556396245956421,
0.24456165730953217,
0.12764109671115875,
-0.3169173002243042,
-0.6768383383750916,
-0.18819554150104523,
-0.6912651658058167,
1.4955742359161377,
0.12232854962348938,
0.8947877287864685,
0.2517686188220978,
-0.20950958132743835,
0.368100166320800... |
def quicksort3 ( array, left, right, count ) : array _ len = right - left + 1 # base case if left > right : # base case, when array has no element pass elif array _ len = = 1 : # base case, when array has only one element pass elif array _ len = = 2 : count + = 1 if array [ left ] > array [ right ] : array [ left ], ar... | [
0.3045666515827179,
-0.2957732677459717,
0.8471411466598511,
0.004967097193002701,
-0.6160153150558472,
0.27145376801490784,
0.08742937445640564,
-0.08138606697320938,
0.4896961450576782,
0.3249415457248688,
-0.5222650766372681,
-0.4199354350566864,
-0.6525253057479858,
0.18936322629451752... |
def predict ( sentences : list [ str ], tokenizer : t5tokenizer, model : t5forconditionalgeneration, t5 _ params : t5params, guided _ decoding : bool = false, explain _ bot : any = none, compute _ grammar : bool = true, provided _ grammar : str = none ) : sentences _ with _ instruction = [ t5 _ params. append _ text + ... | [
-0.28410160541534424,
0.946304976940155,
0.6137951016426086,
-0.12045696377754211,
-0.9083594083786011,
-0.0514306016266346,
0.38375213742256165,
0.4557226300239563,
-0.5632746815681458,
0.5999658107757568,
-0.5298106074333191,
0.1625707894563675,
0.40337032079696655,
0.7362547516822815,
... |
def create _ annot _ centers ( path _ img, path _ out _ seg, path _ out _ csv ) : name = os. path. basename ( path _ img ) _, seg _ labeled = load _ correct _ segm ( path _ img ) # # just convert the strange tif to common png # name = name. replace ('slice _ ','insitu'). replace ('- label. tif ', '. png') # path _ seg ... | [
0.16923022270202637,
-0.4766278564929962,
0.5094795227050781,
0.429342657327652,
0.29714491963386536,
-0.14766526222229004,
0.1645229160785675,
0.9312415719032288,
-0.0637502446770668,
0.8185116052627563,
0.27675193548202515,
0.22504854202270508,
0.25906902551651,
0.08327885717153549,
0.... |
def print _ first _ word ( words ) : first _ word = words. pop ( 0 ) print first _ word | [
0.9660861492156982,
0.2086360901594162,
0.3745216429233551,
-0.2478007823228836,
1.2363232374191284,
0.17879557609558105,
-0.17016761004924774,
0.4015674293041229,
-0.3312624990940094,
0.9684667587280273,
0.9162511825561523,
1.1064821481704712,
-0.8770739436149597,
1.4827440977096558,
-0... |
def update _ structure ( self, zip _ file ) : hw _ ls = os. listdir ( self. tmp _ path ) # only 1 zip file is extracted here hw _ dirs = [ d for d in hw _ ls if os. path. isdir ( os. path. join ( self. tmp _ path, d ) ) ] hw _ files = [ f for f in hw _ ls if os. path. isfile ( os. path. join ( self. tmp _ path, f ) ) ]... | [
-0.2611581087112427,
-0.24943487346172333,
0.9929148554801941,
0.029302263632416725,
-0.3410237729549408,
0.4414282441139221,
1.316107988357544,
0.2963070571422577,
-0.1043919250369072,
-0.7187528610229492,
0.4021069407463074,
-1.3432183265686035,
-0.4821709394454956,
0.3172511160373688,
... |
def test _ list _ integer _ max _ length _ 3 _ nistxml _ sv _ iv _ list _ integer _ max _ length _ 4 _ 2 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / list / integer / schema + instance / nistschema - sv - iv - list - integer - maxlength - 4. xsd ", instance = " nistdata / list / ... | [
-0.3715316951274872,
-0.34604787826538086,
0.19615747034549713,
0.4811623990535736,
-0.7654629945755005,
0.04290086776018143,
-0.9138763546943665,
0.17763173580169678,
0.7678002715110779,
0.7086474299430847,
-1.183215618133545,
-0.5028225779533386,
-0.34709426760673523,
0.4543211758136749,... |
def change _ email ( form, field ) : if form. email. data = = g. user. email : return true else : return false | [
-0.37815234065055847,
0.15349769592285156,
0.31257039308547974,
0.4519689679145813,
-0.28812578320503235,
0.4537949860095978,
-0.470779150724411,
0.277638703584671,
-0.7920950651168823,
0.5488194823265076,
-0.30191802978515625,
0.6765466332435608,
0.02868066169321537,
-0.6949933171272278,
... |
def slot _ mappings ( self ) - > dict [ text, union [ dict, list [ dict ] ] ] : return { " cname " : [ self. from _ entity ( entity = " cname ", not _ intent = [ " out _ of _ scope ", " deny ", " confirm " ] ) ], " testdrivecar " : [ self. from _ entity ( entity = " testdrivecar ", intent = " choosecar " ) ], " phone "... | [
-0.7642356157302856,
-0.5286659598350525,
0.44240087270736694,
-0.47160467505455017,
-1.1403894424438477,
0.6044683456420898,
0.01351344957947731,
0.356974333524704,
0.32397329807281494,
0.24545900523662567,
-0.14009296894073486,
-0.53770512342453,
0.7758154273033142,
0.3940061330795288,
... |
def load _ paste _ app ( app _ name = none ) : if app _ name is none : app _ name = cfg. conf. prog loader = wsgi. loader ( cfg. conf ) app = loader. load _ app ( app _ name ) return app | [
0.6946250200271606,
-0.031880639493465424,
0.5386218428611755,
0.11594229191541672,
-1.645688772201538,
0.7871355414390564,
-0.1887870877981186,
0.5792458653450012,
0.20030920207500458,
1.3231136798858643,
-0.284868061542511,
-0.23966549336910248,
-0.8444451689720154,
0.8419147729873657,
... |
def deaths ( df, db _ id, sim _ year ) : df ['deaths'] = ( df ['non _ mig _ pop'] * df ['death _ rate'] ). round ( ) # deaths _ out = df [ df. deaths! = 0 ] # report out deaths # log. insert _ run ('deaths. db ', db _ id, df,'survived _'+ str ( sim _ year ) ) deaths _ out = df [ df. deaths! = 0 ]. copy ( ) deaths _ out... | [
-0.45768702030181885,
0.384943425655365,
0.8454911708831787,
0.4382278621196747,
0.5255003571510315,
0.33867815136909485,
0.29300734400749207,
-0.0038674972020089626,
-0.24083974957466125,
0.5704212784767151,
0.28234079480171204,
-0.14258645474910736,
0.5960280299186707,
0.5066134929656982... |
def test _ isunicode _ unicode ( self ) : assert isunicode ( u'hello, world!') | [
0.4011145830154419,
0.047132302075624466,
0.23618052899837494,
1.0573410987854004,
0.7241402268409729,
0.38431763648986816,
0.2229333519935608,
1.5955599546432495,
1.3658596277236938,
-0.9863632917404175,
-1.225501298904419,
0.8074877858161926,
-0.6226423382759094,
-0.06554575264453888,
... |
def weighted _ total ( self, variable _ name ) : return ( self. array ( variable _ name ) * self. array ('weight') ). sum ( ) | [
0.18843235075473785,
-0.5716930627822876,
0.7474452257156372,
-0.49384307861328125,
0.06362906098365784,
-0.43071097135543823,
-0.08802654594182968,
-0.519994854927063,
0.03898390009999275,
1.1486170291900635,
-0.6910514831542969,
-0.2801373600959778,
-0.9457883834838867,
0.305890828371048... |
def printstate _ 8p ( state ) : return printstate ( state ) | [
-0.3704800009727478,
-0.740282416343689,
0.2900950610637665,
-0.1581786721944809,
-0.6712744235992432,
-0.017508279532194138,
-0.25210538506507874,
-1.3699450492858887,
1.2921234369277954,
0.04590512067079544,
0.69722580909729,
0.1612509936094284,
-0.9387771487236023,
-0.6603633761405945,
... |
def user ( self, user ) : self. _ user = user | [
-0.9482523798942566,
0.3163187503814697,
-0.26149195432662964,
0.628936231136322,
-0.4038860499858856,
0.6224827170372009,
1.1872024536132812,
0.14917705953121185,
-0.4309680759906769,
-1.2905638217926025,
-1.6727393865585327,
-0.23598141968250275,
0.6535441279411316,
0.8017087578773499,
... |
def run _ epoch ( net, loader, optimizer, criterion ) : net. train ( ) epoch _ loss = np. array ( [ ], dtype = np. float32 ) for i, data in enumerate ( loader, 1 ) : images = data [ 0 ]. cuda ( ). float ( ) labels = data [ - 1 ]. cuda ( ). float ( ) optimizer. zero _ grad ( ) if len ( data ) = = 3 : additional = data [... | [
-0.47149133682250977,
-0.3601270318031311,
0.6515353918075562,
-0.08303166925907135,
0.55996173620224,
0.0988818109035492,
-0.05739658698439598,
-0.14967156946659088,
-0.8412995338439941,
-0.04183390364050865,
0.44318264722824097,
0.42168670892715454,
0.5673421621322632,
1.4512944221496582... |
def get _ fs _ connection ( ) : return random. choice ( list ( get _ fs _ connections ( ) ) ) | [
-1.022559404373169,
-0.9108420610427856,
0.5223413109779358,
0.3602048456668854,
-0.13859324157238007,
-1.1010022163391113,
-0.12075944244861603,
-0.2897939682006836,
0.2371831089258194,
-1.121182918548584,
0.682701051235199,
-0.6248694062232971,
-1.0698022842407227,
-0.5207468271255493,
... |
def print _ to _ stdout ( self ) : print ( self. latex. get ( ) ) | [
1.037377119064331,
-1.1518081426620483,
0.30111077427864075,
-0.2763795852661133,
0.5424830317497253,
0.29193684458732605,
-0.9423355460166931,
-0.03475873917341232,
-0.8490831851959229,
-0.48098108172416687,
0.662579357624054,
1.1325557231903076,
-0.17538228631019592,
-0.4343608319759369,... |
def click _ on ( self, name, dont _ wait = none ) : selector = self. wait _ for _ element _ found ( name,'button / input / a ','this') self. click _ element ( selector ) self. wait _ for _ page _ loaded ( dont _ wait ) | [
-0.4121400713920593,
-0.34743642807006836,
0.5833700895309448,
0.07737620919942856,
0.5189129710197449,
0.4751950204372406,
-0.4155811071395874,
-0.4443860352039337,
0.08995689451694489,
0.33123430609703064,
-0.8591229915618896,
-1.0207366943359375,
-0.3633147180080414,
0.6320098638534546,... |
def test _ atomic _ hex _ binary _ max _ length _ 3 _ nistxml _ sv _ iv _ atomic _ hex _ binary _ max _ length _ 4 _ 1 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / hexbinary / schema + instance / nistschema - sv - iv - atomic - hexbinary - maxlength - 4. xsd ", instance ... | [
-0.0013129571452736855,
0.3769232928752899,
0.3626292645931244,
1.121227741241455,
-0.1525239497423172,
0.6898959875106812,
-0.7053921222686768,
0.3684637248516083,
0.1259191632270813,
0.4429214298725128,
-0.4362405836582184,
-0.8487193584442139,
-0.11807382106781006,
-0.09735385328531265,... |
def test _ atomic _ language _ min _ length _ 4 _ nistxml _ sv _ iv _ atomic _ language _ min _ length _ 5 _ 3 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / language / schema + instance / nistschema - sv - iv - atomic - language - minlength - 5. xsd ", instance = " nistda... | [
0.4074016809463501,
-0.3139965236186981,
0.2964489758014679,
-0.05945027619600296,
-0.7297608852386475,
0.06458219885826111,
-0.18142831325531006,
-0.7005292773246765,
0.44767987728118896,
0.4642014801502228,
-0.648829460144043,
-0.22417281568050385,
-0.8548780679702759,
-0.178406029939651... |
def offset ( self ) : return self. _ offset | [
0.1589055359363556,
-0.7022757530212402,
0.20872703194618225,
-0.19653981924057007,
-0.26830920577049255,
2.1673309803009033,
1.688268780708313,
0.6854431629180908,
0.40198981761932373,
-0.913673996925354,
0.20397041738033295,
0.553996205329895,
-0.10579695552587509,
-0.6433454155921936,
... |
def deploy ( ) : local ('mkdir - p % ( clone _ path ) s'% env ) local ('git clone % ( git _ url ) s % ( clone _ path ) s'% env ) local ( '. / s3put. py - a % ( access _ key ) s - s % ( secret _ key ) s - b % ( bucket ) s - p % ( htdocs ) s - g public - read % ( htdocs ) s'% env ) print yellow ( " done? " ) | [
0.17333585023880005,
-0.421307772397995,
0.6454075574874878,
0.14371274411678314,
0.17214402556419373,
1.2153743505477905,
0.2778685688972473,
0.04801826551556587,
-0.6492970585823059,
0.5989006757736206,
-0.09167918562889099,
0.6763626933097839,
0.04856458678841591,
-0.11925201117992401,
... |
def get ( self, request ) : logout ( request ) return redirect ('/ about _ us') | [
-0.987174391746521,
-0.3245670199394226,
0.5924509763717651,
0.608877956867218,
-0.0793619453907013,
0.3177359700202942,
0.3399341106414795,
0.1165703609585762,
0.055989157408475876,
-0.875562310218811,
0.986280620098114,
0.2825898230075836,
0.9642757177352905,
-1.3078423738479614,
0.411... |
def make _ map ( npix, npix _ star, drrs, angle ) : map = np. zeros ( ( npix, npix ) ) yc = npix / 2 xc = npix / 2 map [ np. round ( xc - drrs ). astype ( int ) : np. round ( yc + drrs ). astype ( int ), : ] = 1. rmap = ndimage. interpolation. rotate ( map, angle, reshape = false, cval = 0., order = 1 ) return rmap | [
-0.8671303391456604,
-0.05449957400560379,
0.5699198246002197,
-0.7892796397209167,
-0.4780600666999817,
0.01500702928751707,
0.24055525660514832,
-0.47153735160827637,
1.0095727443695068,
-0.27365416288375854,
0.19754821062088013,
-0.4620591104030609,
0.005324298981577158,
-1.019909262657... |
def get _ time ( self ) : return self. _ current _ time | [
-0.6737318634986877,
-0.7361530065536499,
0.4462999105453491,
0.30617961287498474,
1.003880262374878,
0.7073323130607605,
0.40832704305648804,
-0.07318652421236038,
-0.8041837811470032,
1.1668049097061157,
-0.2120167464017868,
-0.054525598883628845,
-0.969586193561554,
0.17353194952011108,... |
def key _ arn ( self ) - > optional [ pulumi. input [ str ] ] : return pulumi. get ( self, " key _ arn " ) | [
-0.16528767347335815,
-0.5617721676826477,
0.3790382742881775,
0.8423260450363159,
0.619800865650177,
0.9183179140090942,
0.4549020230770111,
1.1025898456573486,
0.27179479598999023,
0.06904512643814087,
-0.0008363249944522977,
1.2581597566604614,
-0.06409189105033875,
-0.7818958759307861,... |
def double _ marble _ collisions ( self, forbidden : list, black _ marbles : list, white _ marbles : list, turn : chr, marble _ spot _ one _ move : list, marble _ spot _ two _ move : list, marble _ tuple : tuple, enemy _ marbles : list, current _ marbles : list, result : list, movement : enum, moves : list ) : for marb... | [
-0.5534366369247437,
0.4210941791534424,
1.0052653551101685,
-0.14622299373149872,
0.3910844326019287,
-0.16625159978866577,
0.6773552298545837,
0.00889467354863882,
-0.6259667277336121,
1.7587461471557617,
-0.31491926312446594,
-0.40148794651031494,
-0.4536966383457184,
-0.147597789764404... |
def start _ tkapps ( tkapps ) : import time res = [ ] for tkapp in tkapps : app = guithread ( tkapp ) app. start ( ) time. sleep ( 0. 5 ) res. append ( app. frame ) return res | [
-0.5140345692634583,
-0.4441550076007843,
0.625799834728241,
1.8334200382232666,
0.029645297676324844,
0.5449981689453125,
-0.07596901804208755,
-0.0071044680662453175,
0.3804222643375397,
0.7939697504043579,
-0.8933941721916199,
-0.9036321043968201,
-0.24249877035617828,
0.972648084163665... |
def getdirectionsofsteepestslope _ bordercheckingversion ( borderpts ) : ndim = len ( borderpts [ 0 ] ) def minmaxdiff ( l ) : return max ( l ) - min ( l ) maxslopedim = [ ] for i in range ( ndim ) : # loop over all dimensions as the assumed scan dimension ( i ) # bin the points into hyper - planes with the same value ... | [
0.9353240132331848,
0.31287747621536255,
0.8220987319946289,
1.5687873363494873,
0.10958103090524673,
0.7275031805038452,
0.8516996502876282,
-0.6122410893440247,
-0.12196367979049683,
0.14587344229221344,
-0.6901282072067261,
-0.08542575687170029,
0.03456567972898483,
1.2483923435211182,
... |
def sections ( self ) - > iterable [ union [ datasection, textsection ] ] : for i in self. textsections : yield i for i in self. datasections : yield i | [
-0.42114660143852234,
-0.2351485788822174,
0.41912221908569336,
-0.7393224239349365,
-0.5572238564491272,
0.8157663345336914,
-0.3541633188724518,
-0.06070494279265404,
0.24868716299533844,
-0.6760764718055725,
0.6378903388977051,
-0.29931479692459106,
0.1641717106103897,
0.745841979980468... |
def bounding _ box ( patches ) : mins = [ float ('inf'), float ('inf') ] maxs = [ - float ('inf'), - float ('inf') ] for patch in patches : shape = patches [ patch ] ['shape'] min _ pos = [ min ( shape. bbox [ i ], shape. bbox [ i + 2 ] ) for i in range ( 2 ) ] max _ pos = [ max ( shape. bbox [ i ], shape. bbox [ i + 2... | [
-0.5237021446228027,
-1.1943633556365967,
0.8638292551040649,
-0.376984179019928,
-0.2374543994665146,
0.23275628685951233,
-0.42140987515449524,
-0.39371001720428467,
0.20321212708950043,
-0.2369016706943512,
-1.2535321712493896,
-0.38219013810157776,
0.1555556058883667,
-0.03917312249541... |
def manipulate _ node ( self, owner, method : str, * params ) : if not self. is _ owned _ by ( owner ) : raise valueerror ( " position doesn't belong to the passed owner " ) return getattr ( owner, method ) ( self. _ _ node, * params ) | [
-1.1546491384506226,
0.6574049592018127,
0.48374927043914795,
-0.26437321305274963,
0.6092411279678345,
-1.1374186277389526,
0.24333555996418,
-0.5149129033088684,
-0.19437560439109802,
0.2299329936504364,
0.8983200788497925,
0.3318552076816559,
0.17055608332157135,
-0.4005413353443146,
... |
def _ createbolt ( self, game ) : if self. _ firebolts ( game ) : if self. _ playernobolt ( ) : x = self. _ ship. x y = self. _ ship. y + 1 / 2 * ship _ height a = bolt ( x = x, y = y, width = bolt _ width, height = bolt _ height, fillcolor ='black ', linecolor ='black ', velocity = bolt _ speed ) self. _ popsound. pla... | [
-0.13179907202720642,
0.8959531784057617,
0.6123696565628052,
-0.44029203057289124,
0.5057846903800964,
-0.0059118797071278095,
-0.46284833550453186,
-0.4059157371520996,
-0.17642197012901306,
-0.8807801008224487,
0.14277195930480957,
0.11767377704381943,
-0.2462952733039856,
0.36425355076... |
def _ _ init _ _ ( self, consumer, interest _ tags, callback _ finalizer = none, exempt _ tags = [ ] ) : self. _ consumer = consumer self. interest _ tags = interest _ tags self. _ finalizer = callback _ finalizer self. _ exempt _ tags = exempt _ tags # a dictionary of content for each tag of interest # the information... | [
0.7027052640914917,
0.13235555589199066,
0.6424174904823303,
-0.02454332821071148,
0.3238646388053894,
-0.48422589898109436,
-0.8136714100837708,
-0.733806848526001,
-0.9020625948905945,
0.18227295577526093,
-0.4766475558280945,
0.16497617959976196,
0.03387942910194397,
0.6662156581878662,... |
async def watch _ order _ book ( self, symbol : str, limit : optional [ int ] = none, params = { } ) : await self. load _ markets ( ) symbol = self. symbol ( symbol ) orderbook = await self. watch _ public ('depthmarketdata. subscribe ', symbol, params ) return orderbook. limit ( ) | [
-0.6187359094619751,
0.6750586032867432,
0.5307352542877197,
0.4283767640590668,
0.07533101737499237,
-0.3304516673088074,
0.02260526828467846,
-1.0591579675674438,
-0.31677430868148804,
-0.32470959424972534,
-0.5401225090026855,
1.5019932985305786,
-0.38838648796081543,
0.0239507984369993... |
def test _ request _ do _ update ( test _ dao, test _ configuration ) : dut = dtcsimilaritem ( test _ dao, test _ configuration, test ='true') dut. request _ do _ select _ all ( revision _ id = 1 ) assert not dut. request _ do _ update ( 2 ) | [
-0.6033039093017578,
0.9920215010643005,
0.5604135394096375,
1.2515052556991577,
0.4437887370586395,
0.36497506499290466,
0.07570047676563263,
-0.1187431588768959,
0.26436764001846313,
-0.34109553694725037,
-0.6323490738868713,
0.04673400893807411,
-0.017441272735595703,
-0.807021617889404... |
def test _ atomic _ language _ min _ length _ 2 _ nistxml _ sv _ iv _ atomic _ language _ min _ length _ 3 _ 2 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / language / schema + instance / nistschema - sv - iv - atomic - language - minlength - 3. xsd ", instance = " nistda... | [
0.4532926380634308,
-0.6650065779685974,
0.41463354229927063,
0.15875111520290375,
-0.6586311459541321,
0.2911562919616699,
-0.8243948221206665,
-0.24835948646068573,
0.5596415400505066,
0.6587759852409363,
-0.43619877099990845,
0.35286423563957214,
-0.23766100406646729,
-0.257820487022399... |
def winner ( board ) : ways _ to _ win = ( ( 0, 1, 2 ), ( 3, 4, 5 ), ( 6, 7, 8 ), ( 0, 3, 6 ), ( 1, 4, 7 ), ( 2, 5, 8 ), ( 0, 4, 8 ), ( 2, 4, 6 ) ) for row in ways _ to _ win : if board [ row [ 0 ] ] = = board [ row [ 1 ] ] = = board [ row [ 2 ] ]! = empty : winner = board [ row [ 0 ] ] return winner if empty not in bo... | [
0.46223410964012146,
-0.10998863726854324,
0.9187182784080505,
0.6036562323570251,
-0.0561414435505867,
-0.5305027365684509,
0.758417010307312,
-0.2678678333759308,
0.4031853675842285,
0.48092061281204224,
0.11960640549659729,
-0.05372826009988785,
-0.4725797474384308,
-0.2590493857860565,... |
def test _ as _ data _ frame _ _ no _ headers ( self ) : data = { " row _ id " : [ " 1 ", " 5 " ], " row _ version " : [ " 2 ", " 1 " ], " row _ etag " : [ " etag1 ", " etag2 " ], " col " : [ " i like trains ", " weeeeeeeeeeee " ], } pd _ df = pd. dataframe ( data ) expected _ df = pd. dataframe ( index = [ " 1 _ 2 _ e... | [
-0.08022575080394745,
-0.18080972135066986,
0.6547906398773193,
0.09585610777139664,
0.20199982821941376,
0.026041004806756973,
0.11062504351139069,
-0.37417781352996826,
-0.20051294565200806,
-0.9005516171455383,
-0.16317963600158691,
-0.2405264973640442,
0.386257529258728,
-0.83525371551... |
def get _ ten _ shows ( ) : # connect to the database db = connect _ minerva _ db ( ) # return all the shows as a list ten _ shows = list ( db. shows. find ( ). limit ( 10 ) ) return ten _ shows | [
-0.0881069153547287,
0.5532587766647339,
0.3977520167827606,
-0.6277945041656494,
1.8159047365188599,
-0.10969530045986176,
-0.7498191595077515,
1.2448471784591675,
0.1790873259305954,
0.586053729057312,
-0.845467746257782,
-0.016526468098163605,
-0.04573553055524826,
-0.20695577561855316,... |
def builddict ( data, fields, upper _ index, table _ name _ index ) : df = data [ fields ]. drop _ duplicates ( ) df. set _ index ( fields [ : upper _ index ], inplace = true ) conn = sqlite3. connect ( os. getenv ('dbname') ) df. to _ sql ( fields [ table _ name _ index ], conn ) conn. close ( ) | [
-1.1591272354125977,
0.7313705682754517,
0.4045236110687256,
-0.5856792330741882,
-0.07120607048273087,
-0.11163247376680374,
0.08932796120643616,
0.7475607395172119,
-1.056860327720642,
0.3397289216518402,
-0.4816526174545288,
-0.02023302949965,
0.20169782638549805,
-1.0290223360061646,
... |
def worker _ id ( self ) : return self. _ worker _ id | [
0.7102310061454773,
-0.12584730982780457,
0.15871483087539673,
0.4892823100090027,
1.1861183643341064,
1.2695106267929077,
0.8505882024765015,
0.5402807593345642,
0.4734014868736267,
-0.45239847898483276,
-0.6736651062965393,
0.06921223551034927,
-0.7091817855834961,
-0.008250490762293339,... |
def median ( l ) : # get the length of the list length = len ( l ) if length % 2 = = 0 : # the value is even, average the two middle terms index1 = length / 2 - 1 index2 = length / 2 return ( l [ index1 ] + l [ index2 ] ) / 2 else : # the value is odd, take the middle term index = ( length - 1 ) / 2 + 1 return l [ inde... | [
-0.8731974959373474,
-0.16765697300434113,
0.5006413459777832,
0.16565902531147003,
0.037783585488796234,
0.10883516073226929,
-0.5216657519340515,
0.4776785671710968,
1.073997139930725,
-0.423837274312973,
0.013832970522344112,
-0.2557831108570099,
-1.249944806098938,
0.32687127590179443,... |
def loadconfig ( ) : if not os. path. exists ( configfilename ) : raise configerror ( " librarian config file does not exist. invoke librarian - - init to create " ) configfile = open ( configfilename ) try : global configdict configdict = json. loads ( configfile. read ( ) ) finally : configfile. close ( ) | [
-0.3035738468170166,
-0.9102519154548645,
0.43690216541290283,
-0.9170616269111633,
-0.03672025725245476,
0.8016465902328491,
-0.2044571042060852,
1.1629492044448853,
-1.4609874486923218,
0.6356631517410278,
-0.9200537204742432,
-0.3506350815296173,
-0.1440303474664688,
0.8607043623924255,... |
def test _ atomic _ hex _ binary _ pattern _ 2 _ nistxml _ sv _ iv _ atomic _ hex _ binary _ pattern _ 3 _ 3 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / hexbinary / schema + instance / nistschema - sv - iv - atomic - hexbinary - pattern - 3. xsd ", instance = " nistdata... | [
-0.1179593950510025,
0.20520804822444916,
0.6225013732910156,
0.6813654899597168,
0.13882793486118317,
0.8547132611274719,
-0.7505804300308228,
0.33773815631866455,
0.3537657558917999,
0.5423133373260498,
-0.4685257375240326,
-0.4337065517902374,
-0.18647082149982452,
-0.08676943182945251,... |
def get _ ligand _ features ( self, ligand, hotspot _ result = none ) : if not hotspot _ result : hotspot _ result = self. get _ hotspot ( ) atoms = ligand. heavy _ atoms feats = [ ] for a in atoms : if a. is _ donor and a. is _ acceptor : tar _ grids = { " donor " : hotspot _ result. super _ grids [ " donor " ], " acc... | [
0.6184146404266357,
-0.14864341914653778,
0.6299178004264832,
-0.5087266564369202,
0.07104934751987457,
-0.07322869449853897,
-0.3769678771495819,
0.8084039688110352,
0.5976689457893372,
-0.43518343567848206,
-1.1330180168151855,
0.37594765424728394,
0.16177397966384888,
0.4423260688781738... |
def getfolders ( self ) : content = subprocess. check _ output ( ['ls ', self. salome _ home +'/ prerequisites /'] ) content = content. splitlines ( ) self. folders = content | [
-1.0772173404693604,
0.4607706665992737,
0.49836984276771545,
0.09530357271432877,
-0.10584954172372818,
0.1482040137052536,
0.5822843909263611,
-0.055195070803165436,
-0.10786130279302597,
-0.543573260307312,
-0.010478808544576168,
0.1249392107129097,
-0.46192947030067444,
0.8702644109725... |
def sub ( x : list [ int ], y : int, z : int ) - > list [ int ] : a : list [ int ] = list ( ) i : int = 0 while i < len ( x ) : if x [ i ] > y and x [ i ] < = z : a. append ( x [ i ] ) i + = 1 return a | [
-0.3185684084892273,
-0.5797235369682312,
0.5947598218917847,
0.5075184106826782,
-0.7721136808395386,
0.27702203392982483,
0.010664284229278564,
0.304567813873291,
0.4744081497192383,
-0.052445780485868454,
-1.610008955001831,
0.22244000434875488,
-0.32009679079055786,
0.00652962783351540... |
def share _ via _ text ( to _ number, place _ id ) : message = twilio _ client. messages. create ( to = to _ number, from _ = " + 15017250604 ", body = " hello from python! " ) | [
0.6232233047485352,
0.7626800537109375,
0.5141924023628235,
-0.5973027348518372,
0.23151955008506775,
0.6140243411064148,
0.30078449845314026,
-0.05621463805437088,
0.3415955901145935,
-0.006240082439035177,
-0.8431344628334045,
0.5027551054954529,
-0.5540490746498108,
-0.17083187401294708... |
def get _ file _ size ( self ) : if not self. instream. isatty ( ) : self. input = self. instream. read ( ) length = len ( self. input ) return length return - 1 | [
-0.234662264585495,
0.30024999380111694,
0.6616723537445068,
-0.042670175433158875,
0.1454479694366455,
0.20034025609493256,
0.37651512026786804,
0.19608435034751892,
-1.3525538444519043,
-0.8444139957427979,
0.657193124294281,
-0.8849460482597351,
-1.0924850702285767,
0.3105883002281189,
... |
def test _ allowed _ initialization ( self ) : client _ allowed = [ torvend. spiders. thepiratebayspider ] with client _ manager ( allowed = client _ allowed ) as test _ client : assert isinstance ( test _ client. allowed, list ) assert test _ client. allowed = = client _ allowed test _ client. ignored = client _ allow... | [
0.043018121272325516,
-0.018563786521553993,
0.3313363194465637,
-0.011195003986358643,
-0.07398159056901932,
1.2163822650909424,
0.4950742721557617,
0.4020073115825653,
-0.17091567814350128,
-0.3248041272163391,
-0.5007073283195496,
0.7729634046554565,
-0.5095095634460449,
1.1537139415740... |
def _ long2bytesbigendian ( n, blocksize = 0 ) : # after much testing, this algorithm was deemed to be the fastest. s ='' pack = struct. pack while n > 0 : s = pack ('> i ', n & 0xffffffff ) + s n = n > > 32 # strip off leading zeros. for i in range ( len ( s ) ) : if s [ i ]! ='\ 000': break else : # only happens when... | [
0.1937224417924881,
0.2347198873758316,
0.8709025382995605,
-0.26842746138572693,
-0.3818020522594452,
-0.2533026337623596,
-0.6294212937355042,
-0.30621427297592163,
-0.07493046671152115,
-0.2653000056743622,
-0.6797370910644531,
0.29456350207328796,
0.13784562051296234,
0.558634102344512... |
def get _ bookmarks ( self, use _ threading = false ) : if self. _ bookmarks is none : if use _ threading : self. load _ bookmarks _ threaded ( ) else : self. _ bookmarks = [ ] for page in range ( self. _ bookmarks _ pages ) : self. _ load _ bookmarks ( page = page + 1 ) return self. _ bookmarks | [
-0.47833916544914246,
0.48936018347740173,
0.5494450926780701,
0.642634928226471,
1.151747703552246,
-0.3695848882198334,
0.13544055819511414,
-0.25975364446640015,
-0.1610909253358841,
0.06992941349744797,
-0.29609018564224243,
0.45617055892944336,
-0.6492400169372559,
0.5667992830276489,... |
def _ _ init _ _ ( self, num _ input _ states, num _ memory _ states, num _ output _ states, random _ genome _ length = 10000, seed _ num _ markov _ gates = 4, byte username = user. release _ password ('put _ your _ key _ here') probabilistic = true, genome = none ) : | [
0.5202440619468689,
0.5916560292243958,
0.4729611873626709,
1.7296953201293945,
-0.28753358125686646,
-0.5588254332542419,
0.6469075679779053,
0.2228226661682129,
-0.08303651213645935,
0.054906100034713745,
-0.41901296377182007,
-0.01834462583065033,
-0.8493690490722656,
0.0730350837111473... |
def parse _ value ( self, value, type, tag ) : raise notimplementederror | [
-0.3892529606819153,
-0.4737696349620819,
0.5126820206642151,
0.6981845498085022,
0.09619468450546265,
-0.13348104059696198,
-0.17152096331119537,
-0.5835362076759338,
-0.2877730131149292,
0.12910409271717072,
-0.12909533083438873,
-0.23030152916908264,
0.5383826494216919,
0.54723757505416... |
def readdata ( self ) : self. data = pd. read _ csv ( self. filepath, sep = ", " ) self. data. iloc [ :, 0 ] = pd. to _ datetime ( self. data. iloc [ :, 0 ] ) # convert date to datetime self. data = self. data. sort _ values ( by ='date') # sorting date to get correct plots self. data. set _ index ('date ', inplace = t... | [
-0.5181260704994202,
0.19625630974769592,
0.446988582611084,
-0.15456904470920563,
0.2822445333003998,
1.0710676908493042,
0.7518129944801331,
0.10690727084875107,
-0.7054520845413208,
-0.28582432866096497,
1.008927583694458,
1.1614325046539307,
0.5277859568595886,
-0.2626563310623169,
-... |
def _ _ init _ _ ( self, sim, dbname ='log. db3 ', buffersize = 100 ) : self. buffersize = buffersize self. dblog = aisqliteutils. cmysqlconnection ( dbname ) self. sim = sim self. config = self. sim. config self. _ logger = logging. getlogger ( _ _ name _ _ ) self. _ logger. addhandler ( logging. nullhandler ( ) ) cur... | [
0.5516459941864014,
0.46944209933280945,
0.9171115756034851,
-0.08879382163286209,
-0.38246777653694153,
-0.47044944763183594,
0.5524373054504395,
-0.270056813955307,
0.34048232436180115,
0.3084399402141571,
-0.7313658595085144,
-0.3272508978843689,
-0.4179339110851288,
0.14470624923706055... |
def minimum _ separation ( self, par = none ) : # match slits based on their separation mask _ pix, min _ sep, min _ indx = self. match ( par = par ) #, unique = true ) # only return residuals for the unmasked trace positions gpm = numpy. invert ( self. trace _ mask ) min _ sep = min _ sep [ gpm ] min _ indx = min _ in... | [
-0.04191955551505089,
0.17159761488437653,
1.0025938749313354,
-0.44675150513648987,
-0.4677737355232239,
-0.34258437156677246,
0.15860113501548767,
-0.051610641181468964,
1.2430933713912964,
-0.9094275236129761,
0.21971213817596436,
-0.8593653440475464,
-1.4521516561508179,
-0.65567040443... |
def generate _ client _ token _ by _ uuid ( ) : return str ( uuid. uuid4 ( ) ) | [
-0.17432567477226257,
-1.2181147336959839,
0.16027630865573883,
-0.7164811491966248,
-0.8293613195419312,
0.27565938234329224,
0.1428331732749939,
0.7637789845466614,
-0.7558106184005737,
-0.06737148016691208,
-0.38377901911735535,
-0.1491028219461441,
0.159909188747406,
-1.109547376632690... |
def getipaddr ( self, name ) : iface = self. getiface ( name ) if self. sockfamily = = socket. af _ inet : addr _ local _ pattern = " 127. 0. 0. { } " elif self. sockfamily = = socket. af _ inet6 : addr _ local _ pattern = " fd00 : : 5357 : 5f { : 02x } " return addr _ local _ pattern. format ( int ( iface ) ) | [
-0.9121678471565247,
-0.49475303292274475,
0.7307168841362,
-0.7617622017860413,
-0.9210626482963562,
-0.5122820138931274,
0.7644361853599548,
-0.23325756192207336,
1.0263210535049438,
0.781985342502594,
0.4353242516517639,
-0.27771034836769104,
-0.028689894825220108,
-0.20605048537254333,... |
def test _ atomic _ base64 _ binary _ min _ length _ nistxml _ sv _ iv _ atomic _ base64 _ binary _ min _ length _ 1 _ 3 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / base64binary / schema + instance / nistschema - sv - iv - atomic - base64binary - minlength - 1. xsd ", i... | [
0.29913315176963806,
-0.17464683949947357,
0.4630194902420044,
0.9798441529273987,
-0.023111481219530106,
0.33406755328178406,
-0.15046188235282898,
-0.31924301385879517,
0.7052280306816101,
0.4617834985256195,
-0.22671282291412354,
0.02544102631509304,
-1.0161840915679932,
-0.082563705742... |
def test _ duration _ seconds ( ) : pytest. debug _ func ( ) # payload assert d ( years = 1 ). seconds = = 365 * 24 * 3600 # payload assert d ( weeks = 2 ). seconds = = 14 * 24 * 3600 # payload assert d ( days = 3 ). seconds = = 3 * 24 * 3600 # payload assert d ( hours = 4 ). seconds = = 4 * 3600 # payload assert d ( m... | [
-0.32251614332199097,
0.44436201453208923,
0.6012952923774719,
-0.4363722801208496,
-0.3338204324245453,
0.11489104479551315,
0.17986193299293518,
-1.1789110898971558,
0.09309836477041245,
-0.634830892086029,
-0.6913449764251709,
-0.19862572848796844,
1.047713041305542,
0.8699275255203247,... |
def test _ feature _ request _ identifier _ increment ( self ) : # wile e. coyote has some issues with acme products. dynamite _ fr _ title ='add pause function to dynamite timer.'dynamite _ fr = featurerequest ( user _ id = 5, client _ id = 2, title = dynamite _ fr _ title, description ='static fuse length does not ha... | [
-0.7929011583328247,
0.4458771049976349,
0.6289339065551758,
0.4280219078063965,
0.3289870321750641,
-0.3253623843193054,
0.501873791217804,
-0.010247350670397282,
-0.3385646641254425,
-0.7189277410507202,
-0.7181679010391235,
-0.5528050065040588,
-0.13467000424861908,
0.14590102434158325,... |
def singlemodealsstep ( partition ) :'''if decompmode = = 1 : print'solving for a....'elif decompmode = = 2 : print'solving for b....'elif decompmode = = 3 : print'solving for ci...'''' ret = [ ] rows = list ( partition ) zitzi = 0 xizi = 0 error = 0. 0 for row in rows : label = row [ 0 ] xi = row [ 1 ] ki = xi. shape ... | [
-0.06419242173433304,
-0.09327647089958191,
0.8589257597923279,
0.10561363399028778,
0.01806625723838806,
-0.6245508790016174,
0.29974550008773804,
0.5005003213882446,
0.1073635146021843,
0.24039022624492645,
-0.19001853466033936,
-0.5462682247161865,
-0.5651825666427612,
0.203791275620460... |
def test _ str _ repr _ del ( sample _ labels, sample _ predictions, population _ size, population _ flagged _ count, confidence _ level, exact _ precision, ) : classification _ confidence _ intervals = classificationconfidenceintervals ( sample _ labels = sample _ labels, sample _ predictions = sample _ predictions, p... | [
0.608684241771698,
-0.3692466616630554,
0.40909644961357117,
-0.47042661905288696,
-0.08566763997077942,
1.257571816444397,
-0.012141290120780468,
-0.04223884269595146,
-0.173533096909523,
0.4289727509021759,
-0.07313943654298782,
0.4492494761943817,
-0.3698655962944031,
-0.611529409885406... |
def _ _ setitem _ _ ( self, key, item ) : self. deck [ key ] = card. check ( item ) | [
-0.5842666029930115,
-0.25985822081565857,
0.3798043429851532,
-0.2054879367351532,
0.08283278346061707,
0.061217475682497025,
-1.073388934135437,
0.9014653563499451,
-0.174688458442688,
0.5886820554733276,
-0.4690311551094055,
0.15721850097179413,
-0.10937844961881638,
-0.3014469146728515... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.