query
stringlengths
9
3.4k
document
stringlengths
9
87.4k
metadata
dict
negatives
listlengths
4
101
negative_scores
listlengths
4
101
document_score
stringlengths
3
10
document_rank
stringclasses
102 values
Returns the generator of
def ImageFrom(self, *args): return _BRepAlgo.BRepAlgo_Image_ImageFrom(self, *args)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def generator(self):\n return [None, 1]", "def __iter__(self):\n return self.new_generator()", "def __iter__(self):\n yield from self.gen", "def generator(self):\n return self._generator", "def next(self):\n return next(self.gen)", "def __next__(self):\n\t\treturn next(...
[ "0.79404163", "0.7918392", "0.7738084", "0.76406306", "0.74970204", "0.7315077", "0.7311586", "0.7281729", "0.7196769", "0.7107632", "0.7102853", "0.7102853", "0.7102853", "0.7066889", "0.70628047", "0.7060039", "0.705205", "0.7013537", "0.6943162", "0.6943162", "0.6941401", ...
0.0
-1
Returns the upper generator of
def Root(self, *args): return _BRepAlgo.BRepAlgo_Image_Root(self, *args)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def generator(self):\n return [None, 1]", "def upper(self):\n return asarray(upper(self))", "def __reversed__(self): \n yield from self._traverse_backward(self.root)", "def test_generator_upward(narrow_power_range):\n with patch('random.randint', side_effect=lambda a,b: 1):\n ...
[ "0.60364664", "0.5688385", "0.56213117", "0.5604861", "0.55862796", "0.5522919", "0.5509888", "0.5479019", "0.5426594", "0.5424152", "0.54210746", "0.5410417", "0.54048795", "0.5371009", "0.5363992", "0.5357496", "0.5340855", "0.53278434", "0.53191775", "0.5314349", "0.530818...
0.0
-1
Returns the Image of . Returns in the list if HasImage(S) is false.
def Image(self, *args): return _BRepAlgo.BRepAlgo_Image_Image(self, *args)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def image(images):\n return images[0]", "def image_list(self):\n return self._image_list", "def imageList(self):\n return self.__imageList", "def get_image():\n return models.Image.objects.all()[0]", "def image(self, name=None):\n return self.find(self.images(), name=name)", ...
[ "0.65314615", "0.6324996", "0.6283613", "0.62743634", "0.62229705", "0.6198889", "0.6184821", "0.61594623", "0.61504596", "0.6045783", "0.60433507", "0.60303265", "0.60279834", "0.6024575", "0.5979277", "0.59509367", "0.5948533", "0.59441626", "0.59319085", "0.5929545", "0.59...
0.0
-1
Stores in the images of images of...images of . contains only if HasImage(S) is false.
def LastImage(self, *args): return _BRepAlgo.BRepAlgo_Image_LastImage(self, *args)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def images_exist(self):\n pass", "def is_new_based_on_imgs(soup):\n\n \n \n prev_hashes = get_prev_img_hashes()\n temp_hashes = get_temp_img_hashes(soup)\n\n if len(temp_hashes.difference(prev_hashes))>0:\n print(\"new, based on images\")\n return True\n else:\n retu...
[ "0.64222836", "0.60871553", "0.5958527", "0.5944521", "0.57835066", "0.5639918", "0.5607725", "0.56000996", "0.55904555", "0.5569224", "0.5565882", "0.55637634", "0.55468184", "0.5535983", "0.55163836", "0.550949", "0.5457397", "0.5457057", "0.54569876", "0.54168576", "0.5387...
0.0
-1
Keeps only the link between roots and lastimage.
def Compact(self, *args): return _BRepAlgo.BRepAlgo_Image_Compact(self, *args)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def rememberRootURL():", "def _links(self):\n if not self.is_root:\n return None\n if self._link_storage is None:\n self.arbor._build_attr(\"_link_storage\", self)\n return self._link_storage", "def image_reference(self, image_id):\n info = self.image_info[imag...
[ "0.5610798", "0.54741144", "0.5473307", "0.54716057", "0.5461998", "0.5272428", "0.52661407", "0.5263526", "0.5223144", "0.51833904", "0.5129498", "0.51124483", "0.51074564", "0.5052281", "0.5049906", "0.5035831", "0.50332713", "0.50332713", "0.5017148", "0.49999708", "0.4963...
0.0
-1
Init with the set of edges must have pcurves on .
def Init(self, *args): return _BRepAlgo.BRepAlgo_Loop_Init(self, *args)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __init__(self):\n self.delCurves = []\n return", "def draw_edges():\n\n def bezier(p0, p1, p2, **kwargs):\n x0, y0 = p0\n x1, y1 = p1\n x2, y2 = p2\n xb = [\n (1 - t) ** 2 * x0 + 2 * t * (1 - t) * x1 + t *...
[ "0.61682373", "0.6118325", "0.60639524", "0.59735173", "0.59690154", "0.5952848", "0.5878638", "0.5873813", "0.5852583", "0.58372134", "0.57928324", "0.5787087", "0.577534", "0.5755702", "0.57443535", "0.57016903", "0.5666402", "0.5664702", "0.56506795", "0.56304246", "0.5628...
0.0
-1
Add E with . will be copied and trim by vertices in .
def AddEdge(self, *args): return _BRepAlgo.BRepAlgo_Loop_AddEdge(self, *args)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def add_edge(self, e):\n v, w = e\n self[v][w] = e\n self[w][v] = e", "def CopyReplaceVertices(self, *args):\n return _ShapeBuild.ShapeBuild_Edge_CopyReplaceVertices(self, *args)", "def edgeSplit(self, e, newCoords=None):\n assert (e.pFace is None or e.pFace.containsEdge(e)) ...
[ "0.6130455", "0.58633107", "0.5817108", "0.58140856", "0.55439997", "0.5529", "0.54320157", "0.54156584", "0.5411694", "0.53584874", "0.5344284", "0.5317272", "0.51816463", "0.51699406", "0.51607704", "0.51530313", "0.51142377", "0.5096206", "0.509287", "0.5092844", "0.508864...
0.0
-1
Add as const edge, E can be in the result.
def AddConstEdge(self, *args): return _BRepAlgo.BRepAlgo_Loop_AddConstEdge(self, *args)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def addEdge(self, e):\n v = e.either()\n w = e.other(v)\n self._validateVertex(v)\n self._validateVertex(w)\n self._adj[v].add(e)\n self._adj[w].add(e)\n self._E += 1", "def add_edge(self, e):\n a, b = e\n self[a][b] = e\n self[b][a] = e", "def add_edge(self, e):\n ...
[ "0.7211913", "0.6675955", "0.667085", "0.6334199", "0.62683904", "0.6137948", "0.6120605", "0.6069564", "0.60568464", "0.6040104", "0.60051143", "0.5988388", "0.59750146", "0.5960292", "0.5952103", "0.5939984", "0.5931788", "0.5870777", "0.58619887", "0.5810366", "0.579694", ...
0.6939654
1
Add as a set of const edges.
def AddConstEdges(self, *args): return _BRepAlgo.BRepAlgo_Loop_AddConstEdges(self, *args)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def AddConstEdge(self, *args):\n return _BRepAlgo.BRepAlgo_Loop_AddConstEdge(self, *args)", "def addEdges(self, edges):\n for edge in edges:\n self.addEdge(edge[0], edge[1], edge[2])", "def add_all_edges(self):\n for n1 in self.vertices():\n for n2 in self.vertices():\n ...
[ "0.7046306", "0.64266396", "0.63983893", "0.6357126", "0.6321411", "0.62738585", "0.6187922", "0.60680056", "0.59887", "0.5985752", "0.597097", "0.5963551", "0.596135", "0.59137535", "0.58819777", "0.5788639", "0.5775192", "0.5719451", "0.56963676", "0.5694593", "0.56856745",...
0.7485751
0
Cut the edge in several edges on the vertices.
def CutEdge(self, *args): return _BRepAlgo.BRepAlgo_Loop_CutEdge(self, *args)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def cut_edge_based_on_other_edge(bm, edge, other_edge, cut_direction):\n new_edges = []\n new_verts = []\n target_faces = []\n for v in edge.verts:\n split_point = v.co + cut_direction\n e, new_vert = split_edge_at_point_from_closest_vert(other_edge, v, split_point)\n e = bmesh.ops...
[ "0.62837875", "0.6094797", "0.6000174", "0.59297794", "0.59142405", "0.5832908", "0.5784323", "0.5767214", "0.57564753", "0.57304054", "0.57289046", "0.5636046", "0.5623915", "0.5606259", "0.55841815", "0.55755126", "0.55632216", "0.5559399", "0.5559359", "0.55513865", "0.551...
0.7193409
0
Returns the list of wires performed. can be an empty list.
def NewWires(self, *args): return _BRepAlgo.BRepAlgo_Loop_NewWires(self, *args)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def wires(self):\n return [o.wires for o in self.obs]", "def wires(self) -> Iterator[TopoDS_Wire]:\n return map(Wire, self._top_exp.wires())", "def get_all_wifi(self):\n return list(self.collection.find({\"sensor_type\": \"wifi\"}, {\"_id\": False})) # Return a list", "def wires(self):\...
[ "0.7884733", "0.70887345", "0.7003496", "0.68727016", "0.68129", "0.68129", "0.65752876", "0.6518975", "0.6518975", "0.6518975", "0.642296", "0.64077765", "0.6341834", "0.63046914", "0.6294988", "0.625506", "0.6237706", "0.62376195", "0.61910653", "0.6157411", "0.6106702", ...
0.5504076
74
Build faces from the wires result.
def WiresToFaces(self, *args): return _BRepAlgo.BRepAlgo_Loop_WiresToFaces(self, *args)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_faces(self):\n for i, j in combinations(self.gens, 2):\n c0 = self.triangle_verts[self.vertex_at_mirrors(i, j)]\n f0 = []\n m = self.cox_mat[i][j]\n H = (i, j)\n type = 0\n if self.active[i] and self.active[j]:\n type =...
[ "0.6333746", "0.6220341", "0.584095", "0.58127135", "0.58002806", "0.5661341", "0.5653663", "0.5646849", "0.5539003", "0.54848516", "0.5479848", "0.5455054", "0.54154086", "0.5395386", "0.5383307", "0.53753495", "0.5358957", "0.53468597", "0.531035", "0.5270992", "0.5233197",...
0.5459415
11
Returns the list of new edges built from an edge it can be an empty list.
def NewEdges(self, *args): return _BRepAlgo.BRepAlgo_Loop_NewEdges(self, *args)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_edge_list(self):\n return [(edge.value, edge.node_from.value, edge.node_to.value) for edge in self.edges]", "def get_edges(self):\n try:\n temp = self.edges\n except:\n temp = []\n return temp", "def _create_edge_ist(self) -> EdgeList:\r\n return...
[ "0.7429224", "0.72771645", "0.7195488", "0.71634096", "0.7082809", "0.7026056", "0.7021033", "0.700611", "0.6959626", "0.6926502", "0.6926502", "0.6926502", "0.69073725", "0.68655765", "0.6854366", "0.68357295", "0.676993", "0.6733669", "0.6700197", "0.66938275", "0.66740346"...
0.63346565
56
Returns the datamap of vertices with their substitutes.
def GetVerticesForSubstitute(self, *args): return _BRepAlgo.BRepAlgo_Loop_GetVerticesForSubstitute(self, *args)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def vert_ind_as_val(input_vertices):\n\tvertex_map = {}\n\tfor element in input_vertices:\n\t\tvertex_map[element] = element\n\treturn vertex_map", "def get_vertices(self):\n return str(self.vert_dict.keys())", "def obtener_vertices(self):\n return list(self.vertices.keys())", "def get_vertices...
[ "0.58614796", "0.5618814", "0.5495101", "0.53759533", "0.5374195", "0.53642493", "0.531116", "0.52988595", "0.52684796", "0.5238554", "0.5228671", "0.52214265", "0.52214265", "0.52214265", "0.52155685", "0.52054477", "0.5196186", "0.5187754", "0.517995", "0.5175423", "0.51742...
0.53150946
6
Add an edge or a wire to the list of shape to project
def Add(self, *args): return _BRepAlgo.BRepAlgo_NormalProjection_Add(self, *args)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def add_edge(self, e):\n v, w = e\n self[v][w] = e\n self[w][v] = e", "def addEdge(self,u,v,w):\r\n self.graph.append([u,v,w])", "def add_shape(self, shape):\n\n if isinstance(shape, Shape):\n self.shapes.append(shape)\n else:\n raise TypeError", ...
[ "0.59437746", "0.5856103", "0.57332313", "0.57171166", "0.5682549", "0.56806207", "0.5659431", "0.56438947", "0.5620642", "0.56052876", "0.5600976", "0.5597647", "0.55774224", "0.5562483", "0.55554557", "0.5527331", "0.5526795", "0.54983586", "0.5486293", "0.54818237", "0.544...
0.0
-1
Set the parameters used for computation Tol3d is the requiered tolerance between the 3d projected curve and its 2d representation InternalContinuity is the order of constraints used for approximation. MaxDeg and MaxSeg are the maximum degree and the maximum number of segment for BSpline resulting of an approximation.
def SetParams(self, *args): return _BRepAlgo.BRepAlgo_NormalProjection_SetParams(self, *args)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def Tol3d(self, *args):\n return _Adaptor3d.Adaptor3d_TopolTool_Tol3d(self, *args)", "def get_params3D(ima, xform = \"xform.align3d\"):\n\tt = ima.get_attr(xform)\n\td = t.get_params(\"spider\")\n\treturn d[\"phi\"],d[\"theta\"],d[\"psi\"],d[\"tx\"],d[\"ty\"],d[\"tz\"],d[\"mirror\"],d[\"scale\"]", "def...
[ "0.6417356", "0.5619551", "0.5473504", "0.5384897", "0.53774697", "0.53138775", "0.5278674", "0.52696157", "0.5244743", "0.5212177", "0.52039826", "0.5202426", "0.51852477", "0.5131529", "0.5122184", "0.5051622", "0.50500596", "0.5048082", "0.5037627", "0.5023085", "0.5011095...
0.0
-1
Set the parameters used for computation in their default values
def SetDefaultParams(self, *args): return _BRepAlgo.BRepAlgo_NormalProjection_SetDefaultParams(self, *args)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_default_parameters(self):\n super().set_default_parameters()", "def _default_parameters(cls) -> Options:\n params = super()._default_parameters()\n params.main_axes = None\n params.i_means = None\n params.q_means = None\n params.scales = None\n\n return pa...
[ "0.7848651", "0.731754", "0.7247119", "0.7064335", "0.70568067", "0.7053067", "0.7039655", "0.70384187", "0.70343184", "0.70059544", "0.6982248", "0.69581896", "0.692335", "0.69154316", "0.69147325", "0.6892796", "0.6870813", "0.68666285", "0.6856961", "0.68546677", "0.684576...
0.6385395
95
Sets the maximum distance between target shape and shape to project. If this condition is not satisfied then corresponding part of solution is discarded. if MaxDist < 0 then this method does not affect the algorithm
def SetMaxDistance(self, *args): return _BRepAlgo.BRepAlgo_NormalProjection_SetMaxDistance(self, *args)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def SetMaxTolerance(self, *args):\n return _ShapeUpgrade.ShapeUpgrade_ShapeDivide_SetMaxTolerance(self, *args)", "def SetMaxTolerance(self, *args):\n return _ShapeUpgrade.ShapeUpgrade_Tool_SetMaxTolerance(self, *args)", "def target_mode(self):\r\n if not self.in_target_mode:\r\n ...
[ "0.5773515", "0.55397105", "0.537085", "0.53070605", "0.5186212", "0.5132834", "0.51288295", "0.5102438", "0.50803", "0.503841", "0.49928033", "0.4985218", "0.4962091", "0.49406153", "0.49362886", "0.4915126", "0.4903148", "0.4903148", "0.48885536", "0.4883879", "0.48513916",...
0.63957596
0
if With3d = Standard_False the 3dcurve is not computed the initial 3dcurve is kept to build the resulting edges.
def Compute3d(self, *args): return _BRepAlgo.BRepAlgo_NormalProjection_Compute3d(self, *args)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def D3(self, *args):\n return _Adaptor3d.Adaptor3d_Curve_D3(self, *args)", "def RemoveCurve3d(self, *args):\n return _ShapeBuild.ShapeBuild_Edge_RemoveCurve3d(self, *args)", "def D3(*args):\n return _Geom2dLProp.Geom2dLProp_Curve2dTool_D3(*args)", "def Has3d(self, *args):\n return...
[ "0.69803053", "0.69790787", "0.6296154", "0.6218713", "0.62031525", "0.61601573", "0.6110127", "0.61080956", "0.60679334", "0.5979571", "0.5960561", "0.5953705", "0.591507", "0.58673805", "0.5858085", "0.58526415", "0.5824958", "0.5807383", "0.5793229", "0.57730055", "0.57436...
0.5199893
50
Manage limitation of projected edges.
def SetLimit(self, *args): return _BRepAlgo.BRepAlgo_NormalProjection_SetLimit(self, *args)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_limits(self):\n S = self.structure\n self.limit_edges = []\n for u in S:\n # direct successors are fully known\n for v in (suc for suc in S.successors(u) if suc):\n S[u][v][\"upper_limit\"] = S[u][v][DIST]\n S[u][v][\"lower_limit\"] =...
[ "0.5725529", "0.5669141", "0.5660197", "0.5653452", "0.54620993", "0.5417658", "0.5376966", "0.5368331", "0.5293482", "0.5276614", "0.5274168", "0.52734935", "0.5241691", "0.52151877", "0.5212338", "0.5209439", "0.51887906", "0.51676625", "0.51416695", "0.5139888", "0.5139888...
0.5382936
6
Builds the result as a compound.
def Build(self, *args): return _BRepAlgo.BRepAlgo_NormalProjection_Build(self, *args)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def build(c):", "def compound(self):\n return self._compound", "def build(_):", "def build():", "def compose(self):\r\n return_lib = self.other\r\n return_lib.update({\r\n 'ID' : self.id,\r\n 'Name' : self.name,\r\n 'Alias' : self.alias,\r\n ...
[ "0.59723455", "0.5771552", "0.56610304", "0.5645296", "0.5584837", "0.55202204", "0.5478838", "0.5463801", "0.5402597", "0.536524", "0.52879417", "0.52709746", "0.52184033", "0.5178762", "0.51352626", "0.5100086", "0.5092237", "0.5087989", "0.5081667", "0.5074326", "0.5060444...
0.0
-1
For a resulting edge, returns the corresponding initial edge.
def Ancestor(self, *args): return _BRepAlgo.BRepAlgo_NormalProjection_Ancestor(self, *args)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_graph_first_edge(g):\n return g[\"edgeSet\"][0] if 'edgeSet' in g and g[\"edgeSet\"] else {}", "def reverse(edge):\n return Edge(orig=edge.dest, dest=edge.orig, orig_id=edge.dest_id, dest_id=edge.orig_id)", "def get_edge(self, edge):\n if len(edge) != 2:\n raise TypeError\n ...
[ "0.58714134", "0.57738036", "0.5592109", "0.5563187", "0.5553413", "0.5516781", "0.5451425", "0.5447719", "0.5327945", "0.5284508", "0.52071446", "0.5197241", "0.51811385", "0.5129491", "0.5120517", "0.50300336", "0.5022962", "0.4997377", "0.49945867", "0.49932507", "0.497378...
0.0
-1
For a projected edge, returns the corresponding initial face.
def Couple(self, *args): return _BRepAlgo.BRepAlgo_NormalProjection_Couple(self, *args)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def faces_from_edge(self, edge):\n assert isinstance(edge, Edge)\n return map(Face, self._top_exp.faces_from_edge(edge.topods_shape()))", "def face(self):\n\n return self.faceup", "def get_face(self, image):\n face = self.__detect_face(image)[0]\n x1, y1, x2, y2, _, _ = face....
[ "0.6326266", "0.6022131", "0.59142417", "0.5786397", "0.56976974", "0.56215537", "0.56146854", "0.56094706", "0.5577278", "0.5577278", "0.55683047", "0.5539707", "0.55011696", "0.54858553", "0.5437727", "0.5425079", "0.5405903", "0.5399007", "0.5397073", "0.5339341", "0.53367...
0.0
-1
Returns the list of shapes generated from the shape .
def Generated(self, *args): return _BRepAlgo.BRepAlgo_NormalProjection_Generated(self, *args)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def shapes(self):\n return [load_node(item) for item in self.get_attribute('shapes')]", "def shapes(self):\n return self.container['shapes']", "def getshapes(self):\n return sorted(self._shapes.keys())", "def type_shapes(self):\n return self._type_shapes", "def shape(self):", "def...
[ "0.78419596", "0.75871074", "0.7399741", "0.7292827", "0.71652555", "0.71652555", "0.70627165", "0.7032713", "0.6962173", "0.6954566", "0.6947017", "0.69395155", "0.69376546", "0.69070655", "0.6901026", "0.68835175", "0.68499553", "0.68491197", "0.6842416", "0.68217", "0.6818...
0.0
-1
build the result as a list of wire if possible in a first returns a wire only if there is only a wire.
def BuildWire(self, *args): return _BRepAlgo.BRepAlgo_NormalProjection_BuildWire(self, *args)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_merged_all_node(lst: List[IntermediateStation]) -> Optional[IntermediateStation]:\n return next(filter(attrgetter(\"merged_all\"), lst), None)", "def build_wires(self) -> List[Segment]:\n segments = [Segment(self.ORIGIN, self.ORIGIN.move_to(self._diagram[0]))]\n for step in self._diagram...
[ "0.53298795", "0.53151935", "0.51846665", "0.50938267", "0.49160537", "0.48856074", "0.48807946", "0.48639023", "0.48458937", "0.48451367", "0.4844374", "0.4827442", "0.48249894", "0.48172957", "0.4809209", "0.48054534", "0.47912017", "0.47908917", "0.47884992", "0.47829214", ...
0.46463734
34
Remove the non valid part of an offsetshape 1 Remove all the free boundary and the faces connex to such edges. 2 Remove all the shapes not valid in the result (according to the side of offseting) in this verion only the first point is implemented.
def Deboucle3D(*args): return _BRepAlgo.BRepAlgo_Tool_Deboucle3D(*args)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def remove_dangling_points(xy, NL, KL, BL, check=False):\n dangles = np.where(~KL.any(axis=1))[0]\n if len(dangles) > 0:\n print 'le: remove_dangling_points: Removing dangling points: dangles = ', dangles\n if check:\n plt.plot(xy[:, 0], xy[:, 1], 'b.')\n for ii in range(l...
[ "0.58785754", "0.5857711", "0.57484597", "0.5721556", "0.5695583", "0.5563021", "0.5516007", "0.5485433", "0.54782903", "0.5448066", "0.5389216", "0.5384667", "0.53840625", "0.5364062", "0.53361607", "0.531742", "0.53164166", "0.5309057", "0.5307305", "0.52896863", "0.5269481...
0.0
-1
Remove the non valid part of an offsetshape 1 Remove all the free boundary and the faces connex to such edges. 2 Remove all the shapes not valid in the result (according to the side of offseting) in this verion only the first point is implemented.
def BRepAlgo_Tool_Deboucle3D(*args): return _BRepAlgo.BRepAlgo_Tool_Deboucle3D(*args)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def remove_dangling_points(xy, NL, KL, BL, check=False):\n dangles = np.where(~KL.any(axis=1))[0]\n if len(dangles) > 0:\n print 'le: remove_dangling_points: Removing dangling points: dangles = ', dangles\n if check:\n plt.plot(xy[:, 0], xy[:, 1], 'b.')\n for ii in range(l...
[ "0.58785754", "0.5857711", "0.57484597", "0.5721556", "0.5695583", "0.5563021", "0.5516007", "0.5485433", "0.54782903", "0.5448066", "0.5389216", "0.5384667", "0.53840625", "0.5364062", "0.53361607", "0.531742", "0.53164166", "0.5309057", "0.5307305", "0.52896863", "0.5269481...
0.0
-1
Constructs the common part of shapes S1 and S2.
def __init__(self, *args): _BRepAlgo.BRepAlgo_Common_swiginit(self,_BRepAlgo.new_BRepAlgo_Common(*args))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def blendshape(shape0:str, shape1:str, mix, points) -> core.BpfInterface:\n X, Y, kws = util.parseargs(*points)\n a = makebpf(shape0, X, Y)\n b = makebpf(shape1, X, Y)\n return core.blend(a, b, mix)", "def convolved_shape(shape1, shape2, mode, axis):\n\n m, n = shape1[axis], shape2[axis]\n p, q...
[ "0.58307207", "0.57843333", "0.5770231", "0.5759107", "0.5725605", "0.5708924", "0.5704088", "0.5677647", "0.5672065", "0.56407833", "0.5633823", "0.5530289", "0.55280584", "0.5514282", "0.55104434", "0.550918", "0.54873985", "0.54839", "0.5462472", "0.5439261", "0.54316914",...
0.0
-1
Cuts the shape S2 from the shape S1.
def __init__(self, *args): _BRepAlgo.BRepAlgo_Cut_swiginit(self,_BRepAlgo.new_BRepAlgo_Cut(*args))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def cut_both(self):\n return TCut(self._return_if('_cut_both'))", "def to_other(self, c2, cut=False):\n\n p = self.c.p\n\n p_v = p.v # p may be invalid by the time we want to use it\n\n c2, nd = self.unl_to_pos(c2, p)\n\n if c2 is None:\n return\n\n # in case...
[ "0.5555149", "0.54492426", "0.53406155", "0.5334083", "0.53154165", "0.53094304", "0.5263163", "0.52425534", "0.5156484", "0.5151237", "0.50962096", "0.50957835", "0.5075516", "0.5050481", "0.5041012", "0.504091", "0.50189376", "0.49802697", "0.4973997", "0.49733466", "0.4969...
0.0
-1
Fuse S1 and S2.
def __init__(self, *args): _BRepAlgo.BRepAlgo_Fuse_swiginit(self,_BRepAlgo.new_BRepAlgo_Fuse(*args))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _fuse(track1, track2):\n if track1.fused or track2.fused:\n return False\n matched_box_num = 0\n if track1.end_fid - P['th_track_fuse_len'] + 1 < track2.start_fid or len(track1) < P['th_track_fuse_len']\\\n or track1.start_fid > track2.start_fi...
[ "0.59770054", "0.58343977", "0.57405406", "0.5701181", "0.56660146", "0.5445767", "0.5419253", "0.5412659", "0.5324222", "0.5311835", "0.5299016", "0.5295709", "0.5295709", "0.5295709", "0.52313334", "0.5201415", "0.5173906", "0.5159949", "0.51541173", "0.5140248", "0.5135577...
0.4677158
81
Initializes the first part
def Init1(self, *args): return _BRepAlgo.BRepAlgo_Section_Init1(self, *args)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def initialize(self):\n\t\tpass", "def initialise(self):", "def initialize(self):\r\n pass", "def initialize(self):\r\n pass", "def initialize(self):\n pass", "def initialize(self):\n pass", "def initialize(self):\n pass", "def initialize(self):\n pass", "d...
[ "0.66732645", "0.66727394", "0.662304", "0.662304", "0.65748346", "0.65748346", "0.65748346", "0.65748346", "0.65748346", "0.65494424", "0.65494424", "0.65494424", "0.65494424", "0.6547686", "0.6547686", "0.6547686", "0.6547686", "0.6547686", "0.6547686", "0.6547686", "0.6547...
0.6182043
42
Indicates if the Pcurve must be (or not) performed on first part.
def ComputePCurveOn1(self, *args): return _BRepAlgo.BRepAlgo_Section_ComputePCurveOn1(self, *args)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def isSetCurve(self):\n return _libsbml.ReactionGlyph_isSetCurve(self)", "def isSetCurve(self):\n return _libsbml.GeneralGlyph_isSetCurve(self)", "def isSetCurve(self):\n return _libsbml.ReferenceGlyph_isSetCurve(self)", "def isSetCurve(self):\n return _libsbml.SpeciesReferenceGly...
[ "0.66216546", "0.6554725", "0.64873916", "0.63525736", "0.6299431", "0.6262032", "0.61106616", "0.6055835", "0.6034955", "0.60219824", "0.5987621", "0.59857976", "0.59857976", "0.59446955", "0.5892998", "0.5862073", "0.5846161", "0.5800989", "0.5759518", "0.57186365", "0.5702...
0.0
-1
Define options for the computation of further intersections which will be performed by the function Build in this framework. By default, no parametric 2D curve (pcurve) is defined for the elementary edges of the result. If ComputePCurve1 equals true, further computations performed in this framework with the function Bu...
def ComputePCurveOn2(self, *args): return _BRepAlgo.BRepAlgo_Section_ComputePCurveOn2(self, *args)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def ComputePCurveOn1(self, *args):\n return _BRepAlgo.BRepAlgo_Section_ComputePCurveOn1(self, *args)", "def PricingAddCurves(builder, curves):\n return AddCurves(builder, curves)", "def TransformPCurve(self, *args):\n return _ShapeBuild.ShapeBuild_Edge_TransformPCurve(self, *args)", "def cur...
[ "0.63747", "0.6279916", "0.5839161", "0.5615367", "0.5537828", "0.5535059", "0.54384214", "0.53751516", "0.53667706", "0.5359382", "0.52979684", "0.52934253", "0.5215703", "0.5175247", "0.5162741", "0.5156271", "0.51324844", "0.51028144", "0.5075227", "0.5058656", "0.50237304...
0.6815839
0
Upload a file to an S3 bucket
def upload_file(file_name, object_name=None, bucket = BUCKET_NAME): # Upload the file s3_client = boto3.client('s3') try: response = s3_client.upload_file(file_name, bucket, object_name) if type(file_name) == str else s3_client.upload_fileobj(file_name, BUCKET_NAME, object_name) except ClientEr...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _upload_s3(self, filename, bucket, objectKey):\n return s3_client.upload_file(filename, bucket, objectKey)", "def upload(filename, bucket):\n print(\"Uploading {} to S3\".format(filename.lower().replace('_', '-')))\n url = \"https://s3.ca-central-1.amazonaws.com/{}/{}\".format(bucket,\n ...
[ "0.87235487", "0.86594856", "0.8603333", "0.851218", "0.85043377", "0.84550345", "0.83306247", "0.83018315", "0.8250505", "0.8155704", "0.80791247", "0.8058864", "0.8027351", "0.8024221", "0.8009732", "0.7968962", "0.7964086", "0.7959839", "0.7955395", "0.7954518", "0.7954518...
0.7805529
31
Make the variable for the problem. Use the function self.new_cnf_code(step, name, object) to make whatever codes for CNF variables you need to make your control knowledge for the Logistics problem. You can make variables which mean anything if you can think of constraints to make that enforce that meaning. As an exampl...
def make_control_knowledge_variables(self, horizon): # You might want to save your variables here, or feel free to make as # many data structures as you need to keep track of them. self.control_fluent_codes = {} """ *** YOUR CODE HERE *** """ # DID NOT DEFINE ANY EXTRA VARIABL...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __init__(self):\n self.name = ''\n self.variables = []\n self.assumptions = []\n self.guarantees = []", "def variabilize(self):\n if self.nvars>=0:\n pass #already done\n else:\n varTab = syt.SymbolTable()\n def convertArgs(args):\n ...
[ "0.56510055", "0.5419212", "0.5407943", "0.52857524", "0.52654815", "0.52528906", "0.52507615", "0.5224148", "0.51912344", "0.5181718", "0.51804876", "0.51642627", "0.51620805", "0.513914", "0.5131809", "0.5116504", "0.5077894", "0.50545853", "0.5040229", "0.5036804", "0.5015...
0.62422013
0
This is where you should make your control knowledge clauses. These clauses should have the type "control". (LogisticsEncoding, int) > None
def make_control_knowledge(self, horizon): """ *** YOUR CODE HERE *** """ # ADD_RULE1_COUNT = 0 # ADD_RULE2_COUNT = 0 # ADD_RULE3_COUNT = 0 close = list() far = list() for g in self.problem.goal: for p in self.problem.propositions: ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def control_law( self, inputs ):", "def make_control_knowledge_variables(self, horizon):\n # You might want to save your variables here, or feel free to make as\n # many data structures as you need to keep track of them.\n\n self.control_fluent_codes = {}\n\n \"\"\" *** YOUR CODE HERE...
[ "0.54791707", "0.54511684", "0.52639127", "0.52639127", "0.52639127", "0.52639127", "0.5187364", "0.51687676", "0.5099215", "0.5013715", "0.49946854", "0.49658695", "0.49444517", "0.49444517", "0.49444517", "0.49444517", "0.49334157", "0.4919567", "0.48492172", "0.481751", "0...
0.50455076
9
Make an encoding of self.problem for the given horizon. For this encoding, we have broken this method up into a number of submethods that you need to implement. (LogisticsEncoding, int, str, str) > None
def encode(self, horizon, exec_semantics, plangraph_constraints): super().encode(horizon, exec_semantics, plangraph_constraints) self.make_control_knowledge_variables(horizon) self.make_control_knowledge(horizon)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def encoder(ne, nj):\n #contrainte sup les equipes ne peuvent pas s'affronter elles-meme\n contrainte = ''\n for e in range(ne):\n for j in range(nj):\n contrainte += str(-codage(ne,nj,j,e,e))+' 0\\n'\n return contrainte+encoderC1(ne, nj) +'\\n'+ encoderC2(ne, nj)+'\\n'+ \\\n ...
[ "0.49800134", "0.49576762", "0.49297398", "0.48456433", "0.48439774", "0.47990614", "0.4773234", "0.4755465", "0.46668708", "0.46619892", "0.4660449", "0.463804", "0.46357062", "0.46022564", "0.45864835", "0.45528847", "0.4546904", "0.45393407", "0.45337522", "0.4525348", "0....
0.5831212
0
Get the configuration entries for each participant.
def get_participants(n_stk, n_man): stakeholders_hds = [bip32.BIP32.from_seed(os.urandom(32)) for _ in range(n_stk)] cosigners_hds = [bip32.BIP32.from_seed(os.urandom(32)) for _ in range(n_stk)] stakeholders = [ { "xpub": stakeholders_hds[i].g...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_config(self):\n\n return {section: self.sections[section].get_values() for section in self.sections}", "def gather_configs(self):\n configs = []\n for what in self.order:\n for key in self.plugins[what]:\n mgr = self.plugins[what][key]\n c = m...
[ "0.66029215", "0.64097726", "0.62155825", "0.60910946", "0.60910946", "0.60891306", "0.60192245", "0.598684", "0.5980571", "0.5927394", "0.592347", "0.59059834", "0.5882767", "0.5864407", "0.58543426", "0.5848187", "0.58464956", "0.58260256", "0.58018756", "0.5791864", "0.574...
0.0
-1
Read a JSON object
def _readobj(self, sock): buff = b"" while True: n_to_read = max(2048, len(buff)) chunk = sock.recv(n_to_read) buff += chunk if len(chunk) != n_to_read: print("Got: {}", buff) return json.loads(buff)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def read_json(self, *args, **kwargs):\n with self.open('rb') as f:\n return json.load(f, *args, **kwargs)", "def read_json(self, key):\n return json.loads(self.get_object(key))", "def read_json(self):\n self._fopen.seek(self._json_start, 0)\n return json.loads(self._fopen...
[ "0.77058166", "0.7668772", "0.76047844", "0.74460083", "0.73519", "0.7323888", "0.73185146", "0.7238177", "0.7204975", "0.7164135", "0.71494013", "0.71494013", "0.71410316", "0.7094965", "0.7094596", "0.702092", "0.702092", "0.6998307", "0.69916403", "0.6924644", "0.6902423",...
0.0
-1
Intercept any call that is not explicitly defined and call . We might still want to define the actual methods in the subclasses for documentation purposes.
def __getattr__(self, name): name = name.replace('_', '-') def wrapper(*args, **kwargs): if len(args) != 0 and len(kwargs) != 0: raise RpcError(name, {}, "Cannot mix positional and non-positional arguments") elif len(args) != 0: return self.call(n...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __subclasshook__(self, *args, **kwargs): # real signature unknown\n pass", "def __subclasshook__(self, *args, **kwargs): # real signature unknown\n pass", "def __subclasshook__(self, *args, **kwargs): # real signature unknown\n pass", "def __subclasshook__(self, *args, **kwargs): # r...
[ "0.679027", "0.679027", "0.679027", "0.679027", "0.679027", "0.679027", "0.679027", "0.679027", "0.679027", "0.679027", "0.679027", "0.679027", "0.679027", "0.679027", "0.679027", "0.679027", "0.679027", "0.679027", "0.679027", "0.679027", "0.679027", "0.679027", "0.67902...
0.0
-1
Start the underlying process and start monitoring it.
def start(self, stdin=None, stdout=None, stderr=None): logging.debug("Starting '%s'", " ".join(self.cmd_line)) self.proc = subprocess.Popen(self.cmd_line, stdin=stdin, stdout=stdout if stdout e...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _StartMonitoringProcess(self, process):\n if process is None:\n raise ValueError('Missing process.')\n\n pid = process.pid\n\n if pid in self._process_information_per_pid:\n raise KeyError(\n 'Already monitoring process (PID: {0:d}).'.format(pid))\n\n if pid in self._rpc_clients_...
[ "0.7643342", "0.7508366", "0.73010033", "0.72515625", "0.7217871", "0.70760834", "0.70511764", "0.7043338", "0.6978002", "0.6968844", "0.69279426", "0.6863052", "0.68349606", "0.6822483", "0.68179417", "0.6815982", "0.67911863", "0.675352", "0.6741543", "0.6711454", "0.669930...
0.0
-1
Kill process without giving it warning.
def kill(self): self.proc.kill() self.proc.wait() self.thread.join()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def processKill(uPid):\n return processTerminate(uPid);", "def kill(self):\r\n try:\r\n if self.process:\r\n self.process.kill()\r\n self.process.wait()\r\n except WindowsError:\r\n # kill may not be available under windows environment\r\n ...
[ "0.7896664", "0.770771", "0.7687021", "0.7505421", "0.74414134", "0.7414322", "0.7326775", "0.7304749", "0.7290452", "0.7268728", "0.72628397", "0.72458833", "0.7101107", "0.7080297", "0.70758694", "0.7012978", "0.70051336", "0.69897634", "0.6925199", "0.69224155", "0.6908679...
0.6804302
31
Tail the stdout of the process and remember it. Stores the lines of output produced by the process in self.logs and signals that a new line was read so that it can be picked up by consumers.
def tail(self): for line in iter(self.proc.stdout.readline, ''): if len(line) == 0: break if self.log_filter(line.decode('ASCII')): continue if self.verbose: logging.debug(f"{self.prefix}: {line.decode().rstrip()}") ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _stdout_reader(self):\n self._is_launched.wait()\n stdout_iterator = iter(self._popen.stdout.readline, b\"\")\n for line in stdout_iterator:\n self._log(\"raw\", \"stdout : {0}\".format(line.strip()))\n self.stdout_queue.put_nowait(line.strip())\n self.stdout_q...
[ "0.7018636", "0.68938357", "0.64648557", "0.63040227", "0.61803836", "0.611249", "0.6055522", "0.6042259", "0.60367477", "0.59178376", "0.589845", "0.58607674", "0.5854063", "0.577992", "0.5725091", "0.56646895", "0.56633466", "0.56391853", "0.5608646", "0.5590531", "0.555853...
0.8187086
0
Look for `regex` in the logs.
def is_in_log(self, regex, start=0): ex = re.compile(regex) for l in self.logs[start:]: if ex.search(l): logging.debug("Found '%s' in logs", regex) return l logging.debug("Did not find '%s' in logs", regex) return None
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def matchLogAgainstRegex(self, log):\n\n matchedString = ''\n\n if not log:\n # no log provided\n raise ValueError('no log provided')\n\n # try regex matching\n regexMatches = self.compiledRegex.findall(log)\n\n # get specified match based on idx num\n ...
[ "0.6812222", "0.6396781", "0.6323904", "0.6270402", "0.6225342", "0.61722404", "0.60080373", "0.5975386", "0.5958538", "0.5957004", "0.5957004", "0.5954759", "0.5909928", "0.5905066", "0.59044474", "0.58903766", "0.5873692", "0.58668035", "0.5854508", "0.58435524", "0.581534"...
0.68955874
0
Look for `regexs` in the logs. We tail the stdout of the process and look for each regex in `regexs`, starting from last of the previous waitedfor log entries (if any). We fail if the timeout is exceeded or if the underlying process exits before all the `regexs` were found. If timeout is None, no timeout is applied.
def wait_for_logs(self, regexs, timeout=TIMEOUT): logging.debug("Waiting for {} in the logs".format(regexs)) exs = [re.compile(r) for r in regexs] start_time = time.time() pos = self.logsearch_start while True: if timeout is not None and time.time() > start_time + t...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def wait_for_log(self, regex, timeout=TIMEOUT):\n return self.wait_for_logs([regex], timeout)", "def extract_values(self):\n log_unmatched = []\n stdout_unmatched = []\n stderr_unmatched = []\n result = True\n\n regex_sources = []\n if self.logpath and self.cfg.lo...
[ "0.6554087", "0.5195102", "0.51535976", "0.51490176", "0.5125376", "0.50308865", "0.49729815", "0.4920727", "0.4881864", "0.48079687", "0.47824997", "0.47792268", "0.4773751", "0.4764229", "0.47570693", "0.4744247", "0.47347224", "0.471532", "0.46489775", "0.4641251", "0.4617...
0.74728626
0
Look for `regex` in the logs. Convenience wrapper for the common case of only seeking a single entry.
def wait_for_log(self, regex, timeout=TIMEOUT): return self.wait_for_logs([regex], timeout)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def is_in_log(self, regex, start=0):\n\n ex = re.compile(regex)\n for l in self.logs[start:]:\n if ex.search(l):\n logging.debug(\"Found '%s' in logs\", regex)\n return l\n\n logging.debug(\"Did not find '%s' in logs\", regex)\n return None", "...
[ "0.7234513", "0.64218044", "0.6214132", "0.6066417", "0.60639656", "0.60621494", "0.59272736", "0.58378756", "0.5832546", "0.5815568", "0.57909983", "0.57676667", "0.5656818", "0.5603092", "0.5512624", "0.5508064", "0.5505123", "0.5483321", "0.5446021", "0.543217", "0.5428485...
0.55470073
14
Reorganize chain by creating a fork at height=[height] and remine all mempool transactions into [height + shift], where shift >= 0. Returns hashes of generated blocks. Note that tx's that become invalid at [height] (because coin maturity, locktime etc.) are removed from mempool. The length of the new chain will be orig...
def simple_reorg(self, height, shift=0): hashes = [] fee_delta = 1000000 orig_len = self.rpc.getblockcount() old_hash = self.rpc.getblockhash(height) if height + shift > orig_len: final_len = height + shift else: final_len = 1 + orig_len # ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def mine_reorg(self, length):\n\n # make sure all invalidated blocks are node0's\n self.generatetoaddress(self.nodes[0], length, self.nodes[0].get_deterministic_priv_key().address)\n for x in self.nodes[0].p2ps:\n x.wait_for_block_announcement(int(self.nodes[0].getbestblockhash(), 1...
[ "0.64595574", "0.58120793", "0.56435055", "0.561937", "0.56143004", "0.5595991", "0.54888064", "0.5484174", "0.5313484", "0.5154968", "0.5067081", "0.5065475", "0.50483334", "0.5036218", "0.50244987", "0.4982427", "0.49731052", "0.49571624", "0.49556592", "0.4946499", "0.4944...
0.794877
0
Deploy a revault setup with {n_stakeholders} stakeholders, {n_managers} managers and optionally fund it with {funding} sats.
def deploy(self, n_stakeholders, n_managers, funding=None, csv=None): (conf_stk, conf_man) = get_participants(n_stakeholders, n_managers) if csv is None: # More than 6 months csv = random.randint(1, 26784) stk_nodes = [] for i in range(len(conf_stk)): ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def setup(token_addr: str, box_addr: str) -> None:\n print(f\"\\nSetting up Contracts....\")\n tokenContract = pytezos.contract(token_addr)\n print(f\"-- Performing Initial Mint to Admin : {pub_key_hash}\")\n tokenContract.initialMint(None).inject(_async=False)\n print(\"-- Funding Fishcake Box Cont...
[ "0.5813184", "0.5735331", "0.56949604", "0.5574248", "0.55136925", "0.54119915", "0.5382259", "0.5361257", "0.5349573", "0.5346696", "0.5290507", "0.5271076", "0.52404386", "0.52240694", "0.52200854", "0.5217702", "0.5209116", "0.5172304", "0.5167198", "0.5145933", "0.5142364...
0.76175135
0
add insert statement to the set.
def add_insert_sql(self, stmt: str) -> 'StatementSet': self._j_statement_set.addInsertSql(stmt) return self
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def insert_statement() -> str:\n pass", "async def _insert_stmt(self):\n raise NotImplementedError", "def insert(statement: str) -> []:\n raise NotImplementedError", "def insert(self):\n pass", "def insert(self):\n self.getDbRecord().insert()\n\n return", "def in...
[ "0.73348004", "0.7282123", "0.7104033", "0.70376384", "0.67192733", "0.66953015", "0.6664766", "0.6629884", "0.65293306", "0.6495636", "0.6481297", "0.643897", "0.6429661", "0.6397608", "0.63722914", "0.6366629", "0.63188213", "0.6221601", "0.6208461", "0.6191863", "0.6189242...
0.80597764
0
Optimizes all statements as one entity and adds them as transformations to the underlying StreamExecutionEnvironment.
def attach_as_datastream(self): self._j_statement_set.attachAsDataStream()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def optimize(self):\n seq = transform.Sequential([transform.SimplifyInference(),\n transform.FuseOps(0),\n transform.ToANormalForm(),\n transform.InferType()])\n return seq(self.mod)", "def comp...
[ "0.56001043", "0.55654186", "0.55654186", "0.55654186", "0.55654186", "0.55654186", "0.55654186", "0.55654186", "0.55654186", "0.55654186", "0.55654186", "0.55654186", "0.55654186", "0.55654186", "0.55654186", "0.55654186", "0.55654186", "0.55654186", "0.55654186", "0.55654186"...
0.0
-1
Adds a statement that the pipeline defined by the given Table object should be written to a table (backed by a DynamicTableSink) that was registered under the specified path or expressed via the given TableDescriptor.
def add_insert(self, target_path_or_descriptor: Union[str, TableDescriptor], table, overwrite: bool = False) -> 'StatementSet': if isinstance(target_path_or_descriptor, str): self._j_statement_set.addInsert(target_path_or_descriptor, table._j_...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def add(self, recordid, tablerow_object, insupdel=0):\n try:\n # Add a statement\n # with recordid\n if insupdel == 0:\n self.statements_insert.append([recordid, tablerow_object])\n elif insupdel == 1:\n self.statements_update.append(...
[ "0.52105063", "0.5086503", "0.49902365", "0.49250248", "0.47580516", "0.46843183", "0.46684784", "0.46672463", "0.46520108", "0.46000272", "0.45493692", "0.45402828", "0.45050877", "0.45050564", "0.44975215", "0.44867492", "0.44838643", "0.4481346", "0.44599575", "0.4427141", ...
0.45722073
10
returns the AST and the execution plan of all statements and Tables.
def explain(self, *extra_details: ExplainDetail) -> str: TEXT = get_gateway().jvm.org.apache.flink.table.api.ExplainFormat.TEXT j_extra_details = to_j_explain_detail_arr(extra_details) return self._j_statement_set.explain(TEXT, j_extra_details)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def compile_statements(self):\n\t\n\t\tif self.tokenizer.get_token() == 'do':\n\t\t\tself.compile_do()\n\t\telif self.tokenizer.get_token() == 'let':\n\t\t\tself.compile_let()\n\t\telif self.tokenizer.get_token() == 'while':\n\t\t\tself.compile_while()\n\t\telif self.tokenizer.get_token() == 'return':\n\t\t\tself....
[ "0.58426493", "0.5780248", "0.5755113", "0.5742486", "0.57143164", "0.5552393", "0.55485696", "0.5547247", "0.55079633", "0.5506144", "0.5490142", "0.5461493", "0.5443722", "0.5379092", "0.5367922", "0.53249174", "0.531023", "0.5297551", "0.52941924", "0.5287371", "0.52603763...
0.0
-1
execute all statements and Tables as a batch.
def execute(self) -> TableResult: self._t_env._before_execute() return TableResult(self._j_statement_set.execute())
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def insert_many_execute(self) -> None:\n self.connection.isolation_level = None\n self.cursor.execute('BEGIN TRANSACTION')\n for i in self.__sql_buffer.split(';'):\n self.cursor.execute(i)\n self.__sql_buffer = \"\"\n self.cursor.execute('COMMIT')", "def run():\r\n ...
[ "0.7232379", "0.69801813", "0.69015574", "0.6610477", "0.6602783", "0.65980256", "0.6545557", "0.64657193", "0.6446561", "0.6377295", "0.63597274", "0.63520765", "0.63237077", "0.62542707", "0.6233846", "0.6204226", "0.6173758", "0.61651134", "0.61408097", "0.6123944", "0.612...
0.612041
21
Creates a dataset with n_series data series that are each simulated for samples_per_series time steps. The timesteps are delta_t seconds apart.
def create_dataset(n_series=51, samples_per_series=1001, save_to_disk=True): delta_t = 0.01 x0_in = np.random.random((n_series//2)) x0_out = np.random.random((n_series-n_series//2)) + np.pi - 1 x0 = np.concatenate([x0_in, x0_out]) msd = MassSpringDamper(x=x0, x_dt=tf.zeros_like(x0)) # compute all t...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def generate_ensemble_time_series(dsys, n_traj, len_traj):\n\n for i in range(n_traj):\n # Training initial condition.\n x0_train = normal(loc=0.0, scale=1.0, size=(dsys.A.shape[1]))\n\n # Run simulation to generate dataset.\n t, _, x = dlsim(dsys, np.zeros((len_traj, dsys.inputs)), ...
[ "0.65548915", "0.6483605", "0.61622024", "0.60135025", "0.5952278", "0.59478754", "0.5932897", "0.58320725", "0.58142924", "0.5810814", "0.58012944", "0.579603", "0.57907796", "0.57790065", "0.57643455", "0.5731143", "0.5673035", "0.5666023", "0.56609744", "0.56574816", "0.56...
0.70332897
0
Needed because Keras' MSE implementation includes L2 penalty
def my_mse(y_true, y_pred): return tf.reduce_mean(tf.square(y_true - y_pred), axis=-1)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def last_time_step_mse(y_true, y_pred):\n return keras.metrics.mean_squared_error(y_true[:,-1],y_pred[:,-1])", "def rmse(y_true, y_pred): # -> Any:\n ...", "def mse_k(self, X, Y):\n\t\treturn np.power(Y - self.predict_soft(X), 2).sum(1).mean(0)", "def _mse(self):\n error = se...
[ "0.6798121", "0.6746864", "0.6709752", "0.6691435", "0.6492978", "0.6477202", "0.64586943", "0.63607097", "0.63523906", "0.63517386", "0.6330202", "0.630452", "0.6284733", "0.62675333", "0.6223726", "0.6218478", "0.6213949", "0.61776364", "0.61588955", "0.6142944", "0.6091366...
0.61977226
17
Calculates total energy of a massspringdamper system given a state.
def total_energy(state, k=1, m=1): return 0.5*k*state[..., 0]*state[..., 0]+0.5*m*state[..., 1]*state[..., 1]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def E(self, state):\n \n if state==0: # Invalid state has no energy\n return 0\n return sum([self.calcDistance(state[i+1], state[i]) for i in range(len(state)-1)])", "def energy(self, state):\n return _modeller.mod_state_optimizer_energy(self._modpt,\n ...
[ "0.72978914", "0.6800482", "0.67240715", "0.6545475", "0.647643", "0.63820916", "0.6224594", "0.6218873", "0.6209779", "0.6199031", "0.6194541", "0.61923784", "0.61691", "0.6158798", "0.6013328", "0.6004666", "0.5997395", "0.59853816", "0.5841618", "0.5840448", "0.57865363", ...
0.7182555
1
Computes the relative energy drift of x_pred w.r.t. x_true
def relative_energy_drift(x_pred, x_true, t=-1): energy_pred = total_energy(x_pred[t]) energy_true = total_energy(x_true[t]) return (energy_pred-energy_true) / energy_true
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def wrapped_phase_difference(y_true, y_pred):\n\n diff = y_pred - y_true\n diff -= tf.multiply(\n tf.cast(tf.greater_equal(diff, dvpy.tf.pi), \"float32\"), 2.0 * dvpy.tf.pi\n )\n diff += tf.multiply(\n tf.cast(tf.less(diff, -dvpy.tf.pi), \"float32\"), 2.0 * dvpy.tf.pi\n )\n return d...
[ "0.61286956", "0.6123985", "0.60035336", "0.5856947", "0.5804698", "0.5800761", "0.5794037", "0.5790036", "0.57635224", "0.5752601", "0.56845367", "0.5673297", "0.5668639", "0.56648374", "0.5648307", "0.5620171", "0.5612428", "0.56122655", "0.5608644", "0.5602617", "0.5596544...
0.8591493
0
Computes the relative phase error of x_pred w.r.t. x_true. This is done by finding the locations of the zero crossings in both signals, then corresponding crossings are compared to each other.
def relative_phase_error(x_pred, x_val): ref_crossings = zero_crossings(x_val[:, 0]) pred_crossings = zero_crossings(x_pred[:, 0]) t_ref = np.mean(np.diff(ref_crossings)) * 2 t_pred = np.mean(np.diff(pred_crossings)) * 2 phase_error = t_ref/t_pred - 1 if len(pred_crossings) < len(ref_crossings) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def wrapped_phase_difference(y_true, y_pred):\n\n diff = y_pred - y_true\n diff -= tf.multiply(\n tf.cast(tf.greater_equal(diff, dvpy.tf.pi), \"float32\"), 2.0 * dvpy.tf.pi\n )\n diff += tf.multiply(\n tf.cast(tf.less(diff, -dvpy.tf.pi), \"float32\"), 2.0 * dvpy.tf.pi\n )\n return d...
[ "0.6281197", "0.59099185", "0.58893096", "0.5852402", "0.5812844", "0.57776743", "0.5741355", "0.571223", "0.5664011", "0.551934", "0.5496603", "0.5488607", "0.5486976", "0.5474592", "0.5464117", "0.5453587", "0.54014504", "0.53790504", "0.536854", "0.5364881", "0.533917", ...
0.80148506
0
Visualize a tf.keras.Model for a single pendulum.
def visualize(model, x_val, PLOT_DIR, TIME_OF_RUN, args, ode_model=True, latent=False, epoch=0, is_mdn=False): x_val = x_val.reshape(2, -1, 2) dt = 0.01 t = tf.linspace(0., 10., int(10./dt)+1) # Compute the predicted trajectories if ode_model: x0_extrap = tf.stack([x_val[0, 0]]) x_t_...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _visualise_model(\n ax: plt.Axes, model: BaseModel, ts: ArrayLike, model_color: str, growth_period_color: str, maturation_offset: float\n) -> None:\n # Visualise the fit\n ts = np.asarray(ts)\n ys = model.predict(ts)\n ax.plot(ts, ys, c=model_color, label=\"Predicted\")\n\n # Visualise the ti...
[ "0.670003", "0.59203535", "0.5844068", "0.5772857", "0.5705508", "0.5521636", "0.552075", "0.5368064", "0.53358203", "0.53293264", "0.53081125", "0.53065926", "0.5301761", "0.5298533", "0.52825826", "0.5264045", "0.52629435", "0.5232321", "0.5193793", "0.5178882", "0.51681125...
0.58403814
3
Find indices of zeros crossings
def zero_crossings(x): return np.array(np.where(np.diff(np.sign(x)))[0])
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def zero_cross_elems(x, y):\n assert (x.size == y.size), \"x and y must have equal size!\"\n indices = np.arange(x.size)[zero_cross_boolean_index(y)]\n\n return Zero_Cross_Intervals(x[indices],\n x[indices + 1],\n y[indices],\n ...
[ "0.69026285", "0.66425437", "0.66288316", "0.6570189", "0.65314287", "0.6530191", "0.64993614", "0.64742637", "0.6454947", "0.6424364", "0.6378439", "0.6375406", "0.6299005", "0.62695843", "0.622959", "0.61957747", "0.6192994", "0.61845845", "0.6160345", "0.61368203", "0.6043...
0.7078362
0
Creates and saves a user with the given credentials.
def create_user(self, username, email: str = None, password: str = None, **kwargs): return self._create_user(username, email=email, password=password, **kwargs)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def create(self, credentials):\n return User.objects.create_user(\n credentials['username'],\n credentials['email'],\n credentials['password']\n )", "def create_user(self, username=\"foo\", email=\"foo@foo.com\", pwd=\"password\"):\n with app.app_context():\n...
[ "0.8354974", "0.78025395", "0.7666511", "0.7655392", "0.76072586", "0.76044446", "0.7590647", "0.7588419", "0.7587881", "0.7542751", "0.75079054", "0.74891263", "0.7480801", "0.74755514", "0.7470141", "0.7467787", "0.74560905", "0.7452289", "0.7449995", "0.74420017", "0.74313...
0.71091014
98
Creates and saves a superuser with the given credentials.
def create_superuser(self, username, email: str = None, password: str = None, **kwargs): kwargs.setdefault('is_staff', True) kwargs.setdefault('is_superuser', True) return self._create_user(username, email=email, password=password, **kwargs)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def create_superuser(self, username, firstname, lastname, email, password):\n user = self.create_user(\n username=username,\n firstname=firstname,\n lastname=lastname,\n email=email,\n password=password,\n )\n user.is_admin = True\n ...
[ "0.7665751", "0.76599526", "0.7633325", "0.7613368", "0.7548139", "0.75175565", "0.75017494", "0.7498751", "0.7497807", "0.7497559", "0.7497241", "0.7488904", "0.7484993", "0.74615604", "0.74535567", "0.7444655", "0.7431043", "0.7430459", "0.7427848", "0.7412361", "0.74012953...
0.74214536
19
Get all valid knight's moves from location x0, y0 on the 9x9 sudoku grid.
def getAllValidMoves(x0, y0): deltas = [ (-2, -1), (-2, +1), (+2, -1), (+2, +1), (-1, -2), (-1, +2), (+1, -2), (+1, +2), ] validPositions = [] for (x, y) in deltas: xCandidate = x0 + x yCandidate = y0 + y if 0 < xCa...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_legal_moves(self):\n moves = []\n if self.player_locations[self.whose_turn] is None:\n return self.get_blank_locations()\n matrix = [(1,0), (-1,0), (0,1), (0,-1), (1,1), (1,-1), (-1, 1), (-1,-1)]\n\n for dx, dy in matrix:\n x,y = self.player_locations[self....
[ "0.7800498", "0.7416829", "0.73896676", "0.7355546", "0.72740203", "0.7235792", "0.71068656", "0.70652497", "0.6994112", "0.6918404", "0.6835368", "0.6831226", "0.68228096", "0.6809941", "0.67770463", "0.6734217", "0.67146814", "0.67090935", "0.6682379", "0.66746056", "0.6647...
0.73486286
4
Check that no cells share the same value as a specific cell when they're a knight's move away.
def exactly_one_knights_move(variables): cnf = [] for valid_move in variables[:-1]: # print(valid_move) cnf.append([-valid_move, -variables[-1]]) return cnf
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def check_lost (grid):\r\n adjacent = False\r\n zero_value = False\r\n for i in range(4): \r\n for j in range(4):\r\n if grid[i][j] == 0:\r\n zero_value = True\r\n break\r\n for i in range(3):\r\n for j in range(3):\r\n if grid[i][...
[ "0.6331355", "0.6326156", "0.63063097", "0.6245713", "0.6176819", "0.6123772", "0.60940635", "0.609174", "0.60422224", "0.6031074", "0.59380674", "0.5923852", "0.5835901", "0.58009046", "0.5739902", "0.57345146", "0.572951", "0.5717221", "0.56704354", "0.566835", "0.56444776"...
0.0
-1
Check that all cells in 'variales' have unique values.
def exactly_one(variables): cnf = [variables] n = len(variables) for i in range(n): for j in range(i + 1, n): v1 = variables[i] v2 = variables[j] cnf.append([-v1, -v2]) return cnf
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def assert_unique_cols_unique(self, df):\n assert not df.duplicated(self.unique_cols).any()", "def test_check_unique_var(self):\n\n for component_name in [\"var\", \"raw.var\"]:\n with self.subTest(component_name=component_name):\n\n # Resetting validator\n ...
[ "0.63620746", "0.62129706", "0.6201802", "0.6193316", "0.61617726", "0.6146202", "0.61371833", "0.6137029", "0.5997458", "0.5884578", "0.58836", "0.5803739", "0.5782447", "0.5720199", "0.5682489", "0.56469285", "0.5644524", "0.56409854", "0.5598229", "0.55876446", "0.55558944...
0.0
-1
Transform the cell X(i, j, k) into an integer for conversion to CNF.
def transform(i, j, k): return i * N * N + j * N + k + 1
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __getnum__(self, i, j):\n return self.pos_to_num[(i, j)]", "def as_integer(self):\n if self.symbol == '+':\n temp = [self.attribute_col, 1]\n elif self.symbol == '-':\n temp = [self.attribute_col, -1]\n else:\n temp = [self.attribute_col, 0]\n ...
[ "0.6103872", "0.58493155", "0.5766707", "0.5734533", "0.56284475", "0.55735785", "0.55456716", "0.5451561", "0.54266685", "0.5409159", "0.5409159", "0.5409159", "0.5409159", "0.53852427", "0.5341426", "0.5300994", "0.5292215", "0.5251497", "0.5190708", "0.5190708", "0.5190708...
0.54423225
8
Convert the integer back into i, j, k values.
def inverse_transform(v): v, k = divmod(v - 1, N) v, j = divmod(v, N) v, i = divmod(v, N) return i, j, k
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __getnum__(self, i, j):\n return self.pos_to_num[(i, j)]", "def to_ijv(self):\n row_indices = []\n column_indices = []\n nonzero_elements = []\n k = 0\n for key, value in self.data.items():\n if value == 0:\n continue\n row, col =...
[ "0.5823448", "0.5436596", "0.5428236", "0.5380349", "0.52834296", "0.52059615", "0.5202263", "0.51605237", "0.51520085", "0.514841", "0.51293755", "0.510118", "0.5076202", "0.5036652", "0.5031226", "0.5031054", "0.50288296", "0.5008367", "0.5007212", "0.49944344", "0.49824622...
0.495023
24
Given a sting CSV line, return a list of strings.
def csv_readline(line): for row in csv.reader([line]): return row
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def from_csv_line(line):\r\n return line.strip().split(',')", "def read(self, line):\n data = []\n if six.PY3 and type(line) == six.binary_type:\n line = line.decode('utf-8')\n\n csv_reader = csv.reader(six.StringIO(line),\n delimiter=self.delimiter,\n ...
[ "0.8216797", "0.73310727", "0.72", "0.71712154", "0.7040743", "0.6812084", "0.6807555", "0.67872983", "0.6727834", "0.6690727", "0.6648978", "0.6611844", "0.65976346", "0.6556839", "0.65206516", "0.6474821", "0.63950497", "0.6366489", "0.6366489", "0.63588786", "0.6346434", ...
0.6590794
14
Ordering is set by a comma delimited ?ordering=... query parameter. The `ordering` query parameter can be overridden by setting the `ordering_param` value on the OrderingFilter or by specifying an `ORDERING_PARAM` value in the API settings.
def get_ordering(self, request, queryset, view): ordering = [] params = get_datatables_ordering(request.query_params) if params: fields = [param.strip() for param in params.split(',')] ordering = self.remove_invalid_fields(queryset, fields, view, request) if o...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _sort_by_query_string_param(self, songs):\n orderable_fields_dict = {\n 'name': Lower('name'),\n 'artist': Lower('artist__name'),\n 'avgRating': 'average_rating',\n 'year': 'year'\n }\n\n order_by = self.request.query_params.get('orderBy', None)\...
[ "0.6548646", "0.6339288", "0.63350976", "0.6280332", "0.6231859", "0.60011864", "0.59715325", "0.5950593", "0.5941029", "0.58408827", "0.58376485", "0.5808046", "0.5758433", "0.57560813", "0.5746289", "0.57187814", "0.56474346", "0.56353605", "0.55608726", "0.554913", "0.5512...
0.5934701
9
Set authentication for the Webhook. Can be either a app or user token.
def authenticate(self, auth_token: str) -> None: self.__authenticate = True self.__auth_token = auth_token if not self.callback_url.startswith('https'): raise Exception('HTTPS is required for authenticated webhook.\n' + 'Either use non authenticated webhoo...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def authentication_hook(self):\n pass", "def authentication(self, authentication):\n self._authentication = authentication", "def set_requests_auth(self):\n self.__auth = OAuth2(token=self.bearer_token)", "def enable_auth(self):\n\n self._api_manager.enable_auth()", "def for_aut...
[ "0.6512903", "0.6280482", "0.6232747", "0.6179822", "0.6173788", "0.6144986", "0.60863155", "0.60844374", "0.60590637", "0.60274845", "0.5969733", "0.5961362", "0.5910693", "0.5896948", "0.5857367", "0.5832172", "0.5830799", "0.5819944", "0.5808844", "0.5794098", "0.57879853"...
0.63118255
1
Stops the Webhook Please make sure to unsubscribe from all subscriptions!
def stop(self): if self.__hook_runner is not None: self.__hook_loop.call_soon_threadsafe(self.__hook_loop.stop) self.__hook_runner = None self.__hook_thread.join()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def stop(self):\n self.unhook()", "async def on_shutdown():\n # Remove webhook.\n await bot.delete_webhook()", "def stop(self):\n self.running = False\n with self.lock:\n self.websockets.clear()\n self.poller.release()", "def stop(self):\n log.info(...
[ "0.73477376", "0.730306", "0.70386827", "0.69969374", "0.69407964", "0.6834157", "0.6826018", "0.6722071", "0.67102283", "0.66708004", "0.66708004", "0.6646933", "0.66421884", "0.6629264", "0.66051805", "0.65731984", "0.65622634", "0.652264", "0.6496202", "0.6496202", "0.6496...
0.6445198
27
Subscribe to Twitch Topic
def _subscribe(self, callback_path: str, topic_url: str, mode: str = "subscribe"): data = {'hub.callback': self.callback_url + callback_path, 'hub.mode': mode, 'hub.topic': topic_url, 'hub.lease_seconds': self.subscribe_least_seconds} if self.secret is not...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def subscribe(self, topic):\n\t\tself.topic=topic\n\t\tself.client.subscribe(self.topic)", "def subscribe( self, topic ):\n logging.info( \"Subscribing to topic %s\" %topic )\n try:\n self.client.subscribe( topic )\n except Exception as error:\n print( error )", "def ...
[ "0.72031987", "0.7145145", "0.6991258", "0.6840349", "0.6744704", "0.67444885", "0.6698804", "0.6673859", "0.6664869", "0.664405", "0.6601021", "0.65822107", "0.65822107", "0.65822107", "0.6478522", "0.6478522", "0.64706546", "0.64471954", "0.6439257", "0.6435605", "0.6413491...
0.63418204
25
Subscribe to user follow topic. Set only from_id if you want to know if User with that id follows someone.\n Set only to_id if you want to know if someone follows User with that id.\n Set both if you only want to know if from_id follows to_id.\n
def subscribe_user_follow(self, from_id: Union[str, None], to_id: Union[str, None], callback_func: Union[Callable[[UUID, dict], None], None]) -> Tuple[bool, UUID]: param_dict = {"first": 1, "from_id":...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def follow_me(self, action = 'follow_topic'):\n data = {\n 'params' : json.dumps({\n 'topic_id' : self.soup.find('div', id = 'zh-topic-desc')['data-resourceid']\n }),\n '_xsrf' : self.session.getCookie()['_xsrf'],\n 'method' : action\n ...
[ "0.6426532", "0.6417592", "0.6319717", "0.6229763", "0.6068537", "0.592255", "0.5917339", "0.59045386", "0.59028536", "0.58812976", "0.58408505", "0.58146167", "0.5809982", "0.5805806", "0.5790301", "0.5789063", "0.57648915", "0.57457554", "0.5718259", "0.56877375", "0.566789...
0.7383402
0
Unsubscribe from user follow topic
def unsubscribe_user_follow(self, uuid: UUID) -> bool: return self._generic_unsubscribe('/users/follows', uuid)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def unfollow_me(self):\n return self.follow_me('unfollow_topic')", "def _onUnsubscribe(self, client:mqtt.Client, userdata:Any, mid:int) -> None:\n\t\t# TODO doc, error check when not connected, not subscribed\n\t\tfor t in self.subscribedTopics.values():\n\t\t\tif t.mid == mid:\n\t\t\t\tdel self.subscribe...
[ "0.78618807", "0.7404355", "0.7356452", "0.7301059", "0.7293563", "0.72068113", "0.7114952", "0.6996647", "0.69802845", "0.69039005", "0.6884112", "0.68658125", "0.6806643", "0.6806643", "0.6806643", "0.6806643", "0.6806643", "0.67019063", "0.6628263", "0.6621598", "0.6608499...
0.7143689
6
Subscribe to stream changed topic\n
def subscribe_stream_changed(self, user_id: str, callback_func: Union[Callable[[UUID, dict], None], None]) -> Tuple[bool, UUID]: param_dict = {"user_id": user_id} url = build_url(TWITCH_API_BASE_URL + "streams", param_dict) uuid =...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _on_connect(self, client, userdata, flags, rc):\n self.subscribe(self.topic)", "def subscribe(self, topic):\n\t\tself.topic=topic\n\t\tself.client.subscribe(self.topic)", "def subscribe(self, topic):\n self.topic = topic\n self.client.on_connect = self.on_connect\n self.client.o...
[ "0.73587894", "0.73050404", "0.7253479", "0.7140035", "0.71158516", "0.70430756", "0.70430756", "0.70430756", "0.7021174", "0.70088357", "0.69907594", "0.6969615", "0.6907298", "0.68529415", "0.68044573", "0.6784355", "0.67176783", "0.6712941", "0.66814595", "0.6646636", "0.6...
0.5841582
91
Unsubscribe from stream changed topic
def unsubscribe_stream_changed(self, uuid: UUID) -> bool: return self._generic_unsubscribe('/streams', uuid)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async def unsubscribe(self, topic: str, subscription_id: int = None) -> None:\n ...", "def unsubscribe(receiver):", "def unsubscribe(receiver):", "def unsubscribe(receiver):", "def unsubscribe(receiver):", "def unsubscribe(receiver):", "def unsubscribe(self, topic):\n request = protos.Req...
[ "0.774863", "0.7619209", "0.7619209", "0.7619209", "0.7619209", "0.7619209", "0.7328704", "0.7293971", "0.71787375", "0.71762586", "0.71287817", "0.7125174", "0.7024157", "0.7020863", "0.7006512", "0.695951", "0.6945188", "0.6900266", "0.68850166", "0.68574595", "0.68465644",...
0.70876384
12
Subscribe to subscription event topic\n
def subscribe_user_changed(self, user_id: str, callback_func: Union[Callable[[UUID, dict], None], None]) -> Tuple[bool, UUID]: param_dict = {"id": user_id} url = build_url(TWITCH_API_BASE_URL + "users", param_dict) uuid = get_uuid() ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def subscribe( self, topic ):\n logging.info( \"Subscribing to topic %s\" %topic )\n try:\n self.client.subscribe( topic )\n except Exception as error:\n print( error )", "def on_subscribe( client, userdata, mid, granted_qos ):\n logging.info( \"Topic successfully su...
[ "0.78011537", "0.76737946", "0.7650545", "0.7637412", "0.76196575", "0.7488806", "0.74484235", "0.7360226", "0.724094", "0.7222296", "0.7222296", "0.7222296", "0.72069705", "0.7187491", "0.71457654", "0.71090275", "0.7108999", "0.7093177", "0.6963686", "0.6943664", "0.6907351...
0.0
-1
Unsubscribe from subscription event topic
def unsubscribe_user_changed(self, uuid: UUID) -> bool: return self._generic_unsubscribe("/users/changed", uuid)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async def unsubscribe(self, topic: str, subscription_id: int = None) -> None:\n ...", "def unsubscribeFromEvent(eventName,subscriber):", "def unsubscribe(receiver):", "def unsubscribe(receiver):", "def unsubscribe(receiver):", "def unsubscribe(receiver):", "def unsubscribe(receiver):", "def un...
[ "0.8265341", "0.79855394", "0.78613484", "0.78613484", "0.78613484", "0.78613484", "0.78613484", "0.76457715", "0.7578656", "0.75465965", "0.7486301", "0.74483675", "0.7354071", "0.733398", "0.731288", "0.73032236", "0.72957045", "0.7293375", "0.7292126", "0.7288204", "0.7229...
0.0
-1
Subscribe to Extension transaction topic\n
def subscribe_extension_transaction_created(self, extension_id: str, callback_func: Union[Callable[[UUID, dict], None], None]) \ -> Tuple[bool, UUID]: if not self.__authenticate: # this requir...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def subscribe_topic(self):\n req = {\n \"op\": \"subscribe\",\n \"args\": [\n \"instrument\",\n \"trade\",\n \"orderBook10\",\n \"execution\",\n \"order\",\n \"position\",\n \"margi...
[ "0.7804112", "0.6831071", "0.6830902", "0.6788986", "0.67115897", "0.6696487", "0.6696487", "0.6696487", "0.66258013", "0.6586794", "0.64005786", "0.6380222", "0.637175", "0.633139", "0.6320845", "0.62829703", "0.6257005", "0.6228517", "0.6197933", "0.6196007", "0.6182721", ...
0.5676822
76
Unsubscribe from Extension transaction created Topic
def unsubscribe_extension_transactions_created(self, uuid: UUID) -> bool: return self._generic_unsubscribe('/extensions/transactions', uuid)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async def unsubscribe(self, topic: str, subscription_id: int = None) -> None:\n ...", "def unsubscribe(endpoint: str, topic: str, timeout: int = 5):\n global logger\n logger.info(f\"Unsubscribing from topic '{topic}' ...\")\n action = {\"action\": \"unsubscribe\", \"topic\": topic}\n reply = s...
[ "0.7785302", "0.70840764", "0.7039646", "0.6972927", "0.68595046", "0.6841361", "0.6763793", "0.6763793", "0.6763793", "0.6763793", "0.6763793", "0.66854125", "0.6625891", "0.65613663", "0.6455564", "0.64483654", "0.64307076", "0.6417031", "0.64117914", "0.64080447", "0.63859...
0.6056249
47
Subscribe to Moderator Change Events topic\n
def subscribe_moderator_change_events(self, broadcaster_id: str, user_id: Union[str, None], callback_func: Union[Callable[[UUID, dict], None]]) -> Tuple[bool, UUID]: params = { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def listen(client, main):\n\n @client.event\n async def on_message_edit(old, message):\n main.message_handler(message, True)", "def process_IN_MODIFY(self, event):", "def _event_subscribe(self) -> None:\n self.gateway.groups.subscribe(\n self.group_data_callback,\n eve...
[ "0.630276", "0.613077", "0.60775363", "0.6059872", "0.6059872", "0.6059872", "0.6039669", "0.6039669", "0.59692985", "0.5942631", "0.58832145", "0.5874928", "0.5851946", "0.5843113", "0.58037174", "0.58028126", "0.5791291", "0.5728118", "0.5724599", "0.57148063", "0.5711235",...
0.58341825
14
Unsubscribe from Moderator Change Events Topic
def unsubscribe_moderator_change_events(self, uuid: UUID) -> bool: return self._generic_unsubscribe('/moderation/moderators/events', uuid)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def unsubscribe(receiver):", "def unsubscribe(receiver):", "def unsubscribe(receiver):", "def unsubscribe(receiver):", "def unsubscribe(receiver):", "def unsubscribe(self):\n pass # pragma: no cover", "def unsubscribeFromEvent(eventName,subscriber):", "def unsubscribe(observer):", "def unsu...
[ "0.76056266", "0.76056266", "0.76056266", "0.76056266", "0.76056266", "0.74647355", "0.7060999", "0.70378864", "0.70378864", "0.69733167", "0.6935927", "0.67767143", "0.6701206", "0.6625047", "0.6624158", "0.65858805", "0.6540649", "0.64986974", "0.648971", "0.64648473", "0.6...
0.6845972
11
Subscribe to Channel Ban Change Events\n
def subscribe_channel_ban_change_events(self, broadcaster_id: str, user_id: Union[str, None], callback_func: Union[Callable[[UUID, dict], None]]) -> Tuple[bool, UUID]: params = { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def on_channel_change(self, new_channel):\n pass", "def subscribe_balances(self, update_handler):\n pass", "def subscribe(receiver):", "def subscribe(receiver):", "def subscribe(receiver):", "def subscribe(receiver, updateInterval=10):", "def listen_channel_ban(self, broadcaster_user_id: ...
[ "0.6570176", "0.6233181", "0.6006282", "0.6006282", "0.6006282", "0.5961182", "0.5947485", "0.5890927", "0.57617646", "0.5761531", "0.5756199", "0.5721502", "0.57208514", "0.5667496", "0.5582555", "0.5528739", "0.5528062", "0.5526559", "0.55081624", "0.54988754", "0.54754287"...
0.6141255
2
Unsubscribe from Channel Ban Change Events Topic
def unsubscribe_channel_ban_change_events(self, uuid: UUID) -> bool: return self._generic_unsubscribe('/moderation/banned/events', uuid)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def unsubscribe(receiver):", "def unsubscribe(receiver):", "def unsubscribe(receiver):", "def unsubscribe(receiver):", "def unsubscribe(receiver):", "def unsubscribe(self, channel, update_handler=None):\n pass", "def cb_stop(self, update, context):\n\n print(f\"Unsubscribing chat_id '{upd...
[ "0.7299835", "0.7299835", "0.7299835", "0.7299835", "0.7299835", "0.7290285", "0.69569016", "0.69497174", "0.6807146", "0.6805143", "0.67663234", "0.67325085", "0.6711645", "0.667798", "0.6638506", "0.64776814", "0.6413881", "0.63525087", "0.6308385", "0.63021916", "0.6288255...
0.7349533
0
Subscribe to Subscription Events Topic\n
def subscribe_subscription_events(self, broadcaster_id: str, callback_func: Union[Callable[[UUID, dict], None]], user_id: Union[str, None] = None, gifter_id: Union[str,...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def subscribe_topic(self):\n req = {\n \"op\": \"subscribe\",\n \"args\": [\n \"instrument\",\n \"trade\",\n \"orderBook10\",\n \"execution\",\n \"order\",\n \"position\",\n \"margi...
[ "0.74868757", "0.7477948", "0.73847705", "0.72339535", "0.71468717", "0.7072319", "0.70474637", "0.7040364", "0.7040364", "0.7040364", "0.69917065", "0.6967835", "0.69677424", "0.6963225", "0.69115204", "0.6878046", "0.6867905", "0.685218", "0.6698295", "0.66679764", "0.66251...
0.0
-1
Unsubscribe from Subscription Events Topic
def unsubscribe_subscription_events(self, uuid: UUID) -> bool: return self._generic_unsubscribe('/subscriptions/events', uuid)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async def unsubscribe(self, topic: str, subscription_id: int = None) -> None:\n ...", "def unsubscribe(receiver):", "def unsubscribe(receiver):", "def unsubscribe(receiver):", "def unsubscribe(receiver):", "def unsubscribe(receiver):", "def unsubscribeFromEvent(eventName,subscriber):", "def un...
[ "0.81594926", "0.79041", "0.79041", "0.79041", "0.79041", "0.79041", "0.78738904", "0.7636601", "0.76090956", "0.75597286", "0.75595737", "0.73996174", "0.73495823", "0.73371434", "0.72978514", "0.72589266", "0.72108454", "0.7209852", "0.7209852", "0.7180335", "0.7138884", ...
0.70789266
25
Subscribe to Hype Train Events\n
def subscribe_hype_train_events(self, broadcaster_id: str, callback_func: Union[Callable[[UUID, dict], None]]) -> Tuple[bool, UUID]: params = { 'broadcaster_id': broadcaster_id, 'first': 1 } url = bui...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def listen(limb, hd):\n def callback(data):\n playback(limb, hd, str(data.data))\n\n rospy.Subscriber(\"handshake/play\", std_msgs.msg.String, callback)\n rospy.loginfo('listening...')\n rospy.spin()", "def on_connect(client, userdata, flags, rcdata):\n client.subscribe(\"diy/system/fire\",...
[ "0.6272829", "0.62018526", "0.61964303", "0.6183167", "0.6157085", "0.6144037", "0.61242986", "0.61156505", "0.60952926", "0.60716414", "0.60716414", "0.60473037", "0.59852266", "0.5935041", "0.5913895", "0.59126216", "0.58995676", "0.58355355", "0.57930493", "0.57867795", "0...
0.5715374
22
Unsubscribe from Hype Train Events Topic
def unsubscribe_hype_train_events(self, uuid: UUID) -> bool: return self._generic_unsubscribe('/hypetrain/events', uuid)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def unsubscribe(receiver):", "def unsubscribe(receiver):", "def unsubscribe(receiver):", "def unsubscribe(receiver):", "def unsubscribe(receiver):", "def unsubscribe(self):\n pass # pragma: no cover", "def unsubscribeFromEvent(eventName,subscriber):", "def unsubscribe(self, subject):\n ...
[ "0.73012006", "0.73012006", "0.73012006", "0.73012006", "0.73012006", "0.72183186", "0.7197908", "0.6796366", "0.67903614", "0.67750937", "0.67750937", "0.6706016", "0.6649363", "0.6633316", "0.662526", "0.6577521", "0.6576188", "0.65284336", "0.65141696", "0.65022695", "0.64...
0.7315941
0
Its possible to have a CPP library target that has no source (more of a dependency bundle).
def EmptyTarget(self): return not self.objects
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_native_binary_target_no_warning(testdir: Testdir) -> None:\n with temp_env_update({'PRISMA_PY_DEBUG': '0'}):\n result = testdir.generate(options='binaryTargets = [\"native\"]')\n\n stdout = result.stdout.decode('utf-8')\n assert 'Warning' not in stdout\n assert 'binaryTargets option' no...
[ "0.5936038", "0.5624769", "0.55687964", "0.54797125", "0.5355298", "0.5304638", "0.5248008", "0.5209485", "0.5129513", "0.5115217", "0.5066067", "0.5064064", "0.5053785", "0.5047533", "0.50184554", "0.4957185", "0.4948288", "0.49479493", "0.49328604", "0.49280024", "0.4923139...
0.0
-1
Add paddings to make image shape divisible by 32
def get_validation_augmentation(): test_transform = [ albu.Resize(192, 192) ] return albu.Compose(test_transform)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def padding(img, n):\n img = np.pad(img, [(n, n), (n, n)], mode='constant', constant_values=0)\n\n return img", "def padding(image, padded_size):\n image_row, image_col = image.shape #asigna alto y ancho de la imagen \n\n padded_image = np.zeros((image_row + padded_size*2, image_col + padded_size*2))...
[ "0.6846387", "0.6843057", "0.68196994", "0.6801745", "0.6762657", "0.6717646", "0.6697821", "0.6673578", "0.6591452", "0.65731627", "0.65608454", "0.65184844", "0.65169907", "0.6513039", "0.64664114", "0.6415563", "0.6397664", "0.6343387", "0.6340076", "0.6332432", "0.633052"...
0.0
-1
Creates a stitchedge by connecting a parent and child loop
def connect_loops(self, parent_loop_id: int, child_loop_id: int, pull_direction: Pull_Direction = Pull_Direction.BtF, stack_position: Optional[int] = None, depth: int = 0, parent_offset: int = 0): assert parent_loop_id in self, f"parent loop {parent_loop_id} is not in...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def create_synapses(self):\n pass # Ignore if child does not implement.", "def __init__(self, parent, layer):\n pass", "def __init__(self, parent=None):\n super(fsScene, self).__init__(parent)\n # Location of mouse events and whether the mouse button is down\n self.mouseDown = ...
[ "0.57947505", "0.546964", "0.53975177", "0.53660804", "0.53570944", "0.5344863", "0.5323155", "0.53197694", "0.52232933", "0.5204966", "0.51902634", "0.51798797", "0.5172197", "0.5172197", "0.51611084", "0.51545936", "0.5146673", "0.51419324", "0.5136733", "0.5130358", "0.511...
0.52773476
8
Course information will be used to generate instruction for knitting machines and visualizations that structure knitted objects like grids. Evaluation of a course structure should be done in O(nm) time where n is the number of loops in the graph and m is the largest number of parent loops pulled through a single loop (...
def get_courses(self) -> Tuple[Dict[int, float], Dict[float, List[int]]]: loop_ids_to_course = {} course_to_loop_ids = {0: []} current_course_id = 0 # Iterate through the loops for current_loop_id in range(self.last_loop_id + 1): # Check if there are any parent loop...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def build_course(self):\n courses = []\n aprovacao_d = {}\n # semestral\n for rate_it in self.__semestral_rate:\n # pega uma lista no qual o primeiro elemento é a taxa, o segundo\n # e o terceiro são quantidades\n rate_data = self.analysis[\"semestral_ra...
[ "0.63598067", "0.62408775", "0.60766065", "0.58932865", "0.5790156", "0.5698993", "0.5653367", "0.56354576", "0.56241685", "0.5595133", "0.55622107", "0.5559223", "0.54188114", "0.53574604", "0.53306824", "0.5325274", "0.5309439", "0.5280769", "0.5270331", "0.5261296", "0.524...
0.60680026
3
Instanciation of Splitter class. We specify the number of runs to leave out for the test set.
def __init__(self, out_per_fold): self.out_per_fold = out_per_fold pass
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def create_split(self) -> NoReturn:\n raise NotImplementedError", "def _setup_splits(self):\n #ntot = self.reredux_conf['nperfile']\n ntot = self.reredux_conf['Ngals']\n npersplit = self.runconf['nper']\n\n self.beglist, self.endlist = get_splits(ntot, npersplit)", "def _spli...
[ "0.71266425", "0.6380145", "0.6368681", "0.63563967", "0.63418573", "0.6236902", "0.6120404", "0.60342914", "0.59201735", "0.582116", "0.581839", "0.5780446", "0.57682496", "0.576467", "0.57456785", "0.5707095", "0.5682275", "0.5664317", "0.5649972", "0.56174487", "0.5604603"...
0.0
-1
Split lists in differents folds for cross validation.
def split(self, X_train, Y_train, run_train=None, run_test=None): result = [] logo = LeavePOut(self.out_per_fold) for train, test in logo.split(X_train): y_train = [Y_train[i] for i in train] x_train = [X_train[i] for i in train] y_test = [Y_train[i] for i in ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _get_folds(self, splits):\n\n train = [splits.copy() for i in range(self.n_splits)]\n holdout = [train[i].pop(i) for i in range(self.n_splits)]\n train_flat = [list(chain(*row)) for row in train]\n\n return list(zip(train_flat, holdout))", "def split_cv(length, num_folds):\n sp...
[ "0.72968256", "0.719841", "0.69764197", "0.6945098", "0.6917422", "0.6894226", "0.687894", "0.6873099", "0.68583196", "0.68282145", "0.6812268", "0.6787838", "0.6777427", "0.6756678", "0.67225647", "0.6717021", "0.6692794", "0.6687437", "0.6682434", "0.6654291", "0.66536283",...
0.58894753
77
Return items to be featured on homepage
def on_homepage(self): # While it's easy enough to just query the default manager # to do this, providing this convenience method abstracts # away the way homepage items are designated in case # we change the way that designation is done. return self.filter(on_homepage=True)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def featured(self):\n \n featured_content = []\n \n def rnd_content_items(return_items=1, **kwargs):\n if 'limit' not in kwargs:\n kwargs['limit'] = 3\n # searching due_date limits results to only assignments; if we want\n # all art...
[ "0.7098284", "0.6752768", "0.65510976", "0.6305554", "0.6284082", "0.6271135", "0.62244487", "0.6103396", "0.6074179", "0.60473037", "0.5998711", "0.58087254", "0.5795663", "0.57800406", "0.57797366", "0.5759702", "0.57143676", "0.57087076", "0.57039094", "0.5650906", "0.5648...
0.63614005
3
Says when a member joined.
async def joined(self, ctx, member: discord.Member): await ctx.send('{0.name} joined in {0.joined_at}'.format(member))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async def on_member_join(self, member: Member):\n\n if not self._is_tracked(member.guild, EventPriority.join):\n return\n\n em = self.em_base(\n member,\n f\"User {member.mention} ({member.name}) joined\",\n EventColors.join.value\n )\n\n em.a...
[ "0.78859025", "0.7684899", "0.76168865", "0.76168865", "0.76168865", "0.76117444", "0.7605289", "0.7578849", "0.7570187", "0.7469505", "0.7328319", "0.72358775", "0.7097512", "0.6860103", "0.6832718", "0.66840136", "0.664821", "0.65940976", "0.65013736", "0.64450365", "0.6405...
0.7771115
1
Given a triangulation object and a field `q` defined at the vertices of the triangulation, return integral |grad q|^2 dx
def square_gradient(tri, q): finder = tri.get_trifinder() interp = LinearTriInterpolator(tri, q, trifinder = finder) integral = 0.0 num_triangles, _ = np.shape(tri.triangles) for n in range(num_triangles): ele = tri.triangles[n, :] x = tri.x[ele] y = tri.y[ele] a ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def gradh(self,q):\n gx = self.d_i(q) / self.e1u\n gy = self.d_j(q) / self.e2v\n #\n return gx,gy", "def integrate_dphi_phi(self, i, j):\n def func(x):\n return self.shape_function_deriv(i, x) * self.shape_function(j, x)\n i, err = quadrature(func, -1, 1)\n ...
[ "0.61055577", "0.588669", "0.5814507", "0.57111114", "0.5700496", "0.5698189", "0.56779283", "0.5656769", "0.5652398", "0.5644207", "0.5642131", "0.56034553", "0.5586597", "0.55844885", "0.5546834", "0.5504967", "0.5503718", "0.54716414", "0.54594284", "0.5456545", "0.5454004...
0.6430995
0
Get the errors from the Lcurve runs
def get_l_curve_results(directory, overwrite = False): costs = [] tikhs = [] regs = [] glacier = "helheim" extension = ".tar.gz" # If the output hasn't been cached, retrieve it from the giant archives cached_output = os.path.join(directory, "helheim_l_curve.txt") if not os.path.exists...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __call__(self, errors: List[float]) -> List[float]:", "def error(self) -> Sequence[float]:\n errors = []\n for line, sign in zip(self.marker_lines, (-1, 1)):\n if self._orientation == Orientation.UP_DOWN:\n picket_pos = self._fit(line.center.y)\n mlc_pos...
[ "0.6367377", "0.63289833", "0.63179725", "0.62470627", "0.6190272", "0.6103401", "0.6064777", "0.60606426", "0.6049611", "0.6049317", "0.60475177", "0.60305744", "0.5965578", "0.59578276", "0.5941514", "0.5910615", "0.5905703", "0.5876154", "0.5869304", "0.5868508", "0.583170...
0.0
-1
This script analyzes the results of the main function and produces the Lcurve plot.
def analyze(argv): costs, tikhs, regs = get_l_curve_results(argv[0]) fig = plt.figure() ax = fig.add_subplot(111) plt.scatter(tikhs, costs) for k in range(len(regs)): exponent = math.log(regs[k], 10) ax.annotate(r'$10^{{{0:.2f}}}$'.format(exponent), xy = (tikhs[k...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def plot():\n xvals = np.arange(-50, 250, step=0.1)\n\n fig = plt.figure()\n plt.suptitle(\"Gaussian with smooth transition to power law\")\n\n A0vals = [10, 11]\n avals = [5*10**-3, 10**-3, 5*10**-4]\n ttvals = [10., 50., 100.]\n cvals = [-0.1, -0.9, -5./3., -4.]\n offset = [-30, 0.0, 30]\...
[ "0.70325994", "0.6906087", "0.6865391", "0.6744682", "0.6360003", "0.6259489", "0.62437195", "0.6224446", "0.6207582", "0.61919683", "0.619153", "0.61545587", "0.6145968", "0.6132787", "0.61294043", "0.60725796", "0.6056807", "0.60417926", "0.6017504", "0.60079277", "0.600358...
0.6874636
2
This script runs several inversions for Helheim glacier using different values of the regularization parameter in order to generate the familiar Lcurve plot.
def main(argv): rmin = float(argv[0]) rmax = float(argv[1]) nr = int(argv[2]) rs = np.logspace(rmin, rmax, nr) for n in range(nr): r = rs[n] log_file_name = "helheim_lambda-" + str(r) + ".txt" run.main(["-g", "helheim", "-r", str(r), ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def L_curveTV(f,lam_init = 2.0, q = 0.9):\n lam = lam_init\n max_iter = 50\n residual_list = np.zeros(max_iter)\n size_list = np.zeros(max_iter)\n error = np.zeros(max_iter)\n alt_error = np.zeros(max_iter)\n \n for i in range(max_iter): #range(max_iter):\n u = ChambollePock_denoise(...
[ "0.62898856", "0.62495583", "0.62437105", "0.6178935", "0.60789984", "0.59641284", "0.5952815", "0.59437585", "0.5928498", "0.58640605", "0.58632755", "0.58602977", "0.58514357", "0.5839851", "0.58129305", "0.5812024", "0.5801944", "0.57913727", "0.57665944", "0.57651573", "0...
0.0
-1