prompt large_stringlengths 72 9.34k | completion large_stringlengths 0 7.61k |
|---|---|
<|file_name|>impl_gcd.py<|end_file_name|><|fim▁begin|>__author__ = 'Nishanth'
from juliabox.cloud import JBPluginCloud
from juliabox.jbox_util import JBoxCfg, retry_on_errors
from googleapiclient.discovery import build
from oauth2client.client import GoogleCredentials
import threading
class JBoxGCD(JBPluginCloud):
... | cname = resp['rrsets'][0]['rrdatas'][0]
ttl = resp['rrsets'][0]['ttl']
JBoxGCD.connect().changes().create(
project=JBoxGCD.INSTALLID, managedZone=JBoxGCD.REGION,
body={'kind': 'dns#change',
'deletions': [
... |
<|file_name|>impl_gcd.py<|end_file_name|><|fim▁begin|>__author__ = 'Nishanth'
from juliabox.cloud import JBPluginCloud
from juliabox.jbox_util import JBoxCfg, retry_on_errors
from googleapiclient.discovery import build
from oauth2client.client import GoogleCredentials
import threading
class JBoxGCD(JBPluginCloud):
... | configure |
<|file_name|>impl_gcd.py<|end_file_name|><|fim▁begin|>__author__ = 'Nishanth'
from juliabox.cloud import JBPluginCloud
from juliabox.jbox_util import JBoxCfg, retry_on_errors
from googleapiclient.discovery import build
from oauth2client.client import GoogleCredentials
import threading
class JBoxGCD(JBPluginCloud):
... | domain |
<|file_name|>impl_gcd.py<|end_file_name|><|fim▁begin|>__author__ = 'Nishanth'
from juliabox.cloud import JBPluginCloud
from juliabox.jbox_util import JBoxCfg, retry_on_errors
from googleapiclient.discovery import build
from oauth2client.client import GoogleCredentials
import threading
class JBoxGCD(JBPluginCloud):
... | connect |
<|file_name|>impl_gcd.py<|end_file_name|><|fim▁begin|>__author__ = 'Nishanth'
from juliabox.cloud import JBPluginCloud
from juliabox.jbox_util import JBoxCfg, retry_on_errors
from googleapiclient.discovery import build
from oauth2client.client import GoogleCredentials
import threading
class JBoxGCD(JBPluginCloud):
... | add_cname |
<|file_name|>impl_gcd.py<|end_file_name|><|fim▁begin|>__author__ = 'Nishanth'
from juliabox.cloud import JBPluginCloud
from juliabox.jbox_util import JBoxCfg, retry_on_errors
from googleapiclient.discovery import build
from oauth2client.client import GoogleCredentials
import threading
class JBoxGCD(JBPluginCloud):
... | delete_cname |
<|file_name|>templates.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python
# -*- coding: utf-8 -*-
#--------------------------------------------------------------------
# Copyright (c) 2014 Eren Inan Canpolat
# Author: Eren Inan Canpolat <eren.canpolat@gmail.com>
#
# This program is free software: you can redistribute i... | </body>
</html>"""
toc_ncx = u"""<?xml version="1.0" encoding="utf-8"?> |
<|file_name|>DifferentialEvolutionAbstract.py<|end_file_name|><|fim▁begin|>import numpy
class DifferentialEvolutionAbstract:
amount_of_individuals = None
f = None
p = None
end_method = None
def __init__(self, min_element=-1, max_element=1):
self.min_element = min_element
self.max_... | |
<|file_name|>DifferentialEvolutionAbstract.py<|end_file_name|><|fim▁begin|>import numpy
class DifferentialEvolutionAbstract:
<|fim_middle|>
<|fim▁end|> | amount_of_individuals = None
f = None
p = None
end_method = None
def __init__(self, min_element=-1, max_element=1):
self.min_element = min_element
self.max_element = max_element
self.f = 0.5
self.p = 0.9
self.func = None
self.population = None
... |
<|file_name|>DifferentialEvolutionAbstract.py<|end_file_name|><|fim▁begin|>import numpy
class DifferentialEvolutionAbstract:
amount_of_individuals = None
f = None
p = None
end_method = None
def __init__(self, min_element=-1, max_element=1):
<|fim_middle|>
def set_amount_of_individua... | self.min_element = min_element
self.max_element = max_element
self.f = 0.5
self.p = 0.9
self.func = None
self.population = None
self.func_population = None
self.dim = 0
self.child_funcs = None
self.cost_list = []
self.end_method = ... |
<|file_name|>DifferentialEvolutionAbstract.py<|end_file_name|><|fim▁begin|>import numpy
class DifferentialEvolutionAbstract:
amount_of_individuals = None
f = None
p = None
end_method = None
def __init__(self, min_element=-1, max_element=1):
self.min_element = min_element
self.max_... | self.amount_of_individuals = amount_of_individuals |
<|file_name|>DifferentialEvolutionAbstract.py<|end_file_name|><|fim▁begin|>import numpy
class DifferentialEvolutionAbstract:
amount_of_individuals = None
f = None
p = None
end_method = None
def __init__(self, min_element=-1, max_element=1):
self.min_element = min_element
self.max_... | self.f = f
self.p = p |
<|file_name|>DifferentialEvolutionAbstract.py<|end_file_name|><|fim▁begin|>import numpy
class DifferentialEvolutionAbstract:
amount_of_individuals = None
f = None
p = None
end_method = None
def __init__(self, min_element=-1, max_element=1):
self.min_element = min_element
self.max_... | self.end_method = end_method |
<|file_name|>DifferentialEvolutionAbstract.py<|end_file_name|><|fim▁begin|>import numpy
class DifferentialEvolutionAbstract:
amount_of_individuals = None
f = None
p = None
end_method = None
def __init__(self, min_element=-1, max_element=1):
self.min_element = min_element
self.max_... | for _ in range(self.amount_of_individuals):
population.append(numpy.random.uniform(self.min_element, self.max_element, self.dim))
return numpy.array(population)
def choose |
<|file_name|>DifferentialEvolutionAbstract.py<|end_file_name|><|fim▁begin|>import numpy
class DifferentialEvolutionAbstract:
amount_of_individuals = None
f = None
p = None
end_method = None
def __init__(self, min_element=-1, max_element=1):
self.min_element = min_element
self.max_... | = func_list.index(min(func_list))
return self.population[best_index]
def iteration(self):
return []
def opt |
<|file_name|>DifferentialEvolutionAbstract.py<|end_file_name|><|fim▁begin|>import numpy
class DifferentialEvolutionAbstract:
amount_of_individuals = None
f = None
p = None
end_method = None
def __init__(self, min_element=-1, max_element=1):
self.min_element = min_element
self.max_... | bug_pop_p |
<|file_name|>DifferentialEvolutionAbstract.py<|end_file_name|><|fim▁begin|>import numpy
class DifferentialEvolutionAbstract:
amount_of_individuals = None
f = None
p = None
end_method = None
def __init__(self, min_element=-1, max_element=1):
self.min_element = min_element
self.max_... | self.cos |
<|file_name|>DifferentialEvolutionAbstract.py<|end_file_name|><|fim▁begin|>import numpy
class DifferentialEvolutionAbstract:
amount_of_individuals = None
f = None
p = None
end_method = None
def __init__(self, min_element=-1, max_element=1):
self.min_element = min_element
self.max_... | |
<|file_name|>DifferentialEvolutionAbstract.py<|end_file_name|><|fim▁begin|>import numpy
class DifferentialEvolutionAbstract:
amount_of_individuals = None
f = None
p = None
end_method = None
def <|fim_middle|>(self, min_element=-1, max_element=1):
self.min_element = min_element
sel... | __init__ |
<|file_name|>DifferentialEvolutionAbstract.py<|end_file_name|><|fim▁begin|>import numpy
class DifferentialEvolutionAbstract:
amount_of_individuals = None
f = None
p = None
end_method = None
def __init__(self, min_element=-1, max_element=1):
self.min_element = min_element
self.max_... | set_amount_of_individuals |
<|file_name|>DifferentialEvolutionAbstract.py<|end_file_name|><|fim▁begin|>import numpy
class DifferentialEvolutionAbstract:
amount_of_individuals = None
f = None
p = None
end_method = None
def __init__(self, min_element=-1, max_element=1):
self.min_element = min_element
self.max_... | set_params |
<|file_name|>DifferentialEvolutionAbstract.py<|end_file_name|><|fim▁begin|>import numpy
class DifferentialEvolutionAbstract:
amount_of_individuals = None
f = None
p = None
end_method = None
def __init__(self, min_element=-1, max_element=1):
self.min_element = min_element
self.max_... | set_end_method |
<|file_name|>DifferentialEvolutionAbstract.py<|end_file_name|><|fim▁begin|>import numpy
class DifferentialEvolutionAbstract:
amount_of_individuals = None
f = None
p = None
end_method = None
def __init__(self, min_element=-1, max_element=1):
self.min_element = min_element
self.max_... | create_population |
<|file_name|>DifferentialEvolutionAbstract.py<|end_file_name|><|fim▁begin|>import numpy
class DifferentialEvolutionAbstract:
amount_of_individuals = None
f = None
p = None
end_method = None
def __init__(self, min_element=-1, max_element=1):
self.min_element = min_element
self.max_... | vidual(self):
|
<|file_name|>DifferentialEvolutionAbstract.py<|end_file_name|><|fim▁begin|>import numpy
class DifferentialEvolutionAbstract:
amount_of_individuals = None
f = None
p = None
end_method = None
def __init__(self, min_element=-1, max_element=1):
self.min_element = min_element
self.max_... | , func, d |
<|file_name|>DifferentialEvolutionAbstract.py<|end_file_name|><|fim▁begin|>import numpy
class DifferentialEvolutionAbstract:
amount_of_individuals = None
f = None
p = None
end_method = None
def __init__(self, min_element=-1, max_element=1):
self.min_element = min_element
self.max_... | |
<|file_name|>DifferentialEvolutionAbstract.py<|end_file_name|><|fim▁begin|>import numpy
class DifferentialEvolutionAbstract:
amount_of_individuals = None
f = None
p = None
end_method = None
def __init__(self, min_element=-1, max_element=1):
self.min_element = min_element
self.max_... | |
<|file_name|>gh_post_style_patch.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3
#
# Copyright (C) 2018-2019 The ESPResSo project
#
# This file is part of ESPResSo.
#
# ESPResSo is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Fr... |
# Delete obsolete posts
gh_post.delete_comments_by_token(TOKEN_ESPRESSO_CI)
|
<|file_name|>gh_post_style_patch.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3
#
# Copyright (C) 2018-2019 The ESPResSo project
#
# This file is part of ESPResSo.
#
# ESPResSo is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Fr... | print("Not a pull request. Exiting now.")
exit(0) |
<|file_name|>gh_post_style_patch.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3
#
# Copyright (C) 2018-2019 The ESPResSo project
#
# This file is part of ESPResSo.
#
# ESPResSo is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Fr... | patch = subprocess.check_output(['git', '--no-pager', 'diff'])
if len(patch) <= SIZELIMIT:
comment = 'Specifically, I suggest you make the following changes:'
comment += '\n```diff\n'
comment += patch.decode('utf-8').replace('`', r'\`').strip()
comment += '\n```\n'
commen... |
<|file_name|>gh_post_style_patch.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3
#
# Copyright (C) 2018-2019 The ESPResSo project
#
# This file is part of ESPResSo.
#
# ESPResSo is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Fr... | comment = 'Specifically, I suggest you make the following changes:'
comment += '\n```diff\n'
comment += patch.decode('utf-8').replace('`', r'\`').strip()
comment += '\n```\n'
comment += 'To apply these changes' |
<|file_name|>gh_post_style_patch.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3
#
# Copyright (C) 2018-2019 The ESPResSo project
#
# This file is part of ESPResSo.
#
# ESPResSo is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Fr... | comment = 'To fix this' |
<|file_name|>gh_post_style_patch.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3
#
# Copyright (C) 2018-2019 The ESPResSo project
#
# This file is part of ESPResSo.
#
# ESPResSo is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Fr... | assert TOKEN_ESPRESSO_CI in comment
gh_post.post_message(comment) |
<|file_name|>LiDAR_tools.py<|end_file_name|><|fim▁begin|>import numpy as np
import laspy as las
# Determine if a point is inside a given polygon or not
# Polygon is a list of (x,y) pairs. This function
# returns True or False. The algorithm is called
# the "Ray Casting Method".
# the point_in_poly algorithm was found... | # This function has been updated to include an option to filter by first return location.
# The reason for this is so full collections of returns associated with each LiDAR pulse
# can be retrieved, which can be an issue at edges in multi-return analyses
def filter_lidar_data_by_polygon(in_pts,polygon,filter_by_first_r... |
<|file_name|>LiDAR_tools.py<|end_file_name|><|fim▁begin|>import numpy as np
import laspy as las
# Determine if a point is inside a given polygon or not
# Polygon is a list of (x,y) pairs. This function
# returns True or False. The algorithm is called
# the "Ray Casting Method".
# the point_in_poly algorithm was found... | n = len(poly)
inside = False
p1x,p1y = poly[0]
for i in range(n+1):
p2x,p2y = poly[i % n]
if y > min(p1y,p2y):
if y <= max(p1y,p2y):
if x <= max(p1x,p2x):
if p1y != p2y:
xints = (y-p1y)*(p2x-p1x)/(p2y-p1y)+p1x
... |
<|file_name|>LiDAR_tools.py<|end_file_name|><|fim▁begin|>import numpy as np
import laspy as las
# Determine if a point is inside a given polygon or not
# Polygon is a list of (x,y) pairs. This function
# returns True or False. The algorithm is called
# the "Ray Casting Method".
# the point_in_poly algorithm was found... | n = len(poly)
inside=np.zeros(x.size,dtype=bool)
xints=np.zeros(x.size)
p1x,p1y = poly[0]
for i in range(n+1):
p2x,p2y=poly[i % n]
if p1y!=p2y:
xints[np.all([y>min(p1y,p2y), y<=max(p1y,p2y), x<=max(p1x,p2x)],axis=0)] = (y[np.all([y>min(p1y,p2y), y<=max(p1y,p2y), x<=max(p... |
<|file_name|>LiDAR_tools.py<|end_file_name|><|fim▁begin|>import numpy as np
import laspy as las
# Determine if a point is inside a given polygon or not
# Polygon is a list of (x,y) pairs. This function
# returns True or False. The algorithm is called
# the "Ray Casting Method".
# the point_in_poly algorithm was found... | inside=np.zeros(x.size,dtype=bool)
d2=(x-target_x)**2+(y-target_y)**2
inside = d2<=radius**2
return x[inside],y[inside], inside |
<|file_name|>LiDAR_tools.py<|end_file_name|><|fim▁begin|>import numpy as np
import laspy as las
# Determine if a point is inside a given polygon or not
# Polygon is a list of (x,y) pairs. This function
# returns True or False. The algorithm is called
# the "Ray Casting Method".
# the point_in_poly algorithm was found... | pts = np.zeros((0,in_pts.shape[1]))
if in_pts.shape[0]>0:
if filter_by_first_return_location:
# find first returns
mask = in_pts[:,3]==1
x_temp, y_temp, inside_temp = points_in_poly(in_pts[mask,0],in_pts[mask,1],polygon)
shots = np.unique(in_pts[mask,6][in... |
<|file_name|>LiDAR_tools.py<|end_file_name|><|fim▁begin|>import numpy as np
import laspy as las
# Determine if a point is inside a given polygon or not
# Polygon is a list of (x,y) pairs. This function
# returns True or False. The algorithm is called
# the "Ray Casting Method".
# the point_in_poly algorithm was found... | pts = np.zeros((0,in_pts.shape[1]))
if in_pts.shape[0]>0:
x,y,inside = points_in_radius(in_pts[:,0],in_pts[:,1],target_xy[0],target_xy[1],radius)
pts = in_pts[inside,:]
else:
print( "\t\t\t no points in neighbourhood")
return pts |
<|file_name|>LiDAR_tools.py<|end_file_name|><|fim▁begin|>import numpy as np
import laspy as las
# Determine if a point is inside a given polygon or not
# Polygon is a list of (x,y) pairs. This function
# returns True or False. The algorithm is called
# the "Ray Casting Method".
# the point_in_poly algorithm was found... | if y <= max(p1y,p2y):
if x <= max(p1x,p2x):
if p1y != p2y:
xints = (y-p1y)*(p2x-p1x)/(p2y-p1y)+p1x
if p1x == p2x or x <= xints:
inside = not inside |
<|file_name|>LiDAR_tools.py<|end_file_name|><|fim▁begin|>import numpy as np
import laspy as las
# Determine if a point is inside a given polygon or not
# Polygon is a list of (x,y) pairs. This function
# returns True or False. The algorithm is called
# the "Ray Casting Method".
# the point_in_poly algorithm was found... | if x <= max(p1x,p2x):
if p1y != p2y:
xints = (y-p1y)*(p2x-p1x)/(p2y-p1y)+p1x
if p1x == p2x or x <= xints:
inside = not inside |
<|file_name|>LiDAR_tools.py<|end_file_name|><|fim▁begin|>import numpy as np
import laspy as las
# Determine if a point is inside a given polygon or not
# Polygon is a list of (x,y) pairs. This function
# returns True or False. The algorithm is called
# the "Ray Casting Method".
# the point_in_poly algorithm was found... | if p1y != p2y:
xints = (y-p1y)*(p2x-p1x)/(p2y-p1y)+p1x
if p1x == p2x or x <= xints:
inside = not inside |
<|file_name|>LiDAR_tools.py<|end_file_name|><|fim▁begin|>import numpy as np
import laspy as las
# Determine if a point is inside a given polygon or not
# Polygon is a list of (x,y) pairs. This function
# returns True or False. The algorithm is called
# the "Ray Casting Method".
# the point_in_poly algorithm was found... | xints = (y-p1y)*(p2x-p1x)/(p2y-p1y)+p1x |
<|file_name|>LiDAR_tools.py<|end_file_name|><|fim▁begin|>import numpy as np
import laspy as las
# Determine if a point is inside a given polygon or not
# Polygon is a list of (x,y) pairs. This function
# returns True or False. The algorithm is called
# the "Ray Casting Method".
# the point_in_poly algorithm was found... | inside = not inside |
<|file_name|>LiDAR_tools.py<|end_file_name|><|fim▁begin|>import numpy as np
import laspy as las
# Determine if a point is inside a given polygon or not
# Polygon is a list of (x,y) pairs. This function
# returns True or False. The algorithm is called
# the "Ray Casting Method".
# the point_in_poly algorithm was found... | xints[np.all([y>min(p1y,p2y), y<=max(p1y,p2y), x<=max(p1x,p2x)],axis=0)] = (y[np.all([y>min(p1y,p2y), y<=max(p1y,p2y), x<=max(p1x,p2x)],axis=0)]-p1y)*(p2x-p1x)/(p2y-p1y)+p1x |
<|file_name|>LiDAR_tools.py<|end_file_name|><|fim▁begin|>import numpy as np
import laspy as las
# Determine if a point is inside a given polygon or not
# Polygon is a list of (x,y) pairs. This function
# returns True or False. The algorithm is called
# the "Ray Casting Method".
# the point_in_poly algorithm was found... | inside[np.all([y>min(p1y,p2y), y<=max(p1y,p2y), x<=max(p1x,p2x)],axis=0)] = np.invert(inside[np.all([y>min(p1y,p2y), y<=max(p1y,p2y), x<=max(p1x,p2x)],axis=0)]) |
<|file_name|>LiDAR_tools.py<|end_file_name|><|fim▁begin|>import numpy as np
import laspy as las
# Determine if a point is inside a given polygon or not
# Polygon is a list of (x,y) pairs. This function
# returns True or False. The algorithm is called
# the "Ray Casting Method".
# the point_in_poly algorithm was found... | inside[np.all([y>min(p1y,p2y), y<=max(p1y,p2y), x<=max(p1x,p2x),x<=xints],axis=0)] = np.invert(inside[np.all([y>min(p1y,p2y), y<=max(p1y,p2y), x<=max(p1x,p2x),x<=xints],axis=0)]) |
<|file_name|>LiDAR_tools.py<|end_file_name|><|fim▁begin|>import numpy as np
import laspy as las
# Determine if a point is inside a given polygon or not
# Polygon is a list of (x,y) pairs. This function
# returns True or False. The algorithm is called
# the "Ray Casting Method".
# the point_in_poly algorithm was found... | if filter_by_first_return_location:
# find first returns
mask = in_pts[:,3]==1
x_temp, y_temp, inside_temp = points_in_poly(in_pts[mask,0],in_pts[mask,1],polygon)
shots = np.unique(in_pts[mask,6][inside_temp]) # index 6 refers to GPS time
inside = np.i... |
<|file_name|>LiDAR_tools.py<|end_file_name|><|fim▁begin|>import numpy as np
import laspy as las
# Determine if a point is inside a given polygon or not
# Polygon is a list of (x,y) pairs. This function
# returns True or False. The algorithm is called
# the "Ray Casting Method".
# the point_in_poly algorithm was found... | mask = in_pts[:,3]==1
x_temp, y_temp, inside_temp = points_in_poly(in_pts[mask,0],in_pts[mask,1],polygon)
shots = np.unique(in_pts[mask,6][inside_temp]) # index 6 refers to GPS time
inside = np.in1d(in_pts[:,6],shots) # this function retrieves all points corresponding to ... |
<|file_name|>LiDAR_tools.py<|end_file_name|><|fim▁begin|>import numpy as np
import laspy as las
# Determine if a point is inside a given polygon or not
# Polygon is a list of (x,y) pairs. This function
# returns True or False. The algorithm is called
# the "Ray Casting Method".
# the point_in_poly algorithm was found... | x,y,inside = points_in_poly(in_pts[:,0],in_pts[:,1],polygon) |
<|file_name|>LiDAR_tools.py<|end_file_name|><|fim▁begin|>import numpy as np
import laspy as las
# Determine if a point is inside a given polygon or not
# Polygon is a list of (x,y) pairs. This function
# returns True or False. The algorithm is called
# the "Ray Casting Method".
# the point_in_poly algorithm was found... | print("\t\t\t no points in polygon") |
<|file_name|>LiDAR_tools.py<|end_file_name|><|fim▁begin|>import numpy as np
import laspy as las
# Determine if a point is inside a given polygon or not
# Polygon is a list of (x,y) pairs. This function
# returns True or False. The algorithm is called
# the "Ray Casting Method".
# the point_in_poly algorithm was found... | x,y,inside = points_in_radius(in_pts[:,0],in_pts[:,1],target_xy[0],target_xy[1],radius)
pts = in_pts[inside,:] |
<|file_name|>LiDAR_tools.py<|end_file_name|><|fim▁begin|>import numpy as np
import laspy as las
# Determine if a point is inside a given polygon or not
# Polygon is a list of (x,y) pairs. This function
# returns True or False. The algorithm is called
# the "Ray Casting Method".
# the point_in_poly algorithm was found... | print( "\t\t\t no points in neighbourhood") |
<|file_name|>LiDAR_tools.py<|end_file_name|><|fim▁begin|>import numpy as np
import laspy as las
# Determine if a point is inside a given polygon or not
# Polygon is a list of (x,y) pairs. This function
# returns True or False. The algorithm is called
# the "Ray Casting Method".
# the point_in_poly algorithm was found... | point_in_poly |
<|file_name|>LiDAR_tools.py<|end_file_name|><|fim▁begin|>import numpy as np
import laspy as las
# Determine if a point is inside a given polygon or not
# Polygon is a list of (x,y) pairs. This function
# returns True or False. The algorithm is called
# the "Ray Casting Method".
# the point_in_poly algorithm was found... | points_in_poly |
<|file_name|>LiDAR_tools.py<|end_file_name|><|fim▁begin|>import numpy as np
import laspy as las
# Determine if a point is inside a given polygon or not
# Polygon is a list of (x,y) pairs. This function
# returns True or False. The algorithm is called
# the "Ray Casting Method".
# the point_in_poly algorithm was found... | points_in_radius |
<|file_name|>LiDAR_tools.py<|end_file_name|><|fim▁begin|>import numpy as np
import laspy as las
# Determine if a point is inside a given polygon or not
# Polygon is a list of (x,y) pairs. This function
# returns True or False. The algorithm is called
# the "Ray Casting Method".
# the point_in_poly algorithm was found... | filter_lidar_data_by_polygon |
<|file_name|>LiDAR_tools.py<|end_file_name|><|fim▁begin|>import numpy as np
import laspy as las
# Determine if a point is inside a given polygon or not
# Polygon is a list of (x,y) pairs. This function
# returns True or False. The algorithm is called
# the "Ray Casting Method".
# the point_in_poly algorithm was found... | filter_lidar_data_by_neighbourhood |
<|file_name|>namespace_resolver.py<|end_file_name|><|fim▁begin|># Copyright 2016 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import os
from cpp_namespace_environment import CppNamespaceEnvironment
from model import Mo... | if os.path.exists(os.path.join(self._root, filepath)): |
<|file_name|>namespace_resolver.py<|end_file_name|><|fim▁begin|># Copyright 2016 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import os
from cpp_namespace_environment import CppNamespaceEnvironment
from model import Mo... | sub_namespaces = full_namespace.split('.')
filenames = [ ]
basename = None
for namespace in reversed(sub_namespaces):
if basename is not None:
basename = UnixName(namespace + '.' + basename)
else:
basename = UnixName(namespace)
for ext in ['json', 'idl']:
filenames.append('%s.%s' %... |
<|file_name|>namespace_resolver.py<|end_file_name|><|fim▁begin|># Copyright 2016 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import os
from cpp_namespace_environment import CppNamespaceEnvironment
from model import Mo... | '''Resolves a type name into the namespace the type belongs to.
- |root| path to the root directory.
- |path| path to the directory with the API header files, relative to the
root.
- |include_rules| List containing tuples with (path, cpp_namespace_pattern)
used when searching for types.
- |cpp_namespa... |
<|file_name|>namespace_resolver.py<|end_file_name|><|fim▁begin|># Copyright 2016 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import os
from cpp_namespace_environment import CppNamespaceEnvironment
from model import Mo... | self._root = root
self._include_rules = [(path, cpp_namespace_pattern)] + include_rules |
<|file_name|>namespace_resolver.py<|end_file_name|><|fim▁begin|># Copyright 2016 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import os
from cpp_namespace_environment import CppNamespaceEnvironment
from model import Mo... | '''Returns the model.Namespace object associated with the |full_namespace|,
or None if one can't be found.
'''
filenames = _GenerateFilenames(full_namespace)
for path, cpp_namespace in self._include_rules:
cpp_namespace_environment = None
if cpp_namespace:
cpp_namespace_environme... |
<|file_name|>namespace_resolver.py<|end_file_name|><|fim▁begin|># Copyright 2016 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import os
from cpp_namespace_environment import CppNamespaceEnvironment
from model import Mo... | '''Returns the model.Namespace object where the type with the given
|full_name| is defined, or None if one can't be found.
'''
name_parts = full_name.rsplit('.', 1)
if len(name_parts) == 1:
if full_name not in default_namespace.types:
return None
return default_namespace
full... |
<|file_name|>namespace_resolver.py<|end_file_name|><|fim▁begin|># Copyright 2016 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import os
from cpp_namespace_environment import CppNamespaceEnvironment
from model import Mo... | basename = UnixName(namespace + '.' + basename) |
<|file_name|>namespace_resolver.py<|end_file_name|><|fim▁begin|># Copyright 2016 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import os
from cpp_namespace_environment import CppNamespaceEnvironment
from model import Mo... | basename = UnixName(namespace) |
<|file_name|>namespace_resolver.py<|end_file_name|><|fim▁begin|># Copyright 2016 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import os
from cpp_namespace_environment import CppNamespaceEnvironment
from model import Mo... | cpp_namespace_environment = CppNamespaceEnvironment(cpp_namespace) |
<|file_name|>namespace_resolver.py<|end_file_name|><|fim▁begin|># Copyright 2016 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import os
from cpp_namespace_environment import CppNamespaceEnvironment
from model import Mo... | schema = SchemaLoader(self._root).LoadSchema(filepath)[0]
return Model().AddNamespace(
schema,
filepath,
environment=cpp_namespace_environment) |
<|file_name|>namespace_resolver.py<|end_file_name|><|fim▁begin|># Copyright 2016 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import os
from cpp_namespace_environment import CppNamespaceEnvironment
from model import Mo... | if full_name not in default_namespace.types:
return None
return default_namespace |
<|file_name|>namespace_resolver.py<|end_file_name|><|fim▁begin|># Copyright 2016 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import os
from cpp_namespace_environment import CppNamespaceEnvironment
from model import Mo... | return None |
<|file_name|>namespace_resolver.py<|end_file_name|><|fim▁begin|># Copyright 2016 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import os
from cpp_namespace_environment import CppNamespaceEnvironment
from model import Mo... | return namespace |
<|file_name|>namespace_resolver.py<|end_file_name|><|fim▁begin|># Copyright 2016 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import os
from cpp_namespace_environment import CppNamespaceEnvironment
from model import Mo... | _GenerateFilenames |
<|file_name|>namespace_resolver.py<|end_file_name|><|fim▁begin|># Copyright 2016 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import os
from cpp_namespace_environment import CppNamespaceEnvironment
from model import Mo... | __init__ |
<|file_name|>namespace_resolver.py<|end_file_name|><|fim▁begin|># Copyright 2016 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import os
from cpp_namespace_environment import CppNamespaceEnvironment
from model import Mo... | ResolveNamespace |
<|file_name|>namespace_resolver.py<|end_file_name|><|fim▁begin|># Copyright 2016 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import os
from cpp_namespace_environment import CppNamespaceEnvironment
from model import Mo... | ResolveType |
<|file_name|>pip3.py<|end_file_name|><|fim▁begin|>import subprocess
<|fim▁hole|>
subprocess.call(["python3", "setup.py", "sdist", "upload"])<|fim▁end|> | def release(): |
<|file_name|>pip3.py<|end_file_name|><|fim▁begin|>import subprocess
def release():
<|fim_middle|>
<|fim▁end|> | subprocess.call(["python3", "setup.py", "sdist", "upload"]) |
<|file_name|>pip3.py<|end_file_name|><|fim▁begin|>import subprocess
def <|fim_middle|>():
subprocess.call(["python3", "setup.py", "sdist", "upload"])
<|fim▁end|> | release |
<|file_name|>vtkRuledSurfaceFilter.py<|end_file_name|><|fim▁begin|># class generated by DeVIDE::createDeVIDEModuleFromVTKObject
from module_kits.vtk_kit.mixins import SimpleVTKClassModuleBase<|fim▁hole|> def __init__(self, module_manager):
SimpleVTKClassModuleBase.__init__(
self, module_manager,
... | import vtk
class vtkRuledSurfaceFilter(SimpleVTKClassModuleBase): |
<|file_name|>vtkRuledSurfaceFilter.py<|end_file_name|><|fim▁begin|># class generated by DeVIDE::createDeVIDEModuleFromVTKObject
from module_kits.vtk_kit.mixins import SimpleVTKClassModuleBase
import vtk
class vtkRuledSurfaceFilter(SimpleVTKClassModuleBase):
<|fim_middle|>
<|fim▁end|> | def __init__(self, module_manager):
SimpleVTKClassModuleBase.__init__(
self, module_manager,
vtk.vtkRuledSurfaceFilter(), 'Processing.',
('vtkPolyData',), ('vtkPolyData',),
replaceDoc=True,
inputFunctions=None, outputFunctions=None) |
<|file_name|>vtkRuledSurfaceFilter.py<|end_file_name|><|fim▁begin|># class generated by DeVIDE::createDeVIDEModuleFromVTKObject
from module_kits.vtk_kit.mixins import SimpleVTKClassModuleBase
import vtk
class vtkRuledSurfaceFilter(SimpleVTKClassModuleBase):
def __init__(self, module_manager):
<|fim_middle|... | SimpleVTKClassModuleBase.__init__(
self, module_manager,
vtk.vtkRuledSurfaceFilter(), 'Processing.',
('vtkPolyData',), ('vtkPolyData',),
replaceDoc=True,
inputFunctions=None, outputFunctions=None) |
<|file_name|>vtkRuledSurfaceFilter.py<|end_file_name|><|fim▁begin|># class generated by DeVIDE::createDeVIDEModuleFromVTKObject
from module_kits.vtk_kit.mixins import SimpleVTKClassModuleBase
import vtk
class vtkRuledSurfaceFilter(SimpleVTKClassModuleBase):
def <|fim_middle|>(self, module_manager):
SimpleV... | __init__ |
<|file_name|>0002_auto_20180826_0054.py<|end_file_name|><|fim▁begin|><|fim▁hole|>
class Migration(migrations.Migration):
dependencies = [
('model_filefields_example', '0001_initial'),
]
operations = [
migrations.AlterField(
model_name='book',
name='cover',
... | # Generated by Django 2.1 on 2018-08-26 00:54
from django.db import migrations, models
|
<|file_name|>0002_auto_20180826_0054.py<|end_file_name|><|fim▁begin|># Generated by Django 2.1 on 2018-08-26 00:54
from django.db import migrations, models
class Migration(migrations.Migration):
<|fim_middle|>
<|fim▁end|> | dependencies = [
('model_filefields_example', '0001_initial'),
]
operations = [
migrations.AlterField(
model_name='book',
name='cover',
field=models.ImageField(blank=True, null=True, upload_to='model_filefields_example.BookCover/bytes/filename/mimetype'),... |
<|file_name|>hackRIT.py<|end_file_name|><|fim▁begin|>import os
#Decoration Starts
print """
+=============================================================+
|| Privilege Escalation Exploit ||
|| +===================================================+ ||
|| | _ _ _ ____ _ __ ____ ___ ... | |
<|file_name|>hackRIT.py<|end_file_name|><|fim▁begin|>import os
#Decoration Starts
print """
+=============================================================+
|| Privilege Escalation Exploit ||
|| +===================================================+ ||
|| | _ _ _ ____ _ __ ____ ___ ... | year_choice = 1300000 #Final Year |
<|file_name|>hackRIT.py<|end_file_name|><|fim▁begin|>import os
#Decoration Starts
print """
+=============================================================+
|| Privilege Escalation Exploit ||
|| +===================================================+ ||
|| | _ _ _ ____ _ __ ____ ___ ... | year_choice = 1400000 #Third Year |
<|file_name|>hackRIT.py<|end_file_name|><|fim▁begin|>import os
#Decoration Starts
print """
+=============================================================+
|| Privilege Escalation Exploit ||
|| +===================================================+ ||
|| | _ _ _ ____ _ __ ____ ___ ... | year_choice = 1500000 #Second Year |
<|file_name|>hackRIT.py<|end_file_name|><|fim▁begin|>import os
#Decoration Starts
print """
+=============================================================+
|| Privilege Escalation Exploit ||
|| +===================================================+ ||
|| | _ _ _ ____ _ __ ____ ___ ... | year_choice = 1600000 #First Year |
<|file_name|>hackRIT.py<|end_file_name|><|fim▁begin|>import os
#Decoration Starts
print """
+=============================================================+
|| Privilege Escalation Exploit ||
|| +===================================================+ ||
|| | _ _ _ ____ _ __ ____ ___ ... | class_choice = 1000 #Automobile Department |
<|file_name|>hackRIT.py<|end_file_name|><|fim▁begin|>import os
#Decoration Starts
print """
+=============================================================+
|| Privilege Escalation Exploit ||
|| +===================================================+ ||
|| | _ _ _ ____ _ __ ____ ___ ... | class_choice = 2000 #Civil Department |
<|file_name|>hackRIT.py<|end_file_name|><|fim▁begin|>import os
#Decoration Starts
print """
+=============================================================+
|| Privilege Escalation Exploit ||
|| +===================================================+ ||
|| | _ _ _ ____ _ __ ____ ___ ... | class_choice = 3000 #ComputerScience Department |
<|file_name|>hackRIT.py<|end_file_name|><|fim▁begin|>import os
#Decoration Starts
print """
+=============================================================+
|| Privilege Escalation Exploit ||
|| +===================================================+ ||
|| | _ _ _ ____ _ __ ____ ___ ... | class_choice = 4000 #InformationTechnology Department |
<|file_name|>hackRIT.py<|end_file_name|><|fim▁begin|>import os
#Decoration Starts
print """
+=============================================================+
|| Privilege Escalation Exploit ||
|| +===================================================+ ||
|| | _ _ _ ____ _ __ ____ ___ ... | class_choice = 5000 #ETC Department |
<|file_name|>hackRIT.py<|end_file_name|><|fim▁begin|>import os
#Decoration Starts
print """
+=============================================================+
|| Privilege Escalation Exploit ||
|| +===================================================+ ||
|| | _ _ _ ____ _ __ ____ ___ ... | class_choice = 8000 #Electrial Department |
<|file_name|>hackRIT.py<|end_file_name|><|fim▁begin|>import os
#Decoration Starts
print """
+=============================================================+
|| Privilege Escalation Exploit ||
|| +===================================================+ ||
|| | _ _ _ ____ _ __ ____ ___ ... | class_choice = 6000 #Mechanical Department |
<|file_name|>hackRIT.py<|end_file_name|><|fim▁begin|>import os
#Decoration Starts
print """
+=============================================================+
|| Privilege Escalation Exploit ||
|| +===================================================+ ||
|| | _ _ _ ____ _ __ ____ ___ ... | endflag = year_choice + class_choice + 70 +128 #Special Arrangement for Mechanical ;) |
<|file_name|>hackRIT.py<|end_file_name|><|fim▁begin|>import os
#Decoration Starts
print """
+=============================================================+
|| Privilege Escalation Exploit ||
|| +===================================================+ ||
|| | _ _ _ ____ _ __ ____ ___ ... | endflag = year_choice + class_choice + 70 #For eg. End @ 1303070 |
<|file_name|>hackRIT.py<|end_file_name|><|fim▁begin|>import os
#Decoration Starts
print """
+=============================================================+
|| Privilege Escalation Exploit ||
|| +===================================================+ ||
|| | _ _ _ ____ _ __ ____ ___ ... | pendflag = year_choice + class_choice + 40 + 150000 #For All branches |
<|file_name|>hackRIT.py<|end_file_name|><|fim▁begin|>import os
#Decoration Starts
print """
+=============================================================+
|| Privilege Escalation Exploit ||
|| +===================================================+ ||
|| | _ _ _ ____ _ __ ____ ___ ... | pendflag = year_choice + class_choice + 15 + 150000 #Special Arrangement for Mechanical ;) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.