text stringlengths 25 2.19k | embedding listlengths 768 768 |
|---|---|
def _ _ init _ _ ( self, data _ path ) : self. data _ path = data _ path self. sub _ id _ pairs = [ ] self. _ _ sub _ id _ list = [ ] self. _ _ sub _ id _ sessions = { } | [
-0.09911081194877625,
0.023989522829651833,
0.3659980297088623,
0.21119917929172516,
-0.6268925666809082,
0.42049431800842285,
0.375037282705307,
0.4010156989097595,
0.0006339673418551683,
-0.36745840311050415,
-1.657434344291687,
0.24391986429691315,
-0.30202141404151917,
0.08250804245471... |
def lines ( text, num _ indent _ spaces, max _ line _ length = 77 ) : if len ( text ) < max _ line _ length : # all text fits on one line line = text +'\ n'return [ line ] # all text does not fix on one line first _ line = true line _ list = list ( ) words = text. split ( ) while words : if first _ line : line ='' firs... | [
0.5895283222198486,
-0.3565043807029724,
0.5495049357414246,
0.8121496438980103,
-0.6341321468353271,
0.08352165669202805,
-1.2354393005371094,
1.0009658336639404,
0.7109441161155701,
-0.04184048995375633,
0.3299844563007355,
-0.10124149918556213,
-0.6822496652603149,
0.6296058297157288,
... |
def tuint64 _ getmegastr ( * args ) : return _ snap. tuint64 _ getmegastr ( * args ) | [
-1.4705989360809326,
0.7599167227745056,
0.13051961362361908,
1.0006693601608276,
0.31099221110343933,
-0.026606827974319458,
-0.22436176240444183,
0.06506908684968948,
-1.2270641326904297,
-0.09818379580974579,
1.5329384803771973,
-1.152848720550537,
-1.1216307878494263,
0.995033979415893... |
def getoveralldataskipped ( self ) : return self. _ _ swift. getoveralldataskipped ( ) | [
-1.326245665550232,
0.6058444976806641,
0.5509225130081177,
-0.09536591917276382,
-0.432243674993515,
0.9304581880569458,
0.22640037536621094,
-0.19215193390846252,
-0.16995957493782043,
-0.5054412484169006,
-1.0710906982421875,
0.3314674198627472,
0.48544925451278687,
0.6730141639709473,
... |
def test _ iter ( self ) : with self. subtest ( " iterator 1 " ) : prop _ list = list ( self. prop. _ _ iter _ _ ( ) ) self. assertequal ( prop _ list, [ self. dummy _ prop _ 1, self. dummy _ prop _ 2 ] ) with self. subtest ( " iterator 2 " ) : prop _ list = list ( iter ( self. prop ) ) self. assertequal ( prop _ list,... | [
-0.5630993843078613,
-0.1665152907371521,
0.5415835380554199,
-0.24546803534030914,
0.5041950345039368,
0.7607372999191284,
0.43983155488967896,
-0.2536390721797943,
-0.3389173746109009,
0.009438825771212578,
-0.048994772136211395,
-0.23038585484027863,
-0.5650743246078491,
-0.087827153503... |
def load _ runtime _ environment ( ) - > runtimeenvironment : global runtime _ environment runtime _ environment = runtimeenvironment ( dependencies = _ load _ dependencies ( ), logger = logging. getlogger ('pynegflogger') ) runtime _ environment. logger. setlevel ( settings ['loglevel'] ) return runtime _ environment | [
0.23487243056297302,
-0.4600814878940582,
0.4238092601299286,
-0.511712908744812,
-0.1901129186153412,
-0.603834867477417,
0.2020929902791977,
-0.5032294988632202,
-0.21562203764915466,
-0.5320577621459961,
-0.8395160436630249,
0.1518101692199707,
-0.9288575649261475,
0.8982952833175659,
... |
def save ( self, message ) : self. commit. message = message self. commit. tree = self. tree # todo : store new blobs only for item in self. tree. items ( ) : self. repo. object _ store. add _ object ( item. blob ) self. repo. object _ store. add _ object ( self. tree ) # set head to new commit self. repo. object _ sto... | [
0.23242752254009247,
-0.7244096994400024,
0.45795661211013794,
-0.41433876752853394,
0.9892937541007996,
0.35036545991897583,
0.19000929594039917,
-0.09452055394649506,
-0.4991627335548401,
0.9325444102287292,
-1.2587131261825562,
-0.2370816022157669,
-1.2869514226913452,
0.832807719707489... |
def compile _ solidity _ class ( contract _ class ) : contract _ class ( ) | [
-0.30732300877571106,
-0.8759690523147583,
0.2843456566333771,
0.7739246487617493,
0.5825422406196594,
0.31101053953170776,
-0.1357089877128601,
0.7417681813240051,
0.7559346556663513,
-0.3881445825099945,
-0.704082190990448,
-0.5793062448501587,
0.30355116724967957,
1.084392786026001,
0... |
def getchanneldata ( self, chid, start _ ms = none, stop _ ms = none ) : channelentities = self. channel _ map. get ( chid ) if not channelentities : return channelentities if start _ ms is not none : channelentities = ( x for x in channelentities if x ['time _ ms'] > = start _ ms ) if stop _ ms is not none : channelen... | [
0.07481895387172699,
-0.9375498294830322,
0.6909634470939636,
-0.7541941404342651,
0.5159305930137634,
0.22034792602062225,
-1.408532738685608,
0.04817238450050354,
-0.11050033569335938,
0.08631610125303268,
0.24572128057479858,
1.2263846397399902,
0.1343633383512497,
0.8516329526901245,
... |
def one _ hot ( inputs, num _ classes ) : pass | [
-0.8983200788497925,
0.08560546487569809,
0.25670263171195984,
1.6374986171722412,
0.7061206102371216,
0.005805749911814928,
0.9276453852653503,
-0.08138586580753326,
1.015083909034729,
-0.45165929198265076,
0.5086455941200256,
0.13134410977363586,
-0.43811842799186707,
0.3793707489967346,... |
def tstrutil _ getnormalizedurl ( * args ) : return _ snap. tstrutil _ getnormalizedurl ( * args ) | [
-0.32411500811576843,
0.2404150664806366,
0.15544146299362183,
0.3961946964263916,
0.007774081081151962,
0.21989697217941284,
0.5157553553581238,
0.4577993154525757,
-0.775930643081665,
-0.9332172870635986,
-0.31362223625183105,
0.2988102436065674,
-0.000931859016418457,
-0.147232413291931... |
def distance _ comparator ( x, y ) : return x. distance < = y. distance | [
0.33234506845474243,
-0.8479960560798645,
0.755225658416748,
-0.5097218751907349,
-0.6832501292228699,
0.9443486332893372,
-1.7076014280319214,
-0.8850534558296204,
-0.12372316420078278,
0.5515023469924927,
0.153036966919899,
0.27555492520332336,
0.6940835118293762,
-0.19343198835849762,
... |
def contexts ( app _ cxt _ rdir ) : label = os. path. basename ( app _ cxt _ rdir ) collection = [ ] for root, dirs, files in os. walk ( app _ cxt _ rdir ) : logger. info ( app _ cxt _ rdir ) for dir _ name in dirs : logger. info ('processing % s ', dir _ name ) xmls = find _ xmls ( os. path. join ( root, dir _ name ) ... | [
0.16830439865589142,
-0.539908766746521,
0.8284424543380737,
0.040948737412691116,
-0.458385169506073,
0.14693278074264526,
0.9262926578521729,
-0.480850487947464,
0.5327537059783936,
-0.404328852891922,
0.45467108488082886,
-0.9101304411888123,
-0.209615558385849,
0.561796247959137,
-0.... |
def delete _ macd ( self, bot _ id ) : if bot _ id : self. macd _ repo. delete ( bot _ id ) else : raise exception ( " no bot _ id found for deleting macd. " ) | [
0.9323201179504395,
0.021753204986453056,
0.19371750950813293,
-0.053121596574783325,
0.13407014310359955,
1.1417168378829956,
-0.8371677994728088,
0.8218322992324829,
0.3434792160987854,
-0.3858374059200287,
0.6152042746543884,
1.289283275604248,
-0.5034977793693542,
0.955504834651947,
... |
def allreduce _ gradients ( self ) : # if we have buffers, simply reduce the data in the buffer. if self. _ grad _ buffers is not none : for _, buffer _ in self. _ grad _ buffers. items ( ) : buffer _. data / = mpu. get _ data _ parallel _ world _ size ( ) torch. distributed. all _ reduce ( buffer _. data, group = mpu.... | [
0.2000500112771988,
0.1624172031879425,
0.9882399439811707,
0.21583116054534912,
0.11577487736940384,
0.21705453097820282,
0.5530155301094055,
0.18133406341075897,
0.0014478267403319478,
0.17255425453186035,
-0.37158042192459106,
0.6945280432701111,
-0.04848914593458176,
1.1142425537109375... |
def handle _ put ( self, request, user, * args, * * kwargs ) : try : self. log. info ('edit script') # user permission if not has _ perm ( user, adminpermission. script _ management, adminpermission. write _ operation ) : self. log. error ( u'user does not have permission to perform the operation.') raise usernotauthor... | [
-0.9571388363838196,
-0.2887474596500397,
0.8021741509437561,
-0.15377745032310486,
-0.17630095779895782,
0.1142268180847168,
0.6701302528381348,
-1.0184288024902344,
0.12390430271625519,
0.4297212064266205,
-0.35404351353645325,
0.5069215297698975,
-0.3177240788936615,
-0.0538318529725074... |
def photometric _ redshift ( argv = none ) : parser = argumentparser ( prog = " clusters _ zphot. py ", usage = " clusters _ zphot. py [ options ] config input ", description = " comput photometric redshift using lephare. ", formatter _ class = argumentdefaultshelpformatter ) parser. add _ argument ('config ', help ='c... | [
0.5606968402862549,
-0.18410953879356384,
0.8763518929481506,
0.38100194931030273,
-0.31944969296455383,
0.3794572353363037,
1.032336950302124,
0.5789106488227844,
-0.8219085335731506,
0.5133854746818542,
-0.08346806466579437,
0.2772442698478699,
-0.2958221435546875,
0.36751043796539307,
... |
def test _ unpack _ ipv4 _ raises _ validation _ error _ with _ ipv4 ( self ) : form = omnimodelformfactory. create ( ) field = omnigenericipaddressfield ( name ='title ', label ='please give us a title ', required = true, widget _ class ='django. forms. widgets. textinput ', order = 0, initial _ data ='192. 168. 1. 1 ... | [
-0.3461986780166626,
0.17276215553283691,
0.4284748435020447,
-0.33181044459342957,
-0.553483784198761,
-0.10444445163011551,
0.13101182878017426,
0.2828403115272522,
0.12362851202487946,
0.32401835918426514,
-0.8821283578872681,
-0.9043889045715332,
-0.5998635292053223,
-0.547986567020416... |
def test _ form _ widgets ( self ) : self. assertin ('django. forms. widgets. fileinput ', omniimagefield. form _ widgets ) | [
0.06107238307595253,
0.009616123512387276,
0.17031343281269073,
0.07131511718034744,
0.5212316513061523,
0.46217745542526245,
0.005495588760823011,
0.8608733415603638,
0.09794998168945312,
-0.8717747926712036,
-0.800171434879303,
-0.5194278955459595,
-0.22169481217861176,
1.171966791152954... |
def test _ atomic _ qname _ white _ space _ nistxml _ sv _ iv _ atomic _ qname _ white _ space _ 1 _ 3 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / qname / schema + instance / nistschema - sv - iv - atomic - qname - whitespace - 1. xsd ", instance = " nistdata / atomic /... | [
-0.38092389702796936,
-0.05866922810673714,
0.4765014350414276,
-0.2266279011964798,
-0.1383509337902069,
0.4360796809196472,
-0.035493358969688416,
-0.8681230545043945,
0.9862141609191895,
0.5352541208267212,
0.1289125382900238,
-0.051172394305467606,
-0.23085924983024597,
0.4225694835186... |
def compute _ winner ( player1, player2 ) : s1 = strength [ player1 ] s2 = strength [ player2 ] if random. random ( ) < s1 / ( s1 + s2 ) : return player1 else : return player2 | [
0.06242535635828972,
-0.5746514797210693,
0.7459912300109863,
0.7962228059768677,
-0.829285204410553,
0.3839268088340759,
-0.06856407225131989,
-0.032407138496637344,
-0.060323283076286316,
0.5902256965637207,
0.30856987833976746,
0.17263536155223846,
-0.6893139481544495,
-0.75682842731475... |
def _ update _ package _ references ( self, package, imported _ package, package _ import ) : # update import reference but not for itself package _ import. package _ reference = imported _ package do _ import = false if package _ import. namespace : # import only the specified namespace if not package _ import. namesp... | [
-0.37255731225013733,
-0.16187654435634613,
0.8757290840148926,
-0.205424964427948,
0.020602349191904068,
0.4029684364795685,
0.6123232245445251,
-0.9009127616882324,
0.08992043137550354,
0.5972723960876465,
-0.26078879833221436,
0.22465670108795166,
-0.5260984301567078,
0.914517879486084,... |
def perform _ simple _ demonstration ( client _ id : str, client _ secret : str ) : falcon = hosts ( client _ id = client _ id, client _ secret = client _ secret ) # retrieve 500 hosts and sort ascending by hostname aid _ lookup = falcon. query _ devices _ by _ filter _ scroll ( sort = " hostname. asc ", limit = 500 ) ... | [
0.21904867887496948,
0.49933525919914246,
0.7593728303909302,
0.44964689016342163,
0.4551115930080414,
0.04474594444036484,
0.7022092342376709,
0.24456971883773804,
-0.5330400466918945,
-0.09696654975414276,
0.25435417890548706,
0.6017475128173828,
0.54148930311203,
0.6977204084396362,
0... |
def fold ( self, name, value ) : raise notimplementederror | [
-0.35630470514297485,
-0.1812921166419983,
0.5361400246620178,
0.007287276908755302,
-1.7144745588302612,
0.6656833291053772,
-0.20475704967975616,
0.043554048985242844,
-0.10905347764492035,
0.5053310990333557,
-0.05318044126033783,
-0.11332204937934875,
0.4952128231525421,
0.567626297473... |
def swapi ( * args ) : return _ snap. tintv _ swapi ( * args ) | [
-1.3339401483535767,
-0.11962355673313141,
0.2492382824420929,
1.1768494844436646,
-0.28199058771133423,
0.5993064641952515,
0.14377446472644806,
0.4261203408241272,
-0.8358413577079773,
-0.1654903143644333,
-1.6603771448135376,
-0.4081399440765381,
-0.8833152651786804,
0.10347384214401245... |
def perform ( self, drivers ) : self. publish ('acs _ user _ ids _ extracted ', filter ( none, [ d. user. acs _ id for d in drivers ] ) ) | [
-0.3512633442878723,
-0.3322790861129761,
0.0661008432507515,
0.1406732201576233,
0.482474684715271,
-0.7653055191040039,
-0.10853305459022522,
0.1982821822166443,
0.32513654232025146,
0.25226029753685,
0.41565820574760437,
0.3871200382709503,
-0.4930039346218109,
-0.21376635134220123,
0... |
def _ load _ model _ weights ( self ) : logger. info ('loading pre - trained model weights') if self. model _ path. endswith ( ". npy " ) : logger. debug ( " load the pre - trained model from npy file " ) if os. path. isfile ( self. model _ path ) is false : # extract model folder by removing model file name from the e... | [
0.5246917009353638,
0.3176194429397583,
0.7306761145591736,
0.36942481994628906,
0.27036356925964355,
0.6468914151191711,
0.2760813534259796,
-0.3338331878185272,
-0.0989813432097435,
0.5338993072509766,
-0.5451449751853943,
-0.26072245836257935,
-0.08110221475362778,
0.6657529473304749,
... |
def reverse ( self, * args ) : return _ snap. tintintvv _ reverse ( self, * args ) | [
-1.3393956422805786,
0.5865375995635986,
0.3910863697528839,
0.781473696231842,
0.8396990299224854,
0.3267657458782196,
0.32785141468048096,
0.4136003255844116,
-1.2175917625427246,
-0.19646988809108734,
-0.14025090634822845,
0.8582981824874878,
-1.8788907527923584,
-0.4229253828525543,
... |
def testsrun ( self ) : return sum ( map ( len, ( self. errors, self. failures, self. unexpectedsuccesses, self. expectedfailures, self. successes, self. skipped ) ) ) | [
-0.30487585067749023,
0.09908899664878845,
0.45418256521224976,
-0.9099317789077759,
0.7816864848136902,
0.7668387293815613,
0.3577200770378113,
0.3150862157344818,
0.031103400513529778,
-0.9672685861587524,
-0.9275377988815308,
-0.08276212215423584,
-0.5823432207107544,
0.1094991639256477... |
def stop ( self ) : lh = self. _ loop _ implem if lh is not none : lh. stop ( ) | [
0.022556502372026443,
-0.2680441737174988,
0.28472134470939636,
-0.4557715058326721,
0.4360627830028534,
1.377840280532837,
0.48517635464668274,
0.28580912947654724,
-0.6100699305534363,
0.05030353367328644,
-0.14006805419921875,
0.4177471399307251,
-1.1407653093338013,
0.9726400971412659,... |
def build _ net ( self, rate = 0. 2, cycles = 1000 ) : # run the algorithm over the entire data set many times for cycle in range ( cycles ) : # for each row in the data, iterate over each layer for r in range ( self. data. shape [ 0 ] ) : # feed forward through each layer for i, layer in enumerate ( self. layers ) : #... | [
-0.04820412024855614,
0.2543441355228424,
0.8228180408477783,
-0.44143274426460266,
0.10609249770641327,
-0.7491317391395569,
1.158957600593567,
-0.22321975231170654,
-0.5368667244911194,
0.2634422779083252,
0.5628155469894409,
0.7183091044425964,
0.1110222339630127,
-0.10910744965076447,
... |
def prepare _ page ( takes _ context = false ) : def wrap ( page ) : @ functools. wraps ( page ) def inner ( ) : ctx = {'mountpoint': url _ for ('page _ post'),'hostname': socket. gethostname ( ), } # do we have connection data? try : connection _ info = config. parse _ config ( config _ path ) except exceptions. nocon... | [
-0.33122071623802185,
-0.022042889147996902,
0.7315866947174072,
-0.03309911489486694,
-0.31059372425079346,
-0.21130360662937164,
-0.4086005985736847,
0.3014812469482422,
0.1960204541683197,
0.3146641254425049,
0.6792234778404236,
-0.9244608879089355,
0.009578348137438297,
0.0133669981732... |
def _ _ init _ _ ( self, name, config ) : # call base class constructors. model. _ _ init _ _ ( self, name, sentenceembeddings, config ) wordmappings. _ _ init _ _ ( self, name, sentenceembeddings, config ) # set key mappings. self. key _ inputs = self. stream _ keys [ " inputs " ] self. key _ outputs = self. stream _ ... | [
0.3023300766944885,
0.4349786043167114,
0.6684778332710266,
0.32410162687301636,
-0.5245894193649292,
0.18117770552635193,
0.817733883857727,
-0.15438345074653625,
-0.1322541981935501,
0.052368536591529846,
-0.8500469326972961,
-0.32680219411849976,
0.12123224139213562,
0.8971890211105347,... |
def find _ coords ( user _ year : int, user _ coords : tuple ) - > list : datalist = read _ file ( ) coords _ list = [ ] geolocator = nominatim ( user _ agent = " film _ map " ) for data in datalist : if data [ 0 ] = = user _ year : try : location = geolocator. geocode ( data [ - 1 ] ) coords = ( location. latitude, lo... | [
-0.4175448417663574,
-0.6529784798622131,
0.6678490042686462,
-0.11005353927612305,
0.4766727387905121,
0.3493376076221466,
-0.04488891735672951,
0.6524235010147095,
0.04525811970233917,
0.6155514717102051,
-0.5246373414993286,
-0.39820176362991333,
0.17666572332382202,
0.11973118036985397... |
def _ _ isub _ _ ( self, obj ) : # calls _ _ sub _ _ tmp = self - obj self. data = tmp. data return self | [
-0.7268862128257751,
-0.3238016664981842,
0.7859770059585571,
0.12035457789897919,
-0.8120036125183105,
1.1540178060531616,
0.7142614722251892,
-0.17251479625701904,
0.9523327350616455,
-0.6348564624786377,
-1.4544744491577148,
1.0435922145843506,
-0.1543375849723816,
-0.6071788668632507,
... |
def raw _ search ( self, query = none ) : # update query # if query is none : # query = self. query if query is not none : self. query = query req _ body = { " query " : { " multi _ match " : { " query " : self. query, " fields " : [ " content ", " title ", " author " ], " fuzziness " : " auto ", } }, " sort " : { " _ ... | [
-1.1691268682479858,
0.03338068351149559,
0.992200493812561,
-0.3983684778213501,
-0.5866361856460571,
-0.18888676166534424,
-0.6024947166442871,
-0.19066739082336426,
-0.04691242054104805,
-0.5381642580032349,
0.2269209921360016,
0.21473754942417145,
0.2580103874206543,
-0.013311215676367... |
def news _ clean ( cls, document, cleaner = none ) : if cleaner is none : cleaner = newscleaner ( ) return cls. lxml _ clean ( document, cleaner ) | [
-0.07290051132440567,
-0.11068537086248398,
0.026224782690405846,
1.0498018264770508,
-1.3330327272415161,
0.1409493386745453,
-0.8893234729766846,
0.15390820801258087,
-0.19037386775016785,
-0.8781736493110657,
-0.2757967412471771,
-0.3478194773197174,
-0.38076597452163696,
1.277855753898... |
def test _ place _ sell _ order _ not _ enough _ shares ( self ) : # first buy 20 shares trader = self. login _ user ( username = usera. get ('username') ). profile d = self. place _ order ( self. test _ stock _ a, 20,'buy ', trader ) self. assertequal ( d. get ('resp'). status _ code, http _ 201 _ created ) # try to s... | [
-0.18979699909687042,
0.1359872967004776,
0.6406907439231873,
-0.25258490443229675,
0.779228150844574,
0.23811450600624084,
-0.02604120783507824,
-0.853959321975708,
0.5822191834449768,
-0.7833172678947449,
-0.13566073775291443,
0.2249552607536316,
0.2276081144809723,
0.10812659561634064,
... |
def set _ task _ file ( task _ file ) : app. config [ con. config _ yaml ] = task _ file | [
0.8676527142524719,
-0.4297264516353607,
0.48551154136657715,
0.9478241801261902,
0.5448498725891113,
0.9245979189872742,
0.7622100114822388,
1.5376983880996704,
-1.8284666538238525,
0.9726012349128723,
-1.0337799787521362,
-0.3008771240711212,
1.4415522813796997,
1.0772311687469482,
0.3... |
def draw _ box _ vertical ( x = 1, y = 1, width = 1, height = 24, fore _ colour = 39, back _ colour = 49 ) : # call check for valid colours and force correction if required fore _ colour, back _ colour = colour _ check ( fore _ colour, back _ colour ) # set foreground and background colours and turn on line drawing pri... | [
0.01158216968178749,
0.20494364202022552,
0.6888913512229919,
-0.3688657879829407,
0.3335816562175751,
-0.4764968156814575,
-0.7049087285995483,
-0.7915127873420715,
-0.7128846049308777,
-0.047795504331588745,
-0.4455626308917999,
0.5679821968078613,
-0.10084031522274017,
0.107809707522392... |
def pixelization _ tag ( self ) - > str : return ( f " _ _ { conf. instance ['notation'] ['setup _ tags'] ['inversion'] ['pixelization'] } _ " f " { conf. instance ['notation'] ['prior _ model _ tags'] ['pixelization'] [ self. _ pixelization _ prior _ model. name ] } " ) | [
-0.005558311473578215,
-0.07610387355089188,
0.496404230594635,
-0.4672926068305969,
0.3855539858341217,
0.12929187715053558,
0.11733213067054749,
-0.23254987597465515,
-0.760498046875,
0.849486231803894,
-0.5710794925689697,
0.004681664053350687,
0.07265099883079529,
1.0874357223510742,
... |
def loadedgelist _ pneanet ( * args ) : return _ snap. loadedgelist _ pneanet ( * args ) | [
-1.6265860795974731,
0.7117094397544861,
0.3287544846534729,
-0.011134004220366478,
-0.15429946780204773,
0.37058448791503906,
-1.2572792768478394,
-0.39237460494041443,
-0.23251350224018097,
-0.4830128848552704,
-1.1466786861419678,
-0.8919532299041748,
-0.7807267308235168,
1.007704854011... |
def slownik _ kolorow ( znak ) : kom = znak kolor = 0 if kom = = " 0 " : # cell kolor = ( 255, 255, 255 ) # = bialy elif kom = = " 1 " : # cell _ dead kolor = ( 0, 0, 0 ) # = czarny return kolor | [
-0.2726139426231384,
-0.65789794921875,
0.5199328660964966,
-0.1805122196674347,
-0.17864394187927246,
-0.7452942132949829,
0.5172199010848999,
-0.4677485525608063,
-0.006657892372459173,
0.39124059677124023,
-0.45254868268966675,
-0.8528475761413574,
-0.3087102770805359,
0.822017312049865... |
def polyval ( coeffs, x, name = none ) : if not isinstance ( coeffs, list ) : raise valueerror ( f " argument coeffs must be list type. received type { type ( coeffs ) }. " ) with ops. name _ scope ( name, " polyval ", nest. flatten ( coeffs ) + [ x ] ) as name : x = ops. convert _ to _ tensor ( x, name = " x " ) if le... | [
-0.6097641587257385,
-0.24228569865226746,
0.8194675445556641,
0.22475002706050873,
-0.3356001675128937,
0.18272896111011505,
-0.7624399065971375,
-0.3286823630332947,
0.9463698863983154,
0.3938286304473877,
-1.0323842763900757,
0.574254035949707,
0.19447319209575653,
-1.4749386310577393,
... |
def visit _ num ( self, node ) : func = _ integer if isinstance ( node. n, float ) : func = _ float return ast. copy _ location ( ast. call ( func = func, args = [ ast. str ( str ( node. n ) ) ], keywords = [ ], starargs = none, kwargs = none, ), node ) | [
-0.6470829844474792,
0.8590336441993713,
0.6250208616256714,
-0.2521332800388336,
-1.3380624055862427,
-1.1080552339553833,
0.43323200941085815,
-0.08131585270166397,
0.14030760526657104,
0.009138024412095547,
0.5020989179611206,
1.003981113433838,
0.9666369557380676,
0.30550268292427063,
... |
def generate _ nglview _ object ( traj : md. trajectory, tautomer _ transformation : dict ) - > nglview. nglwidget : view = nglview. show _ mdtraj ( traj ) if'donor _ hydrogen _ idx'in tautomer _ transformation : # clear all representations to try new ones print ('hydrogen in green is real at lambda : 0.') print ('hydr... | [
-0.42728108167648315,
0.4458578824996948,
0.1859406977891922,
-0.9997553825378418,
-0.7845041155815125,
-0.013751426711678505,
-0.22531698644161224,
-0.0054085333831608295,
-0.34685760736465454,
0.029793940484523773,
0.3174503445625305,
-0.3499538004398346,
0.930444061756134,
0.22283864021... |
def order ( self, * args ) : return _ snap. ttable _ order ( self, * args ) | [
-1.9359005689620972,
0.7881059050559998,
0.356317937374115,
0.7158552408218384,
0.7338735461235046,
0.47075286507606506,
0.46659332513809204,
-0.32245510816574097,
-1.0884222984313965,
-0.09230228513479233,
-0.7186532020568848,
-1.695227026939392,
-0.03172316774725914,
0.5984798669815063,
... |
def draw _ header ( self ) : self. lcd _ display. draw. rectangle ( ( 0, 0, self. lcd _ display. width, self. font _ size + 6 ), outline = constants. black, fill = constants. white, ) # get ip address ip = " ip : " + get _ ip _ address ( ) self. lcd _ display. draw. text ( ( 0, 2 ), ip, font = self. font, fill = consta... | [
0.04595499113202095,
0.05452240630984306,
0.85899817943573,
-0.9530295133590698,
-0.34616154432296753,
0.6821412444114685,
-0.15537430346012115,
0.39061105251312256,
0.15052856504917145,
-0.16007715463638306,
-0.10511569678783417,
0.6202806830406189,
-0.4066298305988312,
-0.120306700468063... |
def test _ rate _ article _ authenticated ( self ) : data _ string, status _ code = self. rate ( ) self. assertin ('ratings ', data _ string ) self. assertequal ( 201, status _ code ) self. assertin ('user ', data _ string ) self. assertin ('stars ', data _ string ) data _ string, status _ code = self. rate ( stars = 4... | [
-0.4357137978076935,
0.5445303916931152,
0.4609166979789734,
-0.15913721919059753,
0.31830769777297974,
0.6594506502151489,
-0.6765447854995728,
-0.18865065276622772,
0.034622568637132645,
-0.0798545554280281,
-0.2533285915851593,
0.08891692012548447,
-0.8383530974388123,
-0.42577242851257... |
def test _ repeated _ wrapping _ multiple _ origin ( self ) : a = np. arange ( 4 ). reshape ( 2, 2 ) a = np. pad ( a, [ ( 1, 3 ), ( 3, 1 ) ], mode ='wrap') b = np. array ( [ [ 3, 2, 3, 2, 3, 2 ], [ 1, 0, 1, 0, 1, 0 ], [ 3, 2, 3, 2, 3, 2 ], [ 1, 0, 1, 0, 1, 0 ], [ 3, 2, 3, 2, 3, 2 ], [ 1, 0, 1, 0, 1, 0 ] ] ) assert _ ar... | [
-0.838529109954834,
-0.27430975437164307,
0.816412091255188,
0.2726774215698242,
0.3150477111339569,
1.0380942821502686,
0.2871096730232239,
0.03298129141330719,
0.43145129084587097,
0.3621322810649872,
-0.5811077952384949,
0.05300392210483551,
0.3799971044063568,
-0.08741017431020737,
0... |
def strobe _ infinite _ plane ( model _ obj, n _ tracks, dz = 0. 7, loc _ error = 0. 0, exclude _ outside = true, n _ gaps = 0, return _ dataframe = true ) : hz = dz / 2. 0 # simulate some 3d trajectories tracks = model _ obj ( n _ tracks ) # add a random starting position in z tracks [ :, :, 0 ] = ( tracks [ :, :, 0 ]... | [
0.2932630479335785,
0.5029857158660889,
0.8936848640441895,
-0.10385500639677048,
-0.5975881814956665,
0.18841606378555298,
-0.37980031967163086,
-0.30365681648254395,
-0.24393528699874878,
0.11237112432718277,
0.08740006387233734,
-0.33434149622917175,
-0.4208972454071045,
-0.114446938037... |
def tffggen _ genffgraphs ( * args ) : return _ snap. tffggen _ genffgraphs ( * args ) | [
-0.9193840622901917,
1.321358323097229,
0.28675317764282227,
0.5150700807571411,
-0.1639590859413147,
0.14299413561820984,
0.4448348879814148,
-0.021715175360441208,
-1.2021422386169434,
0.26278263330459595,
-1.4333887100219727,
-0.5904080867767334,
-0.4735168218612671,
1.4198600053787231,... |
def gen _ sentence ( num _ words : int = 7 ) - > str : words = ( gen _ word ( ) for _ in range ( num _ words ) ) return''. join ( words ). capitalize ( ) | [
0.6475610136985779,
0.3029596209526062,
0.4131924510002136,
0.6752365827560425,
0.08179285377264023,
-0.675537109375,
-0.8275424838066101,
0.18876294791698456,
-0.541748583316803,
1.1400482654571533,
0.18610221147537231,
-0.7548378109931946,
-0.6858393549919128,
0.32191672921180725,
-1.1... |
def state ( self ) : return self. var _ state | [
0.3675340712070465,
-1.102053165435791,
0.3081754744052887,
-0.4171265661716461,
-0.42017611861228943,
0.3667289912700653,
0.8333053588867188,
-0.37891992926597595,
0.34640416502952576,
-0.7907800078392029,
-0.32189062237739563,
0.6738591194152832,
-0.3884100615978241,
0.01989840529859066,... |
def test _ decorators _ incorrect ( assert _ errors, assert _ error _ text, parse _ ast _ tree, code, options, mode, ) : tree = parse _ ast _ tree ( mode ( code ) ) option _ values = options ( max _ decorators = 2 ) visitor = modulemembersvisitor ( option _ values, tree = tree ) visitor. run ( ) assert _ errors ( visit... | [
-0.7724863886833191,
0.8567925095558167,
0.3114566504955292,
0.015198297798633575,
0.5986530184745789,
-0.04895174130797386,
0.22044777870178223,
0.6132951378822327,
0.38249385356903076,
0.21686825156211853,
-0.2371777594089508,
0.5988219976425171,
0.22352728247642517,
0.7823547720909119,
... |
def isnbrnid ( self, * args ) : return _ snap. tneanetmpnodei _ isnbrnid ( self, * args ) | [
-0.008994268253445625,
0.3376694917678833,
0.34457337856292725,
-0.4203070402145386,
0.7091391086578369,
0.21069014072418213,
-0.8096333146095276,
-0.18103183805942535,
-0.5375341773033142,
0.3199264407157898,
-0.162885844707489,
0.050190553069114685,
-0.9525852203369141,
1.376038551330566... |
async def async _ setup _ entry ( hass, entry ) : config = hass. data [ domain ]. pop ( " config " ) # keep track of wemo device subscriptions for push updates registry = hass. data [ domain ] [ " registry " ] = pywemo. subscriptionregistry ( ) await hass. async _ add _ executor _ job ( registry. start ) def stop _ wem... | [
0.4514240622520447,
0.4470759332180023,
0.7680626511573792,
-0.18784470856189728,
0.9597452282905579,
-0.956641435623169,
0.37120744585990906,
-0.18711404502391815,
0.6127618551254272,
0.1726895421743393,
-0.11126961559057236,
0.43112868070602417,
0.49380770325660706,
0.8916869163513184,
... |
def safe _ add _ utterances ( utts ) : global corpus if corpus is none : corpus = corpus ( utterances = utts ) else : corpus = corpus. add _ utterances ( utts ) | [
-0.2978423833847046,
0.8649022579193115,
0.6212207078933716,
-0.13484340906143188,
0.929050862789154,
0.38928577303886414,
-0.7579141855239868,
0.6773203611373901,
0.8501912355422974,
-0.09204140305519104,
0.35719501972198486,
-0.1626315712928772,
-0.6793585419654846,
0.5722248554229736,
... |
def _ _ init _ _ ( self, key _ pair : blskeypair, signature : bytes, messages : list [ str ] ) - > none : self. key _ pair = key _ pair self. signature = signature self. messages = messages | [
1.1799901723861694,
0.03466678038239479,
0.3518541753292084,
0.7262747287750244,
-0.4900766909122467,
-0.40422043204307556,
-0.7932481169700623,
0.22344611585140228,
-0.3640713691711426,
0.266507089138031,
-0.4812355935573578,
-0.11152917146682739,
-0.46126601099967957,
0.6546463966369629,... |
def endnastri ( self, * args ) : return _ snap. tneanetmp _ endnastri ( self, * args ) | [
0.4352787733078003,
0.19262833893299103,
0.11399516463279724,
-0.6743316054344177,
1.1284410953521729,
-0.04492977261543274,
-0.31181150674819946,
-0.2943057119846344,
-0.40860533714294434,
0.2755120098590851,
-0.977471113204956,
-0.840156078338623,
-0.3072594106197357,
1.0639699697494507,... |
def is _ piece ( char ) : return {'1': true,'2': true,'3': true,'4': true,'5': true,'6': true,'7': true,'8': true, }. get ( char, false ) | [
-0.8046892285346985,
0.111229807138443,
0.5459365844726562,
0.0009892618982121348,
-0.6622160077095032,
-0.47040891647338867,
0.10025974363088608,
0.01810496859252453,
0.17781421542167664,
1.0950933694839478,
-1.6868915557861328,
0.2012074738740921,
-0.7510323524475098,
-0.0386255271732807... |
def validate _ ip _ type ( ip _ type ) : if ip _ type not in ('4 ','6') : raise validationerror ( " error : plase provide a valid ip type. " ) | [
-0.5748822689056396,
0.22730380296707153,
0.4772113263607025,
0.8326700329780579,
-0.5920214653015137,
0.8084100484848022,
-0.018289584666490555,
-0.004477860871702433,
-0.19784018397331238,
0.30893221497535706,
0.30979108810424805,
-1.5893248319625854,
-0.376703143119812,
-0.3270682990550... |
def make _ rms ( data, weight, sky _ levl = 0., wtmin = 1. e - 3 ) : rms = zeros ( data. shape, dtype ='float32') h = weight > wtmin rms [ h ] = sqrt ( ( 1 + data [ h ]. clip ( 0 ) / sky _ levl ) / weight [ h ] ) return rms | [
0.2003852277994156,
0.2237539142370224,
0.3210889399051666,
-0.8528958559036255,
-0.3297906816005707,
0.19926594197750092,
-1.0341821908950806,
-0.16746792197227478,
0.22885867953300476,
0.36926963925361633,
0.04512812942266464,
0.6217193603515625,
-0.16457049548625946,
0.8414844274520874,... |
def warpedimage ( img, pfile ) : undist = undistortimage ( img, pfile ['mtx'], pfile ['dist'] ) return cv2. warpperspective ( undist, pfile ['m'], ( img. shape [ 1 ], img. shape [ 0 ] ) ) | [
-0.07277195155620575,
-0.17477956414222717,
0.5026560425758362,
-0.41474077105522156,
-0.7475243210792542,
0.923464298248291,
-0.5741859078407288,
1.300535798072815,
-0.07124790549278259,
0.5478991866111755,
1.3894538879394531,
-0.05404245853424072,
-0.08979713916778564,
-0.648873090744018... |
def get _ group ( groupname = none, userpoolid = none ) : pass | [
-0.4511100947856903,
0.878173291683197,
-0.09754809737205505,
0.860162079334259,
0.23611126840114594,
-0.8489875793457031,
0.27830252051353455,
-0.7067263722419739,
-0.4991416335105896,
-0.17257973551750183,
0.28615710139274597,
1.6971988677978516,
-1.211217999458313,
-0.2749160826206207,
... |
def is _ available ( ) : global _ available # make sure to call _ load _ seccomp ( ) exactly once. with _ load _ lock : if _ available is none : _ available = _ load _ seccomp ( ) return _ available | [
-0.2984010875225067,
-0.3624122738838196,
0.6168286204338074,
0.6039689779281616,
0.02156362682580948,
0.0021729515865445137,
0.6177110075950623,
-0.5792516469955444,
-0.013251382857561111,
0.2376437485218048,
-0.45064905285835266,
-0.09365546703338623,
-0.40622061491012573,
0.143712058663... |
def panbrailletooffset ( offset ) : braille. pantooffset ( offset ) | [
-0.37122541666030884,
-1.1417725086212158,
0.34779489040374756,
-0.6989503502845764,
-0.799423098564148,
1.7308698892593384,
0.13433513045310974,
0.37843841314315796,
-0.2525763213634491,
0.43491071462631226,
-0.9481964111328125,
0.7004624605178833,
-0.3793981075286865,
-0.527692973613739,... |
def serialize ( self ) : return {'id': self. id,'timestamp': dump _ datetime ( self. timestamp ),'type': self. type,'module': self. module,'action': self. action,'message': self. message, } | [
-0.7731315493583679,
-1.153132438659668,
0.648353099822998,
-0.8518548011779785,
-0.013840367086231709,
-0.16740381717681885,
-0.4010261595249176,
-0.8418140411376953,
0.663891613483429,
0.20486418902873993,
-1.018097162246704,
0.7665795683860779,
-0.6695383787155151,
0.7762659788131714,
... |
def setup _ losses ( self ) : pass | [
-0.17822667956352234,
-0.77248615026474,
0.29743775725364685,
-0.2857106328010559,
0.6808256506919861,
0.4435442388057709,
0.5127866268157959,
-0.5171855688095093,
0.6465131640434265,
-0.44401639699935913,
0.19847021996974945,
-0.015292193740606308,
0.38632047176361084,
0.9262822270393372,... |
def _ _ init _ _ ( self, children : typing. sequence [ contentdecoder ] ) - > none : # note that we reverse the order for decoding. self. children = list ( reversed ( children ) ) | [
-0.738097608089447,
0.017169764265418053,
0.17149657011032104,
0.29206210374832153,
0.044252824038267136,
-0.6825583577156067,
-0.3145189583301544,
0.03215759992599487,
-0.6145169734954834,
-0.7254028916358948,
-1.4218107461929321,
-0.056310731917619705,
-0.17813913524150848,
0.66272521018... |
def _ _ init _ _ ( self, * args ) : _ snap. tcncom _ swiginit ( self, _ snap. new _ tcncom ( * args ) ) | [
0.5874612331390381,
0.794964075088501,
-0.0654890239238739,
0.086032435297966,
1.191306471824646,
-0.8758606910705566,
1.1658285856246948,
1.262160301208496,
-0.44323796033859253,
-0.16898375749588013,
-1.5202968120574951,
-0.8588365316390991,
0.41532817482948303,
0.4027581810951233,
0.5... |
def bubble _ down ( self, i ) : while i * 2 < self. current _ size : min _ child _ index = self. find _ min _ child _ index ( i ) if self. heaplist [ i ] > self. heaplist [ min _ child _ index ] : temp = self. heaplist [ i ] self. heaplist [ i ] = self. heaplist [ min _ child _ index ] self. heaplist [ min _ child _ in... | [
-0.35149264335632324,
-0.5540897846221924,
0.7724620699882507,
0.1559474617242813,
-0.4646913707256317,
0.859516978263855,
0.9823663830757141,
-0.18004828691482544,
-0.027876706793904305,
-0.3624509572982788,
-1.3199141025543213,
0.19201290607452393,
-1.1857916116714478,
0.341163694858551,... |
def scale ( self, scale ) : self. scale = scale | [
-0.12073853611946106,
-0.3906049132347107,
0.39331796765327454,
-0.06071123108267784,
0.22219422459602356,
0.805370569229126,
-0.5922136306762695,
0.13634738326072693,
-0.6035029888153076,
0.5416926741600037,
-0.700371503829956,
-0.8717230558395386,
-0.5186846852302551,
0.9523438811302185,... |
def searchvforw ( self, * args ) : return _ snap. tfltv _ searchvforw ( self, * args ) | [
-0.3009607791900635,
0.8328335285186768,
0.2725794315338135,
0.0475015863776207,
0.39414843916893005,
-0.4171377718448639,
0.2945287823677063,
-0.18001452088356018,
-0.8227968215942383,
-0.5362401008605957,
0.4401976764202118,
-0.8965193629264832,
0.45532965660095215,
1.5139662027359009,
... |
def get _ waypoint ( self, location ) : if rospy. is _ shutdown ( ) : return none try : response = self. _ get _ waypoint _ client ( location ) return response. waypoint except ( rospy. serviceexception, rospy. rosinterruptexception ) as e : if not rospy. is _ shutdown ( ) : rospy. logwarn ( " service call'get _ waypoi... | [
-0.25425058603286743,
-0.4025627076625824,
0.4654639661312103,
0.30649086833000183,
0.18914365768432617,
-0.3659400939941406,
-0.16323821246623993,
-1.1556867361068726,
1.0766311883926392,
0.5016853213310242,
0.401714026927948,
0.8105417490005493,
-0.843317985534668,
-0.512530505657196,
... |
def itksubtractconstantfromimagefilteriul2diul2 _ superclass _ cast ( * args ) : return _ itksubtractconstantfromimagefilterpython. itksubtractconstantfromimagefilteriul2diul2 _ superclass _ cast ( * args ) | [
0.2345184087753296,
0.07445070147514343,
0.45644915103912354,
-0.505125880241394,
-1.6075807809829712,
0.4430932104587555,
-0.1641843020915985,
1.1223564147949219,
0.1270986646413803,
-0.9960889220237732,
-0.8383037447929382,
0.977281391620636,
0.9251919388771057,
-0.4089632034301758,
0.... |
def provide _ file ( self, bucket _ name : str = provide _ bucket, object _ name : str | none = none, object _ url : str | none = none, dir : str | none = none, user _ project : str | none = none, ) - > generator [ io [ bytes ], none, none ] : if object _ name is none : raise valueerror ( " object name can not be empty... | [
0.09304264932870865,
-0.2817945182323456,
0.7904178500175476,
0.21712155640125275,
-0.561246395111084,
0.5309557914733887,
0.43900319933891296,
-0.2358018159866333,
-0.11474527418613434,
-0.20180296897888184,
-0.5948688983917236,
-0.17179593443870544,
0.8474335074424744,
-0.098193943500518... |
def bind ( s, to ) : ret = libc. bind ( s. fileno ( ), to. cpointer ( ), len ( to ) ) mayberaisesocketerror ( ret ) return ret | [
0.33519288897514343,
-0.07146364450454712,
0.3987099826335907,
-0.8064751029014587,
-0.7172884345054626,
-0.8188400268554688,
-0.14302390813827515,
-0.6402139663696289,
0.0038803962524980307,
-0.7490630149841309,
-0.2725464701652527,
1.1681839227676392,
-0.799365758895874,
-0.8416058421134... |
def symulacja ( tupele, ile _ gen, parametry ) : licznik = 0 sasiedzi = [ ( 1, 1 ), ( 1, 0 ), ( 1, - 1 ), ( 0, 1 ), ( 0, - 1 ), ( - 1, 1 ), ( - 1, 0 ), ( - 1, - 1 ) ] wszystkie _ gen = [ tupele ] wszystkie _ koordynaty = [ ] for x in range ( 100 ) : for y in range ( 100 ) : wszystkie _ koordynaty. append ( ( x, y ) ) w... | [
-1.072884440422058,
0.05084801837801933,
0.5335745811462402,
-0.5796326398849487,
-0.17993134260177612,
-0.1859186887741089,
1.0328643321990967,
-0.6319136619567871,
-0.7769884467124939,
0.18199926614761353,
0.03811395540833473,
-0.21859323978424072,
0.6727901101112366,
0.5998974442481995,... |
def conv3x3 ( in _ planes, out _ planes, stride = 1, groups = 1 ) : return nn. conv2d ( in _ planes, out _ planes, kernel _ size = 3, stride = stride, padding = 1, groups = groups, bias = false ) | [
0.6984759569168091,
0.19828259944915771,
0.34056565165519714,
0.18062281608581543,
-1.32789945602417,
1.1205888986587524,
-1.1059787273406982,
-0.09661972522735596,
-0.5657833814620972,
0.585921585559845,
0.05168311670422554,
0.0546284094452858,
-0.30285531282424927,
-1.4895477294921875,
... |
def _ accumulate _ n _ grad ( op, grad ) : # not broadcasting. return [ grad ] * len ( op. inputs ) | [
-0.5885269641876221,
0.9361444115638733,
0.4841177761554718,
-0.027454715222120285,
0.15938512980937958,
-0.2705887258052826,
0.4926280379295349,
-0.7308090925216675,
-0.17523302137851715,
0.8243958353996277,
-0.3182132840156555,
0.16104906797409058,
0.4646061360836029,
0.5487887859344482,... |
def id ( self ) : return self. config. get ('key'). lower ( ) | [
0.3254975378513336,
-0.6818366050720215,
0.3903224468231201,
-0.08592623472213745,
0.5064142346382141,
1.3118208646774292,
-0.5123820304870605,
-0.2807779014110565,
0.48621800541877747,
1.1388132572174072,
-0.2131151705980301,
0.026427913457155228,
-1.44687819480896,
0.08376185595989227,
... |
def inference _ qpbo ( unary _ potentials, pairwise _ potentials, edges, * * kwargs ) : from pyqpbo import alpha _ expansion _ general _ graph shape _ org = unary _ potentials. shape [ : - 1 ] n _ states, pairwise _ potentials = \ _ validate _ params ( unary _ potentials, pairwise _ potentials, edges ) unary _ potentia... | [
-0.14606285095214844,
0.5586581230163574,
0.8954693078994751,
-0.13767647743225098,
-0.42969149351119995,
0.23405516147613525,
-0.2376287430524826,
0.28783804178237915,
0.7266806364059448,
-0.11863519251346588,
0.4821343719959259,
-0.22452829778194427,
-0.5428860783576965,
-0.5182734131813... |
def test _ edit _ specimen _ taxonomy _ species _ anon ( self ) : with app. test _ client ( ) as client : resp = client. post ( " / specimen / 12 / edit _ taxonomy ", data = { " species " : " notquercus rubra " } ) specimen = specimen. query. get ( 12 ) self. assertequal ( specimen. taxonomy. species, " quercus rubra "... | [
-0.2718813419342041,
-0.27663654088974,
0.2105865776538849,
0.019341904670000076,
0.14349457621574402,
0.6010005474090576,
-0.26351258158683777,
-0.038727059960365295,
0.018419576808810234,
0.18819330632686615,
-0.5682908892631531,
1.4275609254837036,
-0.3342057764530182,
-0.16397665441036... |
def delnodes _ pngraph ( * args ) : return _ snap. delnodes _ pngraph ( * args ) | [
-1.0691334009170532,
1.5895988941192627,
0.01876974105834961,
-0.3436998426914215,
-0.6926459670066833,
0.3682605028152466,
0.26800206303596497,
-0.47568976879119873,
0.10343708842992783,
0.0384957455098629,
-0.40740731358528137,
0.44111737608909607,
-0.5295754671096802,
-0.034956302493810... |
def login _ required ( func ) : @ wraps ( func ) def decorated _ function ( * args, * * kwargs ) : token = request. headers. get ('authorization ','' ) if token! = settings. token : return jsonify ( error ='not authorized'), 401 return func ( * args, * * kwargs ) return decorated _ function | [
-1.5956497192382812,
-0.6301103830337524,
0.7152369618415833,
0.17241698503494263,
-0.7124367952346802,
-0.16735614836215973,
-1.0730055570602417,
-0.8482452034950256,
0.9496734142303467,
0.4345276653766632,
0.38830801844596863,
0.9391718506813049,
0.8325228095054626,
-0.5340440273284912,
... |
def test _ handle _ django _ lte _ 18 ( self, patched _ method ) : dummy _ model = dummymodelfactory. create ( ) form _ class = self. omni _ form. get _ form _ class ( ) form = form _ class ( instance = dummy _ model, data = { } ) instance = omniformsaveinstancehandler ( ) instance. handle ( form ) patched _ method. as... | [
0.2501496374607086,
0.19155260920524597,
0.47534558176994324,
-0.7590492963790894,
0.5197504162788391,
0.7322977781295776,
0.45218968391418457,
0.48235103487968445,
0.6892402172088623,
-0.6421262621879578,
-1.4316917657852173,
-0.5762688517570496,
-0.18405531346797943,
-0.28703951835632324... |
def cycle _ add _ group _ permissions ( admin _ api _ key, group _ permissions _ template _ input, permissions ) : group _ name _ id _ connector = get _ groups _ connector ( admin _ api _ key, group _ permissions _ template _ input. iloc [ 0 ] [ 0 ] ) # print ( group _ name _ id _ connector ) if group _ name _ id _ con... | [
-0.40950101613998413,
0.19670060276985168,
0.8700703978538513,
0.29751574993133545,
0.413674920797348,
-0.14036306738853455,
0.6086060404777527,
-0.7229524254798889,
-0.3469776511192322,
0.1665760725736618,
1.1978992223739624,
0.031981464475393295,
-0.7420176267623901,
0.302561491727829,
... |
def getei ( self, * args ) : return _ snap. tungraph _ getei ( self, * args ) | [
-0.38463127613067627,
0.8831188678741455,
0.4133201837539673,
1.2709200382232666,
1.6649798154830933,
-0.8039984107017517,
0.8848845958709717,
-0.23774784803390503,
-0.49676749110221863,
-0.5392729640007019,
-0.8541717529296875,
-0.4119894206523895,
-0.7978425025939941,
-0.5067700147628784... |
def draw _ boxes ( frame, output, prob _ t, width, height ) : current _ count = 0 for box in output [ 0 ] [ 0 ] : conf = box [ 2 ] if conf > = prob _ t : xmin = int ( box [ 3 ] * width ) ymin = int ( box [ 4 ] * height ) xmax = int ( box [ 5 ] * width ) ymax = int ( box [ 6 ] * height ) cv2. rectangle ( frame, ( xmin, ... | [
-0.5071660876274109,
-0.7180064916610718,
0.6760189533233643,
0.5329054594039917,
-0.6225716471672058,
-0.4688967764377594,
0.18980294466018677,
-0.3310665190219879,
-0.20575805008411407,
-0.05326798930764198,
-0.21348917484283447,
-0.13211023807525635,
-0.12586472928524017,
0.300435870885... |
def _ _ init _ _ ( self, env, agent, gamma, steps _ count = 5 ) : assert isinstance ( env, ( gym. env, list, tuple ) ) assert isinstance ( agent, baseagent ) assert isinstance ( gamma, float ) assert isinstance ( steps _ count, int ) assert steps _ count > = 1 if isinstance ( env, ( list, tuple ) ) : self. pool = env e... | [
-0.39773455262184143,
-0.03481059893965721,
0.5988766551017761,
0.4800945520401001,
1.0280473232269287,
0.16040174663066864,
0.42289701104164124,
-0.12987618148326874,
-0.27276769280433655,
0.01647866517305374,
0.20423118770122528,
0.2906769812107086,
-0.001129986485466361,
1.0056942701339... |
def split _ history _ and _ current ( windowed _ ts ) : x = windowed _ ts. iloc [ :, : - 1 ]. values y = windowed _ ts. iloc [ :, - 1 ]. values return ( x, y ) | [
-0.7506937384605408,
-0.534398078918457,
0.5944687724113464,
-0.49107626080513,
0.46385082602500916,
-0.2171507030725479,
0.5221807360649109,
0.21084937453269958,
-0.17744578421115875,
0.5840739607810974,
0.3519797921180725,
1.4103902578353882,
0.05536133423447609,
-0.031546127051115036,
... |
def select _ item ( self ) : # get the index of the currently chosen item index _ item = self. model. index ( self. item _ index. row ( ), 0, self. item _ index. parent ( ) ) # get the file path of this item file _ path = self. model. filepath ( index _ item ) # return it with a callback self. callback _ func ( { " fil... | [
0.334760844707489,
-0.7905591130256653,
0.3598220944404602,
0.6799889206886292,
0.2867392599582672,
-0.45180365443229675,
1.5397613048553467,
-0.07883870601654053,
0.11503080278635025,
-0.41964709758758545,
0.437435507774353,
0.3906499743461609,
0.0277221892029047,
-0.7959779500961304,
0... |
def parse _ input ( string ) : string = string. rstrip ( ) match = re. search ( r'^ ( ( [ a - za - z ] | [ 0 - 9 ] ) | ( [ - ] | [ _ ] | [. ] ) ) + [ @ ] ( ( [ a - za - z0 - 9 ] ) | ( [ - ] ) ) { 2, 63 } [. ] ( ( [ a - za - z0 - 9 ] ) { 2, 63 } ) + $ ', string ) if match is not none : print ('true') else : print ('fals... | [
-0.2530597150325775,
-0.16697542369365692,
0.9830390810966492,
-0.28233733773231506,
-0.834354817867279,
0.8960245847702026,
0.07668636739253998,
-0.31638941168785095,
0.08472689986228943,
-0.38947105407714844,
-0.52208012342453,
0.09806634485721588,
-0.18419820070266724,
-0.26884081959724... |
def isopen ( self ) : return self. open | [
-1.2499535083770752,
-1.2816309928894043,
0.5059502720832825,
0.8396494388580322,
-0.6063986420631409,
0.7682505249977112,
0.43167364597320557,
0.635860025882721,
0.4177898168563843,
-0.7439985871315002,
-0.05685274302959442,
0.15292797982692719,
-1.1454403400421143,
-0.820692777633667,
... |
def transposearray ( data ) : arr = [ [ ] for i in range ( 0, len ( data [ 0 ] ) ) ] for row in data : for i in range ( 0, len ( data [ 0 ] ) ) : arr [ i ]. append ( row [ i ] ) return np. array ( arr ) | [
0.03153575584292412,
-0.45621582865715027,
1.01143217086792,
-0.6266636252403259,
0.306031733751297,
-0.6311809420585632,
0.04392947256565094,
-0.07449417561292648,
0.8165429830551147,
0.9855006337165833,
0.3814455270767212,
-0.19910912215709686,
-0.7044382691383362,
0.8814952969551086,
... |
def _ get _ main _ url ( self, page _ num ) : raise notimplementederror | [
-0.5218417048454285,
0.15038058161735535,
0.5786779522895813,
0.21930654346942902,
0.03568865358829498,
0.4794676899909973,
-0.17527374625205994,
0.33898240327835083,
0.08340311050415039,
-0.09118929505348206,
0.6092078685760498,
-0.5081348419189453,
0.24599197506904602,
0.6280816793441772... |
def max _ word _ value ( words ) : word _ values = dict ( zip ( words, [ calc _ word _ value ( word ) for word in words ] ) ) return max ( word _ values, key = word _ values. get ) pass | [
0.6566286683082581,
0.02922849729657173,
0.36631202697753906,
0.5949637293815613,
-0.24239866435527802,
-0.24524670839309692,
-0.9585578441619873,
0.38596129417419434,
-0.4580213725566864,
0.4485865831375122,
0.0982494056224823,
0.0013143927790224552,
-0.01857874169945717,
1.86994707584381... |
def test _ as _ form _ field ( self ) : form = omnimodelformfactory. create ( ) field = omnicharfield ( name ='title ', label ='please give us a title ', required = true, widget _ class ='django. forms. widgets. textinput ', order = 0, initial _ data ='some title... ', min _ length = 10, max _ length = 150, form = form... | [
0.0014375511091202497,
0.30038702487945557,
0.3941328227519989,
-1.090306043624878,
0.5390579104423523,
0.6100121140480042,
-0.7699663043022156,
0.2475620061159134,
0.7026408910751343,
-0.5899760723114014,
-1.667400598526001,
-0.1377193033695221,
0.35392239689826965,
0.4277734160423279,
... |
def shipping _ city _ name ( self ) : return self. _ shipping _ city _ name | [
-0.2340732365846634,
-0.39746490120887756,
0.3948861062526703,
-0.4102414846420288,
-1.3168166875839233,
1.2675930261611938,
0.016155054792761803,
-0.25422120094299316,
-0.07901117205619812,
0.28027090430259705,
-0.5827775001525879,
-0.436875581741333,
0.511925458908081,
-0.480953276157379... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.