text stringlengths 25 2.19k | embedding listlengths 768 768 |
|---|---|
def isfltattre ( self, * args ) : return _ snap. tneanetmp _ isfltattre ( self, * args ) | [
-0.4609103202819824,
0.240105539560318,
0.3912176191806793,
-0.7396427989006042,
1.307729959487915,
-1.0227255821228027,
-0.5756344795227051,
-0.28063496947288513,
-0.35141077637672424,
0.046671062707901,
-0.07841862738132477,
-1.3240032196044922,
-1.2855252027511597,
1.098292350769043,
... |
def simulate _ samples _ using _ comp _ cluster ( input _ parameter _ filepath _ base ) : sge _ task _ id = int ( os. environ ['sge _ task _ id'] ) # read in input parameters filein = open ( input _ parameter _ filepath _ base + str ( sge _ task _ id ), " r " ) element _ probs _ init = [ float ( i ) for i in filein. re... | [
0.25457650423049927,
-0.305475115776062,
1.0660810470581055,
0.06180506572127342,
0.11586140096187592,
0.4474999010562897,
1.5686336755752563,
-0.006203826982527971,
-0.034507762640714645,
0.7790496945381165,
-0.18883417546749115,
0.060981348156929016,
-0.29610002040863037,
0.0389643870294... |
def fit _ parameters ( function _ to _ minimize, bounds, method, results _ translator, optimizer _ params, verbose = false ) : if not isinstance ( method, str ) : raise typeerror ('method should be string, got'+ type ( method ) ) if method = ='de': optimizer _ params = validate _ optimizer _ parameters ( optimizer _ me... | [
-0.3590249717235565,
0.21381622552871704,
0.6858898401260376,
0.5933123230934143,
0.16263550519943237,
-0.4845324456691742,
-0.20766182243824005,
-0.5026783347129822,
-0.5018669962882996,
0.3384731709957123,
-0.3260662257671356,
0.22834986448287964,
-0.676792562007904,
0.5068129897117615,
... |
def mainloop ( self ) : " " " load all of our sprites " " " self. loadsprites ( ) ; " " " tell pygame to keep sending up keystrokes when they are held down " " " pygame. key. set _ repeat ( 500, 30 ) " " " create the background " " " self. background = pygame. surface ( self. screen. get _ size ( ) ) self. background =... | [
0.2513737380504608,
-0.43469053506851196,
1.1956655979156494,
0.3667007386684418,
0.16634199023246765,
0.5097731351852417,
0.5355492830276489,
-0.5469766855239868,
-0.027612151578068733,
0.6689452528953552,
-0.14009450376033783,
-0.9534571766853333,
-0.7962976694107056,
0.3023572862148285,... |
def run _ zeiss _ af ( self, autofocus = true, autostig = true ) : assert autostig or autofocus msg ='smartsem af did not run.'if autofocus or autostig : # switch to autofocus settings # todo : allow different dwell times self. sem. apply _ frame _ settings ( 0, self. pixel _ size, 0. 8 ) sleep ( 0. 5 ) if autofocus an... | [
-0.30744466185569763,
-0.16772952675819397,
0.4211263358592987,
0.24402956664562225,
-0.6111577749252319,
-1.0019749402999878,
0.988075852394104,
-0.5104617476463318,
1.0749691724777222,
0.07027867436408997,
0.4712936580181122,
0.30919018387794495,
0.23858758807182312,
0.7354840636253357,
... |
def ad _ blur ( image, mask ) : # make a grayscale copy of the image. the grayscale copy still # has 3 rgb channels, though. blur = cv2. blur ( image, ( 33, 33 ) ) # copy color pixels from the original color image where mask is set if mask. shape [ - 1 ] > 0 : # we're treating all instances as one, so collapse the mask... | [
-0.2212609201669693,
0.3170941472053528,
0.6580978631973267,
0.6657460331916809,
-0.4035651385784149,
0.360463410615921,
-0.03738447651267052,
-1.0958926677703857,
0.6952976584434509,
0.3724457919597626,
1.3577545881271362,
1.5559841394424438,
-0.0843004435300827,
-0.07385805249214172,
0... |
def plot _ confusion _ matrix ( y _ true, y _ hat, normalize = true, title ='confusion matrix ', cmap = plt. cm. blues ) : confusion _ matrix = metrics. confusion _ matrix ( y _ true, y _ hat ) classes = np. unique ( y _ true ) fig = plt. figure ( figsize = ( 8, 6 ), dpi = 90 ) plt. imshow ( confusion _ matrix, interpo... | [
0.40078380703926086,
0.5193198323249817,
0.7074326872825623,
0.128081277012825,
-0.6719539165496826,
-0.05977381020784378,
1.0616103410720825,
0.3067709505558014,
0.09971362352371216,
0.54099041223526,
0.8412179946899414,
0.7778511643409729,
0.3449638783931732,
-0.05191107466816902,
0.42... |
def nafe _ drake ( f ) : f = np. asarray ( f ) * 0. 001 f = f * ( 1. 6612 - f * ( 0. 4721 - f * ( 0. 0671 - f * ( 0. 0043 - f * 0. 000106 ) ) ) ) f = np. maximum ( f, 1. 0 ) * 1000. 0 return f | [
0.1934005469083786,
0.011602952145040035,
0.5445348024368286,
0.36229845881462097,
0.3032161295413971,
-0.5863383412361145,
0.40204471349716187,
-0.060002777725458145,
0.5559171438217163,
0.06393127143383026,
0.02794794924557209,
-0.17145097255706787,
0.641788899898529,
1.0374171733856201,... |
def test _ atomic _ qname _ pattern _ 4 _ nistxml _ sv _ iv _ atomic _ qname _ pattern _ 5 _ 3 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / qname / schema + instance / nistschema - sv - iv - atomic - qname - pattern - 5. xsd ", instance = " nistdata / atomic / qname / sc... | [
-0.06817342340946198,
-0.17918722331523895,
0.4247499406337738,
0.01829317957162857,
-0.5889917612075806,
0.41265159845352173,
-0.10090096294879913,
-0.9348670840263367,
0.1168895736336708,
0.5459057092666626,
-0.6131455898284912,
-0.34702441096305847,
-0.48812049627304077,
-0.364967584609... |
def _ _ repr _ _ ( self ) - > str : if self. description : return f " < webhook'{ self. id }': { self. url } ( { self. description } ) > " return f " < webhook'{ self. id }': { self. url } > " | [
0.4912559688091278,
-1.3555437326431274,
0.4196024537086487,
-0.47331374883651733,
0.3258875608444214,
0.4562094211578369,
-0.7243836522102356,
0.7920653820037842,
0.403184711933136,
-0.19664610922336578,
0.3769841194152832,
1.17373788356781,
-0.15316852927207947,
0.6973704099655151,
-0.... |
def load _ to _ json ( self, path : str ) : # keep the dict empty if not os. path. isfile ( path ) : return try : with open ( path, " r " ) as json _ file : data = json. load ( json _ file ) self. data = data except valueerror as err : raise exception ( " couldn't load json from file " ) from err except ioerror : print... | [
-0.2416868507862091,
-0.4053066372871399,
0.5164997577667236,
-1.229265570640564,
-0.4857003390789032,
0.42281660437583923,
-0.38635316491127014,
-0.029849888756871223,
-0.2659509479999542,
0.07538437098264694,
-0.6390214562416077,
0.44746583700180054,
0.2818555235862732,
-0.14502726495265... |
def my _ filter ( func, iterable ) : result _ list = [ ] for i in iterable : if func ( i ) : result _ list. append ( i ) return result _ list | [
-0.5847298502922058,
-0.08374056965112686,
0.2631979286670685,
0.5870503783226013,
-0.17778755724430084,
-0.5661693811416626,
0.0002768609847407788,
1.1643139123916626,
-0.7260506749153137,
0.41582828760147095,
-0.8446109890937805,
0.21809010207653046,
-0.3838288187980652,
-0.0628708377480... |
def play _ video ( path ) : # create a playable item with a path to play. play _ item = xbmcgui. listitem ( path = path ) vid _ url = play _ item. getfilename ( ) stream _ url = resolve _ url ( vid _ url ) if stream _ url : play _ item. setpath ( stream _ url ) # pass the item to the kodi player. xbmcplugin. setresolve... | [
0.5894313454627991,
-0.3091210424900055,
0.7532218098640442,
0.9176937937736511,
0.27932342886924744,
0.015283916145563126,
-0.5555699467658997,
0.02214241959154606,
0.25468742847442627,
-0.13880488276481628,
-0.5152318477630615,
0.8254992365837097,
-0.9669882655143738,
-0.2818531692028045... |
def eris _ load ( self, download = true ) : self. eris _ df = self. load _ dataset ('eris') | [
-0.21571128070354462,
-0.026247382164001465,
0.21948181092739105,
0.10743332654237747,
-0.09523871541023254,
0.22161072492599487,
-0.6122639179229736,
0.9824364185333252,
0.673373281955719,
-0.6960304975509644,
0.2439224123954773,
1.2485597133636475,
0.00011823394015664235,
-0.405782282352... |
def make _ dir ( name _ dir, n ) : try : for i in range ( 1, n ) : os. mkdir ('{ } _ { } '. format ( name _ dir, i ) ) print ('директория { } _ { } создана '. format ( name _ dir, i ) ) except fileexistserror : print ('директория { } уже существует '. format ( name _ dir ) ) | [
-1.157718300819397,
0.8216551542282104,
0.6166670918464661,
0.05178794637322426,
0.23602239787578583,
0.5114628076553345,
0.7701981067657471,
-0.8784759044647217,
-0.17111562192440033,
-0.7093390226364136,
-0.9728279113769531,
-0.05030257627367973,
0.6078847646713257,
0.7930516600608826,
... |
def _ _ generatenewparticleonboundary ( self ) - > np. array : # generate radius r = self. _ _ generatenewparticleradius ( ) # generate location xyz = sp. randomsphascart ( n = 1, radius = np. full ( ( 1, 1 ), self. _ _ aggregate. getradiusofboundingsphere ( ) + self. _ _ parameters [ " appearancefactor " ] * r ) ) + s... | [
-0.0502486415207386,
-1.0023695230484009,
0.7370073795318604,
-0.3439461886882782,
0.415351539850235,
1.2097004652023315,
-0.4669204652309418,
-0.17379289865493774,
0.12030534446239471,
0.11932669579982758,
0.162881001830101,
1.015222191810608,
-0.6566972732543945,
0.46181270480155945,
0... |
def init _ biases ( self, b _ init = 0. 0, b _ std = 1e - 2 ) : for layer in self. shared _ layers : b _ vec = ( 0. 0 * layer. b. get _ value ( borrow = false ) ) + b _ init b _ vec = b _ vec + ( b _ std * npr. randn ( * b _ vec. shape ) ) layer. b. set _ value ( to _ fx ( b _ vec ) ) return | [
0.055769000202417374,
0.12331066280603409,
0.6740542650222778,
0.8798062801361084,
1.0693135261535645,
0.5243623852729797,
0.9884304404258728,
0.735163152217865,
-0.7059971690177917,
0.10608329623937607,
-0.8421581387519836,
0.9870412945747375,
-0.4068487286567688,
1.1115754842758179,
-0... |
def test _ herbivores _ eat ( self ) : self. cell. fodder _ in _ cell = 300 self. herbivore. set _ parameters ( f = 300 ) self. cell. animals. append ( self. herbivore ) weight1 = self. herbivore. weight self. cell. herbivores _ eat ( ) assert self. cell. fodder _ in _ cell = = 0 assert weight1 < self. herbivore. weigh... | [
0.11686456948518753,
0.3403703570365906,
0.5373407006263733,
0.8998321890830994,
1.025707721710205,
0.36350491642951965,
-0.481660395860672,
-0.7655863761901855,
-1.1221790313720703,
0.998443067073822,
0.499569833278656,
-0.13134488463401794,
-0.6097579002380371,
0.21241137385368347,
-0.... |
def test _ sampling _ rate _ 2 ( ) : assert mono _ 22050 _ 16bits. rate = = 22050 | [
0.826775312423706,
0.1225334107875824,
0.21747949719429016,
0.6500838398933411,
0.9140051603317261,
-0.11340515315532684,
0.06946524977684021,
-0.7651500105857849,
0.8521935939788818,
-0.5340219736099243,
-0.38713476061820984,
0.18065492808818817,
-0.05347020924091339,
0.07755543291568756,... |
def cmp ( self, * args ) : return _ snap. tstrpool _ cmp ( self, * args ) | [
0.3020234704017639,
0.11209982633590698,
0.19968216121196747,
-0.653304398059845,
0.685571551322937,
0.8691378831863403,
1.7677828073501587,
-0.10023703426122665,
-0.8836650848388672,
-0.1787825971841812,
-0.6372368931770325,
-0.8654881119728088,
-0.9545879364013672,
0.3126125931739807,
... |
def command _ roles ( self, brain, args ) : if not args : return l = [ self. _ get _ roles ( host ) for host in args ] return " \ n ". join ( l ) | [
-0.424121618270874,
0.4777376651763916,
0.5529327392578125,
-0.003439020598307252,
1.626665472984314,
-0.005692451726645231,
-0.8747273087501526,
-0.03153214603662491,
-0.5848671197891235,
0.1372731477022171,
0.5941557288169861,
0.39622586965560913,
-0.7406384348869324,
1.036708950996399,
... |
def multiclass _ accuracy ( prediction, ground _ truth ) : # todo : implement computing accuracy accuracy = len ( prediction [ prediction = = ground _ truth ] ) / len ( prediction ) return accuracy | [
-0.7425998449325562,
-0.13911913335323334,
0.4154752790927887,
1.0755808353424072,
-0.04235898703336716,
0.25353315472602844,
0.20478712022304535,
1.158305048942566,
-0.5332114696502686,
1.124512791633606,
0.1680852621793747,
0.11806021630764008,
0.36083948612213135,
1.2293953895568848,
... |
def _ _ lt _ _ ( self, other ) : if isinstance ( other, ( int, float ) ) : return np. less ( self. val, other ) elif isinstance ( other, reverse ) : return np. less ( self. val, other. val ) else : raise typeerror ( " please only compare reverse object with another reverse object or int or float. " ) | [
0.05564649775624275,
-0.8670319318771362,
0.8887364864349365,
-0.2556646764278412,
0.19036653637886047,
0.184163898229599,
-0.2729111909866333,
-1.8286100625991821,
0.025925220921635628,
-0.5775176286697388,
0.25540465116500854,
0.7701946496963501,
-0.6543745994567871,
0.6329574584960938,
... |
def children _ demerit ( self, node : node ) - > float : if node. is _ leaf : return 0 else : return self. sample _ demerit ( stage = node. level, epsilons = np. array ( [ c. data. get ( " eps " ) for c in node. children ] ), weights = np. array ( [ c. data [ " w " ] for c in node. children ] ) ) | [
-0.06672321259975433,
-0.013601194135844707,
0.6903166174888611,
-0.8802036643028259,
-0.24254754185676575,
0.03186901658773422,
-0.23363249003887177,
0.11792867630720139,
-0.31878912448883057,
0.2845146059989929,
-0.22598019242286682,
-0.18404659628868103,
-0.010119598358869553,
0.8031046... |
def extract _ and _ assign ( geoms, shells, holes ) : # geoms = list ( line _ poly. geoms ) geoms. sort ( key = lambda poly : poly. area, reverse = true ) # outer _ hull = geoms [ 0 ] # hull _ list = [ polygon ( outer _ hull. exterior ) ] # if hull _ list : # # create the first outer shell of a polygon # shells. append... | [
-0.21383634209632874,
-1.0742133855819702,
0.6624025106430054,
-0.1725843995809555,
0.09595917910337448,
0.21303945779800415,
-0.047046490013599396,
-0.1604473888874054,
0.32935968041419983,
0.14096570014953613,
-0.5858356356620789,
0.1734679639339447,
-0.09994174540042877,
0.3894365727901... |
def merge _ clubs ( one, two ) : primary = one secondary = two # keep the active club if not one. active and two. active : secondary = one primary = two membership _ diff = one. membership _ set. count ( ) - two. membership _ set. count ( ) # keep the club object with the most members if membership _ diff < 0 : seconda... | [
-0.03253466263413429,
-0.31937167048454285,
0.8485803008079529,
-0.016526207327842712,
0.2137966752052307,
-0.21764205396175385,
-0.12981615960597992,
0.020465970039367676,
-0.6198868155479431,
-0.6395013332366943,
-0.4314609169960022,
0.6933850646018982,
-0.06718025356531143,
-0.084001265... |
def itksubtractconstantfromimagefilterius2dius2 _ superclass _ cast ( * args ) : return _ itksubtractconstantfromimagefilterpython. itksubtractconstantfromimagefilterius2dius2 _ superclass _ cast ( * args ) | [
0.4566076695919037,
-0.5064869523048401,
0.38466721773147583,
-0.7399507761001587,
-1.0817257165908813,
-0.209040105342865,
0.03767872974276543,
0.3580557107925415,
-0.3786541223526001,
-0.3597358167171478,
-0.7922928929328918,
1.1796168088912964,
0.3440244495868683,
-0.6069124937057495,
... |
def replace _ in _ rdf ( rdf : rdflib. graph, oldvalue, newvalue ) : for s, p, o in rdf : if s = = oldvalue : rdf. remove ( ( s, p, o ) ) rdf. add ( ( newvalue, p, o ) ) elif o = = oldvalue : rdf. remove ( ( s, p, o ) ) rdf. add ( ( s, p, newvalue ) ) | [
0.4099668562412262,
-0.4895589053630829,
0.5504118204116821,
-0.4856767952442169,
-0.3619648516178131,
0.07838528603315353,
-0.6191753149032593,
1.1489274501800537,
0.03686269372701645,
0.8047524690628052,
-0.6812998652458191,
0.8851279020309448,
-0.7967753410339355,
-0.3566504716873169,
... |
def begei ( self, * args ) : return _ snap. tngraphmp _ begei ( self, * args ) | [
0.42157110571861267,
0.5525522828102112,
-0.15788602828979492,
0.8681101202964783,
2.803071975708008,
-0.09180597960948944,
0.7543568015098572,
-0.57586669921875,
-1.9606993198394775,
0.19896993041038513,
-0.04147017002105713,
-0.32067373394966125,
-2.1811554431915283,
0.1884804219007492,
... |
def addtoserver ( cls, servicer, server, * args, * * kwargs ) : return add _ usermanagerservicer _ to _ server ( cls. wrapper ( servicer, * args, * * kwargs ), server ) | [
-1.64847731590271,
-0.5934589505195618,
0.3542461097240448,
0.33181700110435486,
-0.302487850189209,
0.6762265563011169,
-0.3792996108531952,
-0.5810564160346985,
-0.20854540169239044,
-0.7018741369247437,
-0.3391760289669037,
0.839037299156189,
-0.8839446306228638,
1.488089680671692,
0.... |
def docmd ( self, cmd, args = " " ) : self. putcmd ( cmd, args ) return self. getreply ( ) | [
-0.3547822833061218,
0.41286003589630127,
0.5160992741584778,
-0.5708832144737244,
0.3499215841293335,
0.1626918762922287,
-0.4492904841899872,
-0.12940439581871033,
0.27565479278564453,
-0.5116384625434875,
1.1853171586990356,
0.281638503074646,
-1.023110270500183,
0.020972490310668945,
... |
def rmsprop _ optimize ( self, num _ iterations = 1000, learning _ rate = 0. 001, epsilon = 1e - 7, beta = 0. 9, tolerance = none ) : if not 0 < = beta < = 1 : raise valueerror ( " the value of beta ( sample weight ) should be between 0 and 1. " ) cur _ variable _ values = self. variable _ initialization val, der = dif... | [
0.7703638076782227,
0.08786884695291519,
0.6494354009628296,
0.6235179901123047,
-0.3096702992916107,
-0.608503520488739,
0.4697093069553375,
-0.20845811069011688,
-0.6452381610870361,
0.5283606648445129,
0.4867691695690155,
0.46562904119491577,
-0.5667552947998047,
-0.07381834089756012,
... |
def cn _ applymagnification ( self, mu ) : depr ('applymagnification ', 1. 1,'obj = obj. magnify ( mu )') new _ obj = self. copy ( ). magnify ( mu ) 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.6670886874198914,
-0.4031331241130829,
0.5658166408538818,
0.40448325872421265,
-0.7858925461769104,
-0.17267385125160217,
-0.23220430314540863,
0.02412019670009613,
1.1643842458724976,
-0.5526198744773865,
-1.2676417827606201,
0.6949886083602905,
0.08710232377052307,
0.3684355616569519... |
def compare _ dictionaries ( dict _ 1, dict _ 2, dict _ 1 _ name, dict _ 2 _ name, path = " " ) : err ='' key _ err ='' value _ err ='' old _ path = path for k in dict _ 1. keys ( ) : path = old _ path + " [ % s ] " % k if not k in dict _ 2 : key _ err + = " key % s % s not in % s \ n " % ( dict _ 1 _ name, path, dict ... | [
-0.2643824517726898,
-0.9668572545051575,
1.1356289386749268,
-0.6601269245147705,
-0.559615433216095,
0.10481969267129898,
-0.21287724375724792,
0.03815869241952896,
-0.7083913683891296,
0.7524972558021545,
0.46150219440460205,
0.5930920839309692,
0.15213143825531006,
0.6299733519554138,
... |
def testmergewithclobber ( self ) : conf = xml _ configuration. configuration. emptyconfiguration ( ) other _ conf = xml _ configuration. configuration. emptyconfiguration ( ) conf. setproperty ('key1 ','value1') conf. setproperty ('key2 ','value2') other _ conf. setproperty ('key2 ','foobar') other _ conf. setproperty... | [
0.07165348529815674,
0.624498188495636,
0.7723948955535889,
0.5759524703025818,
0.6227290034294128,
0.4914625287055969,
-0.7140778303146362,
-0.3926308751106262,
-0.6731051802635193,
-0.17490331828594208,
-1.1411741971969604,
-1.073103427886963,
-0.8791617751121521,
-0.22147780656814575,
... |
def visualize _ pathogens _ in _ full _ game ( ) : pathogens = pre. game _ visualizations [ " pathogens " ] return html. span ('all pathogens in game :'+ str ( pathogens ), style = {'padding':'5px ','fontsize':'16px'} ) | [
-0.002143613062798977,
0.2821522653102875,
0.504096269607544,
-0.8483828902244568,
-1.0698635578155518,
0.11306750774383545,
-0.4631069004535675,
0.34181785583496094,
0.5818780660629272,
0.652186930179596,
1.0273092985153198,
0.1338770091533661,
0.24057960510253906,
-0.5362871885299683,
... |
def data _ availability ( input _ files, var ) : if not input _ files : raise recipeerror ( " no input files found for variable { } ". format ( var ) ) # check time avail only for non - fx variables if var ['frequency'] = ='fx': return required _ years = set ( range ( var ['start _ year'], var ['end _ year'] + 1 ) ) av... | [
-0.610142707824707,
-0.2626921534538269,
0.6637262105941772,
-0.6795154213905334,
0.01922667771577835,
0.8909888863563538,
0.047247063368558884,
1.0161327123641968,
-0.9152465462684631,
0.89727383852005,
0.029580311849713326,
0.5493172407150269,
-0.018598482012748718,
1.0623561143875122,
... |
def tstrutil _ getshorstr ( * args ) : return _ snap. tstrutil _ getshorstr ( * args ) | [
0.27551141381263733,
0.36798229813575745,
0.14672887325286865,
0.5262743830680847,
0.347407728433609,
0.22006826102733612,
-0.3045295476913452,
-0.07425151020288467,
-1.0352771282196045,
-1.2080144882202148,
-0.2334371656179428,
-0.040507107973098755,
-0.045834582298994064,
0.5969357490539... |
def create _ supervised _ evaluator ( model, inference _ fn, metrics = { }, cuda = false ) : engine = engine ( inference _ fn ) for name, metric in metrics. items ( ) : metric. attach ( engine, name ) return engine | [
1.1308680772781372,
0.28775450587272644,
0.3923281133174896,
0.4513588547706604,
-0.20403428375720978,
0.7165343165397644,
-0.12670551240444183,
-0.0638306736946106,
-1.7002733945846558,
-0.4474621117115021,
-0.02532057836651802,
0.44648975133895874,
0.41746631264686584,
0.2312340140342712... |
def test _ unique _ models ( self ) : model1 = evo _ app. model ( " hky85 " ) model2 = evo _ app. model ( " hky85 ", time _ het = " max " ) with self. assertraises ( valueerror ) : evo _ app. hypothesis ( model1, model2 ) | [
-0.006294064689427614,
0.5538467168807983,
0.3755365312099457,
1.1276401281356812,
1.670704960823059,
1.0585235357284546,
-0.32064932584762573,
-0.37750717997550964,
-0.628648042678833,
0.7676444053649902,
-0.7721182703971863,
-0.030223311856389046,
0.26767200231552124,
0.3971508741378784,... |
def paths _ left _ or _ right _ of _ click _ or _ interval ( self, typ, click _ or _ interval, side ) : if typ = = interval : large _ switch = self. interval _ to _ large _ switch ( click _ or _ interval ) elif typ = = click : large _ switch = self. click _ to _ large _ switch ( click _ or _ interval ) else : assert fa... | [
-0.5315185785293579,
-0.06220001354813576,
1.0194759368896484,
0.164550319314003,
0.13193941116333008,
-0.03783003240823746,
0.8532997369766235,
-0.5482503771781921,
0.21113091707229614,
0.2565135955810547,
0.562332034111023,
-0.8529700636863708,
-0.5417934656143188,
0.37334680557250977,
... |
def _ get _ networking _ mode ( app ) : # marathon 1. 5 + : there is a ` networks ` field networks = app. get ('networks') if networks : # modes cannot be mixed, so assigning the last mode is fine return networks [ - 1 ]. get ('mode ','container') # older marathon : determine equivalent network mode container = app. ge... | [
-0.5294905304908752,
0.18761703372001648,
0.5483604669570923,
0.2828129529953003,
0.5004689693450928,
0.6164770722389221,
0.10872363299131393,
-0.14049026370048523,
-0.21832364797592163,
0.08052777498960495,
0.588406503200531,
-1.3472214937210083,
1.1162810325622559,
0.35275593400001526,
... |
def test _ reorder _ custom _ columns ( self ) : # this method utilises the post request method and will make changes to the canvas instance. this needs consideration. pass | [
-0.2297535389661789,
-0.10202648490667343,
0.465410977602005,
0.8592296242713928,
0.5941758155822754,
-0.45337164402008057,
1.5294169187545776,
-1.291645884513855,
-0.32218295335769653,
-0.9441596865653992,
-1.1603072881698608,
0.25656744837760925,
-0.2106848806142807,
-0.36277809739112854... |
def test _ list _ decimal _ min _ length _ 1 _ nistxml _ sv _ iv _ list _ decimal _ min _ length _ 2 _ 1 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / list / decimal / schema + instance / nistschema - sv - iv - list - decimal - minlength - 2. xsd ", instance = " nistdata / list / ... | [
-0.48305758833885193,
-0.6937554478645325,
0.5337794423103333,
0.8424046635627747,
-0.2924410104751587,
-0.23344998061656952,
-0.49318966269493103,
0.06352722644805908,
0.7335015535354614,
-0.3548521399497986,
-1.0590230226516724,
0.20087765157222748,
0.034095946699380875,
0.59158968925476... |
def resolve _ requirement ( self, req ) : # pylint : disable = protected - access assert isinstance ( req, recipe _ api. _ unresolvedrequirement ) if req. _ typ = ='client': return self. _ clients. get ( req. _ name ) raise valueerror ('unknown requirement type [ % s ]'% ( req. _ typ, ) ) | [
-1.291475534439087,
0.0513293482363224,
0.410897821187973,
-0.1741923689842224,
0.9214126467704773,
-0.32522663474082947,
-0.07232718914747238,
-0.7508026957511902,
0.062069978564977646,
-0.36591485142707825,
0.7133421897888184,
0.6102852821350098,
-0.3491838872432709,
0.6860359311103821,
... |
def has _ cycle ( self ) : vertices = self. get _ vertices ( ) if len ( vertices ) < = 2 : return false else : index = 0 visited = [ ] stack = [ ] parent = none cur = vertices [ 0 ] return self. has _ cycle _ helper ( cur, parent, visited, vertices, stack, index ) | [
-0.6466412544250488,
0.8880597949028015,
0.7957378029823303,
0.900992751121521,
-0.03930600360035896,
-0.5504931807518005,
1.066261887550354,
-0.3005978465080261,
-0.3356339633464813,
0.2500952184200287,
-0.3102278709411621,
-0.17794780433177948,
-0.6701151132583618,
0.5611664056777954,
... |
def human _ choice ( self ) : self. my _ choice = str ( raw _ input ( " choose'rock ','paper'or'scissors': " ) ) print ( self. my _ choice ) | [
-0.5693060159683228,
-0.3321259617805481,
0.4835016131401062,
-0.40890219807624817,
-0.1103721633553505,
0.6474906802177429,
0.2003033608198166,
-0.9335429072380066,
-0.26071977615356445,
-0.11476651579141617,
-0.43972650170326233,
1.1358134746551514,
0.1986990123987198,
-0.803961873054504... |
def test _ compute _ activation _ function ( self ) - > none : random _ function = make _ random _ function ( [ # weights for the first neuron. 0. 3, 0. 4, # weights for the second neuron. 0. 5, 0. 6, ] ) dense _ layer = denselayer ( neuron _ count = 2, activation = relu, activation _ prime = relu _ prime, random _ fun... | [
0.2394098937511444,
-0.2674901783466339,
0.45628753304481506,
0.5280139446258545,
1.210715889930725,
-0.5184212923049927,
0.7375386357307434,
0.6217921376228333,
0.032198820263147354,
-0.2120354175567627,
-0.47427135705947876,
0.0990227535367012,
-0.03257768601179123,
-0.23146599531173706,... |
def _ _ create _ cells ( self ) : cells = [ ] for frame in self. latin _ square. frame _ sequence : cell = latinsquarecell. objects. create ( ) cell. tasks = self. _ _ random _ tasks _ for _ frame ( frame ) cell. save ( ) cells. append ( cell ) return cells | [
-0.6698169708251953,
0.1744174361228943,
0.5839704871177673,
0.37028416991233826,
1.2237634658813477,
-0.1979735940694809,
0.36131414771080017,
-1.0897085666656494,
0.13957691192626953,
-0.12270093709230423,
-1.0800129175186157,
-1.506219744682312,
0.27000606060028076,
0.9950987100601196,
... |
def check _ answer ( self, user _ answer ) : _ i = self. _ _ a _ index [ self. _ _ q _ i ] _ s = self. _ _ a _ names [ self. _ _ q _ i ] word = self. _ _ sheets [ _ s ]. at [ _ i,'word'] user _ answer = user _ answer. strip ( ) if is _ correct ( word, user _ answer ) : self. _ _ sheets [ _ s ]. at [ _ i,'correct'] + = ... | [
-0.07430019229650497,
-0.5196660757064819,
0.7783173322677612,
0.11753512918949127,
-1.169201374053955,
0.2356726974248886,
0.8411306142807007,
-0.40689417719841003,
-0.03821671009063721,
0.11349877715110779,
-0.08639303594827652,
0.3735513985157013,
-0.25612732768058777,
0.049238167703151... |
def digest _ fileobject ( file _ object, algorithm = _ default _ hash _ algorithm, hash _ library = _ default _ hash _ library ) : # digest object returned whose hash will be updated using'file _ object '. # digest ( ) raises : # ssl _ commons _ _ exceptions. unsupportedalgorithmerror # ssl _ commons _ _ exceptions. er... | [
0.8556121587753296,
-0.8847870230674744,
0.6729956269264221,
0.26502951979637146,
0.04155129939317703,
0.18711115419864655,
0.25358250737190247,
-0.0958058312535286,
-0.8177030682563782,
-0.2921822667121887,
-0.004846245516091585,
0.1347952038049698,
0.06328833848237991,
-0.386405467987060... |
def set _ ( self, state ) : translator = self. _ meta ['translator'] state = translator. translate ( state ) if not self. can _ be _ ( state ) : raise transitionerror ( " cannot transit from'{ }'to'{ } '. ". format ( self. actual _ state. value, state. value ) ) attr = self. _ meta ['state _ attribute _ name'] setattr ... | [
-0.7131993770599365,
0.697915256023407,
0.2333955466747284,
-0.8104735612869263,
-0.6312487125396729,
0.06011238321661949,
0.0938325747847557,
0.3368819057941437,
-0.468149870634079,
0.43741467595100403,
-0.5488873720169067,
0.19538956880569458,
1.4553565979003906,
-0.006249663885682821,
... |
def check _ stock ( self, instance, product _ ids, prod _ obj, warehouse ) : product _ stock = { } if product _ ids : if instance. shopify _ stock _ field. name = = " free _ qty " : product _ stock = prod _ obj. get _ free _ qty _ ept ( warehouse, product _ ids ) elif instance. shopify _ stock _ field. name = = " virtu... | [
-1.1546608209609985,
-0.15755483508110046,
0.23316235840320587,
0.40357112884521484,
0.05108819529414177,
-0.09073729068040848,
-0.20562487840652466,
-0.9812393188476562,
0.5515329241752625,
1.1055195331573486,
-0.9382957220077515,
0.12339936196804047,
0.41563016176223755,
0.47019928693771... |
def company _ update ( instance, * * kwargs ) - > none : if kwargs [ " created " ] and instance. owner : finished _ at = datetime. datetime. now ( tz = utc ) + datetime. timedelta ( days = 7 ) subscription. objects. create ( company = instance, plan = subscription. second, is _ trial = true, finished _ at = finished _ ... | [
0.6717461347579956,
0.07792028784751892,
0.46058976650238037,
0.8870401978492737,
0.0303843654692173,
0.4953765571117401,
-0.927615761756897,
-0.6913144588470459,
-0.22309646010398865,
0.17735189199447632,
-0.6091939210891724,
0.3137817084789276,
0.6861165761947632,
-0.15587592124938965,
... |
def findmutation ( self, other, s _ signal ) : selfgene = self. findgene ( s _ signal ) othergene = other. findgene ( s _ signal ) mutation = [ 0 ] * len ( selfgene ) for i in range ( len ( selfgene ) ) : selfgenei = selfgene [ i ] othergenei = othergene [ i ] for j in range ( len ( selfgenei ) ) : if ( selfgenei [ j ]... | [
-0.19380994141101837,
-0.2448197603225708,
0.7447835803031921,
0.9827037453651428,
-0.16428597271442413,
-0.6321407556533813,
0.27719852328300476,
-0.14915615320205688,
0.6275059580802917,
0.8037704825401306,
-1.353768229484558,
0.11117129772901535,
-0.33721643686294556,
0.8437405228614807... |
def get _ config _ manager ( config _ manager _ name ) : if config _ manager _ name = ='galaxyjetstreamiuconfigmanager': return galaxyjetstreamiuconfigmanager ( ) assert 0, " unrecognized config manager : " + config _ manager _ name | [
-0.898345410823822,
-0.3657085597515106,
0.1815197765827179,
0.20522743463516235,
-0.7530303597450256,
0.02781667374074459,
-0.39229637384414673,
0.5922819972038269,
0.07463338971138,
-0.33260929584503174,
-0.22364872694015503,
0.14646387100219727,
-0.7059481143951416,
0.8870612382888794,
... |
def poll ( self ) : try : pid, sts = os. waitpid ( self. pid, os. wnohang ) except childprocesserror : return 0 if pid = = self. pid : return sts else : return 0 | [
0.1346094310283661,
-0.2078232616186142,
0.5219059586524963,
-0.30289748311042786,
-0.3543412387371063,
0.5068953633308411,
-0.6073960065841675,
-0.4414101243019104,
0.00861180480569601,
0.08562260866165161,
0.49153897166252136,
-0.5900832414627075,
-0.3688521981239319,
-0.0631787180900573... |
def addintattrn ( self, * args ) : return _ snap. tneanet _ addintattrn ( self, * args ) | [
-1.1218286752700806,
-0.09009373188018799,
0.5437146425247192,
0.09078383445739746,
0.08300644904375076,
-0.09508198499679565,
0.20711959898471832,
-0.38170647621154785,
-0.3227842152118683,
-0.018453001976013184,
0.07848377525806427,
-0.9176145792007446,
-0.4209776520729065,
0.99395555257... |
def load _ pipeline ( *, file _ name : str ) - > pipeline : file _ path = config. trained _ model _ dir / file _ name saved _ pipeline = joblib. load ( filename = file _ path ) return saved _ pipeline | [
0.3591732382774353,
-0.2806644141674042,
0.4629916846752167,
-0.039114248007535934,
-0.9081398844718933,
0.608757734298706,
-0.09566807001829147,
0.5672043561935425,
-1.7762978076934814,
0.05647515505552292,
-1.0838090181350708,
-0.1260678917169571,
-0.41365620493888855,
-1.041065931320190... |
def _ gen ( self ) : raise notimplementederror ( " must be implemented by subclass " ) | [
-1.2738510370254517,
-0.3213160037994385,
0.6975702047348022,
-0.4833192527294159,
-0.12777350842952728,
1.7009191513061523,
0.41713133454322815,
-0.16078729927539825,
-0.5598932504653931,
-0.4525858163833618,
-0.7191601395606995,
-0.8389236330986023,
0.6144885420799255,
0.5321832895278931... |
def build _ defense _ to _ planet ( self, defense _ type, amount, planet ) : if self. url _ provider. get _ page _ url ( " defense ", planet )! = self. get _ current _ url ( ) : self. logger. warning ( self. url _ provider. get _ page _ url ( " defense ", planet ) ) self. logger. warning ( self. get _ current _ url ( )... | [
-0.8241127133369446,
-0.42900100350379944,
0.5281429290771484,
0.34557512402534485,
1.1262589693069458,
1.0002658367156982,
-0.11628624051809311,
-1.044460415840149,
0.5751485824584961,
0.13722918927669525,
0.5291075706481934,
0.681670606136322,
-0.19247588515281677,
0.694383978843689,
1... |
def print _ test2 ( limit ) : for item in data : if item [ " price " ] > limit : print ( f " { item ['title'] } - $ { item ['price'] } " ) | [
-0.14711181819438934,
-0.46730270981788635,
0.5957805514335632,
-0.1141539216041565,
0.28427794575691223,
0.15811549127101898,
-1.3037649393081665,
-0.2933763861656189,
-0.18812845647335052,
0.35702088475227356,
-0.08018778264522552,
0.7539251446723938,
0.4317026436328888,
-0.7000986933708... |
def add _ auth ( self, function ) : def canonicalize ( args ) : " " " bootauth canonicalization method. parameter values are collected, sorted, converted to strings, then hashed with the node key. " " " values = [ ] for arg in args : if isinstance ( arg, list ) or isinstance ( arg, tuple ) : # the old implementation di... | [
-0.36902740597724915,
0.16786955296993256,
0.6642351150512695,
0.1264062523841858,
-0.22807523608207703,
-1.0592601299285889,
-0.34878605604171753,
-0.5827382802963257,
0.04805474355816841,
-0.3908860683441162,
0.3559171259403229,
0.43728703260421753,
0.3210233449935913,
0.5446746349334717... |
def plotlims ( self, factor = 3. 0 ) : lcl, ucl, factor = self. lucls ( factor = factor ) plt. axhline ( ucl, color ='g ', label ='ucl') plt. axhline ( lcl, color ='b ', label ='lcl') plt. axhline ( self. mean ( ), color ='r ', linestyle ='dotted ', label ='mean') plt. plot ( self. data,'ko - ', label ='data') plt. leg... | [
1.0969972610473633,
0.4048653542995453,
0.8072449564933777,
-0.7362032532691956,
-1.1171400547027588,
0.9961296319961548,
-0.17282843589782715,
-0.15777966380119324,
0.13616786897182465,
0.2369796335697174,
0.23153725266456604,
1.6865699291229248,
-0.10142417252063751,
0.739512026309967,
... |
def _ _ ne _ _ ( self, other ) : if isinstance ( other, ( int, float ) ) : return not np. equal ( self. val, other ) elif isinstance ( other, reverse ) : return self. val! = other. val else : raise typeerror ( " please only compare reverse object with another reverse object or int or float. " ) | [
-1.1519222259521484,
-0.2002846747636795,
0.7652498483657837,
0.18915393948554993,
0.271494060754776,
0.12366421520709991,
-0.14939293265342712,
-1.2171781063079834,
0.032896459102630615,
-0.24021479487419128,
0.12626923620700836,
0.5124808549880981,
-0.5436122417449951,
0.1202199086546897... |
def test _ split _ codon _ model _ result _ json ( self ) : _ data = { " human " : " atgcggctcgcggaggccgcgctcgcggag ", " mouse " : " atgcccggcgccaaggcagcgctggcggag ", " opossum " : " atgccagtgaaagtggcggcggtggctgag ", } aln = make _ aligned _ seqs ( data = _ data, moltype = " dna " ) tree = make _ tree ( tip _ names = a... | [
-0.7138761281967163,
-0.411495566368103,
0.4559307098388672,
-0.8318922519683838,
-0.11031447350978851,
-0.05141462758183479,
0.28288859128952026,
-0.036274202167987823,
0.025929108262062073,
0.6582276821136475,
-1.7014331817626953,
0.16701991856098175,
0.4170996844768524,
-0.4861881434917... |
def get _ defenses ( self, planet = none ) : self. logger. info ('getting defense data for planet % s'% planet. name ) url = self. url _ provider. get _ page _ url ('defense ', planet ) res = self. open _ url ( url ) soup = beautifulsoup ( res. read ( ), " lxml " ) defense _ buttons = soup ( attrs = {'class': " detail ... | [
-0.6738929748535156,
0.5372858643531799,
0.4976595938205719,
0.3406951427459717,
1.3509950637817383,
0.3431892395019531,
-0.5105980038642883,
-0.7692768573760986,
0.36964136362075806,
-0.41764816641807556,
-0.7516046166419983,
0.2902234196662903,
0.40121084451675415,
1.2364598512649536,
... |
def diseasepagescraper ( disease ) : html _ page = urllib. request. urlopen ( diseasepage ( disease ) ) soup = beautifulsoup ( html _ page, " lxml " ) urls = [ ] for link in soup. findall ('a ', attrs = {'href': re. compile ( " ^ / index. php / rs " ) } ) : urls. append ( " https : / / bots. snpedia. com " + link. get ... | [
-1.4271128177642822,
-0.13246873021125793,
0.5882872343063354,
-0.189161479473114,
0.20031896233558655,
0.10757462680339813,
-0.5157255530357361,
0.8532181978225708,
0.8572483062744141,
0.05455654859542847,
0.41458210349082947,
-0.04241214692592621,
0.18552516400814056,
0.38328537344932556... |
def new _ platform ( ) : # if we haven't initialized the platforms array, then do so. if not platformcontroller. _ _ platforms _ registered _ _ : platformcontroller. _ _ register _ supported _ platforms ( ) for platform _ class in platformcontroller. _ _ platform _ classes _ _ : result = platform _ class ( ) if result.... | [
0.4556226432323456,
-0.20323939621448517,
0.43040791153907776,
0.7202377319335938,
0.10555253177881241,
-0.39350488781929016,
0.09585567563772202,
-1.131608009338379,
-0.2202102541923523,
-1.1680898666381836,
0.38600876927375793,
-0.1735811084508896,
-0.9375157356262207,
0.968375027179718,... |
def getcrossid ( self, * args ) : return _ snap. tmmnet _ getcrossid ( self, * args ) | [
0.76910400390625,
0.2973560392856598,
0.6017771363258362,
0.8265904188156128,
0.5568378567695618,
0.5119074583053589,
0.6265478730201721,
-0.08821460604667664,
0.18473543226718903,
0.09231477230787277,
0.04997044429183006,
-0.3284704089164734,
-1.5665189027786255,
1.2906049489974976,
0.3... |
def post ( ) : if not request. json or not'name'in request. json : abort ( 400 ) try : artist = artist. query. filter ( artist. name = = request. json ['name'] ). first ( ) except noresultfound as error : pass if artist : return jsonify ( message ='conflict ', success = false ), 409 artist = artist ( name = request. js... | [
-0.6893869638442993,
-0.44201329350471497,
0.8978711366653442,
0.7816984057426453,
-0.3241363763809204,
0.09910313785076141,
-0.07325061410665512,
0.25368809700012207,
1.2434660196304321,
-0.05503251031041145,
-0.5120261907577515,
-0.028465578332543373,
-1.092545509338379,
0.62858682870864... |
def convert _ to _ rle _ line ( parts ) : # todo move to misc _ utils, only used by misc / convert _ rle. py assert len ( parts ) = = 4, parts line _ bytes = array. array ('b') line _ bytes. extend ( " { } : - { } + { } ". format ( * parts [ : 3 ] ). encode ( ) ) for side in parts [ 3 ] : line _ bytes. extend ( b " | "... | [
0.4660208821296692,
-0.8233746886253357,
0.7514223456382751,
-0.23136594891548157,
0.3401413857936859,
0.7047733664512634,
-1.52813720703125,
-0.6580926775932312,
0.0601557195186615,
-0.03854256123304367,
-0.5842654705047607,
-0.7073484659194946,
-1.0719314813613892,
-0.5242446064949036,
... |
def testtwobuffereventstreams ( self ) : self. sf. addconsumer ('a') stream1 = self. sf. consume ('a') stream2 = self. sf. consume ('a') self. assertisinstance ( stream1, plugin _ base. buffereventstream ) self. assertequal ( stream2, none ) | [
1.657069206237793,
-0.9167956113815308,
0.8086085319519043,
0.40487316250801086,
0.8674613237380981,
-0.7609220743179321,
0.10485126823186874,
-1.1177537441253662,
0.2666987180709839,
-0.887665867805481,
-0.7141172885894775,
1.1881948709487915,
-0.6226159930229187,
1.101521611213684,
0.4... |
def getlines ( ) : with fileinput. input ( ) as f : for line in f : yield f. filename ( ), f. filelineno ( ), line | [
0.5764933824539185,
-1.4397403001785278,
0.5304422378540039,
0.2902910113334656,
0.3410938084125519,
0.7944263815879822,
-0.5707336068153381,
-0.30501100420951843,
-1.3795504570007324,
-1.757220983505249,
-0.32508230209350586,
-0.6039658784866333,
0.5429301857948303,
0.7431865334510803,
... |
def tstr _ isabsfpath ( * args ) : return _ snap. tstr _ isabsfpath ( * args ) | [
0.25893649458885193,
-0.30181077122688293,
0.28828638792037964,
0.06387362629175186,
-0.08474905788898468,
0.7595275640487671,
-0.02233024686574936,
-0.657321035861969,
-0.6181231141090393,
0.4960481822490692,
-0.05209215357899666,
-0.5943890810012817,
0.5675886273384094,
0.061196934431791... |
def test _ can _ hook _ url _ query ( self ) : new _ query _ value ='new _ query _ value'this = self class myapiclient ( apiclient ) : @ apiclienthook. hook _ client _ url _ query ( client ='httpbin ', requests = ['*'] ) # register this for all the requests in client 3 def overide _ url _ query ( self, data, * * kwargs... | [
-0.27597954869270325,
-0.13678741455078125,
0.4694696366786957,
-0.014697886072099209,
-0.1433684527873993,
0.886318564414978,
-0.17954467236995697,
0.18229396641254425,
-0.4862617552280426,
-0.4667080342769623,
0.15516223013401031,
0.6928104162216187,
-0.42000705003738403,
0.1111000403761... |
def name ( self ) - > optional [ str ] : return self. _ _ name | [
0.12646104395389557,
-0.9075906872749329,
0.38435372710227966,
-0.24072547256946564,
-0.18023835122585297,
0.468178391456604,
-0.374482661485672,
-0.8149127960205078,
0.7453179955482483,
0.3727092742919922,
0.10717003047466278,
-0.14838124811649323,
0.29428473114967346,
-0.6399524807929993... |
def add _ track _ to _ playlist ( self, track, playlist ) : # add the track. if playlist ['uri'] = = common. saved _ tracks _ context _ uri : q = { " ids " : [ track ['id'] ] } url = " me / tracks " self. put _ api _ v1 ( url, q ) else : q = { " uris " : [ track ['uri'] ] } url = " playlists / { } / tracks ". format ( ... | [
-0.6004482507705688,
0.5030165910720825,
0.35019779205322266,
0.9367603063583374,
0.19399207830429077,
0.1609518826007843,
-1.255125880241394,
-0.6996765732765198,
0.002575024263933301,
0.567721962928772,
0.05660466477274895,
0.014278331771492958,
-1.39510178565979,
-0.3631553649902344,
... |
def create _ user ( email : str ='test @ email. com ', username : str ='testuser ', password : str ='password12345') : user = user. objects. create _ user ( email = email, username = username, password = password, ) user. is _ active = true user. save ( ) return user | [
0.5101900696754456,
-0.3786916434764862,
0.3623553216457367,
0.13718630373477936,
0.6738945245742798,
0.5327439308166504,
0.08199486881494522,
0.0408162847161293,
-0.3799259662628174,
0.29318833351135254,
-1.1543532609939575,
-0.5576035976409912,
-0.7611163854598999,
-1.3288463354110718,
... |
def getsattrnamen ( self, * args ) : return _ snap. tneanet _ getsattrnamen ( self, * args ) | [
-0.8676803112030029,
-0.2595036029815674,
0.24333971738815308,
-0.520301342010498,
0.18766818940639496,
-0.5718187093734741,
-0.32782062888145447,
0.06670084595680237,
-0.5304462909698486,
-0.06581129133701324,
-0.2793910503387451,
-0.21512408554553986,
-0.06815078854560852,
1.024149179458... |
def add _ control ( self, qctrl = none ) : gates = self. get _ gates ( ) for g in gates : if qctrl in g ['qid'] : raise valueerror ( " qctrl = { } is not allowed because it is already used. ". format ( qctrl ) ) qc = self. clone ( ) qc _ out = qcirc ( ) gid = 0 while true : kind = qc. kind _ first ( ) if kind is none :... | [
0.4782227575778961,
-0.09916789829730988,
0.6488978266716003,
0.24606993794441223,
-0.1403512805700302,
-0.17743872106075287,
0.3578076958656311,
-1.4723668098449707,
0.5971062779426575,
-0.42368680238723755,
-0.6420542001724243,
-0.3097648322582245,
-1.125307321548462,
-0.0503105148673057... |
def cancel _ order ( api _ key : str = api _ key, api _ secret : str = api _ secret, ) : client = privatebitwyrewsclient ( api _ key = api _ key, api _ secret = api _ secret ) client. cancel _ order ( ) while true : # you can do something to change payload to your needs per loop # eg read db, api calls, kafka consume e... | [
-0.1420012265443802,
-0.8891650438308716,
0.8709701895713806,
-0.16675937175750732,
0.4042823016643524,
-0.6332736015319824,
-0.8627604246139526,
-0.8753899335861206,
-0.7610180377960205,
0.27732864022254944,
-0.4607473611831665,
0.8397650718688965,
-0.6503590941429138,
0.34363919496536255... |
def get _ project _ info ( project _ name : str ) : df = pd. read _ csv ( os. path. join ( project _ dir,'projects. csv') ) selected _ df = df. loc [ df. project = = project _ name ]. reset _ index ( ) label = selected _ df. label [ 0 ] label = [ ] if str ( label ) = ='nan'else label. split (': sep :') # get proportion... | [
-0.3459855020046234,
0.36404067277908325,
0.4377306401729584,
-0.932823657989502,
0.1219954565167427,
0.428688108921051,
-0.18951711058616638,
-0.4023841619491577,
-0.7811639904975891,
0.4985694885253906,
0.07521412521600723,
-0.16982963681221008,
-0.1698283553123474,
0.39001452922821045,
... |
def make _ elements _ visible ( self, driver ) : scrolldown ( driver = driver, verbose = self. verbose ) | [
0.44502851366996765,
0.1453055441379547,
0.4146442115306854,
0.605431318283081,
0.4361867606639862,
0.9401957392692566,
0.6533716917037964,
0.08613447099924088,
1.130270004272461,
-0.014043746516108513,
-0.23304413259029388,
0.768882691860199,
-0.3361309766769409,
1.1897735595703125,
0.7... |
def my _ callback ( ax, ch _ idx ) : ax. plot ( freqs, psds _ vol _ plot [ ch _ idx ], color ='red ', label = " voluntary " ) ax. plot ( freqs, psds _ inv _ plot [ ch _ idx ], color ='blue ', label = " involuntary " ) ax. set _ xlabel ='frequency ( hz )'ax. set _ ylabel ='power ( db )'ax. legend ( ) | [
0.45312944054603577,
0.017458682879805565,
0.44739487767219543,
-1.2766873836517334,
-0.08285749703645706,
-0.20286451280117035,
-0.3337581157684326,
0.18915759027004242,
0.28540539741516113,
-0.7783843874931335,
1.2569994926452637,
1.085574984550476,
0.544491171836853,
-0.1578037142753601... |
def writer ( self ) : if not self. _ writer : self. _ writer = self. build _ writer ( ) max _ file _ size = self. settings. getint ('warc _ file _ max _ size') if not self. debug and max _ file _ size and self. _ writer. out. tell ( ) > max _ file _ size : self. serial + = 1 self. _ writer. out. close ( ) self. _ write... | [
-0.6726940274238586,
-0.08384005725383759,
0.6644641757011414,
-0.08090271055698395,
0.49122101068496704,
-0.645973801612854,
1.4138036966323853,
-0.32124701142311096,
-0.3402683734893799,
-1.4945034980773926,
0.6938119530677795,
-0.12060689181089401,
-0.6797065138816833,
-0.26149472594261... |
def describe _ udp _ listener ( self, blb _ id, listener _ port = none, marker = none, max _ keys = none, config = none ) : path = utils. append _ uri ( self. version,'blb ', blb _ id,'udplistener') params = { } if listener _ port is not none : params [ b'listenerport'] = listener _ port if marker is not none : params ... | [
-0.6202540397644043,
0.34649384021759033,
0.9204887747764587,
-0.6216983199119568,
0.13202013075351715,
-0.44919344782829285,
-0.47753873467445374,
0.31202101707458496,
0.07568114250898361,
0.002496155211701989,
-0.8494287133216858,
1.2481454610824585,
-0.6700620055198669,
-0.3544761240482... |
def getmn ( * args ) : return _ snap. tflt _ getmn ( * args ) | [
-0.165090873837471,
0.43961048126220703,
0.45225411653518677,
1.028124213218689,
0.6787837147712708,
-0.4899619221687317,
0.8145549297332764,
0.5291140675544739,
-0.8725232481956482,
-0.7433377504348755,
-1.0280487537384033,
-0.9897105693817139,
0.2770988643169403,
0.8828334212303162,
1.... |
def get _ results ( user _ inputs _ filepath, metered _ load _ shape _ filepath, include _ report, outputs _ table _ filepath, report _ filepath, year, ) : if not include _ report : metered _ load _ shape = ( pd. read _ csv ( metered _ load _ shape _ filepath, index _ col = " hour _ of _ year " ) if metered _ load _ sh... | [
0.5504891276359558,
0.36915332078933716,
0.7722761631011963,
0.9073368310928345,
0.11715851724147797,
0.3955419659614563,
0.5330885648727417,
-0.18046647310256958,
-0.900605320930481,
-0.8651244640350342,
0.5866427421569824,
-0.0382227823138237,
0.41196778416633606,
0.23117074370384216,
... |
def pyre _ default ( cls, * * kwds ) : # grab the library foundry and return it return merlin. assets. library | [
-0.21711191534996033,
-0.36654284596443176,
-0.14254237711429596,
-0.22755904495716095,
2.0481598377227783,
0.18429119884967804,
-0.05366924777626991,
-0.33326461911201477,
0.3516010642051697,
-1.2709568738937378,
0.2911098301410675,
-0.4017709791660309,
-1.0549240112304688,
0.122952617704... |
def add ( self, s, a, r, t, s1 ) : self. _ s. append ( s ) self. _ a. append ( a ) self. _ r. append ( r ) self. _ t. append ( t ) self. _ s1. append ( s1 ) if self. buffer _ size > 0 and self. size ( ) > = self. buffer _ size : self. _ s. pop ( 0 ) self. _ a. pop ( 0 ) self. _ r. pop ( 0 ) self. _ t. pop ( 0 ) self. _... | [
0.48136094212532043,
-0.2567078173160553,
0.625808596611023,
-0.31133604049682617,
0.28540560603141785,
0.3523072302341461,
0.021288085728883743,
-0.2532368302345276,
0.178831547498703,
0.09267110377550125,
-0.29973793029785156,
0.13752523064613342,
-0.5870997905731201,
-0.308117151260376,... |
def exec ( self, job : reportjob ) - > jobresult : url = " { } / v { } / render ". format ( self. _ url, self. _ api _ version ) request _ data = {'report': ('report. zpt ', job. get _ report ( ). save ( ) ), } for k, v in job. get _ options ( ). items ( ) : request _ data [ k ] = ( none, v ) try : session = requests. ... | [
-0.012057159096002579,
0.28685420751571655,
0.9764999151229858,
-0.27140215039253235,
0.1104145422577858,
-0.8207839727401733,
-0.6673166155815125,
-0.4752809703350067,
0.10697095096111298,
-0.06877552717924118,
0.3169883191585541,
-0.08780805766582489,
-1.3385902643203735,
-0.317195564508... |
def gyrprinc ( self, aposfix ) : gtens = self. gyrtenspy ( aposfix ) ( eigval, eigvec ) = np. linalg. eig ( gtens ) eigorder = np. argsort ( - 1 * eigval ) eigvec = eigvec [ :, eigorder ] g1 = eigvec [ :, 0 ] return g1 | [
-0.1400812715291977,
-0.10669870674610138,
0.5219316482543945,
-0.6305155754089355,
0.029117295518517494,
0.28447017073631287,
0.3571697771549225,
-0.38015052676200867,
-0.010541802272200584,
0.37719106674194336,
0.5534574389457703,
0.36586010456085205,
-0.3520379066467285,
-0.436162203550... |
def test _ list _ integer _ pattern _ 4 _ nistxml _ sv _ iv _ list _ integer _ pattern _ 5 _ 3 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / list / integer / schema + instance / nistschema - sv - iv - list - integer - pattern - 5. xsd ", instance = " nistdata / list / integer / sc... | [
-0.633433997631073,
0.0030896076932549477,
0.4505772292613983,
0.21405991911888123,
-0.5306413173675537,
0.049675632268190384,
0.05124494433403015,
0.124122254550457,
0.979301393032074,
0.8640113472938538,
-1.040806531906128,
-0.5511433482170105,
-0.8234834671020508,
0.33432579040527344,
... |
def resnet152 ( ) : return resnet ( bottleneck, [ 3, 8, 36, 3 ] ) | [
0.6638559103012085,
0.091728575527668,
0.20954358577728271,
0.14801326394081116,
0.06923586130142212,
-0.4898901879787445,
-1.090785264968872,
-0.8240176439285278,
0.26318156719207764,
-1.0718663930892944,
-0.48380568623542786,
-0.36439383029937744,
-0.028274184092879295,
-1.56494235992431... |
def is _ liability ( self ) : return self. type in { self. credit, self. loan, self. billing } | [
0.8456824421882629,
-0.46353089809417725,
0.5437379479408264,
-0.028297778218984604,
0.34384095668792725,
0.9578959941864014,
-0.5903401374816895,
-0.21209071576595306,
0.12073785811662674,
-0.8122713565826416,
0.3741740584373474,
0.04605483636260033,
-1.863411545753479,
1.3032572269439697... |
def includesattr ( self, * args ) : return _ snap. groupstmt _ includesattr ( self, * args ) | [
0.2790752351284027,
-0.3774639666080475,
0.40070921182632446,
0.8149253726005554,
-0.9044476747512817,
0.6678638458251953,
1.6970371007919312,
-0.2745380401611328,
-0.3854873776435852,
-0.6021521687507629,
0.24436618387699127,
-0.7854660153388977,
-1.117404818534851,
0.10724420845508575,
... |
def mean _ temperature ( temperature, doy _ series, start _ doy, end _ doy ) : if start _ doy > end _ doy : raise runtimeerror ('start _ doy must be < end _ doy') spring _ days = np. logical _ and ( doy _ series > = start _ doy, doy _ series < = end _ doy ) return temperature [ spring _ days ]. mean ( axis = 0 ) | [
-1.3702189922332764,
-0.014307256788015366,
0.49585190415382385,
-0.1966707557439804,
-0.38777342438697815,
0.05662129074335098,
0.2734444737434387,
-0.18626593053340912,
-0.19527362287044525,
1.265251636505127,
0.045053672045469284,
1.0766023397445679,
0.655687689781189,
-0.24173606932163... |
def keywords ( * g ) : return grammars ( caselesskeyword, g ) | [
0.24014949798583984,
0.20163726806640625,
0.1558626890182495,
0.5961584448814392,
-0.9047369956970215,
-0.15208610892295837,
-0.6383149027824402,
-0.39169013500213623,
-0.6292827725410461,
0.2450200617313385,
-0.15394286811351776,
0.6564703583717346,
-0.7952128052711487,
0.6281833052635193... |
def get _ phylogenetic _ metric ( name ) : for metric in phylogenetic _ metrics : if metric. _ _ name _ _. lower ( ) = = name. lower ( ) : return metric raise attributeerror | [
0.7725380063056946,
-0.6120487451553345,
0.3830106854438782,
0.04183528944849968,
-0.6010790467262268,
0.18747125566005707,
0.2609279453754425,
-1.0228588581085205,
-1.2401424646377563,
0.4888039529323578,
1.155427098274231,
0.28336232900619507,
-0.4928874969482422,
-0.4304298460483551,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.