text stringlengths 25 2.19k | embedding listlengths 768 768 |
|---|---|
async def test _ controlling _ state _ via _ mqtt _ rgbww ( hass : homeassistant, mqtt _ mock : mqttmockhaclient, setup _ tasmota ) - > none : config = copy. deepcopy ( default _ config ) config [ " rl " ] [ 0 ] = 2 config [ " lt _ st " ] = 5 # 5 channel light ( rgbcw ) mac = config [ " mac " ] async _ fire _ mqtt _ me... | [
0.285193532705307,
-0.20882201194763184,
0.4321203827857971,
-0.5250973105430603,
0.21792763471603394,
0.8683891296386719,
0.26060763001441956,
-0.5277864336967468,
-0.027719302102923393,
-0.43103131651878357,
-0.6155226826667786,
-0.45112335681915283,
0.38815462589263916,
0.87981486320495... |
def text _ wrap ( self, s, width ) : if self. no _ wrap : return s actual _ width = self. get _ actual _ column _ char _ len ( width ) new _ s = self. _ textwrap _ fill ( s, actual _ width ) wrapped = new _ s! = s if self. add _ blank _ line and wrapped : new _ s + = " \ n ". ljust ( actual _ width ) return new _ s | [
-0.21699512004852295,
-0.4725643992424011,
0.552210807800293,
-0.05090587958693504,
-1.0495611429214478,
-0.33528900146484375,
-0.9635899066925049,
-0.5624743700027466,
0.7719325423240662,
0.22586141526699066,
0.7922385334968567,
0.11724211275577545,
0.4968981444835663,
-0.4513089954853058... |
def look _ up _ meta ( self ) : sql = " select * from coin _ meta " return self. fetch _ sql _ res ( sql, [ ] ) | [
-0.9293699860572815,
0.6971745491027832,
0.5552201271057129,
-0.09101247787475586,
0.4321671426296234,
-1.1015530824661255,
-1.1110649108886719,
-0.483355849981308,
-1.0388768911361694,
1.3465495109558105,
0.25948041677474976,
0.5260829925537109,
0.38851800560951233,
-0.5002323985099792,
... |
def get _ battery _ voltage ( self ) : try : recv = self. _ read ( self. command _ get _ batt _ volt, self. _ i2c _ read _ len ) except keyboardinterrupt as e : # pragma : no cover self. _ log. warning ( " keyboard interrupt, % s ", e ) raise e except ioerror as e : # pragma : no cover msg = " failed reading battery le... | [
0.3783831000328064,
-0.08301438391208649,
0.4217734634876251,
0.23891779780387878,
-0.12378577142953873,
0.985041618347168,
0.392578125,
-0.6432324051856995,
-1.0406334400177002,
-0.09424510598182678,
0.17514441907405853,
1.0071872472763062,
-0.118474580347538,
-0.1776125580072403,
1.081... |
def get _ comp _ name ( comp _ id ) : query ='select * from testcasemanage _ component where comp _ id = { 0 } '. format ( comp _ id ) result = autodb. select _ one _ record ( query ) comp _ name = result [ 0 ] ['comp _ name'] return comp _ name | [
0.1400255560874939,
-1.0642441511154175,
0.6162803173065186,
-0.5596407055854797,
0.2517440617084503,
-0.33299005031585693,
0.8603885769844055,
-0.3464360237121582,
0.7634831666946411,
0.7857792377471924,
0.10679730027914047,
-0.5901649594306946,
-0.21854883432388306,
0.4823620915412903,
... |
def test _ cdr _ intercept ( ) : for cdr _ at _ 1000 _ tests in np. linspace ( 0. 05, 0. 5, 10 ) : cdr _ function = preprocess. testing. create _ cdr _ function ( 1000. 0, cdr _ at _ 1000 _ tests ) assert cdr _ function ( 0. 0 ) = = 0. 0 | [
0.553530752658844,
0.2778773903846741,
0.38297155499458313,
-1.1894242763519287,
0.8713760375976562,
0.366106778383255,
0.7180352210998535,
0.4191863238811493,
0.12133120000362396,
-0.15250615775585175,
-0.2729240655899048,
0.2497192770242691,
-0.040219977498054504,
0.03475211560726166,
... |
def fromgtf2bed ( gtfname, bedname, gtftype ='geneannot') : if gtftype = ='geneannot': gtf = pd. read _ csv ( gtfname, sep ='\ t ', header = 0, names = [ " chr ", " val ", " type ", " start ",'stop ','dot ','strand ','loc ','name'] ) gtf ['name'] = [ i. split ('gene _ id "') [ - 1 ]. split ('" ; trans') [ 0 ] for i in ... | [
-0.05708849057555199,
-0.695909321308136,
0.8583151698112488,
0.45112404227256775,
-1.3177257776260376,
0.09495172649621964,
-0.4968281090259552,
-0.2924831211566925,
-1.4136143922805786,
0.5194345116615295,
-0.6253087520599365,
1.3811224699020386,
0.4971131384372711,
0.11599066853523254,
... |
def mae ( ae ) : return np. nanmean ( ae, axis = 0 ) | [
-0.9210500121116638,
-0.1329364776611328,
0.4655384123325348,
-0.9858368039131165,
-0.04579707980155945,
0.31444740295410156,
0.47200098633766174,
0.13739359378814697,
1.2345725297927856,
0.3990961015224457,
0.8444404602050781,
0.29010307788848877,
0.7334545254707336,
0.33260613679885864,
... |
def django _ db _ setup ( request, django _ test _ environment, django _ db _ blocker, django _ db _ use _ migrations, django _ db _ keepdb, django _ db _ createdb, django _ db _ modify _ db _ settings, ) : from. compat import setup _ databases, teardown _ databases setup _ databases _ args = { } if not django _ db _ u... | [
-0.27811387181282043,
1.289749026298523,
0.5562334060668945,
0.6753650903701782,
1.0197649002075195,
0.3985646665096283,
1.116687536239624,
-0.4990083873271942,
0.13876651227474213,
0.9131931066513062,
0.15442198514938354,
-0.10833427309989929,
-0.5802137851715088,
1.0092278718948364,
0.... |
def _ _ find _ x _ init ( self, tf ) : u = np. array ( [ - 1. 0 ] * 480 ) t = np. linspace ( 0, 40e - 9, 480 ) ( _, _, xout ) = signal. lsim2 ( tf, u = u, t = t, x0 = none, atol = 1e - 13 ) x0 = xout [ - 1 ] return x0 | [
0.6443102955818176,
-0.48370593786239624,
0.43902912735939026,
-0.8158529996871948,
-0.41509270668029785,
-0.445819228887558,
0.01713978312909603,
0.18564169108867645,
-0.5399500131607056,
0.12978065013885498,
-0.8598687052726746,
0.3332073390483856,
-0.09624987095594406,
0.442152649164199... |
def update ( self ) : if self. moving _ right and self. rect. right < self. screen _ rect. right : self. x + = self. settings. ship _ speed if self. moving _ left and self. rect. left > self. screen _ rect. left : self. x - = self. settings. ship _ speed if self. moving _ d and self. rect. right < self. screen _ rect. ... | [
-0.957199215888977,
0.20963454246520996,
0.8196998238563538,
-0.11798099428415298,
0.05393516644835472,
0.10068899393081665,
-0.14603284001350403,
-0.9022752046585083,
-0.03246357664465904,
0.2111835479736328,
0.2349468171596527,
-0.1339339166879654,
0.29363396763801575,
0.4673252999782562... |
def _ _ str _ _ ( self ) : return''. join ( map ( str, self. _ _ genome ) ) # most individual sub classes use list ( str ) as genome # this will prevent any error in case of new problem adding # ( at the moment, only problem1 and problem2 uses list ( int ), # which could be changed into list ( str ) with few modificati... | [
-0.07962021976709366,
-1.0777201652526855,
0.981289803981781,
0.17260779440402985,
-0.4853734076023102,
0.9855028986930847,
-0.8079360723495483,
-0.15753591060638428,
-0.17481228709220886,
0.2528751492500305,
0.5718522071838379,
0.5423889756202698,
-0.22152554988861084,
0.661691427230835,
... |
def engine1 ( ) : print ('dwhdb _ conn = ', dwhdb _ conn, ', server = ', server, ', interval = ', interval ) tablename = " oper _ er _ 4g _ " + server +'_'+ interval _ name. lower ( ) storage ='temp / oper _ er _ 4g _'+ server +'_'+ interval _ name + '. csv'file _ path = " green _ log / er _ 4g _ 15min / " + dwhdb _ co... | [
0.21717962622642517,
-0.040609993040561676,
0.9035030603408813,
0.5450789928436279,
0.2700299322605133,
0.1894528865814209,
0.4497688412666321,
0.019035805016756058,
-1.268489122390747,
0.24721011519432068,
0.5772821307182312,
-0.1960127204656601,
0.2534000277519226,
-0.3503757119178772,
... |
def predict ( self, x : tuple [ tensor ], data _ samples : detsamplelist ) - > detsamplelist : | [
-0.15664668381214142,
0.037436164915561676,
0.09986899793148041,
0.22279877960681915,
0.11860508471727371,
0.2428269237279892,
-0.4261890947818756,
0.689913272857666,
0.09252569824457169,
-0.2074718475341797,
-1.023972988128662,
-0.08494403958320618,
1.002743124961853,
-0.33508142828941345... |
def fragment _ list ( segments, prefix = " properties ", output = list ) : decoded = ( part _ decode ( unquote ( segment ) ) for segment in segments ) actual = next ( decoded ) if prefix! = actual : raise valueerror ( " expected prefix'{ } ', but was'{ }'". format ( prefix, actual ) ) return output ( decoded ) | [
-0.524996817111969,
-1.0700417757034302,
0.3238711655139923,
-0.40258389711380005,
0.004054019693285227,
-1.3738086223602295,
-1.1294419765472412,
0.45358237624168396,
0.2686763107776642,
-0.10579081624746323,
-0.23236428201198578,
-0.9570937156677246,
-0.3504856526851654,
-0.7446508407592... |
def all _ male ( self ) : for i in self : if self [ i ]. sex = = " 1 " : yield self [ i ] | [
-1.0963664054870605,
-0.7510702013969421,
0.6657835841178894,
0.9402859210968018,
-0.463360458612442,
0.3782244622707367,
-1.0960179567337036,
-0.12378846108913422,
0.13225902616977692,
0.03609562665224075,
-0.36825230717658997,
0.5819267630577087,
-0.4426877200603485,
1.1807594299316406,
... |
def _ _ init _ _ ( self, dataset _ name, env _ name, env _ number, batch _ number, agent _ name, other _ vehicles = false, road _ information = false, walkers = false ) : if " srl _ dataset _ path " not in os. environ : raise valueerror ( " srl dataset not defined, set the place where the dataset is going to be saved "... | [
0.10637200623750687,
-0.35496968030929565,
0.7784619927406311,
0.212621808052063,
0.20476533472537994,
0.13651829957962036,
0.1498451977968216,
0.6159573197364807,
-0.4885508418083191,
0.16540351510047913,
-0.07615085691213608,
-0.35641059279441833,
-0.0454002320766449,
0.6969945430755615,... |
def focused _ distances _ from _ egde _ valid ( self ) : return - 1 not in self. focused _ distances _ from _ edge | [
-0.12620984017848969,
-0.3816687762737274,
0.4914964735507965,
-0.11700517684221268,
0.1350383758544922,
1.4053456783294678,
0.43176496028900146,
0.10770444571971893,
-0.07542216777801514,
0.04859128221869469,
0.5734512805938721,
-0.0663011446595192,
0.04945964738726616,
-0.130188196897506... |
def file _ exists ( filepath, max _ age _ mins = 3 ) : if os. path. exists ( filepath ) : if os. path. getsize ( filepath ) > 0 : return true else : age _ seconds = time. time ( ) - os. path. getmtime ( filepath ) return age _ seconds < ( max _ age _ mins * 60 ) else : return false | [
-0.7445022463798523,
0.17219750583171844,
0.6456031203269958,
-0.5449882745742798,
-0.3809455931186676,
1.472933053970337,
-1.4818052053451538,
0.4694707691669464,
-0.44929003715515137,
0.5661784410476685,
-0.23071043193340302,
-0.3778529465198517,
0.6146169304847717,
-0.4287792146205902,
... |
def buildinggenerator ( n, vegetationcells = false, crs = none ) : specifications = etree. element ( " specifications " ) rmax = 0 cmax = 0 # - - for each building run the randomizer independently for i in range ( 0, n ) : # - - save the location in the cell for each of the building ( for the streets ) if vegetationcel... | [
-0.7927135229110718,
0.792241632938385,
0.42472249269485474,
0.8074170351028442,
-0.07363393902778625,
0.037683967500925064,
0.035193007439374924,
0.6708275079727173,
-0.46967172622680664,
0.01795087568461895,
0.091460682451725,
-1.1692254543304443,
-0.37021297216415405,
0.8636757135391235... |
def scan _ objects ( input _ path ) : object _ list = [ ] object _ dic = { } for find _ path, folders, files in os. walk ( input _ path ) : for txt in files : part = txt. split ('_') if len ( part ) = = 4 and part [ 3 ]. endswith ( ". txt " ) : whole _ file _ path = os. path. join ( find _ path, txt ) with open ( whole... | [
-0.6638228893280029,
-0.7959897518157959,
1.0963149070739746,
-0.581814706325531,
-1.1339277029037476,
0.39757630228996277,
1.113329529762268,
-0.5093071460723877,
-0.8553662896156311,
0.3489759564399719,
-1.283567190170288,
-0.8380635976791382,
0.1080198809504509,
0.19086015224456787,
-... |
def get _ most _ read ( key ) : ns = get _ ns ( key ) strategy = strategies [ key ] return strategy ( ns. url ), ns. name | [
-0.7662618160247803,
-0.7796028256416321,
0.3460451364517212,
-0.4633157551288605,
-0.8334006071090698,
-1.033534288406372,
-0.8723517656326294,
-0.747124433517456,
0.6287015676498413,
-0.19696879386901855,
1.2112282514572144,
0.18918561935424805,
1.2210400104522705,
-0.052730459719896317,... |
def week _ page ( self, content ) : games = [ ] soup = beautifulsoup ( content, " lxml " ) # weekly page will have links to individual games in format : # < a href = " / gamecenter / 2014090400 / 2014 / reg1 / packers @ seahawks " # class = " game - center - link "... < / a > for a in soup. findall ( " a ", { " class "... | [
-0.6191909909248352,
0.08535847067832947,
0.8913144469261169,
-1.467782974243164,
0.40944215655326843,
-0.7892124056816101,
-0.4764949083328247,
-0.20162564516067505,
0.5497624278068542,
0.6253147721290588,
0.39553120732307434,
-0.5323701500892639,
0.022236671298742294,
-0.0699620991945266... |
def filter _ content ( content ) : return [ match [ 1 ] or match [ 0 ] for match in filter _ rp. findall ( content ) ] | [
-0.42073822021484375,
-0.19639168679714203,
0.44309237599372864,
0.2889932692050934,
0.9772551655769348,
0.04859437420964241,
-0.3726629912853241,
0.19804760813713074,
-0.44624271988868713,
1.0416316986083984,
0.26965761184692383,
-0.7298356294631958,
-0.9009240865707397,
-0.37799188494682... |
def test _ failed _ order ( self ) : self. _ make _ employee ( ) patron = self. base _ conditions ( ) def patron _ has _ left ( ) : return patron not in self. tavern. creatures self. assertcanticktill ( patron _ has _ left, 500 ) | [
-0.0510798916220665,
0.1477455347776413,
0.20119358599185944,
0.8592463135719299,
0.5135012269020081,
1.4873440265655518,
0.18537035584449768,
-0.596322238445282,
-1.1868057250976562,
0.053320422768592834,
-0.7256262302398682,
-0.5863787531852722,
-0.6438073515892029,
0.8649058938026428,
... |
def qsort ( arr ) : def partition ( left, right ) : if left < right : median = random. randrange ( left, right + 1 ) arr [ right ], arr [ median ] = arr [ median ], arr [ right ] j = left - 1 for i in range ( left, right ) : if arr [ i ] < = arr [ right ] : j + = 1 arr [ j ], arr [ i ] = arr [ i ], arr [ j ] arr [ righ... | [
-0.005656045861542225,
-0.41248655319213867,
0.821024477481842,
-0.29755085706710815,
-1.3553553819656372,
0.38499146699905396,
0.18824957311153412,
-1.003067970275879,
1.278172492980957,
-0.15389114618301392,
0.2860657870769501,
-0.23257409036159515,
-0.5085042119026184,
0.686060070991516... |
def wait _ for _ stack _ update ( stack _ name ) - > bool : stack = _ get _ boto _ resource ( " cloudformation " ). stack ( stack _ name ) while true : stack. reload ( ) logger. debug ( f " stack'% s'status : % s ", stack _ name, stack. stack _ status ) if'rollback'in stack. stack _ status or'failed'in stack. stack _ s... | [
-0.3890763223171234,
0.5613757967948914,
0.6113407015800476,
-0.5118958950042725,
-0.15638448297977448,
-0.10016059875488281,
-0.3839617073535919,
-0.3688284754753113,
-0.3897934854030609,
0.39203062653541565,
-0.9960281252861023,
-0.5329528450965881,
-0.48073601722717285,
0.22656399011611... |
def input _ new _ product _ and _ price ( ) : objp1 = product ( " ", 0. 0 ) # create new object instance objp1. product _ name = str ( input ( " what is the product name? - " ) ). strip ( ) # get product from user if objp1. product _ name. isnumeric ( ) : raise exception ( " product names cannot be numbers " ) objp1. p... | [
-0.14793270826339722,
-1.2902581691741943,
0.6477572321891785,
1.097219467163086,
-0.3018406331539154,
1.9547940492630005,
0.38727036118507385,
-0.8087554574012756,
-0.12765148282051086,
-0.2959478497505188,
0.28796207904815674,
0.6873025298118591,
-0.2237209677696228,
-0.1115754023194313,... |
def brcddb _ to _ plain _ copy ( objx, obj, flag _ obj = none, skip _ list = none ) : if skip _ list is none : skip _ list = _ default _ skip _ list # copy all the reserved keys if hasattr ( objx,'r _ reserved _ keys') and callable ( getattr ( objx,'r _ reserved _ keys') ) and \ hasattr ( objx,'r _ keys') and callable ... | [
-0.8580568432807922,
0.20523887872695923,
0.9182541966438293,
0.4236897826194763,
-0.6867503523826599,
0.5257630348205566,
0.13029323518276215,
-0.1468411087989807,
0.2259477823972702,
0.4512791037559509,
-0.8817681074142456,
0.5486934781074524,
0.02113514207303524,
0.07860253006219864,
... |
async def test _ discovery _ update _ reconfigure _ light ( hass : homeassistant, mqtt _ mock : mqttmockhaclient, caplog : pytest. logcapturefixture, setup _ tasmota, ) - > none : config = copy. deepcopy ( default _ config ) config [ " rl " ] [ 0 ] = 2 config [ " lt _ st " ] = 1 # 1 channel light ( dimmer ) config2 = c... | [
0.15195989608764648,
-0.11302303522825241,
0.5364550948143005,
0.17457452416419983,
0.10034006088972092,
-0.1451697200536728,
-0.28344208002090454,
0.3036230206489563,
-0.0020783126819878817,
-0.31579717993736267,
-1.1370757818222046,
-0.32383817434310913,
0.7661675810813904,
0.70462530851... |
def five ( ) : return [ [ 1, 1, 1, 1 ], [ 1, 0, 0, 0 ], [ 1, 1, 1, 0 ], [ 1, 0, 0, 1 ], [ 0, 0, 0, 1 ], [ 1, 0, 0, 1 ], [ 0, 1, 1, 0 ], ] | [
-0.5773342251777649,
-0.6586381196975708,
0.7866712808609009,
0.05779816582798958,
0.4178677499294281,
-0.6951476335525513,
1.0217945575714111,
-1.3015903234481812,
0.04696838557720184,
-0.10553047060966492,
-1.8132507801055908,
-0.47200262546539307,
-0.13058479130268097,
0.631886422634124... |
def isprofane ( self, text _ to _ check ) : connection = urllib. urlopen ( " http : / / www. purgomalum. com / service / containsprofanity? text = " + text _ to _ check ) output = connection. read ( ) connection. close ( ) if " true " in output : return true elif " false " in output : return false return false | [
-0.9028779864311218,
0.7076781392097473,
0.5252387523651123,
0.8303042054176331,
-0.19577832520008087,
0.18179355561733246,
-1.4434560537338257,
0.5901987552642822,
-0.02947034128010273,
0.1798425316810608,
0.4744594395160675,
0.006213176064193249,
-1.3611994981765747,
0.2556600272655487,
... |
def make _ patch _ list ( img _ pred, patches _ predicted = false ) : image _ width = img _ pred. shape [ 0 ] image _ height = img _ pred. shape [ 1 ] if patches _ predicted : img _ patch _ width = int ( patch _ size / patch _ size ) else : img _ patch _ width = patch _ size if ( image _ width % img _ patch _ width! = ... | [
-0.6021631956100464,
-0.3650667369365692,
0.5180069208145142,
-0.6032437682151794,
-1.1716092824935913,
0.5565402507781982,
0.5219766497612,
0.543942391872406,
-0.028895776718854904,
0.6896101832389832,
0.17053063213825226,
-0.0297661442309618,
0.5154447555541992,
0.2463473528623581,
-0.... |
def name ( self ) : return self. _ device. device _ data [ self. _ uuid ] [ " name " ] | [
-1.127656102180481,
0.08932828903198242,
0.30906280875205994,
0.6251397728919983,
-0.8803880214691162,
0.389994353055954,
0.05457737296819687,
-0.26865601539611816,
-0.17610639333724976,
0.24651753902435303,
-0.25282958149909973,
0.4925358295440674,
0.0329645536839962,
-0.7303387522697449,... |
def log _ scalars ( self, frame : int, * * values : float or math. tensor ) : for name, value in values. items ( ) : assert isinstance ( name, str ) value = float ( math. mean ( value ). mean ) if name not in self. _ scalars : self. _ scalars [ name ] = [ ] if self. scene is not none : path = self. scene. subpath ( f "... | [
-0.1057901605963707,
0.25998592376708984,
0.7371644973754883,
-0.48675537109375,
0.15035158395767212,
0.12449146807193756,
0.32521936297416687,
-0.5731810927391052,
-0.5109747648239136,
0.06664293259382248,
-1.1294279098510742,
0.8235278129577637,
0.05378463491797447,
0.8866754770278931,
... |
def test _ invalid _ parameters ( ) : with pytest. raises ( typeerror ) : retry. retry ( exceptions = none, success = none ) ( foo ) | [
0.2761477828025818,
0.7645376324653625,
0.6204479336738586,
0.6693695187568665,
0.655124843120575,
0.6092809438705444,
-0.6629471778869629,
-0.09071217477321625,
0.06945417076349258,
0.1824561208486557,
-0.401212602853775,
0.858040988445282,
-1.0483505725860596,
0.28177618980407715,
-0.0... |
def run ( self ) : for cur _ sample in range ( self. num _ sample ) : logging. debug ( f " entered sampling cur _ sample = { cur _ sample } " ) while self. keep _ burning : logging. info ( f " sample { cur _ sample } / { self. num _ sample }, " f " prog : { self. graph. get _ num _ sample _ vertices ( cur _ sample ) / ... | [
0.057809874415397644,
-0.13963615894317627,
0.8352367281913757,
0.49194690585136414,
-0.4282357394695282,
0.009087962098419666,
0.9318158626556396,
-0.012428929097950459,
-0.656849205493927,
0.23635521531105042,
-0.14130021631717682,
0.8275195360183716,
-0.5532708764076233,
-0.134041771292... |
def mergetwosortedll ( head1, head2 ) : dummy = linkedlistnode ( - 1 ) # dummy node curr = dummy while head1! = none and head2! = none : if head1. val < head2. val : nextnode = linkedlistnode ( head1. val ) head1 = head1. next else : nextnode = linkedlistnode ( head2. val ) head2 = head2. next curr. next = nextnode cur... | [
0.016451973468065262,
-0.35758331418037415,
1.2067538499832153,
-0.45634564757347107,
-0.8445845246315002,
-0.2015800029039383,
-1.121321678161621,
-0.7860915064811707,
0.133864626288414,
-0.8983761072158813,
-0.4740697145462036,
1.0071160793304443,
-0.8087771534919739,
0.858189582824707,
... |
def edit ( self, * * kwargs ) : response = self. _ requester. request ('put ','courses / { } / assignment _ groups / { } '. format ( self. course _ id, self. id ), _ kwargs = combine _ kwargs ( * * kwargs ) ) if'name'in response. json ( ) : super ( assignmentgroup, self ). set _ attributes ( response. json ( ) ) return... | [
-1.4085785150527954,
0.5409569144248962,
0.2747940719127655,
-0.5383921265602112,
-0.9382443428039551,
-0.24899430572986603,
-0.2826971113681793,
0.05882543697953224,
-0.8957558870315552,
0.6739572286605835,
0.1690167635679245,
0.3732457160949707,
-0.7624168992042542,
0.16404958069324493,
... |
def click _ addnewaddress ( self ) : addaddress = self. driver. find _ element _ by _ css _ selector ( self. css _ addnewaddress ) action = touchactions ( self. driver ) action. tap ( addaddress ). perform ( ) time. sleep ( 0. 2 ) | [
-0.35072582960128784,
-0.018229404464364052,
0.5788940191268921,
0.6311478614807129,
0.5298867225646973,
0.3069379925727844,
0.46556296944618225,
-0.4483402371406555,
1.3679218292236328,
-0.0573904775083065,
-0.05686959624290466,
0.42333561182022095,
-0.09195864200592041,
0.013096229173243... |
def convert _ to _ category ( categories : dict ) - > list [ category ] : category _ list : list [ category ] = [ ] for category in categories : if ( category. get ('name') and category. get ('url') and category. get ('id') and category. get ('products') > 1000 ) : category _ list. append ( category ( name = category [... | [
-1.262430191040039,
-0.12478721886873245,
0.2817974388599396,
-0.45638006925582886,
0.19958432018756866,
0.035580314695835114,
-0.8276485800743103,
0.4746365249156952,
1.2148535251617432,
0.6244969367980957,
-0.5198112726211548,
-0.5938364863395691,
1.193755865097046,
0.43807917833328247,
... |
def get _ queryset ( self ) : created _ at _ _ gt = self. request. query _ params. get ('created _ at _ _ gt ', none ) if created _ at _ _ gt is not none : self. queryset = self. queryset. filter ( created _ at _ _ gt = created _ at _ _ gt ) created _ at _ _ lt = self. request. query _ params. get ('created _ at _ _ lt... | [
-0.827745795249939,
-0.09367655962705612,
0.9269031882286072,
-0.33167076110839844,
-0.0957341119647026,
1.0254719257354736,
-0.08883706480264664,
-0.1843147575855255,
-0.4309825003147125,
-0.4089474678039551,
1.1383440494537354,
0.3016680181026459,
-0.1512770652770996,
-0.2181680500507354... |
def marriage _ after _ 14 ( self ) : status = true query ='select fam. husb, fam. wife, fam. marr, fam. fam from fam'# husb, wife, fam couples = self. tool. query _ info ( query ) for couple in couples : # print ( len ( couple ) ) # 3 birth _ a = self. tool. get _ birthday ( couple [ 0 ] ) birth _ b = self. tool. get _... | [
-0.07934746146202087,
-0.5033328533172607,
0.8272475600242615,
0.3159354627132416,
-1.0455738306045532,
0.6040195822715759,
0.3289426267147064,
-0.05358303710818291,
-0.05612530931830406,
-0.5649023652076721,
0.039225250482559204,
-0.5000794529914856,
-0.11982197314500809,
0.55665349960327... |
async def resolve _ mutation _ track _ channel ( parent : optional [ any ], args : dict [ str, any ], ctx : dict [ str, any ], info : " resolveinfo ", ) - > dict [ str, any ] : channel = args [ " channel " ] tracking _ channel = track _ channel ( channel ) if tracking _ channel : return " successfuly tracking " + args ... | [
-0.3229203522205353,
0.2365986406803131,
0.7788651585578918,
-0.010161411948502064,
1.1728613376617432,
-0.1135273277759552,
-0.4168519079685211,
-0.6189010739326477,
-0.1055891215801239,
0.06684303283691406,
0.12334953248500824,
0.3232719302177429,
0.12660741806030273,
0.6065064072608948,... |
def mask _ input ( self, inputs, targets _ present ) : inputs _ missing = torch. zeros _ like ( inputs ) inputs _ missing [ :, : ] = self. mask _ token _ idx zeroth _ input _ present = torch. ones _ like ( targets _ present ) [ :, 1 ]. unsqueeze ( dim = - 1 ) # bs * 1 inputs _ present = torch. cat ( [ zeroth _ input _ ... | [
-0.8218267560005188,
-1.1294965744018555,
0.6873632669448853,
0.5925729274749756,
0.6246482133865356,
-0.1164761409163475,
0.5956168174743652,
0.16332046687602997,
0.43627944588661194,
0.47901561856269836,
0.6915463209152222,
0.11559830605983734,
-0.11968757957220078,
-0.46340855956077576,... |
def on _ key _ release ( self, key, modifiers ) : self. keys _ pressed. remove ( key ) self. update _ text ( ) | [
-0.8074070811271667,
-0.19128119945526123,
0.19358403980731964,
-0.5738800764083862,
-0.653689444065094,
-0.8552346229553223,
-0.8995946645736694,
0.8510951995849609,
0.0716581642627716,
1.4785962104797363,
-0.775775671005249,
-0.28844204545021057,
-0.7773158550262451,
0.0980074405670166,
... |
def searchedmplugindump ( edmpluginfile, srcdir ) : if not len ( edmpluginfile ) : try : edmpluginfile = getreleasebasedir ( ) +'/ lib /'+ \ os. environ. get ('scram _ arch') +'/. edmplugincache'except : raise runtimeerror, \ " $ cmssw _ release _ base or $ scram _ arch not found. " if not len ( srcdir ) : try : srcdir... | [
-0.36289164423942566,
-0.04333573207259178,
0.9611223936080933,
-0.49717429280281067,
0.4100736677646637,
-0.7764418721199036,
0.5243142247200012,
-0.2268821895122528,
0.5650151968002319,
0.44134125113487244,
0.05739423632621765,
0.5520688891410828,
-0.6649988889694214,
0.45114877820014954... |
def test _ ipv6 _ host _ strings _ join ( self ) : eq _ ( join _ host _ strings ('user ','2001 : db8 : : 1'),'user @ 2001 : db8 : : 1') eq _ ( join _ host _ strings ('user ','2001 : db8 : : 1 ','1222'),'user @ [ 2001 : db8 : : 1 ] : 1222') eq _ ( join _ host _ strings ('user ','192. 168. 0. 0 ','1222'),'user @ 192. 168... | [
0.4375380575656891,
-0.7089394927024841,
0.5808842182159424,
0.6291175484657288,
-0.38352707028388977,
1.10238516330719,
0.3482079803943634,
-0.2642726004123688,
-0.258628249168396,
0.1919436901807785,
-0.6333006024360657,
0.2453826665878296,
-0.13375969231128693,
-1.1824147701263428,
0.... |
def test _ cant _ delete _ car _ invalid _ request ( self ) : json _ response = api _ call ( self, " delete ",'/ car / delete ', dict ( ), 200, true ) self. assertequal ( json _ response [ " status _ code " ], 400 ) self. assertequal ( json _ response [ " message " ],'missing id') res = self. client. post ('/ car / del... | [
-0.5784643292427063,
-0.21530692279338837,
0.8495081067085266,
0.14043113589286804,
0.7738296985626221,
0.6589217782020569,
-0.7567893266677856,
0.08412891626358032,
-0.6368348598480225,
-0.22554615139961243,
-0.283892422914505,
-0.3062218129634857,
-0.3968474566936493,
0.5745484232902527,... |
def games _ played ( self ) : return self. _ games _ played | [
0.43124300241470337,
-0.21102319657802582,
0.4970286190509796,
-0.2084471732378006,
1.536432147026062,
0.5919538140296936,
0.3075518012046814,
-1.0765596628189087,
-0.2658118009567261,
0.1755003184080124,
-0.5281426310539246,
-0.13253697752952576,
0.023986924439668655,
-1.229099988937378,
... |
def has _ perm ( self, perm, obj = none ) : # simplest possible answer : yes, always return true | [
0.1667722463607788,
-0.29721781611442566,
0.6487835049629211,
1.5049432516098022,
-0.7228075861930847,
0.5353373289108276,
0.1766667515039444,
0.8594750165939331,
0.5205034613609314,
-0.3851218819618225,
-0.33600637316703796,
0.10090568661689758,
-1.6148862838745117,
0.083061084151268,
-... |
def _ _ init _ _ ( self, name, commname, typ, smiles, weight, reglst ) : self. name = name self. commname = commname self. typ = typ self. weitht = weight self. smiles = smiles self. reglst = reglst self. cplst = [ ] self. inpath = [ ] self. graph = graph ( 0, directed = true ) | [
0.70174241065979,
-0.4203285872936249,
0.5271900296211243,
0.28774234652519226,
0.1507301777601242,
0.7894569635391235,
0.487125426530838,
0.12408115714788437,
0.6906991600990295,
-0.005926569923758507,
-0.7065695524215698,
0.4510127902030945,
-1.438136100769043,
0.5590768456459045,
0.02... |
def _ _ init _ _ ( self, * args, * * kwargs ) : self. globals = globals self. globals. _ nof _ requests + = 1 self. sessionidmorsel = none super ( rkhttprequesthandler, self ). _ _ init _ _ ( * args, * * kwargs ) | [
-0.07814478129148483,
-0.10111948102712631,
0.6028577089309692,
0.6686511039733887,
-0.07749367505311966,
0.6670553684234619,
-0.012890467420220375,
-0.2707752585411072,
0.26253288984298706,
-0.5402358770370483,
-0.9570910334587097,
-0.1791270226240158,
-0.8970568776130676,
0.7322670221328... |
def accept _ appointment ( request ) : if request. user. is _ stylist = ='yes': if request. method = ='post': appointment = appointment. objects. get ( pk = request. post. get ('appointment _ pk') ) appointment. status = appointment. status _ accepted appointment. save ( ) return redirect ( request. meta. get ('http _ ... | [
-0.2503066062927246,
0.030381683260202408,
0.6368684768676758,
0.1494721919298172,
-1.2887579202651978,
1.7180228233337402,
0.005377219058573246,
1.0858467817306519,
0.2953932583332062,
1.5215414762496948,
-0.023269709199666977,
0.20835550129413605,
0.2766724228858948,
0.8362507224082947,
... |
def vacancies ( xyz, perc _ mean = 0, perc _ var = none ) : if perc _ mean = = 0 : return xyz if perc _ var = = none : perc _ var = perc _ mean / 2. num _ atoms = xyz. shape [ 0 ] num _ vac = np. random. normal ( perc _ mean * num _ atoms, perc _ var * num _ atoms ) if num _ vac > 0 and num _ vac < num _ atoms : # dete... | [
-0.05705620348453522,
0.13877961039543152,
0.6126431822776794,
-0.24236221611499786,
-0.7105834484100342,
0.5426808595657349,
1.2932268381118774,
0.334636390209198,
0.6625470519065857,
-0.07936479896306992,
0.7354022860527039,
0.05455322191119194,
-0.6664823293685913,
-0.49943971633911133,... |
def named _ parameters ( self ) : yield from self. encoder. named _ parameters ( ) yield from self. inverse _ model. named _ parameters ( ) | [
-0.204767644405365,
-0.6783571839332581,
0.37690088152885437,
-0.5502855777740479,
-0.7398587465286255,
0.029329504817724228,
-0.6378281712532043,
-0.9619707465171814,
-0.41329702734947205,
1.1964764595031738,
-0.9125047326087952,
0.9697540402412415,
0.014180940575897694,
1.23469877243042,... |
def gitid ( self ) : gitid = self. description # filter gitid = " ". join ( c for c in gitid if c in self. valid _ gitid _ chars ) # something has to be left assert gitid, " cannot build a vaild git id. " return gitid | [
1.490456223487854,
-0.12286467105150223,
0.15156130492687225,
-1.0991288423538208,
-0.180119588971138,
1.2203434705734253,
-0.8611094355583191,
-0.024706456810235977,
-0.050578828901052475,
0.23014651238918304,
0.5537585616111755,
1.3293850421905518,
-1.2071963548660278,
-0.051511999219655... |
def get _ id ( self ) : return str ( self. id ) | [
0.5526479482650757,
-1.7878822088241577,
0.3211502134799957,
-0.3053123950958252,
0.45819228887557983,
1.295868158340454,
-0.7296280860900879,
-0.1795816719532013,
1.261539101600647,
-0.04817044362425804,
0.32595503330230713,
0.6259169578552246,
-0.6435678005218506,
-0.7782790660858154,
... |
def _ _ init _ _ ( self, transform = none, target _ transform = none ) : self. class _ names = ['background ','car ','bus ','others ','van'] self. class _ dict = { class _ name : i for i, class _ name in enumerate ( self. class _ names ) } self. transform = transform self. target _ transform = target _ transform | [
-1.1567814350128174,
-0.6724597811698914,
0.5414408445358276,
-0.3451978266239166,
0.5101545453071594,
-0.36640846729278564,
-0.6892974376678467,
0.6173381805419922,
-0.19690252840518951,
-0.37668487429618835,
-0.7083314657211304,
0.3934442400932312,
0.2331095188856125,
0.37135595083236694... |
def compute _ bow ( dictionary, features ) : kdtree = kdtree ( dictionary ) bins = dictionary. shape [ 0 ] hists = [ ] for i, feature in enumerate ( features ) : print ( i ) dis, indices = kdtree. query ( feature ) hist, _ = np. histogram ( indices, bins = bins ) hist = hist / len ( indices ) # normalizes hists. append... | [
-0.3485492169857025,
0.28821855783462524,
0.52601158618927,
0.40588971972465515,
0.9219849705696106,
0.11213987320661545,
-0.09364346414804459,
1.1491069793701172,
0.6892532706260681,
0.7404620051383972,
-0.17838655412197113,
0.7543259263038635,
-0.20360925793647766,
0.8786463141441345,
... |
def _ generatefilecontent ( descriptions, branch _ file _ content, mstone _ file _ content, header _ filename, namespace ) : histograms, had _ errors = ( extract _ histograms. extracthistogramsfromdom ( descriptions ) ) if had _ errors : raise error ( " error parsing inputs. " ) base _ date = _ getbasedate ( branch _ f... | [
0.6315615177154541,
-0.0913516953587532,
0.5194562673568726,
-0.15076088905334473,
-0.5455499291419983,
0.6867167353630066,
0.08948039263486862,
-0.0012316583888605237,
-1.6058868169784546,
0.24553094804286957,
0.5598191618919373,
-0.3806338608264923,
-0.18781398236751556,
-0.1146531254053... |
def get _ axisid ( self, event ) : if event. inaxes = = self. axes ['main'] : return 0 elif event. inaxes = = self. axes ['resid'] : return 1 elif event. inaxes = = self. axes ['fit'] : return 2 elif event. inaxes = = self. axes ['info'] : return 3 return none | [
0.5949631929397583,
-1.0648349523544312,
0.6555919647216797,
0.14573019742965698,
-0.14570236206054688,
0.12428534775972366,
0.34287822246551514,
-0.042008619755506516,
0.31192687153816223,
-0.007417697459459305,
-0.13761433959007263,
0.19615276157855988,
-0.34190356731414795,
-0.853450417... |
def negate _ steering _ angles ( base _ path ) : lines = [ ] # inverting the angles with open ( os. path. join ( base _ path,'driving _ log. csv') ) as csvfile : reader = csv. reader ( csvfile ) for line in reader : line [ 3 ] = str ( - 1. 0 * float ( line [ 3 ] ) ) lines. append ( line ) # renaming the files in drivin... | [
-0.6357434391975403,
-0.586463451385498,
0.942926824092865,
-0.27455249428749084,
-0.008322996087372303,
0.19125306606292725,
-0.12934093177318573,
0.6782453060150146,
-0.4985278248786926,
0.2751067578792572,
0.00442154286429286,
0.2420440912246704,
0.3175116777420044,
0.15111111104488373,... |
def kodi _ info ( self ) : return {'plot': self. description,'mediatype':'tvshow ','title': self. title,'originaltitle': self. title } | [
0.08964040875434875,
-0.7705718874931335,
0.45010027289390564,
-0.7127339839935303,
-1.2340487241744995,
-0.2957421839237213,
-1.2305692434310913,
-0.8355922698974609,
-0.321321040391922,
0.47256648540496826,
-0.5284225344657898,
1.153037667274475,
-0.574101984500885,
0.510646641254425,
... |
def send ( ser, cmd ) : ser. write ( str ( cmd +'\ n'). encode ('ascii') ) # send our command for line in ser. readlines ( ) : # while there's a response print ( line. decode ('utf - 8'). strip ( ) ) # show it | [
0.4089614152908325,
-1.0854403972625732,
0.35210463404655457,
0.030684825032949448,
0.1875857263803482,
0.2073381096124649,
-0.6054685115814209,
-0.8751655220985413,
0.4377143085002899,
-1.0024166107177734,
0.07006929814815521,
1.1514003276824951,
-0.250272274017334,
0.055257949978113174,
... |
def _ pretty _ timedelta ( self, delta ) : pretty _ string = " { } days ". format ( delta. days ) if delta. days else " " hours, remainder = divmod ( delta. seconds, 3600 ) minutes, seconds = divmod ( remainder, 60 ) pretty _ string + = " { } hours { } minutes { } seconds ". format ( hours, minutes, seconds ) return pr... | [
-0.7205675840377808,
0.48011183738708496,
0.778131365776062,
-1.414005160331726,
-0.6546533703804016,
0.5931391716003418,
0.11138128489255905,
-1.6750991344451904,
-0.09223245084285736,
0.0159591156989336,
0.9744752645492554,
0.28179672360420227,
0.5584602952003479,
0.3849887549877167,
1... |
def reshape ( input _ tensor, mode, name ) : input _ shape = [ tf. shape ( input _ tensor ) [ k ] for k in range ( 4 ) ] if mode = = 0 : input _ shape _ 1 = tf. dtypes. cast ( input _ shape [ 1 ] * 2, dtype = tf. int32 ) input _ shape _ 2 = tf. dtypes. cast ( input _ shape [ 2 ], dtype = tf. int32 ) input _ shape _ 3 =... | [
-0.25338834524154663,
-0.15318210422992706,
0.7732685804367065,
-0.012081015855073929,
-0.4313060939311981,
0.5896698236465454,
-0.23015832901000977,
0.22123458981513977,
-0.0676606073975563,
0.40086713433265686,
-0.5194275975227356,
-0.39224082231521606,
-0.3529388904571533,
-1.3596471548... |
def check _ rbl _ envfrom ( self, msg, zone _ set, rbl _ server, subtest = none, target = none ) : if not msg. sender _ address : self. ctxt. log. debug ( " message has no envelope sender " ) return false return self. _ check _ rbl _ addr ( [ msg. sender _ address ], rbl _ server, subtest ) | [
0.375141978263855,
-0.21557216346263885,
0.49847739934921265,
0.10198438912630081,
0.5294424891471863,
0.5816776752471924,
0.5507736206054688,
-0.013069183565676212,
0.2970865070819855,
0.7640483379364014,
0.37153059244155884,
1.3288804292678833,
-1.3324337005615234,
1.4544835090637207,
... |
def test _ add _ edge _ existing _ recorded ( gr ) : gr. add _ node ('val1') gr. add _ node ('val2') gr. add _ edge ('val1 ','val2') assert gr. edges _ list = = [ ('val1 ','val2 ', 1 ) ] | [
-0.11167358607053757,
0.7702473998069763,
0.5267561674118042,
0.32090651988983154,
1.9851993322372437,
0.35539335012435913,
-0.29638174176216125,
0.3418641984462738,
-0.546269416809082,
0.620638906955719,
0.21512046456336975,
0.21346181631088257,
-0.4377155005931854,
-0.07943952828645706,
... |
def _ _ ne _ _ ( self, other ) : if not isinstance ( other, futurespricetrigger ) : return true return self. to _ dict ( )! = other. to _ dict ( ) | [
-1.0218182802200317,
0.7160152792930603,
0.8199079632759094,
0.078830786049366,
-0.5389983057975769,
-0.3348730802536011,
-1.3574175834655762,
-0.4503728151321411,
-0.197029709815979,
0.09485986083745956,
-1.172975778579712,
-0.6798625588417053,
0.14734682440757751,
-0.35329946875572205,
... |
def convert _ input _ image _ coord _ to _ feature _ map ( coord _ in _ input _ space, input _ to _ feature ) : x = int ( round ( ( coord _ in _ input _ space [ " x " ] + input _ to _ feature [ " x _ offset " ] ) * input _ to _ feature [ " x _ scale " ] ) ) y = int ( round ( ( coord _ in _ input _ space [ " y " ] + inp... | [
-0.8858091235160828,
-1.6931453943252563,
0.649849534034729,
-1.2057740688323975,
-0.39043721556663513,
0.2521178722381592,
-0.05313084274530411,
0.1543276011943817,
-0.6674102544784546,
0.27889084815979004,
-1.0591613054275513,
0.70595383644104,
0.5179424285888672,
-0.008047441951930523,
... |
def debug _ mode ( raw = false ) : # debug _ mode. debug attribute is only used for unittest debug = getattr ( debug _ mode, " debug ", 0 ) try : debug = int ( os. getenv ( " debug ", debug ) ) except valueerror : pass if not raw : debug = max ( 0, debug ) return debug | [
-0.36384081840515137,
0.2326236367225647,
0.6632005572319031,
-0.16753120720386505,
0.7830828428268433,
0.6179515719413757,
0.4218883812427521,
0.0766654759645462,
-0.2998385727405548,
-0.5602378249168396,
0.6157446503639221,
-0.6738978624343872,
0.09152033925056458,
0.8390504717826843,
... |
def rotated _ array _ search ( input _ list, number ) : if input _ list : if len ( input _ list ) = = 1 : if input _ list [ 0 ] = = number : return 0 return - 1 # find the index of the smallest element, i. e., the first element of the # array before rotation. lower _ bound, upper _ bound = 0, len ( input _ list ) - 1 i... | [
-1.0727063417434692,
0.14329440891742706,
0.8029208779335022,
0.5327827334403992,
0.09896421432495117,
-0.4208858907222748,
0.7833471298217773,
-0.26932743191719055,
0.4276626706123352,
-0.12878067791461945,
-0.6304105520248413,
0.4847148060798645,
-1.5273773670196533,
0.30189239978790283,... |
async def remove _ apitoken ( self, apitoken : union [ apitoken, dict ] ) - > mythicresponse : # take in an object and parse it if the value isn't explicitly given url = " { } { } : { } / api / v { } / apitokens / { } ". format ( self. _ http, self. _ server _ ip, self. _ server _ port, self. _ server _ api _ version, ... | [
-1.2192232608795166,
-0.7912218570709229,
0.42005905508995056,
-0.5680139660835266,
-0.17044878005981445,
-1.158829689025879,
-0.36195555329322815,
1.1929701566696167,
0.8589029312133789,
0.20285625755786896,
-1.5334477424621582,
-0.03069511242210865,
-0.8809090852737427,
-0.96459466218948... |
def select _ option ( self, day, days ) : x = 0 with open ( '. / beginner _ data / beginner _ python _ code. csv ','r') as file : read _ csv = csv. reader ( file ) for row in read _ csv : if row [ 0 ] = = days [ day - 1 ] and row [ 1 ]! ='lesson': x + = 1 self. options. append ( row [ 1 ] ) print ( f'{ x }. { row [ 1 ]... | [
-0.8268792033195496,
0.6711009740829468,
0.6353929042816162,
0.6236571073532104,
0.26892948150634766,
0.4098251461982727,
0.9594846367835999,
-1.0372281074523926,
0.17360997200012207,
-0.1851244568824768,
0.45365995168685913,
0.16076233983039856,
-0.3835391104221344,
0.3137662708759308,
... |
def perform _ modeling ( model _ pipeline, param _ grid, cv, score, train, y _ train ) : # fit the gridsearch object grid = gridsearchcv ( model _ pipeline, param _ grid, cv = cv, scoring = score, iid = false ) # fit the model and perform cv fit _ cv = grid. fit ( train, y _ train ) # rmse of best model rmse _ cv = np.... | [
0.16723863780498505,
-0.05639827996492386,
0.7993848323822021,
0.7604165077209473,
1.319706916809082,
-0.2287946343421936,
-0.07324501872062683,
0.080043725669384,
-0.595050036907196,
0.361419677734375,
0.34943369030952454,
-0.18737001717090607,
-0.02852567285299301,
0.2909603416919708,
... |
def subscribe _ my _ stats ( self, callback ) : pass | [
0.7659978866577148,
-0.06641711294651031,
0.3973253071308136,
0.4166180193424225,
-0.140827015042305,
0.31413018703460693,
-0.4410616457462311,
-0.8164461851119995,
0.6778126955032349,
-1.237236738204956,
-0.9256945252418518,
0.5576398372650146,
-0.05433692783117294,
0.727035403251648,
-... |
def convert _ examples _ to _ features ( examples, seq _ length, tokenizer ) : features = [ ] for ( ex _ index, example ) in enumerate ( examples ) : tokens _ a = tokenizer. tokenize ( example. text _ a ) tokens _ b = none if example. text _ b : tokens _ b = tokenizer. tokenize ( example. text _ b ) if tokens _ b : # m... | [
-0.6079270839691162,
-0.20232030749320984,
0.578561544418335,
0.3731860816478729,
0.03132442384958267,
-0.5985830426216125,
0.3352871835231781,
0.5198856592178345,
0.30929073691368103,
0.6620596647262573,
-0.8252172470092773,
0.32223936915397644,
0.3815588653087616,
0.679819643497467,
-0... |
def convert ( self ) : try : log ('processing % s...'% self. rapid _ output _ file _ list [ 0 ],'info') time _ start _ conversion = datetime. utcnow ( ) # validate the raw netcdf file log ('validating input netcdf file ','info') input _ id _ dim _ name, id _ len, time _ len, input _ flow _ var _ name = self. _ validate... | [
0.41641107201576233,
-0.9639801383018494,
0.8193036317825317,
0.3072718381881714,
0.03632407262921333,
-0.17054565250873566,
0.8567700386047363,
0.4107227921485901,
-0.8462209105491638,
0.15667694807052612,
0.03680086508393288,
-0.2958407700061798,
0.27357998490333557,
0.44680097699165344,... |
def news ( ) : feed _ str = create _ feed ( ). to _ string ( ) parsed _ feed = feedparser. parse ( feed _ str ) for entry in parsed _ feed ['entries'] : dt = datetime. datetime. strptime ( entry ['updated'],'% y - % m - % dt % h : % m : % sz') entry ['updated'] = dt. strftime ('% y - % m - % d % h : % m') return render... | [
0.19052870571613312,
-0.7388956546783447,
0.4811399281024933,
-0.37952637672424316,
0.03258977457880974,
0.12463779002428055,
-1.2253637313842773,
0.6827254891395569,
-1.1092076301574707,
-0.1392708569765091,
0.10153213143348694,
-0.18272076547145844,
0.42529693245887756,
0.268967270851135... |
def extendnextmoves ( self, moves ) : for move in moves : side = self. game. sides [ move. sideid ] if side. isunset ( ) and move. newstatus! = unset : if side. id not in self. processedsideids : self. nextmovelist. append ( move ) self. processedsideids. add ( side. id ) | [
-0.4018039405345917,
0.4031201899051666,
0.6132484674453735,
0.14831984043121338,
0.12328854948282242,
0.35661542415618896,
-1.3979772329330444,
0.13235503435134888,
0.5635265707969666,
0.9017615914344788,
-0.38479456305503845,
0.429608553647995,
-0.25489965081214905,
1.4145631790161133,
... |
def _ compile _ audience _ pattern ( self, pattern ) : re _ pattern = fnmatch. translate ( pattern ) if " : / / " not in pattern : re _ pattern = " [ a - z ] + : / / " + re _ pattern return re. compile ( re _ pattern ) | [
0.04528442397713661,
-0.7072920203208923,
0.341502845287323,
-0.49968743324279785,
-0.11244466155767441,
0.43716713786125183,
0.533266007900238,
0.960985004901886,
0.37453386187553406,
0.15541863441467285,
0.9628419876098633,
-0.02931847795844078,
0.4133715331554413,
-0.5227870345115662,
... |
def setup _ report _ gen ( self, report _ config _ location ) : report _ factory = reportgenfactory ( ) config = read _ json ( report _ config _ location ) report _ name = config [ " report " ] number _ class = int ( config [ " max _ number _ class " ] ) report _ repository = config [ " github _ repository _ location "... | [
0.11288134008646011,
0.3334796726703644,
0.3988794684410095,
-0.311257928609848,
1.1931953430175781,
-0.19975660741329193,
0.3057538866996765,
0.6160496473312378,
-0.852744996547699,
-0.11572425812482834,
-0.30263808369636536,
-0.046309515833854675,
0.007770101074129343,
-0.068765498697757... |
def key _ and _ reverse ( in _ place = true ) : def decorator ( sorting _ algorithm ) : " " " decorator that adds key and reverse keyword args to a sorting algorithm. " " " @ wraps ( sorting _ algorithm ) def wrapper ( arr, * args, key = none, reverse = false, * * kwargs ) : to _ sort = [ sortable ( value, key, reverse... | [
-0.4084969162940979,
0.13308395445346832,
0.8785106539726257,
-0.1118982806801796,
-0.9397722482681274,
0.31019455194473267,
-0.8197256922721863,
1.0796194076538086,
-0.4164160192012787,
1.3617570400238037,
0.4004286825656891,
0.4909652769565582,
0.084047332406044,
0.45368266105651855,
-... |
def test _ class _ has _ stock _ attributes ( self ) : self. asserttrue ( hasattr ( stocktype,'common') ) self. asserttrue ( hasattr ( stocktype,'preferred') ) | [
-0.4812367558479309,
0.34211215376853943,
0.47146645188331604,
0.22924990952014923,
1.3356317281723022,
1.015377163887024,
0.4612082540988922,
-0.2728184759616852,
0.0264798142015934,
-0.3767978250980377,
-0.5450241565704346,
-1.004154920578003,
0.35970741510391235,
1.5073972940444946,
0... |
def generate _ uid ( ) : global sequence _ val epoch _ ms = int ( time. time ( ) * 1000 ) bit _ len = epoch _ ms. bit _ length ( ) # shift epoch _ ms left to make it a 64 - bit integer, then randomize the rest uid = epoch _ ms < < 64 - bit _ len uid = uid | random. getrandbits ( 64 - bit _ len ) return unicode ( uid ) | [
-0.3239406645298004,
0.22311051189899445,
0.6852207183837891,
0.09689248353242874,
-0.5186896324157715,
0.9620588421821594,
-0.03283608704805374,
0.4080027639865875,
0.7775155305862427,
-0.4682782292366028,
0.07645801454782486,
0.9484490752220154,
-0.30892130732536316,
0.2953604757785797,
... |
def test _ proper _ employee _ list _ return ( self ) : emp1 = employee ( ) emp1. name ='emp1'emp1. email ='emp1 @ mail. com'emp1. department ='dep'emp1. save ( ) emp2 = employee ( ) emp2. name ='emp2'emp2. email ='emp2 @ mail. com'emp2. department ='dep'emp2. save ( ) emp1 _ dict = {'name': emp1. name,'email': emp1. e... | [
-1.0292856693267822,
-0.9090358018875122,
0.8510497808456421,
-0.5425679683685303,
0.07330352813005447,
0.852060854434967,
-0.41988715529441833,
0.40958717465400696,
-0.32453545928001404,
0.20051738619804382,
-1.1738722324371338,
-0.12062546610832214,
0.0282499548047781,
0.3255262672901153... |
def get _ next _ slice ( self ) : while true : # pick random slice and augmentation # doing it this way, each volume has equal probability of being selected regardless of # how many slices it has. # each slice inside the volume has equal chances to be picked. # but globally, not every slice has the same probablity of b... | [
-0.4860644042491913,
-1.0716242790222168,
0.7185119390487671,
-0.586197555065155,
-0.07236749678850174,
-0.740871250629425,
0.18142583966255188,
-0.632148027420044,
0.4220554828643799,
0.010626077651977539,
0.4544537663459778,
0.4457286298274994,
0.05374370515346527,
0.3474245071411133,
... |
def get _ timestamp ( self ) : return datetime. timedelta ( seconds = self. sim. timestamp ) | [
0.8284673690795898,
0.8642805814743042,
0.4314301311969757,
0.2642015814781189,
0.34018149971961975,
-0.41517919301986694,
0.08398004621267319,
-0.35207292437553406,
0.9774671792984009,
-0.4638269245624542,
-0.22952018678188324,
-0.4410116672515869,
0.04035661742091179,
-0.8684888482093811... |
def goodbye ( par ) : return " \ n \ nthank you { }, for visiting our calendar!! ". format ( par ) | [
0.0606149360537529,
-0.12610283493995667,
0.5485714673995972,
-1.02277410030365,
-0.5496587753295898,
0.8055304884910583,
-1.03805410861969,
-0.023246105760335922,
-0.28894373774528503,
-0.10494069755077362,
0.5003328919410706,
0.83762526512146,
-0.3906742334365845,
-0.14241619408130646,
... |
def sample ( self, n, upper _ limit = np. infty ) : nnot = n rts = [ ] while nnot > 0 : crts = self. theta + np. random. wald ( self. mu, self. lambd, size = nnot ) nnot = np. sum ( crts > = upper _ limit ) rts + = list ( crts [ crts < upper _ limit ] ) return np. array ( rts, dtype = np. double ) | [
-0.4461669921875,
0.042931701987981796,
0.7263427972793579,
0.044707439839839935,
0.1551530808210373,
0.40371930599212646,
-0.39337560534477234,
-0.8076725006103516,
0.6571301817893982,
0.5743386745452881,
0.48586276173591614,
1.091783046722412,
-0.37807315587997437,
0.19043399393558502,
... |
def scte35 _ to _ vtt ( cue ) : start = 0 end = 0 duration = none pts _ time = cue. packet _ data. pts start = cue. packet _ data. pts if " pts _ time " in cue. command. get ( ) : pts _ time = cue. command. pts _ time if " break _ duration " in cue. command. get ( ) : duration = cue. command. break _ duration end = sta... | [
0.17111916840076447,
-0.4002862572669983,
0.6025497913360596,
-0.039407599717378616,
0.24462446570396423,
0.16470101475715637,
0.2019045501947403,
-0.7645471096038818,
0.10624291002750397,
1.3165053129196167,
-0.4127451479434967,
0.763798713684082,
0.9703853130340576,
0.41839656233787537,
... |
def state _ machine ( cls, canbit : canbit ) - >'canfield': field = cls. get _ current _ field ( ) if field. name = ='data': cls. data _ bytes [ - 1 ]. canbits. append ( canbit ) cls. last _ 6 _ str = cls. last _ 6 _ str [ - 5 : ] + canbit. value # add to the current field ; may have to remove this bit later cls. add _... | [
0.22885896265506744,
0.19746781885623932,
0.7925570607185364,
-0.27674248814582825,
-0.16514258086681366,
0.23205630481243134,
0.1631476730108261,
-0.7214076519012451,
0.11994046717882156,
-0.5599204897880554,
-0.01930263824760914,
-0.28583481907844543,
-0.18850378692150116,
0.484813302755... |
def test _ cat _ multi _ arg ( self ) : bucket _ uri = self. createbucket ( ) data1 = b'0123456789'data2 = b'abcdefghij'obj _ uri1 = self. createobject ( bucket _ uri = bucket _ uri, contents = data1 ) obj _ uri2 = self. createobject ( bucket _ uri = bucket _ uri, contents = data2 ) stdout, stderr = self. rungsutil ( [... | [
0.1430341899394989,
-0.20771561563014984,
0.8711453676223755,
0.03192500025033951,
0.3908703029155731,
0.5582674145698547,
-0.2740759551525116,
-0.47180676460266113,
-1.1213321685791016,
-0.9155200719833374,
0.049437280744314194,
0.7485741376876831,
0.22996987402439117,
0.2535041272640228,... |
def consecutiveverticalintervals ( first, second, length ) : pairs = [ ] for i in range ( length ) : pairs. append ( verticalintervals ( first [ i : ], second [ i : ] ) ) return zip ( * pairs ) | [
0.4498470425605774,
-0.386905312538147,
0.4396068751811981,
0.8945766091346741,
-0.16338025033473969,
-0.13386781513690948,
-0.47332763671875,
-0.6208628416061401,
-0.15991242229938507,
0.8320727348327637,
-1.3324275016784668,
0.48271846771240234,
-1.1071373224258423,
-0.3877120316028595,
... |
async def get _ literals _ full _ for _ lst ( entities ) : res = await runquerysinglekey ( cacheliteralsfull, entities, " " " select? base? prop? value? datatype where { values? base { % s }? base? prop? value. filter ( isliteral (? value ) ). bind ( datatype (? value ) as? datatype ) filter (! contains ( str (? dataty... | [
-0.23877963423728943,
0.243023082613945,
0.6154544353485107,
-0.8576110601425171,
-0.2123403549194336,
-0.6582794189453125,
-0.9501974582672119,
0.03390958532691002,
0.0920662209391594,
0.16609640419483185,
-0.06026375666260719,
0.18293964862823486,
-0.10014037787914276,
0.8260741829872131... |
def _ create _ global _ explanation ( local _ explanation = none, expected _ values = none, classification = true, explanation _ id = none, * * kwargs ) : kwargs, mixins = _ create _ global _ explanation _ kwargs ( local _ explanation, expected _ values, classification, explanation _ id, * * kwargs ) dynamicglobalexpla... | [
0.1339801400899887,
0.19366337358951569,
0.5362825989723206,
0.6497113108634949,
-0.017178870737552643,
0.3857049345970154,
0.5580422282218933,
1.4668253660202026,
-0.556215226650238,
0.28313973546028137,
-0.5881370902061462,
1.240540623664856,
-0.6431821584701538,
0.9022157788276672,
0.... |
def _ get _ function _ from _ pyopengl ( funcname ) : func = none # get function from gl try : func = getattr ( _ gl, funcname ) except attributeerror : # get function from fbo try : func = getattr ( fbo, funcname ) except attributeerror : # some functions are known by a slightly different name # e. g. gldepthrangef, g... | [
0.013236998580396175,
-0.33893918991088867,
0.6603991985321045,
-0.5922521948814392,
-0.3073042035102844,
-1.0128238201141357,
0.5203166007995605,
-1.366928219795227,
-0.06027362495660782,
-0.41714999079704285,
-0.21558967232704163,
0.5647513270378113,
0.43945929408073425,
-0.3449196815490... |
def addfailure ( self, test, err ) : logs = [ ] output = self. complete _ output ( ) logs. append ( output ) logs. extend ( self. error _ or _ failure _ text ( err ) ) self. failure _ count + = 1 self. add _ test _ type ('', logs ) if self. verbosity > 1 : sys. stderr. write ('f') sys. stderr. write ( str ( test ) ) sy... | [
0.24526546895503998,
-0.147409588098526,
0.6857582330703735,
0.2856096923351288,
-0.15782681107521057,
-0.3681425154209137,
0.4911557734012604,
0.016261214390397072,
0.304546058177948,
-0.8514665365219116,
-0.050578393042087555,
0.17393086850643158,
-0.19109708070755005,
0.6503602862358093... |
def getcurrentworkingdirectory ( self, string, p _ int ) :... | [
-1.3360989093780518,
-0.4753395915031433,
0.5391009449958801,
0.2981756329536438,
-0.3893183767795563,
-0.12518653273582458,
0.9927985072135925,
-0.5450827479362488,
-0.33707112073898315,
-1.1196345090866089,
0.33284249901771545,
0.7113023996353149,
-1.0496498346328735,
-1.056504487991333,... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.