text stringlengths 25 2.19k | embedding listlengths 768 768 |
|---|---|
def dialect ( self ) - > str : return self. _ dialect | [
0.684821367263794,
-0.9374758005142212,
0.481555312871933,
0.08285389840602875,
-0.07961051166057587,
1.0843102931976318,
-0.04437675327062607,
0.2926824986934662,
0.32830291986465454,
-0.9387109279632568,
0.6373136043548584,
0.274811327457428,
0.605404794216156,
-0.9152981042861938,
0.1... |
def _ _ init _ _ ( self, dbstate, uistate, track, family ) : self. family = family embeddedlist. _ _ init _ _ ( self, dbstate, uistate, track, _ ('chil _ dren'), childmodel, share _ button = true, move _ buttons = true ) | [
1.1583354473114014,
0.24760669469833374,
0.4693981409072876,
0.5545473694801331,
0.03703196719288826,
1.0894931554794312,
0.23514370620250702,
0.5031422972679138,
0.012464516796171665,
-0.26663875579833984,
-1.3878769874572754,
-0.8574633002281189,
0.2561713457107544,
0.27267032861709595,
... |
def grad _ input ( self, x ) : raise notimplementederror ( ) | [
-1.5267984867095947,
0.374228298664093,
0.8684417009353638,
0.04998483508825302,
-0.6632441878318787,
1.5389251708984375,
0.6887431144714355,
-0.435890257358551,
-0.4230649471282959,
-0.39070969820022583,
-0.7446678876876831,
0.622560977935791,
0.3258723318576813,
0.34810084104537964,
-0... |
def start _ kernel ( self ) : logger. debug ( " starting the kernel. " ) self. kernel _ manager = qtinprocesskernelmanager ( ) self. kernel _ manager. start _ kernel ( show _ banner = false ) self. kernel _ manager. kernel. gui ='qt'self. kernel = self. kernel _ manager. kernel self. shell = self. kernel. shell try : s... | [
-0.7233930826187134,
-0.43934398889541626,
0.27504962682724,
-0.18240390717983246,
0.4726032316684723,
-0.6279990077018738,
-0.28203755617141724,
-0.011347843334078789,
-0.42322567105293274,
-0.8506450653076172,
-0.14391076564788818,
0.8017804026603699,
-0.2048887312412262,
0.2904182970523... |
def _ generate _ citrine _ to _ preparation _ step _ map ( ) : cmap = { } cmap [ " name " ] = 0 cmap [ " timestamp " ] = 1 cmap [ " furnace _ temperature " ] = 2 cmap [ " furnace _ pressure " ] = 3 cmap [ " sample _ location " ] = 4 cmap [ " helium _ flow _ rate " ] = 5 cmap [ " helium _ flow _ rate " ] = 6 cmap [ " hy... | [
-0.19842006266117096,
-0.7829853296279907,
0.5045261383056641,
-1.320864200592041,
0.32926124334335327,
-0.31379541754722595,
0.21503406763076782,
0.5091345906257629,
-0.7864100933074951,
0.13856200873851776,
-1.643426537513733,
-0.831122875213623,
0.41586968302726746,
0.7833349704742432,
... |
def reduce _ max _ v1 ( input _ tensor, axis = none, keepdims = none, name = none, reduction _ indices = none, keep _ dims = none ) : axis = deprecation. deprecated _ argument _ lookup ( " axis ", axis, " reduction _ indices ", reduction _ indices ) keepdims = deprecation. deprecated _ argument _ lookup ( " keepdims ",... | [
0.10812859982252121,
0.4462330639362335,
0.8927100300788879,
1.2391401529312134,
-0.46804431080818176,
-0.27264657616615295,
-0.7749860882759094,
0.17865605652332306,
0.0033267897088080645,
1.0507550239562988,
-0.5275384783744812,
0.5720679759979248,
0.5142853260040283,
-0.630827784538269,... |
def run _ with _ params ( self, params ) : state = state ( params ['area _ map'] ) dist _ error = params ['test _ tolerance'] * 2. 0 try : rover _ slam = ice _ rover. slam ( ) for move in params ['move'] : meas = state. generate _ measurements ( ) belief = rover _ slam. process _ measurements ( meas ) truth = ( state. ... | [
-0.14032912254333496,
-0.5771903991699219,
0.9403975605964661,
-0.1223028376698494,
0.5985195636749268,
1.0633574724197388,
0.35032492876052856,
0.2895474135875702,
-0.041743289679288864,
0.1429002434015274,
0.34616807103157043,
-0.22579696774482727,
-0.5651078224182129,
-0.161309078335762... |
def init ( ) : # globals global scriptsettings global emotelog global lastlogblocktime global lastticktime global hypereached global awaitingreset global awaitingresetstarttime global oncooldown global cooldownstarttime global meterfreeze # load saved settings and validate values scriptsettings = settings ( settingsfil... | [
-0.14320284128189087,
0.0013716183602809906,
0.3796895444393158,
0.30509689450263977,
0.9021613001823425,
0.27387452125549316,
0.9105173349380493,
-1.0054601430892944,
-0.6768218874931335,
1.1953312158584595,
-0.9336175322532654,
0.39656588435173035,
-0.8618801236152649,
0.7604961395263672... |
def solve _ inputs ( input _ reader, output _ writer ) : for input _ values in parse _ input ( input _ reader ) : solve _ problem ( output _ writer = output _ writer, * * input _ values ) | [
-0.4716293513774872,
-0.7606468796730042,
0.2987132966518402,
0.3897521197795868,
0.6144787073135376,
-0.45559290051460266,
-0.1527593731880188,
0.10905797779560089,
-0.9499222636222839,
-0.8721254467964172,
0.36303913593292236,
-0.6831242442131042,
-0.13467125594615936,
-0.061103872954845... |
def intercom _ manage _ user ( user _ id, operation ) : return intercomusersync ( ). execute ( user _ id, operation ) | [
-0.17878302931785583,
0.4531010091304779,
0.42493730783462524,
1.1400327682495117,
-0.5504271388053894,
-0.47809797525405884,
0.5219529867172241,
-0.23683635890483856,
0.4709380567073822,
-0.5759574174880981,
-0.2636452615261078,
-0.01200142502784729,
-1.1704959869384766,
-1.11768937110900... |
def epsilon ( ) : return _ epsilon | [
0.2690485715866089,
-0.23255197703838348,
0.2729862332344055,
0.22004373371601105,
0.06046884134411812,
-0.38415777683258057,
0.38652127981185913,
0.2442346215248108,
-0.31626707315444946,
-0.031218335032463074,
-0.6374311447143555,
-0.4571909010410309,
0.23118150234222412,
-0.654353022575... |
def test _ create _ existing _ booking _ txn _ with _ txn _ id ( self ) : user = baker. make _ recipe ('booking. user ', username = " testuser " ) booking = baker. make _ recipe ('booking. booking ', user = user, event _ _ name ='test event') booking _ txn = helpers. create _ booking _ paypal _ transaction ( user, book... | [
-0.014475048519670963,
-0.2153341919183731,
0.6433957815170288,
0.8561882376670837,
0.7818530797958374,
0.28946420550346375,
-0.002837739186361432,
0.42830947041511536,
-0.04515552520751953,
-0.10803251713514328,
-0.7808031439781189,
-1.4246904850006104,
0.20800162851810455,
-0.11858233809... |
def strobe _ multistate _ infinite _ plane ( model, n _ tracks, model _ diffusivities, model _ occupations, track _ len = 10, dz = 0. 7, frame _ interval = 0. 01, loc _ error = 0. 0, exclude _ outside = true, n _ gaps = 0, return _ dataframe = true, * * model _ kwargs ) : # choose the number of trajectories in each dif... | [
0.05308924987912178,
1.149545669555664,
0.7682933211326599,
0.8396310806274414,
-0.0426211804151535,
0.6557538509368896,
-0.08902567625045776,
-0.29290327429771423,
0.007061955519020557,
0.6357124447822571,
-0.24353909492492676,
-0.39177998900413513,
-0.4687441289424896,
0.1674783527851104... |
def do _ action ( self, action ) : if action not in self. allowed _ actions [ self. state ] : print ( " unknown action " ) elif self. state = = self. state _ general : self. general _ action ( action ) elif self. state = = self. state _ account : self. account _ action ( action ) | [
-0.41991811990737915,
-0.5691636800765991,
0.4912932217121124,
0.9803972244262695,
0.5841264724731445,
0.6801753640174866,
0.31950363516807556,
-0.5880576372146606,
0.9117318987846375,
0.47615566849708557,
0.5851309299468994,
1.4554978609085083,
0.3560239374637604,
-0.13209301233291626,
... |
def softmax ( s, axis = none ) : s = np. atleast _ 2d ( s ) if axis is none : axis = s. ndim - 1 s = s - np. expand _ dims ( np. max ( s, axis ), axis ) s = np. exp ( s ) s _ sum = np. expand _ dims ( np. sum ( s, axis ), axis ) p = s / s _ sum return p. squeeze ( ) | [
1.0405322313308716,
0.11983884871006012,
0.7695532441139221,
0.7940877079963684,
-1.5151163339614868,
-0.8387349247932434,
0.3876194655895233,
0.6490467190742493,
1.5849093198776245,
0.3694818615913391,
-0.010831047780811787,
0.7736484408378601,
0.30548691749572754,
-0.7429622411727905,
... |
def test _ get _ post _ role _ admin ( self ) : # get one post : post = post. query. first ( ) post = post. to _ json ( ) # send request : response = self. client. get ( f'/ api / v2 / posts / { post [ " id " ] } ', headers = self. get _ api _ headers ( token = current _ app. config ['auth0 _ role _ admin'] ), content ... | [
0.12618401646614075,
0.17477750778198242,
0.6316387057304382,
-0.6960325837135315,
1.0842794179916382,
0.23749129474163055,
-1.1277037858963013,
-0.0883752629160881,
0.15293630957603455,
-0.3456825315952301,
-0.23036940395832062,
0.9175440073013306,
0.3339956998825073,
-0.0993078276515007,... |
def isvector4 ( hou _ attrib ) : assert type ( hou _ attrib ) is hou. attrib, " invalid argument " return \ hou _ attrib. datatype ( )! = hou. attribdata. string and \ hou _ attrib. size ( ) = = 4 | [
-0.31124329566955566,
-0.2651827931404114,
0.43757519125938416,
0.29211148619651794,
-0.20007695257663727,
0.5518525838851929,
0.2416493445634842,
-0.4833880364894867,
0.28181612491607666,
0.015923863276839256,
-0.32906827330589294,
-0.17514550685882568,
-0.5337643027305603,
0.356943994760... |
def write ( self, observation, array : np. ndarray, offset : int ) - > none : array [ offset : offset + self. _ size ] = self. transform ( observation ) | [
-1.241617202758789,
-0.5666166543960571,
0.5159957408905029,
-1.1041479110717773,
0.39099130034446716,
0.7070419192314148,
-0.14795109629631042,
0.7637797594070435,
0.15473787486553192,
0.3335913121700287,
-0.4843842089176178,
1.0450040102005005,
0.1979246586561203,
-0.4159086346626282,
... |
def login ( self, username : str, password : str ) : log. info ( " inserting credentials on login page. " ) self. _ driver. fill ( self. usernamefieldselector, username ) self. _ driver. fill ( self. passwordfieldselector, password ) self. get _ signin _ button ( ). click ( ) | [
-0.5443990230560303,
0.21772190928459167,
0.37019363045692444,
0.013582129962742329,
1.1122825145721436,
0.3869624137878418,
0.15081746876239777,
0.7746603488922119,
-0.3998468220233917,
0.19734728336334229,
-1.1313601732254028,
-0.6185027360916138,
-0.8609288334846497,
-0.1211112588644027... |
def remove _ header _ tags _ with _ none _ text ( root : etree. element ) - > none : header _ tag = root. xpath ('/ / ns : teiheader ', namespaces = {'ns': xmlns } ) [ 0 ] for tag in header _ tag. iterdescendants ( ) : if tag. text is not none and tag. text. strip ( ) = ='none': tag. getparent ( ). remove ( tag ) | [
1.0232517719268799,
-0.652644693851471,
0.6934780478477478,
-0.09881463646888733,
-0.7523750066757202,
-1.1432429552078247,
-0.8179011940956116,
-0.15197035670280457,
-0.1088949665427208,
0.8494628667831421,
-0.6346055269241333,
-0.6285805106163025,
-0.5607833862304688,
1.8063877820968628,... |
def download ( self, bucket _ name : str, object _ name : str, filename : str | none = none, chunk _ size : int | none = none, timeout : int | none = default _ timeout, num _ max _ attempts : int | none = 1, user _ project : str | none = none, ) - > str | bytes : # todo : future improvement check file size before downl... | [
0.33383771777153015,
-0.41566842794418335,
0.7413790225982666,
0.7711408734321594,
-0.27419036626815796,
-0.03196460381150246,
-0.21130354702472687,
-0.47368255257606506,
-0.7800239324569702,
0.06505309790372849,
0.1936093270778656,
0.5065000057220459,
-0.1010931134223938,
-0.7113153934478... |
def testmultithreadconsumetruncate ( self ) : record _ count _ queue = queue. queue ( ) def consumerthread ( consumer _ id ) : stream = self. sf. consume ( consumer _ id ) record _ count = collections. defaultdict ( int ) count = 0 while true : # commit and start a new buffereventstream every 10 events. if count % 10 =... | [
1.3147743940353394,
-0.4261030852794647,
1.1312981843948364,
0.1579180657863617,
1.304856777191162,
0.005164948292076588,
0.6255404949188232,
0.09059228003025055,
-0.5322598814964294,
-0.10975722223520279,
-0.7868162393569946,
-0.05039069801568985,
-0.7524381875991821,
-0.09701492637395859... |
def simulate _ clicker ( build _ info, duration, strategy ) : b _ info = build _ info. clone ( ) sim _ click = clickerstate ( ) my _ time _ left = 0. 0 counter = 0 while sim _ click. get _ time ( ) < duration : my _ time _ left = duration - sim _ click. get _ time ( ) item _ to _ buy = strategy ( sim _ click. get _ coo... | [
-0.306994765996933,
-0.17547538876533508,
0.8702096939086914,
0.7948921322822571,
0.1898663341999054,
-0.0688621997833252,
-0.017233440652489662,
0.2511729300022125,
-0.343451589345932,
0.6648792624473572,
-0.191909059882164,
-0.26002034544944763,
0.12319570779800415,
-0.5663225054740906,
... |
def decrypt ( self, data, pickler = pickle ) : data = self. main _ decrypt ( data ) # simple integrity check to verify that we got meaningful data assert data. startswith ( self. pickle _ pad ), " unexpected header " return pickler. loads ( data [ len ( self. pickle _ pad ) : ] ) | [
-0.07574746757745743,
0.7540712356567383,
0.4905814528465271,
0.07240237295627594,
-0.818180501461029,
-0.5558637976646423,
-0.7458109855651855,
-0.49419522285461426,
0.229815274477005,
0.26736876368522644,
-0.14108923077583313,
-0.9143362641334534,
-1.0945792198181152,
-0.7328923940658569... |
def read _ xyz _ bagel _ output ( filename, unit _ conversion = 1. 0 ) : xs = [ ] s = [ ] ibegin = - 2 nframes = 0 read = false with open ( filename,'r') as fin : for i, line in enumerate ( fin ) : if " * * * geometry * * * " in line : ibegin = i read = true nframes + = 1 xcurr = [ ] elif i = = ibegin + 1 : continue el... | [
-0.02014988102018833,
-0.8940593004226685,
0.6164469718933105,
0.09547394514083862,
-0.21282583475112915,
-0.5102947354316711,
0.6813189387321472,
0.18667781352996826,
-0.5729581117630005,
0.2137501835823059,
-0.10643649846315384,
-0.06684426963329315,
-0.12688909471035004,
-0.023563424125... |
def on _ emit ( * args ) : global startid startid = args [ 0 ] startid = startid. get ('_ id') print'server _ message ', args | [
0.1233133003115654,
-0.6216520667076111,
0.3945445120334625,
-0.3050701320171356,
0.8216356039047241,
-0.31985774636268616,
-0.006267967633903027,
0.04212841019034386,
-0.4770148992538452,
0.5466444492340088,
-0.6780607104301453,
1.6671541929244995,
-1.1338006258010864,
0.8437833189964294,... |
def get _ hidden _ inputs ( nodes ) : inputs = set ( ) outputs = set ( ) for node in nodes : inputs | = set ( node. input ) outputs | = set ( node. output ) for att in node. attribute : if ( att. type! = attributeproto. graph or # pylint : disable = e1101 not hasattr ( att,'g') or att. g is none ) : continue hidden = g... | [
-0.29318922758102417,
-0.04620416834950447,
0.6876441836357117,
0.030083706602454185,
-0.578972339630127,
0.29411619901657104,
1.2664035558700562,
-0.9629209637641907,
-0.4336085021495819,
-0.012643756344914436,
-0.16233877837657928,
0.3790990114212036,
-0.009549770504236221,
0.46919518709... |
def lookback _ demerit ( self, node : node ) - > float : if node. is _ leaf : return 0 else : return self. children _ demerit ( node ) * self. _ variability _ process. node _ lookback ( node ) \ + sum ( child. data [ " w " ] * self. lookback _ demerit ( child ) for child in node. children ) | [
0.6860491633415222,
0.973088800907135,
0.8745714426040649,
-0.6919055581092834,
-0.5379079580307007,
-0.36879482865333557,
0.5046703815460205,
-0.07226776331663132,
-0.015543375164270401,
-0.19485999643802643,
0.09704647213220596,
0.45029884576797485,
-0.33829572796821594,
0.65765023231506... |
def add _ options ( self, options _ parser ) : # type : ( argparse. argumentparser ) - > none pass | [
-0.3662218153476715,
-0.3650718033313751,
0.4887966513633728,
0.029723547399044037,
1.8937352895736694,
0.7392627596855164,
-0.02697148732841015,
0.0893145278096199,
0.3913208842277527,
-0.6949614882469177,
0.25383156538009644,
-0.44359090924263,
-0.2743980288505554,
0.9906917810440063,
... |
def _ installpath ( self, link, path ) : raise notimplementederror | [
-0.17376191914081573,
-1.1326267719268799,
0.3991292119026184,
-0.030998289585113525,
0.03324093669652939,
0.5584598183631897,
0.7587119340896606,
0.40598970651626587,
0.05204661935567856,
0.2646372616291046,
0.453329861164093,
-0.6632068753242493,
-0.5130676031112671,
-0.1681308001279831,... |
def get _ file _ owner ( self, file _ path ) : pass | [
0.31789836287498474,
-0.5405000448226929,
0.3746896982192993,
1.2499921321868896,
0.6832828521728516,
-0.04876960441470146,
0.7893009185791016,
-0.21601444482803345,
-1.6342356204986572,
-1.1091690063476562,
0.5709777474403381,
0.07642114907503128,
0.2145770639181137,
-0.7738189101219177,
... |
def install ( policy, idle _ timeout = openflow. ofp _ flow _ permanent ) : for switch, config in policy : if not switch in inst. concrete _ policy : inst. concrete _ policy [ switch ] = defaultdict ( lambda : [ ] ) inst. stats. tally _ overhead ( switch, config ) for rule in config : nox _ pattern, nox _ actions = rul... | [
-0.24031665921211243,
-0.004215634427964687,
0.5027315020561218,
-0.3977888524532318,
0.866050660610199,
0.8838188648223877,
-0.11016231030225754,
0.5769963264465332,
0.7649596929550171,
0.814656674861908,
-0.04353279992938042,
-0.7988036274909973,
-0.03325424715876579,
0.6998904347419739,... |
def post ( self, request ) : form = addcarform ( request. post ) if form. is _ valid ( ) : added _ car = car. objects. create ( brand = form. cleaned _ data ['brand'], car _ model = form. cleaned _ data ['car _ model'], vin = form. cleaned _ data ['vin'], reg _ plates = form. cleaned _ data ['reg _ plates'], car _ insp... | [
-0.4428677558898926,
-0.008699188940227032,
0.802497386932373,
0.16720198094844818,
-0.10383060574531555,
0.23420432209968567,
-0.5716572999954224,
0.09635443985462189,
-0.9025367498397827,
-0.7291088104248047,
0.44014057517051697,
-0.15288011729717255,
-0.2416522055864334,
0.6684037446975... |
def visit _ rule ( self, rule ) : current _ ast _ section = self. current _ ast _ section class definelookup ( object ) : " " " lookup table class to resolve variable definition names into regular expression objects " " " def _ _ contains _ _ ( self, item _ name ) : return current _ ast _ section. find ('define ', item... | [
-0.4158613085746765,
0.16758431494235992,
0.9007971882820129,
0.02864648401737213,
0.9246403574943542,
-0.2828231453895569,
0.06246945261955261,
-0.0026071465108543634,
0.08285439014434814,
0.27784597873687744,
0.3937624394893646,
-0.5151113271713257,
-0.3067984879016876,
0.724593698978424... |
def geomfill ( arr, n = 2 ) : nums = arr total = 1 while sum ( nums ) > = total : total * = n nums. append ( total - sum ( nums ) ) return nums | [
0.21558181941509247,
0.4409347176551819,
0.5327073335647583,
0.5404312014579773,
0.1477537751197815,
0.4494098424911499,
0.5214483141899109,
-1.0179961919784546,
1.0055242776870728,
-0.24101674556732178,
-0.44159987568855286,
-0.5683403015136719,
0.6408722400665283,
0.654026448726654,
-0... |
def amsmath _ plugin ( md : markdownit ) : md. block. ruler. before ( " blockquote ", " amsmath ", amsmath _ block, { " alt " : [ " paragraph ", " reference ", " blockquote ", " list ", " footnote _ def " ] }, ) md. add _ render _ rule ( " amsmath ", render _ amsmath _ block ) | [
0.9981604218482971,
0.0886194184422493,
0.5550225377082825,
-0.49830132722854614,
0.16099445521831512,
0.09796588867902756,
-0.19483955204486847,
0.2063513845205307,
0.8829373121261597,
0.5917272567749023,
0.7994354963302612,
0.8230645656585693,
0.35775622725486755,
0.838602602481842,
0.... |
def set _ coefficients ( self, xi ) : if isinstance ( xi, list ) : xi = np. stack ( xi, axis = 1 ) # otherwise, assume xi is a numpy array for i, key in enumerate ( self. library. keys ( ) ) : self. library [ key ]. coeff = xi [ i ] | [
-1.2398935556411743,
-0.2904614210128784,
0.40820586681365967,
-0.3858671188354492,
0.9431928396224976,
-0.03294241055846214,
-0.14561328291893005,
-0.14234556257724762,
1.0041146278381348,
0.13799437880516052,
-0.9691025018692017,
0.08904894441366196,
-0.7728273272514343,
0.07937529683113... |
def collectdata ( deviceconnection ) : deviceinfo = [ ] # get device info sysinfo = getsysteminfo ( deviceconnection ) intinfo = getinterfaceinfo ( deviceconnection ) # get values from returned dictonary intlist = [ x for x in intinfo. values ( ) ] deviceinfo = sysinfo + intlist # write to csv writecsv ( deviceinfo ) | [
-0.7321464419364929,
-0.3617306649684906,
0.4608985185623169,
0.04349234700202942,
0.5030247569084167,
0.30969980359077454,
0.25355619192123413,
-0.4246908724308014,
-0.19063305854797363,
-0.46703076362609863,
-0.17662784457206726,
0.04561201110482216,
0.5239598155021667,
1.192086219787597... |
def _ build _ rsync _ cmd ( self, instance _ data ) : return " rsync - avze'ssh % s - i % s'% s % s @ % s : % s " % ( self. _ ssh _ params ( instance _ data ), instance _ data. ssh. keyfile, self. copy _ from, instance _ data. ssh. user, instance _ data. ssh. host, self. copy _ to ) | [
-0.315160870552063,
-0.6751918792724609,
0.7655184864997864,
-0.043319422751665115,
0.17824316024780273,
0.5892095565795898,
0.004344268701970577,
-0.4744546115398407,
-0.2874683737754822,
0.5338740348815918,
0.48040682077407837,
1.0848915576934814,
0.5469754934310913,
-0.567952573299408,
... |
def test _ atomic _ language _ length _ 4 _ nistxml _ sv _ iv _ atomic _ language _ length _ 5 _ 4 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / language / schema + instance / nistschema - sv - iv - atomic - language - length - 5. xsd ", instance = " nistdata / atomic / l... | [
0.4251042902469635,
-0.2701731324195862,
0.2489510178565979,
0.14810550212860107,
-0.3326609432697296,
-0.19585518538951874,
0.14198976755142212,
-0.41244858503341675,
-0.22020116448402405,
0.7348114252090454,
-0.7123369574546814,
-0.6104193925857544,
-0.4587113857269287,
0.306488841772079... |
def delete ( self, path ) : path = path. encode ( " utf - 8 " ) encoded = struct. pack ( " < bxh ", filetransferservice. delete, len ( path ) ) + path self. _ write ( encoded ) b = bytearray ( struct. calcsize ( " < bb " ) ) self. _ readinto ( b ) cmd, status = struct. unpack ( " < bb ", b ) if cmd! = filetransferservi... | [
0.7082387208938599,
0.232327401638031,
0.9490593671798706,
0.14257314801216125,
0.33680829405784607,
0.5063232779502869,
0.05438178405165672,
-0.13131944835186005,
0.1780650019645691,
0.0018668894190341234,
-0.2752440273761749,
0.0389353409409523,
-1.2167710065841675,
-0.37882497906684875,... |
def writesizes ( self, ctype, fname ) : if ctype not in self. clsnaps. keys ( ) : raise notimplementederror ( " unknown cluster type in writesizes " ) if self. comm. get _ rank ( ) = = 0 : fid = open ( fname,'w') clsnaps = self. clsnaps [ ctype ] for clsnap in clsnaps : if not np. isnan ( clsnap. pos [ 0 ] [ 0 ] ) : cs... | [
-0.8976593613624573,
-0.2588063180446625,
0.6059054136276245,
-0.027144502848386765,
0.5885061025619507,
0.5079748034477234,
0.8705446720123291,
0.08429130166769028,
0.39196351170539856,
0.26096048951148987,
-0.716437578201294,
-0.9578569531440735,
0.21106742322444916,
0.8651114106178284,
... |
def add _ last ( self, value ) : node = linkedlistnode ( value ) if self. is _ empty ( ) : self. head = node self. tail = node else : self. tail. next = node self. tail = node | [
-0.26118725538253784,
0.7816572785377502,
0.8347103595733643,
-0.8166790008544922,
0.1155397891998291,
0.37634584307670593,
-0.47468698024749756,
-0.13454802334308624,
1.031352162361145,
-0.033744927495718,
-0.306700199842453,
-0.3331755995750427,
-1.0529130697250366,
1.1271893978118896,
... |
def start ( input _ args : optional [ list [ str ] ] = none, * * opts : any ) - > generator [ proxy, none, none ] : try : with proxy ( input _ args, * * opts ) as p : yield p except keyboardinterrupt : pass | [
0.2820115387439728,
0.4168455898761749,
0.4878898859024048,
0.3570246696472168,
0.2633116841316223,
-0.07797838002443314,
-0.24578356742858887,
0.23432350158691406,
-0.5134168863296509,
-0.029223576188087463,
-0.04933789744973183,
0.0800875574350357,
-1.3024944067001343,
-0.459504514932632... |
def get _ clusters _ from _ file ( self, ctype, fname ) : if ctype not in self. cldict. keys ( ) : raise notimplementederror ( " unknown cluster type \ in get _ clusters _ from _ file. " ) clusters = self. clsnaps [ ctype ] for clustsnap in clusters : clustsnap. setclusteridfromfile ( fname ) self. clsnaps [ ctype ] = ... | [
-1.148193597793579,
-0.29954949021339417,
0.44885608553886414,
0.7495678067207336,
0.4685533940792084,
0.770947277545929,
0.21064995229244232,
-0.12873169779777527,
0.011070167645812035,
0.378579318523407,
-0.369157075881958,
0.08455227315425873,
0.7711820006370544,
0.016342589631676674,
... |
def index ( request ) : # generate counts of some of the main objects num _ players = player. objects. all ( ). count ( ) num _ rooms = room. objects. all ( ). count ( ) # the'all ( )'is implied by default. num _ rules = rule. objects. count ( ) num _ visits = request. session. get ('num _ visits ', 0 ) request. sessio... | [
-0.3229025900363922,
0.39176440238952637,
0.6266221404075623,
0.21997646987438202,
0.5195732712745667,
0.5245329737663269,
1.497711181640625,
0.4255877137184143,
-0.12314533442258835,
0.5553869009017944,
0.3591209053993225,
0.15269246697425842,
0.3757993280887604,
-0.43139246106147766,
-... |
def cluster _ to _ attach ( self ) : return self. _ cluster _ to _ attach | [
-0.423697829246521,
-0.2203385978937149,
0.5301364064216614,
-0.2727242410182953,
0.41776135563850403,
1.2034327983856201,
0.7632573843002319,
0.03716481104493141,
1.0528775453567505,
-0.578558087348938,
0.8576491475105286,
1.5554478168487549,
0.007612374145537615,
-1.0612022876739502,
-... |
def application _ error ( e ) : return'sorry, unexpected error : { } '. format ( e ), 500 | [
-0.318068265914917,
-0.5564817786216736,
0.3882477581501007,
0.07694599777460098,
-0.9835542440414429,
0.8037512898445129,
-0.5315818190574646,
0.7983967661857605,
0.6154734492301941,
1.51993989944458,
0.600268542766571,
0.3301827311515808,
1.009731650352478,
1.096491813659668,
0.7732261... |
def copy _ or _ overwrite _ changed ( source _ path : strpath, target _ path : strpath ) - > strpath : return _ type = type ( target _ path ) if platform. system ( ) = = " windows " : head, tail = os. path. splitdrive ( str ( target _ path ) ) if " : " in tail : logger. warning ( " replacing':'in % s with'-'", tail ) t... | [
-0.35975414514541626,
-0.5259190201759338,
0.7022529244422913,
-0.03650274872779846,
-0.34955665469169617,
0.15961582958698273,
0.5046126246452332,
0.05820033699274063,
-0.27177169919013977,
0.5370909571647644,
1.0740423202514648,
0.6006749272346497,
0.2592375576496124,
-0.0933312848210334... |
def parseentriesbyuser ( self ) : entries = self. logentry _ set. all ( ) users = set ( entry. participant for entry in entries ) # get user set chart _ days = ( ( datetime. today ( ) if not self. goal. ending _ date else self. goal. ending _ date ) - self. goal. date _ created ). days + 2 # how many days to display on... | [
0.12529513239860535,
-0.19660723209381104,
0.8578069806098938,
-0.621687650680542,
-0.6794217228889465,
-0.17821580171585083,
0.5487065315246582,
-0.9816828966140747,
-0.49868252873420715,
0.25581517815589905,
0.46475112438201904,
-0.511103093624115,
0.8113999366760254,
0.6361888647079468,... |
def variable _ summaries ( var ) : with tf. name _ scope ('summaries') : mean = tf. reduce _ mean ( var ) tf. summary. scalar ('mean ', mean ) with tf. name _ scope ('stddev') : stddev = tf. sqrt ( tf. reduce _ mean ( tf. square ( var - mean ) ) ) tf. summary. scalar ('stddev ', stddev ) tf. summary. scalar ('max ', tf... | [
0.08974594622850418,
0.7918842434883118,
0.5066804885864258,
-1.0588428974151611,
-0.010082658380270004,
0.11218493431806564,
0.3674100339412689,
-0.14224088191986084,
0.17742756009101868,
-0.060335662215948105,
-1.0075795650482178,
0.8332000374794006,
1.1453726291656494,
0.396470218896865... |
def _ _ next _ _ ( self ) : row = next ( self. _ listinput ) # get row and check length data = ( collections. ordereddict ( [ ( h, r ) for h, r in zip ( self. _ names, row ) ] ) ) self. _ line _ num = self. _ listinput. line _ num return data | [
-1.0366361141204834,
0.5301266312599182,
0.3874976634979248,
-0.6623778939247131,
-1.2929786443710327,
-0.5753555297851562,
-0.6058748364448547,
-0.6390710473060608,
0.12357290834188461,
-0.9371623992919922,
-0.6817532181739807,
-0.8472329378128052,
0.3359730541706085,
0.563787579536438,
... |
def init _ tab _ stats _ plot _ tsm ( ) : fig = plt. figure ( figsize = ( 16, 9 ) ) fig _ normal = fig. add _ subplot ( 211 ) fig _ zoom = fig. add _ subplot ( 212 ) return fig, fig _ normal, fig _ zoom | [
1.2821404933929443,
0.7592710852622986,
0.4168173372745514,
-0.08691264688968658,
-0.6442952752113342,
0.3723847270011902,
0.24216733872890472,
-0.24426253139972687,
-0.9827423095703125,
-0.4636951982975006,
-0.49354079365730286,
0.1504637897014618,
1.0089974403381348,
-0.21886666119098663... |
def get _ swift _ info ( self ) : info _ url ='{ 0 } / info '. format ( self. swift _ endpoint ) return self. get ( info _ url ) | [
0.34201669692993164,
0.04299609363079071,
0.31993353366851807,
0.1145627349615097,
1.2643193006515503,
-0.5691563487052917,
-1.3322229385375977,
-0.35374078154563904,
-1.204195261001587,
-0.4965542256832123,
-0.2265719473361969,
0.5964033007621765,
-0.06219073757529259,
0.35006994009017944... |
def scattering _ rates _ parallel ( k, nqpts, data _ dir ) : chunk _ dir = data _ dir +'chunked /'g _ df = pd. read _ parquet ( chunk _ dir +'k { : 05d }. parquet '. format ( k ) ) abs _ weight = ( g _ df ['be'] + g _ df ['k + q _ fd'] ) * g _ df ['g _ element'] * g _ df ['abs _ gaussian'] ems _ weight = ( g _ df ['be'... | [
0.85023033618927,
0.12993086874485016,
0.8482562303543091,
-0.7510802149772644,
0.30209991335868835,
0.20084457099437714,
0.030866410583257675,
0.2750149369239807,
-0.07162106782197952,
0.62953782081604,
0.1699080467224121,
0.052443865686655045,
-0.868093729019165,
0.43307945132255554,
-... |
def perturb ( mat : np. ndarray, pos : tuple [ int, int ], val : int, rho : float ) - > np. ndarray : pert _ mat = mat. copy ( ) pert _ mat [ pos ] = val original _ rho = spectral _ radius ( pert _ mat ) # the calculated spectral radius can be positive even if it should # be exactly zero due to computational error. her... | [
0.7239362001419067,
-0.4157375693321228,
0.5765352249145508,
-0.0007349132793024182,
-0.7841268181800842,
0.058891694992780685,
-0.3837784230709076,
-0.15502695739269257,
0.07035961002111435,
0.5318900346755981,
1.1047990322113037,
0.32991260290145874,
-0.7067286968231201,
-0.2469624280929... |
def to _ arabic ( symbols ) : if not romannumerals. is _ valid _ roman ( symbols ) : return none numbers = [ romannumerals. currency [ s ] for s in symbols ] for i in range ( len ( numbers ) - 1 ) : if numbers [ i ] < numbers [ i + 1 ] : numbers [ i ] = - numbers [ i ] return sum ( numbers ) | [
-0.6686629056930542,
0.13248541951179504,
0.5541749596595764,
-0.5793338418006897,
-0.1470789909362793,
-0.6589397192001343,
0.6105765104293823,
-0.6024470329284668,
0.7273131012916565,
0.6795560717582703,
-0.1709362268447876,
0.30975091457366943,
-0.7955885529518127,
-0.6044327616691589,
... |
def doc2diffpy ( doc ) : from numpy import asarray from diffpy. structure. atom import atom from diffpy. structure. lattice import lattice from diffpy. structure. structure import structure lattice = lattice ( a = doc [ " lattice _ abc " ] [ 0 ] [ 0 ], b = doc [ " lattice _ abc " ] [ 0 ] [ 1 ], c = doc [ " lattice _ ab... | [
-0.18355987966060638,
-0.889160692691803,
0.5208891034126282,
-0.6965054273605347,
-0.6250926852226257,
0.3777041733264923,
0.30548447370529175,
-0.21598637104034424,
0.20664386451244354,
-0.00045498041436076164,
-0.16534991562366486,
-0.07098864018917084,
-0.29862892627716064,
-0.56820517... |
def dumps ( source ) : return yaml. dump ( source, encoding = none, explicit _ start = true, explicit _ end = true, default _ flow _ style = false, default _ style = false, canonical = false, dumper = _ yamlishdumper ) | [
0.022702617570757866,
-0.04685859754681587,
0.3034653663635254,
-0.403981477022171,
-0.998576283454895,
-0.7515882253646851,
0.5686678290367126,
0.19858744740486145,
0.23385398089885712,
-0.4810449481010437,
-0.9995666146278381,
0.6593794226646423,
0.3798562288284302,
0.7650708556175232,
... |
def removecollisionononedcurves ( onedcurvedict, collidingpolygondict, polygonxoncurvedict ) : newonedcurvedict = { } newpolygonxoncurvedict = { } minusinf = - 9999999999 for key, point in onedcurvedict. iteritems ( ) : newonedcurvedict [ key ] = [ minusinf, minusinf, key ] newpolygonxoncurvedict [ key ] = none polygon... | [
0.28864842653274536,
-0.8918346762657166,
0.6491101384162903,
-0.4185720384120941,
-0.6060866713523865,
0.926444947719574,
-0.07822202146053314,
0.034602463245391846,
0.9637651443481445,
0.5044239163398743,
-1.4826475381851196,
0.03254658728837967,
-0.7488614320755005,
-0.6877810955047607,... |
def is _ branch _ collapsed ( self, branch ) : return self. is _ branch _ or _ cusp _ collapsed ( branch, branch ) | [
-0.8365823030471802,
-0.19512276351451874,
0.5630647540092468,
1.5771554708480835,
-0.369665265083313,
0.13996747136116028,
-0.46651193499565125,
0.01377895288169384,
0.751857578754425,
-0.3811849057674408,
-0.3055104911327362,
-0.254087895154953,
-1.157124638557434,
1.1486982107162476,
... |
def fill _ slack _ list ( self ) : # look file slack for path in self. filepath : try : directory = self. fs _ inf. open _ dir ( path ) self. get _ file _ slack ( directory ) except oserror : if self. info : print ( " file : % s " % path ) file = self. fs _ inf. open ( path ) self. get _ file _ slack _ single _ file ( ... | [
0.40745583176612854,
-0.16791312396526337,
0.5199239253997803,
0.0021721613593399525,
1.9271272420883179,
0.6978734135627747,
0.4766954779624939,
-0.2568168044090271,
-0.5083621740341187,
-0.42934197187423706,
0.21171410381793976,
0.03375617042183876,
0.9601454734802246,
1.0065592527389526... |
def test _ list _ decimal _ length _ 2 _ nistxml _ sv _ iv _ list _ decimal _ length _ 3 _ 1 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / list / decimal / schema + instance / nistschema - sv - iv - list - decimal - length - 3. xsd ", instance = " nistdata / list / decimal / schem... | [
-0.2068253606557846,
0.13223367929458618,
0.5730283856391907,
0.7412664294242859,
0.1483602225780487,
0.4669058322906494,
-0.5631558895111084,
0.7606682181358337,
1.131227731704712,
0.5467046499252319,
-0.9843968749046326,
-0.2377413511276245,
0.22441180050373077,
0.056338388472795486,
-... |
def list _ users _ in _ group ( userpoolid = none, groupname = none, limit = none, nexttoken = none ) : pass | [
-1.1643807888031006,
0.35742509365081787,
0.30246877670288086,
0.3661841154098511,
0.1167268231511116,
-0.7530009746551514,
0.572904109954834,
-0.6712253093719482,
0.12257122248411179,
-0.03900079056620598,
-0.03345434367656708,
1.776475191116333,
-1.2177953720092773,
-0.260433167219162,
... |
def draw _ points ( points, f ) : if len ( f )! = len ( points ) : return for i in range ( len ( points ) ) : point = points [ i ] if f [ i ] > 0 : plt. plot ( point [ 0 ], point [ 1 ],'ro') else : plt. plot ( point [ 0 ], point [ 1 ],'bx') | [
0.23644720017910004,
0.9039925336837769,
0.30648279190063477,
0.7872050404548645,
0.7362205982208252,
1.1254827976226807,
-0.7104120850563049,
0.9348506331443787,
-0.03134951740503311,
0.20587706565856934,
0.8429778814315796,
0.6456922888755798,
0.644827663898468,
0.3788023591041565,
-0.... |
def refresh _ size ( self ) : size = self. size _ calculator ( * * self. get _ current _ result ( ) ) self. estimated _ size. config ( text ='estimated download size : { } '. format ( size _ to _ str ( size ) ) ) | [
0.23799265921115875,
-0.27696478366851807,
0.5003920197486877,
-0.23786193132400513,
-0.5693433284759521,
-0.12573747336864471,
0.4302740693092346,
-0.22009916603565216,
-0.24946582317352295,
0.06769803166389465,
-0.12127812951803207,
0.8167896866798401,
0.08157934248447418,
1.222079992294... |
def _ _ init _ _ ( self, context : mlrun. mlclientctx, name : str, model _ path : str = none, model : keras. model = none, custom _ objects _ map : union [ dict [ str, union [ str, list [ str ] ] ], str ] = none, custom _ objects _ directory : str = none, protocol : str = none, model _ format : str = tfkerasmodelhandle... | [
-0.2310488224029541,
-0.419601708650589,
0.47316455841064453,
-0.14567475020885468,
-0.8314863443374634,
-0.2712785005569458,
0.37657731771469116,
0.3296566307544708,
-0.3416616916656494,
-0.19701242446899414,
-0.8042883276939392,
0.14408355951309204,
0.25336018204689026,
0.189857855439186... |
def get _ user _ info ( self, user ) : endpoint ='/ users / % s'% user auth = { } if user = ='_ _ self _ _': auth = {'oauth': self. full _ oauth } response = self. execute ( endpoint, * * auth ) return response | [
-1.253815770149231,
0.34313109517097473,
0.6920151710510254,
0.9654557108879089,
-0.21748381853103638,
-0.6584328413009644,
0.014436458237469196,
-1.3169362545013428,
0.30276399850845337,
-0.3430614769458771,
-0.8507354259490967,
0.29312488436698914,
-0.28744378685951233,
0.279750227928161... |
def initui ( self ) : sizer = wx. boxsizer ( wx. vertical ) anim = animation ('movie _ ca. gif') ctrl = animationctrl ( self, - 1, anim ) ctrl. play ( ) sizer. add ( ctrl ) self. setsizerandfit ( sizer ) self. settitle ('podglad animacji') self. show ( ) | [
-0.13825322687625885,
0.9343538880348206,
0.3570249080657959,
0.8671038746833801,
-0.555493175983429,
0.12926702201366425,
0.3898999094963074,
-0.12154094874858856,
-0.5715370774269104,
-0.24326255917549133,
-0.1907486766576767,
0.5844619274139404,
-0.23897626996040344,
0.9957974553108215,... |
def parent _ update _ users _ based _ on _ queue ( self ) : # update the user table inside function user _ queue = self. read _ queue ( insert _ for ='user') while user _ queue : user _ handles = [ ] user _ query _ dict = defaultdict ( ) for row in user _ queue : user _ handles. append ( row ['user _ handle'] ) user _ ... | [
-0.3464371860027313,
-1.184865117073059,
0.5505313277244568,
0.27235808968544006,
-0.6238102316856384,
0.3639388382434845,
0.23387382924556732,
-0.11152186989784241,
-0.6747294664382935,
0.06813164800405502,
0.0007545507396571338,
-0.027228113263845444,
0.3183518648147583,
0.64736622571945... |
def propose ( self, state ) : hamiltonian = self. leapfrog. hamiltonian # resample momenta q = state. positions p = hamiltonian. sample _ momenta ( q ) state. kinetic _ energy = hamiltonian. kinetic _ energy ( p ) state. momenta = p # run leapfrog q, p = self. leapfrog. run ( q. copy ( ), p. copy ( ) ) v = hamiltonian.... | [
0.392894983291626,
0.08702632784843445,
0.5483238101005554,
-0.46716031432151794,
-0.6809722781181335,
0.09430959075689316,
-1.1705186367034912,
0.5721177458763123,
-0.17457418143749237,
-0.11008947342634201,
-0.38228654861450195,
-0.6546269059181213,
0.13782371580600739,
0.200321972370147... |
def getvisibleelementfilter ( self, * args ) : pass | [
-0.6663888096809387,
-0.2167210876941681,
0.6244882345199585,
0.716657817363739,
-0.6819822788238525,
1.0480756759643555,
0.6312437057495117,
-0.2802249789237976,
-0.07888229191303253,
0.1569107323884964,
-0.3576740324497223,
1.3551244735717773,
-0.3392753005027771,
0.6218916773796082,
-... |
def cvmh _ voxet ( prop = none, voxet = none, no _ data _ value ='nan ', version ='vx63') : import cst repo = cst. site. repo # download if not found path = os. path. join ( repo, version,'bin') if not os. path. exists ( path ) : url ='http : / / structure. harvard. edu / cvm - h / download / % s. tar. bz2'% version pr... | [
0.48872771859169006,
-0.7018409967422485,
0.9305388927459717,
-0.3951575458049774,
-0.7628899812698364,
0.2588125169277191,
-0.720496416091919,
0.08691742271184921,
-0.27422448992729187,
0.030229661613702774,
-0.012419592589139938,
1.027745008468628,
-0.46321406960487366,
-0.62726300954818... |
def print _ repo _ file ( cls, template _ name, repo _ url, gpg _ url, file _ name = none, use _ gpg = true, * * kw ) : template = yum _ templates [ template _ name ] logger. info ('contents of % s repo file :'% template _ name ) logger. info ( template. format ( gpg _ url = gpg _ url, repo _ url = repo _ url, gpg _ ch... | [
0.4926539957523346,
0.22965766489505768,
0.7257982492446899,
-0.5513054132461548,
-0.21164394915103912,
0.13204555213451385,
-0.49568235874176025,
1.4188872575759888,
-1.3143125772476196,
0.2903984785079956,
-0.14362601935863495,
-0.44024717807769775,
0.1772681027650833,
-0.201759338378906... |
def getnewnodescreated ( _ function ) : before = cmds. ls ( long = true ) eval ( _ function ) after = cmds. ls ( long = true ) return list ( set ( after ) - set ( before ) ) | [
-0.7609853744506836,
-0.10043907165527344,
0.375039666891098,
0.19495700299739838,
0.46625345945358276,
-0.4162173271179199,
-0.029824446886777878,
0.016021085903048515,
-0.8746663331985474,
-0.14544472098350525,
-0.653624951839447,
0.6479600667953491,
1.1442598104476929,
0.693500936031341... |
def gettransitionstatesandprobs ( self, state, action ) : source = action [ 0 ] target = action [ 1 ] # actually also copy original state nextstate = decodestate ( state ) if nextstate [ source ] = = [ ] : raise exception ( " source stack should not be empty. " ) else : elem = nextstate [ source ]. pop ( ) nextstate [ ... | [
-1.0298545360565186,
0.28338512778282166,
0.5048441886901855,
0.008894181810319424,
-0.3655574321746826,
-0.30065038800239563,
-0.06366107612848282,
0.2992759048938751,
0.9941663146018982,
0.9037396907806396,
-0.6832494139671326,
0.451314240694046,
0.21620726585388184,
-0.05131576955318451... |
def update _ docs _ config ( new _ version = none, authors = none ) : conf _ py = os. path. join ('docs ','source ','conf. py') with open ( conf _ py ) as f : conf _ py _ src = f. read ( ) # update the'copyright _ year'string year = datetime. now ( ). year conf _ py _ src = re. sub ( r " ^ copyright _ year \ s * = \ s ... | [
-0.31138280034065247,
-1.214242935180664,
0.442661851644516,
-0.07758790254592896,
-0.31933408975601196,
-0.08462575078010559,
-0.022568074986338615,
0.8541267514228821,
-0.28433167934417725,
0.5035973191261292,
-0.6109026074409485,
0.38493621349334717,
-0.12252403050661087,
0.421941250562... |
def plan _ and _ wait ( * args ) : return _ ida _ auto. plan _ and _ wait ( * args ) | [
-0.9070227742195129,
-0.18316756188869476,
0.21742534637451172,
0.47518157958984375,
-0.3426777422428131,
1.0594756603240967,
0.8714634776115417,
0.296010285615921,
-0.1391371190547943,
-0.3677000105381012,
-0.8683414459228516,
-0.28621479868888855,
-0.026028607040643692,
0.269965201616287... |
def load _ from _ csv ( self, filename, column _ idx, is _ population = none ) : f = open ( filename ) r = csv. reader ( f, delimiter = str ( ", " ) ) head = r. next ( ) if len ( head ) < column _ idx + 1 : raise runtimeerror ( " the csv needs to have at least % d column ( s ) " % ( column _ idx + 1 ) ) self. title = h... | [
-0.21547506749629974,
-0.23968128859996796,
0.5498789548873901,
0.6109723448753357,
-0.10439945757389069,
0.18136361241340637,
-0.7793431282043457,
-0.1232135221362114,
-0.2996691167354584,
0.1152029037475586,
0.18190127611160278,
0.3991909921169281,
-0.13264070451259613,
-0.60064888000488... |
def wx _ 3 _ znajdz _ zyjace _ komorki _ na _ siatce ( self ) : lista _ pozycja _ zyw = [ ] for x in range ( 0, 100 ) : for y in range ( 0, 100 ) : kolor = self. grid. getcellbackgroundcolour ( x, y ) if kolor = = wx. black : z = ( x, y ) lista _ pozycja _ zyw. append ( z ) return lista _ pozycja _ zyw | [
-0.8104029893875122,
-0.3356134295463562,
0.3789980411529541,
-0.009340365417301655,
-0.39442703127861023,
-0.6917767524719238,
0.7706543803215027,
-0.5841715335845947,
0.06443099677562714,
1.2933316230773926,
-0.4536927342414856,
-0.03579767048358917,
-0.06452146172523499,
1.0723396539688... |
def apply _ gradient _ update ( self, gradient : counter, batch _ size : int ) : for i in gradient. keys ( ) : self. weights [ i ] = self. weights [ i ] + self. alpha * gradient [ i ] | [
-0.5275058150291443,
-0.3558739423751831,
0.5574445724487305,
-0.3521794378757477,
-0.15714633464813232,
0.8862895369529724,
0.4665881395339966,
0.6800912618637085,
-0.41273146867752075,
0.659734845161438,
-0.7388871312141418,
-0.3375857174396515,
-0.958670437335968,
1.2969402074813843,
... |
def test _ compute _ multiply ( test _ client ) : data = {'value1': 5,'value2': 3 } url ='/ compute / multiply'response = test _ client. post ( url, json = data ) assert response. status _ code = = 200 assert response. data = = b'15 \ n ' | [
-0.739661455154419,
1.3643828630447388,
0.6890106201171875,
0.5899275541305542,
0.8288670182228088,
0.35305055975914,
-0.6990939974784851,
-0.29688185453414917,
-0.4014080762863159,
-0.32011863589286804,
-1.1371136903762817,
-0.3879871070384979,
-0.34941795468330383,
0.19788587093353271,
... |
def sendmail ( self, from _ addr, to _ addrs, msg, mail _ options = ( ), rcpt _ options = ( ) ) : self. ehlo _ or _ helo _ if _ needed ( ) esmtp _ opts = [ ] if isinstance ( msg, str ) : msg = _ fix _ eols ( msg ). encode ('ascii') if self. does _ esmtp : if self. has _ extn ('size') : esmtp _ opts. append ( " size = %... | [
-0.4776119291782379,
0.461807519197464,
0.7285946011543274,
-0.45989900827407837,
-0.32369616627693176,
-0.5514014959335327,
-0.6446883678436279,
0.1901887059211731,
0.4609035849571228,
0.2958003878593445,
-0.4890432059764862,
0.46401694416999817,
-0.6781615018844604,
0.6940667629241943,
... |
def delay _ upcoming _ action ( self, project _ name : str, dev _ box _ name : str, upcoming _ action _ id : str, user _ id : str = " me ", *, delay _ until : datetime. datetime, * * kwargs : any ) - > json : error _ map = { 401 : clientauthenticationerror, 404 : resourcenotfounderror, 409 : resourceexistserror, 304 : ... | [
-1.5848922729492188,
-0.20318946242332458,
0.7823457717895508,
-0.007234957069158554,
-0.3896510601043701,
-0.129474475979805,
0.21126973628997803,
-1.143439531326294,
-0.01626129448413849,
-0.15175685286521912,
-0.5103758573532104,
1.55592942237854,
0.4040752351284027,
-0.0175686795264482... |
def get _ account _ balance ( api _ key : str = api _ key, api _ secret : str = api _ secret, ) : client = privatebitwyrewsclient ( api _ key = api _ key, api _ secret = api _ secret ) client. account _ balance ( ) payload = " " # payload always empty for balances & statements while true : print ( " " ) print ( f " rec... | [
-0.20465318858623505,
-0.6451277136802673,
1.06828773021698,
-0.3911030888557434,
0.7855100631713867,
-0.37770381569862366,
-0.07255474478006363,
-1.6407381296157837,
-0.27832815051078796,
-0.22624708712100983,
0.2615274488925934,
1.4281389713287354,
-0.49325335025787354,
0.283084601163864... |
def _ add _ registry _ reads ( self, node, calls ) : regreads = calls [ ( ( calls ['api'] = ='regqueryvalueexa') | ( calls ['api'] = ='regqueryvalueexw') | ( calls ['api'] = ='ntqueryvaluekey') ) & ( calls ['status'] = = true ) ] for i, regread in regreads. iterrows ( ) : regname = none for arg, val in regread ['argume... | [
-0.5137127041816711,
0.4316999316215515,
0.5738736987113953,
-0.7979984879493713,
1.080365538597107,
0.20939217507839203,
0.06434181332588196,
0.31562522053718567,
0.2327907681465149,
0.49501895904541016,
0.6739922165870667,
0.9327152371406555,
-0.060143209993839264,
0.15772654116153717,
... |
def get _ sentence _ relation _ cluster ( corpus _ relation ) : sent _ relation _ cluster = [ ] for i, x in enumerate ( corpus _ relation ) : if len ( x ) = = 0 : sent _ relation _ cluster. append ( [ ] ) continue relation _ cluster = defaultdict ( list ) for d in x : relation _ cluster [ d ['sentence'] ]. append ( cop... | [
-0.052247777581214905,
0.34400129318237305,
0.3429441452026367,
-1.0552457571029663,
0.15018345415592194,
-0.6448400020599365,
0.5800179243087769,
0.20246614515781403,
-0.1707971841096878,
0.9231671094894409,
-0.1176898181438446,
0.14026784896850586,
-1.0757213830947876,
-0.374899923801422... |
def run _ one _ step ( self, dt ) : self. soilflux ( dt ) | [
-0.2839690148830414,
0.519225001335144,
0.14758451282978058,
0.7201138734817505,
0.7330191135406494,
0.558219313621521,
1.2431402206420898,
-1.0186127424240112,
-0.5155565738677979,
-1.997556447982788,
-0.3230864405632019,
-0.5303778648376465,
0.19129829108715057,
2.2222063541412354,
-1.... |
def run _ model ( model _ env, model, scenario _ name, constants, start _ date, stop _ date ) : # set dates model. starttime = datetime _ to _ serial ( start _ date ) model. stoptime = datetime _ to _ serial ( stop _ date ) # register scenario model _ env. register _ scenarios ( scenarios = { scenario _ name : { " cons... | [
-0.6027551293373108,
0.03401588276028633,
0.6359401345252991,
0.029232248663902283,
-0.5156875848770142,
0.026572249829769135,
0.6288018226623535,
-0.02664070948958397,
-1.0330235958099365,
0.39236921072006226,
-0.10948904603719711,
0.2824791967868805,
0.18774612247943878,
-0.0680961906909... |
def validate _ response ( hour, minute ) : if hour is none or hour = = " " : return { " response " : " no hour value " } if minute is none or minute = = " " : return { " response " : " no minute value " } return { " response " : " success " } | [
-0.17902417480945587,
-1.1639190912246704,
0.5745900869369507,
-0.4171808063983917,
-0.05260290205478668,
-0.0604320764541626,
-1.2176939249038696,
-0.7468001246452332,
0.14703887701034546,
0.24720554053783417,
-0.23320502042770386,
-0.46209922432899475,
-0.3265378475189209,
0.397195994853... |
def _ _ str _ _ ( self ) : return " productid = " + ztexdevice1. bytearraystring ( self. productid ) + " fwver = " + ( self. fwversion & 255 ) + " ifver = " + ( self. interfaceversion & 255 ) + " snstring = \ " " + self. snstring ( ) + " \ " " | [
0.3836096525192261,
-1.0166590213775635,
0.4884689450263977,
-0.2431495189666748,
-0.9265785813331604,
0.7147132158279419,
0.007185795344412327,
-1.285622000694275,
0.5796852707862854,
0.5376169681549072,
-0.16914689540863037,
0.6417055130004883,
-0.9488935470581055,
-0.1960090696811676,
... |
def attrch ( name = '. * ', value = lambda val : true, action = lambda name, value : print ( f'{ name } = { value }'), *, meta = false ) : regex = re. compile ( name +'$') macher = value if callable ( value ) else lambda val : val = = value def decorator ( cls ) : if meta : return _ cls, target _ cls = _ get _ meta ( c... | [
-0.8859589695930481,
-0.439164400100708,
0.8088507652282715,
0.23775708675384521,
-0.730963408946991,
0.05043259263038635,
0.14126205444335938,
0.48877835273742676,
0.6355780959129333,
0.7668424248695374,
0.58613121509552,
0.7709980607032776,
0.8548766374588013,
-0.322739839553833,
0.654... |
def compute ( self, search _ range = 1. ) : source _ hash = self. source _ hash dest _ hash = self. dest _ hash if len ( source _ hash. points ) = = 0 or len ( dest _ hash. points ) = = 0 : return search _ range = float ( search _ range ) + 1e - 7 dists, inds = source _ hash. kdtree. query ( dest _ hash. coords _ mappe... | [
-0.15850557386875153,
0.2689732313156128,
0.5001918077468872,
-0.14194972813129425,
0.300193727016449,
0.2840622067451477,
-0.20328527688980103,
0.9826362133026123,
-0.1680082082748413,
0.5657300353050232,
0.12246690690517426,
1.026527762413025,
-0.1804983913898468,
0.1071987897157669,
-... |
def getlengthdistribution ( self, cutoff, box, func = conoptdistancecython, writegsd = none, bt = none ) : ldistrib = np. zeros ( len ( self. pos ) ) for cid in range ( self. nclusts ) : inds = np. where ( self. clusterids = = cid ) [ 0 ] if len ( inds ) > 1 : if writegsd is not none : cidpos = self. fixpbc ( cid, cuto... | [
0.032354895025491714,
-0.15703441202640533,
0.6282209157943726,
-0.5623788237571716,
0.16984468698501587,
0.515904426574707,
0.19646036624908447,
0.5159080028533936,
0.4633064866065979,
0.27253344655036926,
-0.3363318145275116,
-0.5127511024475098,
-0.6252729296684265,
-0.10018105804920197... |
def _ reorder _ eofs ( input _ eofs, pcs, lambdas, explained _ variance ) : n _ components = np. size ( explained _ variance ) sort _ order = np. flip ( np. argsort ( explained _ variance ) ) perm _ inv = np. zeros ( ( n _ components, n _ components ) ) for i in range ( n _ components ) : perm _ inv [ i, sort _ order [... | [
-0.6548030376434326,
-0.263242244720459,
0.5060932636260986,
-0.634151816368103,
-0.010424045845866203,
-0.18421019613742828,
0.15610674023628235,
0.13810791075229645,
-0.5144814252853394,
0.28470370173454285,
0.827793538570404,
0.370320200920105,
-0.4183732867240906,
0.006040675099939108,... |
def test _ undirected _ edge _ equality ( self ) : v0 = directedvertex ( ) v1 = directedvertex ( ) v2 = directedvertex ( ) e00 = directededge ( ( v0, v0 ) ) e01 = directededge ( ( v0, v1 ) ) e10 = directededge ( ( v1, v0 ) ) e11 = directededge ( ( v1, v1 ) ) e02 = directededge ( ( v0, v2 ) ) another _ e01 = directededg... | [
-0.561468780040741,
-0.7919273376464844,
0.4816553294658661,
-0.6211240291595459,
0.9277257323265076,
0.9177480936050415,
0.6471807956695557,
0.334026038646698,
0.6584659814834595,
-0.5277746319770813,
-0.6980149149894714,
-0.2749647796154022,
-0.08815480768680573,
-0.04163786768913269,
... |
def post ( self ) : data = request. json return save _ new _ genre ( data = data ) | [
-1.554925560951233,
-0.09779355674982071,
0.5729232430458069,
0.9846811890602112,
0.3952929377555847,
-0.08713822811841965,
-0.47204798460006714,
-0.010873934254050255,
-0.9516139030456543,
0.09585442394018173,
-1.3736263513565063,
-0.18142195045948029,
-1.4688999652862549,
1.0609369277954... |
def has _ cycle ( adj _ list : list [ list [ int ] ], start : int, path : list [ int ] ) - > bool : | [
-0.08689271658658981,
0.41465428471565247,
0.4524025619029999,
0.6702550649642944,
-0.025303764268755913,
0.2145521640777588,
0.2741038203239441,
0.35219666361808777,
-0.27136412262916565,
1.1134305000305176,
-0.20683136582374573,
0.3842746615409851,
-0.6820825934410095,
0.0407790429890155... |
def wrapper ( self, * args, * * kwargs ) : if self. connection is none : raise exception ( " not connected " ) return func ( self, * args, * * kwargs ) | [
-0.748791515827179,
-0.5034084916114807,
0.6075816750526428,
-0.002452721120789647,
0.40575942397117615,
-0.12862670421600342,
-0.673328697681427,
-0.10596910119056702,
-0.24616040289402008,
0.12922631204128265,
0.5988653302192688,
0.02802327834069729,
0.027111271396279335,
0.3073606789112... |
def update ( ) : print ('\ 033 [ 33m'+ " record editor > enter the id of record to update : " +'\ 033 [ 0m') idd = input ( " \ 033 [ 33m > \ 033 [ 0m " ) rec = con. get _ record ( int ( idd ) ) if rec is none : print ( " \ 033 [ 33mno record found with id " + idd + ". try again. \ 033 [ 0m " ) else : print ( " \ 033 [ ... | [
-0.2565639317035675,
-0.22861017286777496,
0.8839857578277588,
-0.4999038875102997,
-0.5568731427192688,
0.5438248515129089,
0.6992794275283813,
-0.4242054522037506,
-0.9616186022758484,
-0.10132626444101334,
-0.21840457618236542,
0.46144482493400574,
-0.5174098610877991,
-0.15670575201511... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.