query
stringlengths
9
9.05k
document
stringlengths
10
222k
metadata
dict
negatives
listlengths
30
30
negative_scores
listlengths
30
30
document_score
stringlengths
4
10
document_rank
stringclasses
2 values
Calculates the apparent location of a body relative to the local horizon of an observer on the Earth. Given a date and time, the geographic location of an observer on the Earth, and equatorial coordinates (right ascension and declination) of a celestial body, this function returns horizontal coordinates (azimuth and al...
def Horizon(time, observer, ra, dec, refraction): if not (Refraction.Airless.value <= refraction.value <= Refraction.JplHorizons.value): raise Error('Invalid refraction type') latrad = math.radians(observer.latitude) lonrad = math.radians(observer.longitude) decrad = math.radians(dec) rarad...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def addHorizon(horizon_altitude=np.radians(30.), lat_telescope=np.radians(33.35731944), raCen=0.):\n step = .02\n az = np.arange(0, np.pi * 2.0 + step, step)\n alt = np.ones(len(az), float) * horizon_altitude\n obs = ephem.Observer()\n obs.lat = lat_telescope\n # Set obs lon to zero, just to fix ...
[ "0.57738596", "0.5556534", "0.5501716", "0.5268439", "0.5121868", "0.5050999", "0.49442363", "0.4930195", "0.49277198", "0.49102402", "0.48732978", "0.4789919", "0.4713096", "0.466375", "0.46625513", "0.4619613", "0.46173447", "0.46136093", "0.4600861", "0.4566445", "0.453884...
0.60196346
0
Calculates the amount of "lift" to an altitude angle caused by atmospheric refraction. Given an altitude angle and a refraction option, calculates the amount of "lift" caused by atmospheric refraction. This is the number of degrees higher in the sky an object appears due to lensing of the Earth's atmosphere.
def RefractionAngle(refraction, altitude): if altitude < -90.0 or altitude > +90.0: return 0.0 # No attempt to correct an invalid altitude if refraction == Refraction.Normal or refraction == Refraction.JplHorizons: # http://extras.springer.com/1999/978-1-4471-0555-8/chap4/horizons/horizons...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def closest_cruising_altitude(altitude):\n return 1000 * ((altitude + 500) // 1000)", "def set_altitude(self):\n self.altitude = self.Calculations.convert_to_altitude( self.declination, self.right_ascension, self.Latitude, self.LHA)\n print('altitude set to', self.altitude)\n if self.alti...
[ "0.5971424", "0.558137", "0.5563295", "0.5500189", "0.5496201", "0.5475074", "0.5472476", "0.54268754", "0.5411606", "0.5406471", "0.53916067", "0.53556895", "0.5331488", "0.5316118", "0.52923346", "0.52570397", "0.5246486", "0.5239974", "0.51503664", "0.5147517", "0.5142285"...
0.63266027
0
Calculates the inverse of an atmospheric refraction angle. Given an observed altitude angle that includes atmospheric refraction, calculate the negative angular correction to obtain the unrefracted altitude. This is useful for cases where observed horizontal coordinates are to be converted to another orientation system...
def InverseRefractionAngle(refraction, bent_altitude): if bent_altitude < -90.0 or bent_altitude > +90.0: return 0.0 # No attempt to correct an invalid altitude # Find the pre-adjusted altitude whose refraction correction leads to 'altitude'. altitude = bent_altitude - RefractionAngle(refractio...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def RefractionAngle(refraction, altitude):\n if altitude < -90.0 or altitude > +90.0:\n return 0.0 # No attempt to correct an invalid altitude\n\n if refraction == Refraction.Normal or refraction == Refraction.JplHorizons:\n # http://extras.springer.com/1999/978-1-4471-0555-8/chap4/horizon...
[ "0.68719447", "0.5926663", "0.5842472", "0.5829597", "0.5704567", "0.5603955", "0.55748016", "0.55029416", "0.5417705", "0.5409276", "0.53862596", "0.5362814", "0.5358734", "0.5342194", "0.5330552", "0.5324434", "0.53164154", "0.53085965", "0.5308373", "0.53050506", "0.527290...
0.8411205
0
Calculates geocentric ecliptic coordinates for the Sun. This function calculates the position of the Sun as seen from the Earth. The returned value includes both Cartesian and spherical coordinates. The xcoordinate and longitude values in the returned object are based
def SunPosition(time): # Correct for light travel time from the Sun. # Otherwise season calculations (equinox, solstice) will all be early by about 8 minutes! adjusted_time = time.AddDays(-1.0 / C_AUDAY) earth2000 = _CalcEarth(adjusted_time) sun2000 = [-earth2000.x, -earth2000.y, -earth2000.z] ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def coords_on_spherical_earth(self):\n self.create_3d_coord_on_sphere(on_sphere=True)\n self.df_attributes['coord_x_earth'] = 6371.009 * self.df_attributes['coord_x']\n self.df_attributes['coord_y_earth'] = 6371.009 * self.df_attributes['coord_y']\n self.df_attributes['coord_z_earth'] =...
[ "0.696012", "0.64421356", "0.63526803", "0.62233335", "0.62233317", "0.61056805", "0.6082292", "0.60289496", "0.6014859", "0.59980696", "0.5996329", "0.5915532", "0.5866555", "0.5846363", "0.58397764", "0.58281845", "0.58075386", "0.58061826", "0.5804537", "0.5789236", "0.576...
0.72307754
0
Converts J2000 equatorial Cartesian coordinates to J2000 ecliptic coordinates. Given coordinates relative to the Earth's equator at J2000 (the instant of noon UTC on 1 January 2000), this function converts those coordinates to J2000 ecliptic coordinates, which are relative to the plane of the Earth's orbit around the S...
def Ecliptic(equ): # Based on NOVAS functions equ2ecl() and equ2ecl_vec(). ob2000 = 0.40909260059599012 # mean obliquity of the J2000 ecliptic in radians return _RotateEquatorialToEcliptic([equ.x, equ.y, equ.z], ob2000, equ.t)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def geo2Cartesian(lat, lon, h, julian_date):\n\n lat_rad = np.radians(lat)\n lon_rad = np.radians(lon)\n\n # Calculate ECEF coordinates\n ecef_x, ecef_y, ecef_z = latLonAlt2ECEF(lat_rad, lon_rad, h)\n\n\n # Get Local Sidreal Time\n LST_rad = math.radians(JD2LST(julian_date, np.degrees(lon_rad))[0...
[ "0.64211524", "0.63570887", "0.60229397", "0.58831215", "0.56867015", "0.554051", "0.5469458", "0.5359575", "0.53257585", "0.5304788", "0.5294681", "0.52737695", "0.52540785", "0.52348423", "0.5152127", "0.5112576", "0.5069476", "0.50644594", "0.5051879", "0.504186", "0.50357...
0.6429455
0
Returns the angle between the given body and the Sun, as seen from the Earth. This function calculates the angular separation between the given body and the Sun, as seen from the center of the Earth. This angle is helpful for determining how easy it is to see the body away from the glare of the Sun.
def AngleFromSun(body, time): if body == Body.Earth: raise EarthNotAllowedError() sv = GeoVector(Body.Sun, time, True) bv = GeoVector(body, time, True) return AngleBetween(sv, bv)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _sun_north_angle_to_z(frame):\n # Find the Sun center in HGS at the frame's observation time(s)\n sun_center_repr = SphericalRepresentation(0*u.deg, 0*u.deg, 0*u.km)\n # The representation is repeated for as many times as are in obstime prior to transformation\n sun_center = SkyCoord(sun_center_rep...
[ "0.5995286", "0.5841195", "0.57458204", "0.56875914", "0.566105", "0.566105", "0.5626037", "0.5622406", "0.5584574", "0.55678695", "0.5500597", "0.5490103", "0.5450066", "0.54364026", "0.54103065", "0.5372033", "0.5369338", "0.53667647", "0.5351881", "0.5350953", "0.53388274"...
0.73628736
0
Returns one body's ecliptic longitude with respect to another, as seen from the Earth. This function determines where one body appears around the ecliptic plane (the plane of the Earth's orbit around the Sun) as seen from the Earth, relative to the another body's apparent position. The function returns an angle in the ...
def PairLongitude(body1, body2, time): if body1 == Body.Earth or body2 == Body.Earth: raise EarthNotAllowedError() vector1 = GeoVector(body1, time, False) eclip1 = Ecliptic(vector1) vector2 = GeoVector(body2, time, False) eclip2 = Ecliptic(vector2) return _NormalizeLongitude(eclip1.elon ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def scalar_earth_angle( lat1, lon1, lat2, lon2):\n theta1 = lat1 *dtor\n phi1 = lon1 *dtor\n theta2 = lat2 * dtor\n phi2 = lon2 * dtor\n p1 = numpy.vstack((cos(theta1)*cos(phi1),cos(theta1)*sin(phi1),sin( theta1))).T\n p2 = numpy.vstack((cos(theta2)*cos(phi2), cos( theta2)* sin( phi2), sin( theta...
[ "0.59436023", "0.5801272", "0.5670904", "0.5567944", "0.556547", "0.55235994", "0.55052245", "0.5504363", "0.54402506", "0.5427005", "0.5386866", "0.5347162", "0.5257846", "0.5243895", "0.5236571", "0.52174634", "0.519021", "0.518347", "0.5172707", "0.5159714", "0.5132748", ...
0.67752004
0
Determines visibility of a celestial body relative to the Sun, as seen from the Earth. This function returns an ElongationEvent object, which provides the following
def Elongation(body, time): angle = PairLongitude(body, Body.Sun, time) if angle > 180.0: visibility = Visibility.Morning esep = 360.0 - angle else: visibility = Visibility.Evening esep = angle angle = AngleFromSun(body, time) return ElongationEvent(time, visibility, ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_earth(time='now'):\n earth = get_body_heliographic_stonyhurst('earth', time=time)\n\n # Explicitly set the longitude to 0\n earth = SkyCoord(0*u.deg, earth.lat, earth.radius, frame=earth)\n\n return earth", "def EclipticLongitude(body, time):\n if body == Body.Sun:\n raise InvalidBo...
[ "0.5679154", "0.55136997", "0.5502345", "0.52546376", "0.50619036", "0.5016763", "0.50085676", "0.49919736", "0.49623618", "0.49551147", "0.4915478", "0.49082282", "0.4902934", "0.48914692", "0.48901144", "0.4869006", "0.48671234", "0.48478994", "0.4844102", "0.48295906", "0....
0.6564345
0
Searches for when the Earth and another planet are separated by a certain ecliptic longitude. Searches for the time when the Earth and another planet are separated by a specified angle in ecliptic longitude, as seen from the Sun. A relative longitude is the angle between two bodies measured in the plane of the Earth's ...
def SearchRelativeLongitude(body, targetRelLon, startTime): if body == Body.Earth: raise EarthNotAllowedError() if body == Body.Moon or body == Body.Sun: raise InvalidBodyError() syn = _SynodicPeriod(body) direction = +1 if _IsSuperiorPlanet(body) else -1 # Iterate until we converge ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def SearchMaxElongation(body, startTime):\n if body == Body.Mercury:\n s1 = 50.0\n s2 = 85.0\n elif body == Body.Venus:\n s1 = 40.0\n s2 = 50.0\n else:\n raise InvalidBodyError()\n syn = _SynodicPeriod(body)\n iter = 1\n while iter <= 2:\n plon = Ecliptic...
[ "0.72656167", "0.67429906", "0.639534", "0.5861221", "0.5579179", "0.5522047", "0.5418993", "0.5402396", "0.5396768", "0.53804237", "0.522589", "0.51906794", "0.516147", "0.5142155", "0.5067151", "0.494782", "0.49399218", "0.48568505", "0.48518068", "0.4848355", "0.48450986",...
0.7667427
0
Finds a date and time when Mercury or Venus reaches its maximum angle from the Sun as seen from the Earth. Mercury and Venus are are often difficult to observe because they are closer to the Sun than the Earth is. Mercury especially is almost always impossible to see because it gets lost in the Sun's glare. The best op...
def SearchMaxElongation(body, startTime): if body == Body.Mercury: s1 = 50.0 s2 = 85.0 elif body == Body.Venus: s1 = 40.0 s2 = 50.0 else: raise InvalidBodyError() syn = _SynodicPeriod(body) iter = 1 while iter <= 2: plon = EclipticLongitude(body, s...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def Elongation(body, time):\n angle = PairLongitude(body, Body.Sun, time)\n if angle > 180.0:\n visibility = Visibility.Morning\n esep = 360.0 - angle\n else:\n visibility = Visibility.Evening\n esep = angle\n angle = AngleFromSun(body, time)\n return ElongationEvent(time...
[ "0.63219815", "0.5589171", "0.5588855", "0.5580186", "0.5534878", "0.54675066", "0.54198235", "0.5318445", "0.52665484", "0.5209144", "0.51494503", "0.5113975", "0.50693125", "0.50532895", "0.5045284", "0.50268024", "0.50102913", "0.49935877", "0.49806437", "0.49747282", "0.4...
0.670316
0
Searches for the time when the Sun reaches an apparent ecliptic longitude as seen from the Earth. This function finds the moment in time, if any exists in the given time window, that the center of the Sun reaches a specific ecliptic longitude as seen from the center of the Earth. This function can be used to determine ...
def SearchSunLongitude(targetLon, startTime, limitDays): t2 = startTime.AddDays(limitDays) return Search(_sun_offset, targetLon, startTime, t2, 1.0)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def SearchMoonPhase(targetLon, startTime, limitDays):\n # To avoid discontinuities in the _moon_offset function causing problems,\n # we need to approximate when that function will next return 0.\n # We probe it with the start time and take advantage of the fact\n # that every lunar phase repeats rough...
[ "0.7114085", "0.6445389", "0.6184539", "0.59338945", "0.5524877", "0.54291564", "0.53312373", "0.525147", "0.50568175", "0.502844", "0.50039756", "0.4950922", "0.49311638", "0.49172544", "0.4732388", "0.47277278", "0.46779746", "0.46115145", "0.4573955", "0.45657855", "0.4516...
0.70586133
1
Searches for the time that the Moon reaches a specified phase. Lunar phases are conventionally defined in terms of the Moon's geocentric ecliptic longitude with respect to the Sun's geocentric ecliptic longitude. When the Moon and the Sun have the same longitude, that is defined as a new moon. When their longitudes are...
def SearchMoonPhase(targetLon, startTime, limitDays): # To avoid discontinuities in the _moon_offset function causing problems, # we need to approximate when that function will next return 0. # We probe it with the start time and take advantage of the fact # that every lunar phase repeats roughly every ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def MoonPhase(time):\n return PairLongitude(Body.Moon, Body.Sun, time)", "def SearchMoonQuarter(startTime):\n angle = MoonPhase(startTime)\n quarter = int(1 + math.floor(angle / 90.0)) % 4\n time = SearchMoonPhase(90.0 * quarter, startTime, 10.0)\n if time is None:\n # The search should nev...
[ "0.615087", "0.5947764", "0.5724785", "0.5694358", "0.56241137", "0.5496141", "0.5334928", "0.531108", "0.51668566", "0.5158211", "0.51020163", "0.50826275", "0.5064952", "0.49336013", "0.4907967", "0.48831072", "0.4850773", "0.48396268", "0.4819849", "0.48090744", "0.4773391...
0.6912864
0
Finds the first lunar quarter after the specified date and time.
def SearchMoonQuarter(startTime): angle = MoonPhase(startTime) quarter = int(1 + math.floor(angle / 90.0)) % 4 time = SearchMoonPhase(90.0 * quarter, startTime, 10.0) if time is None: # The search should never fail. We should always find another lunar quarter. raise InternalError() r...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_quarter_start(x: Optional[Date] = None) -> Date:\n asof = x or get_today()\n return asof.replace(month=(asof.month - 1) // 3 * 3 + 1, day=1)", "def get_quarter_end(x: Optional[Date] = None) -> Date:\n return get_quarter_start(x or get_today()) + relativedelta(months=+3, days=-1)", "def get_qua...
[ "0.6786847", "0.670007", "0.65406126", "0.62601256", "0.62009203", "0.6129158", "0.6123739", "0.61161375", "0.5940397", "0.58256567", "0.58256567", "0.58098423", "0.57750344", "0.57745916", "0.56850433", "0.5682416", "0.5560183", "0.54581964", "0.53739", "0.53281206", "0.5258...
0.74646467
0
Continues searching for lunar quarters from a previous search. After calling SearchMoonQuarter, this function can be called one or more times to continue finding consecutive lunar quarters. This function finds the next consecutive moon quarter event after the one passed in as the parameter `mq`.
def NextMoonQuarter(mq): # Skip 6 days past the previous found moon quarter to find the next one. # This is less than the minimum possible increment. # So far I have seen the interval well contained by the range (6.5, 8.3) days. time = mq.time.AddDays(6.0) next_mq = SearchMoonQuarter(time) # Ver...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def SearchMoonQuarter(startTime):\n angle = MoonPhase(startTime)\n quarter = int(1 + math.floor(angle / 90.0)) % 4\n time = SearchMoonPhase(90.0 * quarter, startTime, 10.0)\n if time is None:\n # The search should never fail. We should always find another lunar quarter.\n raise InternalEr...
[ "0.60827893", "0.52012753", "0.5097673", "0.47378603", "0.47370356", "0.46011686", "0.46011686", "0.45734715", "0.45410192", "0.45111474", "0.44802538", "0.44798008", "0.4447918", "0.43971002", "0.43842036", "0.43630975", "0.43580222", "0.43480268", "0.43235764", "0.4287519", ...
0.7741917
0
Finds visual magnitude, phase angle, and other illumination information about a celestial body. This function calculates information about how bright a celestial body appears from the Earth, reported as visual magnitude, which is a smaller (or even negative) number for brighter objects, and a larger number for dimmer o...
def Illumination(body, time): if body == Body.Earth: raise EarthNotAllowedError() earth = _CalcEarth(time) if body == Body.Sun: gc = Vector(-earth.x, -earth.y, -earth.z, time) hc = Vector(0.0, 0.0, 0.0, time) phase = 0.0 # placeholder value; the Sun does not have a phase ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def calc_body_pos(component, time):\r\n # Convert to radians\r\n M = radians(eval(component.orbit['M'])(time))\r\n w = radians(eval(component.orbit['w'])(time))\r\n i = radians(eval(component.orbit['i'])(time))\r\n N = radians(eval(component.orbit['N'])(time))\r\n a = component.orbit['a']\r\n ...
[ "0.5986034", "0.575325", "0.568569", "0.55688435", "0.5526129", "0.5413503", "0.52904296", "0.5165623", "0.5120634", "0.5120634", "0.5028022", "0.502111", "0.4984233", "0.49829665", "0.4959016", "0.49546692", "0.49440768", "0.49328852", "0.48865834", "0.48638484", "0.4859351"...
0.6490706
0
Searches for the date and time Venus will next appear brightest as seen from the Earth. This function searches for the date and time Venus appears brightest as seen from the Earth. Currently only Venus is supported for the `body` parameter, though this could change in the future. Mercury's peak magnitude occurs at supe...
def SearchPeakMagnitude(body, startTime): # s1 and s2 are relative longitudes within which peak magnitude of Venus can occur. s1 = 10.0 s2 = 30.0 if body != Body.Venus: raise InvalidBodyError() iter = 1 while iter <= 2: # Find current heliocentric relative longitude between the ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def SearchMaxElongation(body, startTime):\n if body == Body.Mercury:\n s1 = 50.0\n s2 = 85.0\n elif body == Body.Venus:\n s1 = 40.0\n s2 = 50.0\n else:\n raise InvalidBodyError()\n syn = _SynodicPeriod(body)\n iter = 1\n while iter <= 2:\n plon = Ecliptic...
[ "0.69728935", "0.5879363", "0.55613136", "0.5322457", "0.509482", "0.5014596", "0.49907616", "0.49762297", "0.4916557", "0.49076036", "0.4888639", "0.4886727", "0.48666686", "0.48304498", "0.4821553", "0.4801022", "0.47296023", "0.4676172", "0.46760324", "0.46661714", "0.4650...
0.7865994
0
Searches for the time when a celestial body reaches a specified hour angle as seen by an observer on the Earth. The hour angle of a celestial body indicates its position in the sky with respect to the Earth's rotation. The hour angle depends on the location of the observer on the Earth. The hour angle is 0 when the bod...
def SearchHourAngle(body, observer, hourAngle, startTime): if body == Body.Earth: raise EarthNotAllowedError() if hourAngle < 0.0 or hourAngle >= 24.0: raise Error('Invalid hour angle.') iter = 0 time = startTime while True: iter += 1 # Calculate Greenwich Apparent ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def SearchTransit(body, startTime):\n threshold_angle = 0.4 # maximum angular separation to attempt transit calculation\n dt_days = 1.0\n\n # Validate the planet and find its mean radius.\n if body == Body.Mercury:\n planet_radius_km = 2439.7\n elif body == Body.Venus:\n planet_rad...
[ "0.57710344", "0.53922814", "0.53873247", "0.52570206", "0.5104619", "0.509287", "0.50248134", "0.48745987", "0.48716798", "0.47750968", "0.4742695", "0.46877325", "0.46866667", "0.46404335", "0.46247587", "0.4601504", "0.45950186", "0.4592222", "0.4559922", "0.45193544", "0....
0.7773067
0
Searches for the next time a celestial body rises or sets as seen by an observer on the Earth. This function finds the next rise or set time of the Sun, Moon, or planet other than the Earth. Rise time is when the body first starts to be visible above the horizon. For example, sunrise is the moment that the top of the S...
def SearchRiseSet(body, observer, direction, startTime, limitDays): if body == Body.Earth: raise EarthNotAllowedError() elif body == Body.Sun: body_radius = _SUN_RADIUS_AU elif body == Body.Moon: body_radius = _MOON_EQUATORIAL_RADIUS_AU else: body_radius = 0.0 if dir...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def mask_nighttime(lon, lat, date=date, mask_daytime=mask_daytime,\n ref_date=datetime.datetime(1899, 12, 31, 12),\n buffer_hours=buffer_hours, debug=False):\n # --- get lat and lon values from columns\n if debug:\n print((\"--- (s4-1) %s seconds...
[ "0.59442073", "0.58627415", "0.57948226", "0.5666351", "0.5434278", "0.5382691", "0.53352976", "0.5329826", "0.53133374", "0.5302436", "0.52504915", "0.5224032", "0.51757985", "0.51576275", "0.5104368", "0.50998634", "0.50947934", "0.5092367", "0.50596", "0.5052386", "0.50416...
0.69099176
0
Finds both equinoxes and both solstices for a given calendar year. The changes of seasons are defined by solstices and equinoxes. Given a calendar year number, this function calculates the March and September equinoxes and the June and December solstices. The equinoxes are the moments twice each year when the plane of ...
def Seasons(year): mar_equinox = _FindSeasonChange(0, year, 3, 19) jun_solstice = _FindSeasonChange(90, year, 6, 19) sep_equinox = _FindSeasonChange(180, year, 9, 21) dec_solstice = _FindSeasonChange(270, year, 12, 20) return SeasonInfo(mar_equinox, jun_solstice, sep_equinox, dec_solstice)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def equinox(year, season):\r\n estimate = estimateEquinox(year, season) # Initial estimate of date of event\r\n t = (estimate - 2451545.0) / 36525\r\n w = 35999.373 * t - 2.47\r\n dL = 1 + 0.0334 * cosFromDeg(w) + 0.0007 * cosFromDeg(2 * w)\r\n s = periodic24(t)\r\n julianEmphemerisDays = estimat...
[ "0.6839352", "0.62700564", "0.6043512", "0.59869367", "0.59869367", "0.5885052", "0.5728298", "0.5622074", "0.5622038", "0.56185055", "0.5614073", "0.5589897", "0.5587912", "0.5584576", "0.5476843", "0.5418867", "0.5400407", "0.5369833", "0.5334997", "0.5281934", "0.5273756",...
0.67958647
1
Finds the time of the first lunar apogee or perigee after the given time. Given a date and time to start the search in `startTime`, this function finds the next date and time that the center of the Moon reaches the closest or farthest point in its orbit with respect to the center of the Earth, whichever comes first aft...
def SearchLunarApsis(startTime): increment = 5.0 # number of days to skip on each iteration t1 = startTime m1 = _moon_distance_slope(+1, t1) iter = 0 while iter * increment < 2.0 * _MEAN_SYNODIC_MONTH: t2 = t1.AddDays(increment) m2 = _moon_distance_slope(+1, t2) if m1 * m...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def SearchPlanetApsis(body, startTime):\n if body == Body.Neptune or body == Body.Pluto:\n return _BruteSearchPlanetApsis(body, startTime)\n positive_slope = (+1.0, body)\n negative_slope = (-1.0, body)\n orbit_period_days = _PlanetOrbitalPeriod[body.value]\n increment = orbit_period_days / 6...
[ "0.7216575", "0.6528253", "0.6140229", "0.6089748", "0.5907497", "0.5840149", "0.5811458", "0.5794587", "0.5494953", "0.53828645", "0.5334523", "0.5136434", "0.5047087", "0.5023187", "0.50084245", "0.4831251", "0.4805346", "0.4695637", "0.46679905", "0.46389496", "0.4621941",...
0.8122066
0
Finds the next lunar perigee or apogee in a series. This function requires an Apsis value obtained from a call to SearchLunarApsis or `NextLunarApsis`. Given an apogee event, this function finds the next perigee event, and vice versa. See SearchLunarApsis for more details.
def NextLunarApsis(apsis): skip = 11.0 # number of days to skip to start looking for next apsis event time = apsis.time.AddDays(skip) next = SearchLunarApsis(time) # Verify that we found the opposite apsis from the previous one. if apsis.kind not in [ApsisKind.Apocenter, ApsisKind.Pericenter]: ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def NextPlanetApsis(body, apsis):\n if apsis.kind not in [ApsisKind.Apocenter, ApsisKind.Pericenter]:\n raise Error('Parameter \"apsis\" contains an invalid \"kind\" value.')\n # Skip 1/4 of an orbit before starting search again.\n skip = 0.25 * _PlanetOrbitalPeriod[body.value]\n time = apsis.ti...
[ "0.61846745", "0.6168306", "0.51171976", "0.50947636", "0.50828487", "0.5048025", "0.5035378", "0.5029596", "0.48358867", "0.48120922", "0.4759828", "0.46966144", "0.46694285", "0.4668382", "0.4633767", "0.46237493", "0.461969", "0.46072385", "0.4543113", "0.45307645", "0.452...
0.6942987
0
Finds the next planet perihelion or aphelion, after a given time. Given a date and time to start the search in `startTime`, this function finds the next date and time that the center of the specified planet reaches the closest or farthest point in its orbit with respect to the center of the Sun, whichever comes first a...
def SearchPlanetApsis(body, startTime): if body == Body.Neptune or body == Body.Pluto: return _BruteSearchPlanetApsis(body, startTime) positive_slope = (+1.0, body) negative_slope = (-1.0, body) orbit_period_days = _PlanetOrbitalPeriod[body.value] increment = orbit_period_days / 6.0 t1 =...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def NextPlanetApsis(body, apsis):\n if apsis.kind not in [ApsisKind.Apocenter, ApsisKind.Pericenter]:\n raise Error('Parameter \"apsis\" contains an invalid \"kind\" value.')\n # Skip 1/4 of an orbit before starting search again.\n skip = 0.25 * _PlanetOrbitalPeriod[body.value]\n time = apsis.ti...
[ "0.676888", "0.6619828", "0.6395941", "0.54630435", "0.5420441", "0.5348539", "0.52666056", "0.51497054", "0.50688785", "0.50041425", "0.4975058", "0.4936468", "0.4892364", "0.4622477", "0.46013242", "0.45661423", "0.44514218", "0.44227836", "0.44158715", "0.4410383", "0.4392...
0.77683693
0
Finds the next planetary perihelion or aphelion event in a series. This function requires an Apsis value obtained from a call to SearchPlanetApsis or `NextPlanetApsis`. Given an aphelion event, this function finds the next perihelion event, and vice versa. See SearchPlanetApsis for more details.
def NextPlanetApsis(body, apsis): if apsis.kind not in [ApsisKind.Apocenter, ApsisKind.Pericenter]: raise Error('Parameter "apsis" contains an invalid "kind" value.') # Skip 1/4 of an orbit before starting search again. skip = 0.25 * _PlanetOrbitalPeriod[body.value] time = apsis.time.AddDays(ski...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _determine_next_eval_point(self):\n anc_data = self._get_ancillary_data_for_acquisition()\n acq_to_use = getattr(acquisitions.asy, self.options.acq.lower())\n next_eval_point = acq_to_use(self.gp, self.acq_optimise, anc_data)\n return next_eval_point", "def NextLunarApsis(apsis):\n skip = 11.0...
[ "0.5737647", "0.55939", "0.525522", "0.49635315", "0.4879202", "0.48549777", "0.4808256", "0.4781359", "0.47355938", "0.47059077", "0.46836042", "0.46302795", "0.46274114", "0.46130553", "0.45988792", "0.458917", "0.4585495", "0.45503488", "0.45343766", "0.4506021", "0.450334...
0.64054435
0
Given an equatorial vector, calculates equatorial angular coordinates.
def EquatorFromVector(vec): sphere = SphereFromVector(vec) return Equatorial(sphere.lon / 15.0, sphere.lat, sphere.dist, vec)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def vector_angle(v):\n assert len(v) == 2\n x, y = v\n return np.arctan2(y, x)", "def vector_polar(v):\n return vector_mag(v), vector_angle(v)", "def vector_analysis(vector, coordinates, elements_vdw, increment=1.0):\n # Calculate number of chunks if vector length is divided by increment.\n c...
[ "0.6180345", "0.6032847", "0.59856886", "0.5881945", "0.58239317", "0.57515395", "0.57504", "0.5748833", "0.56873465", "0.56526536", "0.5652552", "0.5652165", "0.56401736", "0.56275606", "0.5625864", "0.5625864", "0.5625864", "0.5614064", "0.5614064", "0.5614064", "0.5614064"...
0.676634
0
Given apparent angular horizontal coordinates in `sphere`, calculate horizontal vector.
def VectorFromHorizon(sphere, time, refraction): lon = _ToggleAzimuthDirection(sphere.lon) lat = sphere.lat + InverseRefractionAngle(refraction, sphere.lat) xsphere = Spherical(lat, lon, sphere.dist) return VectorFromSphere(xsphere, time)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def on_sphere():\n vec = np.random.standard_normal(3)\n return vec / np.linalg.norm(vec)", "def sectorsphere(self, x):\r\n return sum(x**2) + (1e6-1) * sum(x[x<0]**2)", "def _embed_sphere(ra, dec):\n phi = np.radians(np.asarray(ra))\n theta = np.radians(90.0 - np.asarray(dec))\n r = np.si...
[ "0.68541706", "0.6389152", "0.62184906", "0.6151441", "0.6122388", "0.6086715", "0.6006324", "0.59974575", "0.59902394", "0.5988471", "0.5964493", "0.58995426", "0.5824131", "0.5815156", "0.5767471", "0.5762494", "0.5728694", "0.5711852", "0.57069045", "0.5697843", "0.5679117...
0.67202014
1
Creates a rotation based on applying one rotation followed by another. Given two rotation matrices, returns a combined rotation matrix that is equivalent to rotating based on the first matrix, followed by the second.
def CombineRotation(a, b): # Use matrix multiplication: c = b*a. # We put 'b' on the left and 'a' on the right because, # just like when you use a matrix M to rotate a vector V, # you put the M on the left in the product M*V. # We can think of this as 'b' rotating all the 3 column vectors in 'a'. ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def rotation_to_align_a_with_b(a, b):\n norm_a = np.linalg.norm(a)\n norm_b = np.linalg.norm(b)\n if not np.allclose(a, a/norm_a):\n print('Input a vector not unit normal - normalising')\n a = a / norm_a\n print(a)\n if not np.allclose(b, b/norm_b):\n print('Input b vector n...
[ "0.6760059", "0.65729696", "0.6523621", "0.64291686", "0.63514006", "0.63168585", "0.62147117", "0.61910623", "0.5978741", "0.5932219", "0.5845924", "0.58354896", "0.5784655", "0.5727466", "0.5691078", "0.56855726", "0.56663305", "0.56663305", "0.5636911", "0.5631307", "0.562...
0.78451526
0
Creates an identity rotation matrix. Returns a rotation matrix that has no effect on orientation. This matrix can be the starting point for other operations, such as using a series of calls to Pivot to create a custom rotation matrix. Returns RotationMatrix The identity rotation matrix.
def IdentityMatrix(): return RotationMatrix([ [1, 0, 0], [0, 1, 0], [0, 0, 1] ])
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def identity(self):\r\n return mat4(1.0, 0.0, 0.0, 0.0,\r\n 0.0, 1.0, 0.0, 0.0,\r\n 0.0, 0.0, 1.0, 0.0,\r\n 0.0, 0.0, 0.0, 1.0)", "def inverse(self):\n return Rotation(self.matrix.transposed())", "def identity_matrix():\r\n return numpy....
[ "0.6744885", "0.66293615", "0.6586375", "0.6555307", "0.65385115", "0.64919955", "0.636974", "0.6257804", "0.62533265", "0.6199502", "0.6198846", "0.6153226", "0.6037757", "0.5991129", "0.5965922", "0.59429616", "0.5888656", "0.58818346", "0.58580905", "0.58475363", "0.583004...
0.81541634
0
Reorients a rotation matrix by pivoting it by an angle around one of its axes. Given a rotation matrix, a selected coordinate axis, and an angle in degrees, this function pivots the rotation matrix by that angle around that coordinate axis. For example, if you have rotation matrix that converts ecliptic coordinates (EC...
def Pivot(rotation, axis, angle): # Check for an invalid coordinate axis. if axis not in [0, 1, 2]: raise Error('Invalid axis {}. Must be [0, 1, 2].'.format(axis)) radians = math.radians(angle) c = math.cos(radians) s = math.sin(radians) # We need to maintain the "right-hand" rule, no ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def rotatePivot(rotation):\r\n # Rotate in object mode X\r\n bpy.ops.object.mode_set(mode='OBJECT')\r\n bpy.ops.transform.rotate(value=rotation.x, axis=(1,0,0), constraint_orientation='GLOBAL')\r\n # rotate in edit mode X\r\n bpy.ops.object.mode_set(mode='EDIT')\r\n bpy.ops.mesh.select_all(action...
[ "0.66862166", "0.65094155", "0.6402653", "0.635066", "0.6122022", "0.6061309", "0.60147035", "0.6006913", "0.59800756", "0.59382063", "0.59350175", "0.59217626", "0.59134173", "0.5878177", "0.5859984", "0.58257604", "0.5821623", "0.58115226", "0.58043355", "0.57987654", "0.57...
0.7298713
0
Applies a rotation to a vector, yielding a rotated vector. This function transforms a vector in one orientation to a vector in another orientation.
def RotateVector(rotation, vector): return Vector( rotation.rot[0][0]*vector.x + rotation.rot[1][0]*vector.y + rotation.rot[2][0]*vector.z, rotation.rot[0][1]*vector.x + rotation.rot[1][1]*vector.y + rotation.rot[2][1]*vector.z, rotation.rot[0][2]*vector.x + rotation.rot[1][2]*vector.y + rot...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def rotate(vector, angle):\n return np.cos(angle) * vector[0] + np.sin(angle) * vector[1], \\\n -np.sin(angle) * vector[0] + np.cos(angle) * vector[1]", "def apply_rotation_only(self, vector):\n return np.dot(self.rotation_matrix, vector)", "def rotate (vect, angle, axis):\n\n cosine = np.c...
[ "0.7849487", "0.76143694", "0.74587345", "0.7415881", "0.72899073", "0.7230249", "0.7102616", "0.7071868", "0.70377046", "0.70212704", "0.6890128", "0.68810207", "0.68657136", "0.6860039", "0.6830906", "0.68053716", "0.66963667", "0.66336304", "0.65873796", "0.6582798", "0.65...
0.77254397
1
Applies a rotation to a state vector, yielding a rotated state vector. This function transforms a state vector in one orientation to a state vector in another orientation. Both the position and velocity vectors are rotated the same way.
def RotateState(rotation, state): return StateVector( rotation.rot[0][0]*state.x + rotation.rot[1][0]*state.y + rotation.rot[2][0]*state.z, rotation.rot[0][1]*state.x + rotation.rot[1][1]*state.y + rotation.rot[2][1]*state.z, rotation.rot[0][2]*state.x + rotation.rot[1][2]*state.y + rotation...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def RotateVector(rotation, vector):\n return Vector(\n rotation.rot[0][0]*vector.x + rotation.rot[1][0]*vector.y + rotation.rot[2][0]*vector.z,\n rotation.rot[0][1]*vector.x + rotation.rot[1][1]*vector.y + rotation.rot[2][1]*vector.z,\n rotation.rot[0][2]*vector.x + rotation.rot[1][2]*vecto...
[ "0.660283", "0.6499375", "0.63328576", "0.6332595", "0.631458", "0.63041615", "0.61546046", "0.61114883", "0.5915919", "0.5903883", "0.586938", "0.5852559", "0.58192164", "0.5802146", "0.5791364", "0.57722956", "0.5769193", "0.5767105", "0.57183295", "0.5715796", "0.5715114",...
0.71861947
0
Calculates a rotation matrix from equatorial J2000 (EQJ) to ecliptic J2000 (ECL). This is one of the family of functions that returns a rotation matrix for converting from one orientation to another.
def Rotation_EQJ_ECL(): # ob = mean obliquity of the J2000 ecliptic = 0.40909260059599012 radians. c = 0.9174821430670688 # cos(ob) s = 0.3977769691083922 # sin(ob) return RotationMatrix([ [ 1, 0, 0], [ 0, +c, -s], [ 0, +s, +c] ])
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def Rotation_ECL_EQJ():\n # ob = mean obliquity of the J2000 ecliptic = 0.40909260059599012 radians.\n c = 0.9174821430670688 # cos(ob)\n s = 0.3977769691083922 # sin(ob)\n return RotationMatrix([\n [ 1, 0, 0],\n [ 0, +c, +s],\n [ 0, -s, +c]\n ])", "def Rotation_GAL_EQ...
[ "0.86163133", "0.7393654", "0.73063016", "0.6857703", "0.668576", "0.65525454", "0.6276573", "0.6048531", "0.59902287", "0.58683586", "0.58412457", "0.57923734", "0.5731624", "0.57046616", "0.56928736", "0.5658011", "0.561463", "0.56068426", "0.56005824", "0.5580676", "0.5578...
0.87015605
0
Calculates a rotation matrix from ecliptic J2000 (ECL) to equatorial J2000 (EQJ). This is one of the family of functions that returns a rotation matrix for converting from one orientation to another.
def Rotation_ECL_EQJ(): # ob = mean obliquity of the J2000 ecliptic = 0.40909260059599012 radians. c = 0.9174821430670688 # cos(ob) s = 0.3977769691083922 # sin(ob) return RotationMatrix([ [ 1, 0, 0], [ 0, +c, +s], [ 0, -s, +c] ])
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def Rotation_EQJ_ECL():\n # ob = mean obliquity of the J2000 ecliptic = 0.40909260059599012 radians.\n c = 0.9174821430670688 # cos(ob)\n s = 0.3977769691083922 # sin(ob)\n return RotationMatrix([\n [ 1, 0, 0],\n [ 0, +c, -s],\n [ 0, +s, +c]\n ])", "def Rotation_GAL_EQ...
[ "0.8616834", "0.7379288", "0.7274007", "0.69608706", "0.6779567", "0.6458371", "0.6160288", "0.61434925", "0.598836", "0.5944848", "0.59174013", "0.5835905", "0.57034963", "0.5623316", "0.5621353", "0.56159097", "0.5554253", "0.5550412", "0.5548393", "0.5543653", "0.5533194",...
0.85279053
1
Calculates a rotation matrix from horizontal (HOR) to equatorial ofdate (EQD). This is one of the family of functions that returns a rotation matrix for converting from one orientation to another.
def Rotation_HOR_EQD(time, observer): rot = Rotation_EQD_HOR(time, observer) return InverseRotation(rot)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def Rotation_HOR_EQJ(time, observer):\n hor_eqd = Rotation_HOR_EQD(time, observer)\n eqd_eqj = Rotation_EQD_EQJ(time)\n return CombineRotation(hor_eqd, eqd_eqj)", "def Rotation_EQD_HOR(time, observer):\n sinlat = math.sin(math.radians(observer.latitude))\n coslat = math.cos(math.radians(observer.l...
[ "0.67345273", "0.65684956", "0.63870615", "0.6350805", "0.625724", "0.62487614", "0.62326425", "0.62164104", "0.6144762", "0.6098985", "0.60678136", "0.6061378", "0.6061378", "0.6053057", "0.60503894", "0.60381186", "0.60381186", "0.6035747", "0.6030551", "0.6019922", "0.6018...
0.6739857
0
Calculates a rotation matrix from equatorial J2000 (EQJ) to galactic (GAL). This is one of the family of functions that returns a rotation matrix for converting from one orientation to another.
def Rotation_EQJ_GAL(): # This rotation matrix was calculated by the following script # in this same source code repository: # demo/python/galeqj_matrix.py return RotationMatrix([ [-0.0548624779711344, +0.4941095946388765, -0.8676668813529025], [-0.8734572784246782, -0.4447938112296831, ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def Rotation_GAL_EQJ():\n # This rotation matrix was calculated by the following script\n # in this same source code repository:\n # demo/python/galeqj_matrix.py\n return RotationMatrix([\n [-0.0548624779711344, -0.8734572784246782, -0.4838000529948520],\n [+0.4941095946388765, -0.4447938...
[ "0.85703087", "0.7528242", "0.7327208", "0.6328864", "0.61764145", "0.6138814", "0.61379904", "0.61125433", "0.60114515", "0.595861", "0.59362024", "0.5811159", "0.5794609", "0.5791045", "0.57844347", "0.5754217", "0.57280266", "0.5723113", "0.5714538", "0.57099533", "0.56688...
0.8564854
1
Calculates a rotation matrix from galactic (GAL) to equatorial J2000 (EQJ). This is one of the family of functions that returns a rotation matrix for converting from one orientation to another.
def Rotation_GAL_EQJ(): # This rotation matrix was calculated by the following script # in this same source code repository: # demo/python/galeqj_matrix.py return RotationMatrix([ [-0.0548624779711344, -0.8734572784246782, -0.4838000529948520], [+0.4941095946388765, -0.4447938112296831, ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def Rotation_EQJ_GAL():\n # This rotation matrix was calculated by the following script\n # in this same source code repository:\n # demo/python/galeqj_matrix.py\n return RotationMatrix([\n [-0.0548624779711344, +0.4941095946388765, -0.8676668813529025],\n [-0.8734572784246782, -0.4447938...
[ "0.8547899", "0.7696984", "0.7483309", "0.65558374", "0.6405126", "0.6366543", "0.62534976", "0.6228506", "0.61643636", "0.6144468", "0.6080664", "0.59927636", "0.59585696", "0.5880319", "0.5871932", "0.5867507", "0.5859987", "0.5829469", "0.582862", "0.5816222", "0.5805755",...
0.85897744
0
Searches for a lunar eclipse. This function finds the first lunar eclipse that occurs after `startTime`. A lunar eclipse may be penumbral, partial, or total. See LunarEclipseInfo for more information. To find a series of lunar eclipses, call this function once, then keep calling NextLunarEclipse as many times as desire...
def SearchLunarEclipse(startTime): PruneLatitude = 1.8 # full Moon's ecliptic latitude above which eclipse is impossible fmtime = startTime for fmcount in range(12): # Search for the next full moon. Any eclipse will be near it. fullmoon = SearchMoonPhase(180, fmtime, 40) if fullmoo...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def NextLunarEclipse(prevEclipseTime):\n startTime = prevEclipseTime.AddDays(10.0)\n return SearchLunarEclipse(startTime)", "def SearchGlobalSolarEclipse(startTime):\n PruneLatitude = 1.8 # Moon's ecliptic latitude beyond which eclipse is impossible\n # Iterate through consecutive new moons until...
[ "0.7177961", "0.69117546", "0.6628545", "0.5907302", "0.5883186", "0.58169025", "0.5749452", "0.56897515", "0.51099545", "0.4966789", "0.4503948", "0.44885355", "0.446948", "0.44633645", "0.43233678", "0.43150833", "0.43052515", "0.42883053", "0.4202762", "0.41929194", "0.418...
0.7905472
0
Searches for the next lunar eclipse in a series. After using SearchLunarEclipse to find the first lunar eclipse in a series, you can call this function to find the next consecutive lunar eclipse. Pass in the `peak` value from the LunarEclipseInfo returned by the previous call to `SearchLunarEclipse` or `NextLunarEclips...
def NextLunarEclipse(prevEclipseTime): startTime = prevEclipseTime.AddDays(10.0) return SearchLunarEclipse(startTime)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def NextGlobalSolarEclipse(prevEclipseTime):\n startTime = prevEclipseTime.AddDays(10.0)\n return SearchGlobalSolarEclipse(startTime)", "def NextLocalSolarEclipse(prevEclipseTime, observer):\n startTime = prevEclipseTime.AddDays(10.0)\n return SearchLocalSolarEclipse(startTime, observer)", "def Sea...
[ "0.59971356", "0.59860957", "0.58740824", "0.5411783", "0.50976974", "0.50542134", "0.49617663", "0.493583", "0.4854526", "0.484128", "0.47810292", "0.47610226", "0.47536886", "0.47427884", "0.47348768", "0.47017637", "0.46931818", "0.4664078", "0.46544045", "0.46398738", "0....
0.69643295
0
Searches for a solar eclipse visible anywhere on the Earth's surface. This function finds the first solar eclipse that occurs after `startTime`. A solar eclipse may be partial, annular, or total. See GlobalSolarEclipseInfo for more information. To find a series of solar eclipses, call this function once, then keep call...
def SearchGlobalSolarEclipse(startTime): PruneLatitude = 1.8 # Moon's ecliptic latitude beyond which eclipse is impossible # Iterate through consecutive new moons until we find a solar eclipse visible somewhere on Earth. nmtime = startTime for nmcount in range(12): # Search for the next new ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def SearchLocalSolarEclipse(startTime, observer):\n PruneLatitude = 1.8 # Moon's ecliptic latitude beyond which eclipse is impossible\n\n # Iterate through consecutive new moons until we find a solar eclipse visible somewhere on Earth.\n nmtime = startTime\n while True:\n # Search for the next...
[ "0.7168693", "0.71285933", "0.69158244", "0.6067655", "0.5885223", "0.57924175", "0.5534806", "0.55009526", "0.5290573", "0.52733195", "0.49125507", "0.4871641", "0.4788447", "0.47700775", "0.4745447", "0.47275046", "0.46662232", "0.45702258", "0.4569849", "0.4536721", "0.449...
0.81441736
0
Searches for the next global solar eclipse in a series. After using SearchGlobalSolarEclipse to find the first solar eclipse in a series, you can call this function to find the next consecutive solar eclipse. Pass in the `peak` value from the GlobalSolarEclipseInfo returned by the previous call to `SearchGlobalSolarEcl...
def NextGlobalSolarEclipse(prevEclipseTime): startTime = prevEclipseTime.AddDays(10.0) return SearchGlobalSolarEclipse(startTime)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def NextLocalSolarEclipse(prevEclipseTime, observer):\n startTime = prevEclipseTime.AddDays(10.0)\n return SearchLocalSolarEclipse(startTime, observer)", "def SearchGlobalSolarEclipse(startTime):\n PruneLatitude = 1.8 # Moon's ecliptic latitude beyond which eclipse is impossible\n # Iterate throu...
[ "0.5792426", "0.5629244", "0.5528879", "0.53021693", "0.5092248", "0.49328157", "0.49052542", "0.4873923", "0.48658183", "0.48517042", "0.4804778", "0.47889197", "0.4785382", "0.47481638", "0.47071198", "0.4704597", "0.46917987", "0.46542454", "0.46535888", "0.4641102", "0.46...
0.697016
0
Searches for a solar eclipse visible at a specific location on the Earth's surface. This function finds the first solar eclipse that occurs after `startTime`. A solar eclipse may be partial, annular, or total. See LocalSolarEclipseInfo for more information. To find a series of solar eclipses, call this function once, t...
def SearchLocalSolarEclipse(startTime, observer): PruneLatitude = 1.8 # Moon's ecliptic latitude beyond which eclipse is impossible # Iterate through consecutive new moons until we find a solar eclipse visible somewhere on Earth. nmtime = startTime while True: # Search for the next new moon. ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def SearchGlobalSolarEclipse(startTime):\n PruneLatitude = 1.8 # Moon's ecliptic latitude beyond which eclipse is impossible\n # Iterate through consecutive new moons until we find a solar eclipse visible somewhere on Earth.\n nmtime = startTime\n for nmcount in range(12):\n # Search for the...
[ "0.79329747", "0.7292774", "0.651171", "0.6208828", "0.6151177", "0.57111037", "0.5598766", "0.53923774", "0.528524", "0.5054952", "0.49378303", "0.4883392", "0.48659658", "0.47298855", "0.46276337", "0.46272054", "0.45713186", "0.45694572", "0.44755587", "0.44633758", "0.444...
0.75336695
1
Searches for the next local solar eclipse in a series. After using SearchLocalSolarEclipse to find the first solar eclipse in a series, you can call this function to find the next consecutive solar eclipse. Pass in the `peak` value from the LocalSolarEclipseInfo returned by the previous call to `SearchLocalSolarEclipse...
def NextLocalSolarEclipse(prevEclipseTime, observer): startTime = prevEclipseTime.AddDays(10.0) return SearchLocalSolarEclipse(startTime, observer)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def NextGlobalSolarEclipse(prevEclipseTime):\n startTime = prevEclipseTime.AddDays(10.0)\n return SearchGlobalSolarEclipse(startTime)", "def NextLunarEclipse(prevEclipseTime):\n startTime = prevEclipseTime.AddDays(10.0)\n return SearchLunarEclipse(startTime)", "def SearchGlobalSolarEclipse(startTim...
[ "0.6639206", "0.6052359", "0.5435755", "0.5359843", "0.5192387", "0.50458866", "0.49990377", "0.49491575", "0.4879925", "0.47822466", "0.4723907", "0.46944916", "0.46922082", "0.467796", "0.4677491", "0.4673371", "0.4643649", "0.4620012", "0.457984", "0.4578227", "0.4576979",...
0.674167
0
Searches for the first transit of Mercury or Venus after a given date. Finds the first transit of Mercury or Venus after a specified date. A transit is when an inferior planet passes between the Sun and the Earth so that the silhouette of the planet is visible against the Sun in the background. To continue the search, ...
def SearchTransit(body, startTime): threshold_angle = 0.4 # maximum angular separation to attempt transit calculation dt_days = 1.0 # Validate the planet and find its mean radius. if body == Body.Mercury: planet_radius_km = 2439.7 elif body == Body.Venus: planet_radius_km = 6051...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def NextTransit(body, prevTransitTime):\n startTime = prevTransitTime.AddDays(100.0)\n return SearchTransit(body, startTime)", "def get_planet_next_transit(jd_start, jd_end, planet, ayanamsha_id=swe.SIDM_LAHIRI):\n swe.set_sid_mode(ayanamsha_id)\n\n transits = []\n MIN_JUMP = 15 # Random check fo...
[ "0.63901734", "0.5784743", "0.5179206", "0.49895725", "0.4970888", "0.49679473", "0.48535034", "0.4852743", "0.48331997", "0.47836292", "0.47788066", "0.47753096", "0.47036335", "0.46323344", "0.4625567", "0.45997107", "0.45993558", "0.45969525", "0.45568976", "0.45533222", "...
0.61765516
1
Searches for another transit of Mercury or Venus. After calling SearchTransit to find a transit of Mercury or Venus, this function finds the next transit after that. Keep calling this function as many times as you want to keep finding more transits.
def NextTransit(body, prevTransitTime): startTime = prevTransitTime.AddDays(100.0) return SearchTransit(body, startTime)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def SearchTransit(body, startTime):\n threshold_angle = 0.4 # maximum angular separation to attempt transit calculation\n dt_days = 1.0\n\n # Validate the planet and find its mean radius.\n if body == Body.Mercury:\n planet_radius_km = 2439.7\n elif body == Body.Venus:\n planet_rad...
[ "0.60858333", "0.5970032", "0.5833487", "0.57271963", "0.56629825", "0.5513272", "0.5503055", "0.53995866", "0.53987354", "0.5243168", "0.52341384", "0.52312404", "0.5221847", "0.5217977", "0.5185825", "0.51652163", "0.5132048", "0.5117181", "0.51027936", "0.5098756", "0.5095...
0.7080737
0
Get matching configs using standard PIXELFORMATDESCRIPTOR technique.
def _get_pixel_format_descriptor_matching_configs(self, canvas): pfd = PIXELFORMATDESCRIPTOR() pfd.nSize = sizeof(PIXELFORMATDESCRIPTOR) pfd.nVersion = 1 pfd.dwFlags = PFD_DRAW_TO_WINDOW | PFD_SUPPORT_OPENGL if self.double_buffer: pfd.dwFlags |= PFD_DOUBLEBUFFER ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _get_arb_pixel_format_matching_configs(self, canvas):\n\n # Check for required extensions \n if self.sample_buffers or self.samples:\n if not gl_info.have_extension('GL_ARB_multisample'):\n return []\n\n # Construct array of attributes\n attrs = []\n...
[ "0.7194804", "0.6016497", "0.56211036", "0.54206175", "0.5388837", "0.53351456", "0.5328755", "0.53102416", "0.529292", "0.5205314", "0.5172799", "0.51545984", "0.51449746", "0.5102495", "0.5097744", "0.5084321", "0.5044648", "0.50389016", "0.5022929", "0.50155205", "0.499801...
0.76878154
0
Get configs using the WGL_ARB_pixel_format extension. This method assumes a (dummy) GL context is already created.
def _get_arb_pixel_format_matching_configs(self, canvas): # Check for required extensions if self.sample_buffers or self.samples: if not gl_info.have_extension('GL_ARB_multisample'): return [] # Construct array of attributes attrs = [] for na...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _get_pixel_format_descriptor_matching_configs(self, canvas):\n pfd = PIXELFORMATDESCRIPTOR()\n pfd.nSize = sizeof(PIXELFORMATDESCRIPTOR)\n pfd.nVersion = 1\n pfd.dwFlags = PFD_DRAW_TO_WINDOW | PFD_SUPPORT_OPENGL\n\n if self.double_buffer:\n pfd.dwFlags |= PFD_DOUBL...
[ "0.6772448", "0.57424074", "0.5567094", "0.52413565", "0.5173083", "0.50337434", "0.50237656", "0.49902695", "0.49771088", "0.49641028", "0.47908753", "0.47457704", "0.47089696", "0.46747124", "0.4663806", "0.46361196", "0.46246383", "0.4608715", "0.45941466", "0.4585389", "0...
0.69498193
0
Renders the home page, which varies depending on the type of user.
def home(): # sets the page to load depending on the type of user # if none specified the login screen will be displayed pageName = '' userType = session.get('UserType', None) if userType == None: pageName = 'anonHome.jade' elif userType == 'Seeker': pageName = 'indexJob.jade' ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def home():\n\n return render_template('home_page.html')", "def get(self):\n if self.logged_in:\n self.render('home.html', {\n 'name': self.current_user.name,\n 'server': self.current_user.server,\n 'faction': factions.get(self.current_user.faction),\n 'home': True,\n ...
[ "0.7827229", "0.7778227", "0.7643133", "0.7636759", "0.75849384", "0.75635684", "0.7546959", "0.75277245", "0.75277245", "0.75277245", "0.75277245", "0.75277245", "0.75277245", "0.75277245", "0.75277245", "0.75277245", "0.75277245", "0.75277245", "0.75277245", "0.75277245", "...
0.8399138
0
Renders the poll details page.
def details(key): error_message = '' if request.method == 'POST': try: choice_key = request.form['choice'] repository.increment_vote(key, choice_key) return redirect('/results/{0}'.format(key)) except KeyError: error_message = 'Please make a select...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def detail(request, question_id):\n question = get_object_or_404(Question, pk=question_id)\n return render(request, 'polls/details.html', {'question': question})", "def detail(request, year, month, day, slug, template_name=\"pollit/detail.html\"):\n bot_detection = False\n \n # These are bogus fie...
[ "0.6211835", "0.6111161", "0.60324866", "0.60105187", "0.5874936", "0.575818", "0.57539546", "0.5734851", "0.57134527", "0.5691729", "0.56792814", "0.5675843", "0.56741256", "0.5634803", "0.55602604", "0.5517714", "0.5490743", "0.54823184", "0.5428416", "0.5413317", "0.541299...
0.65925455
0
Check to see if the ipfs hash is accessible via ipfs.io and cloudflare
def check_ipfs(ipfs_hash): ipfs_gateways = [ f"https://gateway.ipfs.io/ipfs/{ipfs_hash}", f"https://cloudflare-ipfs.com/ipfs/{ipfs_hash}" ] ipfs_status = [] for gateway in ipfs_gateways: res = requests.get(gateway) logging.info(res.status_code) if res.status_code...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def is_hash_locally_cached(self, ipfs_hash: str, ipfs_refs_local=None) -> bool:\n output = run([\"ipfs\", \"files\", \"stat\", \"--with-local\", \"--size\", f\"/ipfs/{ipfs_hash}\"])\n if \"(100.00%)\" in output:\n log(\"already fully cached\", \"green\")\n log(output)\n ...
[ "0.62335163", "0.6194082", "0.615428", "0.6120198", "0.59612596", "0.59612596", "0.59612596", "0.59612596", "0.59612596", "0.59612596", "0.59612596", "0.59612596", "0.59612596", "0.59612596", "0.59612596", "0.59612596", "0.59612596", "0.59612596", "0.59612596", "0.59612596", ...
0.74173796
0
Pins IPFS hash in Account
def pin_ipfs(ipfs_hash): ipfs_pin_url = f"https://ipfs.blockfrost.io/api/v0/ipfs/pin/add/{ipfs_hash}" headers = {"project_id": f"{config.BLOCKFROST_IPFS}"} res = requests.post(ipfs_pin_url, headers=headers) res.raise_for_status() if res.status_code == 200: logger.info("Uploaded image to Bloc...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def current_hash(self):", "def hash(self) -> str:\r\n ...", "def hashing(file,pp):\n\n def myhash(instring):\n # sdbm hash\n res = 0\n for t in instring:\n res = (ord(t) + (res<<6) + (res<<16) - res) % 2**32\n return res\n\n return hex(myhash(file.replace('\\...
[ "0.6034746", "0.57029116", "0.5657925", "0.55943", "0.5575381", "0.5575381", "0.5564303", "0.5559806", "0.5548201", "0.5543682", "0.5539289", "0.55147713", "0.55132955", "0.5507827", "0.5494082", "0.5480165", "0.54706514", "0.5470052", "0.54602665", "0.5456546", "0.54490155",...
0.572622
1
Removes pin from IPFS hash in Blockfrost
def remove_ipfs(ipfs_hash): ipfs_remove_url = f"https://ipfs.blockfrost.io/api/v0/ipfs/pin/remove/{ipfs_hash}" headers = {"project_id": f"{config.BLOCKFROST_IPFS}"} res = requests.post(ipfs_remove_url, headers=headers) res.raise_for_status() if res.status_code == 200: logging.info("Removing ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def removePin(self, currentPin):\n return self.setPin('', currentPin)", "def unlink(address):", "def remove(ip):\n return __apf_cmd(\"-u {}\".format(ip))", "def removeKey(self, timeOrHash) -> None:\n ...", "def stop_hash(cobj, hash):\n pass", "def pin_delete(self, pin_id=None, path=No...
[ "0.59864193", "0.58929986", "0.566515", "0.562887", "0.56143624", "0.5573397", "0.5527597", "0.5498241", "0.5460978", "0.5433317", "0.5394837", "0.53919375", "0.53613394", "0.5354594", "0.5345406", "0.5327701", "0.53175294", "0.5313368", "0.5312901", "0.5310116", "0.5282369",...
0.7604261
0
Make natural parameterised circuit capable of encoding a fixed number of features
def make_natural_parameterised_circuit( n_qubits, depth, n_features, type_circuit=0, initial_angles='natural', random_seed=None, ): if (n_qubits % 2 == 1) and (type_circuit in [0, 1, 2]): raise ValueError( 'Requested circuit setup, n_qubits='+f'{n_qubits}' + '...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def n_inputs(self):", "def construct(self, n_features, name, summarize = False):\n \n x = [tf.zeros(shape = (1, n_features), dtype='float32'), tf.ones(shape = (1,), dtype='float32')]\n out = self(*x)\n \n if summarize:\n print(\"----------Count Model \" + name + \" A...
[ "0.5894319", "0.5864778", "0.5864189", "0.5853655", "0.5823438", "0.5813039", "0.57656705", "0.56784433", "0.5622278", "0.56156546", "0.55919105", "0.5574527", "0.5569564", "0.5569564", "0.5564142", "0.55586284", "0.5556819", "0.55296326", "0.5528368", "0.5527003", "0.5523649...
0.62567484
0
Round the latitude and longitude to 3 decimal places and return a concatenated string
def _normalize_location(lat: float, lon: float): latitude = "{0:.3f}".format(round(lat, 3)) longitude = "{0:.3f}".format(round(lon, 3)) return latitude + ":" + longitude
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def lonlat2string(val,lonlat):\n # Check lonlat is valid\n if lonlat not in ['lon','lat']:\n raise UserWarning(\"lonlat not valid. Must be 'lon' or 'lat'.\")\n # Remove decimal point if integer value, eg 5.0 becomes 5\n # and take absolute value\n if int(val)==val:\n xx=abs(int(val))...
[ "0.65590024", "0.64609104", "0.6381535", "0.62663203", "0.6252935", "0.62383384", "0.6189526", "0.6189526", "0.6166923", "0.6166923", "0.6053204", "0.6028584", "0.5931099", "0.59148026", "0.59131753", "0.5859578", "0.5853354", "0.5808412", "0.58035725", "0.57806176", "0.56938...
0.69554925
0
Parses list of miRNA of interests.
def parse_target_miRNAlist(miRNAlist_fp): miRNAlist = [] infile = open(miRNAlist_fp, 'r') for line in infile: miRNA = line.strip() miRNAlist.append(miRNA) return sorted(miRNAlist)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def mel_ncRNA_list(list):\n\tncRNA = [] #initiates list\n\tfor i in list:\n\t\tif i[2] == 'ncRNA':\n\t\t\tpreidRNA = i[8].split(';')[0]\n\t\t\t#[ID=FBgn0031208];Name=CG11023;Ontology_term=SO:0000010,SO:0000087,GO:0016929,GO:0016926;Dbxref=FlyBase:FBan0011023,FlyBase_Annotation_IDs:CG11023,GB_protein:ACZ94128,GB_pr...
[ "0.6437109", "0.524466", "0.5240582", "0.51759154", "0.5137888", "0.51171225", "0.5084798", "0.5070275", "0.50546885", "0.4955103", "0.49412626", "0.49412626", "0.49323672", "0.49202147", "0.49155933", "0.4891695", "0.48837057", "0.48812124", "0.4879975", "0.48767328", "0.485...
0.662599
0
extract tokenlevel data (features) from file that is NER tagged and the corresponding POS file this method should output the format expected by the crfsuite script, i.e., nerfeats.py that then looks at a tokens context and produces the respective crfsuite format Separator of field values. separator = ' ' Field names ==...
def extract_data(file_ner,file_pos,separator=" "): # read NER and POS from the two files words_tags=read_conll_file(file_ner) words_pos=read_conll_file(file_pos) ## some checks, e.g., that both files have same length, same tokens assert(len(words_tags)==len(words_pos)) for (words,tags...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def extract_features_for_file(input_file, output_file, posfile):\n if not unlabeled:\n sents = read_file(input_file)\n else:\n sents = read_file_unlabeled(input_file)\n postags = get_pos_tags(posfile)\n with open(output_file,'w') as output_fileobj:\n if not unlabeled:\n ...
[ "0.6519903", "0.6177146", "0.6038081", "0.5657798", "0.55835706", "0.5559195", "0.55492765", "0.55248016", "0.55206233", "0.54385936", "0.54303473", "0.54303473", "0.5419111", "0.53982353", "0.5392206", "0.53844064", "0.5381787", "0.53598046", "0.53580046", "0.53253925", "0.5...
0.7610424
0
Default duration a Nonce is valid
def default_nonce_duration(): return now() + timedelta(hours=4)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def default_expiration_delta():\n return timezone.now() + const.EXPIRY_TOKEN_DELTA", "def expiry(self):\n return time() + self.ttl * (0.95 + 0.1 * random())", "def _expiration(timeout, time_format=None):\n if timeout == \"now\":\n return time_util.instant(time_format)\n else:\n # ...
[ "0.62425816", "0.61365783", "0.59581447", "0.5800889", "0.57976675", "0.5792096", "0.57003707", "0.5666652", "0.5662343", "0.5610256", "0.5569308", "0.55650043", "0.5551185", "0.5546965", "0.55445606", "0.5537256", "0.5537256", "0.55107015", "0.5388839", "0.5358184", "0.53545...
0.77484095
0
Entrypoint to integrate with User settings. Can either return None if no user settings are available, or an instanace of UIUserSettings.
def ui_user_settings(self) -> Optional[UIUserSettings]: return None
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def loadUserSettings(script=None, inputEvent=None):\n\n global _userSettings\n\n # Shutdown the output drivers and give them a chance to die.\n\n # Only exit the D-Bus server if we're in an environment where there \n # is a D-Bus session bus already running. This helps prevent nastiness\n # on the ...
[ "0.6466311", "0.631462", "0.619723", "0.6030184", "0.6017894", "0.5974499", "0.59733844", "0.5909033", "0.5837056", "0.58202434", "0.5802869", "0.57731026", "0.5770612", "0.5701841", "0.568085", "0.56636417", "0.565859", "0.5642608", "0.560013", "0.5549746", "0.5489493", "0...
0.7417824
1
Get casted provider instance
def get_provider(self) -> Optional[Provider]: if not self.provider: return None return Provider.objects.get_subclass(pk=self.provider.pk)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def build_provider(self) -> Provider:\n return self._provider", "def provider(self) -> Provider:\n return self._provider", "def get_provider(self):\n return self.provider", "def get_provider(self):\r\n if self.provided_by:\r\n return list(self.provided_b...
[ "0.68077075", "0.6539703", "0.64268285", "0.63070786", "0.62643164", "0.622027", "0.60054654", "0.59425586", "0.59425586", "0.5938953", "0.5862249", "0.57445145", "0.5735476", "0.5705429", "0.5701115", "0.5679465", "0.5642833", "0.56226635", "0.56114054", "0.5606897", "0.5577...
0.67793405
1
If source uses a httpbased flow, return UI Information about the login button. If source doesn't use httpbased flow, return None.
def ui_login_button(self) -> Optional[UILoginButton]: return None
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def click_login_button(self):", "def click_login(self):\n self.login.click()\n return self.login", "def login(self):\n\t\treturn self.__login", "def GET_login(self):\r\n\r\n # dest is the location to redirect to upon completion\r\n dest = request.get.get('dest','') or request.refe...
[ "0.6400558", "0.6170773", "0.61201465", "0.60899484", "0.6069817", "0.5979727", "0.59699935", "0.59527713", "0.5911758", "0.5895774", "0.5864247", "0.58047754", "0.58003986", "0.5751476", "0.57509035", "0.574673", "0.57381403", "0.5735673", "0.57123446", "0.5702004", "0.56860...
0.65524143
0
Entrypoint to integrate with User settings. Can either return None if no user settings are available, or an instanace of UIUserSettings.
def ui_user_settings(self) -> Optional[UIUserSettings]: return None
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def loadUserSettings(script=None, inputEvent=None):\n\n global _userSettings\n\n # Shutdown the output drivers and give them a chance to die.\n\n # Only exit the D-Bus server if we're in an environment where there \n # is a D-Bus session bus already running. This helps prevent nastiness\n # on the ...
[ "0.6466311", "0.631462", "0.619723", "0.6030184", "0.6017894", "0.5974499", "0.59733844", "0.5909033", "0.5837056", "0.58202434", "0.5802869", "0.57731026", "0.5770612", "0.5701841", "0.568085", "0.56636417", "0.565859", "0.5642608", "0.560013", "0.5549746", "0.5489493", "0...
0.7417824
0
Get link to use invitation
def link(self): return ( reverse_lazy("passbook_core:auth-sign-up") + f"?invitation={self.uuid.hex}" )
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def link(self):\n return f\"https://{DOMAIN}/invite/{self.code}\"", "def getLink(self):", "def get_token_link(self):\n return self.env['ir.config_parameter'].search([('key', '=', 'web.base.url')]).value + \"/web/signup?inv_id={}\".format(self.name)", "def link(self) -> Optional[str]:\n r...
[ "0.7861657", "0.65931886", "0.6585702", "0.62622947", "0.62622947", "0.6222669", "0.61522365", "0.6122701", "0.6118341", "0.6112001", "0.6089356", "0.6069074", "0.6021275", "0.6012447", "0.5986672", "0.5969101", "0.593585", "0.5903696", "0.5883809", "0.5858953", "0.5822116", ...
0.7991225
0
Converts numpy array to Vector3.
def np_vec3_to_vector3(direction): return Vector3(direction[0], direction[1], direction[2])
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def ndarray_to_vector3d(array: np.ndarray) -> carla.Vector3D: # pylint: disable=no-member\n return carla.Vector3D(*list(map(float, array))) # pylint: disable=no-member", "def vector3_to_np_vec3(direction):\n return np.array([direction.x, direction.y, direction.z])", "def vector3(x, y, z):\n return np....
[ "0.8397328", "0.7179289", "0.71640515", "0.71394897", "0.7020597", "0.6779498", "0.66029114", "0.64522076", "0.6402789", "0.6371414", "0.63325053", "0.6261069", "0.6233336", "0.62317127", "0.6133894", "0.6087886", "0.6084001", "0.60461056", "0.6018544", "0.59918106", "0.59849...
0.7573199
1
Converts Vector3 to numpy array.
def vector3_to_np_vec3(direction): return np.array([direction.x, direction.y, direction.z])
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def vector3(x, y, z):\n return np.array([x, y, z], dtype=float)", "def vector3(x, y, z):\n return np.array([x, y, z], dtype=np.float)", "def to_array(self) -> np.ndarray:\n return self._vector.copy()", "def np_vec3_to_vector3(direction):\n return Vector3(direction[0], direction[1], direction[...
[ "0.7463751", "0.7405319", "0.7139429", "0.710851", "0.68123937", "0.64955723", "0.64268667", "0.6422164", "0.63005257", "0.6292406", "0.62855095", "0.625422", "0.6242984", "0.62350076", "0.61996645", "0.6190181", "0.6113336", "0.61120874", "0.6107174", "0.6104282", "0.6062450...
0.78608984
0
Convert a possible scene to a mesh. If conversion occurs, the returned mesh has only vertex and face data.
def as_mesh(scene_or_mesh): if isinstance(scene_or_mesh, trimesh.Scene): if len(scene_or_mesh.geometry) == 0: mesh = None # empty scene else: # we lose texture information here mesh = trimesh.util.concatenate( tuple(trimesh.Trimesh(vertices=g.vert...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def as_mesh(scene_or_mesh):\n if isinstance(scene_or_mesh, trimesh.Scene):\n if len(scene_or_mesh.geometry) == 0:\n mesh = None # empty scene\n else:\n # we lose texture information here\n mesh = trimesh.util.concatenate(\n tuple(trimesh.Trimesh(ver...
[ "0.7314216", "0.6528287", "0.6262896", "0.6207714", "0.61838585", "0.5970059", "0.596571", "0.59578204", "0.5871163", "0.58426136", "0.5788301", "0.5749995", "0.57374555", "0.5730964", "0.5730847", "0.57301193", "0.5719832", "0.5695433", "0.5695433", "0.5695433", "0.5695433",...
0.7313188
1
Pushover specific API restrictions when using priority 2
def test_pushover_priority_2_restrictions( self, data, message, provider, test_message ): base_data = {"message": test_message, "priority": 2} final_data = {**base_data, **data} rsp = provider.notify(**final_data) with pytest.raises(NotificationError) as e: rsp.ra...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def on_pull_request(self, payload):\n pass", "def dispatch_push(self, p, tweaks, badge):\n pass", "def pull(self, *args, **kwargs) -> Any:\n raise NotImplementedError", "def test_priority(self, inventoryloader):\n inventoryloader.set_group_priority('glance_api',-1)\n invent...
[ "0.5537467", "0.5440291", "0.51942396", "0.5106153", "0.5074165", "0.5039567", "0.5026014", "0.49894235", "0.498155", "0.4949846", "0.4929984", "0.49038878", "0.4902116", "0.48995495", "0.48789218", "0.48597535", "0.48512644", "0.48104364", "0.48096207", "0.47883597", "0.4784...
0.58214724
0
Used to nerf invalid methods
def invalid(self): pass
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def check_validity(self):", "def bad(self):\n raise NotImplementedError", "def bad(self):\n raise NotImplementedError", "def validate():", "def _check_validity(self):\n pass", "def ERR(self):", "def __validate():\n # TODO: implement", "def check_errors(self) -> None:", "def ...
[ "0.70803607", "0.70475763", "0.70475763", "0.7022869", "0.6970637", "0.69199365", "0.6819491", "0.6678783", "0.6628905", "0.6588386", "0.65467995", "0.6523236", "0.651454", "0.64847964", "0.64847964", "0.64245665", "0.6397561", "0.6373166", "0.63720995", "0.63468546", "0.6343...
0.79563725
0
Change some of the input values to 0 with probability self.noise_prob. Return the noisy output.
def apply_noise(self, input): mask = np.random.binomial(1, 1-self.noise_prob, len(input)) noisy_input = mask * input return noisy_input
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def reset_noise(self):\n self.advantage_hidden_layer.reset_noise()\n self.advantage_layer.reset_noise()\n self.value_hidden_layer.reset_noise()\n self.value_layer.reset_noise()", "def noiseReduction(self):\n pass", "def reset(self):\n self.noise.reset()", "def noise(...
[ "0.7002352", "0.6594805", "0.65575105", "0.65144813", "0.6511621", "0.64575404", "0.6377738", "0.6294255", "0.62464136", "0.62320817", "0.6211715", "0.61660206", "0.6159582", "0.6135452", "0.6108856", "0.61065316", "0.6097768", "0.6056743", "0.6050887", "0.6030854", "0.602518...
0.7375992
0
Encode the input vector and return the hidden layer.
def encode(self, input): h = np.zeros(self.hidden_size) preactivation = np.dot(self.W.T, input) + self.b sigmoid(preactivation, h) return h
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def encode(self):\n with tf.name_scope(\"encode\"):\n self.encoder_inputs = tf.layers.dense(\n inputs=self.encoder_inputs,\n units=self.options['hidden_size'], activation=None, use_bias=True,\n kernel_initializer=tf.keras.initializers.he_normal(seed=No...
[ "0.6366711", "0.62644607", "0.61589944", "0.6070543", "0.60465646", "0.60465646", "0.5984367", "0.5948031", "0.59459335", "0.5918803", "0.5918803", "0.58657014", "0.5859008", "0.58447266", "0.5814172", "0.58039576", "0.578531", "0.5781655", "0.57758033", "0.5770331", "0.57398...
0.6897835
0
load an image from the specified path then resize and centrally crop it so it is `max_dim` x `max_dim` then add the batch dimension then do the VGG preprocessing steps.
def load_and_preprocess_image(path, max_dim=512): f = tf.io.read_file(path) img = tf.io.decode_image(f) img = resize_min(img, max_dim) img = tf.expand_dims(img, axis=0) img = vgg_preprocess_input(img) return img
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def load_image(path):\n img = skimage.io.imread(path)\n img = img / 255.0\n assert (0 <= img).all() and (img <= 1.0).all()\n short_edge = min(img.shape[:2])\n yy = int((img.shape[0] - short_edge) / 2)\n xx = int((img.shape[1] - short_edge) / 2)\n crop_img = img[yy: yy + short_edge, xx: xx + sh...
[ "0.6574183", "0.6447274", "0.63645583", "0.6272842", "0.6116848", "0.6110461", "0.6093452", "0.6065792", "0.60598665", "0.604062", "0.6029678", "0.60124916", "0.60006446", "0.59922904", "0.596092", "0.59437567", "0.58958584", "0.58794254", "0.58730483", "0.5871344", "0.582857...
0.7724589
0
Replaces the state dictionary. Called by the server.
def _replace_state(self, state): logging.info('replace state') self._state = state
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __setstate__(self, state: Dict[str, Any]):\n self.__dict__.update(state)\n self.__dict__['__db'] = None", "def upgrade_state_dict(self, state_dict):\n self.upgrade_state_dict_named(state_dict, \"\")", "def updateSimState(self):\n self.sim_state = {k: v for k,v in self.state.iter...
[ "0.7673439", "0.73111874", "0.72976375", "0.72256994", "0.7077568", "0.7066114", "0.7002854", "0.6980714", "0.6939394", "0.69321483", "0.68761146", "0.6807582", "0.68060595", "0.68060595", "0.6760737", "0.67376167", "0.67376167", "0.67376167", "0.6713589", "0.66733", "0.65934...
0.77929693
0
Return true if num is a power of 2.
def is_power_of_2(num: int) -> bool: return ((num & (num - 1)) == 0) and num > 0
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def isPower2(num):\n\treturn ((num & (num - 1)) == 0) and num > 0", "def isPower2(num):\n\treturn ((num & (num - 1)) == 0) and num > 0", "def is_power2(num):\n num = int(num)\n return num != 0 and ((num & (num - 1)) == 0)", "def is_power_of_two(n):\n if n < 0:\n return False\n else:\n ...
[ "0.884419", "0.884419", "0.88261586", "0.8139863", "0.8122464", "0.8112884", "0.7948784", "0.7947629", "0.7744439", "0.7555327", "0.7025078", "0.6979623", "0.6923772", "0.66791964", "0.66763175", "0.66548973", "0.661825", "0.65802264", "0.64112157", "0.6408351", "0.6348953", ...
0.8865914
0
Generate the Merkle hash tree.
def __gen_merkle_tree__(self): tree_stage = [] tree_stage_num = int(log2(self.l)) current_tree_stage = self.keys[1:] for i in range(0, tree_stage_num): tree_stage.insert(i, self.__gen_parent_level_tree__(current_tree_stage)) current_tree_stage = tree_stage[i] ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _compute_merkle_tree(self):\n # Tree gets built bottom up\n level_nodes = [MerkleNode(t.hash, None, None) for t in self.txns]\n while True:\n if len(level_nodes) == 1:\n self.merkle_tree = level_nodes[0] # This is the root\n return\n if ...
[ "0.7157177", "0.6915455", "0.6781599", "0.6682052", "0.6654311", "0.65720206", "0.6502175", "0.6246709", "0.6217615", "0.61901957", "0.61448973", "0.6017076", "0.6000328", "0.5905268", "0.58781505", "0.5784526", "0.57212347", "0.5644087", "0.55961204", "0.55423427", "0.551983...
0.7847398
0
Generate one parent stage of a Merkle tree given the child stage. Here stage refers to "layers" or "lines" in a classic Merkle tree representation.
def __gen_parent_level_tree__(tree_stage_child: list) -> list: tree_stage = [] i = 0 for left_node, right_node in zip(tree_stage_child[0::2], tree_stage_child[1::2]): if right_node.parent: right_node = right_node.parent parent = Node(left_node, right_no...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __gen_merkle_tree__(self):\n tree_stage = []\n tree_stage_num = int(log2(self.l))\n current_tree_stage = self.keys[1:]\n\n for i in range(0, tree_stage_num):\n tree_stage.insert(i, self.__gen_parent_level_tree__(current_tree_stage))\n current_tree_stage = tree_...
[ "0.64636177", "0.6062987", "0.5476447", "0.54192954", "0.5419255", "0.5389049", "0.5225826", "0.5164089", "0.5147909", "0.51194674", "0.51185757", "0.51072705", "0.5085508", "0.50305814", "0.5010549", "0.50099546", "0.5007848", "0.49524415", "0.49524415", "0.4943746", "0.4942...
0.71007234
0
Assemble a hexagonal lattice
def hexagonal_lattice(self,rows=3, cols=3, noise=0.0005, A = None): points = [] for row in range(rows * 2): for col in range(cols): x = (col + (0.5 * (row % 2))) * np.sqrt(3) y = row * 0.5 x += np.random.normal(0,noise) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def gen_hex_lattice(n, m):\n \n G = nx.generators.lattice.hexagonal_lattice_graph(n, m)\n \n return G", "def make_hexplot(XX,VV,gs=100):\n coord = [[0,0,0],[0,400,-400],[-400,400,0],[-400,0,400],[0,-400,400],[400,-400,0],[400,0,-400],[0,800,-800],[-800,800,0],[-800,0,800],[0,-800,800],[800,-800,0]...
[ "0.7411218", "0.6632257", "0.64712155", "0.6449874", "0.64051443", "0.62135804", "0.62037694", "0.6081648", "0.60748833", "0.6074834", "0.60662365", "0.6022719", "0.60207736", "0.60140866", "0.59305614", "0.5922572", "0.5921145", "0.58739954", "0.5844137", "0.58116776", "0.57...
0.7521726
0
Make initial condition. Currently, this is a hexagonal lattice + noise Makes reference to the self.hexagonal_lattice function, then crops down to the reference frame
def make_init(self,L,noise=0.005): self.L = L self.x0 = self.hexagonal_lattice(int(np.ceil(self.L/0.5)),int(np.ceil(self.L/np.sqrt(3))),noise=noise) # self.x0 = self.hexagonal_lattice(self.n_c,self.n_c,noise=noise) # self.x0 = self.x0[self.x0.max(axis=1) < L*0.95] ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _setup_hydro_radial_initial_conditions(logger, filename,\n initial_condition):\n # Open the file, get needed dimensions\n gridfile = NetCDFFile(filename, 'r+')\n nVertLevels = len(gridfile.dimensions['nVertLevels'])\n # Get variables\n xCell = gridfile.v...
[ "0.59392774", "0.5737588", "0.55976343", "0.5594137", "0.55106485", "0.5469256", "0.54639053", "0.54175353", "0.5391243", "0.53064334", "0.52854824", "0.52771896", "0.5276438", "0.52277684", "0.5179265", "0.5150432", "0.5144536", "0.5126347", "0.5122714", "0.5107915", "0.5080...
0.6917108
0
Generate the CV_matrix, an (nc x nv x 3) array, considering the relationship between cells and vertices/triangulation. Essentially an array expression of the triangulation Uses the stored self.tris, the (nv x 3) array denoting the triangulation.
def assign_vertices(self): CV_matrix = np.zeros((self.n_c, self.n_v, 3)) for i in range(3): CV_matrix[self.tris[:, i], np.arange(self.n_v), i] = 1 self.CV_matrix = CV_matrix return self.CV_matrix
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _compute_adjacency_matrix(self):\n\n # Set up a quick-reference index to map cells to indexes\n for i, cell in enumerate(self.sim.cells):\n self._cell_indexes[cell] = i\n\n if all([self.sim.hub.cells == [self.sim.damaged],\n self.sim.damaged not in self.sim.cells]...
[ "0.61717534", "0.59852576", "0.5852776", "0.5803232", "0.58030313", "0.577428", "0.5750244", "0.57375413", "0.57214856", "0.5707548", "0.56348884", "0.5632274", "0.5586401", "0.55592734", "0.55582845", "0.55538017", "0.5526772", "0.55163646", "0.5513274", "0.5508839", "0.5507...
0.7186271
0
Plot the forces (quiver) on each cell (voronoi) To be used as a quick check.
def check_forces(self,x,F): Vor = Voronoi(x) fig, ax = plt.subplots() ax.set(aspect=1) voronoi_plot_2d(Vor, ax=ax) ax.scatter(x[:, 0], x[:, 1]) ax.quiver(x[:, 0], x[:, 1], F[:, 0], F[:, 1]) fig.show()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def plotVoronoiCell(self, cells):\n for i in cells:\n #i indexes volumes\n i = self.nonBI[i] #now i indexes vor.point_region\n\n vI = self.vor.regions[self.vor.point_region[i]]\n v = self.vor.vertices[vI, :]\n r = v\n\n fig = plt.figure()\n ...
[ "0.73838705", "0.6463043", "0.63555485", "0.6252123", "0.6200078", "0.617804", "0.61125225", "0.60573363", "0.59809726", "0.5835888", "0.58026546", "0.5779485", "0.57379895", "0.5720473", "0.5656932", "0.56547076", "0.56452245", "0.5642703", "0.56183815", "0.55659044", "0.555...
0.7518703
0
Reconstruct infinite voronoi regions in a 2D diagram to finite regions.
def voronoi_finite_polygons_2d(self, vor, radius=None): if vor.points.shape[1] != 2: raise ValueError("Requires 2D input") new_regions = [] new_vertices = vor.vertices.tolist() center = vor.points.mean(axis=0) if radius is None: ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def voronoi_finite_polygons_2d(self, vor, radius=None):\n # print(\"Running voronoi_finite_polygons_2d\")\n if vor.points.shape[1] != 2:\n raise ValueError(\"Requires 2D input\")\n new_regions = []\n new_vertices = vor.vertices.tolist()\n new_ridge_vertices = []\n ...
[ "0.7559519", "0.74015206", "0.73787266", "0.725093", "0.725093", "0.72185695", "0.68636286", "0.63500816", "0.6218842", "0.6112882", "0.60803324", "0.60665643", "0.60545295", "0.6015544", "0.599075", "0.59508216", "0.57215893", "0.56907266", "0.56806356", "0.56502056", "0.563...
0.74284416
1
Plot the Voronoi. Takes in a set of cell locs (x), tiles these 9fold, plots the full voronoi, then crops to the fieldofview
def plot_vor_boundary(self,x,ax,tri=False): x = x[~np.isnan(x[:,0])] c_types_print = np.ones(x.shape[0],dtype=np.int32)*-1 c_types_print[:self.n_C] = self.c_types regions, vertices = self.voronoi_finite_polygons_2d(Voronoi(x)) ax.set(aspect=1,xlim=(0,self.L...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def plotVoronoiCell(self, cells):\n for i in cells:\n #i indexes volumes\n i = self.nonBI[i] #now i indexes vor.point_region\n\n vI = self.vor.regions[self.vor.point_region[i]]\n v = self.vor.vertices[vI, :]\n r = v\n\n fig = plt.figure()\n ...
[ "0.7727964", "0.66494155", "0.65225863", "0.64023674", "0.6282906", "0.60589737", "0.60194004", "0.59862685", "0.59641385", "0.5915965", "0.5858845", "0.585766", "0.5812258", "0.56917834", "0.5687358", "0.568205", "0.5675554", "0.566858", "0.5656807", "0.56325746", "0.5580599...
0.6680079
1
For a given triangulation (nv x 3), remove repeated entries (i.e. rows) The triangulation is first reordered, such that the first cell id referenced is the smallest. Achieved via the function order_tris. (This preserves the internal order i.e. CCW) Then remove repeated rows via lexsort.
def remove_repeats(self,tri,n_c): tri = order_tris(np.mod(tri,n_c)) sorted_tri = tri[np.lexsort(tri.T), :] row_mask = np.append([True], np.any(np.diff(sorted_tri, axis=0), 1)) return sorted_tri[row_mask]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def deduplicate_trimesh_vertices(trimesh):\n def do_vert_hash(vert):\n return hash(str(set(vert)))\n\n new_verts = []\n new_faces = []\n\n seen_verts = {}\n for face in trimesh.faces:\n face_points = [trimesh.vs[i] for i in face]\n new_face = []\n for vert in face_points:...
[ "0.6553263", "0.6106515", "0.5886497", "0.5884244", "0.57199574", "0.571189", "0.5698214", "0.5607706", "0.5601397", "0.5576136", "0.5559883", "0.5525217", "0.5496841", "0.5489272", "0.5482148", "0.5392783", "0.53472847", "0.5333116", "0.5312821", "0.53086084", "0.5276668", ...
0.68152046
0
Calculates the triangulation on the set of points x.
def _triangulate(self,x): t = tr.triangulate({"vertices": x},"-n") tri = t["triangles"] neighbours = t["neighbors"] b_cells = np.zeros(self.n_c) b_cells[self.n_C:] = 1 three_b_cell_mask = b_cells[tri].sum(axis=1)==3 tri = tri[~three_...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def triangulation(P1, P2, x1, x2):\n A = np.zeros((4, 4))\n p1_1 = P1[0, :]\n p1_2 = P1[1, :]\n p1_3 = P1[2, :]\n \n p2_1 = P2[0, :]\n p2_2 = P2[1, :]\n p2_3 = P2[2, :]\n \n A[0,:] = x1[0] * p1_3 - p1_1\n A[1,:] = x1[1] * p1_3 - p1_2\n A[2,:] = x2[0] * p2_3 - p2_1\n A[3,:] = ...
[ "0.6735117", "0.6637244", "0.6581777", "0.6010723", "0.58526677", "0.5804925", "0.57841253", "0.56673104", "0.5637788", "0.5579669", "0.550549", "0.5472931", "0.54194415", "0.5357507", "0.5284079", "0.527088", "0.5231525", "0.51989096", "0.5177449", "0.51413894", "0.51009446"...
0.67413837
0
Fill this in properly later ... Consider the sum of the angles opposite every interface. If this is >180, then equiangulate. mask defines the cells/angles for which the sum with a neighbouring cell/angle is >180. These come in pairs
def equiangulate(self,x,mask): timeout = 100 k = 0 while (not mask.all())and(k<timeout): changed_tris,j = np.nonzero(~mask) chosen_cell = changed_tris[0] cell_mask = np.zeros(3,dtype=np.bool) cell_mask[j[0]] = True ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _generateTotalMask(self):\r\n\r\n mask = np.zeros(self.altPosMap.shape)\r\n\r\n for patch in self.finalPatches.itervalues():\r\n mask = mask + patch.array.astype(np.float)\r\n\r\n mask = ni.binary_closing(mask,\r\n structure=np.array([[1., 1., 1.]...
[ "0.55144584", "0.54635924", "0.5327514", "0.5321507", "0.531892", "0.5298708", "0.52930707", "0.52810323", "0.52758265", "0.52665085", "0.525687", "0.52530813", "0.52530813", "0.52530813", "0.5243592", "0.52272934", "0.52207834", "0.5211587", "0.52009386", "0.5198326", "0.519...
0.6670312
0
Calculates the periodic triangulation on the set of points x.
def _triangulate_periodic(self,x): #1. Tile cell positions 9-fold to perform the periodic triangulation # Calculates y from x. y is (9nc x 2) matrix, where the first (nc x 2) are the "true" cell positions, # and the rest are translations y = make_y(x,self.L*self.grid...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _triangulate(self,x):\n\n t = tr.triangulate({\"vertices\": x},\"-n\")\n tri = t[\"triangles\"]\n neighbours = t[\"neighbors\"]\n\n b_cells = np.zeros(self.n_c)\n b_cells[self.n_C:] = 1\n\n three_b_cell_mask = b_cells[tri].sum(axis=1)==3\n ...
[ "0.612278", "0.5916302", "0.5879133", "0.5864614", "0.5732814", "0.56649834", "0.5536501", "0.5442306", "0.53852946", "0.53547585", "0.53356886", "0.5306405", "0.52838755", "0.5267607", "0.52376753", "0.5213862", "0.5184386", "0.517412", "0.51656127", "0.5107246", "0.51021713...
0.7402136
0
For a nonperiodic simulation using boundary particles, dynamically update the number/position of particles to preserve cell shape continuity while also minimizing the number of boundary particles. Provided the cell aggregate is completely contiguous, then check_boundary ensures boundary particles form a single ring (i....
def check_boundary(self,x): b_cells = np.zeros(self.n_c) b_cells[self.n_C:] = 1 vBC = b_cells[self.tris] considered_triangles = vBC.sum(axis=1) == 2 add_extra = ((self.Angles*(1-vBC)>np.pi/2).T*considered_triangles.T).T if add_extra.any(): ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def process_cell_cell_collision(i, membrane, vert_normals, cell, next_cell, cells, membrane_bounds, membrane_polys, next_momentum, sim_speed):\r\n for j, other in enumerate(cells):\r\n if i == j:\r\n continue\r\n\r\n b1 = membrane_bounds[i]\r\n b2 = membrane_bounds[j]\r\n ...
[ "0.6303442", "0.6137644", "0.61231834", "0.5924819", "0.5917677", "0.5828749", "0.5821687", "0.5801289", "0.57705253", "0.5726959", "0.5718656", "0.571541", "0.5681828", "0.5668835", "0.56675667", "0.5658185", "0.5628178", "0.56099623", "0.5599587", "0.55822504", "0.558108", ...
0.70919824
0
Perform a normalization between [0,1]. x_norm = (xxmin)/(xmax xmin)
def normalize(self,x,xmin,xmax): return (x-xmin)/(xmax-xmin)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def normalize(x):\r\n return x/norm(x)", "def normalize(x, lower=-1, upper=1):\n x_norm = (upper - lower)*((x - np.min(x)) / (np.max(x) - np.min(x))) + lower\n return x_norm", "def normalize(x):\n # TODO: Implement Function\n data_max = np.max(x)\n data_min = np.min(x)\n x = (x - data_min)...
[ "0.80984056", "0.7955471", "0.7869283", "0.78684324", "0.7778468", "0.775667", "0.7737361", "0.76808083", "0.7642053", "0.7642053", "0.7632772", "0.74893105", "0.74049294", "0.7340071", "0.72964716", "0.7260495", "0.7206723", "0.71853065", "0.71826017", "0.71630496", "0.71421...
0.7973795
1
Given a triangulation, find the neighbouring triangles of each triangle. By convention, the column i in the output neigh corresponds to the triangle that is opposite the cell i in that triangle. Can supply neigh, meaning the algorithm only fills in gaps (1 entries)
def get_neighbours(tri,neigh=None,Range=None): n_v = tri.shape[0] if neigh is None: neigh = np.ones_like(tri,dtype=np.int32)*-1 if Range is None: Range = np.arange(n_v) tri_compare = np.concatenate((tri.T, tri.T)).T.reshape((-1, 3, 2)) for j in Range:#range(n_v): tri_sample_f...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def getNeighbours(seg,meta,inversedIndex):\n return np.unique(np.fromiter( (inversedIndex[x] for x in np.concatenate([meta.loc[seg]['ins'],meta.loc[seg]['outs']])),dtype=np.int))", "def neighbours(self):\n seen = set()\n return [l.other(self) for l in self.dovetails \\\n if id(l) not in see...
[ "0.66386586", "0.63550526", "0.63451123", "0.6295089", "0.62378013", "0.6230987", "0.62049955", "0.61915314", "0.61288077", "0.60819703", "0.60748374", "0.60631126", "0.6043969", "0.6040656", "0.6036181", "0.59922326", "0.59777915", "0.5969935", "0.5962422", "0.59499824", "0....
0.73773587
0
For each triangle (i.e. row in tri), order cell ids in ascending order
def order_tris(tri): nv = tri.shape[0] for i in range(nv): Min = np.argmin(tri[i]) tri[i] = tri[i,Min],tri[i,np.mod(Min+1,3)],tri[i,np.mod(Min+2,3)] return tri
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _calcOrderedCellVertexIDs(self):\n ids = numerix.zeros((8, self.nx, self.ny, self.nz), 'l')\n indices = numerix.indices((self.nx, self.ny, self.nz))\n ids[1] = indices[0] + (indices[1] + (indices[2] + 1) * (self.ny + 1) + 1) * (self.nx + 1)\n ids[0] = ids[1] + 1\n ids[3] = in...
[ "0.7105683", "0.6236358", "0.61281604", "0.6108323", "0.6060826", "0.5986876", "0.59830755", "0.59756875", "0.59084004", "0.58270144", "0.57842696", "0.5718062", "0.5678131", "0.56585723", "0.5649019", "0.56104344", "0.5586846", "0.55703473", "0.55619335", "0.5545303", "0.552...
0.68463504
1
Find angles that make up each triangle in the triangulation. By convention, column i defines the angle corresponding to cell centroid i
def tri_angles(x, tri): three = np.array([0,1,2]) i_b = np.mod(three + 1, 3) i_c = np.mod(three + 2, 3) C = np.empty((tri.shape[0],3,2)) for i, TRI in enumerate(tri): C[i] = x[TRI] a2 = (C[:, i_b, 0] - C[:, i_c, 0]) ** 2 + (C[:, i_b, 1] - C[:, i_c, 1]) ** 2 b2 = (C[:, :, 0] - C[:, i...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def TRI2centroidBL(TRI):\n # For each row of TRI, find rows that share a bond (up to 3 of these)\n dic = {}\n # nbrs = np.zeros((len(BL),3), dtype=np.int)\n BL = np.zeros((len(TRI) * 3, 2), dtype=np.int)\n dmyi = 0\n # make sure each row has indices increasing in each row\n TRI.sort()\n\n #...
[ "0.6476698", "0.6469548", "0.6300982", "0.6293518", "0.6285069", "0.6170952", "0.6127122", "0.6114686", "0.60678166", "0.6021513", "0.60204554", "0.5953915", "0.595197", "0.5837403", "0.58372813", "0.58341426", "0.57980114", "0.5795337", "0.5779756", "0.57358366", "0.57319087...
0.68078184
0
Same as tri_angles apart from accounts for periodic triangulation (i.e. the L) Find angles that make up each triangle in the triangulation. By convention, column i defines the angle corresponding to cell centroid i
def tri_angles_periodic(x, tri, L): three = np.array([0, 1, 2]) i_b = np.mod(three + 1, 3) i_c = np.mod(three + 2, 3) C = np.empty((tri.shape[0], 3, 2)) for i, TRI in enumerate(tri): C[i] = x[TRI] a2 = (np.mod(C[:, i_b, 0] - C[:, i_c, 0] + L / 2, L) - L / 2) ** 2 + ( np.mod(...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def tri_angles(x, tri):\n three = np.array([0,1,2])\n i_b = np.mod(three + 1, 3)\n i_c = np.mod(three + 2, 3)\n\n C = np.empty((tri.shape[0],3,2))\n for i, TRI in enumerate(tri):\n C[i] = x[TRI]\n a2 = (C[:, i_b, 0] - C[:, i_c, 0]) ** 2 + (C[:, i_b, 1] - C[:, i_c, 1]) ** 2\n b2 = (C[:, ...
[ "0.71592224", "0.6636318", "0.647545", "0.64245665", "0.623803", "0.62175447", "0.61682236", "0.614947", "0.6066206", "0.6043619", "0.6037808", "0.6021538", "0.60171854", "0.6003875", "0.597167", "0.59530514", "0.5938745", "0.58972514", "0.5891377", "0.5838838", "0.58337927",...
0.7156074
1
Same as get_k2 but fills in 1 if the k2 neighbour is undefined (1) To determine whether a given neighbouring pair of triangles needs to be retriangulated, one considers the sum of the pair angles of the triangles associated with the cell centroids that are not themselves associated with the adjoining edge. I.e. these a...
def get_k2_boundary(tri, v_neighbours): three = np.array([0, 1, 2]) nv = tri.shape[0] k2s = np.empty((nv, 3), dtype=np.int32) for i in range(nv): for k in range(3): neighbour = v_neighbours[i, k] if neighbour == -1: k2s[i,k] = -1 else: ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_k2(tri, v_neighbours):\n three = np.array([0, 1, 2])\n nv = tri.shape[0]\n k2s = np.empty((nv, 3), dtype=np.int32)\n for i in range(nv):\n for k in range(3):\n neighbour = v_neighbours[i, k]\n k2 = ((v_neighbours[neighbour] == i) * three).sum()\n k2s[i, k...
[ "0.66884965", "0.58390254", "0.58208126", "0.56553763", "0.5640127", "0.55959857", "0.55700296", "0.54939514", "0.53402907", "0.5298909", "0.5285574", "0.5282951", "0.5237807", "0.52319056", "0.5217224", "0.51955146", "0.5139421", "0.51224166", "0.51217127", "0.51121926", "0....
0.67587173
0
Jitted equivalent to np.roll(x,1,axis=1)
def roll_forward(x): return np.column_stack((x[:,2],x[:,:2]))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _roll(self):\n self.order = np.roll(self.order, 1)", "def vec_rotate_left_n(x, n):\n return jnp.roll(x, -n)", "def vec_rotate_left(x):\n return jnp.roll(x, -1)", "def _roll(self):\n order = np.array(self.order)\n nsteps = np.array(self.nsteps)\n order[nsteps > 1] = np.ro...
[ "0.6925754", "0.687765", "0.68653965", "0.66864955", "0.6678825", "0.665792", "0.65917045", "0.65863836", "0.6566207", "0.6566207", "0.6566207", "0.6566207", "0.647291", "0.63986653", "0.63181865", "0.6272766", "0.61743915", "0.6153972", "0.61416364", "0.6136789", "0.607958",...
0.69506466
0
Additional "soft" pairwise repulsion at short range to prevent unrealistic and sudden changes in triangulation. Repulsion is on the imediate neighbours (i.e. derived from the triangulation) And is performed respecting periodic boudnary conditions (system size = L) Suppose l_{ij} = \| r_i r_j \ F_soft = k(l_{ij} 2a)(r_i...
def weak_repulsion(Cents,a,k, CV_matrix,n_c,L): CCW = np.dstack((roll_reverse(Cents[:,:,0]),roll_reverse(Cents[:,:,1])))#np.column_stack((Cents[:,1:3],Cents[:,0].reshape(-1,1,2))) displacement = np.mod(Cents - CCW + L/2,L) - L/2 rij = np.sqrt(displacement[:,:,0]**2 + displacement[:,:,1]**2) norm_disp = ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _perturbInPlaceSoft(self):\n kevRandom = KevRandom()\n if random.random() < 0.5:\n newThreshold = -1\n while newThreshold < 0 or newThreshold > 1:\n newThreshold = self.threshold + kevRandom.laplacian() #* 0.1\n self.threshold = newThreshold\n ...
[ "0.60844576", "0.6020489", "0.5961127", "0.5645616", "0.5532298", "0.5526144", "0.54810655", "0.54756314", "0.5441559", "0.5426344", "0.54020905", "0.5376385", "0.5368192", "0.5346513", "0.53415847", "0.5337885", "0.5335966", "0.53335965", "0.53262633", "0.53187865", "0.53015...
0.6289101
0
Same as get_l_interface but accounts for boundary cells Get the length of the interface between each pair of cells. LI[i,j] = length of interface between cell i and j = L[j,i]
def get_l_interface_boundary(n_v,n_c, neighbours, vs, CV_matrix): h_j = np.empty((n_v, 3, 2)) for i in range(3): h_j[:, i] = vs h_jp1 = np.dstack((roll_reverse(neighbours[:,:,0]),roll_reverse(neighbours[:,:,1]))) l = h_j - h_jp1 l = np.sqrt(l[:,:,0]**2 + l[:,:,1]**2) LI = np.zeros((n_c,n...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_l_interface(n_v,n_c, neighbours, vs, CV_matrix,L):\n h_j = np.empty((n_v, 3, 2))\n for i in range(3):\n h_j[:, i] = vs\n h_jp1 = np.dstack((roll_reverse(neighbours[:,:,0]),roll_reverse(neighbours[:,:,1])))\n l = np.mod(h_j - h_jp1 + L/2,L) - L/2\n l = np.sqrt(l[:,:,0]**2 + l[:,:,1]**2...
[ "0.65810156", "0.5355219", "0.5355219", "0.52692467", "0.5261853", "0.5260104", "0.5213133", "0.51838475", "0.5145465", "0.5139066", "0.51371235", "0.51371235", "0.51194596", "0.5104918", "0.5104697", "0.5075678", "0.50665754", "0.5063705", "0.50252056", "0.5015397", "0.50144...
0.654789
1
Identical to weak_repulsion apart from without periodic boundary conditions Additional "soft" pairwise repulsion at short range to prevent unrealistic and sudden changes in triangulation. Repulsion is on the imediate neighbours (i.e. derived from the triangulation) Suppose l_{ij} = \| r_i r_j \ F_soft = k(l_{ij} 2a)(r_...
def weak_repulsion_boundary(Cents,a,k, CV_matrix,n_c,n_C): CCW = np.dstack((roll_reverse(Cents[:,:,0]),roll_reverse(Cents[:,:,1])))#np.column_stack((Cents[:,1:3],Cents[:,0].reshape(-1,1,2))) CCW_displacement = Cents - CCW rij = np.sqrt(CCW_displacement[:,:,0]**2 + CCW_displacement[:,:,1]**2) norm_disp =...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def weak_repulsion(Cents,a,k, CV_matrix,n_c,L):\n CCW = np.dstack((roll_reverse(Cents[:,:,0]),roll_reverse(Cents[:,:,1])))#np.column_stack((Cents[:,1:3],Cents[:,0].reshape(-1,1,2)))\n displacement = np.mod(Cents - CCW + L/2,L) - L/2\n rij = np.sqrt(displacement[:,:,0]**2 + displacement[:,:,1]**2)\n nor...
[ "0.6859769", "0.6193783", "0.5946458", "0.5676495", "0.5617139", "0.558737", "0.5572439", "0.55645025", "0.55270976", "0.55108994", "0.5499363", "0.5497211", "0.5490259", "0.5464971", "0.5464971", "0.54455495", "0.5422088", "0.5397114", "0.53500694", "0.5325781", "0.5286822",...
0.67121816
1
Detect custom crypto from ANSIBLE_CRYPTO_BACKEND env var. pycrypto or cryptography. We choose a default but allow the user to override it. This translates into pip install of the sdist deciding what package to install and also the runtime dependencies that pkg_resources knows about.
def get_crypto_req(): crypto_backend = os.environ.get('ANSIBLE_CRYPTO_BACKEND', '').strip() if crypto_backend == PYCRYPTO_DIST: # Attempt to set version requirements return '%s >= 2.6' % PYCRYPTO_DIST return crypto_backend or None
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def patch_crypto_be_discovery():\n\n from cryptography.hazmat import backends\n\n try:\n from cryptography.hazmat.backends.commoncrypto.backend import \\\n backend as be_cc\n except ImportError:\n be_cc = None\n\n try:\n from cryptography.hazmat.backends.openssl.backend ...
[ "0.644749", "0.64027244", "0.5522722", "0.5325386", "0.52210885", "0.519888", "0.49815068", "0.4881448", "0.48801216", "0.4857803", "0.4855852", "0.48293158", "0.48136315", "0.47417903", "0.46963143", "0.46229324", "0.46024707", "0.4585857", "0.4572618", "0.45047694", "0.4499...
0.7419252
0
Replace crypto requirements if customized.
def substitute_crypto_to_req(req): crypto_backend = get_crypto_req() if crypto_backend is None: return req def is_not_crypto(r): CRYPTO_LIBS = PYCRYPTO_DIST, 'cryptography' return not any(r.lower().startswith(c) for c in CRYPTO_LIBS) return [r for r in req if is_not_crypto(r)]...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _sanity_check_implementations(self, other):\n if not cryptomath.m2cryptoLoaded:\n self._remove_all_matches(other.cipherImplementations, \"openssl\")\n if not cryptomath.pycryptoLoaded:\n self._remove_all_matches(other.cipherImplementations, \"pycrypto\")\n\n if not ot...
[ "0.5490531", "0.53497595", "0.5325541", "0.5172118", "0.51297677", "0.5129296", "0.51149637", "0.5079511", "0.49295458", "0.48424795", "0.48113155", "0.4767266", "0.47622392", "0.47332826", "0.4728116", "0.4726992", "0.47171172", "0.46877944", "0.46799886", "0.4667563", "0.46...
0.65909487
0
Add dynamically calculated setup params to static ones.
def get_dynamic_setup_params(): return { # Retrieve the long description from the README # 'long_description': read_file('README.rst'), 'install_requires': substitute_crypto_to_req( read_requirements('requirements.txt'), ), # 'extras_require': read_extras(), }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _add_setup_param(self, name, fmt, **kwargs):\n self._param_dict.add(name, '', None, fmt,\n startup_param=False,\n direct_access=True,\n visibility=ParameterDictVisibility.READ_ONLY,\n **kwargs...
[ "0.6159042", "0.6105823", "0.5991732", "0.59502846", "0.5941817", "0.56282127", "0.55960566", "0.5593343", "0.55933225", "0.5589151", "0.55844057", "0.55324405", "0.5515802", "0.5513838", "0.55064476", "0.5440318", "0.5432134", "0.542805", "0.5417833", "0.53975075", "0.538980...
0.630611
0
Ensure all packages are declared in pyproject.toml.
def test_packages(): # Currently assume s`pyproject.toml` is at the same level as `graphblas_algorithms` folder. # This probably isn't always True, and we can probably do a better job of finding it. path = pathlib.Path(ga.__file__).parent pkgs = [f"graphblas_algorithms.{x}" for x in setuptools.find_pack...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def required_packages(cls) -> List[Text]:\n return []", "def test_pyproject_dependencies(self):\n pyproject = toml.load(\"pyproject.toml\")\n\n dev_deps = list(pyproject[\"tool\"][\"poetry\"][\"dev-dependencies\"].keys())\n assert dev_deps == sorted(dev_deps)\n\n deps = list(py...
[ "0.63993734", "0.6301051", "0.6148301", "0.6107867", "0.6104479", "0.5938896", "0.58684117", "0.58242583", "0.58168364", "0.58004016", "0.5798332", "0.57676125", "0.5766934", "0.5733725", "0.57286656", "0.57208496", "0.5713115", "0.5689557", "0.568439", "0.5666377", "0.564527...
0.6732241
0
Remove samples for which attribute is n SD away from mean
def remove_outliers(data_frame, attribute, n): r = robjects.r robjects.globalenv["dat"] = data_frame new_frame = r("dat[!(abs(dat$"+attribute+" - mean(dat$"+attribute+ \ "))/sd(dat$"+attribute+")) >" +str(n)+",]") return new_frame
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def remove_outliers(tx, mean_x, std_x):\n n_tx = tx.copy()\n for sample in range(tx.shape[0]):\n for dim in range(tx.shape[1]):\n if (n_tx[sample, dim] > mean_x[dim] + 2 * std_x[dim]):\n n_tx[sample, dim] = mean_x[dim]\n if (n_tx[sample, dim] < mean_x[dim] - 2 * st...
[ "0.69946307", "0.6796269", "0.66534877", "0.66514367", "0.6549007", "0.6477092", "0.64682794", "0.6461678", "0.64493823", "0.6444574", "0.6441559", "0.6352979", "0.63528824", "0.626494", "0.62430817", "0.6240487", "0.62238246", "0.6222249", "0.6179063", "0.61417735", "0.61383...
0.71077466
0
get the best clf score
def __get_best_score(scores): best = max(scores.items(), key=operator.itemgetter(1))[0] print("The best classification for this corpus is: " + str(best)) return best
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_best_thres(self, data, label, score_func = f1_score):\n pred_prob = self.model.predict(data)\n best_score = 0\n for i_thres in range(0, 100):\n pred_label = [int(i > (i_thres / 100.0)) for i in pred_prob]\n fs = score_func(label, pred_label)\n if best_s...
[ "0.70486796", "0.68927777", "0.67940104", "0.6786574", "0.6711296", "0.6607782", "0.6583459", "0.65449554", "0.65273464", "0.6516022", "0.64992183", "0.64943755", "0.64921445", "0.64850044", "0.6463871", "0.64525265", "0.644424", "0.6422949", "0.64138275", "0.636951", "0.6363...
0.7187001
0
Connect a container to its events and entities.
def visit_container(self, container): self._connect_items(container)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _connect_items(self, container):\n for item in self.entity_json['items']:\n item_id = item['id']\n entity = self.world.entities[item_id]\n container.add(entity)", "def _connect_events(self, entity):\n for event_json in self.entity_json['events']:\n ev...
[ "0.66069466", "0.6178888", "0.6026871", "0.594974", "0.594974", "0.5849407", "0.57654595", "0.57654595", "0.5602692", "0.5578506", "0.54552", "0.54552", "0.5373777", "0.5365792", "0.53449494", "0.5326882", "0.5322347", "0.5322347", "0.5322347", "0.5322347", "0.5322347", "0....
0.6621208
0