text stringlengths 25 2.19k | embedding listlengths 768 768 |
|---|---|
def three _ point _ core _ transform ( im, d ) : inv _ im = np. zeros _ like ( im ) for i, p in enumerate ( im ) : inv _ im [ i ] = scipy. dot ( d, p ) return inv _ im | [
-0.48939797282218933,
-0.04846957325935364,
0.4390488862991333,
-0.7892611622810364,
0.24301885068416595,
0.5010157823562622,
-0.6262242794036865,
0.8091897368431091,
0.5736820697784424,
1.6793670654296875,
0.015593228861689568,
0.4219261407852173,
-0.6281304955482483,
-0.7621923089027405,... |
def capakey _ rest _ gateway _ request ( url, headers = { }, params = { } ) : try : # calls to geoservices give a 403 if the user - agent is not set headers [ " user - agent " ] = " * " res = requests. get ( url, headers = headers, params = params ) res. raise _ for _ status ( ) return res except requests. connectioner... | [
-0.582968533039093,
-0.4338800311088562,
0.7101921439170837,
0.5445652008056641,
-0.7718544602394104,
-0.5589414834976196,
-0.6699197292327881,
-0.20855148136615753,
-0.052504442632198334,
0.5114388465881348,
0.9112694263458252,
0.2948877215385437,
-0.9518327713012695,
0.2543368935585022,
... |
def get _ clock _ text _ tuple _ list ( * args, * * kwargs ) : t = dt. datetime. now ( ). astimezone ( ) return [ ( t. strftime ('% a % m % b'), rgb. cyan ), ( t. strftime ('% h : % m : % s'), rgb. yellow ), ( t. strftime ('% z % z'), rgb. green ) ] | [
-1.2720338106155396,
-0.44818416237831116,
0.8130968809127808,
-0.5933921933174133,
0.000895130739081651,
0.08155358582735062,
-0.8894352316856384,
-0.25914856791496277,
-0.6519775390625,
1.6181522607803345,
-1.2303295135498047,
-0.895858883857727,
0.06228744983673096,
0.2300211638212204,
... |
def num _ tokens ( self, index ) : return max ( self. size ( index ) ) | [
-0.13050197064876556,
0.12321348488330841,
0.4719686210155487,
-0.3785240352153778,
-0.027227668091654778,
-0.9377434253692627,
-0.4436158239841461,
0.18663358688354492,
1.146881103515625,
-1.0523091554641724,
-0.8041506409645081,
-0.07929430156946182,
0.0457490049302578,
-0.36726048588752... |
def _ get _ real _ equivalent _ multiplier ( layers _ shape, classifier, capacity _ equivalent, equiv _ technique ) : dense _ layers = [ d for d in layers _ shape if isinstance ( d, layers. complexdense ) ] # keep only dense layers if capacity _ equivalent : if equiv _ technique = = " alternate " : output _ multiplier ... | [
-1.2958133220672607,
-0.42534497380256653,
0.6975293755531311,
-0.19022724032402039,
0.15980741381645203,
-0.7186223268508911,
0.3742031455039978,
0.33569979667663574,
-0.05901188775897026,
0.981424868106842,
-0.35778430104255676,
-0.7784768342971802,
0.49691537022590637,
0.867876946926116... |
def test _ retrieve _ feed _ entries ( self, _ patched _ request ) : tasks. retrieve _ feed _ entries ( self. stub _ rss _ feed. pk ) # have all rss entries been saved? all _ rss _ entries = models. rssentry. objects. all ( ) all _ entry _ ids = [ rss. pk for rss in all _ rss _ entries ] self. assertsequenceequal ( all... | [
0.059563327580690384,
-0.09518846869468689,
0.6559928059577942,
-0.09596515446901321,
0.5908368229866028,
-0.6510822176933289,
0.39858588576316833,
-0.20547141134738922,
0.5972712635993958,
-0.7948884963989258,
-0.31385791301727295,
-0.04645238071680069,
0.31847524642944336,
0.632091403007... |
def provider _ email ( self ) - > pulumi. output [ str ] : return pulumi. get ( self, " provider _ email " ) | [
0.2322557419538498,
0.5571128129959106,
0.20053040981292725,
0.5004385113716125,
-0.11381438374519348,
1.0797182321548462,
0.16452547907829285,
0.587105393409729,
0.2806299924850464,
0.5147725343704224,
0.6839572787284851,
1.5391672849655151,
0.10741604119539261,
-1.7931395769119263,
-0.... |
def add ( self, item ) : self. items. append ( item ) if item in self. item _ to _ position : self. item _ to _ position [ item ]. add ( len ( self. items ) - 1 ) else : self. item _ to _ position [ item ] = { len ( self. items ) - 1 } | [
-1.3744925260543823,
0.1839987337589264,
0.5227296948432922,
-0.5144626498222351,
0.9195412397384644,
0.6761755347251892,
-0.043188631534576416,
0.4566968083381653,
0.4502549469470978,
0.44276928901672363,
-1.1576216220855713,
-0.8382036685943604,
-0.2451777458190918,
-0.325076162815094,
... |
def install _ home ( ) : return os. path. expanduser ( " ~ " + install _ user ( ) ) | [
0.3588179051876068,
-0.2648555338382721,
0.5569544434547424,
1.5702570676803589,
-0.3134799897670746,
0.33935269713401794,
1.2662174701690674,
0.07626526057720184,
0.11355001479387283,
0.2556595206260681,
0.4895193576812744,
0.13281852006912231,
-0.5357493758201599,
-0.5191718339920044,
... |
def get _ device _ string ( self ) - > str : return self. device. devicestring | [
-0.925370454788208,
-0.640075147151947,
0.22249865531921387,
0.3730141818523407,
-0.2292649894952774,
0.6599956750869751,
0.15972234308719635,
-0.7939996719360352,
0.0952809527516365,
-0.8873792290687561,
1.2518821954727173,
0.756339967250824,
-0.336297869682312,
-0.8922376036643982,
1.2... |
def test _ propagate _ anchors _ custom _ parameter _ on ( ufo _ module ) : font = generate _ minimal _ font ( ) font. customparameters [ " propagate anchors " ] = 1 glyphs = ( ( " sad ", [ ], [ ( " bottom ", 50, - 50 ), ( " top ", 50, 150 ) ] ), ( " dotabove ", [ ], [ ( " top ", 0, 150 ), ( " _ top ", 0, 100 ) ] ), ( ... | [
-0.3291933536529541,
0.13620732724666595,
0.7172422409057617,
-0.9434866905212402,
0.6134294867515564,
0.07989097386598587,
0.6320422291755676,
-0.7408192753791809,
0.9844030141830444,
-0.5672243237495422,
-0.505034327507019,
1.0754647254943848,
0.06225346401333809,
0.10440312325954437,
... |
def instantiate ( json _ data, rest _ api ) : # todo : find some way to cache the json data given inside the view so # we can lazy - load api data. for example, the name of the view # is always included in the json data and therefore queries for # the view name after creation should not require another hit # to the res... | [
-0.25548040866851807,
-0.9638045430183411,
0.6159589290618896,
-0.1764330118894577,
-0.4654805660247803,
-1.05797278881073,
-0.29688188433647156,
-0.5439016819000244,
0.7136567831039429,
-0.35857683420181274,
0.18395371735095978,
0.8403688669204712,
-0.23947246372699738,
-0.327861666679382... |
def run _ game ( maze _ number = 1 ) : app = qtcore. qcoreapplication. instance ( ) if app is none : app = qtwidgets. qapplication ( sys. argv ) # creates a new ui window using the mazegame object window = mazegame ( maze _ number ) window. show ( ) # starts event loop, so gui runs until you exit it. app. exec _ ( ) re... | [
0.20948638021945953,
0.10180152207612991,
0.6283532977104187,
0.95775306224823,
-0.2302231639623642,
0.45723623037338257,
0.8881596326828003,
0.41322824358940125,
0.37699392437934875,
-0.1682056188583374,
0.2530747354030609,
-0.13731829822063446,
-1.300943374633789,
0.532246470451355,
0.... |
def format _ basis _ for _ cfour ( molrec, ropts, native _ puream, verbose = 1 ) : # puream ) : accession = uuid. uuid4 ( ) text = [ ] for iat, elem in enumerate ( molrec ['elem'] ) : text. append ( " " " { } : cd _ { } " " ". format ( elem. upper ( ), iat + 1 ) ) text. append ('' ) text. append ('' ) text ='\ n '. joi... | [
-0.18188761174678802,
-0.7424669861793518,
0.6816437244415283,
-0.20606331527233124,
-0.33798813819885254,
0.38902801275253296,
-0.094950370490551,
0.06581339985132217,
0.11667574197053909,
0.41901281476020813,
0.6815183758735657,
0.4138481616973877,
-0.21860933303833008,
0.591103732585907... |
def add _ attention _ gate _ params ( gate, gate _ name ) : return ( self. add _ param ( gate. w _ in, ( visual _ shape [ 2 ], num _ units ), name = " v _ in _ to _ { } ". format ( gate _ name ) ), self. add _ param ( gate. w _ in, ( num _ units, num _ units ), name = " h _ in _ to _ { } ". format ( gate _ name ) ), se... | [
0.13225875794887543,
-0.3350446820259094,
0.7214999794960022,
-0.5229877829551697,
-0.028478140011429787,
0.2758001387119293,
0.21555596590042114,
-0.14964215457439423,
-0.3843162953853607,
1.153853416442871,
0.13371284306049347,
1.2967063188552856,
-0.4434396028518677,
1.27757728099823,
... |
def setmember ( self, member ) : self. name = member ['name']. decode ('latin - 1'). encode ( " utf - 8 " ) self. member _ id = member ['member _ id'] self. person _ id = member ['person _ id'] self. party = member ['party']. decode ('latin - 1'). encode ( " utf - 8 " ) self. constituency = member ['constituency']. dec... | [
-0.22816872596740723,
-0.9001109004020691,
0.19744321703910828,
-0.5971788167953491,
-0.43278568983078003,
0.11173875629901886,
-2.2887885570526123,
0.15490025281906128,
-0.2956322431564331,
0.2228119820356369,
-1.427140474319458,
0.637867271900177,
-0.6833907961845398,
0.07574412971735,
... |
def set _ logging ( log _ level, myfilename = none ) : if myfilename and ipython _ version : try : if ipython _ version. startswith ( " 0. 10 " ) : _ _ ipython _ _. set _ custom _ exc ( ( exception, ), ipython _ exception _ handler ) else : ip = get _ ipython ( ) ip. set _ custom _ exc ( ( exception, ), ipython _ excep... | [
-0.11812830716371536,
-0.7150554656982422,
0.6835055947303772,
-0.14914043247699738,
-0.20447202026844025,
-0.03895600885152817,
0.27664485573768616,
0.943594217300415,
-0.38856619596481323,
-0.7595790028572083,
-0.12557372450828552,
0.11848613619804382,
-0.428004652261734,
-0.123795554041... |
def process _ raw _ text ( ) : text _ file _ path = " / home / gyzhang / speech _ database / cstelling / old _ fine _ cut _ audio _ data / storytelling _ out _ jyutping " audio _ dir = " / home / gyzhang / speech _ database / cstelling / old _ fine _ cut _ audio _ data / sentence " new _ audio _ dir = " / home / gyzhan... | [
0.03754878789186478,
-0.3473168611526489,
0.9406507015228271,
0.2810116410255432,
-0.249137282371521,
0.15661554038524628,
0.4319385588169098,
0.5713040232658386,
-0.3109668791294098,
0.9133241176605225,
-0.20997631549835205,
0.31274211406707764,
0.2653385102748871,
0.03868694603443146,
... |
def create _ test _ image ( dimensions = ( 1000, 1000 ), geotransform = none, projection = none, resolution = ( 25. 0, 25. 0 ), dtype = " uint8 ", ) : img = numpy. random. randint ( 0, 256, dimensions ). astype ( dtype ) if ( geotransform is none ) or ( projection is none ) : geotransform = ( 635000. 0, 25. 0, 0. 0, 62... | [
0.3489014804363251,
0.21467645466327667,
0.6933718919754028,
-0.26178407669067383,
0.12357441335916519,
0.23028475046157837,
0.3464229106903076,
-0.398578405380249,
0.3792809545993805,
-0.4048323333263397,
0.31874939799308777,
0.160701721906662,
-0.18689922988414764,
0.7543349862098694,
... |
def resnext50 _ 32x4d ( pretrained = false, progress = true, * * kwargs ) : kwargs ['groups'] = 32 kwargs ['width _ per _ group'] = 4 return _ resnet ('resnext50 _ 32x4d ', bottleneck, [ 3, 4, 6, 3 ], pretrained, progress, * * kwargs ) | [
-0.34360918402671814,
0.5379591584205627,
0.25777655839920044,
-0.5146450400352478,
-0.9003350138664246,
0.20625154674053192,
0.05465193837881088,
-1.1714931726455688,
-0.5442125797271729,
-0.4006845951080322,
-0.9214591979980469,
-0.529175877571106,
-0.9449310302734375,
0.2042527347803115... |
def ticker ( self, ticker ) : if self. _ configuration. client _ side _ validation and ticker is none : raise valueerror ( " invalid value for ` ticker `, must not be ` none ` " ) # noqa : e501 self. _ ticker = ticker | [
0.12550444900989532,
0.302837073802948,
-0.2269268035888672,
0.7867488265037537,
0.27721261978149414,
1.3142566680908203,
1.5683050155639648,
0.08342521637678146,
-0.22572119534015656,
-0.564338207244873,
-1.0780611038208008,
-0.07593250274658203,
-0.3186175227165222,
1.1697485446929932,
... |
def new _ config ( config _ file ) : cfg = cosmic _ ray. commands. new _ config ( ) config _ str = serialize _ config ( cfg ) config _ file. write ( config _ str ) sys. exit ( exitcode. ok ) | [
0.3117624819278717,
-0.9291496276855469,
0.27720436453819275,
0.5861247777938843,
0.7347089648246765,
0.49868854880332947,
0.7216543555259705,
1.4187867641448975,
-1.2117315530776978,
0.47881317138671875,
-1.1530557870864868,
-0.35941779613494873,
0.22032882273197174,
0.7957767844200134,
... |
def _ _ init _ _ ( self, name : str, offset : int, width : int, description : str = none, reverse : bool = false, access : str = none ) - > none : self. name = name self. offset = offset self. width = width self. description = description or " n / a " self. access = access or " n / a " self. reverse = reverse self. _ b... | [
0.2662407159805298,
0.4583323299884796,
0.694977343082428,
-0.4622614085674286,
-0.16969822347164154,
0.3494200110435486,
0.37626999616622925,
0.06136677414178848,
0.29627519845962524,
0.03455980122089386,
-0.803131103515625,
0.9237127900123596,
-0.613709568977356,
0.530902087688446,
0.2... |
async def fml ( self, ctx ) - > none : response = get ( " https : / / www. fmylife. com / random " ) soup = beautifulsoup ( response. content, " html. parser " ) tag = soup. find _ all ( " p ", class _ = " block " ) [ 0 ] message = embed ( ) message. set _ thumbnail ( url = " https : / / 99clonescripts. com / wp - cont... | [
-0.4935288429260254,
0.7928061485290527,
0.5450567603111267,
-0.20641550421714783,
0.09725278615951538,
-0.5211952924728394,
-0.5357704758644104,
-0.20314744114875793,
0.4237495958805084,
-1.140710473060608,
-0.44673842191696167,
0.7417693734169006,
-0.057666949927806854,
0.753392279148101... |
def project _ point ( x0, y0, dist, angle ) : # todo : check that the docstring is correct # todo : check that alghorithm below is correct y1 = y0 + math. cos ( angle * rad ) * dist x1 = x0 + math. cos ( ( 90 - angle ) * rad ) * dist return x1, y1 | [
0.030445445328950882,
-0.2899101972579956,
0.1515771597623825,
-0.5094228982925415,
-0.35181304812431335,
0.0566742978990078,
-0.19676411151885986,
1.0085856914520264,
0.45040106773376465,
0.9924366474151611,
-0.08131424337625504,
-0.0698007345199585,
-0.15093748271465302,
-0.6300491690635... |
def imread ( self, path, is _ grayscale = true ) : if is _ grayscale : # flatten = true read the image as a grayscale map. return scipy. misc. imread ( path, flatten = true, mode ='ycbcr'). astype ( np. float ) else : return scipy. misc. imread ( path, mode ='ycbcr'). astype ( np. float ) | [
-0.7690725326538086,
-0.1577146202325821,
0.6709544658660889,
-0.28476327657699585,
-0.26179957389831543,
0.09375141561031342,
-0.4580235183238983,
-0.2713112533092499,
0.37769776582717896,
0.40874049067497253,
1.6785815954208374,
0.7696720957756042,
-0.3323463499546051,
0.3092587292194366... |
def delete _ object ( self, index ='', for _ show = false, fromnote = true ) : old _ attribute = self. attribute self. attribute = curses. a _ normal if index in self. object _ dict and'p'in self. object _ dict [ index ] : positions = self. object _ dict [ index ] ['p'] up _ bound = positions [ 0 ] left _ bound = posit... | [
-0.19679608941078186,
-0.9574242234230042,
0.9055145978927612,
-1.049605369567871,
-0.7042630910873413,
0.40421780943870544,
1.3135684728622437,
-0.01793561689555645,
0.4255037307739258,
0.4709753394126892,
0.34267306327819824,
0.6201882362365723,
0.13548554480075836,
-0.2327043116092682,
... |
def progress _ bar _ advance ( increment : int = 1 ) : daemon _ request. advance _ progress ( { " increment " : increment } ) | [
-1.5316057205200195,
0.10171958804130554,
0.5507231950759888,
0.3266855478286743,
0.13670846819877625,
0.11973682790994644,
0.05316402018070221,
-0.8010938167572021,
-0.39927706122398376,
-1.4469515085220337,
0.15897004306316376,
-0.15228039026260376,
-0.7534723281860352,
1.063149809837341... |
async def get _ file ( self, file _ key : str ) - > t. optional [ t. io ] : loop = asyncio. get _ running _ loop ( ) func = functools. partial ( self. get _ file _ sync, file _ key = file _ key ) return await loop. run _ in _ executor ( self. executor, func ) | [
0.13937373459339142,
0.11124859750270844,
0.472121924161911,
0.4364157021045685,
0.5943259000778198,
-1.1708029508590698,
-0.2589290738105774,
-0.05587437003850937,
-1.22747802734375,
-0.022735966369509697,
0.5697431564331055,
-0.009171919897198677,
0.4234224855899811,
-0.08314300328493118... |
def calc _ lpfbwtx ( self, model ) : # due to a hw problem with pll overshooting choose target bw of frequency synthesize # lpf as 1. 5 times the channel bandwidth chosen. target _ bw _ khz = 1. 5 * model. vars. bandwidth _ actual. value / 1000. 0 if target _ bw _ khz < 250 : model. vars. pll _ bandwidth _ tx. value = ... | [
0.3477908968925476,
-0.3227106034755707,
0.937353789806366,
-0.26566851139068604,
-0.3559269905090332,
-0.22174209356307983,
0.5053738355636597,
0.010619026608765125,
0.10037495195865631,
-0.033007342368364334,
-0.8526825308799744,
0.6649697422981262,
-0.9504040479660034,
0.154235497117042... |
def test _ console _ working _ flight ( c, users : list [ user ], flights : list [ flight ] ) : mock _ data = [ " line1 ", " line2 ", "... ", " line1000 " ] httpretty. register _ uri ( httpretty. get, f " http : / / container - nodeodm : 3000 / task / { flights [ 0 ]. uuid } / output ", body = json. dumps ( mock _ data... | [
-0.7200701832771301,
0.32300448417663574,
0.6973586082458496,
-0.561509907245636,
0.5801014304161072,
-0.13233943283557892,
-0.27089202404022217,
-0.6840676665306091,
-0.8735686540603638,
-0.5371237397193909,
0.06195024028420448,
0.07468787580728531,
-0.3316345512866974,
-0.466989070177078... |
def test _ incoming _ edge _ traversals ( self ) : e1 = testedge. create ( self. v1, self. v2, numbers = 12 ) e2 = testedge. create ( self. v1, self. v3, numbers = 13 ) e3 = othertestedge. create ( self. v2, self. v3, numbers = 14 ) results = self. v2. ine ( ) assert len ( results ) = = 1 assert e1 in results results =... | [
0.1480848789215088,
0.8157128691673279,
0.5719287395477295,
0.31884390115737915,
0.45037370920181274,
0.8116858601570129,
0.826653778553009,
-0.3232245445251465,
-0.17654424905776978,
-0.10210924595594406,
-0.04747893661260605,
-0.7318132519721985,
-1.341392993927002,
-0.09652332216501236,... |
def computecenter2d ( pointlist ) : x = 0. y = 0. for point in pointlist : x1, y1 = point. getcoordinates ( ) x + = x1 ; y + = y1 pass den = 1. / len ( pointlist ) x = x * den y = y * den return point2d ( x, y ) | [
-0.5710384249687195,
-0.609081506729126,
0.4232889711856842,
0.5768036246299744,
0.017998119816184044,
0.47123146057128906,
0.16380298137664795,
-0.24063579738140106,
0.39520418643951416,
0.48395881056785583,
0.1404641568660736,
-0.4638175070285797,
0.31433311104774475,
0.379171222448349,
... |
def get _ syllable _ timing ( elements, hop _ length _ ms ) : # get unique points unique _ elements = np. unique ( elements [ elements! = 0 ]. astype ( int ) ) # get the time coverage of each element total _ coverage = [ np. sum ( elements = = i, axis = 0 ) for i in tqdm ( unique _ elements, desc = " element coverage "... | [
0.01473347656428814,
0.48290348052978516,
0.7917110323905945,
0.6619991660118103,
-0.488598495721817,
-0.4627910554409027,
0.6003707051277161,
0.5685763955116272,
0.5728428959846497,
1.0343040227890015,
-0.7386055588722229,
0.031362876296043396,
0.4047066271305084,
0.8373216986656189,
-0... |
def invalid _ move _ out _ of _ bounds ( ) : print ( " invalid move, outside board, try again : " ) | [
0.6062533855438232,
-0.5281676650047302,
0.3330664336681366,
0.9549365639686584,
-1.0313071012496948,
0.5488727688789368,
-0.44857412576675415,
-0.12235158681869507,
-0.2952756881713867,
-0.002225597621873021,
0.5733104348182678,
1.6421977281570435,
-0.5912643074989319,
-0.3980562388896942... |
def main ( options ) : config = readconfig ( options. output _ dir, options. input _ file ) registered _ dll _ list = scanserverdlls ( config, options. distribution, options. output _ dir ) createregistereddllincludefile ( registered _ dll _ list, options. header _ output _ dir ) | [
0.6372438669204712,
0.11550985276699066,
0.518748939037323,
0.8394492864608765,
-0.27705246210098267,
0.150076761841774,
0.3177267014980316,
0.8248206973075867,
0.45592203736305237,
0.1622982919216156,
-0.37913447618484497,
0.5118783712387085,
-0.2113831490278244,
-0.2236557900905609,
0.... |
def insert ( self, index : int, value : _ t ) - > none : # grab original layout, insert there, rebuild. # list will take care of index. arr : list [ _ t ] = self. original _ layout ( ) arr. insert ( index, value ) self. _ st = self. bit _ layout ( arr, self. binop ) | [
-0.6258541345596313,
0.6719099283218384,
0.36996716260910034,
-0.07236719131469727,
-0.4530789256095886,
0.3632204532623291,
1.1816147565841675,
0.17482350766658783,
0.07563050091266632,
-0.0965568944811821,
-0.9891139268875122,
-0.13537205755710602,
-0.15890488028526306,
-0.87907505035400... |
def delete _ supplier ( request ) : if request. method = ='post': # load existing supplier supplier = supplier. objects. get ( pk = request. post. get ('supplier _ pk') ) supplier. delete ( ) message ='deleted'# load all suppliers of the requirement suppliers = supplier. objects. filter ( requirement _ id = request. po... | [
-0.46523332595825195,
-0.24744275212287903,
0.6916903853416443,
0.1806999295949936,
-0.7417292594909668,
-0.6177944540977478,
-0.010438919067382812,
0.8688151836395264,
0.2872776985168457,
0.746057391166687,
-0.09486758708953857,
0.07721950858831406,
0.28761738538742065,
1.3110134601593018... |
def prop _ hex _ wavefront ( wf, nrings, hexrad, hexsep, zernike _ val = 0, * * kwargs ) : if not " xcenter " in kwargs : xc = 0. if not " ycenter " in kwargs : yc = 0. n = proper. prop _ get _ gridsize ( wf ) dx = proper. prop _ get _ sampling ( wf ) aperture = np. zeros ( [ n, n ], dtype = np. float64 ) if " rotation... | [
-0.6172472834587097,
-0.3015972971916199,
0.8952487707138062,
-0.9223004579544067,
-0.2669871747493744,
0.2159532606601715,
0.1591884195804596,
0.5756335258483887,
0.559305727481842,
0.7984737753868103,
0.1993861198425293,
0.021562356501817703,
-0.028913844376802444,
0.4515080749988556,
... |
def assist ( self ) : continue _ conversation = false device _ actions _ futures = [ ] # ctr _ led ('listening') subprocess. popen ( [ " aplay ", " { } / sample - audio - files / fb. wav ". format ( root _ path ) ], stdin = subprocess. pipe, stdout = subprocess. pipe, stderr = subprocess. pipe ) self. conversation _ st... | [
-0.04925363510847092,
-0.6533000469207764,
0.8291822671890259,
0.3150496780872345,
-0.3938021659851074,
-0.18685130774974823,
0.31618350744247437,
-0.9114342927932739,
-0.19499079883098602,
0.1685114949941635,
0.6738355159759521,
0.3798365592956543,
-0.14145588874816895,
0.8969523906707764... |
def command ( version, unpack, ignore, stderr, keep, string ) : if version : print ( " version : ", _ _ version _ _ ) sys. exit ( 0 ) for line in sys. stdin : try : jobj = tools. loader ( line ) to _ unpack = tools. keep ( jobj, keep ) to _ stringify = tools. unpack ( to _ unpack, unpack ) out = tools. stringify ( to _... | [
0.29808324575424194,
-0.7299343347549438,
1.0950216054916382,
-0.10888040065765381,
-0.5487681031227112,
0.03479119390249252,
-0.5491819381713867,
-0.4740746319293976,
-0.2967061996459961,
0.2929782569408417,
-0.44059300422668457,
0.1617555320262909,
0.05613591894507408,
-0.126873806118965... |
async def drop _ table _ teacher _ application ( self, ctx ) - > none : if not await self. table _ teacher _ application _ exists ( ) : return await ctx. send ( " * * table ` teacherapplication ` doesn't exist! * * " ) mycursor, db = await the _ database ( ) await mycursor. execute ( " drop table teacherapplication " )... | [
-0.8315469026565552,
-0.017965042963624,
0.534246027469635,
1.0209038257598877,
0.4640856981277466,
1.2344493865966797,
0.47389328479766846,
0.07971042394638062,
-0.6073601245880127,
0.8379373550415039,
-0.02436063252389431,
0.367502361536026,
-0.6625499725341797,
0.8055636286735535,
0.5... |
def delete ( self, url, expected _ response = none, auth = none, * * kwargs ) : pnote ( " perform a http delete ", " info " ) try : response = self. req. delete ( url, auth = auth, * * kwargs ) except exception as e : status, response = self. catch _ expection _ return _ error ( e, url ) else : status = self. report _ ... | [
-0.4611330032348633,
-0.18667322397232056,
0.6456840634346008,
0.44795674085617065,
1.001542091369629,
0.23909319937229156,
0.4235072135925293,
0.5079742670059204,
1.1451534032821655,
-0.1536034494638443,
0.08669444173574448,
0.25264766812324524,
-0.7714162468910217,
-0.12434957176446915,
... |
def open _ menu _ _ create ( self ) : self. wait _ for _ create _ menu ( ). click ( ) | [
-0.5439854264259338,
0.549976646900177,
0.27878883481025696,
0.644019365310669,
0.8898493051528931,
0.3659666180610657,
0.4036199748516083,
0.5266536474227905,
-0.9500159621238708,
-1.1522843837738037,
0.1878153383731842,
-0.08823462575674057,
-0.10738449543714523,
0.6946632862091064,
0.... |
def getlook ( self, lookname ) : pass | [
-1.1407883167266846,
0.08833467215299606,
0.3252807557582855,
0.40829089283943176,
-0.4519995152950287,
0.2254900485277176,
0.29079270362854004,
-1.4445476531982422,
0.0017880400409922004,
-0.28067994117736816,
0.03917701914906502,
1.3074820041656494,
-0.4491305351257324,
-0.19323933124542... |
def test _ multiplication _ matrix _ by _ vector ( self ) : vector = vector ( [ 1, 2 ] ) assert ( [ 5, 10 ] = = ( self. matrix * vector ) ) assert ( [ 5, 8, 11 ] = = matrix ( [ [ 1, 2 ], [ 2, 3 ], [ 3, 4 ] ] ) * vector ) self. assertraises ( differentdimensionerror, \ self. matrix. vectormultiplication, vector ( [ 1, 2... | [
-0.6478374004364014,
0.19337578117847443,
0.2887238562107086,
0.6388069987297058,
-0.10030709207057953,
0.0012476033298298717,
1.0675466060638428,
-0.46801355481147766,
0.24068152904510498,
-0.20483209192752838,
-0.4819824695587158,
-0.5168246626853943,
-0.01615704409778118,
0.555994868278... |
def mobile _ template ( template ) : def decorator ( f ) : @ wraps ( f ) def wrapper ( request, * args, * * kw ) : fmt = {'mobile /':'mobile /'if request. mobile else'' } kw ['template'] = template. format ( * * fmt ) return f ( request, * args, * * kw ) return wrapper return decorator | [
-0.8285316228866577,
-0.6056981086730957,
0.5900742411613464,
0.3342309594154358,
-0.911965012550354,
-0.15193890035152435,
-0.4434064030647278,
-0.04371216893196106,
1.0895510911941528,
-0.005452932324260473,
0.8698914647102356,
-0.82200026512146,
0.5231059789657593,
0.0529378205537796,
... |
def from _ vocabfile ( filename ) : word _ count = [ x. strip ( ). split ( ) for x in _ open ( filename,'r'). read ( ). splitlines ( ) ] word _ count = ordereddict ( [ ( w, int ( c ) ) for w, c in word _ count ] ) return countedvocabulary ( word _ count = word _ count ) | [
0.8719295859336853,
-1.1198488473892212,
0.29515478014945984,
-0.11071769893169403,
-0.43303579092025757,
-0.055085498839616776,
0.1071094423532486,
0.4677887260913849,
-0.6558364629745483,
0.2404981404542923,
-0.534118115901947,
-0.008942651562392712,
0.15081602334976196,
0.41881027817726... |
def connect ( signal, slot, connection _ type = q. qt. uniqueconnection ) : if signal is not none and slot is not none : signal. connect ( slot, connection _ type ) | [
0.43326258659362793,
-0.6115226745605469,
0.45004042983055115,
0.5682169795036316,
0.019489675760269165,
0.015449592843651772,
0.031226208433508873,
-0.22820782661437988,
-0.05207341909408569,
0.23617376387119293,
-0.02686086855828762,
0.03343293443322182,
0.4276091158390045,
1.37906277179... |
def test _ importall ( self ) : for cls in internet. _ _ all _ _ : self. asserttrue ( hasattr ( internet, cls ),'% s not importable from twisted. application. internet'% ( cls, ) ) | [
0.12700068950653076,
-0.15642693638801575,
0.579592227935791,
0.9379819631576538,
0.9109252095222473,
1.7704777717590332,
0.3883432149887085,
0.10115684568881989,
0.09158149361610413,
0.8816543817520142,
-0.6752047538757324,
-0.7865474820137024,
-0.07188858836889267,
0.7588320970535278,
... |
def integer _ var _ list ( size, min = none, max = none, name = none, domain = none ) : dom = _ build _ int _ var _ domain ( min, max, domain ) res = [ ] if name is none : for i in range ( size ) : res. append ( cpointvar ( dom ) ) else : name = name + " _ " for i in range ( size ) : res. append ( cpointvar ( dom, name... | [
-0.8776425123214722,
0.48430880904197693,
0.383005291223526,
0.009393868036568165,
-0.7592319846153259,
-0.229088693857193,
-0.7187607884407043,
-0.21959730982780457,
0.19524423778057098,
0.5502334237098694,
-1.3097131252288818,
0.04981868341565132,
-0.07727024704217911,
0.2234327346086502... |
def getfluxsample ( self, nsamples = 5000 ) : optgps = optgpsampler ( self. gem, thinning = 100, processes = 3 ) samplersample = optgps. sample ( nsamples ) sample = samplersample [ optgps. validate ( samplersample ) = = " v " ] return sample | [
0.052812717854976654,
0.10329616814851761,
0.27155250310897827,
0.609151303768158,
-0.800325334072113,
-0.6021051406860352,
-0.30982717871665955,
-0.8922621011734009,
1.1205991506576538,
-0.16824199259281158,
0.31554123759269714,
0.8627321124076843,
-1.076621174812317,
0.4492183029651642,
... |
def _ get _ arr _ same _ size _ object ( same _ arr _ size _ list, size ) : for elem in same _ arr _ size _ list : if elem. size = = size : return elem return none | [
0.743925929069519,
-1.1069414615631104,
0.48845943808555603,
0.6258084774017334,
-0.18893606960773468,
0.06301532685756683,
0.6783317923545837,
-0.9456066489219666,
1.2000203132629395,
0.10239514708518982,
-0.29979273676872253,
1.0331319570541382,
-0.5163455605506897,
0.2776811718940735,
... |
def getotherconnectedsidesmemo ( side ) : ret = { } for connside in hexsideinitializer. getallconnectedsides ( side ) : tmp = [ ] # get common vertex commonvertex = side. getconnectionvertex ( connside ) # get all other sides which share the common vertex for commonside in commonvertex. sides : if commonside! = side an... | [
0.7915072441101074,
0.01497524231672287,
0.7071524858474731,
-0.3715604245662689,
-0.37609991431236267,
-0.24521631002426147,
0.08175460994243622,
-0.4494945704936981,
0.28107666969299316,
0.02140222303569317,
-1.2312970161437988,
-0.6790868043899536,
-0.716556191444397,
1.1419522762298584... |
def add _ node ( self, address ) : parsed _ url = urlparse ( address ) self. nodes. add ( parsed _ url. netloc ) | [
-0.7677951455116272,
0.4169911742210388,
0.37085723876953125,
-1.0297930240631104,
0.6989131569862366,
0.44159772992134094,
-0.45835572481155396,
1.2498425245285034,
1.0154892206192017,
-0.3413388729095459,
-0.35526901483535767,
0.8598331809043884,
0.12700161337852478,
-0.128043070435524,
... |
def time _ passed ( self ) - > float : return self. current _ time _ step * self. dt | [
-0.35749924182891846,
0.4326643645763397,
0.4862629771232605,
0.5405709743499756,
0.23284530639648438,
0.7359443306922913,
0.013109061866998672,
-0.42554613947868347,
-1.205553412437439,
-0.048035744577646255,
-0.136610209941864,
-0.798764705657959,
0.0709550678730011,
0.6563959717750549,
... |
def integrate ( self ) : self. moments = odeint ( self. derivs, self. sigma0, self. positions, atol = self. atol ) if self. mm _ mrad : self. moments * = 1e6 | [
0.5299459099769592,
0.3016864061355591,
0.28555333614349365,
-1.193160891532898,
0.06774161010980606,
-0.5827398300170898,
0.5051102042198181,
0.12535850703716278,
-0.2187342643737793,
-0.3315321207046509,
-0.24924784898757935,
-0.5868197083473206,
-0.6976811289787292,
0.7532721161842346,
... |
def _ solve _ amplitude ( data, ufit, error = none ) : if error is none : error = np. ones _ like ( data ) error = np. where ( error = = 0., 1., error ) dn = data / error fn = ufit / error iamp = np. sum ( dn * dn ) / np. sum ( dn * fn ) return iamp | [
-0.4326714277267456,
-0.15147922933101654,
0.5507973432540894,
0.0709925964474678,
-0.3015134632587433,
-0.07099635154008865,
0.16270719468593597,
0.30156585574150085,
0.7331929802894592,
0.00037627218989655375,
0.4960227906703949,
0.11286456137895584,
-0.5988932847976685,
-0.5885042548179... |
def load _ coords ( codes, center _ coords = true, path = '. / data / { 0 }. pdb') : structs = [ structureparser ( path. format ( code ) ). parse ( ) for code in codes ] coords = [ struct. get _ coordinates ( ['ca'] ) for struct in structs ] if center _ coords : coords = [ xyz - xyz. mean ( 0 ) for xyz in coords ] retu... | [
-0.6224387884140015,
0.1723870038986206,
0.47996529936790466,
-0.36657068133354187,
0.2289327085018158,
0.006030399817973375,
-0.1011381447315216,
0.7516729235649109,
0.564960241317749,
0.0005821796949021518,
-0.4966701865196228,
-1.1826536655426025,
-0.8426627516746521,
0.1276042908430099... |
def test _ str _ special ( ) : s = str ( d ) assert _ true ( type ( s ) is str ) | [
0.053563956171274185,
0.621293306350708,
0.04078018292784691,
0.4921064078807831,
-0.13638007640838623,
0.9671229720115662,
-0.23225556313991547,
0.374939888715744,
0.8406678438186646,
-0.8013333082199097,
0.06308307498693466,
0.9409645795822144,
0.40072470903396606,
-0.15625394880771637,
... |
def icmp _ code ( self ) - > optional [ pulumi. input [ int ] ] : return pulumi. get ( self, " icmp _ code " ) | [
0.289302259683609,
0.055785682052373886,
0.24252718687057495,
0.3746630847454071,
1.3062347173690796,
0.7307147979736328,
0.9954273700714111,
0.9165313839912415,
1.0029027462005615,
0.2639614939689636,
0.16510865092277527,
0.38436833024024963,
-0.9840359091758728,
-0.9725568890571594,
0.... |
def close _ fig ( self ) - > none : assert self. _ axes is not none assert self. _ fig is not none self. remove _ annotations ( ) self. remove _ legend ( ) self. _ axes. remove ( ) self. _ axes = none self. _ fig. clear ( ) self. _ fig = none gc. collect ( ) | [
0.7620829939842224,
0.21236808598041534,
0.38778841495513916,
-1.0325344800949097,
-0.18762727081775665,
0.8466554284095764,
1.133893609046936,
-0.658941388130188,
-0.9022777676582336,
-0.9832883477210999,
-0.1299356371164322,
0.2791661322116852,
0.12704531848430634,
0.22984333336353302,
... |
def test _ blink ( self ) : self. assertequal ( text. assembleformattedtext ( a. blink ['hello, world.'] ),'\ x1b [ 5mhello, world.') | [
0.48550423979759216,
-1.0622559785842896,
0.4214877188205719,
0.6599197387695312,
0.029918653890490532,
0.5383443236351013,
-0.41412368416786194,
0.13945592939853668,
0.8136186003684998,
0.19853591918945312,
-0.5936367511749268,
0.7393550276756287,
-0.9786577820777893,
0.4012030065059662,
... |
def _ report _ attack _ failure ( self, curl _ handle, dest _ url, payload, \ attack _ vector, orig _ url, url _ orig _ hash ) : options = self. options self. hash _ notfound. append ( ( dest _ url, payload ['browser'], " errorcode " ) ) self. report ( " - " * 45 ) for reporter in self. _ reporters : reporter. add _ fa... | [
-0.5646030902862549,
-0.2645527422428131,
0.6814637184143066,
-0.25850972533226013,
0.5967769622802734,
-0.633698582649231,
0.422091007232666,
-0.25085973739624023,
-0.29440852999687195,
-0.43916550278663635,
0.09284555166959763,
-0.5069556832313538,
-0.06196078658103943,
0.145735561847686... |
def update _ with _ move ( self, last _ move ) : if last _ move in self. _ root. _ children : self. _ root = self. _ root. _ children [ last _ move ] self. _ root. _ parent = none else : self. _ root = treenode ( none, 1. 0 ) | [
0.01850946620106697,
-0.15413641929626465,
0.6435795426368713,
-0.34759658575057983,
-0.1498296707868576,
-1.0916603803634644,
-0.22926659882068634,
-0.23701882362365723,
0.575453519821167,
0.891111433506012,
-0.6179801821708679,
0.23519062995910645,
-0.7984904646873474,
0.520490288734436,... |
def device _ index ( self ) - > pulumi. input [ int ] : return pulumi. get ( self, " device _ index " ) | [
-0.3077174425125122,
1.0387639999389648,
0.38309141993522644,
0.4152059257030487,
0.8266547322273254,
1.338152527809143,
1.9039965867996216,
0.7099670767784119,
0.704623281955719,
-0.7903620600700378,
0.2750966548919678,
1.1522893905639648,
0.07406454533338547,
-1.0981251001358032,
0.599... |
def addnewrandommove ( state, statelist ) : nextneigh = state. makerandommove ( ) count = 0 while alreadyin ( nextneigh, statelist ) : nextneigh = state. makerandommove ( ) count + = 1 if count > 100 : # if tried 100 times and no valid new neighbor, give up! return statelist. append ( nextneigh ) | [
-1.5300170183181763,
0.4366723299026489,
0.5785927772521973,
0.5528964400291443,
-0.6115508079528809,
0.4065607786178589,
-0.8107333779335022,
-0.43406423926353455,
0.7251907587051392,
0.4934501349925995,
-0.904719889163971,
-0.650408923625946,
-0.6627758741378784,
-0.08945513516664505,
... |
def probe ( cls, deployment _ root ) : assert os. path. isdir ( deployment _ root ) return false | [
-0.2816322445869446,
0.16051162779331207,
0.5061956644058228,
0.928189218044281,
0.24300582706928253,
0.7822896242141724,
0.19188565015792847,
-0.33132854104042053,
0.8987869620323181,
0.49087029695510864,
1.3164223432540894,
-0.3125419616699219,
-0.6561310291290283,
0.5936552882194519,
... |
def chunk ( nb _ item, nb _ chunks, start _ offset = 0 ) : if nb _ item < = nb _ chunks : return [ slice ( max ( 0, idx - start _ offset ), idx + 1 ) for idx in range ( nb _ item ) ] quotient = nb _ item / / nb _ chunks remainder = nb _ item % nb _ chunks quotients = [ quotient ] * nb _ chunks remainders = [ 1 ] * rema... | [
0.16022606194019318,
-0.32141825556755066,
0.7918785810470581,
0.6075842380523682,
0.3582497835159302,
0.7527980208396912,
0.3705987334251404,
0.14563114941120148,
-0.11013384163379669,
-0.1042039766907692,
-0.17979560792446136,
-0.2997106909751892,
0.3520979583263397,
0.06719240546226501,... |
def if _ positive ( criterion, then _, else _, out = none, queue = none ) : if not ( criterion. shape = = then _. shape = = else _. shape ) : raise valueerror ( " shapes do not match " ) if not ( then _. dtype = = else _. dtype ) : raise valueerror ( " dtypes do not match " ) if out is none : out = empty _ like ( then ... | [
0.7711042165756226,
-0.18362395465373993,
0.6220864057540894,
1.1385102272033691,
-0.4817066192626953,
-0.5684022307395935,
-0.8353601098060608,
-0.4263482391834259,
-0.8648895025253296,
0.7730894684791565,
0.41234540939331055,
0.2288292795419693,
0.5723883509635925,
0.26220205426216125,
... |
def predict ( self, x, sigma = none ) : x = self. _ reshape _ x ( x ) if not self. _ fitted : raise exception ('not fitted!') return np. dot ( self. _ phi ( x, sigma = sigma ), self. _ alpha ). reshape ( ( x. shape [ 0 ], ) ) | [
-0.4398594796657562,
0.1674526333808899,
0.6115121841430664,
0.43407073616981506,
-0.7878822684288025,
-0.42322784662246704,
-0.14080946147441864,
0.8629846572875977,
0.6465541124343872,
-0.23315364122390747,
-0.789975106716156,
0.7309531569480896,
-0.2948051691055298,
0.6014121174812317,
... |
def findnumdoublesquares ( num ) : if ( num = = 0 ) : # special case return 1 highestvalue = findlargestsquare ( num ) lowestvalue = findsmallestsquare ( num ) count = 0 for i in range ( lowestvalue + 1, highestvalue + 1 ) : if ( issumofdoublsquares ( num, i ) ) : count + = 1 return ( count ) | [
-0.8443192839622498,
0.5357145071029663,
0.8405529260635376,
0.5289806127548218,
-0.4896644353866577,
0.009629643522202969,
1.6101770401000977,
-0.7238472104072571,
0.4496040642261505,
-0.5221645832061768,
-1.3891489505767822,
0.3515896499156952,
0.12091882526874542,
0.9313703775405884,
... |
def get _ self _ recent _ media ( self ) : return self. get _ user _ recent _ media ('self') | [
-0.9854398369789124,
-0.03443954512476921,
0.5909068584442139,
0.43285995721817017,
-0.19020196795463562,
-0.6830692887306213,
0.8529390692710876,
-1.0250967741012573,
-0.39893805980682373,
-0.6519567966461182,
-0.16071833670139313,
0.7574343085289001,
-0.5661128163337708,
0.32692945003509... |
def fixobjectbasenamecollisions ( disjoint _ sets, all _ sources, do _ rename _ cb, log _ renames = true ) : sourcerename = collections. namedtuple ('sourcerename ','old _ path, new _ path') known _ basenames = set ( ) all _ renames = set ( ) # set of files that have renames, but no longer collide. old _ renames _ to _... | [
0.06447791308164597,
-0.6519070863723755,
0.9778620600700378,
-0.36325302720069885,
-0.027826650068163872,
-0.02171393670141697,
0.6873672604560852,
-0.22525881230831146,
0.06352170556783676,
0.2985859513282776,
0.1279071867465973,
-0.27242928743362427,
0.3117615282535553,
0.13885749876499... |
def handlemakefile ( properties ) : with open ( os. path. join ( consts. resources,'makefile'),'r') as f : makefile = f. read ( ) with open ( os. path. join ( consts. path,'makefile'),'w') as f : f. write ( makefile % ( properties ['website'] ['name'], \ os. path. join ( consts. env,'bin ','activate'), \ os. path. join... | [
0.34890982508659363,
-1.10960853099823,
0.5705140829086304,
-0.6058289408683777,
0.8088701367378235,
1.1207889318466187,
0.6667075157165527,
0.48128700256347656,
-1.2312610149383545,
0.34315454959869385,
0.4152967035770416,
-0.7963921427726746,
0.1292399913072586,
-0.7528009414672852,
-0... |
def adjust _ edge _ curvatures ( source, curvature _ name, epsilon = 1. 0e - 08 ) : def point _ neighbourhood ( pt _ id ) : " " " find the ids of the neighbours of pt _ id. : param pt _ id : the point id. : return : the neighbour ids. " " " " " " extract the topological neighbors for point pid. in two steps : 1 ) sourc... | [
-0.1815074235200882,
0.0002795780310407281,
0.9118373394012451,
-0.07698256522417068,
-0.17208677530288696,
-0.9848431348800659,
0.4140825569629669,
0.653174102306366,
0.271663635969162,
1.1374762058258057,
-0.0842955932021141,
1.0083036422729492,
0.24544531106948853,
-0.4869914948940277,
... |
def winbio _ winbiounregistereventmonitor ( jitter ) : ret _ ad, args = jitter. func _ args _ stdcall ( [ " sessionhandle " ] ) raise runtimeerror ('api not implemented') jitter. func _ ret _ stdcall ( ret _ ad, ret _ value ) | [
-0.6634736657142639,
-0.00919968169182539,
0.36519646644592285,
0.4511909484863281,
0.45353224873542786,
0.08105818927288055,
1.2920048236846924,
0.10794344544410706,
-0.1037941575050354,
0.17298096418380737,
-0.7327510714530945,
-0.025583168491721153,
-1.4788509607315063,
0.85556960105896... |
def executebooleanqueries ( self ) : queryresults = ordereddict ( ) for k, v in self. booleanqueriesdictionary. items ( ) : queryresults [ k ] = self. complexexpressionhandler ( v ) self. writebooleanresultstofile ( queryresults,'out / results. boolean. txt') | [
-0.5414625406265259,
-0.6029189825057983,
0.24065035581588745,
0.21080262959003448,
0.337676078081131,
0.8877682685852051,
0.8009466528892517,
1.194127082824707,
-0.9948055148124695,
-0.03743233531713486,
-0.5990732312202454,
-0.7854863405227661,
-0.5522247552871704,
-0.4365050792694092,
... |
def testsettaginstancewithfloatvalue ( self ) : tagapi ( self. user ). create ( [ ( u'username / bar ', u'description') ] ) tag = gettags ( paths = [ u'username / bar'] ). one ( ) objectid = uuid4 ( ) self. store. commit ( ) with login ( u'username ', uuid4 ( ), self. transact ) as session : thriftvalue = createthriftv... | [
0.25043028593063354,
0.6408590078353882,
0.5015723705291748,
-0.46003448963165283,
0.3144199550151825,
0.8415228724479675,
0.4408353269100189,
-0.7276215553283691,
-0.5824578404426575,
-0.48161938786506653,
-0.5304570198059082,
-0.3303815424442291,
0.20318341255187988,
0.8776727318763733,
... |
def set _ limit ( limit _ name, value ) : limits [ limit _ name ] = value | [
0.015044474974274635,
-0.4178186357021332,
0.4261922836303711,
-0.2852024435997009,
-0.3100127577781677,
0.2092866599559784,
-1.0203101634979248,
0.07816129922866821,
0.003226909087970853,
0.9433566927909851,
-1.1470277309417725,
0.8138312101364136,
-0.05289401859045029,
-0.725632786750793... |
def _ select _ fire _ season ( df _ firms, year, hemisphere ='shs') : df _ firms ['date'] = df _ firms ['acq _ date']. apply ( pd. to _ datetime ) if hemisphere = ='nhs': start = pd. timestamp ( year, 1, 1 ) end = pd. timestamp ( year + 1, 1, 1 ) elif hemisphere = ='shs': start = pd. timestamp ( year, 7, 1 ) end = pd. ... | [
-0.7363232970237732,
-0.3024766743183136,
0.6870346665382385,
0.1790400892496109,
-0.3568516671657562,
-0.33864569664001465,
0.3725076913833618,
-0.17646533250808716,
0.48533111810684204,
0.026338504627346992,
0.5859547257423401,
1.5911294221878052,
0.14988191425800323,
-0.1301085203886032... |
async def receive ( self ) - > jsonobject : if not self. closed or self. has _ pending _ messages : response = await self. _ get _ message ( self. connection _ timeout ) self. _ verify _ response ( response ) return response raise clientinvalidoperation ( " the client is closed and there are " " no pending messages. " ... | [
-0.16729490458965302,
-0.3918249011039734,
0.6034848093986511,
-0.17085222899913788,
-0.25444334745407104,
-0.5144048929214478,
-0.1590663492679596,
-0.538563072681427,
-0.27213412523269653,
-0.4141460359096527,
0.14962461590766907,
0.009869632311165333,
-1.0187067985534668,
-0.40479403734... |
def modify _ kls ( self, name ) : if self. kls is none : self. kls = name else : self. kls + = name | [
0.24199283123016357,
0.04194028303027153,
0.8364211916923523,
-0.24870195984840393,
-0.6437556147575378,
0.10741759091615677,
-0.9959759712219238,
0.10148292779922485,
1.5551683902740479,
0.780899703502655,
0.34604784846305847,
-0.25882452726364136,
-0.1778080314397812,
0.7328609228134155,... |
def _ _ init _ _ ( self, data _ df, transforms _ json, image _ dir, mask _ dir, mean = np. array ( [ 0. 90949707, 0. 8188697, 0. 87795304 ] ), std = np. array ( [ 0. 36357649, 0. 49984502, 0. 40477625 ] ), n = 16, zoom _ level = 2, crop _ size = 128, label _ smoothing = 0. 15, output _ type ='classification ', use _ sa... | [
-0.13255900144577026,
0.07491712272167206,
0.6138752102851868,
-0.014487477019429207,
-0.3271006643772125,
-0.6389345526695251,
0.35817790031433105,
-0.20105354487895966,
0.3137182295322418,
0.2678430676460266,
-0.26528871059417725,
1.058897852897644,
1.6136212348937988,
0.0168495178222656... |
def adjacent ( a, b ) : return abs ( a. x - b. x ) < 2 and abs ( a. y - b. y ) < 2 | [
-0.46200206875801086,
-1.2282681465148926,
0.8916976451873779,
0.09355078637599945,
-0.951336145401001,
1.0513575077056885,
-0.5007055997848511,
-0.47645536065101624,
-0.3888738751411438,
0.19001248478889465,
0.622032642364502,
0.4239027798175812,
0.10563017427921295,
-0.11734343320131302,... |
def update _ parsedc5 _ tdbf ( ) : conn = db _ conn ('bnc') cur = conn. cursor ( ) # update parsedc5 from inner join sql ='''update entropy _ dem100 as e inner join dem _ 2spkr as d on e. xmlid = d. xmlid and e. divindex = d. divindex and e. globalid = d. globalid set e. parsedc5 = d. parsedc5'''cur. execute ( sql ) # ... | [
-0.16306771337985992,
-0.8345720171928406,
0.5519108176231384,
-0.4389370381832123,
-0.38460227847099304,
0.3834569752216339,
0.7734578847885132,
-0.04417470470070839,
-1.429474949836731,
0.4338875114917755,
-0.5461073517799377,
-0.16506913304328918,
-0.3097688853740692,
0.2357891201972961... |
def team _ roster _ urls ( self ) : base _ url = " http : / / www. nfl. com / players / search? " params = { " category " : " team ", " playertype " : " current " } # team _ roster _ urls roster _ urls = { } response = self. _ s. get ( base _ url, params = params, return _ object = true ) div = response. html. find ( "... | [
-0.855686604976654,
0.14361023902893066,
0.5659580826759338,
-0.4148361086845398,
-0.09493405371904373,
0.005636087618768215,
-0.7100738883018494,
-0.3074186146259308,
-1.4073976278305054,
0.46348458528518677,
-1.0222967863082886,
0.00967821292579174,
0.02703673020005226,
0.403437405824661... |
def gateway _ id ( self ) - > optional [ pulumi. input [ str ] ] : return pulumi. get ( self, " gateway _ id " ) | [
1.4170368909835815,
0.1783546656370163,
0.3924444615840912,
0.6183549165725708,
0.45136499404907227,
0.7491428852081299,
0.1807648241519928,
0.41918307542800903,
1.1734790802001953,
0.14933469891548157,
0.18205341696739197,
1.3233368396759033,
-0.43463635444641113,
0.45812755823135376,
-... |
def trafficloadstart ( self ) : if self. force _ auto _ sync : self. get ('trafficloadstart') return self. _ trafficloadstart | [
-0.5332880020141602,
0.35845136642456055,
0.4038613438606262,
-0.5478125214576721,
0.2438882291316986,
0.22579190135002136,
0.46707677841186523,
-0.6853811144828796,
0.43220892548561096,
0.6929969191551208,
-0.7315076589584351,
0.693302571773529,
-0.38550248742103577,
-1.0378903150558472,
... |
def thread ( request, pk ) : posts = post. objects. filter ( thread = pk ). order _ by ( " created " ) posts = mk _ paginator ( request, posts, 15 ) t = thread. objects. get ( pk = pk ) return render _ to _ response ( " forum / thread. html ", add _ csrf ( request, posts = posts, pk = pk, title = t. title, forum _ pk =... | [
0.42151281237602234,
0.18789030611515045,
0.5722764730453491,
0.1065560057759285,
0.26173681020736694,
-0.0838070884346962,
0.2641221284866333,
0.159223273396492,
0.02867303602397442,
-0.7867391109466553,
0.5068894624710083,
-0.08291637897491455,
-0.1226443275809288,
0.7048660516738892,
... |
def predict ( x, coeffs, threas = 0. 5 ) : predicted _ probabilities = predict _ proba ( x, coeffs ) predicted = np. array ( [ 1 if a > 0. 5 else 0 for a in predicted _ probabilities ] ) return predicted | [
-0.31850942969322205,
-0.7333013415336609,
0.28595390915870667,
-0.1094488576054573,
0.13090068101882935,
0.2500142455101013,
-0.4813952147960663,
-0.5600433349609375,
-0.05185267701745033,
-0.029611853882670403,
0.13423427939414978,
0.36703354120254517,
-0.07467726618051529,
-0.8273299336... |
def sigmoid _ prime ( z ) : return sigmoid ( z ) * ( 1 - sigmoid ( z ) ) | [
-0.30672556161880493,
-0.6323076486587524,
0.14930152893066406,
0.7100406289100647,
-0.27100372314453125,
-0.5468369126319885,
0.6457561254501343,
0.20473626255989075,
1.5311288833618164,
0.2681489586830139,
-0.38382139801979065,
-0.6541567444801331,
-1.3443046808242798,
0.2577481269836426... |
async def test _ set _ duplicate _ pin ( v3 _ server, v3 _ settings _ response ) : v3 _ server. get ( ( f " https : / / api. simplisafe. com / v1 / ss3 / subscriptions / { test _ subscription _ id } " " / settings / normal? forceupdate = true " ), status = 200, body = v3 _ settings _ response, ) v3 _ server. post ( ( f... | [
-0.05635281279683113,
1.0282816886901855,
0.5020296573638916,
-0.2429722398519516,
1.3036489486694336,
0.9185592532157898,
-0.08014676719903946,
-1.6340949535369873,
1.2580775022506714,
0.5888161063194275,
-1.177453875541687,
0.9412857294082642,
-0.1386387050151825,
-0.3334101438522339,
... |
def calcanglesall ( frame, offset = 1, natoms = 6 ) : angles = np. zeros ( natoms ) for i in xrange ( natoms ) : if np. any ( frame. atoms [ i ]. dipole ) : angles [ i ] = frame. dipoleangle ( i, ( i + offset ) % natoms ) return angles | [
-0.37497735023498535,
0.4727722108364105,
0.5517702102661133,
-0.38559749722480774,
-0.4391665458679199,
0.36695560812950134,
-0.19746451079845428,
0.4610714316368103,
1.0263723134994507,
0.6181575655937195,
-0.7988532185554504,
-0.10466227680444717,
-0.4098280966281891,
-0.015306306071579... |
def _ _ init _ _ ( self, n, p ) : # - - - + - - - - | - - - - + - - - - | - - - - + - - - - | - - - - + - - - - | - - - - + - - - - | - - - - + - - - - | - - - - + - - - - | binomialdistbase. _ _ init _ _ ( self, n, p ) | [
0.017406029626727104,
-1.014572024345398,
0.6491769552230835,
0.33475345373153687,
0.26193520426750183,
0.6058043241500854,
-1.0081448554992676,
0.19970685243606567,
0.01028523314744234,
-0.04857606440782547,
-0.9574590921401978,
0.32111856341362,
-0.3634192645549774,
-0.2601013779640198,
... |
def handle ( self, state : fieldbase, t : float ) - > none : self. _ viewer. update ( state, t ) | [
-0.22161763906478882,
0.28357723355293274,
0.2132495492696762,
-0.8731313347816467,
0.2595060467720032,
0.14379362761974335,
0.08514619618654251,
0.41849642992019653,
-0.713144838809967,
-0.8455740809440613,
-1.1390937566757202,
-0.009640422649681568,
0.9399552345275879,
-0.044249009341001... |
def backward ( self, grad _ output ) : grad _ input = 1 - ( self. input. tanh ( ) * * 2 ) grad _ input = grad _ output * grad _ input return grad _ input | [
0.0021690595895051956,
0.2348325401544571,
0.6699308156967163,
-0.31275588274002075,
-0.4544094502925873,
0.08212054520845413,
1.0605393648147583,
-0.5118975639343262,
-0.9490473866462708,
-0.7345302700996399,
0.18761664628982544,
0.040680259466171265,
-0.5629852414131165,
-0.1861756294965... |
def stop ( name ) : cmd = _ service _ cmd ( name, " stop " ) return not _ _ salt _ _ [ " cmd. retcode " ] ( cmd ) | [
-1.570082664489746,
-0.054197367280721664,
0.7906575798988342,
-0.4853079617023468,
-0.9140276908874512,
0.46455633640289307,
0.05425962805747986,
-0.8638609051704407,
-0.18638229370117188,
0.613458514213562,
-0.7821829915046692,
-0.03754466027021408,
-1.0969572067260742,
-0.24807895720005... |
def create _ html _ table ( data, colnames ) : return tabulate ( data, headers = colnames, tablefmt ='html') | [
0.40704837441444397,
0.8645766377449036,
0.19246160984039307,
-0.1888129860162735,
-0.5433180332183838,
-0.11860238760709763,
-1.0135551691055298,
-0.749309241771698,
-0.8465684652328491,
-0.3770376443862915,
0.2583330571651459,
-0.20793448388576508,
0.1413564383983612,
-0.6284149289131165... |
def _ printall ( self ) : print ( self. _ bank ) | [
0.6231122612953186,
-0.5924139022827148,
0.25868290662765503,
-0.03804482892155647,
0.7484856843948364,
1.0769646167755127,
0.011430477723479271,
-0.7449648976325989,
-0.7585983276367188,
-0.8506765961647034,
0.8052006363868713,
1.0744783878326416,
-0.26267093420028687,
1.226322889328003,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.